iso20022_common/
common.rs

1// Open Payment Message Parsing Library
2// https://github.com/Open-Payments/iso20022-rs
3//
4// This library is designed to parse message formats based on the ISO 20022 standards,
5// including but not limited to FedNow messages. It supports various financial message types,
6// such as customer credit transfers, payment status reports, administrative notifications, 
7// and other ISO 20022 messages, using Serde for efficient serialization and deserialization.
8//
9// Copyright (c) 2024 Open Payments
10// Licensed under the Apache License, Version 2.0 (the "License");
11// you may not use this file except in compliance with the License.
12// You may obtain a copy of the License at
13//
14//     http://www.apache.org/licenses/LICENSE-2.0
15//
16// Unless required by applicable law or agreed to in writing, software
17// distributed under the License is distributed on an "AS IS" BASIS,
18// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19// See the License for the specific language governing permissions and
20// limitations under the License.
21//
22// You may obtain a copy of this library at
23// https://github.com/Open-Payments/iso20022-rs
24
25#![allow(unused_imports)]
26use regex::Regex;
27
28#[cfg(feature = "derive_serde")]
29use serde::{Deserialize, Serialize};
30use crate::ValidationError;
31
32
33// AbnormalValuesData4 ...
34#[cfg_attr(feature = "derive_debug", derive(Debug))]
35#[cfg_attr(feature = "derive_default", derive(Default))]
36#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37#[cfg_attr(feature = "derive_clone", derive(Clone))]
38#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39pub struct AbnormalValuesData4 {
40	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId") )]
41	pub ctr_pty_id: CounterpartyData92,
42	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfDerivsRptd") )]
43	pub nb_of_derivs_rptd: f64,
44	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfDerivsRptdWthOtlrs") )]
45	pub nb_of_derivs_rptd_wth_otlrs: f64,
46	#[cfg_attr( feature = "derive_serde", serde(rename = "TxDtls", skip_serializing_if = "Option::is_none") )]
47	pub tx_dtls: Option<Vec<AbnormalValuesTransactionData2>>,
48}
49
50impl AbnormalValuesData4 {
51	pub fn validate(&self) -> Result<(), ValidationError> {
52		self.ctr_pty_id.validate()?;
53		if let Some(ref vec) = self.tx_dtls { for item in vec { item.validate()? } }
54		Ok(())
55	}
56}
57
58
59// AbnormalValuesTransactionData2 ...
60#[cfg_attr(feature = "derive_debug", derive(Debug))]
61#[cfg_attr(feature = "derive_default", derive(Default))]
62#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63#[cfg_attr(feature = "derive_clone", derive(Clone))]
64#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65pub struct AbnormalValuesTransactionData2 {
66	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId") )]
67	pub tx_id: TradeTransactionIdentification24,
68	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlAmt", skip_serializing_if = "Option::is_none") )]
69	pub ntnl_amt: Option<NotionalAmountLegs5>,
70	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlQty", skip_serializing_if = "Option::is_none") )]
71	pub ntnl_qty: Option<NotionalQuantityLegs5>,
72}
73
74impl AbnormalValuesTransactionData2 {
75	pub fn validate(&self) -> Result<(), ValidationError> {
76		self.tx_id.validate()?;
77		if let Some(ref val) = self.ntnl_amt { val.validate()? }
78		if let Some(ref val) = self.ntnl_qty { val.validate()? }
79		Ok(())
80	}
81}
82
83
84// Absolute1 ...
85#[cfg_attr(feature = "derive_debug", derive(Debug))]
86#[cfg_attr(feature = "derive_default", derive(Default))]
87#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88#[cfg_attr(feature = "derive_clone", derive(Clone))]
89#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90pub struct Absolute1 {
91	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit") )]
92	pub unit: String,
93	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty") )]
94	pub qty: f64,
95}
96
97impl Absolute1 {
98	pub fn validate(&self) -> Result<(), ValidationError> {
99		if self.unit.chars().count() < 1 {
100			return Err(ValidationError::new(1001, "unit is shorter than the minimum length of 1".to_string()));
101		}
102		if self.unit.chars().count() > 35 {
103			return Err(ValidationError::new(1002, "unit exceeds the maximum length of 35".to_string()));
104		}
105		Ok(())
106	}
107}
108
109
110// AcceptanceResult6 ...
111#[cfg_attr(feature = "derive_debug", derive(Debug))]
112#[cfg_attr(feature = "derive_default", derive(Default))]
113#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
114#[cfg_attr(feature = "derive_clone", derive(Clone))]
115#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
116pub struct AcceptanceResult6 {
117	#[cfg_attr( feature = "derive_serde", serde(rename = "Accptd") )]
118	pub accptd: bool,
119	#[cfg_attr( feature = "derive_serde", serde(rename = "RjctRsn", skip_serializing_if = "Option::is_none") )]
120	pub rjct_rsn: Option<MandateReason1Choice>,
121	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRjctRsnInf", skip_serializing_if = "Option::is_none") )]
122	pub addtl_rjct_rsn_inf: Option<Vec<String>>,
123}
124
125impl AcceptanceResult6 {
126	pub fn validate(&self) -> Result<(), ValidationError> {
127		if let Some(ref val) = self.rjct_rsn { val.validate()? }
128		if let Some(ref vec) = self.addtl_rjct_rsn_inf {
129			for item in vec {
130				if item.chars().count() < 1 {
131					return Err(ValidationError::new(1001, "addtl_rjct_rsn_inf is shorter than the minimum length of 1".to_string()));
132				}
133				if item.chars().count() > 105 {
134					return Err(ValidationError::new(1002, "addtl_rjct_rsn_inf exceeds the maximum length of 105".to_string()));
135				}
136			}
137		}
138		Ok(())
139	}
140}
141
142
143// AcceptedReason7Choice ...
144#[cfg_attr(feature = "derive_debug", derive(Debug))]
145#[cfg_attr(feature = "derive_default", derive(Default))]
146#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
147#[cfg_attr(feature = "derive_clone", derive(Clone))]
148#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
149pub struct AcceptedReason7Choice {
150	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
151	pub cd: Option<String>,
152	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
153	pub prtry: Option<GenericIdentification36>,
154}
155
156impl AcceptedReason7Choice {
157	pub fn validate(&self) -> Result<(), ValidationError> {
158		if let Some(ref val) = self.cd {
159			if val.chars().count() < 1 {
160				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
161			}
162			if val.chars().count() > 4 {
163				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
164			}
165		}
166		if let Some(ref val) = self.prtry { val.validate()? }
167		Ok(())
168	}
169}
170
171
172// AcceptedReason8Choice ...
173#[cfg_attr(feature = "derive_debug", derive(Debug))]
174#[cfg_attr(feature = "derive_default", derive(Default))]
175#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
176#[cfg_attr(feature = "derive_clone", derive(Clone))]
177#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
178pub struct AcceptedReason8Choice {
179	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
180	pub no_spcfd_rsn: Option<NoReasonCode>,
181	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
182	pub rsn: Option<AcceptedReason7Choice>,
183}
184
185impl AcceptedReason8Choice {
186	pub fn validate(&self) -> Result<(), ValidationError> {
187		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
188		if let Some(ref val) = self.rsn { val.validate()? }
189		Ok(())
190	}
191}
192
193
194// AcceptedStatusReason1Choice ...
195#[cfg_attr(feature = "derive_debug", derive(Debug))]
196#[cfg_attr(feature = "derive_default", derive(Default))]
197#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
198#[cfg_attr(feature = "derive_clone", derive(Clone))]
199#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
200pub struct AcceptedStatusReason1Choice {
201	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
202	pub cd: Option<AcceptedStatusReason1Code>,
203	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
204	pub prtry: Option<GenericIdentification36>,
205}
206
207impl AcceptedStatusReason1Choice {
208	pub fn validate(&self) -> Result<(), ValidationError> {
209		if let Some(ref val) = self.cd { val.validate()? }
210		if let Some(ref val) = self.prtry { val.validate()? }
211		Ok(())
212	}
213}
214
215
216// AcceptedStatusReason1Code ...
217#[cfg_attr(feature = "derive_debug", derive(Debug))]
218#[cfg_attr(feature = "derive_default", derive(Default))]
219#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
220#[cfg_attr(feature = "derive_clone", derive(Clone))]
221#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
222pub enum AcceptedStatusReason1Code {
223	#[cfg_attr(feature = "derive_default", default)]
224	#[cfg_attr( feature = "derive_serde", serde(rename = "PLAC") )]
225	CodePLAC,
226	#[cfg_attr( feature = "derive_serde", serde(rename = "SECT") )]
227	CodeSECT,
228}
229
230impl AcceptedStatusReason1Code {
231	pub fn validate(&self) -> Result<(), ValidationError> {
232		Ok(())
233	}
234}
235
236
237// AcceptedStatusReason7 ...
238#[cfg_attr(feature = "derive_debug", derive(Debug))]
239#[cfg_attr(feature = "derive_default", derive(Default))]
240#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
241#[cfg_attr(feature = "derive_clone", derive(Clone))]
242#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
243pub struct AcceptedStatusReason7 {
244	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
245	pub rsn: AcceptedReason8Choice,
246	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
247	pub addtl_rsn_inf: Option<String>,
248}
249
250impl AcceptedStatusReason7 {
251	pub fn validate(&self) -> Result<(), ValidationError> {
252		self.rsn.validate()?;
253		if let Some(ref val) = self.addtl_rsn_inf {
254			if val.chars().count() < 1 {
255				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
256			}
257			if val.chars().count() > 210 {
258				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
259			}
260		}
261		Ok(())
262	}
263}
264
265
266// Account23 ...
267#[cfg_attr(feature = "derive_debug", derive(Debug))]
268#[cfg_attr(feature = "derive_default", derive(Default))]
269#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
270#[cfg_attr(feature = "derive_clone", derive(Clone))]
271#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
272pub struct Account23 {
273	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId") )]
274	pub acct_id: String,
275	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdAcctDtls", skip_serializing_if = "Option::is_none") )]
276	pub rltd_acct_dtls: Option<GenericIdentification1>,
277}
278
279impl Account23 {
280	pub fn validate(&self) -> Result<(), ValidationError> {
281		if self.acct_id.chars().count() < 1 {
282			return Err(ValidationError::new(1001, "acct_id is shorter than the minimum length of 1".to_string()));
283		}
284		if self.acct_id.chars().count() > 35 {
285			return Err(ValidationError::new(1002, "acct_id exceeds the maximum length of 35".to_string()));
286		}
287		if let Some(ref val) = self.rltd_acct_dtls { val.validate()? }
288		Ok(())
289	}
290}
291
292
293// Account32 ...
294#[cfg_attr(feature = "derive_debug", derive(Debug))]
295#[cfg_attr(feature = "derive_default", derive(Default))]
296#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
297#[cfg_attr(feature = "derive_clone", derive(Clone))]
298#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
299pub struct Account32 {
300	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
301	pub id: Option<String>,
302	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr") )]
303	pub acct_svcr: PartyIdentification125Choice,
304}
305
306impl Account32 {
307	pub fn validate(&self) -> Result<(), ValidationError> {
308		if let Some(ref val) = self.id {
309			if val.chars().count() < 1 {
310				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
311			}
312			if val.chars().count() > 35 {
313				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
314			}
315		}
316		self.acct_svcr.validate()?;
317		Ok(())
318	}
319}
320
321
322// AccountAndParties3 ...
323#[cfg_attr(feature = "derive_debug", derive(Debug))]
324#[cfg_attr(feature = "derive_default", derive(Default))]
325#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
326#[cfg_attr(feature = "derive_clone", derive(Clone))]
327#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
328pub struct AccountAndParties3 {
329	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
330	pub id: CashAccount43,
331	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstgtdPties") )]
332	pub invstgtd_pties: InvestigatedParties1Choice,
333	#[cfg_attr( feature = "derive_serde", serde(rename = "AuthrtyReqTp") )]
334	pub authrty_req_tp: Vec<AuthorityRequestType1>,
335}
336
337impl AccountAndParties3 {
338	pub fn validate(&self) -> Result<(), ValidationError> {
339		self.id.validate()?;
340		self.invstgtd_pties.validate()?;
341		for item in &self.authrty_req_tp { item.validate()? }
342		Ok(())
343	}
344}
345
346
347// AccountCashEntryReturnCriteria3 ...
348#[cfg_attr(feature = "derive_debug", derive(Debug))]
349#[cfg_attr(feature = "derive_default", derive(Default))]
350#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
351#[cfg_attr(feature = "derive_clone", derive(Clone))]
352#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
353pub struct AccountCashEntryReturnCriteria3 {
354	#[cfg_attr( feature = "derive_serde", serde(rename = "NtryRefInd", skip_serializing_if = "Option::is_none") )]
355	pub ntry_ref_ind: Option<bool>,
356	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctTpInd", skip_serializing_if = "Option::is_none") )]
357	pub acct_tp_ind: Option<bool>,
358	#[cfg_attr( feature = "derive_serde", serde(rename = "NtryAmtInd", skip_serializing_if = "Option::is_none") )]
359	pub ntry_amt_ind: Option<bool>,
360	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctCcyInd", skip_serializing_if = "Option::is_none") )]
361	pub acct_ccy_ind: Option<bool>,
362	#[cfg_attr( feature = "derive_serde", serde(rename = "NtryStsInd", skip_serializing_if = "Option::is_none") )]
363	pub ntry_sts_ind: Option<bool>,
364	#[cfg_attr( feature = "derive_serde", serde(rename = "NtryDtInd", skip_serializing_if = "Option::is_none") )]
365	pub ntry_dt_ind: Option<bool>,
366	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrInd", skip_serializing_if = "Option::is_none") )]
367	pub acct_svcr_ind: Option<bool>,
368	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnrInd", skip_serializing_if = "Option::is_none") )]
369	pub acct_ownr_ind: Option<bool>,
370}
371
372impl AccountCashEntryReturnCriteria3 {
373	pub fn validate(&self) -> Result<(), ValidationError> {
374		Ok(())
375	}
376}
377
378
379// AccountContract2 ...
380#[cfg_attr(feature = "derive_debug", derive(Debug))]
381#[cfg_attr(feature = "derive_default", derive(Default))]
382#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
383#[cfg_attr(feature = "derive_clone", derive(Clone))]
384#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
385pub struct AccountContract2 {
386	#[cfg_attr( feature = "derive_serde", serde(rename = "TrgtGoLiveDt", skip_serializing_if = "Option::is_none") )]
387	pub trgt_go_live_dt: Option<String>,
388	#[cfg_attr( feature = "derive_serde", serde(rename = "TrgtClsgDt", skip_serializing_if = "Option::is_none") )]
389	pub trgt_clsg_dt: Option<String>,
390	#[cfg_attr( feature = "derive_serde", serde(rename = "UrgcyFlg", skip_serializing_if = "Option::is_none") )]
391	pub urgcy_flg: Option<bool>,
392}
393
394impl AccountContract2 {
395	pub fn validate(&self) -> Result<(), ValidationError> {
396		Ok(())
397	}
398}
399
400
401// AccountContract3 ...
402#[cfg_attr(feature = "derive_debug", derive(Debug))]
403#[cfg_attr(feature = "derive_default", derive(Default))]
404#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
405#[cfg_attr(feature = "derive_clone", derive(Clone))]
406#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
407pub struct AccountContract3 {
408	#[cfg_attr( feature = "derive_serde", serde(rename = "TrgtGoLiveDt", skip_serializing_if = "Option::is_none") )]
409	pub trgt_go_live_dt: Option<String>,
410	#[cfg_attr( feature = "derive_serde", serde(rename = "TrgtClsgDt", skip_serializing_if = "Option::is_none") )]
411	pub trgt_clsg_dt: Option<String>,
412	#[cfg_attr( feature = "derive_serde", serde(rename = "GoLiveDt", skip_serializing_if = "Option::is_none") )]
413	pub go_live_dt: Option<String>,
414	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
415	pub clsg_dt: Option<String>,
416	#[cfg_attr( feature = "derive_serde", serde(rename = "UrgcyFlg", skip_serializing_if = "Option::is_none") )]
417	pub urgcy_flg: Option<bool>,
418	#[cfg_attr( feature = "derive_serde", serde(rename = "RmvlInd", skip_serializing_if = "Option::is_none") )]
419	pub rmvl_ind: Option<bool>,
420}
421
422impl AccountContract3 {
423	pub fn validate(&self) -> Result<(), ValidationError> {
424		Ok(())
425	}
426}
427
428
429// AccountContract4 ...
430#[cfg_attr(feature = "derive_debug", derive(Debug))]
431#[cfg_attr(feature = "derive_default", derive(Default))]
432#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
433#[cfg_attr(feature = "derive_clone", derive(Clone))]
434#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
435pub struct AccountContract4 {
436	#[cfg_attr( feature = "derive_serde", serde(rename = "TrgtClsgDt", skip_serializing_if = "Option::is_none") )]
437	pub trgt_clsg_dt: Option<String>,
438	#[cfg_attr( feature = "derive_serde", serde(rename = "UrgcyFlg", skip_serializing_if = "Option::is_none") )]
439	pub urgcy_flg: Option<bool>,
440	#[cfg_attr( feature = "derive_serde", serde(rename = "RmvlInd", skip_serializing_if = "Option::is_none") )]
441	pub rmvl_ind: Option<bool>,
442}
443
444impl AccountContract4 {
445	pub fn validate(&self) -> Result<(), ValidationError> {
446		Ok(())
447	}
448}
449
450
451// AccountCriteria4Choice ...
452#[cfg_attr(feature = "derive_debug", derive(Debug))]
453#[cfg_attr(feature = "derive_default", derive(Default))]
454#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
455#[cfg_attr(feature = "derive_clone", derive(Clone))]
456#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
457pub struct AccountCriteria4Choice {
458	#[cfg_attr( feature = "derive_serde", serde(rename = "QryNm", skip_serializing_if = "Option::is_none") )]
459	pub qry_nm: Option<String>,
460	#[cfg_attr( feature = "derive_serde", serde(rename = "NewCrit", skip_serializing_if = "Option::is_none") )]
461	pub new_crit: Option<AccountCriteria8>,
462}
463
464impl AccountCriteria4Choice {
465	pub fn validate(&self) -> Result<(), ValidationError> {
466		if let Some(ref val) = self.qry_nm {
467			if val.chars().count() < 1 {
468				return Err(ValidationError::new(1001, "qry_nm is shorter than the minimum length of 1".to_string()));
469			}
470			if val.chars().count() > 35 {
471				return Err(ValidationError::new(1002, "qry_nm exceeds the maximum length of 35".to_string()));
472			}
473		}
474		if let Some(ref val) = self.new_crit { val.validate()? }
475		Ok(())
476	}
477}
478
479
480// AccountCriteria8 ...
481#[cfg_attr(feature = "derive_debug", derive(Debug))]
482#[cfg_attr(feature = "derive_default", derive(Default))]
483#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
484#[cfg_attr(feature = "derive_clone", derive(Clone))]
485#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
486pub struct AccountCriteria8 {
487	#[cfg_attr( feature = "derive_serde", serde(rename = "NewQryNm", skip_serializing_if = "Option::is_none") )]
488	pub new_qry_nm: Option<String>,
489	#[cfg_attr( feature = "derive_serde", serde(rename = "SchCrit", skip_serializing_if = "Option::is_none") )]
490	pub sch_crit: Option<Vec<CashAccountSearchCriteria8>>,
491	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrCrit", skip_serializing_if = "Option::is_none") )]
492	pub rtr_crit: Option<CashAccountReturnCriteria5>,
493}
494
495impl AccountCriteria8 {
496	pub fn validate(&self) -> Result<(), ValidationError> {
497		if let Some(ref val) = self.new_qry_nm {
498			if val.chars().count() < 1 {
499				return Err(ValidationError::new(1001, "new_qry_nm is shorter than the minimum length of 1".to_string()));
500			}
501			if val.chars().count() > 35 {
502				return Err(ValidationError::new(1002, "new_qry_nm exceeds the maximum length of 35".to_string()));
503			}
504		}
505		if let Some(ref vec) = self.sch_crit { for item in vec { item.validate()? } }
506		if let Some(ref val) = self.rtr_crit { val.validate()? }
507		Ok(())
508	}
509}
510
511
512// AccountDesignation1Choice ...
513#[cfg_attr(feature = "derive_debug", derive(Debug))]
514#[cfg_attr(feature = "derive_default", derive(Default))]
515#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
516#[cfg_attr(feature = "derive_clone", derive(Clone))]
517#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
518pub struct AccountDesignation1Choice {
519	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
520	pub cd: Option<Rank1Code>,
521	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
522	pub prtry: Option<GenericIdentification47>,
523}
524
525impl AccountDesignation1Choice {
526	pub fn validate(&self) -> Result<(), ValidationError> {
527		if let Some(ref val) = self.cd { val.validate()? }
528		if let Some(ref val) = self.prtry { val.validate()? }
529		Ok(())
530	}
531}
532
533
534// AccountForAction1 ...
535#[cfg_attr(feature = "derive_debug", derive(Debug))]
536#[cfg_attr(feature = "derive_default", derive(Default))]
537#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
538#[cfg_attr(feature = "derive_clone", derive(Clone))]
539#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
540pub struct AccountForAction1 {
541	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
542	pub id: AccountIdentification4Choice,
543	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
544	pub ccy: String,
545}
546
547impl AccountForAction1 {
548	pub fn validate(&self) -> Result<(), ValidationError> {
549		self.id.validate()?;
550		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
551		if !pattern.is_match(&self.ccy) {
552			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
553		}
554		Ok(())
555	}
556}
557
558
559// AccountForAction2 ...
560#[cfg_attr(feature = "derive_debug", derive(Debug))]
561#[cfg_attr(feature = "derive_default", derive(Default))]
562#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
563#[cfg_attr(feature = "derive_clone", derive(Clone))]
564#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
565pub struct AccountForAction2 {
566	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
567	pub id: AccountIdentification4Choice,
568	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
569	pub nm: Option<String>,
570	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
571	pub ccy: String,
572}
573
574impl AccountForAction2 {
575	pub fn validate(&self) -> Result<(), ValidationError> {
576		self.id.validate()?;
577		if let Some(ref val) = self.nm {
578			if val.chars().count() < 1 {
579				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
580			}
581			if val.chars().count() > 70 {
582				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 70".to_string()));
583			}
584		}
585		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
586		if !pattern.is_match(&self.ccy) {
587			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
588		}
589		Ok(())
590	}
591}
592
593
594// AccountIdentification1 ...
595#[cfg_attr(feature = "derive_debug", derive(Debug))]
596#[cfg_attr(feature = "derive_default", derive(Default))]
597#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
598#[cfg_attr(feature = "derive_clone", derive(Clone))]
599#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
600pub struct AccountIdentification1 {
601	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry") )]
602	pub prtry: SimpleIdentificationInformation,
603}
604
605impl AccountIdentification1 {
606	pub fn validate(&self) -> Result<(), ValidationError> {
607		self.prtry.validate()?;
608		Ok(())
609	}
610}
611
612
613// AccountIdentification26 ...
614#[cfg_attr(feature = "derive_debug", derive(Debug))]
615#[cfg_attr(feature = "derive_default", derive(Default))]
616#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
617#[cfg_attr(feature = "derive_clone", derive(Clone))]
618#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
619pub struct AccountIdentification26 {
620	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry") )]
621	pub prtry: SimpleIdentificationInformation4,
622}
623
624impl AccountIdentification26 {
625	pub fn validate(&self) -> Result<(), ValidationError> {
626		self.prtry.validate()?;
627		Ok(())
628	}
629}
630
631
632// AccountIdentification4Choice ...
633#[cfg_attr(feature = "derive_debug", derive(Debug))]
634#[cfg_attr(feature = "derive_default", derive(Default))]
635#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
636#[cfg_attr(feature = "derive_clone", derive(Clone))]
637#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
638pub struct AccountIdentification4Choice {
639	#[cfg_attr( feature = "derive_serde", serde(rename = "IBAN", skip_serializing_if = "Option::is_none") )]
640	pub iban: Option<String>,
641	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
642	pub othr: Option<GenericAccountIdentification1>,
643}
644
645impl AccountIdentification4Choice {
646	pub fn validate(&self) -> Result<(), ValidationError> {
647		if let Some(ref val) = self.iban {
648			let pattern = Regex::new("[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}").unwrap();
649			if !pattern.is_match(val) {
650				return Err(ValidationError::new(1005, "iban does not match the required pattern".to_string()));
651			}
652		}
653		if let Some(ref val) = self.othr { val.validate()? }
654		Ok(())
655	}
656}
657
658
659// AccountIdentificationAndName5 ...
660#[cfg_attr(feature = "derive_debug", derive(Debug))]
661#[cfg_attr(feature = "derive_default", derive(Default))]
662#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
663#[cfg_attr(feature = "derive_clone", derive(Clone))]
664#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
665pub struct AccountIdentificationAndName5 {
666	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
667	pub id: AccountIdentification4Choice,
668	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
669	pub nm: Option<String>,
670}
671
672impl AccountIdentificationAndName5 {
673	pub fn validate(&self) -> Result<(), ValidationError> {
674		self.id.validate()?;
675		if let Some(ref val) = self.nm {
676			if val.chars().count() < 1 {
677				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
678			}
679			if val.chars().count() > 35 {
680				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 35".to_string()));
681			}
682		}
683		Ok(())
684	}
685}
686
687
688// AccountIdentificationAndName7 ...
689#[cfg_attr(feature = "derive_debug", derive(Debug))]
690#[cfg_attr(feature = "derive_default", derive(Default))]
691#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
692#[cfg_attr(feature = "derive_clone", derive(Clone))]
693#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
694pub struct AccountIdentificationAndName7 {
695	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
696	pub id: CashAccountIdentification8Choice,
697	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
698	pub nm: Option<String>,
699}
700
701impl AccountIdentificationAndName7 {
702	pub fn validate(&self) -> Result<(), ValidationError> {
703		self.id.validate()?;
704		if let Some(ref val) = self.nm {
705			if val.chars().count() < 1 {
706				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
707			}
708			if val.chars().count() > 35 {
709				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 35".to_string()));
710			}
711		}
712		Ok(())
713	}
714}
715
716
717// AccountIdentificationSearchCriteria2Choice ...
718#[cfg_attr(feature = "derive_debug", derive(Debug))]
719#[cfg_attr(feature = "derive_default", derive(Default))]
720#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
721#[cfg_attr(feature = "derive_clone", derive(Clone))]
722#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
723pub struct AccountIdentificationSearchCriteria2Choice {
724	#[cfg_attr( feature = "derive_serde", serde(rename = "EQ", skip_serializing_if = "Option::is_none") )]
725	pub eq: Option<AccountIdentification4Choice>,
726	#[cfg_attr( feature = "derive_serde", serde(rename = "CTTxt", skip_serializing_if = "Option::is_none") )]
727	pub ct_txt: Option<String>,
728	#[cfg_attr( feature = "derive_serde", serde(rename = "NCTTxt", skip_serializing_if = "Option::is_none") )]
729	pub nct_txt: Option<String>,
730}
731
732impl AccountIdentificationSearchCriteria2Choice {
733	pub fn validate(&self) -> Result<(), ValidationError> {
734		if let Some(ref val) = self.eq { val.validate()? }
735		if let Some(ref val) = self.ct_txt {
736			if val.chars().count() < 1 {
737				return Err(ValidationError::new(1001, "ct_txt is shorter than the minimum length of 1".to_string()));
738			}
739			if val.chars().count() > 35 {
740				return Err(ValidationError::new(1002, "ct_txt exceeds the maximum length of 35".to_string()));
741			}
742		}
743		if let Some(ref val) = self.nct_txt {
744			if val.chars().count() < 1 {
745				return Err(ValidationError::new(1001, "nct_txt is shorter than the minimum length of 1".to_string()));
746			}
747			if val.chars().count() > 35 {
748				return Err(ValidationError::new(1002, "nct_txt exceeds the maximum length of 35".to_string()));
749			}
750		}
751		Ok(())
752	}
753}
754
755
756// AccountInterest4 ...
757#[cfg_attr(feature = "derive_debug", derive(Debug))]
758#[cfg_attr(feature = "derive_default", derive(Default))]
759#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
760#[cfg_attr(feature = "derive_clone", derive(Clone))]
761#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
762pub struct AccountInterest4 {
763	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
764	pub tp: Option<InterestType1Choice>,
765	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
766	pub rate: Option<Vec<Rate4>>,
767	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDt", skip_serializing_if = "Option::is_none") )]
768	pub fr_to_dt: Option<DateTimePeriod1>,
769	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
770	pub rsn: Option<String>,
771	#[cfg_attr( feature = "derive_serde", serde(rename = "Tax", skip_serializing_if = "Option::is_none") )]
772	pub tax: Option<TaxCharges2>,
773}
774
775impl AccountInterest4 {
776	pub fn validate(&self) -> Result<(), ValidationError> {
777		if let Some(ref val) = self.tp { val.validate()? }
778		if let Some(ref vec) = self.rate { for item in vec { item.validate()? } }
779		if let Some(ref val) = self.fr_to_dt { val.validate()? }
780		if let Some(ref val) = self.rsn {
781			if val.chars().count() < 1 {
782				return Err(ValidationError::new(1001, "rsn is shorter than the minimum length of 1".to_string()));
783			}
784			if val.chars().count() > 35 {
785				return Err(ValidationError::new(1002, "rsn exceeds the maximum length of 35".to_string()));
786			}
787		}
788		if let Some(ref val) = self.tax { val.validate()? }
789		Ok(())
790	}
791}
792
793
794// AccountLevel1Code ...
795#[cfg_attr(feature = "derive_debug", derive(Debug))]
796#[cfg_attr(feature = "derive_default", derive(Default))]
797#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
798#[cfg_attr(feature = "derive_clone", derive(Clone))]
799#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
800pub enum AccountLevel1Code {
801	#[cfg_attr(feature = "derive_default", default)]
802	#[cfg_attr( feature = "derive_serde", serde(rename = "INTM") )]
803	CodeINTM,
804	#[cfg_attr( feature = "derive_serde", serde(rename = "SMRY") )]
805	CodeSMRY,
806}
807
808impl AccountLevel1Code {
809	pub fn validate(&self) -> Result<(), ValidationError> {
810		Ok(())
811	}
812}
813
814
815// AccountLevel2Code ...
816#[cfg_attr(feature = "derive_debug", derive(Debug))]
817#[cfg_attr(feature = "derive_default", derive(Default))]
818#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
819#[cfg_attr(feature = "derive_clone", derive(Clone))]
820#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
821pub enum AccountLevel2Code {
822	#[cfg_attr(feature = "derive_default", default)]
823	#[cfg_attr( feature = "derive_serde", serde(rename = "INTM") )]
824	CodeINTM,
825	#[cfg_attr( feature = "derive_serde", serde(rename = "SMRY") )]
826	CodeSMRY,
827	#[cfg_attr( feature = "derive_serde", serde(rename = "DETL") )]
828	CodeDETL,
829}
830
831impl AccountLevel2Code {
832	pub fn validate(&self) -> Result<(), ValidationError> {
833		Ok(())
834	}
835}
836
837
838// AccountManagementConfirmation5 ...
839#[cfg_attr(feature = "derive_debug", derive(Debug))]
840#[cfg_attr(feature = "derive_default", derive(Default))]
841#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
842#[cfg_attr(feature = "derive_clone", derive(Clone))]
843#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
844pub struct AccountManagementConfirmation5 {
845	#[cfg_attr( feature = "derive_serde", serde(rename = "ConfTp") )]
846	pub conf_tp: ConfirmationType1Choice,
847	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctApplId", skip_serializing_if = "Option::is_none") )]
848	pub acct_appl_id: Option<String>,
849	#[cfg_attr( feature = "derive_serde", serde(rename = "ClntRef", skip_serializing_if = "Option::is_none") )]
850	pub clnt_ref: Option<String>,
851	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyRef", skip_serializing_if = "Option::is_none") )]
852	pub ctr_pty_ref: Option<AdditionalReference13>,
853	#[cfg_attr( feature = "derive_serde", serde(rename = "ExstgAcctId", skip_serializing_if = "Option::is_none") )]
854	pub exstg_acct_id: Option<Vec<Account23>>,
855}
856
857impl AccountManagementConfirmation5 {
858	pub fn validate(&self) -> Result<(), ValidationError> {
859		self.conf_tp.validate()?;
860		if let Some(ref val) = self.acct_appl_id {
861			if val.chars().count() < 1 {
862				return Err(ValidationError::new(1001, "acct_appl_id is shorter than the minimum length of 1".to_string()));
863			}
864			if val.chars().count() > 35 {
865				return Err(ValidationError::new(1002, "acct_appl_id exceeds the maximum length of 35".to_string()));
866			}
867		}
868		if let Some(ref val) = self.clnt_ref {
869			if val.chars().count() < 1 {
870				return Err(ValidationError::new(1001, "clnt_ref is shorter than the minimum length of 1".to_string()));
871			}
872			if val.chars().count() > 35 {
873				return Err(ValidationError::new(1002, "clnt_ref exceeds the maximum length of 35".to_string()));
874			}
875		}
876		if let Some(ref val) = self.ctr_pty_ref { val.validate()? }
877		if let Some(ref vec) = self.exstg_acct_id { for item in vec { item.validate()? } }
878		Ok(())
879	}
880}
881
882
883// AccountManagementMessageReference5 ...
884#[cfg_attr(feature = "derive_debug", derive(Debug))]
885#[cfg_attr(feature = "derive_default", derive(Default))]
886#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
887#[cfg_attr(feature = "derive_clone", derive(Clone))]
888#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
889pub struct AccountManagementMessageReference5 {
890	#[cfg_attr( feature = "derive_serde", serde(rename = "LkdRef", skip_serializing_if = "Option::is_none") )]
891	pub lkd_ref: Option<LinkedMessage5Choice>,
892	#[cfg_attr( feature = "derive_serde", serde(rename = "StsReqTp") )]
893	pub sts_req_tp: AccountManagementType3Code,
894	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctApplId", skip_serializing_if = "Option::is_none") )]
895	pub acct_appl_id: Option<String>,
896	#[cfg_attr( feature = "derive_serde", serde(rename = "ExstgAcctId", skip_serializing_if = "Option::is_none") )]
897	pub exstg_acct_id: Option<Account23>,
898	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtAcct", skip_serializing_if = "Option::is_none") )]
899	pub invstmt_acct: Option<InvestmentAccount77>,
900}
901
902impl AccountManagementMessageReference5 {
903	pub fn validate(&self) -> Result<(), ValidationError> {
904		if let Some(ref val) = self.lkd_ref { val.validate()? }
905		self.sts_req_tp.validate()?;
906		if let Some(ref val) = self.acct_appl_id {
907			if val.chars().count() < 1 {
908				return Err(ValidationError::new(1001, "acct_appl_id is shorter than the minimum length of 1".to_string()));
909			}
910			if val.chars().count() > 35 {
911				return Err(ValidationError::new(1002, "acct_appl_id exceeds the maximum length of 35".to_string()));
912			}
913		}
914		if let Some(ref val) = self.exstg_acct_id { val.validate()? }
915		if let Some(ref val) = self.invstmt_acct { val.validate()? }
916		Ok(())
917	}
918}
919
920
921// AccountManagementStatus1Code ...
922#[cfg_attr(feature = "derive_debug", derive(Debug))]
923#[cfg_attr(feature = "derive_default", derive(Default))]
924#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
925#[cfg_attr(feature = "derive_clone", derive(Clone))]
926#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
927pub enum AccountManagementStatus1Code {
928	#[cfg_attr(feature = "derive_default", default)]
929	#[cfg_attr( feature = "derive_serde", serde(rename = "RECE") )]
930	CodeRECE,
931	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCP") )]
932	CodeACCP,
933	#[cfg_attr( feature = "derive_serde", serde(rename = "EXEC") )]
934	CodeEXEC,
935	#[cfg_attr( feature = "derive_serde", serde(rename = "STNP") )]
936	CodeSTNP,
937}
938
939impl AccountManagementStatus1Code {
940	pub fn validate(&self) -> Result<(), ValidationError> {
941		Ok(())
942	}
943}
944
945
946// AccountManagementStatusAndReason5 ...
947#[cfg_attr(feature = "derive_debug", derive(Debug))]
948#[cfg_attr(feature = "derive_default", derive(Default))]
949#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
950#[cfg_attr(feature = "derive_clone", derive(Clone))]
951#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
952pub struct AccountManagementStatusAndReason5 {
953	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
954	pub sts: Status25Choice,
955	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsn", skip_serializing_if = "Option::is_none") )]
956	pub sts_rsn: Option<Vec<AcceptedStatusReason1Choice>>,
957	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctApplId", skip_serializing_if = "Option::is_none") )]
958	pub acct_appl_id: Option<String>,
959	#[cfg_attr( feature = "derive_serde", serde(rename = "ExstgAcctId", skip_serializing_if = "Option::is_none") )]
960	pub exstg_acct_id: Option<Vec<Account23>>,
961	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
962	pub acct_id: Option<String>,
963	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSts", skip_serializing_if = "Option::is_none") )]
964	pub acct_sts: Option<AccountStatus2>,
965	#[cfg_attr( feature = "derive_serde", serde(rename = "BlckdSts", skip_serializing_if = "Option::is_none") )]
966	pub blckd_sts: Option<BlockedStatusReason2Choice>,
967	#[cfg_attr( feature = "derive_serde", serde(rename = "FATCARptgDt", skip_serializing_if = "Option::is_none") )]
968	pub fatca_rptg_dt: Option<String>,
969	#[cfg_attr( feature = "derive_serde", serde(rename = "CRSRptgDt", skip_serializing_if = "Option::is_none") )]
970	pub crs_rptg_dt: Option<String>,
971}
972
973impl AccountManagementStatusAndReason5 {
974	pub fn validate(&self) -> Result<(), ValidationError> {
975		self.sts.validate()?;
976		if let Some(ref vec) = self.sts_rsn { for item in vec { item.validate()? } }
977		if let Some(ref val) = self.acct_appl_id {
978			if val.chars().count() < 1 {
979				return Err(ValidationError::new(1001, "acct_appl_id is shorter than the minimum length of 1".to_string()));
980			}
981			if val.chars().count() > 35 {
982				return Err(ValidationError::new(1002, "acct_appl_id exceeds the maximum length of 35".to_string()));
983			}
984		}
985		if let Some(ref vec) = self.exstg_acct_id { for item in vec { item.validate()? } }
986		if let Some(ref val) = self.acct_id {
987			if val.chars().count() < 1 {
988				return Err(ValidationError::new(1001, "acct_id is shorter than the minimum length of 1".to_string()));
989			}
990			if val.chars().count() > 35 {
991				return Err(ValidationError::new(1002, "acct_id exceeds the maximum length of 35".to_string()));
992			}
993		}
994		if let Some(ref val) = self.acct_sts { val.validate()? }
995		if let Some(ref val) = self.blckd_sts { val.validate()? }
996		Ok(())
997	}
998}
999
1000
1001// AccountManagementType2Code ...
1002#[cfg_attr(feature = "derive_debug", derive(Debug))]
1003#[cfg_attr(feature = "derive_default", derive(Default))]
1004#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1005#[cfg_attr(feature = "derive_clone", derive(Clone))]
1006#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1007pub enum AccountManagementType2Code {
1008	#[cfg_attr(feature = "derive_default", default)]
1009	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCO") )]
1010	CodeACCO,
1011	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCM") )]
1012	CodeACCM,
1013	#[cfg_attr( feature = "derive_serde", serde(rename = "GACC") )]
1014	CodeGACC,
1015}
1016
1017impl AccountManagementType2Code {
1018	pub fn validate(&self) -> Result<(), ValidationError> {
1019		Ok(())
1020	}
1021}
1022
1023
1024// AccountManagementType3Code ...
1025#[cfg_attr(feature = "derive_debug", derive(Debug))]
1026#[cfg_attr(feature = "derive_default", derive(Default))]
1027#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1028#[cfg_attr(feature = "derive_clone", derive(Clone))]
1029#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1030pub enum AccountManagementType3Code {
1031	#[cfg_attr(feature = "derive_default", default)]
1032	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCM") )]
1033	CodeACCM,
1034	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCO") )]
1035	CodeACCO,
1036	#[cfg_attr( feature = "derive_serde", serde(rename = "GACC") )]
1037	CodeGACC,
1038	#[cfg_attr( feature = "derive_serde", serde(rename = "ACST") )]
1039	CodeACST,
1040}
1041
1042impl AccountManagementType3Code {
1043	pub fn validate(&self) -> Result<(), ValidationError> {
1044		Ok(())
1045	}
1046}
1047
1048
1049// AccountNotification22 ...
1050#[cfg_attr(feature = "derive_debug", derive(Debug))]
1051#[cfg_attr(feature = "derive_default", derive(Default))]
1052#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1053#[cfg_attr(feature = "derive_clone", derive(Clone))]
1054#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1055pub struct AccountNotification22 {
1056	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
1057	pub id: String,
1058	#[cfg_attr( feature = "derive_serde", serde(rename = "NtfctnPgntn", skip_serializing_if = "Option::is_none") )]
1059	pub ntfctn_pgntn: Option<Pagination1>,
1060	#[cfg_attr( feature = "derive_serde", serde(rename = "ElctrncSeqNb", skip_serializing_if = "Option::is_none") )]
1061	pub elctrnc_seq_nb: Option<f64>,
1062	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgSeq", skip_serializing_if = "Option::is_none") )]
1063	pub rptg_seq: Option<SequenceRange1Choice>,
1064	#[cfg_attr( feature = "derive_serde", serde(rename = "LglSeqNb", skip_serializing_if = "Option::is_none") )]
1065	pub lgl_seq_nb: Option<f64>,
1066	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
1067	pub cre_dt_tm: Option<String>,
1068	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDt", skip_serializing_if = "Option::is_none") )]
1069	pub fr_to_dt: Option<DateTimePeriod1>,
1070	#[cfg_attr( feature = "derive_serde", serde(rename = "CpyDplctInd", skip_serializing_if = "Option::is_none") )]
1071	pub cpy_dplct_ind: Option<CopyDuplicate1Code>,
1072	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgSrc", skip_serializing_if = "Option::is_none") )]
1073	pub rptg_src: Option<ReportingSource1Choice>,
1074	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct") )]
1075	pub acct: CashAccount43,
1076	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdAcct", skip_serializing_if = "Option::is_none") )]
1077	pub rltd_acct: Option<CashAccount40>,
1078	#[cfg_attr( feature = "derive_serde", serde(rename = "Intrst", skip_serializing_if = "Option::is_none") )]
1079	pub intrst: Option<Vec<AccountInterest4>>,
1080	#[cfg_attr( feature = "derive_serde", serde(rename = "TxsSummry", skip_serializing_if = "Option::is_none") )]
1081	pub txs_summry: Option<TotalTransactions6>,
1082	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntry", skip_serializing_if = "Option::is_none") )]
1083	pub ntry: Option<Vec<ReportEntry14>>,
1084	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlNtfctnInf", skip_serializing_if = "Option::is_none") )]
1085	pub addtl_ntfctn_inf: Option<String>,
1086}
1087
1088impl AccountNotification22 {
1089	pub fn validate(&self) -> Result<(), ValidationError> {
1090		if self.id.chars().count() < 1 {
1091			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
1092		}
1093		if self.id.chars().count() > 35 {
1094			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
1095		}
1096		if let Some(ref val) = self.ntfctn_pgntn { val.validate()? }
1097		if let Some(ref val) = self.rptg_seq { val.validate()? }
1098		if let Some(ref val) = self.fr_to_dt { val.validate()? }
1099		if let Some(ref val) = self.cpy_dplct_ind { val.validate()? }
1100		if let Some(ref val) = self.rptg_src { val.validate()? }
1101		self.acct.validate()?;
1102		if let Some(ref val) = self.rltd_acct { val.validate()? }
1103		if let Some(ref vec) = self.intrst { for item in vec { item.validate()? } }
1104		if let Some(ref val) = self.txs_summry { val.validate()? }
1105		if let Some(ref vec) = self.ntry { for item in vec { item.validate()? } }
1106		if let Some(ref val) = self.addtl_ntfctn_inf {
1107			if val.chars().count() < 1 {
1108				return Err(ValidationError::new(1001, "addtl_ntfctn_inf is shorter than the minimum length of 1".to_string()));
1109			}
1110			if val.chars().count() > 500 {
1111				return Err(ValidationError::new(1002, "addtl_ntfctn_inf exceeds the maximum length of 500".to_string()));
1112			}
1113		}
1114		Ok(())
1115	}
1116}
1117
1118
1119// AccountNotification23 ...
1120#[cfg_attr(feature = "derive_debug", derive(Debug))]
1121#[cfg_attr(feature = "derive_default", derive(Default))]
1122#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1123#[cfg_attr(feature = "derive_clone", derive(Clone))]
1124#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1125pub struct AccountNotification23 {
1126	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
1127	pub id: String,
1128	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
1129	pub acct: Option<CashAccount40>,
1130	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
1131	pub acct_ownr: Option<Party50Choice>,
1132	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
1133	pub acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
1134	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdAcct", skip_serializing_if = "Option::is_none") )]
1135	pub rltd_acct: Option<CashAccount40>,
1136	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlAmt", skip_serializing_if = "Option::is_none") )]
1137	pub ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
1138	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdValDt", skip_serializing_if = "Option::is_none") )]
1139	pub xpctd_val_dt: Option<String>,
1140	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
1141	pub dbtr: Option<Party50Choice>,
1142	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
1143	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
1144	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt", skip_serializing_if = "Option::is_none") )]
1145	pub intrmy_agt: Option<BranchAndFinancialInstitutionIdentification8>,
1146	#[cfg_attr( feature = "derive_serde", serde(rename = "Itm") )]
1147	pub itm: Vec<NotificationItem9>,
1148}
1149
1150impl AccountNotification23 {
1151	pub fn validate(&self) -> Result<(), ValidationError> {
1152		if self.id.chars().count() < 1 {
1153			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
1154		}
1155		if self.id.chars().count() > 35 {
1156			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
1157		}
1158		if let Some(ref val) = self.acct { val.validate()? }
1159		if let Some(ref val) = self.acct_ownr { val.validate()? }
1160		if let Some(ref val) = self.acct_svcr { val.validate()? }
1161		if let Some(ref val) = self.rltd_acct { val.validate()? }
1162		if let Some(ref val) = self.ttl_amt { val.validate()? }
1163		if let Some(ref val) = self.dbtr { val.validate()? }
1164		if let Some(ref val) = self.dbtr_agt { val.validate()? }
1165		if let Some(ref val) = self.intrmy_agt { val.validate()? }
1166		for item in &self.itm { item.validate()? }
1167		Ok(())
1168	}
1169}
1170
1171
1172// AccountOpeningType1Choice ...
1173#[cfg_attr(feature = "derive_debug", derive(Debug))]
1174#[cfg_attr(feature = "derive_default", derive(Default))]
1175#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1176#[cfg_attr(feature = "derive_clone", derive(Clone))]
1177#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1178pub struct AccountOpeningType1Choice {
1179	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
1180	pub cd: Option<AccountOpeningType1Code>,
1181	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
1182	pub prtry: Option<GenericIdentification47>,
1183}
1184
1185impl AccountOpeningType1Choice {
1186	pub fn validate(&self) -> Result<(), ValidationError> {
1187		if let Some(ref val) = self.cd { val.validate()? }
1188		if let Some(ref val) = self.prtry { val.validate()? }
1189		Ok(())
1190	}
1191}
1192
1193
1194// AccountOpeningType1Code ...
1195#[cfg_attr(feature = "derive_debug", derive(Debug))]
1196#[cfg_attr(feature = "derive_default", derive(Default))]
1197#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1198#[cfg_attr(feature = "derive_clone", derive(Clone))]
1199#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1200pub enum AccountOpeningType1Code {
1201	#[cfg_attr(feature = "derive_default", default)]
1202	#[cfg_attr( feature = "derive_serde", serde(rename = "NEWA") )]
1203	CodeNEWA,
1204	#[cfg_attr( feature = "derive_serde", serde(rename = "SUPA") )]
1205	CodeSUPA,
1206}
1207
1208impl AccountOpeningType1Code {
1209	pub fn validate(&self) -> Result<(), ValidationError> {
1210		Ok(())
1211	}
1212}
1213
1214
1215// AccountOrBusinessError6Choice ...
1216#[cfg_attr(feature = "derive_debug", derive(Debug))]
1217#[cfg_attr(feature = "derive_default", derive(Default))]
1218#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1219#[cfg_attr(feature = "derive_clone", derive(Clone))]
1220#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1221pub struct AccountOrBusinessError6Choice {
1222	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
1223	pub acct: Option<CashAccountData1>,
1224	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
1225	pub biz_err: Option<Vec<ErrorHandling5>>,
1226}
1227
1228impl AccountOrBusinessError6Choice {
1229	pub fn validate(&self) -> Result<(), ValidationError> {
1230		if let Some(ref val) = self.acct { val.validate()? }
1231		if let Some(ref vec) = self.biz_err { for item in vec { item.validate()? } }
1232		Ok(())
1233	}
1234}
1235
1236
1237// AccountOrOperationalError6Choice ...
1238#[cfg_attr(feature = "derive_debug", derive(Debug))]
1239#[cfg_attr(feature = "derive_default", derive(Default))]
1240#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1241#[cfg_attr(feature = "derive_clone", derive(Clone))]
1242#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1243pub struct AccountOrOperationalError6Choice {
1244	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctRpt", skip_serializing_if = "Option::is_none") )]
1245	pub acct_rpt: Option<Vec<AccountReport35>>,
1246	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
1247	pub oprl_err: Option<Vec<ErrorHandling5>>,
1248}
1249
1250impl AccountOrOperationalError6Choice {
1251	pub fn validate(&self) -> Result<(), ValidationError> {
1252		if let Some(ref vec) = self.acct_rpt { for item in vec { item.validate()? } }
1253		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
1254		Ok(())
1255	}
1256}
1257
1258
1259// AccountOwner3Choice ...
1260#[cfg_attr(feature = "derive_debug", derive(Debug))]
1261#[cfg_attr(feature = "derive_default", derive(Default))]
1262#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1263#[cfg_attr(feature = "derive_clone", derive(Clone))]
1264#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1265pub struct AccountOwner3Choice {
1266	#[cfg_attr( feature = "derive_serde", serde(rename = "IndvOwnrId", skip_serializing_if = "Option::is_none") )]
1267	pub indv_ownr_id: Option<IndividualPersonIdentification3Choice>,
1268	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgOwnrId", skip_serializing_if = "Option::is_none") )]
1269	pub org_ownr_id: Option<PartyIdentification220>,
1270}
1271
1272impl AccountOwner3Choice {
1273	pub fn validate(&self) -> Result<(), ValidationError> {
1274		if let Some(ref val) = self.indv_ownr_id { val.validate()? }
1275		if let Some(ref val) = self.org_ownr_id { val.validate()? }
1276		Ok(())
1277	}
1278}
1279
1280
1281// AccountOwnershipType4Code ...
1282#[cfg_attr(feature = "derive_debug", derive(Debug))]
1283#[cfg_attr(feature = "derive_default", derive(Default))]
1284#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1285#[cfg_attr(feature = "derive_clone", derive(Clone))]
1286#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1287pub enum AccountOwnershipType4Code {
1288	#[cfg_attr(feature = "derive_default", default)]
1289	#[cfg_attr( feature = "derive_serde", serde(rename = "UNCO") )]
1290	CodeUNCO,
1291	#[cfg_attr( feature = "derive_serde", serde(rename = "LIPA") )]
1292	CodeLIPA,
1293	#[cfg_attr( feature = "derive_serde", serde(rename = "ENTR") )]
1294	CodeENTR,
1295	#[cfg_attr( feature = "derive_serde", serde(rename = "CORP") )]
1296	CodeCORP,
1297	#[cfg_attr( feature = "derive_serde", serde(rename = "CUST") )]
1298	CodeCUST,
1299	#[cfg_attr( feature = "derive_serde", serde(rename = "EURE") )]
1300	CodeEURE,
1301	#[cfg_attr( feature = "derive_serde", serde(rename = "PART") )]
1302	CodePART,
1303	#[cfg_attr( feature = "derive_serde", serde(rename = "TRUS") )]
1304	CodeTRUS,
1305	#[cfg_attr( feature = "derive_serde", serde(rename = "GOVO") )]
1306	CodeGOVO,
1307	#[cfg_attr( feature = "derive_serde", serde(rename = "JOIT") )]
1308	CodeJOIT,
1309	#[cfg_attr( feature = "derive_serde", serde(rename = "COMO") )]
1310	CodeCOMO,
1311	#[cfg_attr( feature = "derive_serde", serde(rename = "JOIN") )]
1312	CodeJOIN,
1313	#[cfg_attr( feature = "derive_serde", serde(rename = "LLCO") )]
1314	CodeLLCO,
1315	#[cfg_attr( feature = "derive_serde", serde(rename = "NOMI") )]
1316	CodeNOMI,
1317	#[cfg_attr( feature = "derive_serde", serde(rename = "NFPO") )]
1318	CodeNFPO,
1319	#[cfg_attr( feature = "derive_serde", serde(rename = "ONIS") )]
1320	CodeONIS,
1321	#[cfg_attr( feature = "derive_serde", serde(rename = "RGIC") )]
1322	CodeRGIC,
1323	#[cfg_attr( feature = "derive_serde", serde(rename = "SIGL") )]
1324	CodeSIGL,
1325}
1326
1327impl AccountOwnershipType4Code {
1328	pub fn validate(&self) -> Result<(), ValidationError> {
1329		Ok(())
1330	}
1331}
1332
1333
1334// AccountParties12Choice ...
1335#[cfg_attr(feature = "derive_debug", derive(Debug))]
1336#[cfg_attr(feature = "derive_default", derive(Default))]
1337#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1338#[cfg_attr(feature = "derive_clone", derive(Clone))]
1339#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1340pub struct AccountParties12Choice {
1341	#[cfg_attr( feature = "derive_serde", serde(rename = "PmryOwnr", skip_serializing_if = "Option::is_none") )]
1342	pub pmry_ownr: Option<InvestmentAccountOwnershipInformation16>,
1343	#[cfg_attr( feature = "derive_serde", serde(rename = "Trstee", skip_serializing_if = "Option::is_none") )]
1344	pub trstee: Option<Vec<InvestmentAccountOwnershipInformation16>>,
1345	#[cfg_attr( feature = "derive_serde", serde(rename = "Nmnee", skip_serializing_if = "Option::is_none") )]
1346	pub nmnee: Option<InvestmentAccountOwnershipInformation16>,
1347	#[cfg_attr( feature = "derive_serde", serde(rename = "JntOwnr", skip_serializing_if = "Option::is_none") )]
1348	pub jnt_ownr: Option<Vec<InvestmentAccountOwnershipInformation16>>,
1349}
1350
1351impl AccountParties12Choice {
1352	pub fn validate(&self) -> Result<(), ValidationError> {
1353		if let Some(ref val) = self.pmry_ownr { val.validate()? }
1354		if let Some(ref vec) = self.trstee { for item in vec { item.validate()? } }
1355		if let Some(ref val) = self.nmnee { val.validate()? }
1356		if let Some(ref vec) = self.jnt_ownr { for item in vec { item.validate()? } }
1357		Ok(())
1358	}
1359}
1360
1361
1362// AccountParties13Choice ...
1363#[cfg_attr(feature = "derive_debug", derive(Debug))]
1364#[cfg_attr(feature = "derive_default", derive(Default))]
1365#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1366#[cfg_attr(feature = "derive_clone", derive(Clone))]
1367#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1368pub struct AccountParties13Choice {
1369	#[cfg_attr( feature = "derive_serde", serde(rename = "PmryOwnr", skip_serializing_if = "Option::is_none") )]
1370	pub pmry_ownr: Option<InvestmentAccountOwnershipInformation17>,
1371	#[cfg_attr( feature = "derive_serde", serde(rename = "Trstee", skip_serializing_if = "Option::is_none") )]
1372	pub trstee: Option<Vec<InvestmentAccountOwnershipInformation17>>,
1373	#[cfg_attr( feature = "derive_serde", serde(rename = "Nmnee", skip_serializing_if = "Option::is_none") )]
1374	pub nmnee: Option<InvestmentAccountOwnershipInformation17>,
1375	#[cfg_attr( feature = "derive_serde", serde(rename = "JntOwnr", skip_serializing_if = "Option::is_none") )]
1376	pub jnt_ownr: Option<Vec<InvestmentAccountOwnershipInformation17>>,
1377}
1378
1379impl AccountParties13Choice {
1380	pub fn validate(&self) -> Result<(), ValidationError> {
1381		if let Some(ref val) = self.pmry_ownr { val.validate()? }
1382		if let Some(ref vec) = self.trstee { for item in vec { item.validate()? } }
1383		if let Some(ref val) = self.nmnee { val.validate()? }
1384		if let Some(ref vec) = self.jnt_ownr { for item in vec { item.validate()? } }
1385		Ok(())
1386	}
1387}
1388
1389
1390// AccountParties17 ...
1391#[cfg_attr(feature = "derive_debug", derive(Debug))]
1392#[cfg_attr(feature = "derive_default", derive(Default))]
1393#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1394#[cfg_attr(feature = "derive_clone", derive(Clone))]
1395#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1396pub struct AccountParties17 {
1397	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplAcctPty") )]
1398	pub prncpl_acct_pty: AccountParties12Choice,
1399	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndryOwnr", skip_serializing_if = "Option::is_none") )]
1400	pub scndry_ownr: Option<Vec<InvestmentAccountOwnershipInformation16>>,
1401	#[cfg_attr( feature = "derive_serde", serde(rename = "Bnfcry", skip_serializing_if = "Option::is_none") )]
1402	pub bnfcry: Option<Vec<InvestmentAccountOwnershipInformation16>>,
1403	#[cfg_attr( feature = "derive_serde", serde(rename = "PwrOfAttny", skip_serializing_if = "Option::is_none") )]
1404	pub pwr_of_attny: Option<Vec<InvestmentAccountOwnershipInformation16>>,
1405	#[cfg_attr( feature = "derive_serde", serde(rename = "LglGuardn", skip_serializing_if = "Option::is_none") )]
1406	pub lgl_guardn: Option<Vec<InvestmentAccountOwnershipInformation16>>,
1407	#[cfg_attr( feature = "derive_serde", serde(rename = "CtdnForMnr", skip_serializing_if = "Option::is_none") )]
1408	pub ctdn_for_mnr: Option<Vec<InvestmentAccountOwnershipInformation16>>,
1409	#[cfg_attr( feature = "derive_serde", serde(rename = "SucssrOnDth", skip_serializing_if = "Option::is_none") )]
1410	pub sucssr_on_dth: Option<Vec<InvestmentAccountOwnershipInformation16>>,
1411	#[cfg_attr( feature = "derive_serde", serde(rename = "Admstr", skip_serializing_if = "Option::is_none") )]
1412	pub admstr: Option<Vec<InvestmentAccountOwnershipInformation16>>,
1413	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPty", skip_serializing_if = "Option::is_none") )]
1414	pub othr_pty: Option<Vec<ExtendedParty14>>,
1415	#[cfg_attr( feature = "derive_serde", serde(rename = "Grntr", skip_serializing_if = "Option::is_none") )]
1416	pub grntr: Option<Vec<InvestmentAccountOwnershipInformation16>>,
1417	#[cfg_attr( feature = "derive_serde", serde(rename = "Sttlr", skip_serializing_if = "Option::is_none") )]
1418	pub sttlr: Option<Vec<InvestmentAccountOwnershipInformation16>>,
1419	#[cfg_attr( feature = "derive_serde", serde(rename = "SnrMggOffcl", skip_serializing_if = "Option::is_none") )]
1420	pub snr_mgg_offcl: Option<Vec<InvestmentAccountOwnershipInformation16>>,
1421	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtctr", skip_serializing_if = "Option::is_none") )]
1422	pub prtctr: Option<Vec<InvestmentAccountOwnershipInformation16>>,
1423	#[cfg_attr( feature = "derive_serde", serde(rename = "RegdShrhldrNm", skip_serializing_if = "Option::is_none") )]
1424	pub regd_shrhldr_nm: Option<RegisteredShareholderName1Choice>,
1425}
1426
1427impl AccountParties17 {
1428	pub fn validate(&self) -> Result<(), ValidationError> {
1429		self.prncpl_acct_pty.validate()?;
1430		if let Some(ref vec) = self.scndry_ownr { for item in vec { item.validate()? } }
1431		if let Some(ref vec) = self.bnfcry { for item in vec { item.validate()? } }
1432		if let Some(ref vec) = self.pwr_of_attny { for item in vec { item.validate()? } }
1433		if let Some(ref vec) = self.lgl_guardn { for item in vec { item.validate()? } }
1434		if let Some(ref vec) = self.ctdn_for_mnr { for item in vec { item.validate()? } }
1435		if let Some(ref vec) = self.sucssr_on_dth { for item in vec { item.validate()? } }
1436		if let Some(ref vec) = self.admstr { for item in vec { item.validate()? } }
1437		if let Some(ref vec) = self.othr_pty { for item in vec { item.validate()? } }
1438		if let Some(ref vec) = self.grntr { for item in vec { item.validate()? } }
1439		if let Some(ref vec) = self.sttlr { for item in vec { item.validate()? } }
1440		if let Some(ref vec) = self.snr_mgg_offcl { for item in vec { item.validate()? } }
1441		if let Some(ref vec) = self.prtctr { for item in vec { item.validate()? } }
1442		if let Some(ref val) = self.regd_shrhldr_nm { val.validate()? }
1443		Ok(())
1444	}
1445}
1446
1447
1448// AccountParties18 ...
1449#[cfg_attr(feature = "derive_debug", derive(Debug))]
1450#[cfg_attr(feature = "derive_default", derive(Default))]
1451#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1452#[cfg_attr(feature = "derive_clone", derive(Clone))]
1453#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1454pub struct AccountParties18 {
1455	#[cfg_attr( feature = "derive_serde", serde(rename = "ModScpIndctn") )]
1456	pub mod_scp_indctn: DataModification1Code,
1457	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplAcctPty", skip_serializing_if = "Option::is_none") )]
1458	pub prncpl_acct_pty: Option<AccountParties13Choice>,
1459	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndryOwnr", skip_serializing_if = "Option::is_none") )]
1460	pub scndry_ownr: Option<Vec<InvestmentAccountOwnershipInformation17>>,
1461	#[cfg_attr( feature = "derive_serde", serde(rename = "Bnfcry", skip_serializing_if = "Option::is_none") )]
1462	pub bnfcry: Option<Vec<InvestmentAccountOwnershipInformation17>>,
1463	#[cfg_attr( feature = "derive_serde", serde(rename = "PwrOfAttny", skip_serializing_if = "Option::is_none") )]
1464	pub pwr_of_attny: Option<Vec<InvestmentAccountOwnershipInformation17>>,
1465	#[cfg_attr( feature = "derive_serde", serde(rename = "LglGuardn", skip_serializing_if = "Option::is_none") )]
1466	pub lgl_guardn: Option<Vec<InvestmentAccountOwnershipInformation17>>,
1467	#[cfg_attr( feature = "derive_serde", serde(rename = "CtdnForMnr", skip_serializing_if = "Option::is_none") )]
1468	pub ctdn_for_mnr: Option<Vec<InvestmentAccountOwnershipInformation17>>,
1469	#[cfg_attr( feature = "derive_serde", serde(rename = "SucssrOnDth", skip_serializing_if = "Option::is_none") )]
1470	pub sucssr_on_dth: Option<Vec<InvestmentAccountOwnershipInformation17>>,
1471	#[cfg_attr( feature = "derive_serde", serde(rename = "Admstr", skip_serializing_if = "Option::is_none") )]
1472	pub admstr: Option<Vec<InvestmentAccountOwnershipInformation17>>,
1473	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPty", skip_serializing_if = "Option::is_none") )]
1474	pub othr_pty: Option<Vec<ExtendedParty15>>,
1475	#[cfg_attr( feature = "derive_serde", serde(rename = "Grntr", skip_serializing_if = "Option::is_none") )]
1476	pub grntr: Option<Vec<InvestmentAccountOwnershipInformation17>>,
1477	#[cfg_attr( feature = "derive_serde", serde(rename = "Sttlr", skip_serializing_if = "Option::is_none") )]
1478	pub sttlr: Option<Vec<InvestmentAccountOwnershipInformation17>>,
1479	#[cfg_attr( feature = "derive_serde", serde(rename = "SnrMggOffcl", skip_serializing_if = "Option::is_none") )]
1480	pub snr_mgg_offcl: Option<Vec<InvestmentAccountOwnershipInformation17>>,
1481	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtctr", skip_serializing_if = "Option::is_none") )]
1482	pub prtctr: Option<Vec<InvestmentAccountOwnershipInformation17>>,
1483	#[cfg_attr( feature = "derive_serde", serde(rename = "RegdShrhldrNm", skip_serializing_if = "Option::is_none") )]
1484	pub regd_shrhldr_nm: Option<RegisteredShareholderName1Choice>,
1485}
1486
1487impl AccountParties18 {
1488	pub fn validate(&self) -> Result<(), ValidationError> {
1489		self.mod_scp_indctn.validate()?;
1490		if let Some(ref val) = self.prncpl_acct_pty { val.validate()? }
1491		if let Some(ref vec) = self.scndry_ownr { for item in vec { item.validate()? } }
1492		if let Some(ref vec) = self.bnfcry { for item in vec { item.validate()? } }
1493		if let Some(ref vec) = self.pwr_of_attny { for item in vec { item.validate()? } }
1494		if let Some(ref vec) = self.lgl_guardn { for item in vec { item.validate()? } }
1495		if let Some(ref vec) = self.ctdn_for_mnr { for item in vec { item.validate()? } }
1496		if let Some(ref vec) = self.sucssr_on_dth { for item in vec { item.validate()? } }
1497		if let Some(ref vec) = self.admstr { for item in vec { item.validate()? } }
1498		if let Some(ref vec) = self.othr_pty { for item in vec { item.validate()? } }
1499		if let Some(ref vec) = self.grntr { for item in vec { item.validate()? } }
1500		if let Some(ref vec) = self.sttlr { for item in vec { item.validate()? } }
1501		if let Some(ref vec) = self.snr_mgg_offcl { for item in vec { item.validate()? } }
1502		if let Some(ref vec) = self.prtctr { for item in vec { item.validate()? } }
1503		if let Some(ref val) = self.regd_shrhldr_nm { val.validate()? }
1504		Ok(())
1505	}
1506}
1507
1508
1509// AccountQuery4 ...
1510#[cfg_attr(feature = "derive_debug", derive(Debug))]
1511#[cfg_attr(feature = "derive_default", derive(Default))]
1512#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1513#[cfg_attr(feature = "derive_clone", derive(Clone))]
1514#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1515pub struct AccountQuery4 {
1516	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp", skip_serializing_if = "Option::is_none") )]
1517	pub qry_tp: Option<QueryType2Code>,
1518	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctCrit", skip_serializing_if = "Option::is_none") )]
1519	pub acct_crit: Option<AccountCriteria4Choice>,
1520}
1521
1522impl AccountQuery4 {
1523	pub fn validate(&self) -> Result<(), ValidationError> {
1524		if let Some(ref val) = self.qry_tp { val.validate()? }
1525		if let Some(ref val) = self.acct_crit { val.validate()? }
1526		Ok(())
1527	}
1528}
1529
1530
1531// AccountReport33 ...
1532#[cfg_attr(feature = "derive_debug", derive(Debug))]
1533#[cfg_attr(feature = "derive_default", derive(Default))]
1534#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1535#[cfg_attr(feature = "derive_clone", derive(Clone))]
1536#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1537pub struct AccountReport33 {
1538	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
1539	pub id: String,
1540	#[cfg_attr( feature = "derive_serde", serde(rename = "RptPgntn", skip_serializing_if = "Option::is_none") )]
1541	pub rpt_pgntn: Option<Pagination1>,
1542	#[cfg_attr( feature = "derive_serde", serde(rename = "ElctrncSeqNb", skip_serializing_if = "Option::is_none") )]
1543	pub elctrnc_seq_nb: Option<f64>,
1544	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgSeq", skip_serializing_if = "Option::is_none") )]
1545	pub rptg_seq: Option<SequenceRange1Choice>,
1546	#[cfg_attr( feature = "derive_serde", serde(rename = "LglSeqNb", skip_serializing_if = "Option::is_none") )]
1547	pub lgl_seq_nb: Option<f64>,
1548	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
1549	pub cre_dt_tm: Option<String>,
1550	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDt", skip_serializing_if = "Option::is_none") )]
1551	pub fr_to_dt: Option<DateTimePeriod1>,
1552	#[cfg_attr( feature = "derive_serde", serde(rename = "CpyDplctInd", skip_serializing_if = "Option::is_none") )]
1553	pub cpy_dplct_ind: Option<CopyDuplicate1Code>,
1554	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgSrc", skip_serializing_if = "Option::is_none") )]
1555	pub rptg_src: Option<ReportingSource1Choice>,
1556	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct") )]
1557	pub acct: CashAccount43,
1558	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdAcct", skip_serializing_if = "Option::is_none") )]
1559	pub rltd_acct: Option<CashAccount40>,
1560	#[cfg_attr( feature = "derive_serde", serde(rename = "Intrst", skip_serializing_if = "Option::is_none") )]
1561	pub intrst: Option<Vec<AccountInterest4>>,
1562	#[cfg_attr( feature = "derive_serde", serde(rename = "Bal", skip_serializing_if = "Option::is_none") )]
1563	pub bal: Option<Vec<CashBalance8>>,
1564	#[cfg_attr( feature = "derive_serde", serde(rename = "TxsSummry", skip_serializing_if = "Option::is_none") )]
1565	pub txs_summry: Option<TotalTransactions6>,
1566	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntry", skip_serializing_if = "Option::is_none") )]
1567	pub ntry: Option<Vec<ReportEntry14>>,
1568	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRptInf", skip_serializing_if = "Option::is_none") )]
1569	pub addtl_rpt_inf: Option<String>,
1570}
1571
1572impl AccountReport33 {
1573	pub fn validate(&self) -> Result<(), ValidationError> {
1574		if self.id.chars().count() < 1 {
1575			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
1576		}
1577		if self.id.chars().count() > 35 {
1578			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
1579		}
1580		if let Some(ref val) = self.rpt_pgntn { val.validate()? }
1581		if let Some(ref val) = self.rptg_seq { val.validate()? }
1582		if let Some(ref val) = self.fr_to_dt { val.validate()? }
1583		if let Some(ref val) = self.cpy_dplct_ind { val.validate()? }
1584		if let Some(ref val) = self.rptg_src { val.validate()? }
1585		self.acct.validate()?;
1586		if let Some(ref val) = self.rltd_acct { val.validate()? }
1587		if let Some(ref vec) = self.intrst { for item in vec { item.validate()? } }
1588		if let Some(ref vec) = self.bal { for item in vec { item.validate()? } }
1589		if let Some(ref val) = self.txs_summry { val.validate()? }
1590		if let Some(ref vec) = self.ntry { for item in vec { item.validate()? } }
1591		if let Some(ref val) = self.addtl_rpt_inf {
1592			if val.chars().count() < 1 {
1593				return Err(ValidationError::new(1001, "addtl_rpt_inf is shorter than the minimum length of 1".to_string()));
1594			}
1595			if val.chars().count() > 500 {
1596				return Err(ValidationError::new(1002, "addtl_rpt_inf exceeds the maximum length of 500".to_string()));
1597			}
1598		}
1599		Ok(())
1600	}
1601}
1602
1603
1604// AccountReport35 ...
1605#[cfg_attr(feature = "derive_debug", derive(Debug))]
1606#[cfg_attr(feature = "derive_default", derive(Default))]
1607#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1608#[cfg_attr(feature = "derive_clone", derive(Clone))]
1609#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1610pub struct AccountReport35 {
1611	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId") )]
1612	pub acct_id: AccountIdentification4Choice,
1613	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOrErr") )]
1614	pub acct_or_err: AccountOrBusinessError6Choice,
1615}
1616
1617impl AccountReport35 {
1618	pub fn validate(&self) -> Result<(), ValidationError> {
1619		self.acct_id.validate()?;
1620		self.acct_or_err.validate()?;
1621		Ok(())
1622	}
1623}
1624
1625
1626// AccountReport36 ...
1627#[cfg_attr(feature = "derive_debug", derive(Debug))]
1628#[cfg_attr(feature = "derive_default", derive(Default))]
1629#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1630#[cfg_attr(feature = "derive_clone", derive(Clone))]
1631#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1632pub struct AccountReport36 {
1633	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct") )]
1634	pub acct: CustomerAccount5,
1635	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygMstrAgrmt", skip_serializing_if = "Option::is_none") )]
1636	pub undrlyg_mstr_agrmt: Option<ContractDocument1>,
1637	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctDts", skip_serializing_if = "Option::is_none") )]
1638	pub ctrct_dts: Option<AccountContract3>,
1639	#[cfg_attr( feature = "derive_serde", serde(rename = "Mndt", skip_serializing_if = "Option::is_none") )]
1640	pub mndt: Option<Vec<OperationMandate7>>,
1641	#[cfg_attr( feature = "derive_serde", serde(rename = "Grp", skip_serializing_if = "Option::is_none") )]
1642	pub grp: Option<Vec<Group6>>,
1643	#[cfg_attr( feature = "derive_serde", serde(rename = "RefAcct", skip_serializing_if = "Option::is_none") )]
1644	pub ref_acct: Option<CashAccount40>,
1645	#[cfg_attr( feature = "derive_serde", serde(rename = "BalTrfAcct", skip_serializing_if = "Option::is_none") )]
1646	pub bal_trf_acct: Option<AccountForAction1>,
1647	#[cfg_attr( feature = "derive_serde", serde(rename = "TrfAcctSvcrId", skip_serializing_if = "Option::is_none") )]
1648	pub trf_acct_svcr_id: Option<BranchAndFinancialInstitutionIdentification8>,
1649}
1650
1651impl AccountReport36 {
1652	pub fn validate(&self) -> Result<(), ValidationError> {
1653		self.acct.validate()?;
1654		if let Some(ref val) = self.undrlyg_mstr_agrmt { val.validate()? }
1655		if let Some(ref val) = self.ctrct_dts { val.validate()? }
1656		if let Some(ref vec) = self.mndt { for item in vec { item.validate()? } }
1657		if let Some(ref vec) = self.grp { for item in vec { item.validate()? } }
1658		if let Some(ref val) = self.ref_acct { val.validate()? }
1659		if let Some(ref val) = self.bal_trf_acct { val.validate()? }
1660		if let Some(ref val) = self.trf_acct_svcr_id { val.validate()? }
1661		Ok(())
1662	}
1663}
1664
1665
1666// AccountSchemeName1Choice ...
1667#[cfg_attr(feature = "derive_debug", derive(Debug))]
1668#[cfg_attr(feature = "derive_default", derive(Default))]
1669#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1670#[cfg_attr(feature = "derive_clone", derive(Clone))]
1671#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1672pub struct AccountSchemeName1Choice {
1673	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
1674	pub cd: Option<String>,
1675	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
1676	pub prtry: Option<String>,
1677}
1678
1679impl AccountSchemeName1Choice {
1680	pub fn validate(&self) -> Result<(), ValidationError> {
1681		if let Some(ref val) = self.cd {
1682			if val.chars().count() < 1 {
1683				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
1684			}
1685			if val.chars().count() > 4 {
1686				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
1687			}
1688		}
1689		if let Some(ref val) = self.prtry {
1690			if val.chars().count() < 1 {
1691				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
1692			}
1693			if val.chars().count() > 35 {
1694				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
1695			}
1696		}
1697		Ok(())
1698	}
1699}
1700
1701
1702// AccountSelection3Choice ...
1703#[cfg_attr(feature = "derive_debug", derive(Debug))]
1704#[cfg_attr(feature = "derive_default", derive(Default))]
1705#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1706#[cfg_attr(feature = "derive_clone", derive(Clone))]
1707#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1708pub struct AccountSelection3Choice {
1709	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
1710	pub acct_id: Option<String>,
1711	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrAcctSelctnData", skip_serializing_if = "Option::is_none") )]
1712	pub othr_acct_selctn_data: Option<InvestmentAccount76>,
1713}
1714
1715impl AccountSelection3Choice {
1716	pub fn validate(&self) -> Result<(), ValidationError> {
1717		if let Some(ref val) = self.acct_id {
1718			if val.chars().count() < 1 {
1719				return Err(ValidationError::new(1001, "acct_id is shorter than the minimum length of 1".to_string()));
1720			}
1721			if val.chars().count() > 35 {
1722				return Err(ValidationError::new(1002, "acct_id exceeds the maximum length of 35".to_string()));
1723			}
1724		}
1725		if let Some(ref val) = self.othr_acct_selctn_data { val.validate()? }
1726		Ok(())
1727	}
1728}
1729
1730
1731// AccountStatement13 ...
1732#[cfg_attr(feature = "derive_debug", derive(Debug))]
1733#[cfg_attr(feature = "derive_default", derive(Default))]
1734#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1735#[cfg_attr(feature = "derive_clone", derive(Clone))]
1736#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1737pub struct AccountStatement13 {
1738	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
1739	pub id: String,
1740	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtPgntn", skip_serializing_if = "Option::is_none") )]
1741	pub stmt_pgntn: Option<Pagination1>,
1742	#[cfg_attr( feature = "derive_serde", serde(rename = "ElctrncSeqNb", skip_serializing_if = "Option::is_none") )]
1743	pub elctrnc_seq_nb: Option<f64>,
1744	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgSeq", skip_serializing_if = "Option::is_none") )]
1745	pub rptg_seq: Option<SequenceRange1Choice>,
1746	#[cfg_attr( feature = "derive_serde", serde(rename = "LglSeqNb", skip_serializing_if = "Option::is_none") )]
1747	pub lgl_seq_nb: Option<f64>,
1748	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
1749	pub cre_dt_tm: Option<String>,
1750	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDt", skip_serializing_if = "Option::is_none") )]
1751	pub fr_to_dt: Option<DateTimePeriod1>,
1752	#[cfg_attr( feature = "derive_serde", serde(rename = "CpyDplctInd", skip_serializing_if = "Option::is_none") )]
1753	pub cpy_dplct_ind: Option<CopyDuplicate1Code>,
1754	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgSrc", skip_serializing_if = "Option::is_none") )]
1755	pub rptg_src: Option<ReportingSource1Choice>,
1756	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct") )]
1757	pub acct: CashAccount43,
1758	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdAcct", skip_serializing_if = "Option::is_none") )]
1759	pub rltd_acct: Option<CashAccount40>,
1760	#[cfg_attr( feature = "derive_serde", serde(rename = "Intrst", skip_serializing_if = "Option::is_none") )]
1761	pub intrst: Option<Vec<AccountInterest4>>,
1762	#[cfg_attr( feature = "derive_serde", serde(rename = "Bal") )]
1763	pub bal: Vec<CashBalance8>,
1764	#[cfg_attr( feature = "derive_serde", serde(rename = "TxsSummry", skip_serializing_if = "Option::is_none") )]
1765	pub txs_summry: Option<TotalTransactions6>,
1766	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntry", skip_serializing_if = "Option::is_none") )]
1767	pub ntry: Option<Vec<ReportEntry14>>,
1768	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlStmtInf", skip_serializing_if = "Option::is_none") )]
1769	pub addtl_stmt_inf: Option<String>,
1770}
1771
1772impl AccountStatement13 {
1773	pub fn validate(&self) -> Result<(), ValidationError> {
1774		if self.id.chars().count() < 1 {
1775			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
1776		}
1777		if self.id.chars().count() > 35 {
1778			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
1779		}
1780		if let Some(ref val) = self.stmt_pgntn { val.validate()? }
1781		if let Some(ref val) = self.rptg_seq { val.validate()? }
1782		if let Some(ref val) = self.fr_to_dt { val.validate()? }
1783		if let Some(ref val) = self.cpy_dplct_ind { val.validate()? }
1784		if let Some(ref val) = self.rptg_src { val.validate()? }
1785		self.acct.validate()?;
1786		if let Some(ref val) = self.rltd_acct { val.validate()? }
1787		if let Some(ref vec) = self.intrst { for item in vec { item.validate()? } }
1788		for item in &self.bal { item.validate()? }
1789		if let Some(ref val) = self.txs_summry { val.validate()? }
1790		if let Some(ref vec) = self.ntry { for item in vec { item.validate()? } }
1791		if let Some(ref val) = self.addtl_stmt_inf {
1792			if val.chars().count() < 1 {
1793				return Err(ValidationError::new(1001, "addtl_stmt_inf is shorter than the minimum length of 1".to_string()));
1794			}
1795			if val.chars().count() > 500 {
1796				return Err(ValidationError::new(1002, "addtl_stmt_inf exceeds the maximum length of 500".to_string()));
1797			}
1798		}
1799		Ok(())
1800	}
1801}
1802
1803
1804// AccountStatus2 ...
1805#[cfg_attr(feature = "derive_debug", derive(Debug))]
1806#[cfg_attr(feature = "derive_default", derive(Default))]
1807#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1808#[cfg_attr(feature = "derive_clone", derive(Clone))]
1809#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1810pub struct AccountStatus2 {
1811	#[cfg_attr( feature = "derive_serde", serde(rename = "Nbld", skip_serializing_if = "Option::is_none") )]
1812	pub nbld: Option<EnabledStatusReason1Choice>,
1813	#[cfg_attr( feature = "derive_serde", serde(rename = "Dsbld", skip_serializing_if = "Option::is_none") )]
1814	pub dsbld: Option<DisabledStatusReason1Choice>,
1815	#[cfg_attr( feature = "derive_serde", serde(rename = "Pdg", skip_serializing_if = "Option::is_none") )]
1816	pub pdg: Option<PendingStatusReason1Choice>,
1817	#[cfg_attr( feature = "derive_serde", serde(rename = "PdgOpng", skip_serializing_if = "Option::is_none") )]
1818	pub pdg_opng: Option<PendingOpeningStatusReason1Choice>,
1819	#[cfg_attr( feature = "derive_serde", serde(rename = "Profrm", skip_serializing_if = "Option::is_none") )]
1820	pub profrm: Option<ProformaStatusReason1Choice>,
1821	#[cfg_attr( feature = "derive_serde", serde(rename = "Clsd", skip_serializing_if = "Option::is_none") )]
1822	pub clsd: Option<ClosedStatusReason1Choice>,
1823	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsrPdg", skip_serializing_if = "Option::is_none") )]
1824	pub clsr_pdg: Option<ClosurePendingStatusReason1Choice>,
1825	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
1826	pub othr: Option<Vec<OtherAccountStatus1>>,
1827}
1828
1829impl AccountStatus2 {
1830	pub fn validate(&self) -> Result<(), ValidationError> {
1831		if let Some(ref val) = self.nbld { val.validate()? }
1832		if let Some(ref val) = self.dsbld { val.validate()? }
1833		if let Some(ref val) = self.pdg { val.validate()? }
1834		if let Some(ref val) = self.pdg_opng { val.validate()? }
1835		if let Some(ref val) = self.profrm { val.validate()? }
1836		if let Some(ref val) = self.clsd { val.validate()? }
1837		if let Some(ref val) = self.clsr_pdg { val.validate()? }
1838		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
1839		Ok(())
1840	}
1841}
1842
1843
1844// AccountStatus3Code ...
1845#[cfg_attr(feature = "derive_debug", derive(Debug))]
1846#[cfg_attr(feature = "derive_default", derive(Default))]
1847#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1848#[cfg_attr(feature = "derive_clone", derive(Clone))]
1849#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1850pub enum AccountStatus3Code {
1851	#[cfg_attr(feature = "derive_default", default)]
1852	#[cfg_attr( feature = "derive_serde", serde(rename = "ENAB") )]
1853	CodeENAB,
1854	#[cfg_attr( feature = "derive_serde", serde(rename = "DISA") )]
1855	CodeDISA,
1856	#[cfg_attr( feature = "derive_serde", serde(rename = "DELE") )]
1857	CodeDELE,
1858	#[cfg_attr( feature = "derive_serde", serde(rename = "FORM") )]
1859	CodeFORM,
1860}
1861
1862impl AccountStatus3Code {
1863	pub fn validate(&self) -> Result<(), ValidationError> {
1864		Ok(())
1865	}
1866}
1867
1868
1869// AccountStatusModification1 ...
1870#[cfg_attr(feature = "derive_debug", derive(Debug))]
1871#[cfg_attr(feature = "derive_default", derive(Default))]
1872#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1873#[cfg_attr(feature = "derive_clone", derive(Clone))]
1874#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1875pub struct AccountStatusModification1 {
1876	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
1877	pub mod_cd: Option<Modification1Code>,
1878	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
1879	pub sts: AccountStatus3Code,
1880}
1881
1882impl AccountStatusModification1 {
1883	pub fn validate(&self) -> Result<(), ValidationError> {
1884		if let Some(ref val) = self.mod_cd { val.validate()? }
1885		self.sts.validate()?;
1886		Ok(())
1887	}
1888}
1889
1890
1891// AccountStatusUpdateInstruction1 ...
1892#[cfg_attr(feature = "derive_debug", derive(Debug))]
1893#[cfg_attr(feature = "derive_default", derive(Default))]
1894#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1895#[cfg_attr(feature = "derive_clone", derive(Clone))]
1896#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1897pub struct AccountStatusUpdateInstruction1 {
1898	#[cfg_attr( feature = "derive_serde", serde(rename = "UpdInstr") )]
1899	pub upd_instr: AccountStatusUpdateInstruction1Choice,
1900	#[cfg_attr( feature = "derive_serde", serde(rename = "UpdInstrRsn", skip_serializing_if = "Option::is_none") )]
1901	pub upd_instr_rsn: Option<AccountStatusUpdateInstructionReason1Choice>,
1902}
1903
1904impl AccountStatusUpdateInstruction1 {
1905	pub fn validate(&self) -> Result<(), ValidationError> {
1906		self.upd_instr.validate()?;
1907		if let Some(ref val) = self.upd_instr_rsn { val.validate()? }
1908		Ok(())
1909	}
1910}
1911
1912
1913// AccountStatusUpdateInstruction1Choice ...
1914#[cfg_attr(feature = "derive_debug", derive(Debug))]
1915#[cfg_attr(feature = "derive_default", derive(Default))]
1916#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1917#[cfg_attr(feature = "derive_clone", derive(Clone))]
1918#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1919pub struct AccountStatusUpdateInstruction1Choice {
1920	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
1921	pub cd: Option<AccountStatusUpdateInstruction1Code>,
1922	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
1923	pub prtry: Option<GenericIdentification36>,
1924}
1925
1926impl AccountStatusUpdateInstruction1Choice {
1927	pub fn validate(&self) -> Result<(), ValidationError> {
1928		if let Some(ref val) = self.cd { val.validate()? }
1929		if let Some(ref val) = self.prtry { val.validate()? }
1930		Ok(())
1931	}
1932}
1933
1934
1935// AccountStatusUpdateInstruction1Code ...
1936#[cfg_attr(feature = "derive_debug", derive(Debug))]
1937#[cfg_attr(feature = "derive_default", derive(Default))]
1938#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1939#[cfg_attr(feature = "derive_clone", derive(Clone))]
1940#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1941pub enum AccountStatusUpdateInstruction1Code {
1942	#[cfg_attr(feature = "derive_default", default)]
1943	#[cfg_attr( feature = "derive_serde", serde(rename = "CLOS") )]
1944	CodeCLOS,
1945	#[cfg_attr( feature = "derive_serde", serde(rename = "REAC") )]
1946	CodeREAC,
1947}
1948
1949impl AccountStatusUpdateInstruction1Code {
1950	pub fn validate(&self) -> Result<(), ValidationError> {
1951		Ok(())
1952	}
1953}
1954
1955
1956// AccountStatusUpdateInstructionReason1 ...
1957#[cfg_attr(feature = "derive_debug", derive(Debug))]
1958#[cfg_attr(feature = "derive_default", derive(Default))]
1959#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1960#[cfg_attr(feature = "derive_clone", derive(Clone))]
1961#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1962pub struct AccountStatusUpdateInstructionReason1 {
1963	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
1964	pub cd: Option<AccountStatusUpdateInstructionReason2Choice>,
1965	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
1966	pub addtl_inf: Option<String>,
1967}
1968
1969impl AccountStatusUpdateInstructionReason1 {
1970	pub fn validate(&self) -> Result<(), ValidationError> {
1971		if let Some(ref val) = self.cd { val.validate()? }
1972		if let Some(ref val) = self.addtl_inf {
1973			if val.chars().count() < 1 {
1974				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
1975			}
1976			if val.chars().count() > 350 {
1977				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 350".to_string()));
1978			}
1979		}
1980		Ok(())
1981	}
1982}
1983
1984
1985// AccountStatusUpdateInstructionReason1Choice ...
1986#[cfg_attr(feature = "derive_debug", derive(Debug))]
1987#[cfg_attr(feature = "derive_default", derive(Default))]
1988#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
1989#[cfg_attr(feature = "derive_clone", derive(Clone))]
1990#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
1991pub struct AccountStatusUpdateInstructionReason1Choice {
1992	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
1993	pub no_spcfd_rsn: Option<NoReasonCode>,
1994	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
1995	pub rsn: Option<Vec<AccountStatusUpdateInstructionReason1>>,
1996}
1997
1998impl AccountStatusUpdateInstructionReason1Choice {
1999	pub fn validate(&self) -> Result<(), ValidationError> {
2000		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
2001		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
2002		Ok(())
2003	}
2004}
2005
2006
2007// AccountStatusUpdateInstructionReason2Choice ...
2008#[cfg_attr(feature = "derive_debug", derive(Debug))]
2009#[cfg_attr(feature = "derive_default", derive(Default))]
2010#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2011#[cfg_attr(feature = "derive_clone", derive(Clone))]
2012#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2013pub struct AccountStatusUpdateInstructionReason2Choice {
2014	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
2015	pub cd: Option<AccountStatusUpdateRequestReason1Code>,
2016	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
2017	pub prtry: Option<GenericIdentification36>,
2018}
2019
2020impl AccountStatusUpdateInstructionReason2Choice {
2021	pub fn validate(&self) -> Result<(), ValidationError> {
2022		if let Some(ref val) = self.cd { val.validate()? }
2023		if let Some(ref val) = self.prtry { val.validate()? }
2024		Ok(())
2025	}
2026}
2027
2028
2029// AccountStatusUpdateRequestReason1Code ...
2030#[cfg_attr(feature = "derive_debug", derive(Debug))]
2031#[cfg_attr(feature = "derive_default", derive(Default))]
2032#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2033#[cfg_attr(feature = "derive_clone", derive(Clone))]
2034#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2035pub enum AccountStatusUpdateRequestReason1Code {
2036	#[cfg_attr(feature = "derive_default", default)]
2037	#[cfg_attr( feature = "derive_serde", serde(rename = "CLOE") )]
2038	CodeCLOE,
2039}
2040
2041impl AccountStatusUpdateRequestReason1Code {
2042	pub fn validate(&self) -> Result<(), ValidationError> {
2043		Ok(())
2044	}
2045}
2046
2047
2048// AccountSwitchDetails1 ...
2049#[cfg_attr(feature = "derive_debug", derive(Debug))]
2050#[cfg_attr(feature = "derive_default", derive(Default))]
2051#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2052#[cfg_attr(feature = "derive_clone", derive(Clone))]
2053#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2054pub struct AccountSwitchDetails1 {
2055	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqRefNb") )]
2056	pub unq_ref_nb: String,
2057	#[cfg_attr( feature = "derive_serde", serde(rename = "RtgUnqRefNb") )]
2058	pub rtg_unq_ref_nb: String,
2059	#[cfg_attr( feature = "derive_serde", serde(rename = "SwtchRcvdDtTm", skip_serializing_if = "Option::is_none") )]
2060	pub swtch_rcvd_dt_tm: Option<String>,
2061	#[cfg_attr( feature = "derive_serde", serde(rename = "SwtchDt", skip_serializing_if = "Option::is_none") )]
2062	pub swtch_dt: Option<String>,
2063	#[cfg_attr( feature = "derive_serde", serde(rename = "SwtchTp") )]
2064	pub swtch_tp: SwitchType1Code,
2065	#[cfg_attr( feature = "derive_serde", serde(rename = "SwtchSts", skip_serializing_if = "Option::is_none") )]
2066	pub swtch_sts: Option<SwitchStatus1Code>,
2067	#[cfg_attr( feature = "derive_serde", serde(rename = "BalTrfWndw", skip_serializing_if = "Option::is_none") )]
2068	pub bal_trf_wndw: Option<BalanceTransferWindow1Code>,
2069	#[cfg_attr( feature = "derive_serde", serde(rename = "Rspn", skip_serializing_if = "Option::is_none") )]
2070	pub rspn: Option<Vec<ResponseDetails1>>,
2071}
2072
2073impl AccountSwitchDetails1 {
2074	pub fn validate(&self) -> Result<(), ValidationError> {
2075		if self.unq_ref_nb.chars().count() < 1 {
2076			return Err(ValidationError::new(1001, "unq_ref_nb is shorter than the minimum length of 1".to_string()));
2077		}
2078		if self.unq_ref_nb.chars().count() > 35 {
2079			return Err(ValidationError::new(1002, "unq_ref_nb exceeds the maximum length of 35".to_string()));
2080		}
2081		if self.rtg_unq_ref_nb.chars().count() < 1 {
2082			return Err(ValidationError::new(1001, "rtg_unq_ref_nb is shorter than the minimum length of 1".to_string()));
2083		}
2084		if self.rtg_unq_ref_nb.chars().count() > 35 {
2085			return Err(ValidationError::new(1002, "rtg_unq_ref_nb exceeds the maximum length of 35".to_string()));
2086		}
2087		self.swtch_tp.validate()?;
2088		if let Some(ref val) = self.swtch_sts { val.validate()? }
2089		if let Some(ref val) = self.bal_trf_wndw { val.validate()? }
2090		if let Some(ref vec) = self.rspn { for item in vec { item.validate()? } }
2091		Ok(())
2092	}
2093}
2094
2095
2096// AccountTax1 ...
2097#[cfg_attr(feature = "derive_debug", derive(Debug))]
2098#[cfg_attr(feature = "derive_default", derive(Default))]
2099#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2100#[cfg_attr(feature = "derive_clone", derive(Clone))]
2101#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2102pub struct AccountTax1 {
2103	#[cfg_attr( feature = "derive_serde", serde(rename = "ClctnMtd") )]
2104	pub clctn_mtd: BillingTaxCalculationMethod1Code,
2105	#[cfg_attr( feature = "derive_serde", serde(rename = "Rgn", skip_serializing_if = "Option::is_none") )]
2106	pub rgn: Option<String>,
2107	#[cfg_attr( feature = "derive_serde", serde(rename = "NonResCtry", skip_serializing_if = "Option::is_none") )]
2108	pub non_res_ctry: Option<ResidenceLocation1Choice>,
2109}
2110
2111impl AccountTax1 {
2112	pub fn validate(&self) -> Result<(), ValidationError> {
2113		self.clctn_mtd.validate()?;
2114		if let Some(ref val) = self.rgn {
2115			if val.chars().count() < 1 {
2116				return Err(ValidationError::new(1001, "rgn is shorter than the minimum length of 1".to_string()));
2117			}
2118			if val.chars().count() > 40 {
2119				return Err(ValidationError::new(1002, "rgn exceeds the maximum length of 40".to_string()));
2120			}
2121		}
2122		if let Some(ref val) = self.non_res_ctry { val.validate()? }
2123		Ok(())
2124	}
2125}
2126
2127
2128// AccountType2Choice ...
2129#[cfg_attr(feature = "derive_debug", derive(Debug))]
2130#[cfg_attr(feature = "derive_default", derive(Default))]
2131#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2132#[cfg_attr(feature = "derive_clone", derive(Clone))]
2133#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2134pub struct AccountType2Choice {
2135	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
2136	pub cd: Option<FundCashAccount4Code>,
2137	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
2138	pub prtry: Option<GenericIdentification47>,
2139}
2140
2141impl AccountType2Choice {
2142	pub fn validate(&self) -> Result<(), ValidationError> {
2143		if let Some(ref val) = self.cd { val.validate()? }
2144		if let Some(ref val) = self.prtry { val.validate()? }
2145		Ok(())
2146	}
2147}
2148
2149
2150// AccountUsageType2Choice ...
2151#[cfg_attr(feature = "derive_debug", derive(Debug))]
2152#[cfg_attr(feature = "derive_default", derive(Default))]
2153#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2154#[cfg_attr(feature = "derive_clone", derive(Clone))]
2155#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2156pub struct AccountUsageType2Choice {
2157	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
2158	pub cd: Option<AccountUsageType2Code>,
2159	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
2160	pub prtry: Option<GenericIdentification47>,
2161}
2162
2163impl AccountUsageType2Choice {
2164	pub fn validate(&self) -> Result<(), ValidationError> {
2165		if let Some(ref val) = self.cd { val.validate()? }
2166		if let Some(ref val) = self.prtry { val.validate()? }
2167		Ok(())
2168	}
2169}
2170
2171
2172// AccountUsageType2Code ...
2173#[cfg_attr(feature = "derive_debug", derive(Debug))]
2174#[cfg_attr(feature = "derive_default", derive(Default))]
2175#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2176#[cfg_attr(feature = "derive_clone", derive(Clone))]
2177#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2178pub enum AccountUsageType2Code {
2179	#[cfg_attr(feature = "derive_default", default)]
2180	#[cfg_attr( feature = "derive_serde", serde(rename = "INVE") )]
2181	CodeINVE,
2182	#[cfg_attr( feature = "derive_serde", serde(rename = "ISSP") )]
2183	CodeISSP,
2184	#[cfg_attr( feature = "derive_serde", serde(rename = "SETP") )]
2185	CodeSETP,
2186	#[cfg_attr( feature = "derive_serde", serde(rename = "TRDP") )]
2187	CodeTRDP,
2188}
2189
2190impl AccountUsageType2Code {
2191	pub fn validate(&self) -> Result<(), ValidationError> {
2192		Ok(())
2193	}
2194}
2195
2196
2197// AccountingStatus1Choice ...
2198#[cfg_attr(feature = "derive_debug", derive(Debug))]
2199#[cfg_attr(feature = "derive_default", derive(Default))]
2200#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2201#[cfg_attr(feature = "derive_clone", derive(Clone))]
2202#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2203pub struct AccountingStatus1Choice {
2204	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
2205	pub cd: Option<AccountingStatus1Code>,
2206	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
2207	pub prtry: Option<GenericIdentification47>,
2208}
2209
2210impl AccountingStatus1Choice {
2211	pub fn validate(&self) -> Result<(), ValidationError> {
2212		if let Some(ref val) = self.cd { val.validate()? }
2213		if let Some(ref val) = self.prtry { val.validate()? }
2214		Ok(())
2215	}
2216}
2217
2218
2219// AccountingStatus1Code ...
2220#[cfg_attr(feature = "derive_debug", derive(Debug))]
2221#[cfg_attr(feature = "derive_default", derive(Default))]
2222#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2223#[cfg_attr(feature = "derive_clone", derive(Clone))]
2224#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2225pub enum AccountingStatus1Code {
2226	#[cfg_attr(feature = "derive_default", default)]
2227	#[cfg_attr( feature = "derive_serde", serde(rename = "YDOM") )]
2228	CodeYDOM,
2229	#[cfg_attr( feature = "derive_serde", serde(rename = "NDOM") )]
2230	CodeNDOM,
2231}
2232
2233impl AccountingStatus1Code {
2234	pub fn validate(&self) -> Result<(), ValidationError> {
2235		Ok(())
2236	}
2237}
2238
2239
2240// AcknowledgedAcceptedStatus21Choice ...
2241#[cfg_attr(feature = "derive_debug", derive(Debug))]
2242#[cfg_attr(feature = "derive_default", derive(Default))]
2243#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2244#[cfg_attr(feature = "derive_clone", derive(Clone))]
2245#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2246pub struct AcknowledgedAcceptedStatus21Choice {
2247	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
2248	pub no_spcfd_rsn: Option<NoReasonCode>,
2249	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
2250	pub rsn: Option<Vec<AcknowledgementReason9>>,
2251}
2252
2253impl AcknowledgedAcceptedStatus21Choice {
2254	pub fn validate(&self) -> Result<(), ValidationError> {
2255		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
2256		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
2257		Ok(())
2258	}
2259}
2260
2261
2262// AcknowledgedAcceptedStatus24Choice ...
2263#[cfg_attr(feature = "derive_debug", derive(Debug))]
2264#[cfg_attr(feature = "derive_default", derive(Default))]
2265#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2266#[cfg_attr(feature = "derive_clone", derive(Clone))]
2267#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2268pub struct AcknowledgedAcceptedStatus24Choice {
2269	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
2270	pub no_spcfd_rsn: Option<NoReasonCode>,
2271	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
2272	pub rsn: Option<Vec<AcknowledgementReason12>>,
2273}
2274
2275impl AcknowledgedAcceptedStatus24Choice {
2276	pub fn validate(&self) -> Result<(), ValidationError> {
2277		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
2278		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
2279		Ok(())
2280	}
2281}
2282
2283
2284// AcknowledgementDetails1Choice ...
2285#[cfg_attr(feature = "derive_debug", derive(Debug))]
2286#[cfg_attr(feature = "derive_default", derive(Default))]
2287#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2288#[cfg_attr(feature = "derive_clone", derive(Clone))]
2289#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2290pub struct AcknowledgementDetails1Choice {
2291	#[cfg_attr( feature = "derive_serde", serde(rename = "PayInSchdlRef", skip_serializing_if = "Option::is_none") )]
2292	pub pay_in_schdl_ref: Option<String>,
2293	#[cfg_attr( feature = "derive_serde", serde(rename = "PayInCallRef", skip_serializing_if = "Option::is_none") )]
2294	pub pay_in_call_ref: Option<String>,
2295}
2296
2297impl AcknowledgementDetails1Choice {
2298	pub fn validate(&self) -> Result<(), ValidationError> {
2299		if let Some(ref val) = self.pay_in_schdl_ref {
2300			if val.chars().count() < 1 {
2301				return Err(ValidationError::new(1001, "pay_in_schdl_ref is shorter than the minimum length of 1".to_string()));
2302			}
2303			if val.chars().count() > 35 {
2304				return Err(ValidationError::new(1002, "pay_in_schdl_ref exceeds the maximum length of 35".to_string()));
2305			}
2306		}
2307		if let Some(ref val) = self.pay_in_call_ref {
2308			if val.chars().count() < 1 {
2309				return Err(ValidationError::new(1001, "pay_in_call_ref is shorter than the minimum length of 1".to_string()));
2310			}
2311			if val.chars().count() > 35 {
2312				return Err(ValidationError::new(1002, "pay_in_call_ref exceeds the maximum length of 35".to_string()));
2313			}
2314		}
2315		Ok(())
2316	}
2317}
2318
2319
2320// AcknowledgementReason12 ...
2321#[cfg_attr(feature = "derive_debug", derive(Debug))]
2322#[cfg_attr(feature = "derive_default", derive(Default))]
2323#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2324#[cfg_attr(feature = "derive_clone", derive(Clone))]
2325#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2326pub struct AcknowledgementReason12 {
2327	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
2328	pub cd: AcknowledgementReason15Choice,
2329	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
2330	pub addtl_rsn_inf: Option<String>,
2331}
2332
2333impl AcknowledgementReason12 {
2334	pub fn validate(&self) -> Result<(), ValidationError> {
2335		self.cd.validate()?;
2336		if let Some(ref val) = self.addtl_rsn_inf {
2337			if val.chars().count() < 1 {
2338				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
2339			}
2340			if val.chars().count() > 210 {
2341				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
2342			}
2343		}
2344		Ok(())
2345	}
2346}
2347
2348
2349// AcknowledgementReason12Choice ...
2350#[cfg_attr(feature = "derive_debug", derive(Debug))]
2351#[cfg_attr(feature = "derive_default", derive(Default))]
2352#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2353#[cfg_attr(feature = "derive_clone", derive(Clone))]
2354#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2355pub struct AcknowledgementReason12Choice {
2356	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
2357	pub cd: Option<AcknowledgementReason5Code>,
2358	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
2359	pub prtry: Option<GenericIdentification30>,
2360}
2361
2362impl AcknowledgementReason12Choice {
2363	pub fn validate(&self) -> Result<(), ValidationError> {
2364		if let Some(ref val) = self.cd { val.validate()? }
2365		if let Some(ref val) = self.prtry { val.validate()? }
2366		Ok(())
2367	}
2368}
2369
2370
2371// AcknowledgementReason15Choice ...
2372#[cfg_attr(feature = "derive_debug", derive(Debug))]
2373#[cfg_attr(feature = "derive_default", derive(Default))]
2374#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2375#[cfg_attr(feature = "derive_clone", derive(Clone))]
2376#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2377pub struct AcknowledgementReason15Choice {
2378	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
2379	pub cd: Option<AcknowledgementReason3Code>,
2380	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
2381	pub prtry: Option<GenericIdentification30>,
2382}
2383
2384impl AcknowledgementReason15Choice {
2385	pub fn validate(&self) -> Result<(), ValidationError> {
2386		if let Some(ref val) = self.cd { val.validate()? }
2387		if let Some(ref val) = self.prtry { val.validate()? }
2388		Ok(())
2389	}
2390}
2391
2392
2393// AcknowledgementReason3Code ...
2394#[cfg_attr(feature = "derive_debug", derive(Debug))]
2395#[cfg_attr(feature = "derive_default", derive(Default))]
2396#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2397#[cfg_attr(feature = "derive_clone", derive(Clone))]
2398#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2399pub enum AcknowledgementReason3Code {
2400	#[cfg_attr(feature = "derive_default", default)]
2401	#[cfg_attr( feature = "derive_serde", serde(rename = "ADEA") )]
2402	CodeADEA,
2403	#[cfg_attr( feature = "derive_serde", serde(rename = "SMPG") )]
2404	CodeSMPG,
2405	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
2406	CodeOTHR,
2407}
2408
2409impl AcknowledgementReason3Code {
2410	pub fn validate(&self) -> Result<(), ValidationError> {
2411		Ok(())
2412	}
2413}
2414
2415
2416// AcknowledgementReason5Code ...
2417#[cfg_attr(feature = "derive_debug", derive(Debug))]
2418#[cfg_attr(feature = "derive_default", derive(Default))]
2419#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2420#[cfg_attr(feature = "derive_clone", derive(Clone))]
2421#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2422pub enum AcknowledgementReason5Code {
2423	#[cfg_attr(feature = "derive_default", default)]
2424	#[cfg_attr( feature = "derive_serde", serde(rename = "ADEA") )]
2425	CodeADEA,
2426	#[cfg_attr( feature = "derive_serde", serde(rename = "SMPG") )]
2427	CodeSMPG,
2428	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
2429	CodeOTHR,
2430	#[cfg_attr( feature = "derive_serde", serde(rename = "CDCY") )]
2431	CodeCDCY,
2432	#[cfg_attr( feature = "derive_serde", serde(rename = "CDRG") )]
2433	CodeCDRG,
2434	#[cfg_attr( feature = "derive_serde", serde(rename = "CDRE") )]
2435	CodeCDRE,
2436	#[cfg_attr( feature = "derive_serde", serde(rename = "NSTP") )]
2437	CodeNSTP,
2438	#[cfg_attr( feature = "derive_serde", serde(rename = "RQWV") )]
2439	CodeRQWV,
2440	#[cfg_attr( feature = "derive_serde", serde(rename = "LATE") )]
2441	CodeLATE,
2442}
2443
2444impl AcknowledgementReason5Code {
2445	pub fn validate(&self) -> Result<(), ValidationError> {
2446		Ok(())
2447	}
2448}
2449
2450
2451// AcknowledgementReason9 ...
2452#[cfg_attr(feature = "derive_debug", derive(Debug))]
2453#[cfg_attr(feature = "derive_default", derive(Default))]
2454#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2455#[cfg_attr(feature = "derive_clone", derive(Clone))]
2456#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2457pub struct AcknowledgementReason9 {
2458	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
2459	pub cd: AcknowledgementReason12Choice,
2460	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
2461	pub addtl_rsn_inf: Option<String>,
2462}
2463
2464impl AcknowledgementReason9 {
2465	pub fn validate(&self) -> Result<(), ValidationError> {
2466		self.cd.validate()?;
2467		if let Some(ref val) = self.addtl_rsn_inf {
2468			if val.chars().count() < 1 {
2469				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
2470			}
2471			if val.chars().count() > 210 {
2472				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
2473			}
2474		}
2475		Ok(())
2476	}
2477}
2478
2479
2480// ActivationHeader3 ...
2481#[cfg_attr(feature = "derive_debug", derive(Debug))]
2482#[cfg_attr(feature = "derive_default", derive(Default))]
2483#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2484#[cfg_attr(feature = "derive_clone", derive(Clone))]
2485#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2486pub struct ActivationHeader3 {
2487	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
2488	pub msg_id: String,
2489	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
2490	pub cre_dt_tm: String,
2491	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgOrgtr", skip_serializing_if = "Option::is_none") )]
2492	pub msg_orgtr: Option<RTPPartyIdentification2>,
2493	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgRcpt", skip_serializing_if = "Option::is_none") )]
2494	pub msg_rcpt: Option<RTPPartyIdentification2>,
2495	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty") )]
2496	pub initg_pty: RTPPartyIdentification2,
2497}
2498
2499impl ActivationHeader3 {
2500	pub fn validate(&self) -> Result<(), ValidationError> {
2501		if self.msg_id.chars().count() < 1 {
2502			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
2503		}
2504		if self.msg_id.chars().count() > 35 {
2505			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
2506		}
2507		if let Some(ref val) = self.msg_orgtr { val.validate()? }
2508		if let Some(ref val) = self.msg_rcpt { val.validate()? }
2509		self.initg_pty.validate()?;
2510		Ok(())
2511	}
2512}
2513
2514
2515// ActivationStatus3 ...
2516#[cfg_attr(feature = "derive_debug", derive(Debug))]
2517#[cfg_attr(feature = "derive_default", derive(Default))]
2518#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2519#[cfg_attr(feature = "derive_clone", derive(Clone))]
2520#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2521pub struct ActivationStatus3 {
2522	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizInstr", skip_serializing_if = "Option::is_none") )]
2523	pub orgnl_biz_instr: Option<OriginalBusinessInstruction1>,
2524	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
2525	pub sts: ServiceStatus1Choice,
2526	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsn", skip_serializing_if = "Option::is_none") )]
2527	pub sts_rsn: Option<DebtorActivationStatusReason3>,
2528	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlActvtnRef", skip_serializing_if = "Option::is_none") )]
2529	pub orgnl_actvtn_ref: Option<OriginalActivation3Choice>,
2530	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvActvtnDt", skip_serializing_if = "Option::is_none") )]
2531	pub fctv_actvtn_dt: Option<DateAndDateTime2Choice>,
2532	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
2533	pub splmtry_data: Option<Vec<SupplementaryData1>>,
2534}
2535
2536impl ActivationStatus3 {
2537	pub fn validate(&self) -> Result<(), ValidationError> {
2538		if let Some(ref val) = self.orgnl_biz_instr { val.validate()? }
2539		self.sts.validate()?;
2540		if let Some(ref val) = self.sts_rsn { val.validate()? }
2541		if let Some(ref val) = self.orgnl_actvtn_ref { val.validate()? }
2542		if let Some(ref val) = self.fctv_actvtn_dt { val.validate()? }
2543		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
2544		Ok(())
2545	}
2546}
2547
2548
2549// ActiveAmountRange3Choice ...
2550#[cfg_attr(feature = "derive_debug", derive(Debug))]
2551#[cfg_attr(feature = "derive_default", derive(Default))]
2552#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2553#[cfg_attr(feature = "derive_clone", derive(Clone))]
2554#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2555pub struct ActiveAmountRange3Choice {
2556	#[cfg_attr( feature = "derive_serde", serde(rename = "ImpldCcyAndAmtRg", skip_serializing_if = "Option::is_none") )]
2557	pub impld_ccy_and_amt_rg: Option<ImpliedCurrencyAndAmountRange1>,
2558	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyAndAmtRg", skip_serializing_if = "Option::is_none") )]
2559	pub ccy_and_amt_rg: Option<ActiveCurrencyAndAmountRange3>,
2560}
2561
2562impl ActiveAmountRange3Choice {
2563	pub fn validate(&self) -> Result<(), ValidationError> {
2564		if let Some(ref val) = self.impld_ccy_and_amt_rg { val.validate()? }
2565		if let Some(ref val) = self.ccy_and_amt_rg { val.validate()? }
2566		Ok(())
2567	}
2568}
2569
2570
2571// ActiveCurrencyAnd13DecimalAmount ...
2572#[cfg_attr(feature = "derive_debug", derive(Debug))]
2573#[cfg_attr(feature = "derive_default", derive(Default))]
2574#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2575#[cfg_attr(feature = "derive_clone", derive(Clone))]
2576#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2577pub struct ActiveCurrencyAnd13DecimalAmount {
2578	#[cfg_attr( feature = "derive_serde", serde(rename = "@Ccy") )]
2579	pub ccy: String,
2580	#[cfg_attr( feature = "derive_serde", serde(rename = "$value") )]
2581	pub value: f64,
2582}
2583
2584impl ActiveCurrencyAnd13DecimalAmount {
2585	pub fn validate(&self) -> Result<(), ValidationError> {
2586		Ok(())
2587	}
2588}
2589
2590
2591// ActiveCurrencyAnd24Amount ...
2592#[cfg_attr(feature = "derive_debug", derive(Debug))]
2593#[cfg_attr(feature = "derive_default", derive(Default))]
2594#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2595#[cfg_attr(feature = "derive_clone", derive(Clone))]
2596#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2597pub struct ActiveCurrencyAnd24Amount {
2598	#[cfg_attr( feature = "derive_serde", serde(rename = "@Ccy") )]
2599	pub ccy: String,
2600	#[cfg_attr( feature = "derive_serde", serde(rename = "$value") )]
2601	pub value: f64,
2602}
2603
2604impl ActiveCurrencyAnd24Amount {
2605	pub fn validate(&self) -> Result<(), ValidationError> {
2606		Ok(())
2607	}
2608}
2609
2610
2611// ActiveCurrencyAndAmount ...
2612#[cfg_attr(feature = "derive_debug", derive(Debug))]
2613#[cfg_attr(feature = "derive_default", derive(Default))]
2614#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2615#[cfg_attr(feature = "derive_clone", derive(Clone))]
2616#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2617pub struct ActiveCurrencyAndAmount {
2618	#[cfg_attr( feature = "derive_serde", serde(rename = "@Ccy") )]
2619	pub ccy: String,
2620	#[cfg_attr( feature = "derive_serde", serde(rename = "$value") )]
2621	pub value: f64,
2622}
2623
2624impl ActiveCurrencyAndAmount {
2625	pub fn validate(&self) -> Result<(), ValidationError> {
2626		Ok(())
2627	}
2628}
2629
2630
2631// ActiveCurrencyAndAmountRange3 ...
2632#[cfg_attr(feature = "derive_debug", derive(Debug))]
2633#[cfg_attr(feature = "derive_default", derive(Default))]
2634#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2635#[cfg_attr(feature = "derive_clone", derive(Clone))]
2636#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2637pub struct ActiveCurrencyAndAmountRange3 {
2638	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
2639	pub amt: ImpliedCurrencyAmountRange1Choice,
2640	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
2641	pub cdt_dbt_ind: Option<CreditDebitCode>,
2642	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
2643	pub ccy: String,
2644}
2645
2646impl ActiveCurrencyAndAmountRange3 {
2647	pub fn validate(&self) -> Result<(), ValidationError> {
2648		self.amt.validate()?;
2649		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
2650		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
2651		if !pattern.is_match(&self.ccy) {
2652			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
2653		}
2654		Ok(())
2655	}
2656}
2657
2658
2659// ActiveOrHistoricAmountRange2Choice ...
2660#[cfg_attr(feature = "derive_debug", derive(Debug))]
2661#[cfg_attr(feature = "derive_default", derive(Default))]
2662#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2663#[cfg_attr(feature = "derive_clone", derive(Clone))]
2664#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2665pub struct ActiveOrHistoricAmountRange2Choice {
2666	#[cfg_attr( feature = "derive_serde", serde(rename = "ImpldCcyAndAmtRg", skip_serializing_if = "Option::is_none") )]
2667	pub impld_ccy_and_amt_rg: Option<ImpliedCurrencyAndAmountRange1>,
2668	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyAndAmtRg", skip_serializing_if = "Option::is_none") )]
2669	pub ccy_and_amt_rg: Option<ActiveOrHistoricCurrencyAndAmountRange2>,
2670}
2671
2672impl ActiveOrHistoricAmountRange2Choice {
2673	pub fn validate(&self) -> Result<(), ValidationError> {
2674		if let Some(ref val) = self.impld_ccy_and_amt_rg { val.validate()? }
2675		if let Some(ref val) = self.ccy_and_amt_rg { val.validate()? }
2676		Ok(())
2677	}
2678}
2679
2680
2681// ActiveOrHistoricCurrencyAnd13DecimalAmount ...
2682#[cfg_attr(feature = "derive_debug", derive(Debug))]
2683#[cfg_attr(feature = "derive_default", derive(Default))]
2684#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2685#[cfg_attr(feature = "derive_clone", derive(Clone))]
2686#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2687pub struct ActiveOrHistoricCurrencyAnd13DecimalAmount {
2688	#[cfg_attr( feature = "derive_serde", serde(rename = "@Ccy") )]
2689	pub ccy: String,
2690	#[cfg_attr( feature = "derive_serde", serde(rename = "$value") )]
2691	pub value: f64,
2692}
2693
2694impl ActiveOrHistoricCurrencyAnd13DecimalAmount {
2695	pub fn validate(&self) -> Result<(), ValidationError> {
2696		Ok(())
2697	}
2698}
2699
2700
2701// ActiveOrHistoricCurrencyAnd19DecimalAmount ...
2702#[cfg_attr(feature = "derive_debug", derive(Debug))]
2703#[cfg_attr(feature = "derive_default", derive(Default))]
2704#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2705#[cfg_attr(feature = "derive_clone", derive(Clone))]
2706#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2707pub struct ActiveOrHistoricCurrencyAnd19DecimalAmount {
2708	#[cfg_attr( feature = "derive_serde", serde(rename = "@Ccy") )]
2709	pub ccy: String,
2710	#[cfg_attr( feature = "derive_serde", serde(rename = "$value") )]
2711	pub value: f64,
2712}
2713
2714impl ActiveOrHistoricCurrencyAnd19DecimalAmount {
2715	pub fn validate(&self) -> Result<(), ValidationError> {
2716		Ok(())
2717	}
2718}
2719
2720
2721// ActiveOrHistoricCurrencyAnd20DecimalAmount ...
2722#[cfg_attr(feature = "derive_debug", derive(Debug))]
2723#[cfg_attr(feature = "derive_default", derive(Default))]
2724#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2725#[cfg_attr(feature = "derive_clone", derive(Clone))]
2726#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2727pub struct ActiveOrHistoricCurrencyAnd20DecimalAmount {
2728	#[cfg_attr( feature = "derive_serde", serde(rename = "@Ccy") )]
2729	pub ccy: String,
2730	#[cfg_attr( feature = "derive_serde", serde(rename = "$value") )]
2731	pub value: f64,
2732}
2733
2734impl ActiveOrHistoricCurrencyAnd20DecimalAmount {
2735	pub fn validate(&self) -> Result<(), ValidationError> {
2736		Ok(())
2737	}
2738}
2739
2740
2741// ActiveOrHistoricCurrencyAndAmount ...
2742#[cfg_attr(feature = "derive_debug", derive(Debug))]
2743#[cfg_attr(feature = "derive_default", derive(Default))]
2744#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2745#[cfg_attr(feature = "derive_clone", derive(Clone))]
2746#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2747pub struct ActiveOrHistoricCurrencyAndAmount {
2748	#[cfg_attr( feature = "derive_serde", serde(rename = "@Ccy") )]
2749	pub ccy: String,
2750	#[cfg_attr( feature = "derive_serde", serde(rename = "$value") )]
2751	pub value: f64,
2752}
2753
2754impl ActiveOrHistoricCurrencyAndAmount {
2755	pub fn validate(&self) -> Result<(), ValidationError> {
2756		Ok(())
2757	}
2758}
2759
2760
2761// ActiveOrHistoricCurrencyAndAmountRange2 ...
2762#[cfg_attr(feature = "derive_debug", derive(Debug))]
2763#[cfg_attr(feature = "derive_default", derive(Default))]
2764#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2765#[cfg_attr(feature = "derive_clone", derive(Clone))]
2766#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2767pub struct ActiveOrHistoricCurrencyAndAmountRange2 {
2768	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
2769	pub amt: ImpliedCurrencyAmountRange1Choice,
2770	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
2771	pub cdt_dbt_ind: Option<CreditDebitCode>,
2772	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
2773	pub ccy: String,
2774}
2775
2776impl ActiveOrHistoricCurrencyAndAmountRange2 {
2777	pub fn validate(&self) -> Result<(), ValidationError> {
2778		self.amt.validate()?;
2779		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
2780		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
2781		if !pattern.is_match(&self.ccy) {
2782			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
2783		}
2784		Ok(())
2785	}
2786}
2787
2788
2789// AdditionalInformation1 ...
2790#[cfg_attr(feature = "derive_debug", derive(Debug))]
2791#[cfg_attr(feature = "derive_default", derive(Default))]
2792#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2793#[cfg_attr(feature = "derive_clone", derive(Clone))]
2794#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2795pub struct AdditionalInformation1 {
2796	#[cfg_attr( feature = "derive_serde", serde(rename = "InfTp") )]
2797	pub inf_tp: InformationType1Choice,
2798	#[cfg_attr( feature = "derive_serde", serde(rename = "InfVal") )]
2799	pub inf_val: String,
2800}
2801
2802impl AdditionalInformation1 {
2803	pub fn validate(&self) -> Result<(), ValidationError> {
2804		self.inf_tp.validate()?;
2805		if self.inf_val.chars().count() < 1 {
2806			return Err(ValidationError::new(1001, "inf_val is shorter than the minimum length of 1".to_string()));
2807		}
2808		if self.inf_val.chars().count() > 350 {
2809			return Err(ValidationError::new(1002, "inf_val exceeds the maximum length of 350".to_string()));
2810		}
2811		Ok(())
2812	}
2813}
2814
2815
2816// AdditionalInformation15 ...
2817#[cfg_attr(feature = "derive_debug", derive(Debug))]
2818#[cfg_attr(feature = "derive_default", derive(Default))]
2819#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2820#[cfg_attr(feature = "derive_clone", derive(Clone))]
2821#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2822pub struct AdditionalInformation15 {
2823	#[cfg_attr( feature = "derive_serde", serde(rename = "InfTp") )]
2824	pub inf_tp: GenericIdentification36,
2825	#[cfg_attr( feature = "derive_serde", serde(rename = "InfVal") )]
2826	pub inf_val: String,
2827}
2828
2829impl AdditionalInformation15 {
2830	pub fn validate(&self) -> Result<(), ValidationError> {
2831		self.inf_tp.validate()?;
2832		if self.inf_val.chars().count() < 1 {
2833			return Err(ValidationError::new(1001, "inf_val is shorter than the minimum length of 1".to_string()));
2834		}
2835		if self.inf_val.chars().count() > 350 {
2836			return Err(ValidationError::new(1002, "inf_val exceeds the maximum length of 350".to_string()));
2837		}
2838		Ok(())
2839	}
2840}
2841
2842
2843// AdditionalInformation5 ...
2844#[cfg_attr(feature = "derive_debug", derive(Debug))]
2845#[cfg_attr(feature = "derive_default", derive(Default))]
2846#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2847#[cfg_attr(feature = "derive_clone", derive(Clone))]
2848#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2849pub struct AdditionalInformation5 {
2850	#[cfg_attr( feature = "derive_serde", serde(rename = "Inf") )]
2851	pub inf: Vec<String>,
2852}
2853
2854impl AdditionalInformation5 {
2855	pub fn validate(&self) -> Result<(), ValidationError> {
2856		for item in &self.inf {
2857			if item.chars().count() < 1 {
2858				return Err(ValidationError::new(1001, "inf is shorter than the minimum length of 1".to_string()));
2859			}
2860			if item.chars().count() > 256 {
2861				return Err(ValidationError::new(1002, "inf exceeds the maximum length of 256".to_string()));
2862			}
2863		}
2864		Ok(())
2865	}
2866}
2867
2868
2869// AdditionalParameters1 ...
2870#[cfg_attr(feature = "derive_debug", derive(Debug))]
2871#[cfg_attr(feature = "derive_default", derive(Default))]
2872#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2873#[cfg_attr(feature = "derive_clone", derive(Clone))]
2874#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2875pub struct AdditionalParameters1 {
2876	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
2877	pub ctry: Option<String>,
2878	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
2879	pub ccy: Option<String>,
2880	#[cfg_attr( feature = "derive_serde", serde(rename = "GeoArea", skip_serializing_if = "Option::is_none") )]
2881	pub geo_area: Option<String>,
2882}
2883
2884impl AdditionalParameters1 {
2885	pub fn validate(&self) -> Result<(), ValidationError> {
2886		if let Some(ref val) = self.ctry {
2887			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
2888			if !pattern.is_match(val) {
2889				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
2890			}
2891		}
2892		if let Some(ref val) = self.ccy {
2893			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
2894			if !pattern.is_match(val) {
2895				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
2896			}
2897		}
2898		if let Some(ref val) = self.geo_area {
2899			if val.chars().count() < 1 {
2900				return Err(ValidationError::new(1001, "geo_area is shorter than the minimum length of 1".to_string()));
2901			}
2902			if val.chars().count() > 35 {
2903				return Err(ValidationError::new(1002, "geo_area exceeds the maximum length of 35".to_string()));
2904			}
2905		}
2906		Ok(())
2907	}
2908}
2909
2910
2911// AdditionalParameters16 ...
2912#[cfg_attr(feature = "derive_debug", derive(Debug))]
2913#[cfg_attr(feature = "derive_default", derive(Default))]
2914#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
2915#[cfg_attr(feature = "derive_clone", derive(Clone))]
2916#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
2917pub struct AdditionalParameters16 {
2918	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtlSttlm", skip_serializing_if = "Option::is_none") )]
2919	pub prtl_sttlm: Option<PartialSettlement2Code>,
2920	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsPrtlConfId", skip_serializing_if = "Option::is_none") )]
2921	pub prvs_prtl_conf_id: Option<String>,
2922	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnrTxId", skip_serializing_if = "Option::is_none") )]
2923	pub acct_ownr_tx_id: Option<String>,
2924	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrTxId", skip_serializing_if = "Option::is_none") )]
2925	pub acct_svcr_tx_id: Option<String>,
2926	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolId", skip_serializing_if = "Option::is_none") )]
2927	pub pool_id: Option<String>,
2928	#[cfg_attr( feature = "derive_serde", serde(rename = "CorpActnEvtId", skip_serializing_if = "Option::is_none") )]
2929	pub corp_actn_evt_id: Option<String>,
2930	#[cfg_attr( feature = "derive_serde", serde(rename = "MktInfrstrctrTxId", skip_serializing_if = "Option::is_none") )]
2931	pub mkt_infrstrctr_tx_id: Option<String>,
2932	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcrTxId", skip_serializing_if = "Option::is_none") )]
2933	pub prcr_tx_id: Option<String>,
2934}
2935
2936impl AdditionalParameters16 {
2937	pub fn validate(&self) -> Result<(), ValidationError> {
2938		if let Some(ref val) = self.prtl_sttlm { val.validate()? }
2939		if let Some(ref val) = self.prvs_prtl_conf_id {
2940			if val.chars().count() < 1 {
2941				return Err(ValidationError::new(1001, "prvs_prtl_conf_id is shorter than the minimum length of 1".to_string()));
2942			}
2943			if val.chars().count() > 35 {
2944				return Err(ValidationError::new(1002, "prvs_prtl_conf_id exceeds the maximum length of 35".to_string()));
2945			}
2946		}
2947		if let Some(ref val) = self.acct_ownr_tx_id {
2948			if val.chars().count() < 1 {
2949				return Err(ValidationError::new(1001, "acct_ownr_tx_id is shorter than the minimum length of 1".to_string()));
2950			}
2951			if val.chars().count() > 35 {
2952				return Err(ValidationError::new(1002, "acct_ownr_tx_id exceeds the maximum length of 35".to_string()));
2953			}
2954		}
2955		if let Some(ref val) = self.acct_svcr_tx_id {
2956			if val.chars().count() < 1 {
2957				return Err(ValidationError::new(1001, "acct_svcr_tx_id is shorter than the minimum length of 1".to_string()));
2958			}
2959			if val.chars().count() > 35 {
2960				return Err(ValidationError::new(1002, "acct_svcr_tx_id exceeds the maximum length of 35".to_string()));
2961			}
2962		}
2963		if let Some(ref val) = self.pool_id {
2964			if val.chars().count() < 1 {
2965				return Err(ValidationError::new(1001, "pool_id is shorter than the minimum length of 1".to_string()));
2966			}
2967			if val.chars().count() > 35 {
2968				return Err(ValidationError::new(1002, "pool_id exceeds the maximum length of 35".to_string()));
2969			}
2970		}
2971		if let Some(ref val) = self.corp_actn_evt_id {
2972			if val.chars().count() < 1 {
2973				return Err(ValidationError::new(1001, "corp_actn_evt_id is shorter than the minimum length of 1".to_string()));
2974			}
2975			if val.chars().count() > 35 {
2976				return Err(ValidationError::new(1002, "corp_actn_evt_id exceeds the maximum length of 35".to_string()));
2977			}
2978		}
2979		if let Some(ref val) = self.mkt_infrstrctr_tx_id {
2980			if val.chars().count() < 1 {
2981				return Err(ValidationError::new(1001, "mkt_infrstrctr_tx_id is shorter than the minimum length of 1".to_string()));
2982			}
2983			if val.chars().count() > 35 {
2984				return Err(ValidationError::new(1002, "mkt_infrstrctr_tx_id exceeds the maximum length of 35".to_string()));
2985			}
2986		}
2987		if let Some(ref val) = self.prcr_tx_id {
2988			if val.chars().count() < 1 {
2989				return Err(ValidationError::new(1001, "prcr_tx_id is shorter than the minimum length of 1".to_string()));
2990			}
2991			if val.chars().count() > 35 {
2992				return Err(ValidationError::new(1002, "prcr_tx_id exceeds the maximum length of 35".to_string()));
2993			}
2994		}
2995		Ok(())
2996	}
2997}
2998
2999
3000// AdditionalProductInformation3 ...
3001#[cfg_attr(feature = "derive_debug", derive(Debug))]
3002#[cfg_attr(feature = "derive_default", derive(Default))]
3003#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3004#[cfg_attr(feature = "derive_clone", derive(Clone))]
3005#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3006pub struct AdditionalProductInformation3 {
3007	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmTxCostsExAnteUK", skip_serializing_if = "Option::is_none") )]
3008	pub fin_instrm_tx_costs_ex_ante_uk: Option<f64>,
3009	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmTxCostsExPstUK", skip_serializing_if = "Option::is_none") )]
3010	pub fin_instrm_tx_costs_ex_pst_uk: Option<f64>,
3011}
3012
3013impl AdditionalProductInformation3 {
3014	pub fn validate(&self) -> Result<(), ValidationError> {
3015		Ok(())
3016	}
3017}
3018
3019
3020// AdditionalReference10 ...
3021#[cfg_attr(feature = "derive_debug", derive(Debug))]
3022#[cfg_attr(feature = "derive_default", derive(Default))]
3023#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3024#[cfg_attr(feature = "derive_clone", derive(Clone))]
3025#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3026pub struct AdditionalReference10 {
3027	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref") )]
3028	pub ref_attr: String,
3029	#[cfg_attr( feature = "derive_serde", serde(rename = "RefIssr", skip_serializing_if = "Option::is_none") )]
3030	pub ref_issr: Option<PartyIdentification139>,
3031	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNm", skip_serializing_if = "Option::is_none") )]
3032	pub msg_nm: Option<String>,
3033}
3034
3035impl AdditionalReference10 {
3036	pub fn validate(&self) -> Result<(), ValidationError> {
3037		if self.ref_attr.chars().count() < 1 {
3038			return Err(ValidationError::new(1001, "ref_attr is shorter than the minimum length of 1".to_string()));
3039		}
3040		if self.ref_attr.chars().count() > 35 {
3041			return Err(ValidationError::new(1002, "ref_attr exceeds the maximum length of 35".to_string()));
3042		}
3043		if let Some(ref val) = self.ref_issr { val.validate()? }
3044		if let Some(ref val) = self.msg_nm {
3045			if val.chars().count() < 1 {
3046				return Err(ValidationError::new(1001, "msg_nm is shorter than the minimum length of 1".to_string()));
3047			}
3048			if val.chars().count() > 35 {
3049				return Err(ValidationError::new(1002, "msg_nm exceeds the maximum length of 35".to_string()));
3050			}
3051		}
3052		Ok(())
3053	}
3054}
3055
3056
3057// AdditionalReference13 ...
3058#[cfg_attr(feature = "derive_debug", derive(Debug))]
3059#[cfg_attr(feature = "derive_default", derive(Default))]
3060#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3061#[cfg_attr(feature = "derive_clone", derive(Clone))]
3062#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3063pub struct AdditionalReference13 {
3064	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref") )]
3065	pub ref_attr: String,
3066	#[cfg_attr( feature = "derive_serde", serde(rename = "RefIssr", skip_serializing_if = "Option::is_none") )]
3067	pub ref_issr: Option<PartyIdentification125Choice>,
3068	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNm", skip_serializing_if = "Option::is_none") )]
3069	pub msg_nm: Option<String>,
3070}
3071
3072impl AdditionalReference13 {
3073	pub fn validate(&self) -> Result<(), ValidationError> {
3074		if self.ref_attr.chars().count() < 1 {
3075			return Err(ValidationError::new(1001, "ref_attr is shorter than the minimum length of 1".to_string()));
3076		}
3077		if self.ref_attr.chars().count() > 35 {
3078			return Err(ValidationError::new(1002, "ref_attr exceeds the maximum length of 35".to_string()));
3079		}
3080		if let Some(ref val) = self.ref_issr { val.validate()? }
3081		if let Some(ref val) = self.msg_nm {
3082			if val.chars().count() < 1 {
3083				return Err(ValidationError::new(1001, "msg_nm is shorter than the minimum length of 1".to_string()));
3084			}
3085			if val.chars().count() > 35 {
3086				return Err(ValidationError::new(1002, "msg_nm exceeds the maximum length of 35".to_string()));
3087			}
3088		}
3089		Ok(())
3090	}
3091}
3092
3093
3094// AdditionalReference3 ...
3095#[cfg_attr(feature = "derive_debug", derive(Debug))]
3096#[cfg_attr(feature = "derive_default", derive(Default))]
3097#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3098#[cfg_attr(feature = "derive_clone", derive(Clone))]
3099#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3100pub struct AdditionalReference3 {
3101	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref") )]
3102	pub ref_attr: String,
3103	#[cfg_attr( feature = "derive_serde", serde(rename = "RefIssr", skip_serializing_if = "Option::is_none") )]
3104	pub ref_issr: Option<PartyIdentification2Choice>,
3105	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNm", skip_serializing_if = "Option::is_none") )]
3106	pub msg_nm: Option<String>,
3107}
3108
3109impl AdditionalReference3 {
3110	pub fn validate(&self) -> Result<(), ValidationError> {
3111		if self.ref_attr.chars().count() < 1 {
3112			return Err(ValidationError::new(1001, "ref_attr is shorter than the minimum length of 1".to_string()));
3113		}
3114		if self.ref_attr.chars().count() > 35 {
3115			return Err(ValidationError::new(1002, "ref_attr exceeds the maximum length of 35".to_string()));
3116		}
3117		if let Some(ref val) = self.ref_issr { val.validate()? }
3118		if let Some(ref val) = self.msg_nm {
3119			if val.chars().count() < 1 {
3120				return Err(ValidationError::new(1001, "msg_nm is shorter than the minimum length of 1".to_string()));
3121			}
3122			if val.chars().count() > 35 {
3123				return Err(ValidationError::new(1002, "msg_nm exceeds the maximum length of 35".to_string()));
3124			}
3125		}
3126		Ok(())
3127	}
3128}
3129
3130
3131// AdditionalRequestData1Choice ...
3132#[cfg_attr(feature = "derive_debug", derive(Debug))]
3133#[cfg_attr(feature = "derive_default", derive(Default))]
3134#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3135#[cfg_attr(feature = "derive_clone", derive(Clone))]
3136#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3137pub struct AdditionalRequestData1Choice {
3138	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdDbtAuthstn", skip_serializing_if = "Option::is_none") )]
3139	pub reqd_dbt_authstn: Option<DebitAuthorisation3>,
3140	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdCompstn", skip_serializing_if = "Option::is_none") )]
3141	pub reqd_compstn: Option<CompensationRequest1>,
3142	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdValtn", skip_serializing_if = "Option::is_none") )]
3143	pub reqd_valtn: Option<AdjustmentRequest1>,
3144	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqNrrtv", skip_serializing_if = "Option::is_none") )]
3145	pub req_nrrtv: Option<String>,
3146}
3147
3148impl AdditionalRequestData1Choice {
3149	pub fn validate(&self) -> Result<(), ValidationError> {
3150		if let Some(ref val) = self.reqd_dbt_authstn { val.validate()? }
3151		if let Some(ref val) = self.reqd_compstn { val.validate()? }
3152		if let Some(ref val) = self.reqd_valtn { val.validate()? }
3153		if let Some(ref val) = self.req_nrrtv {
3154			if val.chars().count() < 1 {
3155				return Err(ValidationError::new(1001, "req_nrrtv is shorter than the minimum length of 1".to_string()));
3156			}
3157			if val.chars().count() > 500 {
3158				return Err(ValidationError::new(1002, "req_nrrtv exceeds the maximum length of 500".to_string()));
3159			}
3160		}
3161		Ok(())
3162	}
3163}
3164
3165
3166// AdditiononalInformation13 ...
3167#[cfg_attr(feature = "derive_debug", derive(Debug))]
3168#[cfg_attr(feature = "derive_default", derive(Default))]
3169#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3170#[cfg_attr(feature = "derive_clone", derive(Clone))]
3171#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3172pub struct AdditiononalInformation13 {
3173	#[cfg_attr( feature = "derive_serde", serde(rename = "Lmttn", skip_serializing_if = "Option::is_none") )]
3174	pub lmttn: Option<String>,
3175	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
3176	pub addtl_inf: Option<String>,
3177	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctVldtn", skip_serializing_if = "Option::is_none") )]
3178	pub acct_vldtn: Option<String>,
3179	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
3180	pub tp: Option<String>,
3181	#[cfg_attr( feature = "derive_serde", serde(rename = "Rgltr", skip_serializing_if = "Option::is_none") )]
3182	pub rgltr: Option<PartyIdentification125Choice>,
3183	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
3184	pub sts: Option<RestrictionStatus1Choice>,
3185	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd", skip_serializing_if = "Option::is_none") )]
3186	pub prd: Option<DateTimePeriod2>,
3187}
3188
3189impl AdditiononalInformation13 {
3190	pub fn validate(&self) -> Result<(), ValidationError> {
3191		if let Some(ref val) = self.lmttn {
3192			if val.chars().count() < 1 {
3193				return Err(ValidationError::new(1001, "lmttn is shorter than the minimum length of 1".to_string()));
3194			}
3195			if val.chars().count() > 350 {
3196				return Err(ValidationError::new(1002, "lmttn exceeds the maximum length of 350".to_string()));
3197			}
3198		}
3199		if let Some(ref val) = self.addtl_inf {
3200			if val.chars().count() < 1 {
3201				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
3202			}
3203			if val.chars().count() > 350 {
3204				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 350".to_string()));
3205			}
3206		}
3207		if let Some(ref val) = self.acct_vldtn {
3208			if val.chars().count() < 1 {
3209				return Err(ValidationError::new(1001, "acct_vldtn is shorter than the minimum length of 1".to_string()));
3210			}
3211			if val.chars().count() > 350 {
3212				return Err(ValidationError::new(1002, "acct_vldtn exceeds the maximum length of 350".to_string()));
3213			}
3214		}
3215		if let Some(ref val) = self.tp {
3216			if val.chars().count() < 1 {
3217				return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
3218			}
3219			if val.chars().count() > 35 {
3220				return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
3221			}
3222		}
3223		if let Some(ref val) = self.rgltr { val.validate()? }
3224		if let Some(ref val) = self.sts { val.validate()? }
3225		if let Some(ref val) = self.prd { val.validate()? }
3226		Ok(())
3227	}
3228}
3229
3230
3231// AddressModification3 ...
3232#[cfg_attr(feature = "derive_debug", derive(Debug))]
3233#[cfg_attr(feature = "derive_default", derive(Default))]
3234#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3235#[cfg_attr(feature = "derive_clone", derive(Clone))]
3236#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3237pub struct AddressModification3 {
3238	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
3239	pub mod_cd: Option<Modification1Code>,
3240	#[cfg_attr( feature = "derive_serde", serde(rename = "Adr") )]
3241	pub adr: PostalAddress27,
3242}
3243
3244impl AddressModification3 {
3245	pub fn validate(&self) -> Result<(), ValidationError> {
3246		if let Some(ref val) = self.mod_cd { val.validate()? }
3247		self.adr.validate()?;
3248		Ok(())
3249	}
3250}
3251
3252
3253// AddressType1Choice ...
3254#[cfg_attr(feature = "derive_debug", derive(Debug))]
3255#[cfg_attr(feature = "derive_default", derive(Default))]
3256#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3257#[cfg_attr(feature = "derive_clone", derive(Clone))]
3258#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3259pub struct AddressType1Choice {
3260	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
3261	pub cd: Option<AddressType1Code>,
3262	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
3263	pub prtry: Option<GenericIdentification47>,
3264}
3265
3266impl AddressType1Choice {
3267	pub fn validate(&self) -> Result<(), ValidationError> {
3268		if let Some(ref val) = self.cd { val.validate()? }
3269		if let Some(ref val) = self.prtry { val.validate()? }
3270		Ok(())
3271	}
3272}
3273
3274
3275// AddressType1Code ...
3276#[cfg_attr(feature = "derive_debug", derive(Debug))]
3277#[cfg_attr(feature = "derive_default", derive(Default))]
3278#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3279#[cfg_attr(feature = "derive_clone", derive(Clone))]
3280#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3281pub enum AddressType1Code {
3282	#[cfg_attr(feature = "derive_default", default)]
3283	#[cfg_attr( feature = "derive_serde", serde(rename = "HOME") )]
3284	CodeHOME,
3285	#[cfg_attr( feature = "derive_serde", serde(rename = "BIZZ") )]
3286	CodeBIZZ,
3287}
3288
3289impl AddressType1Code {
3290	pub fn validate(&self) -> Result<(), ValidationError> {
3291		Ok(())
3292	}
3293}
3294
3295
3296// AddressType2Choice ...
3297#[cfg_attr(feature = "derive_debug", derive(Debug))]
3298#[cfg_attr(feature = "derive_default", derive(Default))]
3299#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3300#[cfg_attr(feature = "derive_clone", derive(Clone))]
3301#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3302pub struct AddressType2Choice {
3303	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
3304	pub cd: Option<AddressType2Code>,
3305	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
3306	pub prtry: Option<GenericIdentification47>,
3307}
3308
3309impl AddressType2Choice {
3310	pub fn validate(&self) -> Result<(), ValidationError> {
3311		if let Some(ref val) = self.cd { val.validate()? }
3312		if let Some(ref val) = self.prtry { val.validate()? }
3313		Ok(())
3314	}
3315}
3316
3317
3318// AddressType2Code ...
3319#[cfg_attr(feature = "derive_debug", derive(Debug))]
3320#[cfg_attr(feature = "derive_default", derive(Default))]
3321#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3322#[cfg_attr(feature = "derive_clone", derive(Clone))]
3323#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3324pub enum AddressType2Code {
3325	#[cfg_attr(feature = "derive_default", default)]
3326	#[cfg_attr( feature = "derive_serde", serde(rename = "ADDR") )]
3327	CodeADDR,
3328	#[cfg_attr( feature = "derive_serde", serde(rename = "PBOX") )]
3329	CodePBOX,
3330	#[cfg_attr( feature = "derive_serde", serde(rename = "HOME") )]
3331	CodeHOME,
3332	#[cfg_attr( feature = "derive_serde", serde(rename = "BIZZ") )]
3333	CodeBIZZ,
3334	#[cfg_attr( feature = "derive_serde", serde(rename = "MLTO") )]
3335	CodeMLTO,
3336	#[cfg_attr( feature = "derive_serde", serde(rename = "DLVY") )]
3337	CodeDLVY,
3338}
3339
3340impl AddressType2Code {
3341	pub fn validate(&self) -> Result<(), ValidationError> {
3342		Ok(())
3343	}
3344}
3345
3346
3347// AddressType3Choice ...
3348#[cfg_attr(feature = "derive_debug", derive(Debug))]
3349#[cfg_attr(feature = "derive_default", derive(Default))]
3350#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3351#[cfg_attr(feature = "derive_clone", derive(Clone))]
3352#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3353pub struct AddressType3Choice {
3354	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
3355	pub cd: Option<AddressType2Code>,
3356	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
3357	pub prtry: Option<GenericIdentification30>,
3358}
3359
3360impl AddressType3Choice {
3361	pub fn validate(&self) -> Result<(), ValidationError> {
3362		if let Some(ref val) = self.cd { val.validate()? }
3363		if let Some(ref val) = self.prtry { val.validate()? }
3364		Ok(())
3365	}
3366}
3367
3368
3369// AdjustmentCompensation1 ...
3370#[cfg_attr(feature = "derive_debug", derive(Debug))]
3371#[cfg_attr(feature = "derive_default", derive(Default))]
3372#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3373#[cfg_attr(feature = "derive_clone", derive(Clone))]
3374#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3375pub struct AdjustmentCompensation1 {
3376	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlAmt", skip_serializing_if = "Option::is_none") )]
3377	pub initl_amt: Option<ActiveCurrencyAndAmount>,
3378	#[cfg_attr( feature = "derive_serde", serde(rename = "DueChrgs", skip_serializing_if = "Option::is_none") )]
3379	pub due_chrgs: Option<ActiveCurrencyAndAmount>,
3380	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtDue") )]
3381	pub amt_due: ActiveCurrencyAndAmount,
3382	#[cfg_attr( feature = "derive_serde", serde(rename = "CompstnAgt", skip_serializing_if = "Option::is_none") )]
3383	pub compstn_agt: Option<BranchAndFinancialInstitutionIdentification6>,
3384	#[cfg_attr( feature = "derive_serde", serde(rename = "CompstnAcct", skip_serializing_if = "Option::is_none") )]
3385	pub compstn_acct: Option<CashAccount40>,
3386	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd", skip_serializing_if = "Option::is_none") )]
3387	pub prd: Option<DatePeriod5>,
3388	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRate", skip_serializing_if = "Option::is_none") )]
3389	pub intrst_rate: Option<f64>,
3390	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
3391	pub rsn: Option<String>,
3392}
3393
3394impl AdjustmentCompensation1 {
3395	pub fn validate(&self) -> Result<(), ValidationError> {
3396		if let Some(ref val) = self.initl_amt { val.validate()? }
3397		if let Some(ref val) = self.due_chrgs { val.validate()? }
3398		self.amt_due.validate()?;
3399		if let Some(ref val) = self.compstn_agt { val.validate()? }
3400		if let Some(ref val) = self.compstn_acct { val.validate()? }
3401		if let Some(ref val) = self.prd { val.validate()? }
3402		if let Some(ref val) = self.rsn {
3403			if val.chars().count() < 1 {
3404				return Err(ValidationError::new(1001, "rsn is shorter than the minimum length of 1".to_string()));
3405			}
3406			if val.chars().count() > 140 {
3407				return Err(ValidationError::new(1002, "rsn exceeds the maximum length of 140".to_string()));
3408			}
3409		}
3410		Ok(())
3411	}
3412}
3413
3414
3415// AdjustmentRequest1 ...
3416#[cfg_attr(feature = "derive_debug", derive(Debug))]
3417#[cfg_attr(feature = "derive_default", derive(Default))]
3418#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3419#[cfg_attr(feature = "derive_clone", derive(Clone))]
3420#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3421pub struct AdjustmentRequest1 {
3422	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd", skip_serializing_if = "Option::is_none") )]
3423	pub prd: Option<DatePeriod5>,
3424}
3425
3426impl AdjustmentRequest1 {
3427	pub fn validate(&self) -> Result<(), ValidationError> {
3428		if let Some(ref val) = self.prd { val.validate()? }
3429		Ok(())
3430	}
3431}
3432
3433
3434// AdviceType1 ...
3435#[cfg_attr(feature = "derive_debug", derive(Debug))]
3436#[cfg_attr(feature = "derive_default", derive(Default))]
3437#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3438#[cfg_attr(feature = "derive_clone", derive(Clone))]
3439#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3440pub struct AdviceType1 {
3441	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtAdvc", skip_serializing_if = "Option::is_none") )]
3442	pub cdt_advc: Option<AdviceType1Choice>,
3443	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtAdvc", skip_serializing_if = "Option::is_none") )]
3444	pub dbt_advc: Option<AdviceType1Choice>,
3445}
3446
3447impl AdviceType1 {
3448	pub fn validate(&self) -> Result<(), ValidationError> {
3449		if let Some(ref val) = self.cdt_advc { val.validate()? }
3450		if let Some(ref val) = self.dbt_advc { val.validate()? }
3451		Ok(())
3452	}
3453}
3454
3455
3456// AdviceType1Choice ...
3457#[cfg_attr(feature = "derive_debug", derive(Debug))]
3458#[cfg_attr(feature = "derive_default", derive(Default))]
3459#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3460#[cfg_attr(feature = "derive_clone", derive(Clone))]
3461#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3462pub struct AdviceType1Choice {
3463	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
3464	pub cd: Option<AdviceType1Code>,
3465	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
3466	pub prtry: Option<String>,
3467}
3468
3469impl AdviceType1Choice {
3470	pub fn validate(&self) -> Result<(), ValidationError> {
3471		if let Some(ref val) = self.cd { val.validate()? }
3472		if let Some(ref val) = self.prtry {
3473			if val.chars().count() < 1 {
3474				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
3475			}
3476			if val.chars().count() > 35 {
3477				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
3478			}
3479		}
3480		Ok(())
3481	}
3482}
3483
3484
3485// AdviceType1Code ...
3486#[cfg_attr(feature = "derive_debug", derive(Debug))]
3487#[cfg_attr(feature = "derive_default", derive(Default))]
3488#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3489#[cfg_attr(feature = "derive_clone", derive(Clone))]
3490#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3491pub enum AdviceType1Code {
3492	#[cfg_attr(feature = "derive_default", default)]
3493	#[cfg_attr( feature = "derive_serde", serde(rename = "ADWD") )]
3494	CodeADWD,
3495	#[cfg_attr( feature = "derive_serde", serde(rename = "ADND") )]
3496	CodeADND,
3497}
3498
3499impl AdviceType1Code {
3500	pub fn validate(&self) -> Result<(), ValidationError> {
3501		Ok(())
3502	}
3503}
3504
3505
3506// AgreedRate2 ...
3507#[cfg_attr(feature = "derive_debug", derive(Debug))]
3508#[cfg_attr(feature = "derive_default", derive(Default))]
3509#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3510#[cfg_attr(feature = "derive_clone", derive(Clone))]
3511#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3512pub struct AgreedRate2 {
3513	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate") )]
3514	pub xchg_rate: f64,
3515	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitCcy") )]
3516	pub unit_ccy: String,
3517	#[cfg_attr( feature = "derive_serde", serde(rename = "QtdCcy") )]
3518	pub qtd_ccy: String,
3519}
3520
3521impl AgreedRate2 {
3522	pub fn validate(&self) -> Result<(), ValidationError> {
3523		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
3524		if !pattern.is_match(&self.unit_ccy) {
3525			return Err(ValidationError::new(1005, "unit_ccy does not match the required pattern".to_string()));
3526		}
3527		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
3528		if !pattern.is_match(&self.qtd_ccy) {
3529			return Err(ValidationError::new(1005, "qtd_ccy does not match the required pattern".to_string()));
3530		}
3531		Ok(())
3532	}
3533}
3534
3535
3536// AgreementType1Choice ...
3537#[cfg_attr(feature = "derive_debug", derive(Debug))]
3538#[cfg_attr(feature = "derive_default", derive(Default))]
3539#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3540#[cfg_attr(feature = "derive_clone", derive(Clone))]
3541#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3542pub struct AgreementType1Choice {
3543	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
3544	pub tp: Option<String>,
3545	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
3546	pub prtry: Option<String>,
3547}
3548
3549impl AgreementType1Choice {
3550	pub fn validate(&self) -> Result<(), ValidationError> {
3551		if let Some(ref val) = self.tp {
3552			if val.chars().count() < 1 {
3553				return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
3554			}
3555			if val.chars().count() > 4 {
3556				return Err(ValidationError::new(1002, "tp exceeds the maximum length of 4".to_string()));
3557			}
3558		}
3559		if let Some(ref val) = self.prtry {
3560			if val.chars().count() < 1 {
3561				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
3562			}
3563			if val.chars().count() > 35 {
3564				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
3565			}
3566		}
3567		Ok(())
3568	}
3569}
3570
3571
3572// AgreementType2Choice ...
3573#[cfg_attr(feature = "derive_debug", derive(Debug))]
3574#[cfg_attr(feature = "derive_default", derive(Default))]
3575#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3576#[cfg_attr(feature = "derive_clone", derive(Clone))]
3577#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3578pub struct AgreementType2Choice {
3579	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
3580	pub tp: Option<String>,
3581	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
3582	pub prtry: Option<String>,
3583}
3584
3585impl AgreementType2Choice {
3586	pub fn validate(&self) -> Result<(), ValidationError> {
3587		if let Some(ref val) = self.tp {
3588			if val.chars().count() < 1 {
3589				return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
3590			}
3591			if val.chars().count() > 4 {
3592				return Err(ValidationError::new(1002, "tp exceeds the maximum length of 4".to_string()));
3593			}
3594		}
3595		if let Some(ref val) = self.prtry {
3596			if val.chars().count() < 1 {
3597				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
3598			}
3599			if val.chars().count() > 50 {
3600				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 50".to_string()));
3601			}
3602		}
3603		Ok(())
3604	}
3605}
3606
3607
3608// AgriculturalCommodityDairy1 ...
3609#[cfg_attr(feature = "derive_debug", derive(Debug))]
3610#[cfg_attr(feature = "derive_default", derive(Default))]
3611#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3612#[cfg_attr(feature = "derive_clone", derive(Clone))]
3613#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3614pub struct AgriculturalCommodityDairy1 {
3615	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3616	pub base_pdct: AssetClassProductType1Code,
3617	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
3618	pub sub_pdct: AssetClassSubProductType20Code,
3619}
3620
3621impl AgriculturalCommodityDairy1 {
3622	pub fn validate(&self) -> Result<(), ValidationError> {
3623		self.base_pdct.validate()?;
3624		self.sub_pdct.validate()?;
3625		Ok(())
3626	}
3627}
3628
3629
3630// AgriculturalCommodityDairy2 ...
3631#[cfg_attr(feature = "derive_debug", derive(Debug))]
3632#[cfg_attr(feature = "derive_default", derive(Default))]
3633#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3634#[cfg_attr(feature = "derive_clone", derive(Clone))]
3635#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3636pub struct AgriculturalCommodityDairy2 {
3637	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3638	pub base_pdct: AssetClassProductType1Code,
3639	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
3640	pub sub_pdct: Option<AssetClassSubProductType20Code>,
3641}
3642
3643impl AgriculturalCommodityDairy2 {
3644	pub fn validate(&self) -> Result<(), ValidationError> {
3645		self.base_pdct.validate()?;
3646		if let Some(ref val) = self.sub_pdct { val.validate()? }
3647		Ok(())
3648	}
3649}
3650
3651
3652// AgriculturalCommodityForestry1 ...
3653#[cfg_attr(feature = "derive_debug", derive(Debug))]
3654#[cfg_attr(feature = "derive_default", derive(Default))]
3655#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3656#[cfg_attr(feature = "derive_clone", derive(Clone))]
3657#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3658pub struct AgriculturalCommodityForestry1 {
3659	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3660	pub base_pdct: AssetClassProductType1Code,
3661	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
3662	pub sub_pdct: AssetClassSubProductType21Code,
3663}
3664
3665impl AgriculturalCommodityForestry1 {
3666	pub fn validate(&self) -> Result<(), ValidationError> {
3667		self.base_pdct.validate()?;
3668		self.sub_pdct.validate()?;
3669		Ok(())
3670	}
3671}
3672
3673
3674// AgriculturalCommodityForestry2 ...
3675#[cfg_attr(feature = "derive_debug", derive(Debug))]
3676#[cfg_attr(feature = "derive_default", derive(Default))]
3677#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3678#[cfg_attr(feature = "derive_clone", derive(Clone))]
3679#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3680pub struct AgriculturalCommodityForestry2 {
3681	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3682	pub base_pdct: AssetClassProductType1Code,
3683	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
3684	pub sub_pdct: Option<AssetClassSubProductType21Code>,
3685}
3686
3687impl AgriculturalCommodityForestry2 {
3688	pub fn validate(&self) -> Result<(), ValidationError> {
3689		self.base_pdct.validate()?;
3690		if let Some(ref val) = self.sub_pdct { val.validate()? }
3691		Ok(())
3692	}
3693}
3694
3695
3696// AgriculturalCommodityGrain1 ...
3697#[cfg_attr(feature = "derive_debug", derive(Debug))]
3698#[cfg_attr(feature = "derive_default", derive(Default))]
3699#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3700#[cfg_attr(feature = "derive_clone", derive(Clone))]
3701#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3702pub struct AgriculturalCommodityGrain1 {
3703	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3704	pub base_pdct: AssetClassProductType1Code,
3705	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
3706	pub sub_pdct: AssetClassSubProductType5Code,
3707	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
3708	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType15Code>,
3709}
3710
3711impl AgriculturalCommodityGrain1 {
3712	pub fn validate(&self) -> Result<(), ValidationError> {
3713		self.base_pdct.validate()?;
3714		self.sub_pdct.validate()?;
3715		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
3716		Ok(())
3717	}
3718}
3719
3720
3721// AgriculturalCommodityGrain2 ...
3722#[cfg_attr(feature = "derive_debug", derive(Debug))]
3723#[cfg_attr(feature = "derive_default", derive(Default))]
3724#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3725#[cfg_attr(feature = "derive_clone", derive(Clone))]
3726#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3727pub struct AgriculturalCommodityGrain2 {
3728	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3729	pub base_pdct: AssetClassProductType1Code,
3730	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
3731	pub sub_pdct: AssetClassSubProductType5Code,
3732	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct") )]
3733	pub addtl_sub_pdct: AssetClassDetailedSubProductType30Code,
3734}
3735
3736impl AgriculturalCommodityGrain2 {
3737	pub fn validate(&self) -> Result<(), ValidationError> {
3738		self.base_pdct.validate()?;
3739		self.sub_pdct.validate()?;
3740		self.addtl_sub_pdct.validate()?;
3741		Ok(())
3742	}
3743}
3744
3745
3746// AgriculturalCommodityGrain3 ...
3747#[cfg_attr(feature = "derive_debug", derive(Debug))]
3748#[cfg_attr(feature = "derive_default", derive(Default))]
3749#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3750#[cfg_attr(feature = "derive_clone", derive(Clone))]
3751#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3752pub struct AgriculturalCommodityGrain3 {
3753	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3754	pub base_pdct: AssetClassProductType1Code,
3755	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
3756	pub sub_pdct: Option<AssetClassSubProductType5Code>,
3757	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
3758	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType30Code>,
3759}
3760
3761impl AgriculturalCommodityGrain3 {
3762	pub fn validate(&self) -> Result<(), ValidationError> {
3763		self.base_pdct.validate()?;
3764		if let Some(ref val) = self.sub_pdct { val.validate()? }
3765		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
3766		Ok(())
3767	}
3768}
3769
3770
3771// AgriculturalCommodityLiveStock1 ...
3772#[cfg_attr(feature = "derive_debug", derive(Debug))]
3773#[cfg_attr(feature = "derive_default", derive(Default))]
3774#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3775#[cfg_attr(feature = "derive_clone", derive(Clone))]
3776#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3777pub struct AgriculturalCommodityLiveStock1 {
3778	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3779	pub base_pdct: AssetClassProductType1Code,
3780	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
3781	pub sub_pdct: AssetClassSubProductType22Code,
3782}
3783
3784impl AgriculturalCommodityLiveStock1 {
3785	pub fn validate(&self) -> Result<(), ValidationError> {
3786		self.base_pdct.validate()?;
3787		self.sub_pdct.validate()?;
3788		Ok(())
3789	}
3790}
3791
3792
3793// AgriculturalCommodityLiveStock2 ...
3794#[cfg_attr(feature = "derive_debug", derive(Debug))]
3795#[cfg_attr(feature = "derive_default", derive(Default))]
3796#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3797#[cfg_attr(feature = "derive_clone", derive(Clone))]
3798#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3799pub struct AgriculturalCommodityLiveStock2 {
3800	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3801	pub base_pdct: AssetClassProductType1Code,
3802	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
3803	pub sub_pdct: Option<AssetClassSubProductType22Code>,
3804}
3805
3806impl AgriculturalCommodityLiveStock2 {
3807	pub fn validate(&self) -> Result<(), ValidationError> {
3808		self.base_pdct.validate()?;
3809		if let Some(ref val) = self.sub_pdct { val.validate()? }
3810		Ok(())
3811	}
3812}
3813
3814
3815// AgriculturalCommodityOilSeed1 ...
3816#[cfg_attr(feature = "derive_debug", derive(Debug))]
3817#[cfg_attr(feature = "derive_default", derive(Default))]
3818#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3819#[cfg_attr(feature = "derive_clone", derive(Clone))]
3820#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3821pub struct AgriculturalCommodityOilSeed1 {
3822	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3823	pub base_pdct: AssetClassProductType1Code,
3824	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
3825	pub sub_pdct: AssetClassSubProductType1Code,
3826	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct") )]
3827	pub addtl_sub_pdct: AssetClassDetailedSubProductType1Code,
3828}
3829
3830impl AgriculturalCommodityOilSeed1 {
3831	pub fn validate(&self) -> Result<(), ValidationError> {
3832		self.base_pdct.validate()?;
3833		self.sub_pdct.validate()?;
3834		self.addtl_sub_pdct.validate()?;
3835		Ok(())
3836	}
3837}
3838
3839
3840// AgriculturalCommodityOilSeed2 ...
3841#[cfg_attr(feature = "derive_debug", derive(Debug))]
3842#[cfg_attr(feature = "derive_default", derive(Default))]
3843#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3844#[cfg_attr(feature = "derive_clone", derive(Clone))]
3845#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3846pub struct AgriculturalCommodityOilSeed2 {
3847	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3848	pub base_pdct: AssetClassProductType1Code,
3849	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
3850	pub sub_pdct: Option<AssetClassSubProductType1Code>,
3851	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
3852	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType1Code>,
3853}
3854
3855impl AgriculturalCommodityOilSeed2 {
3856	pub fn validate(&self) -> Result<(), ValidationError> {
3857		self.base_pdct.validate()?;
3858		if let Some(ref val) = self.sub_pdct { val.validate()? }
3859		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
3860		Ok(())
3861	}
3862}
3863
3864
3865// AgriculturalCommodityOliveOil1 ...
3866#[cfg_attr(feature = "derive_debug", derive(Debug))]
3867#[cfg_attr(feature = "derive_default", derive(Default))]
3868#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3869#[cfg_attr(feature = "derive_clone", derive(Clone))]
3870#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3871pub struct AgriculturalCommodityOliveOil1 {
3872	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3873	pub base_pdct: AssetClassProductType1Code,
3874	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
3875	pub sub_pdct: AssetClassSubProductType3Code,
3876	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
3877	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType4Code>,
3878}
3879
3880impl AgriculturalCommodityOliveOil1 {
3881	pub fn validate(&self) -> Result<(), ValidationError> {
3882		self.base_pdct.validate()?;
3883		self.sub_pdct.validate()?;
3884		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
3885		Ok(())
3886	}
3887}
3888
3889
3890// AgriculturalCommodityOliveOil2 ...
3891#[cfg_attr(feature = "derive_debug", derive(Debug))]
3892#[cfg_attr(feature = "derive_default", derive(Default))]
3893#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3894#[cfg_attr(feature = "derive_clone", derive(Clone))]
3895#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3896pub struct AgriculturalCommodityOliveOil2 {
3897	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3898	pub base_pdct: AssetClassProductType1Code,
3899	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
3900	pub sub_pdct: AssetClassSubProductType3Code,
3901	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct") )]
3902	pub addtl_sub_pdct: AssetClassDetailedSubProductType29Code,
3903}
3904
3905impl AgriculturalCommodityOliveOil2 {
3906	pub fn validate(&self) -> Result<(), ValidationError> {
3907		self.base_pdct.validate()?;
3908		self.sub_pdct.validate()?;
3909		self.addtl_sub_pdct.validate()?;
3910		Ok(())
3911	}
3912}
3913
3914
3915// AgriculturalCommodityOliveOil3 ...
3916#[cfg_attr(feature = "derive_debug", derive(Debug))]
3917#[cfg_attr(feature = "derive_default", derive(Default))]
3918#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3919#[cfg_attr(feature = "derive_clone", derive(Clone))]
3920#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3921pub struct AgriculturalCommodityOliveOil3 {
3922	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3923	pub base_pdct: AssetClassProductType1Code,
3924	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
3925	pub sub_pdct: Option<AssetClassSubProductType3Code>,
3926	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
3927	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType29Code>,
3928}
3929
3930impl AgriculturalCommodityOliveOil3 {
3931	pub fn validate(&self) -> Result<(), ValidationError> {
3932		self.base_pdct.validate()?;
3933		if let Some(ref val) = self.sub_pdct { val.validate()? }
3934		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
3935		Ok(())
3936	}
3937}
3938
3939
3940// AgriculturalCommodityOther1 ...
3941#[cfg_attr(feature = "derive_debug", derive(Debug))]
3942#[cfg_attr(feature = "derive_default", derive(Default))]
3943#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3944#[cfg_attr(feature = "derive_clone", derive(Clone))]
3945#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3946pub struct AgriculturalCommodityOther1 {
3947	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3948	pub base_pdct: AssetClassProductType1Code,
3949	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
3950	pub sub_pdct: AssetClassSubProductType49Code,
3951}
3952
3953impl AgriculturalCommodityOther1 {
3954	pub fn validate(&self) -> Result<(), ValidationError> {
3955		self.base_pdct.validate()?;
3956		self.sub_pdct.validate()?;
3957		Ok(())
3958	}
3959}
3960
3961
3962// AgriculturalCommodityOther2 ...
3963#[cfg_attr(feature = "derive_debug", derive(Debug))]
3964#[cfg_attr(feature = "derive_default", derive(Default))]
3965#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3966#[cfg_attr(feature = "derive_clone", derive(Clone))]
3967#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3968pub struct AgriculturalCommodityOther2 {
3969	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3970	pub base_pdct: AssetClassProductType1Code,
3971	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
3972	pub sub_pdct: Option<AssetClassSubProductType49Code>,
3973}
3974
3975impl AgriculturalCommodityOther2 {
3976	pub fn validate(&self) -> Result<(), ValidationError> {
3977		self.base_pdct.validate()?;
3978		if let Some(ref val) = self.sub_pdct { val.validate()? }
3979		Ok(())
3980	}
3981}
3982
3983
3984// AgriculturalCommodityPotato1 ...
3985#[cfg_attr(feature = "derive_debug", derive(Debug))]
3986#[cfg_attr(feature = "derive_default", derive(Default))]
3987#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
3988#[cfg_attr(feature = "derive_clone", derive(Clone))]
3989#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
3990pub struct AgriculturalCommodityPotato1 {
3991	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
3992	pub base_pdct: AssetClassProductType1Code,
3993	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
3994	pub sub_pdct: AssetClassSubProductType45Code,
3995}
3996
3997impl AgriculturalCommodityPotato1 {
3998	pub fn validate(&self) -> Result<(), ValidationError> {
3999		self.base_pdct.validate()?;
4000		self.sub_pdct.validate()?;
4001		Ok(())
4002	}
4003}
4004
4005
4006// AgriculturalCommodityPotato2 ...
4007#[cfg_attr(feature = "derive_debug", derive(Debug))]
4008#[cfg_attr(feature = "derive_default", derive(Default))]
4009#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4010#[cfg_attr(feature = "derive_clone", derive(Clone))]
4011#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4012pub struct AgriculturalCommodityPotato2 {
4013	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
4014	pub base_pdct: AssetClassProductType1Code,
4015	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
4016	pub sub_pdct: Option<AssetClassSubProductType45Code>,
4017}
4018
4019impl AgriculturalCommodityPotato2 {
4020	pub fn validate(&self) -> Result<(), ValidationError> {
4021		self.base_pdct.validate()?;
4022		if let Some(ref val) = self.sub_pdct { val.validate()? }
4023		Ok(())
4024	}
4025}
4026
4027
4028// AgriculturalCommoditySeafood1 ...
4029#[cfg_attr(feature = "derive_debug", derive(Debug))]
4030#[cfg_attr(feature = "derive_default", derive(Default))]
4031#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4032#[cfg_attr(feature = "derive_clone", derive(Clone))]
4033#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4034pub struct AgriculturalCommoditySeafood1 {
4035	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
4036	pub base_pdct: AssetClassProductType1Code,
4037	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
4038	pub sub_pdct: AssetClassSubProductType23Code,
4039}
4040
4041impl AgriculturalCommoditySeafood1 {
4042	pub fn validate(&self) -> Result<(), ValidationError> {
4043		self.base_pdct.validate()?;
4044		self.sub_pdct.validate()?;
4045		Ok(())
4046	}
4047}
4048
4049
4050// AgriculturalCommoditySeafood2 ...
4051#[cfg_attr(feature = "derive_debug", derive(Debug))]
4052#[cfg_attr(feature = "derive_default", derive(Default))]
4053#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4054#[cfg_attr(feature = "derive_clone", derive(Clone))]
4055#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4056pub struct AgriculturalCommoditySeafood2 {
4057	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
4058	pub base_pdct: AssetClassProductType1Code,
4059	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
4060	pub sub_pdct: Option<AssetClassSubProductType23Code>,
4061}
4062
4063impl AgriculturalCommoditySeafood2 {
4064	pub fn validate(&self) -> Result<(), ValidationError> {
4065		self.base_pdct.validate()?;
4066		if let Some(ref val) = self.sub_pdct { val.validate()? }
4067		Ok(())
4068	}
4069}
4070
4071
4072// AgriculturalCommoditySoft1 ...
4073#[cfg_attr(feature = "derive_debug", derive(Debug))]
4074#[cfg_attr(feature = "derive_default", derive(Default))]
4075#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4076#[cfg_attr(feature = "derive_clone", derive(Clone))]
4077#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4078pub struct AgriculturalCommoditySoft1 {
4079	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
4080	pub base_pdct: AssetClassProductType1Code,
4081	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
4082	pub sub_pdct: AssetClassSubProductType2Code,
4083	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct") )]
4084	pub addtl_sub_pdct: AssetClassDetailedSubProductType2Code,
4085}
4086
4087impl AgriculturalCommoditySoft1 {
4088	pub fn validate(&self) -> Result<(), ValidationError> {
4089		self.base_pdct.validate()?;
4090		self.sub_pdct.validate()?;
4091		self.addtl_sub_pdct.validate()?;
4092		Ok(())
4093	}
4094}
4095
4096
4097// AgriculturalCommoditySoft2 ...
4098#[cfg_attr(feature = "derive_debug", derive(Debug))]
4099#[cfg_attr(feature = "derive_default", derive(Default))]
4100#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4101#[cfg_attr(feature = "derive_clone", derive(Clone))]
4102#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4103pub struct AgriculturalCommoditySoft2 {
4104	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
4105	pub base_pdct: AssetClassProductType1Code,
4106	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
4107	pub sub_pdct: Option<AssetClassSubProductType2Code>,
4108	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
4109	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType2Code>,
4110}
4111
4112impl AgriculturalCommoditySoft2 {
4113	pub fn validate(&self) -> Result<(), ValidationError> {
4114		self.base_pdct.validate()?;
4115		if let Some(ref val) = self.sub_pdct { val.validate()? }
4116		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
4117		Ok(())
4118	}
4119}
4120
4121
4122// AllocationIndicator1Code ...
4123#[cfg_attr(feature = "derive_debug", derive(Debug))]
4124#[cfg_attr(feature = "derive_default", derive(Default))]
4125#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4126#[cfg_attr(feature = "derive_clone", derive(Clone))]
4127#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4128pub enum AllocationIndicator1Code {
4129	#[cfg_attr(feature = "derive_default", default)]
4130	#[cfg_attr( feature = "derive_serde", serde(rename = "POST") )]
4131	CodePOST,
4132	#[cfg_attr( feature = "derive_serde", serde(rename = "PREA") )]
4133	CodePREA,
4134	#[cfg_attr( feature = "derive_serde", serde(rename = "UNAL") )]
4135	CodeUNAL,
4136}
4137
4138impl AllocationIndicator1Code {
4139	pub fn validate(&self) -> Result<(), ValidationError> {
4140		Ok(())
4141	}
4142}
4143
4144
4145// AlternateSecurityIdentification1 ...
4146#[cfg_attr(feature = "derive_debug", derive(Debug))]
4147#[cfg_attr(feature = "derive_default", derive(Default))]
4148#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4149#[cfg_attr(feature = "derive_clone", derive(Clone))]
4150#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4151pub struct AlternateSecurityIdentification1 {
4152	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
4153	pub id: String,
4154	#[cfg_attr( feature = "derive_serde", serde(rename = "DmstIdSrc", skip_serializing_if = "Option::is_none") )]
4155	pub dmst_id_src: Option<String>,
4156	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryIdSrc", skip_serializing_if = "Option::is_none") )]
4157	pub prtry_id_src: Option<String>,
4158}
4159
4160impl AlternateSecurityIdentification1 {
4161	pub fn validate(&self) -> Result<(), ValidationError> {
4162		if self.id.chars().count() < 1 {
4163			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
4164		}
4165		if self.id.chars().count() > 35 {
4166			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
4167		}
4168		if let Some(ref val) = self.dmst_id_src {
4169			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
4170			if !pattern.is_match(val) {
4171				return Err(ValidationError::new(1005, "dmst_id_src does not match the required pattern".to_string()));
4172			}
4173		}
4174		if let Some(ref val) = self.prtry_id_src {
4175			if val.chars().count() < 1 {
4176				return Err(ValidationError::new(1001, "prtry_id_src is shorter than the minimum length of 1".to_string()));
4177			}
4178			if val.chars().count() > 35 {
4179				return Err(ValidationError::new(1002, "prtry_id_src exceeds the maximum length of 35".to_string()));
4180			}
4181		}
4182		Ok(())
4183	}
4184}
4185
4186
4187// AlternateSecurityIdentification7 ...
4188#[cfg_attr(feature = "derive_debug", derive(Debug))]
4189#[cfg_attr(feature = "derive_default", derive(Default))]
4190#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4191#[cfg_attr(feature = "derive_clone", derive(Clone))]
4192#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4193pub struct AlternateSecurityIdentification7 {
4194	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
4195	pub id: String,
4196	#[cfg_attr( feature = "derive_serde", serde(rename = "IdSrc") )]
4197	pub id_src: IdentificationSource1Choice,
4198}
4199
4200impl AlternateSecurityIdentification7 {
4201	pub fn validate(&self) -> Result<(), ValidationError> {
4202		if self.id.chars().count() < 1 {
4203			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
4204		}
4205		if self.id.chars().count() > 35 {
4206			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
4207		}
4208		self.id_src.validate()?;
4209		Ok(())
4210	}
4211}
4212
4213
4214// AmendmentInformationDetails14 ...
4215#[cfg_attr(feature = "derive_debug", derive(Debug))]
4216#[cfg_attr(feature = "derive_default", derive(Default))]
4217#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4218#[cfg_attr(feature = "derive_clone", derive(Clone))]
4219#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4220pub struct AmendmentInformationDetails14 {
4221	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMndtId", skip_serializing_if = "Option::is_none") )]
4222	pub orgnl_mndt_id: Option<String>,
4223	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCdtrSchmeId", skip_serializing_if = "Option::is_none") )]
4224	pub orgnl_cdtr_schme_id: Option<PartyIdentification135>,
4225	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCdtrAgt", skip_serializing_if = "Option::is_none") )]
4226	pub orgnl_cdtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
4227	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
4228	pub orgnl_cdtr_agt_acct: Option<CashAccount40>,
4229	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlDbtr", skip_serializing_if = "Option::is_none") )]
4230	pub orgnl_dbtr: Option<PartyIdentification135>,
4231	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlDbtrAcct", skip_serializing_if = "Option::is_none") )]
4232	pub orgnl_dbtr_acct: Option<CashAccount40>,
4233	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlDbtrAgt", skip_serializing_if = "Option::is_none") )]
4234	pub orgnl_dbtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
4235	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlDbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
4236	pub orgnl_dbtr_agt_acct: Option<CashAccount40>,
4237	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlFnlColltnDt", skip_serializing_if = "Option::is_none") )]
4238	pub orgnl_fnl_colltn_dt: Option<String>,
4239	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlFrqcy", skip_serializing_if = "Option::is_none") )]
4240	pub orgnl_frqcy: Option<Frequency36Choice>,
4241	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlRsn", skip_serializing_if = "Option::is_none") )]
4242	pub orgnl_rsn: Option<MandateSetupReason1Choice>,
4243	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTrckgDays", skip_serializing_if = "Option::is_none") )]
4244	pub orgnl_trckg_days: Option<String>,
4245}
4246
4247impl AmendmentInformationDetails14 {
4248	pub fn validate(&self) -> Result<(), ValidationError> {
4249		if let Some(ref val) = self.orgnl_mndt_id {
4250			if val.chars().count() < 1 {
4251				return Err(ValidationError::new(1001, "orgnl_mndt_id is shorter than the minimum length of 1".to_string()));
4252			}
4253			if val.chars().count() > 35 {
4254				return Err(ValidationError::new(1002, "orgnl_mndt_id exceeds the maximum length of 35".to_string()));
4255			}
4256		}
4257		if let Some(ref val) = self.orgnl_cdtr_schme_id { val.validate()? }
4258		if let Some(ref val) = self.orgnl_cdtr_agt { val.validate()? }
4259		if let Some(ref val) = self.orgnl_cdtr_agt_acct { val.validate()? }
4260		if let Some(ref val) = self.orgnl_dbtr { val.validate()? }
4261		if let Some(ref val) = self.orgnl_dbtr_acct { val.validate()? }
4262		if let Some(ref val) = self.orgnl_dbtr_agt { val.validate()? }
4263		if let Some(ref val) = self.orgnl_dbtr_agt_acct { val.validate()? }
4264		if let Some(ref val) = self.orgnl_frqcy { val.validate()? }
4265		if let Some(ref val) = self.orgnl_rsn { val.validate()? }
4266		if let Some(ref val) = self.orgnl_trckg_days {
4267			let pattern = Regex::new("[0-9]{2}").unwrap();
4268			if !pattern.is_match(val) {
4269				return Err(ValidationError::new(1005, "orgnl_trckg_days does not match the required pattern".to_string()));
4270			}
4271		}
4272		Ok(())
4273	}
4274}
4275
4276
4277// AmendmentInformationDetails15 ...
4278#[cfg_attr(feature = "derive_debug", derive(Debug))]
4279#[cfg_attr(feature = "derive_default", derive(Default))]
4280#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4281#[cfg_attr(feature = "derive_clone", derive(Clone))]
4282#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4283pub struct AmendmentInformationDetails15 {
4284	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMndtId", skip_serializing_if = "Option::is_none") )]
4285	pub orgnl_mndt_id: Option<String>,
4286	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCdtrSchmeId", skip_serializing_if = "Option::is_none") )]
4287	pub orgnl_cdtr_schme_id: Option<PartyIdentification272>,
4288	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCdtrAgt", skip_serializing_if = "Option::is_none") )]
4289	pub orgnl_cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
4290	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
4291	pub orgnl_cdtr_agt_acct: Option<CashAccount40>,
4292	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlDbtr", skip_serializing_if = "Option::is_none") )]
4293	pub orgnl_dbtr: Option<PartyIdentification272>,
4294	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlDbtrAcct", skip_serializing_if = "Option::is_none") )]
4295	pub orgnl_dbtr_acct: Option<CashAccount40>,
4296	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlDbtrAgt", skip_serializing_if = "Option::is_none") )]
4297	pub orgnl_dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
4298	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlDbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
4299	pub orgnl_dbtr_agt_acct: Option<CashAccount40>,
4300	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlFnlColltnDt", skip_serializing_if = "Option::is_none") )]
4301	pub orgnl_fnl_colltn_dt: Option<String>,
4302	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlFrqcy", skip_serializing_if = "Option::is_none") )]
4303	pub orgnl_frqcy: Option<Frequency36Choice>,
4304	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlRsn", skip_serializing_if = "Option::is_none") )]
4305	pub orgnl_rsn: Option<MandateSetupReason1Choice>,
4306	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTrckgDays", skip_serializing_if = "Option::is_none") )]
4307	pub orgnl_trckg_days: Option<String>,
4308}
4309
4310impl AmendmentInformationDetails15 {
4311	pub fn validate(&self) -> Result<(), ValidationError> {
4312		if let Some(ref val) = self.orgnl_mndt_id {
4313			if val.chars().count() < 1 {
4314				return Err(ValidationError::new(1001, "orgnl_mndt_id is shorter than the minimum length of 1".to_string()));
4315			}
4316			if val.chars().count() > 35 {
4317				return Err(ValidationError::new(1002, "orgnl_mndt_id exceeds the maximum length of 35".to_string()));
4318			}
4319		}
4320		if let Some(ref val) = self.orgnl_cdtr_schme_id { val.validate()? }
4321		if let Some(ref val) = self.orgnl_cdtr_agt { val.validate()? }
4322		if let Some(ref val) = self.orgnl_cdtr_agt_acct { val.validate()? }
4323		if let Some(ref val) = self.orgnl_dbtr { val.validate()? }
4324		if let Some(ref val) = self.orgnl_dbtr_acct { val.validate()? }
4325		if let Some(ref val) = self.orgnl_dbtr_agt { val.validate()? }
4326		if let Some(ref val) = self.orgnl_dbtr_agt_acct { val.validate()? }
4327		if let Some(ref val) = self.orgnl_frqcy { val.validate()? }
4328		if let Some(ref val) = self.orgnl_rsn { val.validate()? }
4329		if let Some(ref val) = self.orgnl_trckg_days {
4330			let pattern = Regex::new("[0-9]{2}").unwrap();
4331			if !pattern.is_match(val) {
4332				return Err(ValidationError::new(1005, "orgnl_trckg_days does not match the required pattern".to_string()));
4333			}
4334		}
4335		Ok(())
4336	}
4337}
4338
4339
4340// Amount2Choice ...
4341#[cfg_attr(feature = "derive_debug", derive(Debug))]
4342#[cfg_attr(feature = "derive_default", derive(Default))]
4343#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4344#[cfg_attr(feature = "derive_clone", derive(Clone))]
4345#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4346pub struct Amount2Choice {
4347	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtWthtCcy", skip_serializing_if = "Option::is_none") )]
4348	pub amt_wtht_ccy: Option<f64>,
4349	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtWthCcy", skip_serializing_if = "Option::is_none") )]
4350	pub amt_wth_ccy: Option<ActiveCurrencyAndAmount>,
4351}
4352
4353impl Amount2Choice {
4354	pub fn validate(&self) -> Result<(), ValidationError> {
4355		if let Some(ref val) = self.amt_wtht_ccy {
4356			if *val < 0.000000 {
4357				return Err(ValidationError::new(1003, "amt_wtht_ccy is less than the minimum value of 0.000000".to_string()));
4358			}
4359		}
4360		if let Some(ref val) = self.amt_wth_ccy { val.validate()? }
4361		Ok(())
4362	}
4363}
4364
4365
4366// Amount3 ...
4367#[cfg_attr(feature = "derive_debug", derive(Debug))]
4368#[cfg_attr(feature = "derive_default", derive(Default))]
4369#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4370#[cfg_attr(feature = "derive_clone", derive(Clone))]
4371#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4372pub struct Amount3 {
4373	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlAmt", skip_serializing_if = "Option::is_none") )]
4374	pub orgnl_amt: Option<ActiveCurrencyAndAmount>,
4375	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgAmt") )]
4376	pub rptg_amt: ActiveCurrencyAndAmount,
4377}
4378
4379impl Amount3 {
4380	pub fn validate(&self) -> Result<(), ValidationError> {
4381		if let Some(ref val) = self.orgnl_amt { val.validate()? }
4382		self.rptg_amt.validate()?;
4383		Ok(())
4384	}
4385}
4386
4387
4388// Amount3Choice ...
4389#[cfg_attr(feature = "derive_debug", derive(Debug))]
4390#[cfg_attr(feature = "derive_default", derive(Default))]
4391#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4392#[cfg_attr(feature = "derive_clone", derive(Clone))]
4393#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4394pub struct Amount3Choice {
4395	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtWthCcy", skip_serializing_if = "Option::is_none") )]
4396	pub amt_wth_ccy: Option<ActiveOrHistoricCurrencyAndAmount>,
4397	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtWthtCcy", skip_serializing_if = "Option::is_none") )]
4398	pub amt_wtht_ccy: Option<f64>,
4399}
4400
4401impl Amount3Choice {
4402	pub fn validate(&self) -> Result<(), ValidationError> {
4403		if let Some(ref val) = self.amt_wth_ccy { val.validate()? }
4404		if let Some(ref val) = self.amt_wtht_ccy {
4405			if *val < 0.000000 {
4406				return Err(ValidationError::new(1003, "amt_wtht_ccy is less than the minimum value of 0.000000".to_string()));
4407			}
4408		}
4409		Ok(())
4410	}
4411}
4412
4413
4414// Amount4Choice ...
4415#[cfg_attr(feature = "derive_debug", derive(Debug))]
4416#[cfg_attr(feature = "derive_default", derive(Default))]
4417#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4418#[cfg_attr(feature = "derive_clone", derive(Clone))]
4419#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4420pub struct Amount4Choice {
4421	#[cfg_attr( feature = "derive_serde", serde(rename = "IncrAmt", skip_serializing_if = "Option::is_none") )]
4422	pub incr_amt: Option<Amount2Choice>,
4423	#[cfg_attr( feature = "derive_serde", serde(rename = "DcrAmt", skip_serializing_if = "Option::is_none") )]
4424	pub dcr_amt: Option<Amount2Choice>,
4425}
4426
4427impl Amount4Choice {
4428	pub fn validate(&self) -> Result<(), ValidationError> {
4429		if let Some(ref val) = self.incr_amt { val.validate()? }
4430		if let Some(ref val) = self.dcr_amt { val.validate()? }
4431		Ok(())
4432	}
4433}
4434
4435
4436// AmountAndCurrencyExchange4 ...
4437#[cfg_attr(feature = "derive_debug", derive(Debug))]
4438#[cfg_attr(feature = "derive_default", derive(Default))]
4439#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4440#[cfg_attr(feature = "derive_clone", derive(Clone))]
4441#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4442pub struct AmountAndCurrencyExchange4 {
4443	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAmt", skip_serializing_if = "Option::is_none") )]
4444	pub instd_amt: Option<AmountAndCurrencyExchangeDetails5>,
4445	#[cfg_attr( feature = "derive_serde", serde(rename = "TxAmt", skip_serializing_if = "Option::is_none") )]
4446	pub tx_amt: Option<AmountAndCurrencyExchangeDetails5>,
4447	#[cfg_attr( feature = "derive_serde", serde(rename = "CntrValAmt", skip_serializing_if = "Option::is_none") )]
4448	pub cntr_val_amt: Option<AmountAndCurrencyExchangeDetails5>,
4449	#[cfg_attr( feature = "derive_serde", serde(rename = "AnncdPstngAmt", skip_serializing_if = "Option::is_none") )]
4450	pub anncd_pstng_amt: Option<AmountAndCurrencyExchangeDetails5>,
4451	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryAmt", skip_serializing_if = "Option::is_none") )]
4452	pub prtry_amt: Option<Vec<AmountAndCurrencyExchangeDetails6>>,
4453}
4454
4455impl AmountAndCurrencyExchange4 {
4456	pub fn validate(&self) -> Result<(), ValidationError> {
4457		if let Some(ref val) = self.instd_amt { val.validate()? }
4458		if let Some(ref val) = self.tx_amt { val.validate()? }
4459		if let Some(ref val) = self.cntr_val_amt { val.validate()? }
4460		if let Some(ref val) = self.anncd_pstng_amt { val.validate()? }
4461		if let Some(ref vec) = self.prtry_amt { for item in vec { item.validate()? } }
4462		Ok(())
4463	}
4464}
4465
4466
4467// AmountAndCurrencyExchangeDetails5 ...
4468#[cfg_attr(feature = "derive_debug", derive(Debug))]
4469#[cfg_attr(feature = "derive_default", derive(Default))]
4470#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4471#[cfg_attr(feature = "derive_clone", derive(Clone))]
4472#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4473pub struct AmountAndCurrencyExchangeDetails5 {
4474	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
4475	pub amt: ActiveOrHistoricCurrencyAndAmount,
4476	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyXchg", skip_serializing_if = "Option::is_none") )]
4477	pub ccy_xchg: Option<CurrencyExchange24>,
4478}
4479
4480impl AmountAndCurrencyExchangeDetails5 {
4481	pub fn validate(&self) -> Result<(), ValidationError> {
4482		self.amt.validate()?;
4483		if let Some(ref val) = self.ccy_xchg { val.validate()? }
4484		Ok(())
4485	}
4486}
4487
4488
4489// AmountAndCurrencyExchangeDetails6 ...
4490#[cfg_attr(feature = "derive_debug", derive(Debug))]
4491#[cfg_attr(feature = "derive_default", derive(Default))]
4492#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4493#[cfg_attr(feature = "derive_clone", derive(Clone))]
4494#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4495pub struct AmountAndCurrencyExchangeDetails6 {
4496	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
4497	pub tp: String,
4498	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
4499	pub amt: ActiveOrHistoricCurrencyAndAmount,
4500	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyXchg", skip_serializing_if = "Option::is_none") )]
4501	pub ccy_xchg: Option<CurrencyExchange24>,
4502}
4503
4504impl AmountAndCurrencyExchangeDetails6 {
4505	pub fn validate(&self) -> Result<(), ValidationError> {
4506		if self.tp.chars().count() < 1 {
4507			return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
4508		}
4509		if self.tp.chars().count() > 35 {
4510			return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
4511		}
4512		self.amt.validate()?;
4513		if let Some(ref val) = self.ccy_xchg { val.validate()? }
4514		Ok(())
4515	}
4516}
4517
4518
4519// AmountAndDirection102 ...
4520#[cfg_attr(feature = "derive_debug", derive(Debug))]
4521#[cfg_attr(feature = "derive_default", derive(Default))]
4522#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4523#[cfg_attr(feature = "derive_clone", derive(Clone))]
4524#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4525pub struct AmountAndDirection102 {
4526	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
4527	pub amt: ActiveCurrencyAndAmount,
4528	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgn") )]
4529	pub sgn: bool,
4530}
4531
4532impl AmountAndDirection102 {
4533	pub fn validate(&self) -> Result<(), ValidationError> {
4534		self.amt.validate()?;
4535		Ok(())
4536	}
4537}
4538
4539
4540// AmountAndDirection106 ...
4541#[cfg_attr(feature = "derive_debug", derive(Debug))]
4542#[cfg_attr(feature = "derive_default", derive(Default))]
4543#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4544#[cfg_attr(feature = "derive_clone", derive(Clone))]
4545#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4546pub struct AmountAndDirection106 {
4547	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
4548	pub amt: ActiveOrHistoricCurrencyAnd19DecimalAmount,
4549	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgn", skip_serializing_if = "Option::is_none") )]
4550	pub sgn: Option<bool>,
4551}
4552
4553impl AmountAndDirection106 {
4554	pub fn validate(&self) -> Result<(), ValidationError> {
4555		self.amt.validate()?;
4556		Ok(())
4557	}
4558}
4559
4560
4561// AmountAndDirection107 ...
4562#[cfg_attr(feature = "derive_debug", derive(Debug))]
4563#[cfg_attr(feature = "derive_default", derive(Default))]
4564#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4565#[cfg_attr(feature = "derive_clone", derive(Clone))]
4566#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4567pub struct AmountAndDirection107 {
4568	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
4569	pub amt: ActiveOrHistoricCurrencyAnd20DecimalAmount,
4570	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgn", skip_serializing_if = "Option::is_none") )]
4571	pub sgn: Option<bool>,
4572}
4573
4574impl AmountAndDirection107 {
4575	pub fn validate(&self) -> Result<(), ValidationError> {
4576		self.amt.validate()?;
4577		Ok(())
4578	}
4579}
4580
4581
4582// AmountAndDirection109 ...
4583#[cfg_attr(feature = "derive_debug", derive(Debug))]
4584#[cfg_attr(feature = "derive_default", derive(Default))]
4585#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4586#[cfg_attr(feature = "derive_clone", derive(Clone))]
4587#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4588pub struct AmountAndDirection109 {
4589	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
4590	pub amt: Option<ActiveOrHistoricCurrencyAnd19DecimalAmount>,
4591	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgn", skip_serializing_if = "Option::is_none") )]
4592	pub sgn: Option<bool>,
4593}
4594
4595impl AmountAndDirection109 {
4596	pub fn validate(&self) -> Result<(), ValidationError> {
4597		if let Some(ref val) = self.amt { val.validate()? }
4598		Ok(())
4599	}
4600}
4601
4602
4603// AmountAndDirection34 ...
4604#[cfg_attr(feature = "derive_debug", derive(Debug))]
4605#[cfg_attr(feature = "derive_default", derive(Default))]
4606#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4607#[cfg_attr(feature = "derive_clone", derive(Clone))]
4608#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4609pub struct AmountAndDirection34 {
4610	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
4611	pub amt: ActiveOrHistoricCurrencyAndAmount,
4612	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgn") )]
4613	pub sgn: bool,
4614}
4615
4616impl AmountAndDirection34 {
4617	pub fn validate(&self) -> Result<(), ValidationError> {
4618		self.amt.validate()?;
4619		Ok(())
4620	}
4621}
4622
4623
4624// AmountAndDirection35 ...
4625#[cfg_attr(feature = "derive_debug", derive(Debug))]
4626#[cfg_attr(feature = "derive_default", derive(Default))]
4627#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4628#[cfg_attr(feature = "derive_clone", derive(Clone))]
4629#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4630pub struct AmountAndDirection35 {
4631	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
4632	pub amt: f64,
4633	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
4634	pub cdt_dbt_ind: CreditDebitCode,
4635}
4636
4637impl AmountAndDirection35 {
4638	pub fn validate(&self) -> Result<(), ValidationError> {
4639		if self.amt < 0.000000 {
4640			return Err(ValidationError::new(1003, "amt is less than the minimum value of 0.000000".to_string()));
4641		}
4642		self.cdt_dbt_ind.validate()?;
4643		Ok(())
4644	}
4645}
4646
4647
4648// AmountAndDirection5 ...
4649#[cfg_attr(feature = "derive_debug", derive(Debug))]
4650#[cfg_attr(feature = "derive_default", derive(Default))]
4651#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4652#[cfg_attr(feature = "derive_clone", derive(Clone))]
4653#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4654pub struct AmountAndDirection5 {
4655	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
4656	pub amt: ActiveCurrencyAndAmount,
4657	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbt", skip_serializing_if = "Option::is_none") )]
4658	pub cdt_dbt: Option<CreditDebitCode>,
4659}
4660
4661impl AmountAndDirection5 {
4662	pub fn validate(&self) -> Result<(), ValidationError> {
4663		self.amt.validate()?;
4664		if let Some(ref val) = self.cdt_dbt { val.validate()? }
4665		Ok(())
4666	}
4667}
4668
4669
4670// AmountAndDirection53 ...
4671#[cfg_attr(feature = "derive_debug", derive(Debug))]
4672#[cfg_attr(feature = "derive_default", derive(Default))]
4673#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4674#[cfg_attr(feature = "derive_clone", derive(Clone))]
4675#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4676pub struct AmountAndDirection53 {
4677	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
4678	pub amt: ActiveOrHistoricCurrencyAndAmount,
4679	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgn", skip_serializing_if = "Option::is_none") )]
4680	pub sgn: Option<bool>,
4681}
4682
4683impl AmountAndDirection53 {
4684	pub fn validate(&self) -> Result<(), ValidationError> {
4685		self.amt.validate()?;
4686		Ok(())
4687	}
4688}
4689
4690
4691// AmountAndDirection61 ...
4692#[cfg_attr(feature = "derive_debug", derive(Debug))]
4693#[cfg_attr(feature = "derive_default", derive(Default))]
4694#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4695#[cfg_attr(feature = "derive_clone", derive(Clone))]
4696#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4697pub struct AmountAndDirection61 {
4698	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
4699	pub amt: ActiveCurrencyAnd13DecimalAmount,
4700	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgn", skip_serializing_if = "Option::is_none") )]
4701	pub sgn: Option<bool>,
4702}
4703
4704impl AmountAndDirection61 {
4705	pub fn validate(&self) -> Result<(), ValidationError> {
4706		self.amt.validate()?;
4707		Ok(())
4708	}
4709}
4710
4711
4712// AmountAndDirection86 ...
4713#[cfg_attr(feature = "derive_debug", derive(Debug))]
4714#[cfg_attr(feature = "derive_default", derive(Default))]
4715#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4716#[cfg_attr(feature = "derive_clone", derive(Clone))]
4717#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4718pub struct AmountAndDirection86 {
4719	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
4720	pub amt: f64,
4721	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgn") )]
4722	pub sgn: bool,
4723}
4724
4725impl AmountAndDirection86 {
4726	pub fn validate(&self) -> Result<(), ValidationError> {
4727		if self.amt < 0.000000 {
4728			return Err(ValidationError::new(1003, "amt is less than the minimum value of 0.000000".to_string()));
4729		}
4730		Ok(())
4731	}
4732}
4733
4734
4735// AmountAndQuantityBreakdown1 ...
4736#[cfg_attr(feature = "derive_debug", derive(Debug))]
4737#[cfg_attr(feature = "derive_default", derive(Default))]
4738#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4739#[cfg_attr(feature = "derive_clone", derive(Clone))]
4740#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4741pub struct AmountAndQuantityBreakdown1 {
4742	#[cfg_attr( feature = "derive_serde", serde(rename = "LotNb", skip_serializing_if = "Option::is_none") )]
4743	pub lot_nb: Option<GenericIdentification37>,
4744	#[cfg_attr( feature = "derive_serde", serde(rename = "LotAmt", skip_serializing_if = "Option::is_none") )]
4745	pub lot_amt: Option<AmountAndDirection5>,
4746	#[cfg_attr( feature = "derive_serde", serde(rename = "LotQty", skip_serializing_if = "Option::is_none") )]
4747	pub lot_qty: Option<FinancialInstrumentQuantity1Choice>,
4748	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSubBalTp", skip_serializing_if = "Option::is_none") )]
4749	pub csh_sub_bal_tp: Option<GenericIdentification30>,
4750}
4751
4752impl AmountAndQuantityBreakdown1 {
4753	pub fn validate(&self) -> Result<(), ValidationError> {
4754		if let Some(ref val) = self.lot_nb { val.validate()? }
4755		if let Some(ref val) = self.lot_amt { val.validate()? }
4756		if let Some(ref val) = self.lot_qty { val.validate()? }
4757		if let Some(ref val) = self.csh_sub_bal_tp { val.validate()? }
4758		Ok(())
4759	}
4760}
4761
4762
4763// AmountHaircutMargin1 ...
4764#[cfg_attr(feature = "derive_debug", derive(Debug))]
4765#[cfg_attr(feature = "derive_default", derive(Default))]
4766#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4767#[cfg_attr(feature = "derive_clone", derive(Clone))]
4768#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4769pub struct AmountHaircutMargin1 {
4770	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
4771	pub amt: AmountAndDirection53,
4772	#[cfg_attr( feature = "derive_serde", serde(rename = "HrcutOrMrgn", skip_serializing_if = "Option::is_none") )]
4773	pub hrcut_or_mrgn: Option<f64>,
4774}
4775
4776impl AmountHaircutMargin1 {
4777	pub fn validate(&self) -> Result<(), ValidationError> {
4778		self.amt.validate()?;
4779		Ok(())
4780	}
4781}
4782
4783
4784// AmountModification1 ...
4785#[cfg_attr(feature = "derive_debug", derive(Debug))]
4786#[cfg_attr(feature = "derive_default", derive(Default))]
4787#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4788#[cfg_attr(feature = "derive_clone", derive(Clone))]
4789#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4790pub struct AmountModification1 {
4791	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
4792	pub mod_cd: Option<Modification1Code>,
4793	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
4794	pub amt: f64,
4795}
4796
4797impl AmountModification1 {
4798	pub fn validate(&self) -> Result<(), ValidationError> {
4799		if let Some(ref val) = self.mod_cd { val.validate()? }
4800		if self.amt < 0.000000 {
4801			return Err(ValidationError::new(1003, "amt is less than the minimum value of 0.000000".to_string()));
4802		}
4803		Ok(())
4804	}
4805}
4806
4807
4808// AmountOrPercentageRange1 ...
4809#[cfg_attr(feature = "derive_debug", derive(Debug))]
4810#[cfg_attr(feature = "derive_default", derive(Default))]
4811#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4812#[cfg_attr(feature = "derive_clone", derive(Clone))]
4813#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4814pub struct AmountOrPercentageRange1 {
4815	#[cfg_attr( feature = "derive_serde", serde(rename = "Opr", skip_serializing_if = "Option::is_none") )]
4816	pub opr: Option<Operation1Code>,
4817	#[cfg_attr( feature = "derive_serde", serde(rename = "Term", skip_serializing_if = "Option::is_none") )]
4818	pub term: Option<Vec<Term1>>,
4819}
4820
4821impl AmountOrPercentageRange1 {
4822	pub fn validate(&self) -> Result<(), ValidationError> {
4823		if let Some(ref val) = self.opr { val.validate()? }
4824		if let Some(ref vec) = self.term { for item in vec { item.validate()? } }
4825		Ok(())
4826	}
4827}
4828
4829
4830// AmountOrRate1Choice ...
4831#[cfg_attr(feature = "derive_debug", derive(Debug))]
4832#[cfg_attr(feature = "derive_default", derive(Default))]
4833#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4834#[cfg_attr(feature = "derive_clone", derive(Clone))]
4835#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4836pub struct AmountOrRate1Choice {
4837	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
4838	pub amt: Option<ActiveCurrencyAndAmount>,
4839	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
4840	pub rate: Option<f64>,
4841}
4842
4843impl AmountOrRate1Choice {
4844	pub fn validate(&self) -> Result<(), ValidationError> {
4845		if let Some(ref val) = self.amt { val.validate()? }
4846		Ok(())
4847	}
4848}
4849
4850
4851// AmountOrRate3Choice ...
4852#[cfg_attr(feature = "derive_debug", derive(Debug))]
4853#[cfg_attr(feature = "derive_default", derive(Default))]
4854#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4855#[cfg_attr(feature = "derive_clone", derive(Clone))]
4856#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4857pub struct AmountOrRate3Choice {
4858	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
4859	pub amt: Option<ActiveCurrencyAnd13DecimalAmount>,
4860	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
4861	pub rate: Option<f64>,
4862}
4863
4864impl AmountOrRate3Choice {
4865	pub fn validate(&self) -> Result<(), ValidationError> {
4866		if let Some(ref val) = self.amt { val.validate()? }
4867		Ok(())
4868	}
4869}
4870
4871
4872// AmountRangeBoundary1 ...
4873#[cfg_attr(feature = "derive_debug", derive(Debug))]
4874#[cfg_attr(feature = "derive_default", derive(Default))]
4875#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4876#[cfg_attr(feature = "derive_clone", derive(Clone))]
4877#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4878pub struct AmountRangeBoundary1 {
4879	#[cfg_attr( feature = "derive_serde", serde(rename = "BdryAmt") )]
4880	pub bdry_amt: f64,
4881	#[cfg_attr( feature = "derive_serde", serde(rename = "Incl") )]
4882	pub incl: bool,
4883}
4884
4885impl AmountRangeBoundary1 {
4886	pub fn validate(&self) -> Result<(), ValidationError> {
4887		if self.bdry_amt < 0.000000 {
4888			return Err(ValidationError::new(1003, "bdry_amt is less than the minimum value of 0.000000".to_string()));
4889		}
4890		Ok(())
4891	}
4892}
4893
4894
4895// AmountType3Choice ...
4896#[cfg_attr(feature = "derive_debug", derive(Debug))]
4897#[cfg_attr(feature = "derive_default", derive(Default))]
4898#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4899#[cfg_attr(feature = "derive_clone", derive(Clone))]
4900#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4901pub struct AmountType3Choice {
4902	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAmt", skip_serializing_if = "Option::is_none") )]
4903	pub instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
4904	#[cfg_attr( feature = "derive_serde", serde(rename = "EqvtAmt", skip_serializing_if = "Option::is_none") )]
4905	pub eqvt_amt: Option<EquivalentAmount2>,
4906}
4907
4908impl AmountType3Choice {
4909	pub fn validate(&self) -> Result<(), ValidationError> {
4910		if let Some(ref val) = self.instd_amt { val.validate()? }
4911		if let Some(ref val) = self.eqvt_amt { val.validate()? }
4912		Ok(())
4913	}
4914}
4915
4916
4917// AmountType4Choice ...
4918#[cfg_attr(feature = "derive_debug", derive(Debug))]
4919#[cfg_attr(feature = "derive_default", derive(Default))]
4920#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4921#[cfg_attr(feature = "derive_clone", derive(Clone))]
4922#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4923pub struct AmountType4Choice {
4924	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAmt", skip_serializing_if = "Option::is_none") )]
4925	pub instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
4926	#[cfg_attr( feature = "derive_serde", serde(rename = "EqvtAmt", skip_serializing_if = "Option::is_none") )]
4927	pub eqvt_amt: Option<EquivalentAmount2>,
4928}
4929
4930impl AmountType4Choice {
4931	pub fn validate(&self) -> Result<(), ValidationError> {
4932		if let Some(ref val) = self.instd_amt { val.validate()? }
4933		if let Some(ref val) = self.eqvt_amt { val.validate()? }
4934		Ok(())
4935	}
4936}
4937
4938
4939// AnnualChargePaymentType1Code ...
4940#[cfg_attr(feature = "derive_debug", derive(Debug))]
4941#[cfg_attr(feature = "derive_default", derive(Default))]
4942#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4943#[cfg_attr(feature = "derive_clone", derive(Clone))]
4944#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4945pub enum AnnualChargePaymentType1Code {
4946	#[cfg_attr(feature = "derive_default", default)]
4947	#[cfg_attr( feature = "derive_serde", serde(rename = "CAPL") )]
4948	CodeCAPL,
4949	#[cfg_attr( feature = "derive_serde", serde(rename = "INCO") )]
4950	CodeINCO,
4951}
4952
4953impl AnnualChargePaymentType1Code {
4954	pub fn validate(&self) -> Result<(), ValidationError> {
4955		Ok(())
4956	}
4957}
4958
4959
4960// AnyMIC1Code ...
4961#[cfg_attr(feature = "derive_debug", derive(Debug))]
4962#[cfg_attr(feature = "derive_default", derive(Default))]
4963#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4964#[cfg_attr(feature = "derive_clone", derive(Clone))]
4965#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4966pub enum AnyMIC1Code {
4967	#[cfg_attr(feature = "derive_default", default)]
4968	#[cfg_attr( feature = "derive_serde", serde(rename = "ANYM") )]
4969	CodeANYM,
4970}
4971
4972impl AnyMIC1Code {
4973	pub fn validate(&self) -> Result<(), ValidationError> {
4974		Ok(())
4975	}
4976}
4977
4978
4979// Appearance1Code ...
4980#[cfg_attr(feature = "derive_debug", derive(Debug))]
4981#[cfg_attr(feature = "derive_default", derive(Default))]
4982#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
4983#[cfg_attr(feature = "derive_clone", derive(Clone))]
4984#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
4985pub enum Appearance1Code {
4986	#[cfg_attr(feature = "derive_default", default)]
4987	#[cfg_attr( feature = "derive_serde", serde(rename = "DELI") )]
4988	CodeDELI,
4989	#[cfg_attr( feature = "derive_serde", serde(rename = "NDEL") )]
4990	CodeNDEL,
4991	#[cfg_attr( feature = "derive_serde", serde(rename = "LIMI") )]
4992	CodeLIMI,
4993	#[cfg_attr( feature = "derive_serde", serde(rename = "BENT") )]
4994	CodeBENT,
4995	#[cfg_attr( feature = "derive_serde", serde(rename = "DFBE") )]
4996	CodeDFBE,
4997	#[cfg_attr( feature = "derive_serde", serde(rename = "DLBE") )]
4998	CodeDLBE,
4999	#[cfg_attr( feature = "derive_serde", serde(rename = "TMPG") )]
5000	CodeTMPG,
5001	#[cfg_attr( feature = "derive_serde", serde(rename = "GLOB") )]
5002	CodeGLOB,
5003}
5004
5005impl Appearance1Code {
5006	pub fn validate(&self) -> Result<(), ValidationError> {
5007		Ok(())
5008	}
5009}
5010
5011
5012// Appearance3Choice ...
5013#[cfg_attr(feature = "derive_debug", derive(Debug))]
5014#[cfg_attr(feature = "derive_default", derive(Default))]
5015#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5016#[cfg_attr(feature = "derive_clone", derive(Clone))]
5017#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5018pub struct Appearance3Choice {
5019	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
5020	pub cd: Option<Appearance1Code>,
5021	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
5022	pub prtry: Option<GenericIdentification30>,
5023}
5024
5025impl Appearance3Choice {
5026	pub fn validate(&self) -> Result<(), ValidationError> {
5027		if let Some(ref val) = self.cd { val.validate()? }
5028		if let Some(ref val) = self.prtry { val.validate()? }
5029		Ok(())
5030	}
5031}
5032
5033
5034// ApplicationSpecifics1 ...
5035#[cfg_attr(feature = "derive_debug", derive(Debug))]
5036#[cfg_attr(feature = "derive_default", derive(Default))]
5037#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5038#[cfg_attr(feature = "derive_clone", derive(Clone))]
5039#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5040pub struct ApplicationSpecifics1 {
5041	#[cfg_attr( feature = "derive_serde", serde(rename = "SysUsr", skip_serializing_if = "Option::is_none") )]
5042	pub sys_usr: Option<String>,
5043	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgntr", skip_serializing_if = "Option::is_none") )]
5044	pub sgntr: Option<SignatureEnvelope>,
5045	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfDocs") )]
5046	pub ttl_nb_of_docs: f64,
5047}
5048
5049impl ApplicationSpecifics1 {
5050	pub fn validate(&self) -> Result<(), ValidationError> {
5051		if let Some(ref val) = self.sys_usr {
5052			if val.chars().count() < 1 {
5053				return Err(ValidationError::new(1001, "sys_usr is shorter than the minimum length of 1".to_string()));
5054			}
5055			if val.chars().count() > 140 {
5056				return Err(ValidationError::new(1002, "sys_usr exceeds the maximum length of 140".to_string()));
5057			}
5058		}
5059		if let Some(ref val) = self.sgntr { val.validate()? }
5060		Ok(())
5061	}
5062}
5063
5064
5065// AssessmentOfValueRequiredUnderCOLLUKType1Code ...
5066#[cfg_attr(feature = "derive_debug", derive(Debug))]
5067#[cfg_attr(feature = "derive_default", derive(Default))]
5068#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5069#[cfg_attr(feature = "derive_clone", derive(Clone))]
5070#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5071pub enum AssessmentOfValueRequiredUnderCOLLUKType1Code {
5072	#[cfg_attr(feature = "derive_default", default)]
5073	#[cfg_attr( feature = "derive_serde", serde(rename = "YSCO") )]
5074	CodeYSCO,
5075	#[cfg_attr( feature = "derive_serde", serde(rename = "NSCO") )]
5076	CodeNSCO,
5077}
5078
5079impl AssessmentOfValueRequiredUnderCOLLUKType1Code {
5080	pub fn validate(&self) -> Result<(), ValidationError> {
5081		Ok(())
5082	}
5083}
5084
5085
5086// AssetClass2 ...
5087#[cfg_attr(feature = "derive_debug", derive(Debug))]
5088#[cfg_attr(feature = "derive_default", derive(Default))]
5089#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5090#[cfg_attr(feature = "derive_clone", derive(Clone))]
5091#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5092pub struct AssetClass2 {
5093	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmmdty", skip_serializing_if = "Option::is_none") )]
5094	pub cmmdty: Option<DerivativeCommodity2>,
5095	#[cfg_attr( feature = "derive_serde", serde(rename = "Intrst", skip_serializing_if = "Option::is_none") )]
5096	pub intrst: Option<DerivativeInterest3>,
5097	#[cfg_attr( feature = "derive_serde", serde(rename = "FX", skip_serializing_if = "Option::is_none") )]
5098	pub fx: Option<DerivativeForeignExchange3>,
5099}
5100
5101impl AssetClass2 {
5102	pub fn validate(&self) -> Result<(), ValidationError> {
5103		if let Some(ref val) = self.cmmdty { val.validate()? }
5104		if let Some(ref val) = self.intrst { val.validate()? }
5105		if let Some(ref val) = self.fx { val.validate()? }
5106		Ok(())
5107	}
5108}
5109
5110
5111// AssetClassAndSubClassIdentification2 ...
5112#[cfg_attr(feature = "derive_debug", derive(Debug))]
5113#[cfg_attr(feature = "derive_default", derive(Default))]
5114#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5115#[cfg_attr(feature = "derive_clone", derive(Clone))]
5116#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5117pub struct AssetClassAndSubClassIdentification2 {
5118	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstClss") )]
5119	pub asst_clss: NonEquityAssetClass1Code,
5120	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivSubClss", skip_serializing_if = "Option::is_none") )]
5121	pub deriv_sub_clss: Option<NonEquitySubClass1>,
5122	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmClssfctn", skip_serializing_if = "Option::is_none") )]
5123	pub fin_instrm_clssfctn: Option<NonEquityInstrumentReportingClassification1Code>,
5124}
5125
5126impl AssetClassAndSubClassIdentification2 {
5127	pub fn validate(&self) -> Result<(), ValidationError> {
5128		self.asst_clss.validate()?;
5129		if let Some(ref val) = self.deriv_sub_clss { val.validate()? }
5130		if let Some(ref val) = self.fin_instrm_clssfctn { val.validate()? }
5131		Ok(())
5132	}
5133}
5134
5135
5136// AssetClassAttributes1 ...
5137#[cfg_attr(feature = "derive_debug", derive(Debug))]
5138#[cfg_attr(feature = "derive_default", derive(Default))]
5139#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5140#[cfg_attr(feature = "derive_clone", derive(Clone))]
5141#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5142pub struct AssetClassAttributes1 {
5143	#[cfg_attr( feature = "derive_serde", serde(rename = "Intrst") )]
5144	pub intrst: DerivativeInterest2,
5145	#[cfg_attr( feature = "derive_serde", serde(rename = "FX") )]
5146	pub fx: DerivativeForeignExchange2,
5147}
5148
5149impl AssetClassAttributes1 {
5150	pub fn validate(&self) -> Result<(), ValidationError> {
5151		self.intrst.validate()?;
5152		self.fx.validate()?;
5153		Ok(())
5154	}
5155}
5156
5157
5158// AssetClassAttributes1Choice ...
5159#[cfg_attr(feature = "derive_debug", derive(Debug))]
5160#[cfg_attr(feature = "derive_default", derive(Default))]
5161#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5162#[cfg_attr(feature = "derive_clone", derive(Clone))]
5163#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5164pub struct AssetClassAttributes1Choice {
5165	#[cfg_attr( feature = "derive_serde", serde(rename = "Intrst", skip_serializing_if = "Option::is_none") )]
5166	pub intrst: Option<DerivativeInterest2>,
5167	#[cfg_attr( feature = "derive_serde", serde(rename = "FX", skip_serializing_if = "Option::is_none") )]
5168	pub fx: Option<DerivativeForeignExchange2>,
5169	#[cfg_attr( feature = "derive_serde", serde(rename = "Both", skip_serializing_if = "Option::is_none") )]
5170	pub both: Option<AssetClassAttributes1>,
5171}
5172
5173impl AssetClassAttributes1Choice {
5174	pub fn validate(&self) -> Result<(), ValidationError> {
5175		if let Some(ref val) = self.intrst { val.validate()? }
5176		if let Some(ref val) = self.fx { val.validate()? }
5177		if let Some(ref val) = self.both { val.validate()? }
5178		Ok(())
5179	}
5180}
5181
5182
5183// AssetClassCommodity3Choice ...
5184#[cfg_attr(feature = "derive_debug", derive(Debug))]
5185#[cfg_attr(feature = "derive_default", derive(Default))]
5186#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5187#[cfg_attr(feature = "derive_clone", derive(Clone))]
5188#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5189pub struct AssetClassCommodity3Choice {
5190	#[cfg_attr( feature = "derive_serde", serde(rename = "Agrcltrl", skip_serializing_if = "Option::is_none") )]
5191	pub agrcltrl: Option<AssetClassCommodityAgricultural1Choice>,
5192	#[cfg_attr( feature = "derive_serde", serde(rename = "Nrgy", skip_serializing_if = "Option::is_none") )]
5193	pub nrgy: Option<AssetClassCommodityEnergy1Choice>,
5194	#[cfg_attr( feature = "derive_serde", serde(rename = "Envttl", skip_serializing_if = "Option::is_none") )]
5195	pub envttl: Option<AssetClassCommodityEnvironmental1Choice>,
5196	#[cfg_attr( feature = "derive_serde", serde(rename = "Frtlzr", skip_serializing_if = "Option::is_none") )]
5197	pub frtlzr: Option<AssetClassCommodityFertilizer1Choice>,
5198	#[cfg_attr( feature = "derive_serde", serde(rename = "Frght", skip_serializing_if = "Option::is_none") )]
5199	pub frght: Option<AssetClassCommodityFreight1Choice>,
5200	#[cfg_attr( feature = "derive_serde", serde(rename = "IndstrlPdct", skip_serializing_if = "Option::is_none") )]
5201	pub indstrl_pdct: Option<AssetClassCommodityIndustrialProduct1Choice>,
5202	#[cfg_attr( feature = "derive_serde", serde(rename = "Metl", skip_serializing_if = "Option::is_none") )]
5203	pub metl: Option<AssetClassCommodityMetal1Choice>,
5204	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrC10", skip_serializing_if = "Option::is_none") )]
5205	pub othr_c10: Option<AssetClassCommodityOtherC102Choice>,
5206	#[cfg_attr( feature = "derive_serde", serde(rename = "Ppr", skip_serializing_if = "Option::is_none") )]
5207	pub ppr: Option<AssetClassCommodityPaper1Choice>,
5208	#[cfg_attr( feature = "derive_serde", serde(rename = "Plprpln", skip_serializing_if = "Option::is_none") )]
5209	pub plprpln: Option<AssetClassCommodityPolypropylene1Choice>,
5210	#[cfg_attr( feature = "derive_serde", serde(rename = "Infltn", skip_serializing_if = "Option::is_none") )]
5211	pub infltn: Option<AssetClassCommodityInflation1>,
5212	#[cfg_attr( feature = "derive_serde", serde(rename = "MultiCmmdtyExtc", skip_serializing_if = "Option::is_none") )]
5213	pub multi_cmmdty_extc: Option<AssetClassCommodityMultiCommodityExotic1>,
5214	#[cfg_attr( feature = "derive_serde", serde(rename = "OffclEcnmcSttstcs", skip_serializing_if = "Option::is_none") )]
5215	pub offcl_ecnmc_sttstcs: Option<AssetClassCommodityOfficialEconomicStatistics1>,
5216	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
5217	pub othr: Option<AssetClassCommodityOther1>,
5218}
5219
5220impl AssetClassCommodity3Choice {
5221	pub fn validate(&self) -> Result<(), ValidationError> {
5222		if let Some(ref val) = self.agrcltrl { val.validate()? }
5223		if let Some(ref val) = self.nrgy { val.validate()? }
5224		if let Some(ref val) = self.envttl { val.validate()? }
5225		if let Some(ref val) = self.frtlzr { val.validate()? }
5226		if let Some(ref val) = self.frght { val.validate()? }
5227		if let Some(ref val) = self.indstrl_pdct { val.validate()? }
5228		if let Some(ref val) = self.metl { val.validate()? }
5229		if let Some(ref val) = self.othr_c10 { val.validate()? }
5230		if let Some(ref val) = self.ppr { val.validate()? }
5231		if let Some(ref val) = self.plprpln { val.validate()? }
5232		if let Some(ref val) = self.infltn { val.validate()? }
5233		if let Some(ref val) = self.multi_cmmdty_extc { val.validate()? }
5234		if let Some(ref val) = self.offcl_ecnmc_sttstcs { val.validate()? }
5235		if let Some(ref val) = self.othr { val.validate()? }
5236		Ok(())
5237	}
5238}
5239
5240
5241// AssetClassCommodity5Choice ...
5242#[cfg_attr(feature = "derive_debug", derive(Debug))]
5243#[cfg_attr(feature = "derive_default", derive(Default))]
5244#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5245#[cfg_attr(feature = "derive_clone", derive(Clone))]
5246#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5247pub struct AssetClassCommodity5Choice {
5248	#[cfg_attr( feature = "derive_serde", serde(rename = "Agrcltrl", skip_serializing_if = "Option::is_none") )]
5249	pub agrcltrl: Option<AssetClassCommodityAgricultural5Choice>,
5250	#[cfg_attr( feature = "derive_serde", serde(rename = "Nrgy", skip_serializing_if = "Option::is_none") )]
5251	pub nrgy: Option<AssetClassCommodityEnergy2Choice>,
5252	#[cfg_attr( feature = "derive_serde", serde(rename = "Envttl", skip_serializing_if = "Option::is_none") )]
5253	pub envttl: Option<AssetClassCommodityEnvironmental2Choice>,
5254	#[cfg_attr( feature = "derive_serde", serde(rename = "Frtlzr", skip_serializing_if = "Option::is_none") )]
5255	pub frtlzr: Option<AssetClassCommodityFertilizer3Choice>,
5256	#[cfg_attr( feature = "derive_serde", serde(rename = "Frght", skip_serializing_if = "Option::is_none") )]
5257	pub frght: Option<AssetClassCommodityFreight3Choice>,
5258	#[cfg_attr( feature = "derive_serde", serde(rename = "IndstrlPdct", skip_serializing_if = "Option::is_none") )]
5259	pub indstrl_pdct: Option<AssetClassCommodityIndustrialProduct1Choice>,
5260	#[cfg_attr( feature = "derive_serde", serde(rename = "Metl", skip_serializing_if = "Option::is_none") )]
5261	pub metl: Option<AssetClassCommodityMetal1Choice>,
5262	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrC10", skip_serializing_if = "Option::is_none") )]
5263	pub othr_c10: Option<AssetClassCommodityOtherC102Choice>,
5264	#[cfg_attr( feature = "derive_serde", serde(rename = "Ppr", skip_serializing_if = "Option::is_none") )]
5265	pub ppr: Option<AssetClassCommodityPaper3Choice>,
5266	#[cfg_attr( feature = "derive_serde", serde(rename = "Plprpln", skip_serializing_if = "Option::is_none") )]
5267	pub plprpln: Option<AssetClassCommodityPolypropylene3Choice>,
5268	#[cfg_attr( feature = "derive_serde", serde(rename = "Infltn", skip_serializing_if = "Option::is_none") )]
5269	pub infltn: Option<AssetClassCommodityInflation1>,
5270	#[cfg_attr( feature = "derive_serde", serde(rename = "MultiCmmdtyExtc", skip_serializing_if = "Option::is_none") )]
5271	pub multi_cmmdty_extc: Option<AssetClassCommodityMultiCommodityExotic1>,
5272	#[cfg_attr( feature = "derive_serde", serde(rename = "OffclEcnmcSttstcs", skip_serializing_if = "Option::is_none") )]
5273	pub offcl_ecnmc_sttstcs: Option<AssetClassCommodityOfficialEconomicStatistics1>,
5274	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
5275	pub othr: Option<AssetClassCommodityOther1>,
5276}
5277
5278impl AssetClassCommodity5Choice {
5279	pub fn validate(&self) -> Result<(), ValidationError> {
5280		if let Some(ref val) = self.agrcltrl { val.validate()? }
5281		if let Some(ref val) = self.nrgy { val.validate()? }
5282		if let Some(ref val) = self.envttl { val.validate()? }
5283		if let Some(ref val) = self.frtlzr { val.validate()? }
5284		if let Some(ref val) = self.frght { val.validate()? }
5285		if let Some(ref val) = self.indstrl_pdct { val.validate()? }
5286		if let Some(ref val) = self.metl { val.validate()? }
5287		if let Some(ref val) = self.othr_c10 { val.validate()? }
5288		if let Some(ref val) = self.ppr { val.validate()? }
5289		if let Some(ref val) = self.plprpln { val.validate()? }
5290		if let Some(ref val) = self.infltn { val.validate()? }
5291		if let Some(ref val) = self.multi_cmmdty_extc { val.validate()? }
5292		if let Some(ref val) = self.offcl_ecnmc_sttstcs { val.validate()? }
5293		if let Some(ref val) = self.othr { val.validate()? }
5294		Ok(())
5295	}
5296}
5297
5298
5299// AssetClassCommodity6Choice ...
5300#[cfg_attr(feature = "derive_debug", derive(Debug))]
5301#[cfg_attr(feature = "derive_default", derive(Default))]
5302#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5303#[cfg_attr(feature = "derive_clone", derive(Clone))]
5304#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5305pub struct AssetClassCommodity6Choice {
5306	#[cfg_attr( feature = "derive_serde", serde(rename = "Agrcltrl", skip_serializing_if = "Option::is_none") )]
5307	pub agrcltrl: Option<AssetClassCommodityAgricultural6Choice>,
5308	#[cfg_attr( feature = "derive_serde", serde(rename = "Nrgy", skip_serializing_if = "Option::is_none") )]
5309	pub nrgy: Option<AssetClassCommodityEnergy3Choice>,
5310	#[cfg_attr( feature = "derive_serde", serde(rename = "Envttl", skip_serializing_if = "Option::is_none") )]
5311	pub envttl: Option<AssetClassCommodityEnvironmental3Choice>,
5312	#[cfg_attr( feature = "derive_serde", serde(rename = "Frtlzr", skip_serializing_if = "Option::is_none") )]
5313	pub frtlzr: Option<AssetClassCommodityFertilizer4Choice>,
5314	#[cfg_attr( feature = "derive_serde", serde(rename = "Frght", skip_serializing_if = "Option::is_none") )]
5315	pub frght: Option<AssetClassCommodityFreight4Choice>,
5316	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
5317	pub indx: Option<AssetClassCommodityIndex1>,
5318	#[cfg_attr( feature = "derive_serde", serde(rename = "IndstrlPdct", skip_serializing_if = "Option::is_none") )]
5319	pub indstrl_pdct: Option<AssetClassCommodityIndustrialProduct2Choice>,
5320	#[cfg_attr( feature = "derive_serde", serde(rename = "Infltn", skip_serializing_if = "Option::is_none") )]
5321	pub infltn: Option<AssetClassCommodityInflation1>,
5322	#[cfg_attr( feature = "derive_serde", serde(rename = "Metl", skip_serializing_if = "Option::is_none") )]
5323	pub metl: Option<AssetClassCommodityMetal2Choice>,
5324	#[cfg_attr( feature = "derive_serde", serde(rename = "MultiCmmdtyExtc", skip_serializing_if = "Option::is_none") )]
5325	pub multi_cmmdty_extc: Option<AssetClassCommodityMultiCommodityExotic1>,
5326	#[cfg_attr( feature = "derive_serde", serde(rename = "OffclEcnmcSttstcs", skip_serializing_if = "Option::is_none") )]
5327	pub offcl_ecnmc_sttstcs: Option<AssetClassCommodityOfficialEconomicStatistics1>,
5328	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
5329	pub othr: Option<AssetClassCommodityOther1>,
5330	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrC10", skip_serializing_if = "Option::is_none") )]
5331	pub othr_c10: Option<AssetClassCommodityC10Other1>,
5332	#[cfg_attr( feature = "derive_serde", serde(rename = "Ppr", skip_serializing_if = "Option::is_none") )]
5333	pub ppr: Option<AssetClassCommodityPaper4Choice>,
5334	#[cfg_attr( feature = "derive_serde", serde(rename = "Plprpln", skip_serializing_if = "Option::is_none") )]
5335	pub plprpln: Option<AssetClassCommodityPolypropylene4Choice>,
5336}
5337
5338impl AssetClassCommodity6Choice {
5339	pub fn validate(&self) -> Result<(), ValidationError> {
5340		if let Some(ref val) = self.agrcltrl { val.validate()? }
5341		if let Some(ref val) = self.nrgy { val.validate()? }
5342		if let Some(ref val) = self.envttl { val.validate()? }
5343		if let Some(ref val) = self.frtlzr { val.validate()? }
5344		if let Some(ref val) = self.frght { val.validate()? }
5345		if let Some(ref val) = self.indx { val.validate()? }
5346		if let Some(ref val) = self.indstrl_pdct { val.validate()? }
5347		if let Some(ref val) = self.infltn { val.validate()? }
5348		if let Some(ref val) = self.metl { val.validate()? }
5349		if let Some(ref val) = self.multi_cmmdty_extc { val.validate()? }
5350		if let Some(ref val) = self.offcl_ecnmc_sttstcs { val.validate()? }
5351		if let Some(ref val) = self.othr { val.validate()? }
5352		if let Some(ref val) = self.othr_c10 { val.validate()? }
5353		if let Some(ref val) = self.ppr { val.validate()? }
5354		if let Some(ref val) = self.plprpln { val.validate()? }
5355		Ok(())
5356	}
5357}
5358
5359
5360// AssetClassCommodity7Choice ...
5361#[cfg_attr(feature = "derive_debug", derive(Debug))]
5362#[cfg_attr(feature = "derive_default", derive(Default))]
5363#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5364#[cfg_attr(feature = "derive_clone", derive(Clone))]
5365#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5366pub struct AssetClassCommodity7Choice {
5367	#[cfg_attr( feature = "derive_serde", serde(rename = "Agrcltrl", skip_serializing_if = "Option::is_none") )]
5368	pub agrcltrl: Option<AssetClassCommodityAgricultural6Choice>,
5369	#[cfg_attr( feature = "derive_serde", serde(rename = "Nrgy", skip_serializing_if = "Option::is_none") )]
5370	pub nrgy: Option<AssetClassCommodityEnergy3Choice>,
5371	#[cfg_attr( feature = "derive_serde", serde(rename = "Envttl", skip_serializing_if = "Option::is_none") )]
5372	pub envttl: Option<AssetClassCommodityEnvironmental3Choice>,
5373	#[cfg_attr( feature = "derive_serde", serde(rename = "Frtlzr", skip_serializing_if = "Option::is_none") )]
5374	pub frtlzr: Option<AssetClassCommodityFertilizer4Choice>,
5375	#[cfg_attr( feature = "derive_serde", serde(rename = "Frght", skip_serializing_if = "Option::is_none") )]
5376	pub frght: Option<AssetClassCommodityFreight4Choice>,
5377	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
5378	pub indx: Option<AssetClassCommodityIndex1>,
5379	#[cfg_attr( feature = "derive_serde", serde(rename = "IndstrlPdct", skip_serializing_if = "Option::is_none") )]
5380	pub indstrl_pdct: Option<AssetClassCommodityIndustrialProduct2Choice>,
5381	#[cfg_attr( feature = "derive_serde", serde(rename = "Infltn", skip_serializing_if = "Option::is_none") )]
5382	pub infltn: Option<AssetClassCommodityInflation1>,
5383	#[cfg_attr( feature = "derive_serde", serde(rename = "Metl", skip_serializing_if = "Option::is_none") )]
5384	pub metl: Option<AssetClassCommodityMetal2Choice>,
5385	#[cfg_attr( feature = "derive_serde", serde(rename = "MultiCmmdtyExtc", skip_serializing_if = "Option::is_none") )]
5386	pub multi_cmmdty_extc: Option<AssetClassCommodityMultiCommodityExotic1>,
5387	#[cfg_attr( feature = "derive_serde", serde(rename = "OffclEcnmcSttstcs", skip_serializing_if = "Option::is_none") )]
5388	pub offcl_ecnmc_sttstcs: Option<AssetClassCommodityOfficialEconomicStatistics1>,
5389	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
5390	pub othr: Option<AssetClassCommodityOther1>,
5391	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrC10", skip_serializing_if = "Option::is_none") )]
5392	pub othr_c10: Option<AssetClassCommodityC10Other1>,
5393	#[cfg_attr( feature = "derive_serde", serde(rename = "Ppr", skip_serializing_if = "Option::is_none") )]
5394	pub ppr: Option<AssetClassCommodityPaper5Choice>,
5395	#[cfg_attr( feature = "derive_serde", serde(rename = "Plprpln", skip_serializing_if = "Option::is_none") )]
5396	pub plprpln: Option<AssetClassCommodityPolypropylene4Choice>,
5397}
5398
5399impl AssetClassCommodity7Choice {
5400	pub fn validate(&self) -> Result<(), ValidationError> {
5401		if let Some(ref val) = self.agrcltrl { val.validate()? }
5402		if let Some(ref val) = self.nrgy { val.validate()? }
5403		if let Some(ref val) = self.envttl { val.validate()? }
5404		if let Some(ref val) = self.frtlzr { val.validate()? }
5405		if let Some(ref val) = self.frght { val.validate()? }
5406		if let Some(ref val) = self.indx { val.validate()? }
5407		if let Some(ref val) = self.indstrl_pdct { val.validate()? }
5408		if let Some(ref val) = self.infltn { val.validate()? }
5409		if let Some(ref val) = self.metl { val.validate()? }
5410		if let Some(ref val) = self.multi_cmmdty_extc { val.validate()? }
5411		if let Some(ref val) = self.offcl_ecnmc_sttstcs { val.validate()? }
5412		if let Some(ref val) = self.othr { val.validate()? }
5413		if let Some(ref val) = self.othr_c10 { val.validate()? }
5414		if let Some(ref val) = self.ppr { val.validate()? }
5415		if let Some(ref val) = self.plprpln { val.validate()? }
5416		Ok(())
5417	}
5418}
5419
5420
5421// AssetClassCommodityAgricultural1Choice ...
5422#[cfg_attr(feature = "derive_debug", derive(Debug))]
5423#[cfg_attr(feature = "derive_default", derive(Default))]
5424#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5425#[cfg_attr(feature = "derive_clone", derive(Clone))]
5426#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5427pub struct AssetClassCommodityAgricultural1Choice {
5428	#[cfg_attr( feature = "derive_serde", serde(rename = "GrnOilSeed", skip_serializing_if = "Option::is_none") )]
5429	pub grn_oil_seed: Option<AgriculturalCommodityOilSeed1>,
5430	#[cfg_attr( feature = "derive_serde", serde(rename = "Soft", skip_serializing_if = "Option::is_none") )]
5431	pub soft: Option<AgriculturalCommoditySoft1>,
5432	#[cfg_attr( feature = "derive_serde", serde(rename = "Ptt", skip_serializing_if = "Option::is_none") )]
5433	pub ptt: Option<AgriculturalCommodityPotato1>,
5434	#[cfg_attr( feature = "derive_serde", serde(rename = "OlvOil", skip_serializing_if = "Option::is_none") )]
5435	pub olv_oil: Option<AgriculturalCommodityOliveOil1>,
5436	#[cfg_attr( feature = "derive_serde", serde(rename = "Dairy", skip_serializing_if = "Option::is_none") )]
5437	pub dairy: Option<AgriculturalCommodityDairy1>,
5438	#[cfg_attr( feature = "derive_serde", serde(rename = "Frstry", skip_serializing_if = "Option::is_none") )]
5439	pub frstry: Option<AgriculturalCommodityForestry1>,
5440	#[cfg_attr( feature = "derive_serde", serde(rename = "Sfd", skip_serializing_if = "Option::is_none") )]
5441	pub sfd: Option<AgriculturalCommoditySeafood1>,
5442	#[cfg_attr( feature = "derive_serde", serde(rename = "LiveStock", skip_serializing_if = "Option::is_none") )]
5443	pub live_stock: Option<AgriculturalCommodityLiveStock1>,
5444	#[cfg_attr( feature = "derive_serde", serde(rename = "Grn", skip_serializing_if = "Option::is_none") )]
5445	pub grn: Option<AgriculturalCommodityGrain1>,
5446}
5447
5448impl AssetClassCommodityAgricultural1Choice {
5449	pub fn validate(&self) -> Result<(), ValidationError> {
5450		if let Some(ref val) = self.grn_oil_seed { val.validate()? }
5451		if let Some(ref val) = self.soft { val.validate()? }
5452		if let Some(ref val) = self.ptt { val.validate()? }
5453		if let Some(ref val) = self.olv_oil { val.validate()? }
5454		if let Some(ref val) = self.dairy { val.validate()? }
5455		if let Some(ref val) = self.frstry { val.validate()? }
5456		if let Some(ref val) = self.sfd { val.validate()? }
5457		if let Some(ref val) = self.live_stock { val.validate()? }
5458		if let Some(ref val) = self.grn { val.validate()? }
5459		Ok(())
5460	}
5461}
5462
5463
5464// AssetClassCommodityAgricultural5Choice ...
5465#[cfg_attr(feature = "derive_debug", derive(Debug))]
5466#[cfg_attr(feature = "derive_default", derive(Default))]
5467#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5468#[cfg_attr(feature = "derive_clone", derive(Clone))]
5469#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5470pub struct AssetClassCommodityAgricultural5Choice {
5471	#[cfg_attr( feature = "derive_serde", serde(rename = "GrnOilSeed", skip_serializing_if = "Option::is_none") )]
5472	pub grn_oil_seed: Option<AgriculturalCommodityOilSeed1>,
5473	#[cfg_attr( feature = "derive_serde", serde(rename = "Soft", skip_serializing_if = "Option::is_none") )]
5474	pub soft: Option<AgriculturalCommoditySoft1>,
5475	#[cfg_attr( feature = "derive_serde", serde(rename = "Ptt", skip_serializing_if = "Option::is_none") )]
5476	pub ptt: Option<AgriculturalCommodityPotato1>,
5477	#[cfg_attr( feature = "derive_serde", serde(rename = "OlvOil", skip_serializing_if = "Option::is_none") )]
5478	pub olv_oil: Option<AgriculturalCommodityOliveOil2>,
5479	#[cfg_attr( feature = "derive_serde", serde(rename = "Dairy", skip_serializing_if = "Option::is_none") )]
5480	pub dairy: Option<AgriculturalCommodityDairy1>,
5481	#[cfg_attr( feature = "derive_serde", serde(rename = "Frstry", skip_serializing_if = "Option::is_none") )]
5482	pub frstry: Option<AgriculturalCommodityForestry1>,
5483	#[cfg_attr( feature = "derive_serde", serde(rename = "Sfd", skip_serializing_if = "Option::is_none") )]
5484	pub sfd: Option<AgriculturalCommoditySeafood1>,
5485	#[cfg_attr( feature = "derive_serde", serde(rename = "LiveStock", skip_serializing_if = "Option::is_none") )]
5486	pub live_stock: Option<AgriculturalCommodityLiveStock1>,
5487	#[cfg_attr( feature = "derive_serde", serde(rename = "Grn", skip_serializing_if = "Option::is_none") )]
5488	pub grn: Option<AgriculturalCommodityGrain2>,
5489	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
5490	pub othr: Option<AgriculturalCommodityOther1>,
5491}
5492
5493impl AssetClassCommodityAgricultural5Choice {
5494	pub fn validate(&self) -> Result<(), ValidationError> {
5495		if let Some(ref val) = self.grn_oil_seed { val.validate()? }
5496		if let Some(ref val) = self.soft { val.validate()? }
5497		if let Some(ref val) = self.ptt { val.validate()? }
5498		if let Some(ref val) = self.olv_oil { val.validate()? }
5499		if let Some(ref val) = self.dairy { val.validate()? }
5500		if let Some(ref val) = self.frstry { val.validate()? }
5501		if let Some(ref val) = self.sfd { val.validate()? }
5502		if let Some(ref val) = self.live_stock { val.validate()? }
5503		if let Some(ref val) = self.grn { val.validate()? }
5504		if let Some(ref val) = self.othr { val.validate()? }
5505		Ok(())
5506	}
5507}
5508
5509
5510// AssetClassCommodityAgricultural6Choice ...
5511#[cfg_attr(feature = "derive_debug", derive(Debug))]
5512#[cfg_attr(feature = "derive_default", derive(Default))]
5513#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5514#[cfg_attr(feature = "derive_clone", derive(Clone))]
5515#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5516pub struct AssetClassCommodityAgricultural6Choice {
5517	#[cfg_attr( feature = "derive_serde", serde(rename = "GrnOilSeed", skip_serializing_if = "Option::is_none") )]
5518	pub grn_oil_seed: Option<AgriculturalCommodityOilSeed2>,
5519	#[cfg_attr( feature = "derive_serde", serde(rename = "Soft", skip_serializing_if = "Option::is_none") )]
5520	pub soft: Option<AgriculturalCommoditySoft2>,
5521	#[cfg_attr( feature = "derive_serde", serde(rename = "Ptt", skip_serializing_if = "Option::is_none") )]
5522	pub ptt: Option<AgriculturalCommodityPotato2>,
5523	#[cfg_attr( feature = "derive_serde", serde(rename = "OlvOil", skip_serializing_if = "Option::is_none") )]
5524	pub olv_oil: Option<AgriculturalCommodityOliveOil3>,
5525	#[cfg_attr( feature = "derive_serde", serde(rename = "Dairy", skip_serializing_if = "Option::is_none") )]
5526	pub dairy: Option<AgriculturalCommodityDairy2>,
5527	#[cfg_attr( feature = "derive_serde", serde(rename = "Frstry", skip_serializing_if = "Option::is_none") )]
5528	pub frstry: Option<AgriculturalCommodityForestry2>,
5529	#[cfg_attr( feature = "derive_serde", serde(rename = "Sfd", skip_serializing_if = "Option::is_none") )]
5530	pub sfd: Option<AgriculturalCommoditySeafood2>,
5531	#[cfg_attr( feature = "derive_serde", serde(rename = "LiveStock", skip_serializing_if = "Option::is_none") )]
5532	pub live_stock: Option<AgriculturalCommodityLiveStock2>,
5533	#[cfg_attr( feature = "derive_serde", serde(rename = "Grn", skip_serializing_if = "Option::is_none") )]
5534	pub grn: Option<AgriculturalCommodityGrain3>,
5535	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
5536	pub othr: Option<AgriculturalCommodityOther2>,
5537}
5538
5539impl AssetClassCommodityAgricultural6Choice {
5540	pub fn validate(&self) -> Result<(), ValidationError> {
5541		if let Some(ref val) = self.grn_oil_seed { val.validate()? }
5542		if let Some(ref val) = self.soft { val.validate()? }
5543		if let Some(ref val) = self.ptt { val.validate()? }
5544		if let Some(ref val) = self.olv_oil { val.validate()? }
5545		if let Some(ref val) = self.dairy { val.validate()? }
5546		if let Some(ref val) = self.frstry { val.validate()? }
5547		if let Some(ref val) = self.sfd { val.validate()? }
5548		if let Some(ref val) = self.live_stock { val.validate()? }
5549		if let Some(ref val) = self.grn { val.validate()? }
5550		if let Some(ref val) = self.othr { val.validate()? }
5551		Ok(())
5552	}
5553}
5554
5555
5556// AssetClassCommodityC10Other1 ...
5557#[cfg_attr(feature = "derive_debug", derive(Debug))]
5558#[cfg_attr(feature = "derive_default", derive(Default))]
5559#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5560#[cfg_attr(feature = "derive_clone", derive(Clone))]
5561#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5562pub struct AssetClassCommodityC10Other1 {
5563	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
5564	pub base_pdct: AssetClassProductType11Code,
5565}
5566
5567impl AssetClassCommodityC10Other1 {
5568	pub fn validate(&self) -> Result<(), ValidationError> {
5569		self.base_pdct.validate()?;
5570		Ok(())
5571	}
5572}
5573
5574
5575// AssetClassCommodityEnergy1Choice ...
5576#[cfg_attr(feature = "derive_debug", derive(Debug))]
5577#[cfg_attr(feature = "derive_default", derive(Default))]
5578#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5579#[cfg_attr(feature = "derive_clone", derive(Clone))]
5580#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5581pub struct AssetClassCommodityEnergy1Choice {
5582	#[cfg_attr( feature = "derive_serde", serde(rename = "Elctrcty", skip_serializing_if = "Option::is_none") )]
5583	pub elctrcty: Option<EnergyCommodityElectricity1>,
5584	#[cfg_attr( feature = "derive_serde", serde(rename = "NtrlGas", skip_serializing_if = "Option::is_none") )]
5585	pub ntrl_gas: Option<EnergyCommodityNaturalGas1>,
5586	#[cfg_attr( feature = "derive_serde", serde(rename = "Oil", skip_serializing_if = "Option::is_none") )]
5587	pub oil: Option<EnergyCommodityOil1>,
5588	#[cfg_attr( feature = "derive_serde", serde(rename = "Coal", skip_serializing_if = "Option::is_none") )]
5589	pub coal: Option<EnergyCommodityCoal1>,
5590	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrNrgy", skip_serializing_if = "Option::is_none") )]
5591	pub intr_nrgy: Option<EnergyCommodityInterEnergy1>,
5592	#[cfg_attr( feature = "derive_serde", serde(rename = "RnwblNrgy", skip_serializing_if = "Option::is_none") )]
5593	pub rnwbl_nrgy: Option<EnergyCommodityRenewableEnergy1>,
5594	#[cfg_attr( feature = "derive_serde", serde(rename = "LghtEnd", skip_serializing_if = "Option::is_none") )]
5595	pub lght_end: Option<EnergyCommodityLightEnd1>,
5596	#[cfg_attr( feature = "derive_serde", serde(rename = "Dstllts", skip_serializing_if = "Option::is_none") )]
5597	pub dstllts: Option<EnergyCommodityDistillates1>,
5598}
5599
5600impl AssetClassCommodityEnergy1Choice {
5601	pub fn validate(&self) -> Result<(), ValidationError> {
5602		if let Some(ref val) = self.elctrcty { val.validate()? }
5603		if let Some(ref val) = self.ntrl_gas { val.validate()? }
5604		if let Some(ref val) = self.oil { val.validate()? }
5605		if let Some(ref val) = self.coal { val.validate()? }
5606		if let Some(ref val) = self.intr_nrgy { val.validate()? }
5607		if let Some(ref val) = self.rnwbl_nrgy { val.validate()? }
5608		if let Some(ref val) = self.lght_end { val.validate()? }
5609		if let Some(ref val) = self.dstllts { val.validate()? }
5610		Ok(())
5611	}
5612}
5613
5614
5615// AssetClassCommodityEnergy2Choice ...
5616#[cfg_attr(feature = "derive_debug", derive(Debug))]
5617#[cfg_attr(feature = "derive_default", derive(Default))]
5618#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5619#[cfg_attr(feature = "derive_clone", derive(Clone))]
5620#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5621pub struct AssetClassCommodityEnergy2Choice {
5622	#[cfg_attr( feature = "derive_serde", serde(rename = "Elctrcty", skip_serializing_if = "Option::is_none") )]
5623	pub elctrcty: Option<EnergyCommodityElectricity1>,
5624	#[cfg_attr( feature = "derive_serde", serde(rename = "NtrlGas", skip_serializing_if = "Option::is_none") )]
5625	pub ntrl_gas: Option<EnergyCommodityNaturalGas2>,
5626	#[cfg_attr( feature = "derive_serde", serde(rename = "Oil", skip_serializing_if = "Option::is_none") )]
5627	pub oil: Option<EnergyCommodityOil2>,
5628	#[cfg_attr( feature = "derive_serde", serde(rename = "Coal", skip_serializing_if = "Option::is_none") )]
5629	pub coal: Option<EnergyCommodityCoal1>,
5630	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrNrgy", skip_serializing_if = "Option::is_none") )]
5631	pub intr_nrgy: Option<EnergyCommodityInterEnergy1>,
5632	#[cfg_attr( feature = "derive_serde", serde(rename = "RnwblNrgy", skip_serializing_if = "Option::is_none") )]
5633	pub rnwbl_nrgy: Option<EnergyCommodityRenewableEnergy1>,
5634	#[cfg_attr( feature = "derive_serde", serde(rename = "LghtEnd", skip_serializing_if = "Option::is_none") )]
5635	pub lght_end: Option<EnergyCommodityLightEnd1>,
5636	#[cfg_attr( feature = "derive_serde", serde(rename = "Dstllts", skip_serializing_if = "Option::is_none") )]
5637	pub dstllts: Option<EnergyCommodityDistillates1>,
5638	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
5639	pub othr: Option<EnergyCommodityOther1>,
5640}
5641
5642impl AssetClassCommodityEnergy2Choice {
5643	pub fn validate(&self) -> Result<(), ValidationError> {
5644		if let Some(ref val) = self.elctrcty { val.validate()? }
5645		if let Some(ref val) = self.ntrl_gas { val.validate()? }
5646		if let Some(ref val) = self.oil { val.validate()? }
5647		if let Some(ref val) = self.coal { val.validate()? }
5648		if let Some(ref val) = self.intr_nrgy { val.validate()? }
5649		if let Some(ref val) = self.rnwbl_nrgy { val.validate()? }
5650		if let Some(ref val) = self.lght_end { val.validate()? }
5651		if let Some(ref val) = self.dstllts { val.validate()? }
5652		if let Some(ref val) = self.othr { val.validate()? }
5653		Ok(())
5654	}
5655}
5656
5657
5658// AssetClassCommodityEnergy3Choice ...
5659#[cfg_attr(feature = "derive_debug", derive(Debug))]
5660#[cfg_attr(feature = "derive_default", derive(Default))]
5661#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5662#[cfg_attr(feature = "derive_clone", derive(Clone))]
5663#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5664pub struct AssetClassCommodityEnergy3Choice {
5665	#[cfg_attr( feature = "derive_serde", serde(rename = "Elctrcty", skip_serializing_if = "Option::is_none") )]
5666	pub elctrcty: Option<EnergyCommodityElectricity2>,
5667	#[cfg_attr( feature = "derive_serde", serde(rename = "NtrlGas", skip_serializing_if = "Option::is_none") )]
5668	pub ntrl_gas: Option<EnergyCommodityNaturalGas3>,
5669	#[cfg_attr( feature = "derive_serde", serde(rename = "Oil", skip_serializing_if = "Option::is_none") )]
5670	pub oil: Option<EnergyCommodityOil3>,
5671	#[cfg_attr( feature = "derive_serde", serde(rename = "Coal", skip_serializing_if = "Option::is_none") )]
5672	pub coal: Option<EnergyCommodityCoal2>,
5673	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrNrgy", skip_serializing_if = "Option::is_none") )]
5674	pub intr_nrgy: Option<EnergyCommodityInterEnergy2>,
5675	#[cfg_attr( feature = "derive_serde", serde(rename = "RnwblNrgy", skip_serializing_if = "Option::is_none") )]
5676	pub rnwbl_nrgy: Option<EnergyCommodityRenewableEnergy2>,
5677	#[cfg_attr( feature = "derive_serde", serde(rename = "LghtEnd", skip_serializing_if = "Option::is_none") )]
5678	pub lght_end: Option<EnergyCommodityLightEnd2>,
5679	#[cfg_attr( feature = "derive_serde", serde(rename = "Dstllts", skip_serializing_if = "Option::is_none") )]
5680	pub dstllts: Option<EnergyCommodityDistillates2>,
5681	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
5682	pub othr: Option<EnergyCommodityOther2>,
5683}
5684
5685impl AssetClassCommodityEnergy3Choice {
5686	pub fn validate(&self) -> Result<(), ValidationError> {
5687		if let Some(ref val) = self.elctrcty { val.validate()? }
5688		if let Some(ref val) = self.ntrl_gas { val.validate()? }
5689		if let Some(ref val) = self.oil { val.validate()? }
5690		if let Some(ref val) = self.coal { val.validate()? }
5691		if let Some(ref val) = self.intr_nrgy { val.validate()? }
5692		if let Some(ref val) = self.rnwbl_nrgy { val.validate()? }
5693		if let Some(ref val) = self.lght_end { val.validate()? }
5694		if let Some(ref val) = self.dstllts { val.validate()? }
5695		if let Some(ref val) = self.othr { val.validate()? }
5696		Ok(())
5697	}
5698}
5699
5700
5701// AssetClassCommodityEnvironmental1Choice ...
5702#[cfg_attr(feature = "derive_debug", derive(Debug))]
5703#[cfg_attr(feature = "derive_default", derive(Default))]
5704#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5705#[cfg_attr(feature = "derive_clone", derive(Clone))]
5706#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5707pub struct AssetClassCommodityEnvironmental1Choice {
5708	#[cfg_attr( feature = "derive_serde", serde(rename = "Emssns", skip_serializing_if = "Option::is_none") )]
5709	pub emssns: Option<EnvironmentalCommodityEmission1>,
5710	#[cfg_attr( feature = "derive_serde", serde(rename = "Wthr", skip_serializing_if = "Option::is_none") )]
5711	pub wthr: Option<EnvironmentalCommodityWeather1>,
5712	#[cfg_attr( feature = "derive_serde", serde(rename = "CrbnRltd", skip_serializing_if = "Option::is_none") )]
5713	pub crbn_rltd: Option<EnvironmentalCommodityCarbonRelated1>,
5714}
5715
5716impl AssetClassCommodityEnvironmental1Choice {
5717	pub fn validate(&self) -> Result<(), ValidationError> {
5718		if let Some(ref val) = self.emssns { val.validate()? }
5719		if let Some(ref val) = self.wthr { val.validate()? }
5720		if let Some(ref val) = self.crbn_rltd { val.validate()? }
5721		Ok(())
5722	}
5723}
5724
5725
5726// AssetClassCommodityEnvironmental2Choice ...
5727#[cfg_attr(feature = "derive_debug", derive(Debug))]
5728#[cfg_attr(feature = "derive_default", derive(Default))]
5729#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5730#[cfg_attr(feature = "derive_clone", derive(Clone))]
5731#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5732pub struct AssetClassCommodityEnvironmental2Choice {
5733	#[cfg_attr( feature = "derive_serde", serde(rename = "Emssns", skip_serializing_if = "Option::is_none") )]
5734	pub emssns: Option<EnvironmentalCommodityEmission2>,
5735	#[cfg_attr( feature = "derive_serde", serde(rename = "Wthr", skip_serializing_if = "Option::is_none") )]
5736	pub wthr: Option<EnvironmentalCommodityWeather1>,
5737	#[cfg_attr( feature = "derive_serde", serde(rename = "CrbnRltd", skip_serializing_if = "Option::is_none") )]
5738	pub crbn_rltd: Option<EnvironmentalCommodityCarbonRelated1>,
5739	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
5740	pub othr: Option<EnvironmentCommodityOther1>,
5741}
5742
5743impl AssetClassCommodityEnvironmental2Choice {
5744	pub fn validate(&self) -> Result<(), ValidationError> {
5745		if let Some(ref val) = self.emssns { val.validate()? }
5746		if let Some(ref val) = self.wthr { val.validate()? }
5747		if let Some(ref val) = self.crbn_rltd { val.validate()? }
5748		if let Some(ref val) = self.othr { val.validate()? }
5749		Ok(())
5750	}
5751}
5752
5753
5754// AssetClassCommodityEnvironmental3Choice ...
5755#[cfg_attr(feature = "derive_debug", derive(Debug))]
5756#[cfg_attr(feature = "derive_default", derive(Default))]
5757#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5758#[cfg_attr(feature = "derive_clone", derive(Clone))]
5759#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5760pub struct AssetClassCommodityEnvironmental3Choice {
5761	#[cfg_attr( feature = "derive_serde", serde(rename = "Emssns", skip_serializing_if = "Option::is_none") )]
5762	pub emssns: Option<EnvironmentalCommodityEmission3>,
5763	#[cfg_attr( feature = "derive_serde", serde(rename = "Wthr", skip_serializing_if = "Option::is_none") )]
5764	pub wthr: Option<EnvironmentalCommodityWeather2>,
5765	#[cfg_attr( feature = "derive_serde", serde(rename = "CrbnRltd", skip_serializing_if = "Option::is_none") )]
5766	pub crbn_rltd: Option<EnvironmentalCommodityCarbonRelated2>,
5767	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
5768	pub othr: Option<EnvironmentCommodityOther2>,
5769}
5770
5771impl AssetClassCommodityEnvironmental3Choice {
5772	pub fn validate(&self) -> Result<(), ValidationError> {
5773		if let Some(ref val) = self.emssns { val.validate()? }
5774		if let Some(ref val) = self.wthr { val.validate()? }
5775		if let Some(ref val) = self.crbn_rltd { val.validate()? }
5776		if let Some(ref val) = self.othr { val.validate()? }
5777		Ok(())
5778	}
5779}
5780
5781
5782// AssetClassCommodityFertilizer1Choice ...
5783#[cfg_attr(feature = "derive_debug", derive(Debug))]
5784#[cfg_attr(feature = "derive_default", derive(Default))]
5785#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5786#[cfg_attr(feature = "derive_clone", derive(Clone))]
5787#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5788pub struct AssetClassCommodityFertilizer1Choice {
5789	#[cfg_attr( feature = "derive_serde", serde(rename = "Ammn", skip_serializing_if = "Option::is_none") )]
5790	pub ammn: Option<FertilizerCommodityAmmonia1>,
5791	#[cfg_attr( feature = "derive_serde", serde(rename = "DmmnmPhspht", skip_serializing_if = "Option::is_none") )]
5792	pub dmmnm_phspht: Option<FertilizerCommodityDiammoniumPhosphate1>,
5793	#[cfg_attr( feature = "derive_serde", serde(rename = "Ptsh", skip_serializing_if = "Option::is_none") )]
5794	pub ptsh: Option<FertilizerCommodityPotash1>,
5795	#[cfg_attr( feature = "derive_serde", serde(rename = "Slphr", skip_serializing_if = "Option::is_none") )]
5796	pub slphr: Option<FertilizerCommoditySulphur1>,
5797	#[cfg_attr( feature = "derive_serde", serde(rename = "Urea", skip_serializing_if = "Option::is_none") )]
5798	pub urea: Option<FertilizerCommodityUrea1>,
5799	#[cfg_attr( feature = "derive_serde", serde(rename = "UreaAndAmmnmNtrt", skip_serializing_if = "Option::is_none") )]
5800	pub urea_and_ammnm_ntrt: Option<FertilizerCommodityUreaAndAmmoniumNitrate1>,
5801}
5802
5803impl AssetClassCommodityFertilizer1Choice {
5804	pub fn validate(&self) -> Result<(), ValidationError> {
5805		if let Some(ref val) = self.ammn { val.validate()? }
5806		if let Some(ref val) = self.dmmnm_phspht { val.validate()? }
5807		if let Some(ref val) = self.ptsh { val.validate()? }
5808		if let Some(ref val) = self.slphr { val.validate()? }
5809		if let Some(ref val) = self.urea { val.validate()? }
5810		if let Some(ref val) = self.urea_and_ammnm_ntrt { val.validate()? }
5811		Ok(())
5812	}
5813}
5814
5815
5816// AssetClassCommodityFertilizer3Choice ...
5817#[cfg_attr(feature = "derive_debug", derive(Debug))]
5818#[cfg_attr(feature = "derive_default", derive(Default))]
5819#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5820#[cfg_attr(feature = "derive_clone", derive(Clone))]
5821#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5822pub struct AssetClassCommodityFertilizer3Choice {
5823	#[cfg_attr( feature = "derive_serde", serde(rename = "Ammn", skip_serializing_if = "Option::is_none") )]
5824	pub ammn: Option<FertilizerCommodityAmmonia1>,
5825	#[cfg_attr( feature = "derive_serde", serde(rename = "DmmnmPhspht", skip_serializing_if = "Option::is_none") )]
5826	pub dmmnm_phspht: Option<FertilizerCommodityDiammoniumPhosphate1>,
5827	#[cfg_attr( feature = "derive_serde", serde(rename = "Ptsh", skip_serializing_if = "Option::is_none") )]
5828	pub ptsh: Option<FertilizerCommodityPotash1>,
5829	#[cfg_attr( feature = "derive_serde", serde(rename = "Slphr", skip_serializing_if = "Option::is_none") )]
5830	pub slphr: Option<FertilizerCommoditySulphur1>,
5831	#[cfg_attr( feature = "derive_serde", serde(rename = "Urea", skip_serializing_if = "Option::is_none") )]
5832	pub urea: Option<FertilizerCommodityUrea1>,
5833	#[cfg_attr( feature = "derive_serde", serde(rename = "UreaAndAmmnmNtrt", skip_serializing_if = "Option::is_none") )]
5834	pub urea_and_ammnm_ntrt: Option<FertilizerCommodityUreaAndAmmoniumNitrate1>,
5835	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
5836	pub othr: Option<FertilizerCommodityOther1>,
5837}
5838
5839impl AssetClassCommodityFertilizer3Choice {
5840	pub fn validate(&self) -> Result<(), ValidationError> {
5841		if let Some(ref val) = self.ammn { val.validate()? }
5842		if let Some(ref val) = self.dmmnm_phspht { val.validate()? }
5843		if let Some(ref val) = self.ptsh { val.validate()? }
5844		if let Some(ref val) = self.slphr { val.validate()? }
5845		if let Some(ref val) = self.urea { val.validate()? }
5846		if let Some(ref val) = self.urea_and_ammnm_ntrt { val.validate()? }
5847		if let Some(ref val) = self.othr { val.validate()? }
5848		Ok(())
5849	}
5850}
5851
5852
5853// AssetClassCommodityFertilizer4Choice ...
5854#[cfg_attr(feature = "derive_debug", derive(Debug))]
5855#[cfg_attr(feature = "derive_default", derive(Default))]
5856#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5857#[cfg_attr(feature = "derive_clone", derive(Clone))]
5858#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5859pub struct AssetClassCommodityFertilizer4Choice {
5860	#[cfg_attr( feature = "derive_serde", serde(rename = "Ammn", skip_serializing_if = "Option::is_none") )]
5861	pub ammn: Option<FertilizerCommodityAmmonia2>,
5862	#[cfg_attr( feature = "derive_serde", serde(rename = "DmmnmPhspht", skip_serializing_if = "Option::is_none") )]
5863	pub dmmnm_phspht: Option<FertilizerCommodityDiammoniumPhosphate2>,
5864	#[cfg_attr( feature = "derive_serde", serde(rename = "Ptsh", skip_serializing_if = "Option::is_none") )]
5865	pub ptsh: Option<FertilizerCommodityPotash2>,
5866	#[cfg_attr( feature = "derive_serde", serde(rename = "Slphr", skip_serializing_if = "Option::is_none") )]
5867	pub slphr: Option<FertilizerCommoditySulphur2>,
5868	#[cfg_attr( feature = "derive_serde", serde(rename = "Urea", skip_serializing_if = "Option::is_none") )]
5869	pub urea: Option<FertilizerCommodityUrea2>,
5870	#[cfg_attr( feature = "derive_serde", serde(rename = "UreaAndAmmnmNtrt", skip_serializing_if = "Option::is_none") )]
5871	pub urea_and_ammnm_ntrt: Option<FertilizerCommodityUreaAndAmmoniumNitrate2>,
5872	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
5873	pub othr: Option<FertilizerCommodityOther2>,
5874}
5875
5876impl AssetClassCommodityFertilizer4Choice {
5877	pub fn validate(&self) -> Result<(), ValidationError> {
5878		if let Some(ref val) = self.ammn { val.validate()? }
5879		if let Some(ref val) = self.dmmnm_phspht { val.validate()? }
5880		if let Some(ref val) = self.ptsh { val.validate()? }
5881		if let Some(ref val) = self.slphr { val.validate()? }
5882		if let Some(ref val) = self.urea { val.validate()? }
5883		if let Some(ref val) = self.urea_and_ammnm_ntrt { val.validate()? }
5884		if let Some(ref val) = self.othr { val.validate()? }
5885		Ok(())
5886	}
5887}
5888
5889
5890// AssetClassCommodityFreight1Choice ...
5891#[cfg_attr(feature = "derive_debug", derive(Debug))]
5892#[cfg_attr(feature = "derive_default", derive(Default))]
5893#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5894#[cfg_attr(feature = "derive_clone", derive(Clone))]
5895#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5896pub struct AssetClassCommodityFreight1Choice {
5897	#[cfg_attr( feature = "derive_serde", serde(rename = "Dry", skip_serializing_if = "Option::is_none") )]
5898	pub dry: Option<FreightCommodityDry1>,
5899	#[cfg_attr( feature = "derive_serde", serde(rename = "Wet", skip_serializing_if = "Option::is_none") )]
5900	pub wet: Option<FreightCommodityWet1>,
5901	#[cfg_attr( feature = "derive_serde", serde(rename = "CntnrShip", skip_serializing_if = "Option::is_none") )]
5902	pub cntnr_ship: Option<FreightCommodityContainerShip1>,
5903}
5904
5905impl AssetClassCommodityFreight1Choice {
5906	pub fn validate(&self) -> Result<(), ValidationError> {
5907		if let Some(ref val) = self.dry { val.validate()? }
5908		if let Some(ref val) = self.wet { val.validate()? }
5909		if let Some(ref val) = self.cntnr_ship { val.validate()? }
5910		Ok(())
5911	}
5912}
5913
5914
5915// AssetClassCommodityFreight3Choice ...
5916#[cfg_attr(feature = "derive_debug", derive(Debug))]
5917#[cfg_attr(feature = "derive_default", derive(Default))]
5918#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5919#[cfg_attr(feature = "derive_clone", derive(Clone))]
5920#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5921pub struct AssetClassCommodityFreight3Choice {
5922	#[cfg_attr( feature = "derive_serde", serde(rename = "Dry", skip_serializing_if = "Option::is_none") )]
5923	pub dry: Option<FreightCommodityDry2>,
5924	#[cfg_attr( feature = "derive_serde", serde(rename = "Wet", skip_serializing_if = "Option::is_none") )]
5925	pub wet: Option<FreightCommodityWet2>,
5926	#[cfg_attr( feature = "derive_serde", serde(rename = "CntnrShip", skip_serializing_if = "Option::is_none") )]
5927	pub cntnr_ship: Option<FreightCommodityContainerShip1>,
5928	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
5929	pub othr: Option<FreightCommodityOther1>,
5930}
5931
5932impl AssetClassCommodityFreight3Choice {
5933	pub fn validate(&self) -> Result<(), ValidationError> {
5934		if let Some(ref val) = self.dry { val.validate()? }
5935		if let Some(ref val) = self.wet { val.validate()? }
5936		if let Some(ref val) = self.cntnr_ship { val.validate()? }
5937		if let Some(ref val) = self.othr { val.validate()? }
5938		Ok(())
5939	}
5940}
5941
5942
5943// AssetClassCommodityFreight4Choice ...
5944#[cfg_attr(feature = "derive_debug", derive(Debug))]
5945#[cfg_attr(feature = "derive_default", derive(Default))]
5946#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5947#[cfg_attr(feature = "derive_clone", derive(Clone))]
5948#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5949pub struct AssetClassCommodityFreight4Choice {
5950	#[cfg_attr( feature = "derive_serde", serde(rename = "Dry", skip_serializing_if = "Option::is_none") )]
5951	pub dry: Option<FreightCommodityDry3>,
5952	#[cfg_attr( feature = "derive_serde", serde(rename = "Wet", skip_serializing_if = "Option::is_none") )]
5953	pub wet: Option<FreightCommodityWet3>,
5954	#[cfg_attr( feature = "derive_serde", serde(rename = "CntnrShip", skip_serializing_if = "Option::is_none") )]
5955	pub cntnr_ship: Option<FreightCommodityContainerShip2>,
5956	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
5957	pub othr: Option<FreightCommodityOther2>,
5958}
5959
5960impl AssetClassCommodityFreight4Choice {
5961	pub fn validate(&self) -> Result<(), ValidationError> {
5962		if let Some(ref val) = self.dry { val.validate()? }
5963		if let Some(ref val) = self.wet { val.validate()? }
5964		if let Some(ref val) = self.cntnr_ship { val.validate()? }
5965		if let Some(ref val) = self.othr { val.validate()? }
5966		Ok(())
5967	}
5968}
5969
5970
5971// AssetClassCommodityIndex1 ...
5972#[cfg_attr(feature = "derive_debug", derive(Debug))]
5973#[cfg_attr(feature = "derive_default", derive(Default))]
5974#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5975#[cfg_attr(feature = "derive_clone", derive(Clone))]
5976#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5977pub struct AssetClassCommodityIndex1 {
5978	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
5979	pub base_pdct: AssetClassProductType16Code,
5980}
5981
5982impl AssetClassCommodityIndex1 {
5983	pub fn validate(&self) -> Result<(), ValidationError> {
5984		self.base_pdct.validate()?;
5985		Ok(())
5986	}
5987}
5988
5989
5990// AssetClassCommodityIndustrialProduct1Choice ...
5991#[cfg_attr(feature = "derive_debug", derive(Debug))]
5992#[cfg_attr(feature = "derive_default", derive(Default))]
5993#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
5994#[cfg_attr(feature = "derive_clone", derive(Clone))]
5995#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
5996pub struct AssetClassCommodityIndustrialProduct1Choice {
5997	#[cfg_attr( feature = "derive_serde", serde(rename = "Cnstrctn", skip_serializing_if = "Option::is_none") )]
5998	pub cnstrctn: Option<IndustrialProductCommodityConstruction1>,
5999	#[cfg_attr( feature = "derive_serde", serde(rename = "Manfctg", skip_serializing_if = "Option::is_none") )]
6000	pub manfctg: Option<IndustrialProductCommodityManufacturing1>,
6001}
6002
6003impl AssetClassCommodityIndustrialProduct1Choice {
6004	pub fn validate(&self) -> Result<(), ValidationError> {
6005		if let Some(ref val) = self.cnstrctn { val.validate()? }
6006		if let Some(ref val) = self.manfctg { val.validate()? }
6007		Ok(())
6008	}
6009}
6010
6011
6012// AssetClassCommodityIndustrialProduct2Choice ...
6013#[cfg_attr(feature = "derive_debug", derive(Debug))]
6014#[cfg_attr(feature = "derive_default", derive(Default))]
6015#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6016#[cfg_attr(feature = "derive_clone", derive(Clone))]
6017#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6018pub struct AssetClassCommodityIndustrialProduct2Choice {
6019	#[cfg_attr( feature = "derive_serde", serde(rename = "Cnstrctn", skip_serializing_if = "Option::is_none") )]
6020	pub cnstrctn: Option<IndustrialProductCommodityConstruction2>,
6021	#[cfg_attr( feature = "derive_serde", serde(rename = "Manfctg", skip_serializing_if = "Option::is_none") )]
6022	pub manfctg: Option<IndustrialProductCommodityManufacturing2>,
6023}
6024
6025impl AssetClassCommodityIndustrialProduct2Choice {
6026	pub fn validate(&self) -> Result<(), ValidationError> {
6027		if let Some(ref val) = self.cnstrctn { val.validate()? }
6028		if let Some(ref val) = self.manfctg { val.validate()? }
6029		Ok(())
6030	}
6031}
6032
6033
6034// AssetClassCommodityInflation1 ...
6035#[cfg_attr(feature = "derive_debug", derive(Debug))]
6036#[cfg_attr(feature = "derive_default", derive(Default))]
6037#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6038#[cfg_attr(feature = "derive_clone", derive(Clone))]
6039#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6040pub struct AssetClassCommodityInflation1 {
6041	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
6042	pub base_pdct: AssetClassProductType12Code,
6043}
6044
6045impl AssetClassCommodityInflation1 {
6046	pub fn validate(&self) -> Result<(), ValidationError> {
6047		self.base_pdct.validate()?;
6048		Ok(())
6049	}
6050}
6051
6052
6053// AssetClassCommodityMetal1Choice ...
6054#[cfg_attr(feature = "derive_debug", derive(Debug))]
6055#[cfg_attr(feature = "derive_default", derive(Default))]
6056#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6057#[cfg_attr(feature = "derive_clone", derive(Clone))]
6058#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6059pub struct AssetClassCommodityMetal1Choice {
6060	#[cfg_attr( feature = "derive_serde", serde(rename = "NonPrcs", skip_serializing_if = "Option::is_none") )]
6061	pub non_prcs: Option<MetalCommodityNonPrecious1>,
6062	#[cfg_attr( feature = "derive_serde", serde(rename = "Prcs", skip_serializing_if = "Option::is_none") )]
6063	pub prcs: Option<MetalCommodityPrecious1>,
6064}
6065
6066impl AssetClassCommodityMetal1Choice {
6067	pub fn validate(&self) -> Result<(), ValidationError> {
6068		if let Some(ref val) = self.non_prcs { val.validate()? }
6069		if let Some(ref val) = self.prcs { val.validate()? }
6070		Ok(())
6071	}
6072}
6073
6074
6075// AssetClassCommodityMetal2Choice ...
6076#[cfg_attr(feature = "derive_debug", derive(Debug))]
6077#[cfg_attr(feature = "derive_default", derive(Default))]
6078#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6079#[cfg_attr(feature = "derive_clone", derive(Clone))]
6080#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6081pub struct AssetClassCommodityMetal2Choice {
6082	#[cfg_attr( feature = "derive_serde", serde(rename = "NonPrcs", skip_serializing_if = "Option::is_none") )]
6083	pub non_prcs: Option<MetalCommodityNonPrecious2>,
6084	#[cfg_attr( feature = "derive_serde", serde(rename = "Prcs", skip_serializing_if = "Option::is_none") )]
6085	pub prcs: Option<MetalCommodityPrecious2>,
6086}
6087
6088impl AssetClassCommodityMetal2Choice {
6089	pub fn validate(&self) -> Result<(), ValidationError> {
6090		if let Some(ref val) = self.non_prcs { val.validate()? }
6091		if let Some(ref val) = self.prcs { val.validate()? }
6092		Ok(())
6093	}
6094}
6095
6096
6097// AssetClassCommodityMultiCommodityExotic1 ...
6098#[cfg_attr(feature = "derive_debug", derive(Debug))]
6099#[cfg_attr(feature = "derive_default", derive(Default))]
6100#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6101#[cfg_attr(feature = "derive_clone", derive(Clone))]
6102#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6103pub struct AssetClassCommodityMultiCommodityExotic1 {
6104	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
6105	pub base_pdct: AssetClassProductType13Code,
6106}
6107
6108impl AssetClassCommodityMultiCommodityExotic1 {
6109	pub fn validate(&self) -> Result<(), ValidationError> {
6110		self.base_pdct.validate()?;
6111		Ok(())
6112	}
6113}
6114
6115
6116// AssetClassCommodityOfficialEconomicStatistics1 ...
6117#[cfg_attr(feature = "derive_debug", derive(Debug))]
6118#[cfg_attr(feature = "derive_default", derive(Default))]
6119#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6120#[cfg_attr(feature = "derive_clone", derive(Clone))]
6121#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6122pub struct AssetClassCommodityOfficialEconomicStatistics1 {
6123	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
6124	pub base_pdct: AssetClassProductType14Code,
6125}
6126
6127impl AssetClassCommodityOfficialEconomicStatistics1 {
6128	pub fn validate(&self) -> Result<(), ValidationError> {
6129		self.base_pdct.validate()?;
6130		Ok(())
6131	}
6132}
6133
6134
6135// AssetClassCommodityOther1 ...
6136#[cfg_attr(feature = "derive_debug", derive(Debug))]
6137#[cfg_attr(feature = "derive_default", derive(Default))]
6138#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6139#[cfg_attr(feature = "derive_clone", derive(Clone))]
6140#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6141pub struct AssetClassCommodityOther1 {
6142	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
6143	pub base_pdct: AssetClassProductType15Code,
6144}
6145
6146impl AssetClassCommodityOther1 {
6147	pub fn validate(&self) -> Result<(), ValidationError> {
6148		self.base_pdct.validate()?;
6149		Ok(())
6150	}
6151}
6152
6153
6154// AssetClassCommodityOtherC102Choice ...
6155#[cfg_attr(feature = "derive_debug", derive(Debug))]
6156#[cfg_attr(feature = "derive_default", derive(Default))]
6157#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6158#[cfg_attr(feature = "derive_clone", derive(Clone))]
6159#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6160pub struct AssetClassCommodityOtherC102Choice {
6161	#[cfg_attr( feature = "derive_serde", serde(rename = "Dlvrbl", skip_serializing_if = "Option::is_none") )]
6162	pub dlvrbl: Option<OtherC10CommodityDeliverable2>,
6163	#[cfg_attr( feature = "derive_serde", serde(rename = "NonDlvrbl", skip_serializing_if = "Option::is_none") )]
6164	pub non_dlvrbl: Option<OtherC10CommodityNonDeliverable2>,
6165}
6166
6167impl AssetClassCommodityOtherC102Choice {
6168	pub fn validate(&self) -> Result<(), ValidationError> {
6169		if let Some(ref val) = self.dlvrbl { val.validate()? }
6170		if let Some(ref val) = self.non_dlvrbl { val.validate()? }
6171		Ok(())
6172	}
6173}
6174
6175
6176// AssetClassCommodityPaper1Choice ...
6177#[cfg_attr(feature = "derive_debug", derive(Debug))]
6178#[cfg_attr(feature = "derive_default", derive(Default))]
6179#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6180#[cfg_attr(feature = "derive_clone", derive(Clone))]
6181#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6182pub struct AssetClassCommodityPaper1Choice {
6183	#[cfg_attr( feature = "derive_serde", serde(rename = "CntnrBrd", skip_serializing_if = "Option::is_none") )]
6184	pub cntnr_brd: Option<PaperCommodityContainerBoard1>,
6185	#[cfg_attr( feature = "derive_serde", serde(rename = "Nwsprnt", skip_serializing_if = "Option::is_none") )]
6186	pub nwsprnt: Option<PaperCommodityNewsprint1>,
6187	#[cfg_attr( feature = "derive_serde", serde(rename = "Pulp", skip_serializing_if = "Option::is_none") )]
6188	pub pulp: Option<PaperCommodityPulp1>,
6189	#[cfg_attr( feature = "derive_serde", serde(rename = "RcvrdPpr", skip_serializing_if = "Option::is_none") )]
6190	pub rcvrd_ppr: Option<PaperCommodityRecoveredPaper1>,
6191}
6192
6193impl AssetClassCommodityPaper1Choice {
6194	pub fn validate(&self) -> Result<(), ValidationError> {
6195		if let Some(ref val) = self.cntnr_brd { val.validate()? }
6196		if let Some(ref val) = self.nwsprnt { val.validate()? }
6197		if let Some(ref val) = self.pulp { val.validate()? }
6198		if let Some(ref val) = self.rcvrd_ppr { val.validate()? }
6199		Ok(())
6200	}
6201}
6202
6203
6204// AssetClassCommodityPaper3Choice ...
6205#[cfg_attr(feature = "derive_debug", derive(Debug))]
6206#[cfg_attr(feature = "derive_default", derive(Default))]
6207#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6208#[cfg_attr(feature = "derive_clone", derive(Clone))]
6209#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6210pub struct AssetClassCommodityPaper3Choice {
6211	#[cfg_attr( feature = "derive_serde", serde(rename = "CntnrBrd", skip_serializing_if = "Option::is_none") )]
6212	pub cntnr_brd: Option<PaperCommodityContainerBoard1>,
6213	#[cfg_attr( feature = "derive_serde", serde(rename = "Nwsprnt", skip_serializing_if = "Option::is_none") )]
6214	pub nwsprnt: Option<PaperCommodityNewsprint1>,
6215	#[cfg_attr( feature = "derive_serde", serde(rename = "Pulp", skip_serializing_if = "Option::is_none") )]
6216	pub pulp: Option<PaperCommodityPulp1>,
6217	#[cfg_attr( feature = "derive_serde", serde(rename = "RcvrdPpr", skip_serializing_if = "Option::is_none") )]
6218	pub rcvrd_ppr: Option<PaperCommodityRecoveredPaper1>,
6219	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
6220	pub othr: Option<PaperCommodityRecoveredPaper2>,
6221}
6222
6223impl AssetClassCommodityPaper3Choice {
6224	pub fn validate(&self) -> Result<(), ValidationError> {
6225		if let Some(ref val) = self.cntnr_brd { val.validate()? }
6226		if let Some(ref val) = self.nwsprnt { val.validate()? }
6227		if let Some(ref val) = self.pulp { val.validate()? }
6228		if let Some(ref val) = self.rcvrd_ppr { val.validate()? }
6229		if let Some(ref val) = self.othr { val.validate()? }
6230		Ok(())
6231	}
6232}
6233
6234
6235// AssetClassCommodityPaper4Choice ...
6236#[cfg_attr(feature = "derive_debug", derive(Debug))]
6237#[cfg_attr(feature = "derive_default", derive(Default))]
6238#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6239#[cfg_attr(feature = "derive_clone", derive(Clone))]
6240#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6241pub struct AssetClassCommodityPaper4Choice {
6242	#[cfg_attr( feature = "derive_serde", serde(rename = "CntnrBrd", skip_serializing_if = "Option::is_none") )]
6243	pub cntnr_brd: Option<PaperCommodityContainerBoard2>,
6244	#[cfg_attr( feature = "derive_serde", serde(rename = "Nwsprnt", skip_serializing_if = "Option::is_none") )]
6245	pub nwsprnt: Option<PaperCommodityNewsprint2>,
6246	#[cfg_attr( feature = "derive_serde", serde(rename = "Pulp", skip_serializing_if = "Option::is_none") )]
6247	pub pulp: Option<PaperCommodityPulp2>,
6248	#[cfg_attr( feature = "derive_serde", serde(rename = "RcvrdPpr", skip_serializing_if = "Option::is_none") )]
6249	pub rcvrd_ppr: Option<PaperCommodityOther1>,
6250	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
6251	pub othr: Option<PaperCommodityOther1>,
6252}
6253
6254impl AssetClassCommodityPaper4Choice {
6255	pub fn validate(&self) -> Result<(), ValidationError> {
6256		if let Some(ref val) = self.cntnr_brd { val.validate()? }
6257		if let Some(ref val) = self.nwsprnt { val.validate()? }
6258		if let Some(ref val) = self.pulp { val.validate()? }
6259		if let Some(ref val) = self.rcvrd_ppr { val.validate()? }
6260		if let Some(ref val) = self.othr { val.validate()? }
6261		Ok(())
6262	}
6263}
6264
6265
6266// AssetClassCommodityPaper5Choice ...
6267#[cfg_attr(feature = "derive_debug", derive(Debug))]
6268#[cfg_attr(feature = "derive_default", derive(Default))]
6269#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6270#[cfg_attr(feature = "derive_clone", derive(Clone))]
6271#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6272pub struct AssetClassCommodityPaper5Choice {
6273	#[cfg_attr( feature = "derive_serde", serde(rename = "CntnrBrd", skip_serializing_if = "Option::is_none") )]
6274	pub cntnr_brd: Option<PaperCommodityContainerBoard2>,
6275	#[cfg_attr( feature = "derive_serde", serde(rename = "Nwsprnt", skip_serializing_if = "Option::is_none") )]
6276	pub nwsprnt: Option<PaperCommodityNewsprint2>,
6277	#[cfg_attr( feature = "derive_serde", serde(rename = "Pulp", skip_serializing_if = "Option::is_none") )]
6278	pub pulp: Option<PaperCommodityPulp2>,
6279	#[cfg_attr( feature = "derive_serde", serde(rename = "RcvrdPpr", skip_serializing_if = "Option::is_none") )]
6280	pub rcvrd_ppr: Option<PaperCommodityRecoveredPaper3>,
6281	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
6282	pub othr: Option<PaperCommodityOther1>,
6283}
6284
6285impl AssetClassCommodityPaper5Choice {
6286	pub fn validate(&self) -> Result<(), ValidationError> {
6287		if let Some(ref val) = self.cntnr_brd { val.validate()? }
6288		if let Some(ref val) = self.nwsprnt { val.validate()? }
6289		if let Some(ref val) = self.pulp { val.validate()? }
6290		if let Some(ref val) = self.rcvrd_ppr { val.validate()? }
6291		if let Some(ref val) = self.othr { val.validate()? }
6292		Ok(())
6293	}
6294}
6295
6296
6297// AssetClassCommodityPolypropylene1Choice ...
6298#[cfg_attr(feature = "derive_debug", derive(Debug))]
6299#[cfg_attr(feature = "derive_default", derive(Default))]
6300#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6301#[cfg_attr(feature = "derive_clone", derive(Clone))]
6302#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6303pub struct AssetClassCommodityPolypropylene1Choice {
6304	#[cfg_attr( feature = "derive_serde", serde(rename = "Plstc", skip_serializing_if = "Option::is_none") )]
6305	pub plstc: Option<PolypropyleneCommodityPlastic1>,
6306}
6307
6308impl AssetClassCommodityPolypropylene1Choice {
6309	pub fn validate(&self) -> Result<(), ValidationError> {
6310		if let Some(ref val) = self.plstc { val.validate()? }
6311		Ok(())
6312	}
6313}
6314
6315
6316// AssetClassCommodityPolypropylene3Choice ...
6317#[cfg_attr(feature = "derive_debug", derive(Debug))]
6318#[cfg_attr(feature = "derive_default", derive(Default))]
6319#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6320#[cfg_attr(feature = "derive_clone", derive(Clone))]
6321#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6322pub struct AssetClassCommodityPolypropylene3Choice {
6323	#[cfg_attr( feature = "derive_serde", serde(rename = "Plstc", skip_serializing_if = "Option::is_none") )]
6324	pub plstc: Option<PolypropyleneCommodityPlastic1>,
6325	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
6326	pub othr: Option<PolypropyleneCommodityOther1>,
6327}
6328
6329impl AssetClassCommodityPolypropylene3Choice {
6330	pub fn validate(&self) -> Result<(), ValidationError> {
6331		if let Some(ref val) = self.plstc { val.validate()? }
6332		if let Some(ref val) = self.othr { val.validate()? }
6333		Ok(())
6334	}
6335}
6336
6337
6338// AssetClassCommodityPolypropylene4Choice ...
6339#[cfg_attr(feature = "derive_debug", derive(Debug))]
6340#[cfg_attr(feature = "derive_default", derive(Default))]
6341#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6342#[cfg_attr(feature = "derive_clone", derive(Clone))]
6343#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6344pub struct AssetClassCommodityPolypropylene4Choice {
6345	#[cfg_attr( feature = "derive_serde", serde(rename = "Plstc", skip_serializing_if = "Option::is_none") )]
6346	pub plstc: Option<PolypropyleneCommodityPlastic2>,
6347	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
6348	pub othr: Option<PolypropyleneCommodityOther2>,
6349}
6350
6351impl AssetClassCommodityPolypropylene4Choice {
6352	pub fn validate(&self) -> Result<(), ValidationError> {
6353		if let Some(ref val) = self.plstc { val.validate()? }
6354		if let Some(ref val) = self.othr { val.validate()? }
6355		Ok(())
6356	}
6357}
6358
6359
6360// AssetClassDetailedSubProductType10Code ...
6361#[cfg_attr(feature = "derive_debug", derive(Debug))]
6362#[cfg_attr(feature = "derive_default", derive(Default))]
6363#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6364#[cfg_attr(feature = "derive_clone", derive(Clone))]
6365#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6366pub enum AssetClassDetailedSubProductType10Code {
6367	#[cfg_attr(feature = "derive_default", default)]
6368	#[cfg_attr( feature = "derive_serde", serde(rename = "ALUM") )]
6369	CodeALUM,
6370	#[cfg_attr( feature = "derive_serde", serde(rename = "ALUA") )]
6371	CodeALUA,
6372	#[cfg_attr( feature = "derive_serde", serde(rename = "CBLT") )]
6373	CodeCBLT,
6374	#[cfg_attr( feature = "derive_serde", serde(rename = "COPR") )]
6375	CodeCOPR,
6376	#[cfg_attr( feature = "derive_serde", serde(rename = "IRON") )]
6377	CodeIRON,
6378	#[cfg_attr( feature = "derive_serde", serde(rename = "MOLY") )]
6379	CodeMOLY,
6380	#[cfg_attr( feature = "derive_serde", serde(rename = "NASC") )]
6381	CodeNASC,
6382	#[cfg_attr( feature = "derive_serde", serde(rename = "NICK") )]
6383	CodeNICK,
6384	#[cfg_attr( feature = "derive_serde", serde(rename = "STEL") )]
6385	CodeSTEL,
6386	#[cfg_attr( feature = "derive_serde", serde(rename = "TINN") )]
6387	CodeTINN,
6388	#[cfg_attr( feature = "derive_serde", serde(rename = "ZINC") )]
6389	CodeZINC,
6390	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
6391	CodeOTHR,
6392	#[cfg_attr( feature = "derive_serde", serde(rename = "LEAD") )]
6393	CodeLEAD,
6394}
6395
6396impl AssetClassDetailedSubProductType10Code {
6397	pub fn validate(&self) -> Result<(), ValidationError> {
6398		Ok(())
6399	}
6400}
6401
6402
6403// AssetClassDetailedSubProductType11Code ...
6404#[cfg_attr(feature = "derive_debug", derive(Debug))]
6405#[cfg_attr(feature = "derive_default", derive(Default))]
6406#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6407#[cfg_attr(feature = "derive_clone", derive(Clone))]
6408#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6409pub enum AssetClassDetailedSubProductType11Code {
6410	#[cfg_attr(feature = "derive_default", default)]
6411	#[cfg_attr( feature = "derive_serde", serde(rename = "GOLD") )]
6412	CodeGOLD,
6413	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
6414	CodeOTHR,
6415	#[cfg_attr( feature = "derive_serde", serde(rename = "PLDM") )]
6416	CodePLDM,
6417	#[cfg_attr( feature = "derive_serde", serde(rename = "PTNM") )]
6418	CodePTNM,
6419	#[cfg_attr( feature = "derive_serde", serde(rename = "SLVR") )]
6420	CodeSLVR,
6421}
6422
6423impl AssetClassDetailedSubProductType11Code {
6424	pub fn validate(&self) -> Result<(), ValidationError> {
6425		Ok(())
6426	}
6427}
6428
6429
6430// AssetClassDetailedSubProductType12Code ...
6431#[cfg_attr(feature = "derive_debug", derive(Debug))]
6432#[cfg_attr(feature = "derive_default", derive(Default))]
6433#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6434#[cfg_attr(feature = "derive_clone", derive(Clone))]
6435#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6436pub enum AssetClassDetailedSubProductType12Code {
6437	#[cfg_attr(feature = "derive_default", default)]
6438	#[cfg_attr( feature = "derive_serde", serde(rename = "TNKR") )]
6439	CodeTNKR,
6440}
6441
6442impl AssetClassDetailedSubProductType12Code {
6443	pub fn validate(&self) -> Result<(), ValidationError> {
6444		Ok(())
6445	}
6446}
6447
6448
6449// AssetClassDetailedSubProductType14Code ...
6450#[cfg_attr(feature = "derive_debug", derive(Debug))]
6451#[cfg_attr(feature = "derive_default", derive(Default))]
6452#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6453#[cfg_attr(feature = "derive_clone", derive(Clone))]
6454#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6455pub enum AssetClassDetailedSubProductType14Code {
6456	#[cfg_attr(feature = "derive_default", default)]
6457	#[cfg_attr( feature = "derive_serde", serde(rename = "DBCR") )]
6458	CodeDBCR,
6459}
6460
6461impl AssetClassDetailedSubProductType14Code {
6462	pub fn validate(&self) -> Result<(), ValidationError> {
6463		Ok(())
6464	}
6465}
6466
6467
6468// AssetClassDetailedSubProductType15Code ...
6469#[cfg_attr(feature = "derive_debug", derive(Debug))]
6470#[cfg_attr(feature = "derive_default", derive(Default))]
6471#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6472#[cfg_attr(feature = "derive_clone", derive(Clone))]
6473#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6474pub enum AssetClassDetailedSubProductType15Code {
6475	#[cfg_attr(feature = "derive_default", default)]
6476	#[cfg_attr( feature = "derive_serde", serde(rename = "MWHT") )]
6477	CodeMWHT,
6478}
6479
6480impl AssetClassDetailedSubProductType15Code {
6481	pub fn validate(&self) -> Result<(), ValidationError> {
6482		Ok(())
6483	}
6484}
6485
6486
6487// AssetClassDetailedSubProductType16Code ...
6488#[cfg_attr(feature = "derive_debug", derive(Debug))]
6489#[cfg_attr(feature = "derive_default", derive(Default))]
6490#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6491#[cfg_attr(feature = "derive_clone", derive(Clone))]
6492#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6493pub enum AssetClassDetailedSubProductType16Code {
6494	#[cfg_attr(feature = "derive_default", default)]
6495	#[cfg_attr( feature = "derive_serde", serde(rename = "FXCR") )]
6496	CodeFXCR,
6497	#[cfg_attr( feature = "derive_serde", serde(rename = "FXEM") )]
6498	CodeFXEM,
6499	#[cfg_attr( feature = "derive_serde", serde(rename = "FXMJ") )]
6500	CodeFXMJ,
6501	#[cfg_attr( feature = "derive_serde", serde(rename = "FUEL") )]
6502	CodeFUEL,
6503	#[cfg_attr( feature = "derive_serde", serde(rename = "FOIL") )]
6504	CodeFOIL,
6505	#[cfg_attr( feature = "derive_serde", serde(rename = "GOIL") )]
6506	CodeGOIL,
6507	#[cfg_attr( feature = "derive_serde", serde(rename = "GSLN") )]
6508	CodeGSLN,
6509	#[cfg_attr( feature = "derive_serde", serde(rename = "GASP") )]
6510	CodeGASP,
6511	#[cfg_attr( feature = "derive_serde", serde(rename = "HEAT") )]
6512	CodeHEAT,
6513	#[cfg_attr( feature = "derive_serde", serde(rename = "IRON") )]
6514	CodeIRON,
6515	#[cfg_attr( feature = "derive_serde", serde(rename = "JTFL") )]
6516	CodeJTFL,
6517	#[cfg_attr( feature = "derive_serde", serde(rename = "KERO") )]
6518	CodeKERO,
6519	#[cfg_attr( feature = "derive_serde", serde(rename = "LAMP") )]
6520	CodeLAMP,
6521	#[cfg_attr( feature = "derive_serde", serde(rename = "LEAD") )]
6522	CodeLEAD,
6523	#[cfg_attr( feature = "derive_serde", serde(rename = "LLSO") )]
6524	CodeLLSO,
6525	#[cfg_attr( feature = "derive_serde", serde(rename = "LNGG") )]
6526	CodeLNGG,
6527	#[cfg_attr( feature = "derive_serde", serde(rename = "CORN") )]
6528	CodeCORN,
6529	#[cfg_attr( feature = "derive_serde", serde(rename = "MARS") )]
6530	CodeMARS,
6531	#[cfg_attr( feature = "derive_serde", serde(rename = "MWHT") )]
6532	CodeMWHT,
6533	#[cfg_attr( feature = "derive_serde", serde(rename = "MOLY") )]
6534	CodeMOLY,
6535	#[cfg_attr( feature = "derive_serde", serde(rename = "NAPH") )]
6536	CodeNAPH,
6537	#[cfg_attr( feature = "derive_serde", serde(rename = "NBPG") )]
6538	CodeNBPG,
6539	#[cfg_attr( feature = "derive_serde", serde(rename = "NASC") )]
6540	CodeNASC,
6541	#[cfg_attr( feature = "derive_serde", serde(rename = "NCGG") )]
6542	CodeNCGG,
6543	#[cfg_attr( feature = "derive_serde", serde(rename = "NGLO") )]
6544	CodeNGLO,
6545	#[cfg_attr( feature = "derive_serde", serde(rename = "NICK") )]
6546	CodeNICK,
6547	#[cfg_attr( feature = "derive_serde", serde(rename = "OFFP") )]
6548	CodeOFFP,
6549	#[cfg_attr( feature = "derive_serde", serde(rename = "ALUM") )]
6550	CodeALUM,
6551	#[cfg_attr( feature = "derive_serde", serde(rename = "ALUA") )]
6552	CodeALUA,
6553	#[cfg_attr( feature = "derive_serde", serde(rename = "BAKK") )]
6554	CodeBAKK,
6555	#[cfg_attr( feature = "derive_serde", serde(rename = "BSLD") )]
6556	CodeBSLD,
6557	#[cfg_attr( feature = "derive_serde", serde(rename = "BDSL") )]
6558	CodeBDSL,
6559	#[cfg_attr( feature = "derive_serde", serde(rename = "BRNT") )]
6560	CodeBRNT,
6561	#[cfg_attr( feature = "derive_serde", serde(rename = "BRNX") )]
6562	CodeBRNX,
6563	#[cfg_attr( feature = "derive_serde", serde(rename = "CNDA") )]
6564	CodeCNDA,
6565	#[cfg_attr( feature = "derive_serde", serde(rename = "CERE") )]
6566	CodeCERE,
6567	#[cfg_attr( feature = "derive_serde", serde(rename = "CBLT") )]
6568	CodeCBLT,
6569	#[cfg_attr( feature = "derive_serde", serde(rename = "CCOA") )]
6570	CodeCCOA,
6571	#[cfg_attr( feature = "derive_serde", serde(rename = "COND") )]
6572	CodeCOND,
6573	#[cfg_attr( feature = "derive_serde", serde(rename = "CSHP") )]
6574	CodeCSHP,
6575	#[cfg_attr( feature = "derive_serde", serde(rename = "COPR") )]
6576	CodeCOPR,
6577	#[cfg_attr( feature = "derive_serde", serde(rename = "DSEL") )]
6578	CodeDSEL,
6579	#[cfg_attr( feature = "derive_serde", serde(rename = "DBCR") )]
6580	CodeDBCR,
6581	#[cfg_attr( feature = "derive_serde", serde(rename = "DUBA") )]
6582	CodeDUBA,
6583	#[cfg_attr( feature = "derive_serde", serde(rename = "ERUE") )]
6584	CodeERUE,
6585	#[cfg_attr( feature = "derive_serde", serde(rename = "ESPO") )]
6586	CodeESPO,
6587	#[cfg_attr( feature = "derive_serde", serde(rename = "ETHA") )]
6588	CodeETHA,
6589	#[cfg_attr( feature = "derive_serde", serde(rename = "EUAE") )]
6590	CodeEUAE,
6591	#[cfg_attr( feature = "derive_serde", serde(rename = "EUAA") )]
6592	CodeEUAA,
6593	#[cfg_attr( feature = "derive_serde", serde(rename = "FWHT") )]
6594	CodeFWHT,
6595	#[cfg_attr( feature = "derive_serde", serde(rename = "FITR") )]
6596	CodeFITR,
6597	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
6598	CodeOTHR,
6599	#[cfg_attr( feature = "derive_serde", serde(rename = "PLDM") )]
6600	CodePLDM,
6601	#[cfg_attr( feature = "derive_serde", serde(rename = "PKLD") )]
6602	CodePKLD,
6603	#[cfg_attr( feature = "derive_serde", serde(rename = "PTNM") )]
6604	CodePTNM,
6605	#[cfg_attr( feature = "derive_serde", serde(rename = "POTA") )]
6606	CodePOTA,
6607	#[cfg_attr( feature = "derive_serde", serde(rename = "RPSD") )]
6608	CodeRPSD,
6609	#[cfg_attr( feature = "derive_serde", serde(rename = "BRWN") )]
6610	CodeBRWN,
6611	#[cfg_attr( feature = "derive_serde", serde(rename = "RICE") )]
6612	CodeRICE,
6613	#[cfg_attr( feature = "derive_serde", serde(rename = "ROBU") )]
6614	CodeROBU,
6615	#[cfg_attr( feature = "derive_serde", serde(rename = "SLVR") )]
6616	CodeSLVR,
6617	#[cfg_attr( feature = "derive_serde", serde(rename = "SOYB") )]
6618	CodeSOYB,
6619	#[cfg_attr( feature = "derive_serde", serde(rename = "STEL") )]
6620	CodeSTEL,
6621	#[cfg_attr( feature = "derive_serde", serde(rename = "TNKR") )]
6622	CodeTNKR,
6623	#[cfg_attr( feature = "derive_serde", serde(rename = "TAPI") )]
6624	CodeTAPI,
6625	#[cfg_attr( feature = "derive_serde", serde(rename = "TINN") )]
6626	CodeTINN,
6627	#[cfg_attr( feature = "derive_serde", serde(rename = "TTFG") )]
6628	CodeTTFG,
6629	#[cfg_attr( feature = "derive_serde", serde(rename = "URAL") )]
6630	CodeURAL,
6631	#[cfg_attr( feature = "derive_serde", serde(rename = "WHSG") )]
6632	CodeWHSG,
6633	#[cfg_attr( feature = "derive_serde", serde(rename = "WTIO") )]
6634	CodeWTIO,
6635	#[cfg_attr( feature = "derive_serde", serde(rename = "ZINC") )]
6636	CodeZINC,
6637}
6638
6639impl AssetClassDetailedSubProductType16Code {
6640	pub fn validate(&self) -> Result<(), ValidationError> {
6641		Ok(())
6642	}
6643}
6644
6645
6646// AssetClassDetailedSubProductType1Choice ...
6647#[cfg_attr(feature = "derive_debug", derive(Debug))]
6648#[cfg_attr(feature = "derive_default", derive(Default))]
6649#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6650#[cfg_attr(feature = "derive_clone", derive(Clone))]
6651#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6652pub struct AssetClassDetailedSubProductType1Choice {
6653	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
6654	pub cd: Option<AssetClassDetailedSubProductType16Code>,
6655	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
6656	pub prtry: Option<GenericIdentification36>,
6657}
6658
6659impl AssetClassDetailedSubProductType1Choice {
6660	pub fn validate(&self) -> Result<(), ValidationError> {
6661		if let Some(ref val) = self.cd { val.validate()? }
6662		if let Some(ref val) = self.prtry { val.validate()? }
6663		Ok(())
6664	}
6665}
6666
6667
6668// AssetClassDetailedSubProductType1Code ...
6669#[cfg_attr(feature = "derive_debug", derive(Debug))]
6670#[cfg_attr(feature = "derive_default", derive(Default))]
6671#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6672#[cfg_attr(feature = "derive_clone", derive(Clone))]
6673#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6674pub enum AssetClassDetailedSubProductType1Code {
6675	#[cfg_attr(feature = "derive_default", default)]
6676	#[cfg_attr( feature = "derive_serde", serde(rename = "FWHT") )]
6677	CodeFWHT,
6678	#[cfg_attr( feature = "derive_serde", serde(rename = "SOYB") )]
6679	CodeSOYB,
6680	#[cfg_attr( feature = "derive_serde", serde(rename = "RPSD") )]
6681	CodeRPSD,
6682	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
6683	CodeOTHR,
6684	#[cfg_attr( feature = "derive_serde", serde(rename = "CORN") )]
6685	CodeCORN,
6686	#[cfg_attr( feature = "derive_serde", serde(rename = "RICE") )]
6687	CodeRICE,
6688}
6689
6690impl AssetClassDetailedSubProductType1Code {
6691	pub fn validate(&self) -> Result<(), ValidationError> {
6692		Ok(())
6693	}
6694}
6695
6696
6697// AssetClassDetailedSubProductType29Code ...
6698#[cfg_attr(feature = "derive_debug", derive(Debug))]
6699#[cfg_attr(feature = "derive_default", derive(Default))]
6700#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6701#[cfg_attr(feature = "derive_clone", derive(Clone))]
6702#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6703pub enum AssetClassDetailedSubProductType29Code {
6704	#[cfg_attr(feature = "derive_default", default)]
6705	#[cfg_attr( feature = "derive_serde", serde(rename = "LAMP") )]
6706	CodeLAMP,
6707	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
6708	CodeOTHR,
6709}
6710
6711impl AssetClassDetailedSubProductType29Code {
6712	pub fn validate(&self) -> Result<(), ValidationError> {
6713		Ok(())
6714	}
6715}
6716
6717
6718// AssetClassDetailedSubProductType2Code ...
6719#[cfg_attr(feature = "derive_debug", derive(Debug))]
6720#[cfg_attr(feature = "derive_default", derive(Default))]
6721#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6722#[cfg_attr(feature = "derive_clone", derive(Clone))]
6723#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6724pub enum AssetClassDetailedSubProductType2Code {
6725	#[cfg_attr(feature = "derive_default", default)]
6726	#[cfg_attr( feature = "derive_serde", serde(rename = "ROBU") )]
6727	CodeROBU,
6728	#[cfg_attr( feature = "derive_serde", serde(rename = "CCOA") )]
6729	CodeCCOA,
6730	#[cfg_attr( feature = "derive_serde", serde(rename = "BRWN") )]
6731	CodeBRWN,
6732	#[cfg_attr( feature = "derive_serde", serde(rename = "WHSG") )]
6733	CodeWHSG,
6734	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
6735	CodeOTHR,
6736}
6737
6738impl AssetClassDetailedSubProductType2Code {
6739	pub fn validate(&self) -> Result<(), ValidationError> {
6740		Ok(())
6741	}
6742}
6743
6744
6745// AssetClassDetailedSubProductType30Code ...
6746#[cfg_attr(feature = "derive_debug", derive(Debug))]
6747#[cfg_attr(feature = "derive_default", derive(Default))]
6748#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6749#[cfg_attr(feature = "derive_clone", derive(Clone))]
6750#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6751pub enum AssetClassDetailedSubProductType30Code {
6752	#[cfg_attr(feature = "derive_default", default)]
6753	#[cfg_attr( feature = "derive_serde", serde(rename = "MWHT") )]
6754	CodeMWHT,
6755	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
6756	CodeOTHR,
6757}
6758
6759impl AssetClassDetailedSubProductType30Code {
6760	pub fn validate(&self) -> Result<(), ValidationError> {
6761		Ok(())
6762	}
6763}
6764
6765
6766// AssetClassDetailedSubProductType31Code ...
6767#[cfg_attr(feature = "derive_debug", derive(Debug))]
6768#[cfg_attr(feature = "derive_default", derive(Default))]
6769#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6770#[cfg_attr(feature = "derive_clone", derive(Clone))]
6771#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6772pub enum AssetClassDetailedSubProductType31Code {
6773	#[cfg_attr(feature = "derive_default", default)]
6774	#[cfg_attr( feature = "derive_serde", serde(rename = "GASP") )]
6775	CodeGASP,
6776	#[cfg_attr( feature = "derive_serde", serde(rename = "LNGG") )]
6777	CodeLNGG,
6778	#[cfg_attr( feature = "derive_serde", serde(rename = "NCGG") )]
6779	CodeNCGG,
6780	#[cfg_attr( feature = "derive_serde", serde(rename = "TTFG") )]
6781	CodeTTFG,
6782	#[cfg_attr( feature = "derive_serde", serde(rename = "NBPG") )]
6783	CodeNBPG,
6784	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
6785	CodeOTHR,
6786}
6787
6788impl AssetClassDetailedSubProductType31Code {
6789	pub fn validate(&self) -> Result<(), ValidationError> {
6790		Ok(())
6791	}
6792}
6793
6794
6795// AssetClassDetailedSubProductType32Code ...
6796#[cfg_attr(feature = "derive_debug", derive(Debug))]
6797#[cfg_attr(feature = "derive_default", derive(Default))]
6798#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6799#[cfg_attr(feature = "derive_clone", derive(Clone))]
6800#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6801pub enum AssetClassDetailedSubProductType32Code {
6802	#[cfg_attr(feature = "derive_default", default)]
6803	#[cfg_attr( feature = "derive_serde", serde(rename = "BAKK") )]
6804	CodeBAKK,
6805	#[cfg_attr( feature = "derive_serde", serde(rename = "BDSL") )]
6806	CodeBDSL,
6807	#[cfg_attr( feature = "derive_serde", serde(rename = "BRNT") )]
6808	CodeBRNT,
6809	#[cfg_attr( feature = "derive_serde", serde(rename = "BRNX") )]
6810	CodeBRNX,
6811	#[cfg_attr( feature = "derive_serde", serde(rename = "CNDA") )]
6812	CodeCNDA,
6813	#[cfg_attr( feature = "derive_serde", serde(rename = "COND") )]
6814	CodeCOND,
6815	#[cfg_attr( feature = "derive_serde", serde(rename = "DSEL") )]
6816	CodeDSEL,
6817	#[cfg_attr( feature = "derive_serde", serde(rename = "DUBA") )]
6818	CodeDUBA,
6819	#[cfg_attr( feature = "derive_serde", serde(rename = "ESPO") )]
6820	CodeESPO,
6821	#[cfg_attr( feature = "derive_serde", serde(rename = "ETHA") )]
6822	CodeETHA,
6823	#[cfg_attr( feature = "derive_serde", serde(rename = "FUEL") )]
6824	CodeFUEL,
6825	#[cfg_attr( feature = "derive_serde", serde(rename = "FOIL") )]
6826	CodeFOIL,
6827	#[cfg_attr( feature = "derive_serde", serde(rename = "GOIL") )]
6828	CodeGOIL,
6829	#[cfg_attr( feature = "derive_serde", serde(rename = "GSLN") )]
6830	CodeGSLN,
6831	#[cfg_attr( feature = "derive_serde", serde(rename = "HEAT") )]
6832	CodeHEAT,
6833	#[cfg_attr( feature = "derive_serde", serde(rename = "JTFL") )]
6834	CodeJTFL,
6835	#[cfg_attr( feature = "derive_serde", serde(rename = "KERO") )]
6836	CodeKERO,
6837	#[cfg_attr( feature = "derive_serde", serde(rename = "LLSO") )]
6838	CodeLLSO,
6839	#[cfg_attr( feature = "derive_serde", serde(rename = "MARS") )]
6840	CodeMARS,
6841	#[cfg_attr( feature = "derive_serde", serde(rename = "NAPH") )]
6842	CodeNAPH,
6843	#[cfg_attr( feature = "derive_serde", serde(rename = "NGLO") )]
6844	CodeNGLO,
6845	#[cfg_attr( feature = "derive_serde", serde(rename = "TAPI") )]
6846	CodeTAPI,
6847	#[cfg_attr( feature = "derive_serde", serde(rename = "WTIO") )]
6848	CodeWTIO,
6849	#[cfg_attr( feature = "derive_serde", serde(rename = "URAL") )]
6850	CodeURAL,
6851	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
6852	CodeOTHR,
6853}
6854
6855impl AssetClassDetailedSubProductType32Code {
6856	pub fn validate(&self) -> Result<(), ValidationError> {
6857		Ok(())
6858	}
6859}
6860
6861
6862// AssetClassDetailedSubProductType33Code ...
6863#[cfg_attr(feature = "derive_debug", derive(Debug))]
6864#[cfg_attr(feature = "derive_default", derive(Default))]
6865#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6866#[cfg_attr(feature = "derive_clone", derive(Clone))]
6867#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6868pub enum AssetClassDetailedSubProductType33Code {
6869	#[cfg_attr(feature = "derive_default", default)]
6870	#[cfg_attr( feature = "derive_serde", serde(rename = "DBCR") )]
6871	CodeDBCR,
6872	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
6873	CodeOTHR,
6874}
6875
6876impl AssetClassDetailedSubProductType33Code {
6877	pub fn validate(&self) -> Result<(), ValidationError> {
6878		Ok(())
6879	}
6880}
6881
6882
6883// AssetClassDetailedSubProductType34Code ...
6884#[cfg_attr(feature = "derive_debug", derive(Debug))]
6885#[cfg_attr(feature = "derive_default", derive(Default))]
6886#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6887#[cfg_attr(feature = "derive_clone", derive(Clone))]
6888#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6889pub enum AssetClassDetailedSubProductType34Code {
6890	#[cfg_attr(feature = "derive_default", default)]
6891	#[cfg_attr( feature = "derive_serde", serde(rename = "TNKR") )]
6892	CodeTNKR,
6893	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
6894	CodeOTHR,
6895}
6896
6897impl AssetClassDetailedSubProductType34Code {
6898	pub fn validate(&self) -> Result<(), ValidationError> {
6899		Ok(())
6900	}
6901}
6902
6903
6904// AssetClassDetailedSubProductType4Code ...
6905#[cfg_attr(feature = "derive_debug", derive(Debug))]
6906#[cfg_attr(feature = "derive_default", derive(Default))]
6907#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6908#[cfg_attr(feature = "derive_clone", derive(Clone))]
6909#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6910pub enum AssetClassDetailedSubProductType4Code {
6911	#[cfg_attr(feature = "derive_default", default)]
6912	#[cfg_attr( feature = "derive_serde", serde(rename = "LAMP") )]
6913	CodeLAMP,
6914}
6915
6916impl AssetClassDetailedSubProductType4Code {
6917	pub fn validate(&self) -> Result<(), ValidationError> {
6918		Ok(())
6919	}
6920}
6921
6922
6923// AssetClassDetailedSubProductType5Code ...
6924#[cfg_attr(feature = "derive_debug", derive(Debug))]
6925#[cfg_attr(feature = "derive_default", derive(Default))]
6926#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6927#[cfg_attr(feature = "derive_clone", derive(Clone))]
6928#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6929pub enum AssetClassDetailedSubProductType5Code {
6930	#[cfg_attr(feature = "derive_default", default)]
6931	#[cfg_attr( feature = "derive_serde", serde(rename = "BSLD") )]
6932	CodeBSLD,
6933	#[cfg_attr( feature = "derive_serde", serde(rename = "FITR") )]
6934	CodeFITR,
6935	#[cfg_attr( feature = "derive_serde", serde(rename = "PKLD") )]
6936	CodePKLD,
6937	#[cfg_attr( feature = "derive_serde", serde(rename = "OFFP") )]
6938	CodeOFFP,
6939	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
6940	CodeOTHR,
6941}
6942
6943impl AssetClassDetailedSubProductType5Code {
6944	pub fn validate(&self) -> Result<(), ValidationError> {
6945		Ok(())
6946	}
6947}
6948
6949
6950// AssetClassDetailedSubProductType6Code ...
6951#[cfg_attr(feature = "derive_debug", derive(Debug))]
6952#[cfg_attr(feature = "derive_default", derive(Default))]
6953#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6954#[cfg_attr(feature = "derive_clone", derive(Clone))]
6955#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6956pub enum AssetClassDetailedSubProductType6Code {
6957	#[cfg_attr(feature = "derive_default", default)]
6958	#[cfg_attr( feature = "derive_serde", serde(rename = "GASP") )]
6959	CodeGASP,
6960	#[cfg_attr( feature = "derive_serde", serde(rename = "LNGG") )]
6961	CodeLNGG,
6962	#[cfg_attr( feature = "derive_serde", serde(rename = "NCGG") )]
6963	CodeNCGG,
6964	#[cfg_attr( feature = "derive_serde", serde(rename = "TTFG") )]
6965	CodeTTFG,
6966	#[cfg_attr( feature = "derive_serde", serde(rename = "NBPG") )]
6967	CodeNBPG,
6968}
6969
6970impl AssetClassDetailedSubProductType6Code {
6971	pub fn validate(&self) -> Result<(), ValidationError> {
6972		Ok(())
6973	}
6974}
6975
6976
6977// AssetClassDetailedSubProductType7Code ...
6978#[cfg_attr(feature = "derive_debug", derive(Debug))]
6979#[cfg_attr(feature = "derive_default", derive(Default))]
6980#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
6981#[cfg_attr(feature = "derive_clone", derive(Clone))]
6982#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
6983pub enum AssetClassDetailedSubProductType7Code {
6984	#[cfg_attr(feature = "derive_default", default)]
6985	#[cfg_attr( feature = "derive_serde", serde(rename = "BAKK") )]
6986	CodeBAKK,
6987	#[cfg_attr( feature = "derive_serde", serde(rename = "BDSL") )]
6988	CodeBDSL,
6989	#[cfg_attr( feature = "derive_serde", serde(rename = "BRNT") )]
6990	CodeBRNT,
6991	#[cfg_attr( feature = "derive_serde", serde(rename = "BRNX") )]
6992	CodeBRNX,
6993	#[cfg_attr( feature = "derive_serde", serde(rename = "CNDA") )]
6994	CodeCNDA,
6995	#[cfg_attr( feature = "derive_serde", serde(rename = "COND") )]
6996	CodeCOND,
6997	#[cfg_attr( feature = "derive_serde", serde(rename = "DSEL") )]
6998	CodeDSEL,
6999	#[cfg_attr( feature = "derive_serde", serde(rename = "DUBA") )]
7000	CodeDUBA,
7001	#[cfg_attr( feature = "derive_serde", serde(rename = "ESPO") )]
7002	CodeESPO,
7003	#[cfg_attr( feature = "derive_serde", serde(rename = "ETHA") )]
7004	CodeETHA,
7005	#[cfg_attr( feature = "derive_serde", serde(rename = "FUEL") )]
7006	CodeFUEL,
7007	#[cfg_attr( feature = "derive_serde", serde(rename = "FOIL") )]
7008	CodeFOIL,
7009	#[cfg_attr( feature = "derive_serde", serde(rename = "GOIL") )]
7010	CodeGOIL,
7011	#[cfg_attr( feature = "derive_serde", serde(rename = "GSLN") )]
7012	CodeGSLN,
7013	#[cfg_attr( feature = "derive_serde", serde(rename = "HEAT") )]
7014	CodeHEAT,
7015	#[cfg_attr( feature = "derive_serde", serde(rename = "JTFL") )]
7016	CodeJTFL,
7017	#[cfg_attr( feature = "derive_serde", serde(rename = "KERO") )]
7018	CodeKERO,
7019	#[cfg_attr( feature = "derive_serde", serde(rename = "LLSO") )]
7020	CodeLLSO,
7021	#[cfg_attr( feature = "derive_serde", serde(rename = "MARS") )]
7022	CodeMARS,
7023	#[cfg_attr( feature = "derive_serde", serde(rename = "NAPH") )]
7024	CodeNAPH,
7025	#[cfg_attr( feature = "derive_serde", serde(rename = "NGLO") )]
7026	CodeNGLO,
7027	#[cfg_attr( feature = "derive_serde", serde(rename = "TAPI") )]
7028	CodeTAPI,
7029	#[cfg_attr( feature = "derive_serde", serde(rename = "WTIO") )]
7030	CodeWTIO,
7031	#[cfg_attr( feature = "derive_serde", serde(rename = "URAL") )]
7032	CodeURAL,
7033}
7034
7035impl AssetClassDetailedSubProductType7Code {
7036	pub fn validate(&self) -> Result<(), ValidationError> {
7037		Ok(())
7038	}
7039}
7040
7041
7042// AssetClassDetailedSubProductType8Code ...
7043#[cfg_attr(feature = "derive_debug", derive(Debug))]
7044#[cfg_attr(feature = "derive_default", derive(Default))]
7045#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7046#[cfg_attr(feature = "derive_clone", derive(Clone))]
7047#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7048pub enum AssetClassDetailedSubProductType8Code {
7049	#[cfg_attr(feature = "derive_default", default)]
7050	#[cfg_attr( feature = "derive_serde", serde(rename = "CERE") )]
7051	CodeCERE,
7052	#[cfg_attr( feature = "derive_serde", serde(rename = "ERUE") )]
7053	CodeERUE,
7054	#[cfg_attr( feature = "derive_serde", serde(rename = "EUAE") )]
7055	CodeEUAE,
7056	#[cfg_attr( feature = "derive_serde", serde(rename = "EUAA") )]
7057	CodeEUAA,
7058	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
7059	CodeOTHR,
7060}
7061
7062impl AssetClassDetailedSubProductType8Code {
7063	pub fn validate(&self) -> Result<(), ValidationError> {
7064		Ok(())
7065	}
7066}
7067
7068
7069// AssetClassProductType11Code ...
7070#[cfg_attr(feature = "derive_debug", derive(Debug))]
7071#[cfg_attr(feature = "derive_default", derive(Default))]
7072#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7073#[cfg_attr(feature = "derive_clone", derive(Clone))]
7074#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7075pub enum AssetClassProductType11Code {
7076	#[cfg_attr(feature = "derive_default", default)]
7077	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHC") )]
7078	CodeOTHC,
7079}
7080
7081impl AssetClassProductType11Code {
7082	pub fn validate(&self) -> Result<(), ValidationError> {
7083		Ok(())
7084	}
7085}
7086
7087
7088// AssetClassProductType12Code ...
7089#[cfg_attr(feature = "derive_debug", derive(Debug))]
7090#[cfg_attr(feature = "derive_default", derive(Default))]
7091#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7092#[cfg_attr(feature = "derive_clone", derive(Clone))]
7093#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7094pub enum AssetClassProductType12Code {
7095	#[cfg_attr(feature = "derive_default", default)]
7096	#[cfg_attr( feature = "derive_serde", serde(rename = "INFL") )]
7097	CodeINFL,
7098}
7099
7100impl AssetClassProductType12Code {
7101	pub fn validate(&self) -> Result<(), ValidationError> {
7102		Ok(())
7103	}
7104}
7105
7106
7107// AssetClassProductType13Code ...
7108#[cfg_attr(feature = "derive_debug", derive(Debug))]
7109#[cfg_attr(feature = "derive_default", derive(Default))]
7110#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7111#[cfg_attr(feature = "derive_clone", derive(Clone))]
7112#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7113pub enum AssetClassProductType13Code {
7114	#[cfg_attr(feature = "derive_default", default)]
7115	#[cfg_attr( feature = "derive_serde", serde(rename = "MCEX") )]
7116	CodeMCEX,
7117}
7118
7119impl AssetClassProductType13Code {
7120	pub fn validate(&self) -> Result<(), ValidationError> {
7121		Ok(())
7122	}
7123}
7124
7125
7126// AssetClassProductType14Code ...
7127#[cfg_attr(feature = "derive_debug", derive(Debug))]
7128#[cfg_attr(feature = "derive_default", derive(Default))]
7129#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7130#[cfg_attr(feature = "derive_clone", derive(Clone))]
7131#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7132pub enum AssetClassProductType14Code {
7133	#[cfg_attr(feature = "derive_default", default)]
7134	#[cfg_attr( feature = "derive_serde", serde(rename = "OEST") )]
7135	CodeOEST,
7136}
7137
7138impl AssetClassProductType14Code {
7139	pub fn validate(&self) -> Result<(), ValidationError> {
7140		Ok(())
7141	}
7142}
7143
7144
7145// AssetClassProductType15Code ...
7146#[cfg_attr(feature = "derive_debug", derive(Debug))]
7147#[cfg_attr(feature = "derive_default", derive(Default))]
7148#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7149#[cfg_attr(feature = "derive_clone", derive(Clone))]
7150#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7151pub enum AssetClassProductType15Code {
7152	#[cfg_attr(feature = "derive_default", default)]
7153	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
7154	CodeOTHR,
7155}
7156
7157impl AssetClassProductType15Code {
7158	pub fn validate(&self) -> Result<(), ValidationError> {
7159		Ok(())
7160	}
7161}
7162
7163
7164// AssetClassProductType16Code ...
7165#[cfg_attr(feature = "derive_debug", derive(Debug))]
7166#[cfg_attr(feature = "derive_default", derive(Default))]
7167#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7168#[cfg_attr(feature = "derive_clone", derive(Clone))]
7169#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7170pub enum AssetClassProductType16Code {
7171	#[cfg_attr(feature = "derive_default", default)]
7172	#[cfg_attr( feature = "derive_serde", serde(rename = "INDX") )]
7173	CodeINDX,
7174}
7175
7176impl AssetClassProductType16Code {
7177	pub fn validate(&self) -> Result<(), ValidationError> {
7178		Ok(())
7179	}
7180}
7181
7182
7183// AssetClassProductType1Code ...
7184#[cfg_attr(feature = "derive_debug", derive(Debug))]
7185#[cfg_attr(feature = "derive_default", derive(Default))]
7186#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7187#[cfg_attr(feature = "derive_clone", derive(Clone))]
7188#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7189pub enum AssetClassProductType1Code {
7190	#[cfg_attr(feature = "derive_default", default)]
7191	#[cfg_attr( feature = "derive_serde", serde(rename = "AGRI") )]
7192	CodeAGRI,
7193}
7194
7195impl AssetClassProductType1Code {
7196	pub fn validate(&self) -> Result<(), ValidationError> {
7197		Ok(())
7198	}
7199}
7200
7201
7202// AssetClassProductType2Code ...
7203#[cfg_attr(feature = "derive_debug", derive(Debug))]
7204#[cfg_attr(feature = "derive_default", derive(Default))]
7205#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7206#[cfg_attr(feature = "derive_clone", derive(Clone))]
7207#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7208pub enum AssetClassProductType2Code {
7209	#[cfg_attr(feature = "derive_default", default)]
7210	#[cfg_attr( feature = "derive_serde", serde(rename = "NRGY") )]
7211	CodeNRGY,
7212}
7213
7214impl AssetClassProductType2Code {
7215	pub fn validate(&self) -> Result<(), ValidationError> {
7216		Ok(())
7217	}
7218}
7219
7220
7221// AssetClassProductType3Code ...
7222#[cfg_attr(feature = "derive_debug", derive(Debug))]
7223#[cfg_attr(feature = "derive_default", derive(Default))]
7224#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7225#[cfg_attr(feature = "derive_clone", derive(Clone))]
7226#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7227pub enum AssetClassProductType3Code {
7228	#[cfg_attr(feature = "derive_default", default)]
7229	#[cfg_attr( feature = "derive_serde", serde(rename = "ENVR") )]
7230	CodeENVR,
7231}
7232
7233impl AssetClassProductType3Code {
7234	pub fn validate(&self) -> Result<(), ValidationError> {
7235		Ok(())
7236	}
7237}
7238
7239
7240// AssetClassProductType4Code ...
7241#[cfg_attr(feature = "derive_debug", derive(Debug))]
7242#[cfg_attr(feature = "derive_default", derive(Default))]
7243#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7244#[cfg_attr(feature = "derive_clone", derive(Clone))]
7245#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7246pub enum AssetClassProductType4Code {
7247	#[cfg_attr(feature = "derive_default", default)]
7248	#[cfg_attr( feature = "derive_serde", serde(rename = "FRGT") )]
7249	CodeFRGT,
7250}
7251
7252impl AssetClassProductType4Code {
7253	pub fn validate(&self) -> Result<(), ValidationError> {
7254		Ok(())
7255	}
7256}
7257
7258
7259// AssetClassProductType5Code ...
7260#[cfg_attr(feature = "derive_debug", derive(Debug))]
7261#[cfg_attr(feature = "derive_default", derive(Default))]
7262#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7263#[cfg_attr(feature = "derive_clone", derive(Clone))]
7264#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7265pub enum AssetClassProductType5Code {
7266	#[cfg_attr(feature = "derive_default", default)]
7267	#[cfg_attr( feature = "derive_serde", serde(rename = "FRTL") )]
7268	CodeFRTL,
7269}
7270
7271impl AssetClassProductType5Code {
7272	pub fn validate(&self) -> Result<(), ValidationError> {
7273		Ok(())
7274	}
7275}
7276
7277
7278// AssetClassProductType6Code ...
7279#[cfg_attr(feature = "derive_debug", derive(Debug))]
7280#[cfg_attr(feature = "derive_default", derive(Default))]
7281#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7282#[cfg_attr(feature = "derive_clone", derive(Clone))]
7283#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7284pub enum AssetClassProductType6Code {
7285	#[cfg_attr(feature = "derive_default", default)]
7286	#[cfg_attr( feature = "derive_serde", serde(rename = "INDP") )]
7287	CodeINDP,
7288}
7289
7290impl AssetClassProductType6Code {
7291	pub fn validate(&self) -> Result<(), ValidationError> {
7292		Ok(())
7293	}
7294}
7295
7296
7297// AssetClassProductType7Code ...
7298#[cfg_attr(feature = "derive_debug", derive(Debug))]
7299#[cfg_attr(feature = "derive_default", derive(Default))]
7300#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7301#[cfg_attr(feature = "derive_clone", derive(Clone))]
7302#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7303pub enum AssetClassProductType7Code {
7304	#[cfg_attr(feature = "derive_default", default)]
7305	#[cfg_attr( feature = "derive_serde", serde(rename = "METL") )]
7306	CodeMETL,
7307}
7308
7309impl AssetClassProductType7Code {
7310	pub fn validate(&self) -> Result<(), ValidationError> {
7311		Ok(())
7312	}
7313}
7314
7315
7316// AssetClassProductType8Code ...
7317#[cfg_attr(feature = "derive_debug", derive(Debug))]
7318#[cfg_attr(feature = "derive_default", derive(Default))]
7319#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7320#[cfg_attr(feature = "derive_clone", derive(Clone))]
7321#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7322pub enum AssetClassProductType8Code {
7323	#[cfg_attr(feature = "derive_default", default)]
7324	#[cfg_attr( feature = "derive_serde", serde(rename = "PAPR") )]
7325	CodePAPR,
7326}
7327
7328impl AssetClassProductType8Code {
7329	pub fn validate(&self) -> Result<(), ValidationError> {
7330		Ok(())
7331	}
7332}
7333
7334
7335// AssetClassProductType9Code ...
7336#[cfg_attr(feature = "derive_debug", derive(Debug))]
7337#[cfg_attr(feature = "derive_default", derive(Default))]
7338#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7339#[cfg_attr(feature = "derive_clone", derive(Clone))]
7340#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7341pub enum AssetClassProductType9Code {
7342	#[cfg_attr(feature = "derive_default", default)]
7343	#[cfg_attr( feature = "derive_serde", serde(rename = "POLY") )]
7344	CodePOLY,
7345}
7346
7347impl AssetClassProductType9Code {
7348	pub fn validate(&self) -> Result<(), ValidationError> {
7349		Ok(())
7350	}
7351}
7352
7353
7354// AssetClassSubProductType10Code ...
7355#[cfg_attr(feature = "derive_debug", derive(Debug))]
7356#[cfg_attr(feature = "derive_default", derive(Default))]
7357#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7358#[cfg_attr(feature = "derive_clone", derive(Clone))]
7359#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7360pub enum AssetClassSubProductType10Code {
7361	#[cfg_attr(feature = "derive_default", default)]
7362	#[cfg_attr( feature = "derive_serde", serde(rename = "EMIS") )]
7363	CodeEMIS,
7364}
7365
7366impl AssetClassSubProductType10Code {
7367	pub fn validate(&self) -> Result<(), ValidationError> {
7368		Ok(())
7369	}
7370}
7371
7372
7373// AssetClassSubProductType15Code ...
7374#[cfg_attr(feature = "derive_debug", derive(Debug))]
7375#[cfg_attr(feature = "derive_default", derive(Default))]
7376#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7377#[cfg_attr(feature = "derive_clone", derive(Clone))]
7378#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7379pub enum AssetClassSubProductType15Code {
7380	#[cfg_attr(feature = "derive_default", default)]
7381	#[cfg_attr( feature = "derive_serde", serde(rename = "NPRM") )]
7382	CodeNPRM,
7383}
7384
7385impl AssetClassSubProductType15Code {
7386	pub fn validate(&self) -> Result<(), ValidationError> {
7387		Ok(())
7388	}
7389}
7390
7391
7392// AssetClassSubProductType16Code ...
7393#[cfg_attr(feature = "derive_debug", derive(Debug))]
7394#[cfg_attr(feature = "derive_default", derive(Default))]
7395#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7396#[cfg_attr(feature = "derive_clone", derive(Clone))]
7397#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7398pub enum AssetClassSubProductType16Code {
7399	#[cfg_attr(feature = "derive_default", default)]
7400	#[cfg_attr( feature = "derive_serde", serde(rename = "PRME") )]
7401	CodePRME,
7402}
7403
7404impl AssetClassSubProductType16Code {
7405	pub fn validate(&self) -> Result<(), ValidationError> {
7406		Ok(())
7407	}
7408}
7409
7410
7411// AssetClassSubProductType18Code ...
7412#[cfg_attr(feature = "derive_debug", derive(Debug))]
7413#[cfg_attr(feature = "derive_default", derive(Default))]
7414#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7415#[cfg_attr(feature = "derive_clone", derive(Clone))]
7416#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7417pub enum AssetClassSubProductType18Code {
7418	#[cfg_attr(feature = "derive_default", default)]
7419	#[cfg_attr( feature = "derive_serde", serde(rename = "PLST") )]
7420	CodePLST,
7421}
7422
7423impl AssetClassSubProductType18Code {
7424	pub fn validate(&self) -> Result<(), ValidationError> {
7425		Ok(())
7426	}
7427}
7428
7429
7430// AssetClassSubProductType19Code ...
7431#[cfg_attr(feature = "derive_debug", derive(Debug))]
7432#[cfg_attr(feature = "derive_default", derive(Default))]
7433#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7434#[cfg_attr(feature = "derive_clone", derive(Clone))]
7435#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7436pub enum AssetClassSubProductType19Code {
7437	#[cfg_attr(feature = "derive_default", default)]
7438	#[cfg_attr( feature = "derive_serde", serde(rename = "DLVR") )]
7439	CodeDLVR,
7440	#[cfg_attr( feature = "derive_serde", serde(rename = "NDLV") )]
7441	CodeNDLV,
7442}
7443
7444impl AssetClassSubProductType19Code {
7445	pub fn validate(&self) -> Result<(), ValidationError> {
7446		Ok(())
7447	}
7448}
7449
7450
7451// AssetClassSubProductType1Code ...
7452#[cfg_attr(feature = "derive_debug", derive(Debug))]
7453#[cfg_attr(feature = "derive_default", derive(Default))]
7454#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7455#[cfg_attr(feature = "derive_clone", derive(Clone))]
7456#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7457pub enum AssetClassSubProductType1Code {
7458	#[cfg_attr(feature = "derive_default", default)]
7459	#[cfg_attr( feature = "derive_serde", serde(rename = "GROS") )]
7460	CodeGROS,
7461}
7462
7463impl AssetClassSubProductType1Code {
7464	pub fn validate(&self) -> Result<(), ValidationError> {
7465		Ok(())
7466	}
7467}
7468
7469
7470// AssetClassSubProductType20Code ...
7471#[cfg_attr(feature = "derive_debug", derive(Debug))]
7472#[cfg_attr(feature = "derive_default", derive(Default))]
7473#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7474#[cfg_attr(feature = "derive_clone", derive(Clone))]
7475#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7476pub enum AssetClassSubProductType20Code {
7477	#[cfg_attr(feature = "derive_default", default)]
7478	#[cfg_attr( feature = "derive_serde", serde(rename = "DIRY") )]
7479	CodeDIRY,
7480}
7481
7482impl AssetClassSubProductType20Code {
7483	pub fn validate(&self) -> Result<(), ValidationError> {
7484		Ok(())
7485	}
7486}
7487
7488
7489// AssetClassSubProductType21Code ...
7490#[cfg_attr(feature = "derive_debug", derive(Debug))]
7491#[cfg_attr(feature = "derive_default", derive(Default))]
7492#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7493#[cfg_attr(feature = "derive_clone", derive(Clone))]
7494#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7495pub enum AssetClassSubProductType21Code {
7496	#[cfg_attr(feature = "derive_default", default)]
7497	#[cfg_attr( feature = "derive_serde", serde(rename = "FRST") )]
7498	CodeFRST,
7499}
7500
7501impl AssetClassSubProductType21Code {
7502	pub fn validate(&self) -> Result<(), ValidationError> {
7503		Ok(())
7504	}
7505}
7506
7507
7508// AssetClassSubProductType22Code ...
7509#[cfg_attr(feature = "derive_debug", derive(Debug))]
7510#[cfg_attr(feature = "derive_default", derive(Default))]
7511#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7512#[cfg_attr(feature = "derive_clone", derive(Clone))]
7513#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7514pub enum AssetClassSubProductType22Code {
7515	#[cfg_attr(feature = "derive_default", default)]
7516	#[cfg_attr( feature = "derive_serde", serde(rename = "LSTK") )]
7517	CodeLSTK,
7518}
7519
7520impl AssetClassSubProductType22Code {
7521	pub fn validate(&self) -> Result<(), ValidationError> {
7522		Ok(())
7523	}
7524}
7525
7526
7527// AssetClassSubProductType23Code ...
7528#[cfg_attr(feature = "derive_debug", derive(Debug))]
7529#[cfg_attr(feature = "derive_default", derive(Default))]
7530#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7531#[cfg_attr(feature = "derive_clone", derive(Clone))]
7532#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7533pub enum AssetClassSubProductType23Code {
7534	#[cfg_attr(feature = "derive_default", default)]
7535	#[cfg_attr( feature = "derive_serde", serde(rename = "SEAF") )]
7536	CodeSEAF,
7537}
7538
7539impl AssetClassSubProductType23Code {
7540	pub fn validate(&self) -> Result<(), ValidationError> {
7541		Ok(())
7542	}
7543}
7544
7545
7546// AssetClassSubProductType24Code ...
7547#[cfg_attr(feature = "derive_debug", derive(Debug))]
7548#[cfg_attr(feature = "derive_default", derive(Default))]
7549#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7550#[cfg_attr(feature = "derive_clone", derive(Clone))]
7551#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7552pub enum AssetClassSubProductType24Code {
7553	#[cfg_attr(feature = "derive_default", default)]
7554	#[cfg_attr( feature = "derive_serde", serde(rename = "COAL") )]
7555	CodeCOAL,
7556}
7557
7558impl AssetClassSubProductType24Code {
7559	pub fn validate(&self) -> Result<(), ValidationError> {
7560		Ok(())
7561	}
7562}
7563
7564
7565// AssetClassSubProductType25Code ...
7566#[cfg_attr(feature = "derive_debug", derive(Debug))]
7567#[cfg_attr(feature = "derive_default", derive(Default))]
7568#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7569#[cfg_attr(feature = "derive_clone", derive(Clone))]
7570#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7571pub enum AssetClassSubProductType25Code {
7572	#[cfg_attr(feature = "derive_default", default)]
7573	#[cfg_attr( feature = "derive_serde", serde(rename = "DIST") )]
7574	CodeDIST,
7575}
7576
7577impl AssetClassSubProductType25Code {
7578	pub fn validate(&self) -> Result<(), ValidationError> {
7579		Ok(())
7580	}
7581}
7582
7583
7584// AssetClassSubProductType26Code ...
7585#[cfg_attr(feature = "derive_debug", derive(Debug))]
7586#[cfg_attr(feature = "derive_default", derive(Default))]
7587#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7588#[cfg_attr(feature = "derive_clone", derive(Clone))]
7589#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7590pub enum AssetClassSubProductType26Code {
7591	#[cfg_attr(feature = "derive_default", default)]
7592	#[cfg_attr( feature = "derive_serde", serde(rename = "INRG") )]
7593	CodeINRG,
7594}
7595
7596impl AssetClassSubProductType26Code {
7597	pub fn validate(&self) -> Result<(), ValidationError> {
7598		Ok(())
7599	}
7600}
7601
7602
7603// AssetClassSubProductType27Code ...
7604#[cfg_attr(feature = "derive_debug", derive(Debug))]
7605#[cfg_attr(feature = "derive_default", derive(Default))]
7606#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7607#[cfg_attr(feature = "derive_clone", derive(Clone))]
7608#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7609pub enum AssetClassSubProductType27Code {
7610	#[cfg_attr(feature = "derive_default", default)]
7611	#[cfg_attr( feature = "derive_serde", serde(rename = "LGHT") )]
7612	CodeLGHT,
7613}
7614
7615impl AssetClassSubProductType27Code {
7616	pub fn validate(&self) -> Result<(), ValidationError> {
7617		Ok(())
7618	}
7619}
7620
7621
7622// AssetClassSubProductType28Code ...
7623#[cfg_attr(feature = "derive_debug", derive(Debug))]
7624#[cfg_attr(feature = "derive_default", derive(Default))]
7625#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7626#[cfg_attr(feature = "derive_clone", derive(Clone))]
7627#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7628pub enum AssetClassSubProductType28Code {
7629	#[cfg_attr(feature = "derive_default", default)]
7630	#[cfg_attr( feature = "derive_serde", serde(rename = "RNNG") )]
7631	CodeRNNG,
7632}
7633
7634impl AssetClassSubProductType28Code {
7635	pub fn validate(&self) -> Result<(), ValidationError> {
7636		Ok(())
7637	}
7638}
7639
7640
7641// AssetClassSubProductType29Code ...
7642#[cfg_attr(feature = "derive_debug", derive(Debug))]
7643#[cfg_attr(feature = "derive_default", derive(Default))]
7644#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7645#[cfg_attr(feature = "derive_clone", derive(Clone))]
7646#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7647pub enum AssetClassSubProductType29Code {
7648	#[cfg_attr(feature = "derive_default", default)]
7649	#[cfg_attr( feature = "derive_serde", serde(rename = "CRBR") )]
7650	CodeCRBR,
7651}
7652
7653impl AssetClassSubProductType29Code {
7654	pub fn validate(&self) -> Result<(), ValidationError> {
7655		Ok(())
7656	}
7657}
7658
7659
7660// AssetClassSubProductType2Code ...
7661#[cfg_attr(feature = "derive_debug", derive(Debug))]
7662#[cfg_attr(feature = "derive_default", derive(Default))]
7663#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7664#[cfg_attr(feature = "derive_clone", derive(Clone))]
7665#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7666pub enum AssetClassSubProductType2Code {
7667	#[cfg_attr(feature = "derive_default", default)]
7668	#[cfg_attr( feature = "derive_serde", serde(rename = "SOFT") )]
7669	CodeSOFT,
7670}
7671
7672impl AssetClassSubProductType2Code {
7673	pub fn validate(&self) -> Result<(), ValidationError> {
7674		Ok(())
7675	}
7676}
7677
7678
7679// AssetClassSubProductType30Code ...
7680#[cfg_attr(feature = "derive_debug", derive(Debug))]
7681#[cfg_attr(feature = "derive_default", derive(Default))]
7682#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7683#[cfg_attr(feature = "derive_clone", derive(Clone))]
7684#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7685pub enum AssetClassSubProductType30Code {
7686	#[cfg_attr(feature = "derive_default", default)]
7687	#[cfg_attr( feature = "derive_serde", serde(rename = "WTHR") )]
7688	CodeWTHR,
7689}
7690
7691impl AssetClassSubProductType30Code {
7692	pub fn validate(&self) -> Result<(), ValidationError> {
7693		Ok(())
7694	}
7695}
7696
7697
7698// AssetClassSubProductType31Code ...
7699#[cfg_attr(feature = "derive_debug", derive(Debug))]
7700#[cfg_attr(feature = "derive_default", derive(Default))]
7701#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7702#[cfg_attr(feature = "derive_clone", derive(Clone))]
7703#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7704pub enum AssetClassSubProductType31Code {
7705	#[cfg_attr(feature = "derive_default", default)]
7706	#[cfg_attr( feature = "derive_serde", serde(rename = "DRYF") )]
7707	CodeDRYF,
7708}
7709
7710impl AssetClassSubProductType31Code {
7711	pub fn validate(&self) -> Result<(), ValidationError> {
7712		Ok(())
7713	}
7714}
7715
7716
7717// AssetClassSubProductType32Code ...
7718#[cfg_attr(feature = "derive_debug", derive(Debug))]
7719#[cfg_attr(feature = "derive_default", derive(Default))]
7720#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7721#[cfg_attr(feature = "derive_clone", derive(Clone))]
7722#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7723pub enum AssetClassSubProductType32Code {
7724	#[cfg_attr(feature = "derive_default", default)]
7725	#[cfg_attr( feature = "derive_serde", serde(rename = "WETF") )]
7726	CodeWETF,
7727}
7728
7729impl AssetClassSubProductType32Code {
7730	pub fn validate(&self) -> Result<(), ValidationError> {
7731		Ok(())
7732	}
7733}
7734
7735
7736// AssetClassSubProductType33Code ...
7737#[cfg_attr(feature = "derive_debug", derive(Debug))]
7738#[cfg_attr(feature = "derive_default", derive(Default))]
7739#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7740#[cfg_attr(feature = "derive_clone", derive(Clone))]
7741#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7742pub enum AssetClassSubProductType33Code {
7743	#[cfg_attr(feature = "derive_default", default)]
7744	#[cfg_attr( feature = "derive_serde", serde(rename = "CSTR") )]
7745	CodeCSTR,
7746}
7747
7748impl AssetClassSubProductType33Code {
7749	pub fn validate(&self) -> Result<(), ValidationError> {
7750		Ok(())
7751	}
7752}
7753
7754
7755// AssetClassSubProductType34Code ...
7756#[cfg_attr(feature = "derive_debug", derive(Debug))]
7757#[cfg_attr(feature = "derive_default", derive(Default))]
7758#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7759#[cfg_attr(feature = "derive_clone", derive(Clone))]
7760#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7761pub enum AssetClassSubProductType34Code {
7762	#[cfg_attr(feature = "derive_default", default)]
7763	#[cfg_attr( feature = "derive_serde", serde(rename = "MFTG") )]
7764	CodeMFTG,
7765}
7766
7767impl AssetClassSubProductType34Code {
7768	pub fn validate(&self) -> Result<(), ValidationError> {
7769		Ok(())
7770	}
7771}
7772
7773
7774// AssetClassSubProductType35Code ...
7775#[cfg_attr(feature = "derive_debug", derive(Debug))]
7776#[cfg_attr(feature = "derive_default", derive(Default))]
7777#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7778#[cfg_attr(feature = "derive_clone", derive(Clone))]
7779#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7780pub enum AssetClassSubProductType35Code {
7781	#[cfg_attr(feature = "derive_default", default)]
7782	#[cfg_attr( feature = "derive_serde", serde(rename = "CBRD") )]
7783	CodeCBRD,
7784}
7785
7786impl AssetClassSubProductType35Code {
7787	pub fn validate(&self) -> Result<(), ValidationError> {
7788		Ok(())
7789	}
7790}
7791
7792
7793// AssetClassSubProductType36Code ...
7794#[cfg_attr(feature = "derive_debug", derive(Debug))]
7795#[cfg_attr(feature = "derive_default", derive(Default))]
7796#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7797#[cfg_attr(feature = "derive_clone", derive(Clone))]
7798#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7799pub enum AssetClassSubProductType36Code {
7800	#[cfg_attr(feature = "derive_default", default)]
7801	#[cfg_attr( feature = "derive_serde", serde(rename = "NSPT") )]
7802	CodeNSPT,
7803}
7804
7805impl AssetClassSubProductType36Code {
7806	pub fn validate(&self) -> Result<(), ValidationError> {
7807		Ok(())
7808	}
7809}
7810
7811
7812// AssetClassSubProductType37Code ...
7813#[cfg_attr(feature = "derive_debug", derive(Debug))]
7814#[cfg_attr(feature = "derive_default", derive(Default))]
7815#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7816#[cfg_attr(feature = "derive_clone", derive(Clone))]
7817#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7818pub enum AssetClassSubProductType37Code {
7819	#[cfg_attr(feature = "derive_default", default)]
7820	#[cfg_attr( feature = "derive_serde", serde(rename = "PULP") )]
7821	CodePULP,
7822}
7823
7824impl AssetClassSubProductType37Code {
7825	pub fn validate(&self) -> Result<(), ValidationError> {
7826		Ok(())
7827	}
7828}
7829
7830
7831// AssetClassSubProductType38Code ...
7832#[cfg_attr(feature = "derive_debug", derive(Debug))]
7833#[cfg_attr(feature = "derive_default", derive(Default))]
7834#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7835#[cfg_attr(feature = "derive_clone", derive(Clone))]
7836#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7837pub enum AssetClassSubProductType38Code {
7838	#[cfg_attr(feature = "derive_default", default)]
7839	#[cfg_attr( feature = "derive_serde", serde(rename = "RCVP") )]
7840	CodeRCVP,
7841}
7842
7843impl AssetClassSubProductType38Code {
7844	pub fn validate(&self) -> Result<(), ValidationError> {
7845		Ok(())
7846	}
7847}
7848
7849
7850// AssetClassSubProductType39Code ...
7851#[cfg_attr(feature = "derive_debug", derive(Debug))]
7852#[cfg_attr(feature = "derive_default", derive(Default))]
7853#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7854#[cfg_attr(feature = "derive_clone", derive(Clone))]
7855#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7856pub enum AssetClassSubProductType39Code {
7857	#[cfg_attr(feature = "derive_default", default)]
7858	#[cfg_attr( feature = "derive_serde", serde(rename = "AMMO") )]
7859	CodeAMMO,
7860}
7861
7862impl AssetClassSubProductType39Code {
7863	pub fn validate(&self) -> Result<(), ValidationError> {
7864		Ok(())
7865	}
7866}
7867
7868
7869// AssetClassSubProductType3Code ...
7870#[cfg_attr(feature = "derive_debug", derive(Debug))]
7871#[cfg_attr(feature = "derive_default", derive(Default))]
7872#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7873#[cfg_attr(feature = "derive_clone", derive(Clone))]
7874#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7875pub enum AssetClassSubProductType3Code {
7876	#[cfg_attr(feature = "derive_default", default)]
7877	#[cfg_attr( feature = "derive_serde", serde(rename = "OOLI") )]
7878	CodeOOLI,
7879}
7880
7881impl AssetClassSubProductType3Code {
7882	pub fn validate(&self) -> Result<(), ValidationError> {
7883		Ok(())
7884	}
7885}
7886
7887
7888// AssetClassSubProductType40Code ...
7889#[cfg_attr(feature = "derive_debug", derive(Debug))]
7890#[cfg_attr(feature = "derive_default", derive(Default))]
7891#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7892#[cfg_attr(feature = "derive_clone", derive(Clone))]
7893#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7894pub enum AssetClassSubProductType40Code {
7895	#[cfg_attr(feature = "derive_default", default)]
7896	#[cfg_attr( feature = "derive_serde", serde(rename = "DAPH") )]
7897	CodeDAPH,
7898}
7899
7900impl AssetClassSubProductType40Code {
7901	pub fn validate(&self) -> Result<(), ValidationError> {
7902		Ok(())
7903	}
7904}
7905
7906
7907// AssetClassSubProductType41Code ...
7908#[cfg_attr(feature = "derive_debug", derive(Debug))]
7909#[cfg_attr(feature = "derive_default", derive(Default))]
7910#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7911#[cfg_attr(feature = "derive_clone", derive(Clone))]
7912#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7913pub enum AssetClassSubProductType41Code {
7914	#[cfg_attr(feature = "derive_default", default)]
7915	#[cfg_attr( feature = "derive_serde", serde(rename = "PTSH") )]
7916	CodePTSH,
7917}
7918
7919impl AssetClassSubProductType41Code {
7920	pub fn validate(&self) -> Result<(), ValidationError> {
7921		Ok(())
7922	}
7923}
7924
7925
7926// AssetClassSubProductType42Code ...
7927#[cfg_attr(feature = "derive_debug", derive(Debug))]
7928#[cfg_attr(feature = "derive_default", derive(Default))]
7929#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7930#[cfg_attr(feature = "derive_clone", derive(Clone))]
7931#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7932pub enum AssetClassSubProductType42Code {
7933	#[cfg_attr(feature = "derive_default", default)]
7934	#[cfg_attr( feature = "derive_serde", serde(rename = "SLPH") )]
7935	CodeSLPH,
7936}
7937
7938impl AssetClassSubProductType42Code {
7939	pub fn validate(&self) -> Result<(), ValidationError> {
7940		Ok(())
7941	}
7942}
7943
7944
7945// AssetClassSubProductType43Code ...
7946#[cfg_attr(feature = "derive_debug", derive(Debug))]
7947#[cfg_attr(feature = "derive_default", derive(Default))]
7948#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7949#[cfg_attr(feature = "derive_clone", derive(Clone))]
7950#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7951pub enum AssetClassSubProductType43Code {
7952	#[cfg_attr(feature = "derive_default", default)]
7953	#[cfg_attr( feature = "derive_serde", serde(rename = "UREA") )]
7954	CodeUREA,
7955}
7956
7957impl AssetClassSubProductType43Code {
7958	pub fn validate(&self) -> Result<(), ValidationError> {
7959		Ok(())
7960	}
7961}
7962
7963
7964// AssetClassSubProductType44Code ...
7965#[cfg_attr(feature = "derive_debug", derive(Debug))]
7966#[cfg_attr(feature = "derive_default", derive(Default))]
7967#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7968#[cfg_attr(feature = "derive_clone", derive(Clone))]
7969#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7970pub enum AssetClassSubProductType44Code {
7971	#[cfg_attr(feature = "derive_default", default)]
7972	#[cfg_attr( feature = "derive_serde", serde(rename = "UAAN") )]
7973	CodeUAAN,
7974}
7975
7976impl AssetClassSubProductType44Code {
7977	pub fn validate(&self) -> Result<(), ValidationError> {
7978		Ok(())
7979	}
7980}
7981
7982
7983// AssetClassSubProductType45Code ...
7984#[cfg_attr(feature = "derive_debug", derive(Debug))]
7985#[cfg_attr(feature = "derive_default", derive(Default))]
7986#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
7987#[cfg_attr(feature = "derive_clone", derive(Clone))]
7988#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
7989pub enum AssetClassSubProductType45Code {
7990	#[cfg_attr(feature = "derive_default", default)]
7991	#[cfg_attr( feature = "derive_serde", serde(rename = "POTA") )]
7992	CodePOTA,
7993}
7994
7995impl AssetClassSubProductType45Code {
7996	pub fn validate(&self) -> Result<(), ValidationError> {
7997		Ok(())
7998	}
7999}
8000
8001
8002// AssetClassSubProductType46Code ...
8003#[cfg_attr(feature = "derive_debug", derive(Debug))]
8004#[cfg_attr(feature = "derive_default", derive(Default))]
8005#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8006#[cfg_attr(feature = "derive_clone", derive(Clone))]
8007#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8008pub enum AssetClassSubProductType46Code {
8009	#[cfg_attr(feature = "derive_default", default)]
8010	#[cfg_attr( feature = "derive_serde", serde(rename = "CSHP") )]
8011	CodeCSHP,
8012}
8013
8014impl AssetClassSubProductType46Code {
8015	pub fn validate(&self) -> Result<(), ValidationError> {
8016		Ok(())
8017	}
8018}
8019
8020
8021// AssetClassSubProductType47Code ...
8022#[cfg_attr(feature = "derive_debug", derive(Debug))]
8023#[cfg_attr(feature = "derive_default", derive(Default))]
8024#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8025#[cfg_attr(feature = "derive_clone", derive(Clone))]
8026#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8027pub enum AssetClassSubProductType47Code {
8028	#[cfg_attr(feature = "derive_default", default)]
8029	#[cfg_attr( feature = "derive_serde", serde(rename = "DLVR") )]
8030	CodeDLVR,
8031}
8032
8033impl AssetClassSubProductType47Code {
8034	pub fn validate(&self) -> Result<(), ValidationError> {
8035		Ok(())
8036	}
8037}
8038
8039
8040// AssetClassSubProductType48Code ...
8041#[cfg_attr(feature = "derive_debug", derive(Debug))]
8042#[cfg_attr(feature = "derive_default", derive(Default))]
8043#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8044#[cfg_attr(feature = "derive_clone", derive(Clone))]
8045#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8046pub enum AssetClassSubProductType48Code {
8047	#[cfg_attr(feature = "derive_default", default)]
8048	#[cfg_attr( feature = "derive_serde", serde(rename = "NDLV") )]
8049	CodeNDLV,
8050}
8051
8052impl AssetClassSubProductType48Code {
8053	pub fn validate(&self) -> Result<(), ValidationError> {
8054		Ok(())
8055	}
8056}
8057
8058
8059// AssetClassSubProductType49Code ...
8060#[cfg_attr(feature = "derive_debug", derive(Debug))]
8061#[cfg_attr(feature = "derive_default", derive(Default))]
8062#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8063#[cfg_attr(feature = "derive_clone", derive(Clone))]
8064#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8065pub enum AssetClassSubProductType49Code {
8066	#[cfg_attr(feature = "derive_default", default)]
8067	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
8068	CodeOTHR,
8069}
8070
8071impl AssetClassSubProductType49Code {
8072	pub fn validate(&self) -> Result<(), ValidationError> {
8073		Ok(())
8074	}
8075}
8076
8077
8078// AssetClassSubProductType50Code ...
8079#[cfg_attr(feature = "derive_debug", derive(Debug))]
8080#[cfg_attr(feature = "derive_default", derive(Default))]
8081#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8082#[cfg_attr(feature = "derive_clone", derive(Clone))]
8083#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8084pub enum AssetClassSubProductType50Code {
8085	#[cfg_attr(feature = "derive_default", default)]
8086	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
8087	CodeOTHR,
8088	#[cfg_attr( feature = "derive_serde", serde(rename = "RCVP") )]
8089	CodeRCVP,
8090}
8091
8092impl AssetClassSubProductType50Code {
8093	pub fn validate(&self) -> Result<(), ValidationError> {
8094		Ok(())
8095	}
8096}
8097
8098
8099// AssetClassSubProductType5Code ...
8100#[cfg_attr(feature = "derive_debug", derive(Debug))]
8101#[cfg_attr(feature = "derive_default", derive(Default))]
8102#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8103#[cfg_attr(feature = "derive_clone", derive(Clone))]
8104#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8105pub enum AssetClassSubProductType5Code {
8106	#[cfg_attr(feature = "derive_default", default)]
8107	#[cfg_attr( feature = "derive_serde", serde(rename = "GRIN") )]
8108	CodeGRIN,
8109}
8110
8111impl AssetClassSubProductType5Code {
8112	pub fn validate(&self) -> Result<(), ValidationError> {
8113		Ok(())
8114	}
8115}
8116
8117
8118// AssetClassSubProductType6Code ...
8119#[cfg_attr(feature = "derive_debug", derive(Debug))]
8120#[cfg_attr(feature = "derive_default", derive(Default))]
8121#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8122#[cfg_attr(feature = "derive_clone", derive(Clone))]
8123#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8124pub enum AssetClassSubProductType6Code {
8125	#[cfg_attr(feature = "derive_default", default)]
8126	#[cfg_attr( feature = "derive_serde", serde(rename = "ELEC") )]
8127	CodeELEC,
8128}
8129
8130impl AssetClassSubProductType6Code {
8131	pub fn validate(&self) -> Result<(), ValidationError> {
8132		Ok(())
8133	}
8134}
8135
8136
8137// AssetClassSubProductType7Code ...
8138#[cfg_attr(feature = "derive_debug", derive(Debug))]
8139#[cfg_attr(feature = "derive_default", derive(Default))]
8140#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8141#[cfg_attr(feature = "derive_clone", derive(Clone))]
8142#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8143pub enum AssetClassSubProductType7Code {
8144	#[cfg_attr(feature = "derive_default", default)]
8145	#[cfg_attr( feature = "derive_serde", serde(rename = "NGAS") )]
8146	CodeNGAS,
8147}
8148
8149impl AssetClassSubProductType7Code {
8150	pub fn validate(&self) -> Result<(), ValidationError> {
8151		Ok(())
8152	}
8153}
8154
8155
8156// AssetClassSubProductType8Code ...
8157#[cfg_attr(feature = "derive_debug", derive(Debug))]
8158#[cfg_attr(feature = "derive_default", derive(Default))]
8159#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8160#[cfg_attr(feature = "derive_clone", derive(Clone))]
8161#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8162pub enum AssetClassSubProductType8Code {
8163	#[cfg_attr(feature = "derive_default", default)]
8164	#[cfg_attr( feature = "derive_serde", serde(rename = "OILP") )]
8165	CodeOILP,
8166}
8167
8168impl AssetClassSubProductType8Code {
8169	pub fn validate(&self) -> Result<(), ValidationError> {
8170		Ok(())
8171	}
8172}
8173
8174
8175// AssetClassTransactionType1Code ...
8176#[cfg_attr(feature = "derive_debug", derive(Debug))]
8177#[cfg_attr(feature = "derive_default", derive(Default))]
8178#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8179#[cfg_attr(feature = "derive_clone", derive(Clone))]
8180#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8181pub enum AssetClassTransactionType1Code {
8182	#[cfg_attr(feature = "derive_default", default)]
8183	#[cfg_attr( feature = "derive_serde", serde(rename = "CRCK") )]
8184	CodeCRCK,
8185	#[cfg_attr( feature = "derive_serde", serde(rename = "DIFF") )]
8186	CodeDIFF,
8187	#[cfg_attr( feature = "derive_serde", serde(rename = "FUTR") )]
8188	CodeFUTR,
8189	#[cfg_attr( feature = "derive_serde", serde(rename = "MINI") )]
8190	CodeMINI,
8191	#[cfg_attr( feature = "derive_serde", serde(rename = "OPTN") )]
8192	CodeOPTN,
8193	#[cfg_attr( feature = "derive_serde", serde(rename = "OTCT") )]
8194	CodeOTCT,
8195	#[cfg_attr( feature = "derive_serde", serde(rename = "ORIT") )]
8196	CodeORIT,
8197	#[cfg_attr( feature = "derive_serde", serde(rename = "SWAP") )]
8198	CodeSWAP,
8199	#[cfg_attr( feature = "derive_serde", serde(rename = "TAPO") )]
8200	CodeTAPO,
8201	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
8202	CodeOTHR,
8203}
8204
8205impl AssetClassTransactionType1Code {
8206	pub fn validate(&self) -> Result<(), ValidationError> {
8207		Ok(())
8208	}
8209}
8210
8211
8212// AssetFXSubProductType1Code ...
8213#[cfg_attr(feature = "derive_debug", derive(Debug))]
8214#[cfg_attr(feature = "derive_default", derive(Default))]
8215#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8216#[cfg_attr(feature = "derive_clone", derive(Clone))]
8217#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8218pub enum AssetFXSubProductType1Code {
8219	#[cfg_attr(feature = "derive_default", default)]
8220	#[cfg_attr( feature = "derive_serde", serde(rename = "FXCR") )]
8221	CodeFXCR,
8222	#[cfg_attr( feature = "derive_serde", serde(rename = "FXEM") )]
8223	CodeFXEM,
8224	#[cfg_attr( feature = "derive_serde", serde(rename = "FXMJ") )]
8225	CodeFXMJ,
8226}
8227
8228impl AssetFXSubProductType1Code {
8229	pub fn validate(&self) -> Result<(), ValidationError> {
8230		Ok(())
8231	}
8232}
8233
8234
8235// AssetHolding1 ...
8236#[cfg_attr(feature = "derive_debug", derive(Debug))]
8237#[cfg_attr(feature = "derive_default", derive(Default))]
8238#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8239#[cfg_attr(feature = "derive_clone", derive(Clone))]
8240#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8241pub struct AssetHolding1 {
8242	#[cfg_attr( feature = "derive_serde", serde(rename = "PstHrcutVal") )]
8243	pub pst_hrcut_val: ActiveCurrencyAnd24Amount,
8244	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstTp") )]
8245	pub asst_tp: AssetHolding1Choice,
8246	#[cfg_attr( feature = "derive_serde", serde(rename = "CollRqrmnt") )]
8247	pub coll_rqrmnt: CollateralAccountType3Code,
8248}
8249
8250impl AssetHolding1 {
8251	pub fn validate(&self) -> Result<(), ValidationError> {
8252		self.pst_hrcut_val.validate()?;
8253		self.asst_tp.validate()?;
8254		self.coll_rqrmnt.validate()?;
8255		Ok(())
8256	}
8257}
8258
8259
8260// AssetHolding1Choice ...
8261#[cfg_attr(feature = "derive_debug", derive(Debug))]
8262#[cfg_attr(feature = "derive_default", derive(Default))]
8263#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8264#[cfg_attr(feature = "derive_clone", derive(Clone))]
8265#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8266pub struct AssetHolding1Choice {
8267	#[cfg_attr( feature = "derive_serde", serde(rename = "Gold", skip_serializing_if = "Option::is_none") )]
8268	pub gold: Option<ActiveCurrencyAndAmount>,
8269	#[cfg_attr( feature = "derive_serde", serde(rename = "Trpty", skip_serializing_if = "Option::is_none") )]
8270	pub trpty: Option<ActiveCurrencyAndAmount>,
8271	#[cfg_attr( feature = "derive_serde", serde(rename = "Csh", skip_serializing_if = "Option::is_none") )]
8272	pub csh: Option<ActiveCurrencyAndAmount>,
8273	#[cfg_attr( feature = "derive_serde", serde(rename = "Scty", skip_serializing_if = "Option::is_none") )]
8274	pub scty: Option<SecurityIdentificationAndAmount1>,
8275	#[cfg_attr( feature = "derive_serde", serde(rename = "Grnt", skip_serializing_if = "Option::is_none") )]
8276	pub grnt: Option<Guarantee1>,
8277	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmmdty", skip_serializing_if = "Option::is_none") )]
8278	pub cmmdty: Option<Commodity2>,
8279}
8280
8281impl AssetHolding1Choice {
8282	pub fn validate(&self) -> Result<(), ValidationError> {
8283		if let Some(ref val) = self.gold { val.validate()? }
8284		if let Some(ref val) = self.trpty { val.validate()? }
8285		if let Some(ref val) = self.csh { val.validate()? }
8286		if let Some(ref val) = self.scty { val.validate()? }
8287		if let Some(ref val) = self.grnt { val.validate()? }
8288		if let Some(ref val) = self.cmmdty { val.validate()? }
8289		Ok(())
8290	}
8291}
8292
8293
8294// AssetHolding3 ...
8295#[cfg_attr(feature = "derive_debug", derive(Debug))]
8296#[cfg_attr(feature = "derive_default", derive(Default))]
8297#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8298#[cfg_attr(feature = "derive_clone", derive(Clone))]
8299#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8300pub struct AssetHolding3 {
8301	#[cfg_attr( feature = "derive_serde", serde(rename = "PstHrcutVal") )]
8302	pub pst_hrcut_val: ActiveCurrencyAnd24Amount,
8303	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstTp") )]
8304	pub asst_tp: AssetHolding3Choice,
8305	#[cfg_attr( feature = "derive_serde", serde(rename = "CollRqrmnt") )]
8306	pub coll_rqrmnt: CollateralAccountType3Code,
8307}
8308
8309impl AssetHolding3 {
8310	pub fn validate(&self) -> Result<(), ValidationError> {
8311		self.pst_hrcut_val.validate()?;
8312		self.asst_tp.validate()?;
8313		self.coll_rqrmnt.validate()?;
8314		Ok(())
8315	}
8316}
8317
8318
8319// AssetHolding3Choice ...
8320#[cfg_attr(feature = "derive_debug", derive(Debug))]
8321#[cfg_attr(feature = "derive_default", derive(Default))]
8322#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8323#[cfg_attr(feature = "derive_clone", derive(Clone))]
8324#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8325pub struct AssetHolding3Choice {
8326	#[cfg_attr( feature = "derive_serde", serde(rename = "Gold", skip_serializing_if = "Option::is_none") )]
8327	pub gold: Option<ActiveCurrencyAndAmount>,
8328	#[cfg_attr( feature = "derive_serde", serde(rename = "Trpty", skip_serializing_if = "Option::is_none") )]
8329	pub trpty: Option<TripartyCollateralAndAmount1>,
8330	#[cfg_attr( feature = "derive_serde", serde(rename = "Csh", skip_serializing_if = "Option::is_none") )]
8331	pub csh: Option<ActiveCurrencyAndAmount>,
8332	#[cfg_attr( feature = "derive_serde", serde(rename = "Scty", skip_serializing_if = "Option::is_none") )]
8333	pub scty: Option<SecurityIdentificationAndAmount1>,
8334	#[cfg_attr( feature = "derive_serde", serde(rename = "Grnt", skip_serializing_if = "Option::is_none") )]
8335	pub grnt: Option<Guarantee1>,
8336	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmmdty", skip_serializing_if = "Option::is_none") )]
8337	pub cmmdty: Option<Commodity2>,
8338}
8339
8340impl AssetHolding3Choice {
8341	pub fn validate(&self) -> Result<(), ValidationError> {
8342		if let Some(ref val) = self.gold { val.validate()? }
8343		if let Some(ref val) = self.trpty { val.validate()? }
8344		if let Some(ref val) = self.csh { val.validate()? }
8345		if let Some(ref val) = self.scty { val.validate()? }
8346		if let Some(ref val) = self.grnt { val.validate()? }
8347		if let Some(ref val) = self.cmmdty { val.validate()? }
8348		Ok(())
8349	}
8350}
8351
8352
8353// AssetPriceType1Code ...
8354#[cfg_attr(feature = "derive_debug", derive(Debug))]
8355#[cfg_attr(feature = "derive_default", derive(Default))]
8356#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8357#[cfg_attr(feature = "derive_clone", derive(Clone))]
8358#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8359pub enum AssetPriceType1Code {
8360	#[cfg_attr(feature = "derive_default", default)]
8361	#[cfg_attr( feature = "derive_serde", serde(rename = "ARGM") )]
8362	CodeARGM,
8363	#[cfg_attr( feature = "derive_serde", serde(rename = "BLTC") )]
8364	CodeBLTC,
8365	#[cfg_attr( feature = "derive_serde", serde(rename = "EXOF") )]
8366	CodeEXOF,
8367	#[cfg_attr( feature = "derive_serde", serde(rename = "GBCL") )]
8368	CodeGBCL,
8369	#[cfg_attr( feature = "derive_serde", serde(rename = "IHSM") )]
8370	CodeIHSM,
8371	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
8372	CodeOTHR,
8373	#[cfg_attr( feature = "derive_serde", serde(rename = "PLAT") )]
8374	CodePLAT,
8375}
8376
8377impl AssetPriceType1Code {
8378	pub fn validate(&self) -> Result<(), ValidationError> {
8379		Ok(())
8380	}
8381}
8382
8383
8384// AssignmentMethod1Code ...
8385#[cfg_attr(feature = "derive_debug", derive(Debug))]
8386#[cfg_attr(feature = "derive_default", derive(Default))]
8387#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8388#[cfg_attr(feature = "derive_clone", derive(Clone))]
8389#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8390pub enum AssignmentMethod1Code {
8391	#[cfg_attr(feature = "derive_default", default)]
8392	#[cfg_attr( feature = "derive_serde", serde(rename = "RAND") )]
8393	CodeRAND,
8394	#[cfg_attr( feature = "derive_serde", serde(rename = "PROR") )]
8395	CodePROR,
8396}
8397
8398impl AssignmentMethod1Code {
8399	pub fn validate(&self) -> Result<(), ValidationError> {
8400		Ok(())
8401	}
8402}
8403
8404
8405// AssignmentMethod2Choice ...
8406#[cfg_attr(feature = "derive_debug", derive(Debug))]
8407#[cfg_attr(feature = "derive_default", derive(Default))]
8408#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8409#[cfg_attr(feature = "derive_clone", derive(Clone))]
8410#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8411pub struct AssignmentMethod2Choice {
8412	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
8413	pub cd: Option<AssignmentMethod1Code>,
8414	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
8415	pub prtry: Option<GenericIdentification30>,
8416}
8417
8418impl AssignmentMethod2Choice {
8419	pub fn validate(&self) -> Result<(), ValidationError> {
8420		if let Some(ref val) = self.cd { val.validate()? }
8421		if let Some(ref val) = self.prtry { val.validate()? }
8422		Ok(())
8423	}
8424}
8425
8426
8427// AttendanceContext1Code ...
8428#[cfg_attr(feature = "derive_debug", derive(Debug))]
8429#[cfg_attr(feature = "derive_default", derive(Default))]
8430#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8431#[cfg_attr(feature = "derive_clone", derive(Clone))]
8432#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8433pub enum AttendanceContext1Code {
8434	#[cfg_attr(feature = "derive_default", default)]
8435	#[cfg_attr( feature = "derive_serde", serde(rename = "ATTD") )]
8436	CodeATTD,
8437	#[cfg_attr( feature = "derive_serde", serde(rename = "SATT") )]
8438	CodeSATT,
8439	#[cfg_attr( feature = "derive_serde", serde(rename = "UATT") )]
8440	CodeUATT,
8441}
8442
8443impl AttendanceContext1Code {
8444	pub fn validate(&self) -> Result<(), ValidationError> {
8445		Ok(())
8446	}
8447}
8448
8449
8450// AuctionData2 ...
8451#[cfg_attr(feature = "derive_debug", derive(Debug))]
8452#[cfg_attr(feature = "derive_default", derive(Default))]
8453#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8454#[cfg_attr(feature = "derive_clone", derive(Clone))]
8455#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8456pub struct AuctionData2 {
8457	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgPhs", skip_serializing_if = "Option::is_none") )]
8458	pub tradg_phs: Option<String>,
8459	#[cfg_attr( feature = "derive_serde", serde(rename = "IndctvAuctnPric", skip_serializing_if = "Option::is_none") )]
8460	pub indctv_auctn_pric: Option<SecuritiesTransactionPrice21Choice>,
8461	#[cfg_attr( feature = "derive_serde", serde(rename = "IndctvAuctnVol", skip_serializing_if = "Option::is_none") )]
8462	pub indctv_auctn_vol: Option<FinancialInstrumentQuantity25Choice>,
8463}
8464
8465impl AuctionData2 {
8466	pub fn validate(&self) -> Result<(), ValidationError> {
8467		if let Some(ref val) = self.tradg_phs {
8468			if val.chars().count() < 1 {
8469				return Err(ValidationError::new(1001, "tradg_phs is shorter than the minimum length of 1".to_string()));
8470			}
8471			if val.chars().count() > 50 {
8472				return Err(ValidationError::new(1002, "tradg_phs exceeds the maximum length of 50".to_string()));
8473			}
8474		}
8475		if let Some(ref val) = self.indctv_auctn_pric { val.validate()? }
8476		if let Some(ref val) = self.indctv_auctn_vol { val.validate()? }
8477		Ok(())
8478	}
8479}
8480
8481
8482// AuditTrail1 ...
8483#[cfg_attr(feature = "derive_debug", derive(Debug))]
8484#[cfg_attr(feature = "derive_default", derive(Default))]
8485#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8486#[cfg_attr(feature = "derive_clone", derive(Clone))]
8487#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8488pub struct AuditTrail1 {
8489	#[cfg_attr( feature = "derive_serde", serde(rename = "FldNm") )]
8490	pub fld_nm: String,
8491	#[cfg_attr( feature = "derive_serde", serde(rename = "OdFldVal") )]
8492	pub od_fld_val: String,
8493	#[cfg_attr( feature = "derive_serde", serde(rename = "NewFldVal") )]
8494	pub new_fld_val: String,
8495	#[cfg_attr( feature = "derive_serde", serde(rename = "OprTmStmp") )]
8496	pub opr_tm_stmp: String,
8497	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgUsr") )]
8498	pub instg_usr: String,
8499	#[cfg_attr( feature = "derive_serde", serde(rename = "ApprvgUsr", skip_serializing_if = "Option::is_none") )]
8500	pub apprvg_usr: Option<String>,
8501}
8502
8503impl AuditTrail1 {
8504	pub fn validate(&self) -> Result<(), ValidationError> {
8505		if self.fld_nm.chars().count() < 1 {
8506			return Err(ValidationError::new(1001, "fld_nm is shorter than the minimum length of 1".to_string()));
8507		}
8508		if self.fld_nm.chars().count() > 35 {
8509			return Err(ValidationError::new(1002, "fld_nm exceeds the maximum length of 35".to_string()));
8510		}
8511		if self.od_fld_val.chars().count() < 1 {
8512			return Err(ValidationError::new(1001, "od_fld_val is shorter than the minimum length of 1".to_string()));
8513		}
8514		if self.od_fld_val.chars().count() > 350 {
8515			return Err(ValidationError::new(1002, "od_fld_val exceeds the maximum length of 350".to_string()));
8516		}
8517		if self.new_fld_val.chars().count() < 1 {
8518			return Err(ValidationError::new(1001, "new_fld_val is shorter than the minimum length of 1".to_string()));
8519		}
8520		if self.new_fld_val.chars().count() > 350 {
8521			return Err(ValidationError::new(1002, "new_fld_val exceeds the maximum length of 350".to_string()));
8522		}
8523		if self.instg_usr.chars().count() < 1 {
8524			return Err(ValidationError::new(1001, "instg_usr is shorter than the minimum length of 1".to_string()));
8525		}
8526		if self.instg_usr.chars().count() > 256 {
8527			return Err(ValidationError::new(1002, "instg_usr exceeds the maximum length of 256".to_string()));
8528		}
8529		if let Some(ref val) = self.apprvg_usr {
8530			if val.chars().count() < 1 {
8531				return Err(ValidationError::new(1001, "apprvg_usr is shorter than the minimum length of 1".to_string()));
8532			}
8533			if val.chars().count() > 256 {
8534				return Err(ValidationError::new(1002, "apprvg_usr exceeds the maximum length of 256".to_string()));
8535			}
8536		}
8537		Ok(())
8538	}
8539}
8540
8541
8542// AuditTrailOrBusinessError6Choice ...
8543#[cfg_attr(feature = "derive_debug", derive(Debug))]
8544#[cfg_attr(feature = "derive_default", derive(Default))]
8545#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8546#[cfg_attr(feature = "derive_clone", derive(Clone))]
8547#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8548pub struct AuditTrailOrBusinessError6Choice {
8549	#[cfg_attr( feature = "derive_serde", serde(rename = "AudtTrl", skip_serializing_if = "Option::is_none") )]
8550	pub audt_trl: Option<Vec<AuditTrail1>>,
8551	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
8552	pub biz_err: Option<Vec<ErrorHandling5>>,
8553}
8554
8555impl AuditTrailOrBusinessError6Choice {
8556	pub fn validate(&self) -> Result<(), ValidationError> {
8557		if let Some(ref vec) = self.audt_trl { for item in vec { item.validate()? } }
8558		if let Some(ref vec) = self.biz_err { for item in vec { item.validate()? } }
8559		Ok(())
8560	}
8561}
8562
8563
8564// AuthenticationChannel1Choice ...
8565#[cfg_attr(feature = "derive_debug", derive(Debug))]
8566#[cfg_attr(feature = "derive_default", derive(Default))]
8567#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8568#[cfg_attr(feature = "derive_clone", derive(Clone))]
8569#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8570pub struct AuthenticationChannel1Choice {
8571	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
8572	pub cd: Option<String>,
8573	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
8574	pub prtry: Option<String>,
8575}
8576
8577impl AuthenticationChannel1Choice {
8578	pub fn validate(&self) -> Result<(), ValidationError> {
8579		if let Some(ref val) = self.cd {
8580			if val.chars().count() < 1 {
8581				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
8582			}
8583			if val.chars().count() > 4 {
8584				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
8585			}
8586		}
8587		if let Some(ref val) = self.prtry {
8588			if val.chars().count() < 1 {
8589				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
8590			}
8591			if val.chars().count() > 35 {
8592				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
8593			}
8594		}
8595		Ok(())
8596	}
8597}
8598
8599
8600// AuthenticationEntity1Code ...
8601#[cfg_attr(feature = "derive_debug", derive(Debug))]
8602#[cfg_attr(feature = "derive_default", derive(Default))]
8603#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8604#[cfg_attr(feature = "derive_clone", derive(Clone))]
8605#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8606pub enum AuthenticationEntity1Code {
8607	#[cfg_attr(feature = "derive_default", default)]
8608	#[cfg_attr( feature = "derive_serde", serde(rename = "ICCD") )]
8609	CodeICCD,
8610	#[cfg_attr( feature = "derive_serde", serde(rename = "AGNT") )]
8611	CodeAGNT,
8612	#[cfg_attr( feature = "derive_serde", serde(rename = "MERC") )]
8613	CodeMERC,
8614}
8615
8616impl AuthenticationEntity1Code {
8617	pub fn validate(&self) -> Result<(), ValidationError> {
8618		Ok(())
8619	}
8620}
8621
8622
8623// AuthenticationMethod1Code ...
8624#[cfg_attr(feature = "derive_debug", derive(Debug))]
8625#[cfg_attr(feature = "derive_default", derive(Default))]
8626#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8627#[cfg_attr(feature = "derive_clone", derive(Clone))]
8628#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8629pub enum AuthenticationMethod1Code {
8630	#[cfg_attr(feature = "derive_default", default)]
8631	#[cfg_attr( feature = "derive_serde", serde(rename = "UKNW") )]
8632	CodeUKNW,
8633	#[cfg_attr( feature = "derive_serde", serde(rename = "BYPS") )]
8634	CodeBYPS,
8635	#[cfg_attr( feature = "derive_serde", serde(rename = "NPIN") )]
8636	CodeNPIN,
8637	#[cfg_attr( feature = "derive_serde", serde(rename = "FPIN") )]
8638	CodeFPIN,
8639	#[cfg_attr( feature = "derive_serde", serde(rename = "CPSG") )]
8640	CodeCPSG,
8641	#[cfg_attr( feature = "derive_serde", serde(rename = "PPSG") )]
8642	CodePPSG,
8643	#[cfg_attr( feature = "derive_serde", serde(rename = "MANU") )]
8644	CodeMANU,
8645	#[cfg_attr( feature = "derive_serde", serde(rename = "MERC") )]
8646	CodeMERC,
8647	#[cfg_attr( feature = "derive_serde", serde(rename = "SCRT") )]
8648	CodeSCRT,
8649	#[cfg_attr( feature = "derive_serde", serde(rename = "SNCT") )]
8650	CodeSNCT,
8651	#[cfg_attr( feature = "derive_serde", serde(rename = "SCNL") )]
8652	CodeSCNL,
8653}
8654
8655impl AuthenticationMethod1Code {
8656	pub fn validate(&self) -> Result<(), ValidationError> {
8657		Ok(())
8658	}
8659}
8660
8661
8662// Authorisation1Choice ...
8663#[cfg_attr(feature = "derive_debug", derive(Debug))]
8664#[cfg_attr(feature = "derive_default", derive(Default))]
8665#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8666#[cfg_attr(feature = "derive_clone", derive(Clone))]
8667#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8668pub struct Authorisation1Choice {
8669	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
8670	pub cd: Option<Authorisation1Code>,
8671	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
8672	pub prtry: Option<String>,
8673}
8674
8675impl Authorisation1Choice {
8676	pub fn validate(&self) -> Result<(), ValidationError> {
8677		if let Some(ref val) = self.cd { val.validate()? }
8678		if let Some(ref val) = self.prtry {
8679			if val.chars().count() < 1 {
8680				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
8681			}
8682			if val.chars().count() > 128 {
8683				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 128".to_string()));
8684			}
8685		}
8686		Ok(())
8687	}
8688}
8689
8690
8691// Authorisation1Code ...
8692#[cfg_attr(feature = "derive_debug", derive(Debug))]
8693#[cfg_attr(feature = "derive_default", derive(Default))]
8694#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8695#[cfg_attr(feature = "derive_clone", derive(Clone))]
8696#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8697pub enum Authorisation1Code {
8698	#[cfg_attr(feature = "derive_default", default)]
8699	#[cfg_attr( feature = "derive_serde", serde(rename = "AUTH") )]
8700	CodeAUTH,
8701	#[cfg_attr( feature = "derive_serde", serde(rename = "FDET") )]
8702	CodeFDET,
8703	#[cfg_attr( feature = "derive_serde", serde(rename = "FSUM") )]
8704	CodeFSUM,
8705	#[cfg_attr( feature = "derive_serde", serde(rename = "ILEV") )]
8706	CodeILEV,
8707}
8708
8709impl Authorisation1Code {
8710	pub fn validate(&self) -> Result<(), ValidationError> {
8711		Ok(())
8712	}
8713}
8714
8715
8716// Authorisation2 ...
8717#[cfg_attr(feature = "derive_debug", derive(Debug))]
8718#[cfg_attr(feature = "derive_default", derive(Default))]
8719#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8720#[cfg_attr(feature = "derive_clone", derive(Clone))]
8721#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8722pub struct Authorisation2 {
8723	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxAmtByTx", skip_serializing_if = "Option::is_none") )]
8724	pub max_amt_by_tx: Option<FixedAmountOrUnlimited1Choice>,
8725	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxAmtByPrd", skip_serializing_if = "Option::is_none") )]
8726	pub max_amt_by_prd: Option<Vec<MaximumAmountByPeriod1>>,
8727	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxAmtByBlkSubmissn", skip_serializing_if = "Option::is_none") )]
8728	pub max_amt_by_blk_submissn: Option<FixedAmountOrUnlimited1Choice>,
8729}
8730
8731impl Authorisation2 {
8732	pub fn validate(&self) -> Result<(), ValidationError> {
8733		if let Some(ref val) = self.max_amt_by_tx { val.validate()? }
8734		if let Some(ref vec) = self.max_amt_by_prd { for item in vec { item.validate()? } }
8735		if let Some(ref val) = self.max_amt_by_blk_submissn { val.validate()? }
8736		Ok(())
8737	}
8738}
8739
8740
8741// AuthorityInvestigation2 ...
8742#[cfg_attr(feature = "derive_debug", derive(Debug))]
8743#[cfg_attr(feature = "derive_default", derive(Default))]
8744#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8745#[cfg_attr(feature = "derive_clone", derive(Clone))]
8746#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8747pub struct AuthorityInvestigation2 {
8748	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
8749	pub tp: AuthorityRequestType1,
8750	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstgtdRoles") )]
8751	pub invstgtd_roles: InvestigatedParties1Choice,
8752	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInvstgtdPties", skip_serializing_if = "Option::is_none") )]
8753	pub addtl_invstgtd_pties: Option<InvestigatedParties1Choice>,
8754	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
8755	pub addtl_inf: Option<String>,
8756}
8757
8758impl AuthorityInvestigation2 {
8759	pub fn validate(&self) -> Result<(), ValidationError> {
8760		self.tp.validate()?;
8761		self.invstgtd_roles.validate()?;
8762		if let Some(ref val) = self.addtl_invstgtd_pties { val.validate()? }
8763		if let Some(ref val) = self.addtl_inf {
8764			if val.chars().count() < 1 {
8765				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
8766			}
8767			if val.chars().count() > 500 {
8768				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 500".to_string()));
8769			}
8770		}
8771		Ok(())
8772	}
8773}
8774
8775
8776// AuthorityRequestType1 ...
8777#[cfg_attr(feature = "derive_debug", derive(Debug))]
8778#[cfg_attr(feature = "derive_default", derive(Default))]
8779#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8780#[cfg_attr(feature = "derive_clone", derive(Clone))]
8781#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8782pub struct AuthorityRequestType1 {
8783	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNmId") )]
8784	pub msg_nm_id: String,
8785	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNm", skip_serializing_if = "Option::is_none") )]
8786	pub msg_nm: Option<String>,
8787}
8788
8789impl AuthorityRequestType1 {
8790	pub fn validate(&self) -> Result<(), ValidationError> {
8791		if self.msg_nm_id.chars().count() < 1 {
8792			return Err(ValidationError::new(1001, "msg_nm_id is shorter than the minimum length of 1".to_string()));
8793		}
8794		if self.msg_nm_id.chars().count() > 35 {
8795			return Err(ValidationError::new(1002, "msg_nm_id exceeds the maximum length of 35".to_string()));
8796		}
8797		if let Some(ref val) = self.msg_nm {
8798			if val.chars().count() < 1 {
8799				return Err(ValidationError::new(1001, "msg_nm is shorter than the minimum length of 1".to_string()));
8800			}
8801			if val.chars().count() > 140 {
8802				return Err(ValidationError::new(1002, "msg_nm exceeds the maximum length of 140".to_string()));
8803			}
8804		}
8805		Ok(())
8806	}
8807}
8808
8809
8810// AvailableFinancialResourcesAmount1 ...
8811#[cfg_attr(feature = "derive_debug", derive(Debug))]
8812#[cfg_attr(feature = "derive_default", derive(Default))]
8813#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8814#[cfg_attr(feature = "derive_clone", derive(Clone))]
8815#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8816pub struct AvailableFinancialResourcesAmount1 {
8817	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlInitlMrgn") )]
8818	pub ttl_initl_mrgn: ActiveCurrencyAndAmount,
8819	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlPrfnddDfltFnd") )]
8820	pub ttl_prfndd_dflt_fnd: ActiveCurrencyAndAmount,
8821	#[cfg_attr( feature = "derive_serde", serde(rename = "CCPSkinInTheGame") )]
8822	pub ccp_skin_in_the_game: Vec<ReportingAssetBreakdown1>,
8823	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrDfltFndCntrbtn") )]
8824	pub othr_dflt_fnd_cntrbtn: ActiveCurrencyAndAmount,
8825	#[cfg_attr( feature = "derive_serde", serde(rename = "UfnddMmbCmmtmnt") )]
8826	pub ufndd_mmb_cmmtmnt: ActiveCurrencyAndAmount,
8827	#[cfg_attr( feature = "derive_serde", serde(rename = "UfnddThrdPtyCmmtmnt") )]
8828	pub ufndd_thrd_pty_cmmtmnt: ActiveCurrencyAndAmount,
8829}
8830
8831impl AvailableFinancialResourcesAmount1 {
8832	pub fn validate(&self) -> Result<(), ValidationError> {
8833		self.ttl_initl_mrgn.validate()?;
8834		self.ttl_prfndd_dflt_fnd.validate()?;
8835		for item in &self.ccp_skin_in_the_game { item.validate()? }
8836		self.othr_dflt_fnd_cntrbtn.validate()?;
8837		self.ufndd_mmb_cmmtmnt.validate()?;
8838		self.ufndd_thrd_pty_cmmtmnt.validate()?;
8839		Ok(())
8840	}
8841}
8842
8843
8844// BackTestingMethodology1 ...
8845#[cfg_attr(feature = "derive_debug", derive(Debug))]
8846#[cfg_attr(feature = "derive_default", derive(Default))]
8847#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8848#[cfg_attr(feature = "derive_clone", derive(Clone))]
8849#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8850pub struct BackTestingMethodology1 {
8851	#[cfg_attr( feature = "derive_serde", serde(rename = "RskMdlTp") )]
8852	pub rsk_mdl_tp: ModelType1Choice,
8853	#[cfg_attr( feature = "derive_serde", serde(rename = "MdlCnfdncLvl") )]
8854	pub mdl_cnfdnc_lvl: f64,
8855	#[cfg_attr( feature = "derive_serde", serde(rename = "VartnMrgnCleanInd") )]
8856	pub vartn_mrgn_clean_ind: bool,
8857	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
8858	pub desc: Option<String>,
8859}
8860
8861impl BackTestingMethodology1 {
8862	pub fn validate(&self) -> Result<(), ValidationError> {
8863		self.rsk_mdl_tp.validate()?;
8864		if let Some(ref val) = self.desc {
8865			if val.chars().count() < 1 {
8866				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
8867			}
8868			if val.chars().count() > 2000 {
8869				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 2000".to_string()));
8870			}
8871		}
8872		Ok(())
8873	}
8874}
8875
8876
8877// BalanceAdjustment1 ...
8878#[cfg_attr(feature = "derive_debug", derive(Debug))]
8879#[cfg_attr(feature = "derive_default", derive(Default))]
8880#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8881#[cfg_attr(feature = "derive_clone", derive(Clone))]
8882#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8883pub struct BalanceAdjustment1 {
8884	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
8885	pub tp: BalanceAdjustmentType1Code,
8886	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc") )]
8887	pub desc: String,
8888	#[cfg_attr( feature = "derive_serde", serde(rename = "BalAmt") )]
8889	pub bal_amt: AmountAndDirection34,
8890	#[cfg_attr( feature = "derive_serde", serde(rename = "AvrgAmt", skip_serializing_if = "Option::is_none") )]
8891	pub avrg_amt: Option<AmountAndDirection34>,
8892	#[cfg_attr( feature = "derive_serde", serde(rename = "ErrDt", skip_serializing_if = "Option::is_none") )]
8893	pub err_dt: Option<String>,
8894	#[cfg_attr( feature = "derive_serde", serde(rename = "PstngDt") )]
8895	pub pstng_dt: String,
8896	#[cfg_attr( feature = "derive_serde", serde(rename = "Days", skip_serializing_if = "Option::is_none") )]
8897	pub days: Option<f64>,
8898	#[cfg_attr( feature = "derive_serde", serde(rename = "EarngsAdjstmntAmt", skip_serializing_if = "Option::is_none") )]
8899	pub earngs_adjstmnt_amt: Option<AmountAndDirection34>,
8900}
8901
8902impl BalanceAdjustment1 {
8903	pub fn validate(&self) -> Result<(), ValidationError> {
8904		self.tp.validate()?;
8905		if self.desc.chars().count() < 1 {
8906			return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
8907		}
8908		if self.desc.chars().count() > 105 {
8909			return Err(ValidationError::new(1002, "desc exceeds the maximum length of 105".to_string()));
8910		}
8911		self.bal_amt.validate()?;
8912		if let Some(ref val) = self.avrg_amt { val.validate()? }
8913		if let Some(ref val) = self.earngs_adjstmnt_amt { val.validate()? }
8914		Ok(())
8915	}
8916}
8917
8918
8919// BalanceAdjustmentType1Code ...
8920#[cfg_attr(feature = "derive_debug", derive(Debug))]
8921#[cfg_attr(feature = "derive_default", derive(Default))]
8922#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8923#[cfg_attr(feature = "derive_clone", derive(Clone))]
8924#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8925pub enum BalanceAdjustmentType1Code {
8926	#[cfg_attr(feature = "derive_default", default)]
8927	#[cfg_attr( feature = "derive_serde", serde(rename = "LDGR") )]
8928	CodeLDGR,
8929	#[cfg_attr( feature = "derive_serde", serde(rename = "FLOT") )]
8930	CodeFLOT,
8931	#[cfg_attr( feature = "derive_serde", serde(rename = "CLLD") )]
8932	CodeCLLD,
8933}
8934
8935impl BalanceAdjustmentType1Code {
8936	pub fn validate(&self) -> Result<(), ValidationError> {
8937		Ok(())
8938	}
8939}
8940
8941
8942// BalanceCounterparty1Code ...
8943#[cfg_attr(feature = "derive_debug", derive(Debug))]
8944#[cfg_attr(feature = "derive_default", derive(Default))]
8945#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8946#[cfg_attr(feature = "derive_clone", derive(Clone))]
8947#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8948pub enum BalanceCounterparty1Code {
8949	#[cfg_attr(feature = "derive_default", default)]
8950	#[cfg_attr( feature = "derive_serde", serde(rename = "BILA") )]
8951	CodeBILA,
8952	#[cfg_attr( feature = "derive_serde", serde(rename = "MULT") )]
8953	CodeMULT,
8954}
8955
8956impl BalanceCounterparty1Code {
8957	pub fn validate(&self) -> Result<(), ValidationError> {
8958		Ok(())
8959	}
8960}
8961
8962
8963// BalanceRestrictionType1 ...
8964#[cfg_attr(feature = "derive_debug", derive(Debug))]
8965#[cfg_attr(feature = "derive_default", derive(Default))]
8966#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8967#[cfg_attr(feature = "derive_clone", derive(Clone))]
8968#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
8969pub struct BalanceRestrictionType1 {
8970	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
8971	pub tp: GenericIdentification1,
8972	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
8973	pub desc: Option<String>,
8974	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgTp", skip_serializing_if = "Option::is_none") )]
8975	pub prcg_tp: Option<ProcessingType1Choice>,
8976}
8977
8978impl BalanceRestrictionType1 {
8979	pub fn validate(&self) -> Result<(), ValidationError> {
8980		self.tp.validate()?;
8981		if let Some(ref val) = self.desc {
8982			if val.chars().count() < 1 {
8983				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
8984			}
8985			if val.chars().count() > 140 {
8986				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 140".to_string()));
8987			}
8988		}
8989		if let Some(ref val) = self.prcg_tp { val.validate()? }
8990		Ok(())
8991	}
8992}
8993
8994
8995// BalanceStatus1Code ...
8996#[cfg_attr(feature = "derive_debug", derive(Debug))]
8997#[cfg_attr(feature = "derive_default", derive(Default))]
8998#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
8999#[cfg_attr(feature = "derive_clone", derive(Clone))]
9000#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9001pub enum BalanceStatus1Code {
9002	#[cfg_attr(feature = "derive_default", default)]
9003	#[cfg_attr( feature = "derive_serde", serde(rename = "PDNG") )]
9004	CodePDNG,
9005	#[cfg_attr( feature = "derive_serde", serde(rename = "STLD") )]
9006	CodeSTLD,
9007}
9008
9009impl BalanceStatus1Code {
9010	pub fn validate(&self) -> Result<(), ValidationError> {
9011		Ok(())
9012	}
9013}
9014
9015
9016// BalanceStatus2 ...
9017#[cfg_attr(feature = "derive_debug", derive(Debug))]
9018#[cfg_attr(feature = "derive_default", derive(Default))]
9019#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9020#[cfg_attr(feature = "derive_clone", derive(Clone))]
9021#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9022pub struct BalanceStatus2 {
9023	#[cfg_attr( feature = "derive_serde", serde(rename = "Bal") )]
9024	pub bal: ActiveCurrencyAndAmount,
9025}
9026
9027impl BalanceStatus2 {
9028	pub fn validate(&self) -> Result<(), ValidationError> {
9029		self.bal.validate()?;
9030		Ok(())
9031	}
9032}
9033
9034
9035// BalanceSubType1Choice ...
9036#[cfg_attr(feature = "derive_debug", derive(Debug))]
9037#[cfg_attr(feature = "derive_default", derive(Default))]
9038#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9039#[cfg_attr(feature = "derive_clone", derive(Clone))]
9040#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9041pub struct BalanceSubType1Choice {
9042	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
9043	pub cd: Option<String>,
9044	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
9045	pub prtry: Option<String>,
9046}
9047
9048impl BalanceSubType1Choice {
9049	pub fn validate(&self) -> Result<(), ValidationError> {
9050		if let Some(ref val) = self.cd {
9051			if val.chars().count() < 1 {
9052				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
9053			}
9054			if val.chars().count() > 4 {
9055				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
9056			}
9057		}
9058		if let Some(ref val) = self.prtry {
9059			if val.chars().count() < 1 {
9060				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
9061			}
9062			if val.chars().count() > 35 {
9063				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
9064			}
9065		}
9066		Ok(())
9067	}
9068}
9069
9070
9071// BalanceTransfer5 ...
9072#[cfg_attr(feature = "derive_debug", derive(Debug))]
9073#[cfg_attr(feature = "derive_default", derive(Default))]
9074#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9075#[cfg_attr(feature = "derive_clone", derive(Clone))]
9076#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9077pub struct BalanceTransfer5 {
9078	#[cfg_attr( feature = "derive_serde", serde(rename = "BalTrfRef", skip_serializing_if = "Option::is_none") )]
9079	pub bal_trf_ref: Option<BalanceTransferReference1>,
9080	#[cfg_attr( feature = "derive_serde", serde(rename = "BalTrfMtd", skip_serializing_if = "Option::is_none") )]
9081	pub bal_trf_mtd: Option<SettlementMethod5Choice>,
9082	#[cfg_attr( feature = "derive_serde", serde(rename = "BalTrfFndgLmt", skip_serializing_if = "Option::is_none") )]
9083	pub bal_trf_fndg_lmt: Option<BalanceTransferFundingLimit1>,
9084}
9085
9086impl BalanceTransfer5 {
9087	pub fn validate(&self) -> Result<(), ValidationError> {
9088		if let Some(ref val) = self.bal_trf_ref { val.validate()? }
9089		if let Some(ref val) = self.bal_trf_mtd { val.validate()? }
9090		if let Some(ref val) = self.bal_trf_fndg_lmt { val.validate()? }
9091		Ok(())
9092	}
9093}
9094
9095
9096// BalanceTransferFundingLimit1 ...
9097#[cfg_attr(feature = "derive_debug", derive(Debug))]
9098#[cfg_attr(feature = "derive_default", derive(Default))]
9099#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9100#[cfg_attr(feature = "derive_clone", derive(Clone))]
9101#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9102pub struct BalanceTransferFundingLimit1 {
9103	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyAmt") )]
9104	pub ccy_amt: ActiveCurrencyAndAmount,
9105}
9106
9107impl BalanceTransferFundingLimit1 {
9108	pub fn validate(&self) -> Result<(), ValidationError> {
9109		self.ccy_amt.validate()?;
9110		Ok(())
9111	}
9112}
9113
9114
9115// BalanceTransferReference1 ...
9116#[cfg_attr(feature = "derive_debug", derive(Debug))]
9117#[cfg_attr(feature = "derive_default", derive(Default))]
9118#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9119#[cfg_attr(feature = "derive_clone", derive(Clone))]
9120#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9121pub struct BalanceTransferReference1 {
9122	#[cfg_attr( feature = "derive_serde", serde(rename = "BalTrfRef") )]
9123	pub bal_trf_ref: String,
9124}
9125
9126impl BalanceTransferReference1 {
9127	pub fn validate(&self) -> Result<(), ValidationError> {
9128		if self.bal_trf_ref.chars().count() < 1 {
9129			return Err(ValidationError::new(1001, "bal_trf_ref is shorter than the minimum length of 1".to_string()));
9130		}
9131		if self.bal_trf_ref.chars().count() > 35 {
9132			return Err(ValidationError::new(1002, "bal_trf_ref exceeds the maximum length of 35".to_string()));
9133		}
9134		Ok(())
9135	}
9136}
9137
9138
9139// BalanceTransferWindow1Code ...
9140#[cfg_attr(feature = "derive_debug", derive(Debug))]
9141#[cfg_attr(feature = "derive_default", derive(Default))]
9142#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9143#[cfg_attr(feature = "derive_clone", derive(Clone))]
9144#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9145pub enum BalanceTransferWindow1Code {
9146	#[cfg_attr(feature = "derive_default", default)]
9147	#[cfg_attr( feature = "derive_serde", serde(rename = "DAYH") )]
9148	CodeDAYH,
9149	#[cfg_attr( feature = "derive_serde", serde(rename = "EARL") )]
9150	CodeEARL,
9151}
9152
9153impl BalanceTransferWindow1Code {
9154	pub fn validate(&self) -> Result<(), ValidationError> {
9155		Ok(())
9156	}
9157}
9158
9159
9160// BalanceType10Choice ...
9161#[cfg_attr(feature = "derive_debug", derive(Debug))]
9162#[cfg_attr(feature = "derive_default", derive(Default))]
9163#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9164#[cfg_attr(feature = "derive_clone", derive(Clone))]
9165#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9166pub struct BalanceType10Choice {
9167	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
9168	pub cd: Option<String>,
9169	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
9170	pub prtry: Option<String>,
9171}
9172
9173impl BalanceType10Choice {
9174	pub fn validate(&self) -> Result<(), ValidationError> {
9175		if let Some(ref val) = self.cd {
9176			if val.chars().count() < 1 {
9177				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
9178			}
9179			if val.chars().count() > 4 {
9180				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
9181			}
9182		}
9183		if let Some(ref val) = self.prtry {
9184			if val.chars().count() < 1 {
9185				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
9186			}
9187			if val.chars().count() > 35 {
9188				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
9189			}
9190		}
9191		Ok(())
9192	}
9193}
9194
9195
9196// BalanceType11Choice ...
9197#[cfg_attr(feature = "derive_debug", derive(Debug))]
9198#[cfg_attr(feature = "derive_default", derive(Default))]
9199#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9200#[cfg_attr(feature = "derive_clone", derive(Clone))]
9201#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9202pub struct BalanceType11Choice {
9203	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
9204	pub cd: Option<String>,
9205	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
9206	pub prtry: Option<String>,
9207}
9208
9209impl BalanceType11Choice {
9210	pub fn validate(&self) -> Result<(), ValidationError> {
9211		if let Some(ref val) = self.cd {
9212			if val.chars().count() < 1 {
9213				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
9214			}
9215			if val.chars().count() > 4 {
9216				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
9217			}
9218		}
9219		if let Some(ref val) = self.prtry {
9220			if val.chars().count() < 1 {
9221				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
9222			}
9223			if val.chars().count() > 35 {
9224				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
9225			}
9226		}
9227		Ok(())
9228	}
9229}
9230
9231
9232// BalanceType13 ...
9233#[cfg_attr(feature = "derive_debug", derive(Debug))]
9234#[cfg_attr(feature = "derive_default", derive(Default))]
9235#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9236#[cfg_attr(feature = "derive_clone", derive(Clone))]
9237#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9238pub struct BalanceType13 {
9239	#[cfg_attr( feature = "derive_serde", serde(rename = "CdOrPrtry") )]
9240	pub cd_or_prtry: BalanceType10Choice,
9241	#[cfg_attr( feature = "derive_serde", serde(rename = "SubTp", skip_serializing_if = "Option::is_none") )]
9242	pub sub_tp: Option<BalanceSubType1Choice>,
9243}
9244
9245impl BalanceType13 {
9246	pub fn validate(&self) -> Result<(), ValidationError> {
9247		self.cd_or_prtry.validate()?;
9248		if let Some(ref val) = self.sub_tp { val.validate()? }
9249		Ok(())
9250	}
9251}
9252
9253
9254// BalanceType9Choice ...
9255#[cfg_attr(feature = "derive_debug", derive(Debug))]
9256#[cfg_attr(feature = "derive_default", derive(Default))]
9257#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9258#[cfg_attr(feature = "derive_clone", derive(Clone))]
9259#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9260pub struct BalanceType9Choice {
9261	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
9262	pub cd: Option<SystemBalanceType2Code>,
9263	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
9264	pub prtry: Option<String>,
9265}
9266
9267impl BalanceType9Choice {
9268	pub fn validate(&self) -> Result<(), ValidationError> {
9269		if let Some(ref val) = self.cd { val.validate()? }
9270		if let Some(ref val) = self.prtry {
9271			if val.chars().count() < 1 {
9272				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
9273			}
9274			if val.chars().count() > 35 {
9275				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
9276			}
9277		}
9278		Ok(())
9279	}
9280}
9281
9282
9283// BankTransactionCodeStructure4 ...
9284#[cfg_attr(feature = "derive_debug", derive(Debug))]
9285#[cfg_attr(feature = "derive_default", derive(Default))]
9286#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9287#[cfg_attr(feature = "derive_clone", derive(Clone))]
9288#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9289pub struct BankTransactionCodeStructure4 {
9290	#[cfg_attr( feature = "derive_serde", serde(rename = "Domn", skip_serializing_if = "Option::is_none") )]
9291	pub domn: Option<BankTransactionCodeStructure5>,
9292	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
9293	pub prtry: Option<ProprietaryBankTransactionCodeStructure1>,
9294}
9295
9296impl BankTransactionCodeStructure4 {
9297	pub fn validate(&self) -> Result<(), ValidationError> {
9298		if let Some(ref val) = self.domn { val.validate()? }
9299		if let Some(ref val) = self.prtry { val.validate()? }
9300		Ok(())
9301	}
9302}
9303
9304
9305// BankTransactionCodeStructure5 ...
9306#[cfg_attr(feature = "derive_debug", derive(Debug))]
9307#[cfg_attr(feature = "derive_default", derive(Default))]
9308#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9309#[cfg_attr(feature = "derive_clone", derive(Clone))]
9310#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9311pub struct BankTransactionCodeStructure5 {
9312	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
9313	pub cd: String,
9314	#[cfg_attr( feature = "derive_serde", serde(rename = "Fmly") )]
9315	pub fmly: BankTransactionCodeStructure6,
9316}
9317
9318impl BankTransactionCodeStructure5 {
9319	pub fn validate(&self) -> Result<(), ValidationError> {
9320		if self.cd.chars().count() < 1 {
9321			return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
9322		}
9323		if self.cd.chars().count() > 4 {
9324			return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
9325		}
9326		self.fmly.validate()?;
9327		Ok(())
9328	}
9329}
9330
9331
9332// BankTransactionCodeStructure6 ...
9333#[cfg_attr(feature = "derive_debug", derive(Debug))]
9334#[cfg_attr(feature = "derive_default", derive(Default))]
9335#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9336#[cfg_attr(feature = "derive_clone", derive(Clone))]
9337#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9338pub struct BankTransactionCodeStructure6 {
9339	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
9340	pub cd: String,
9341	#[cfg_attr( feature = "derive_serde", serde(rename = "SubFmlyCd") )]
9342	pub sub_fmly_cd: String,
9343}
9344
9345impl BankTransactionCodeStructure6 {
9346	pub fn validate(&self) -> Result<(), ValidationError> {
9347		if self.cd.chars().count() < 1 {
9348			return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
9349		}
9350		if self.cd.chars().count() > 4 {
9351			return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
9352		}
9353		if self.sub_fmly_cd.chars().count() < 1 {
9354			return Err(ValidationError::new(1001, "sub_fmly_cd is shorter than the minimum length of 1".to_string()));
9355		}
9356		if self.sub_fmly_cd.chars().count() > 4 {
9357			return Err(ValidationError::new(1002, "sub_fmly_cd exceeds the maximum length of 4".to_string()));
9358		}
9359		Ok(())
9360	}
9361}
9362
9363
9364// BasketConstituents3 ...
9365#[cfg_attr(feature = "derive_debug", derive(Debug))]
9366#[cfg_attr(feature = "derive_default", derive(Default))]
9367#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9368#[cfg_attr(feature = "derive_clone", derive(Clone))]
9369#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9370pub struct BasketConstituents3 {
9371	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrmId") )]
9372	pub instrm_id: InstrumentIdentification6Choice,
9373	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty", skip_serializing_if = "Option::is_none") )]
9374	pub qty: Option<f64>,
9375	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitOfMeasr", skip_serializing_if = "Option::is_none") )]
9376	pub unit_of_measr: Option<UnitOfMeasure8Choice>,
9377}
9378
9379impl BasketConstituents3 {
9380	pub fn validate(&self) -> Result<(), ValidationError> {
9381		self.instrm_id.validate()?;
9382		if let Some(ref val) = self.unit_of_measr { val.validate()? }
9383		Ok(())
9384	}
9385}
9386
9387
9388// BasketDescription3 ...
9389#[cfg_attr(feature = "derive_debug", derive(Debug))]
9390#[cfg_attr(feature = "derive_default", derive(Default))]
9391#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9392#[cfg_attr(feature = "derive_clone", derive(Clone))]
9393#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9394pub struct BasketDescription3 {
9395	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
9396	pub isin: Option<Vec<String>>,
9397	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
9398	pub indx: Option<Vec<FinancialInstrument58>>,
9399}
9400
9401impl BasketDescription3 {
9402	pub fn validate(&self) -> Result<(), ValidationError> {
9403		if let Some(ref vec) = self.isin {
9404			for item in vec {
9405				let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
9406				if !pattern.is_match(&item) {
9407					return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
9408				}
9409			}
9410		}
9411		if let Some(ref vec) = self.indx { for item in vec { item.validate()? } }
9412		Ok(())
9413	}
9414}
9415
9416
9417// BasketQuery1 ...
9418#[cfg_attr(feature = "derive_debug", derive(Debug))]
9419#[cfg_attr(feature = "derive_default", derive(Default))]
9420#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9421#[cfg_attr(feature = "derive_clone", derive(Clone))]
9422#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9423pub struct BasketQuery1 {
9424	#[cfg_attr( feature = "derive_serde", serde(rename = "Strr", skip_serializing_if = "Option::is_none") )]
9425	pub strr: Option<String>,
9426	#[cfg_attr( feature = "derive_serde", serde(rename = "Idr", skip_serializing_if = "Option::is_none") )]
9427	pub idr: Option<String>,
9428	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
9429	pub isin: Option<String>,
9430}
9431
9432impl BasketQuery1 {
9433	pub fn validate(&self) -> Result<(), ValidationError> {
9434		if let Some(ref val) = self.strr {
9435			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
9436			if !pattern.is_match(val) {
9437				return Err(ValidationError::new(1005, "strr does not match the required pattern".to_string()));
9438			}
9439		}
9440		if let Some(ref val) = self.idr {
9441			if val.chars().count() < 1 {
9442				return Err(ValidationError::new(1001, "idr is shorter than the minimum length of 1".to_string()));
9443			}
9444			if val.chars().count() > 52 {
9445				return Err(ValidationError::new(1002, "idr exceeds the maximum length of 52".to_string()));
9446			}
9447		}
9448		if let Some(ref val) = self.isin {
9449			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
9450			if !pattern.is_match(val) {
9451				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
9452			}
9453		}
9454		Ok(())
9455	}
9456}
9457
9458
9459// BatchInformation2 ...
9460#[cfg_attr(feature = "derive_debug", derive(Debug))]
9461#[cfg_attr(feature = "derive_default", derive(Default))]
9462#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9463#[cfg_attr(feature = "derive_clone", derive(Clone))]
9464#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9465pub struct BatchInformation2 {
9466	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId", skip_serializing_if = "Option::is_none") )]
9467	pub msg_id: Option<String>,
9468	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfId", skip_serializing_if = "Option::is_none") )]
9469	pub pmt_inf_id: Option<String>,
9470	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs", skip_serializing_if = "Option::is_none") )]
9471	pub nb_of_txs: Option<String>,
9472	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlAmt", skip_serializing_if = "Option::is_none") )]
9473	pub ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9474	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
9475	pub cdt_dbt_ind: Option<CreditDebitCode>,
9476}
9477
9478impl BatchInformation2 {
9479	pub fn validate(&self) -> Result<(), ValidationError> {
9480		if let Some(ref val) = self.msg_id {
9481			if val.chars().count() < 1 {
9482				return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
9483			}
9484			if val.chars().count() > 35 {
9485				return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
9486			}
9487		}
9488		if let Some(ref val) = self.pmt_inf_id {
9489			if val.chars().count() < 1 {
9490				return Err(ValidationError::new(1001, "pmt_inf_id is shorter than the minimum length of 1".to_string()));
9491			}
9492			if val.chars().count() > 35 {
9493				return Err(ValidationError::new(1002, "pmt_inf_id exceeds the maximum length of 35".to_string()));
9494			}
9495		}
9496		if let Some(ref val) = self.nb_of_txs {
9497			let pattern = Regex::new("[0-9]{1,15}").unwrap();
9498			if !pattern.is_match(val) {
9499				return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
9500			}
9501		}
9502		if let Some(ref val) = self.ttl_amt { val.validate()? }
9503		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
9504		Ok(())
9505	}
9506}
9507
9508
9509// BenchmarkCancellation1 ...
9510#[cfg_attr(feature = "derive_debug", derive(Debug))]
9511#[cfg_attr(feature = "derive_default", derive(Default))]
9512#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9513#[cfg_attr(feature = "derive_clone", derive(Clone))]
9514#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9515pub struct BenchmarkCancellation1 {
9516	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
9517	pub tech_rcrd_id: Option<String>,
9518	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
9519	pub id: SecurityIdentification19,
9520	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
9521	pub splmtry_data: Option<Vec<SupplementaryData1>>,
9522}
9523
9524impl BenchmarkCancellation1 {
9525	pub fn validate(&self) -> Result<(), ValidationError> {
9526		if let Some(ref val) = self.tech_rcrd_id {
9527			if val.chars().count() < 1 {
9528				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
9529			}
9530			if val.chars().count() > 35 {
9531				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
9532			}
9533		}
9534		self.id.validate()?;
9535		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
9536		Ok(())
9537	}
9538}
9539
9540
9541// BenchmarkCreate1 ...
9542#[cfg_attr(feature = "derive_debug", derive(Debug))]
9543#[cfg_attr(feature = "derive_default", derive(Default))]
9544#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9545#[cfg_attr(feature = "derive_clone", derive(Clone))]
9546#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9547pub struct BenchmarkCreate1 {
9548	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
9549	pub tech_rcrd_id: Option<String>,
9550	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
9551	pub id: SecurityIdentification19,
9552	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr") )]
9553	pub othr: BenchmarkDetail1,
9554	#[cfg_attr( feature = "derive_serde", serde(rename = "Admstr") )]
9555	pub admstr: PartyIdentification136,
9556	#[cfg_attr( feature = "derive_serde", serde(rename = "NdrsngPty", skip_serializing_if = "Option::is_none") )]
9557	pub ndrsng_pty: Option<PartyIdentification136>,
9558	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
9559	pub sts: Option<StatusDetail1>,
9560	#[cfg_attr( feature = "derive_serde", serde(rename = "TechVldtyPrd", skip_serializing_if = "Option::is_none") )]
9561	pub tech_vldty_prd: Option<Period4Choice>,
9562	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
9563	pub splmtry_data: Option<Vec<SupplementaryData1>>,
9564}
9565
9566impl BenchmarkCreate1 {
9567	pub fn validate(&self) -> Result<(), ValidationError> {
9568		if let Some(ref val) = self.tech_rcrd_id {
9569			if val.chars().count() < 1 {
9570				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
9571			}
9572			if val.chars().count() > 35 {
9573				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
9574			}
9575		}
9576		self.id.validate()?;
9577		self.othr.validate()?;
9578		self.admstr.validate()?;
9579		if let Some(ref val) = self.ndrsng_pty { val.validate()? }
9580		if let Some(ref val) = self.sts { val.validate()? }
9581		if let Some(ref val) = self.tech_vldty_prd { val.validate()? }
9582		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
9583		Ok(())
9584	}
9585}
9586
9587
9588// BenchmarkCurve6 ...
9589#[cfg_attr(feature = "derive_debug", derive(Debug))]
9590#[cfg_attr(feature = "derive_default", derive(Default))]
9591#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9592#[cfg_attr(feature = "derive_clone", derive(Clone))]
9593#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9594pub struct BenchmarkCurve6 {
9595	#[cfg_attr( feature = "derive_serde", serde(rename = "Sprd", skip_serializing_if = "Option::is_none") )]
9596	pub sprd: Option<f64>,
9597	#[cfg_attr( feature = "derive_serde", serde(rename = "BchmkId", skip_serializing_if = "Option::is_none") )]
9598	pub bchmk_id: Option<SecurityIdentification39>,
9599	#[cfg_attr( feature = "derive_serde", serde(rename = "BchmkPric", skip_serializing_if = "Option::is_none") )]
9600	pub bchmk_pric: Option<Price8>,
9601	#[cfg_attr( feature = "derive_serde", serde(rename = "BchmkCrvCcy", skip_serializing_if = "Option::is_none") )]
9602	pub bchmk_crv_ccy: Option<String>,
9603	#[cfg_attr( feature = "derive_serde", serde(rename = "BchmkCrvNm", skip_serializing_if = "Option::is_none") )]
9604	pub bchmk_crv_nm: Option<BenchmarkCurveName7Choice>,
9605	#[cfg_attr( feature = "derive_serde", serde(rename = "BchmkCrvPt", skip_serializing_if = "Option::is_none") )]
9606	pub bchmk_crv_pt: Option<String>,
9607}
9608
9609impl BenchmarkCurve6 {
9610	pub fn validate(&self) -> Result<(), ValidationError> {
9611		if let Some(ref val) = self.bchmk_id { val.validate()? }
9612		if let Some(ref val) = self.bchmk_pric { val.validate()? }
9613		if let Some(ref val) = self.bchmk_crv_ccy {
9614			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
9615			if !pattern.is_match(val) {
9616				return Err(ValidationError::new(1005, "bchmk_crv_ccy does not match the required pattern".to_string()));
9617			}
9618		}
9619		if let Some(ref val) = self.bchmk_crv_nm { val.validate()? }
9620		if let Some(ref val) = self.bchmk_crv_pt {
9621			if val.chars().count() < 1 {
9622				return Err(ValidationError::new(1001, "bchmk_crv_pt is shorter than the minimum length of 1".to_string()));
9623			}
9624			if val.chars().count() > 256 {
9625				return Err(ValidationError::new(1002, "bchmk_crv_pt exceeds the maximum length of 256".to_string()));
9626			}
9627		}
9628		Ok(())
9629	}
9630}
9631
9632
9633// BenchmarkCurveName10Choice ...
9634#[cfg_attr(feature = "derive_debug", derive(Debug))]
9635#[cfg_attr(feature = "derive_default", derive(Default))]
9636#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9637#[cfg_attr(feature = "derive_clone", derive(Clone))]
9638#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9639pub struct BenchmarkCurveName10Choice {
9640	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
9641	pub indx: Option<BenchmarkCurveName3Code>,
9642	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
9643	pub nm: Option<String>,
9644}
9645
9646impl BenchmarkCurveName10Choice {
9647	pub fn validate(&self) -> Result<(), ValidationError> {
9648		if let Some(ref val) = self.indx { val.validate()? }
9649		if let Some(ref val) = self.nm {
9650			if val.chars().count() < 1 {
9651				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
9652			}
9653			if val.chars().count() > 350 {
9654				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
9655			}
9656		}
9657		Ok(())
9658	}
9659}
9660
9661
9662// BenchmarkCurveName1Code ...
9663#[cfg_attr(feature = "derive_debug", derive(Debug))]
9664#[cfg_attr(feature = "derive_default", derive(Default))]
9665#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9666#[cfg_attr(feature = "derive_clone", derive(Clone))]
9667#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9668pub enum BenchmarkCurveName1Code {
9669	#[cfg_attr(feature = "derive_default", default)]
9670	#[cfg_attr( feature = "derive_serde", serde(rename = "MAAA") )]
9671	CodeMAAA,
9672	#[cfg_attr( feature = "derive_serde", serde(rename = "FUSW") )]
9673	CodeFUSW,
9674	#[cfg_attr( feature = "derive_serde", serde(rename = "LIBI") )]
9675	CodeLIBI,
9676	#[cfg_attr( feature = "derive_serde", serde(rename = "LIBO") )]
9677	CodeLIBO,
9678	#[cfg_attr( feature = "derive_serde", serde(rename = "SWAP") )]
9679	CodeSWAP,
9680	#[cfg_attr( feature = "derive_serde", serde(rename = "TREA") )]
9681	CodeTREA,
9682	#[cfg_attr( feature = "derive_serde", serde(rename = "EURI") )]
9683	CodeEURI,
9684	#[cfg_attr( feature = "derive_serde", serde(rename = "PFAN") )]
9685	CodePFAN,
9686}
9687
9688impl BenchmarkCurveName1Code {
9689	pub fn validate(&self) -> Result<(), ValidationError> {
9690		Ok(())
9691	}
9692}
9693
9694
9695// BenchmarkCurveName2Code ...
9696#[cfg_attr(feature = "derive_debug", derive(Debug))]
9697#[cfg_attr(feature = "derive_default", derive(Default))]
9698#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9699#[cfg_attr(feature = "derive_clone", derive(Clone))]
9700#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9701pub enum BenchmarkCurveName2Code {
9702	#[cfg_attr(feature = "derive_default", default)]
9703	#[cfg_attr( feature = "derive_serde", serde(rename = "WIBO") )]
9704	CodeWIBO,
9705	#[cfg_attr( feature = "derive_serde", serde(rename = "TREA") )]
9706	CodeTREA,
9707	#[cfg_attr( feature = "derive_serde", serde(rename = "TIBO") )]
9708	CodeTIBO,
9709	#[cfg_attr( feature = "derive_serde", serde(rename = "TLBO") )]
9710	CodeTLBO,
9711	#[cfg_attr( feature = "derive_serde", serde(rename = "SWAP") )]
9712	CodeSWAP,
9713	#[cfg_attr( feature = "derive_serde", serde(rename = "STBO") )]
9714	CodeSTBO,
9715	#[cfg_attr( feature = "derive_serde", serde(rename = "PRBO") )]
9716	CodePRBO,
9717	#[cfg_attr( feature = "derive_serde", serde(rename = "PFAN") )]
9718	CodePFAN,
9719	#[cfg_attr( feature = "derive_serde", serde(rename = "NIBO") )]
9720	CodeNIBO,
9721	#[cfg_attr( feature = "derive_serde", serde(rename = "MAAA") )]
9722	CodeMAAA,
9723	#[cfg_attr( feature = "derive_serde", serde(rename = "MOSP") )]
9724	CodeMOSP,
9725	#[cfg_attr( feature = "derive_serde", serde(rename = "LIBO") )]
9726	CodeLIBO,
9727	#[cfg_attr( feature = "derive_serde", serde(rename = "LIBI") )]
9728	CodeLIBI,
9729	#[cfg_attr( feature = "derive_serde", serde(rename = "JIBA") )]
9730	CodeJIBA,
9731	#[cfg_attr( feature = "derive_serde", serde(rename = "ISDA") )]
9732	CodeISDA,
9733	#[cfg_attr( feature = "derive_serde", serde(rename = "GCFR") )]
9734	CodeGCFR,
9735	#[cfg_attr( feature = "derive_serde", serde(rename = "FUSW") )]
9736	CodeFUSW,
9737	#[cfg_attr( feature = "derive_serde", serde(rename = "EUCH") )]
9738	CodeEUCH,
9739	#[cfg_attr( feature = "derive_serde", serde(rename = "EUUS") )]
9740	CodeEUUS,
9741	#[cfg_attr( feature = "derive_serde", serde(rename = "EURI") )]
9742	CodeEURI,
9743	#[cfg_attr( feature = "derive_serde", serde(rename = "EONS") )]
9744	CodeEONS,
9745	#[cfg_attr( feature = "derive_serde", serde(rename = "EONA") )]
9746	CodeEONA,
9747	#[cfg_attr( feature = "derive_serde", serde(rename = "CIBO") )]
9748	CodeCIBO,
9749	#[cfg_attr( feature = "derive_serde", serde(rename = "CDOR") )]
9750	CodeCDOR,
9751	#[cfg_attr( feature = "derive_serde", serde(rename = "BUBO") )]
9752	CodeBUBO,
9753	#[cfg_attr( feature = "derive_serde", serde(rename = "BBSW") )]
9754	CodeBBSW,
9755}
9756
9757impl BenchmarkCurveName2Code {
9758	pub fn validate(&self) -> Result<(), ValidationError> {
9759		Ok(())
9760	}
9761}
9762
9763
9764// BenchmarkCurveName3Code ...
9765#[cfg_attr(feature = "derive_debug", derive(Debug))]
9766#[cfg_attr(feature = "derive_default", derive(Default))]
9767#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9768#[cfg_attr(feature = "derive_clone", derive(Clone))]
9769#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9770pub enum BenchmarkCurveName3Code {
9771	#[cfg_attr(feature = "derive_default", default)]
9772	#[cfg_attr( feature = "derive_serde", serde(rename = "ESTR") )]
9773	CodeESTR,
9774	#[cfg_attr( feature = "derive_serde", serde(rename = "BBSW") )]
9775	CodeBBSW,
9776	#[cfg_attr( feature = "derive_serde", serde(rename = "BUBO") )]
9777	CodeBUBO,
9778	#[cfg_attr( feature = "derive_serde", serde(rename = "CDOR") )]
9779	CodeCDOR,
9780	#[cfg_attr( feature = "derive_serde", serde(rename = "CIBO") )]
9781	CodeCIBO,
9782	#[cfg_attr( feature = "derive_serde", serde(rename = "EONA") )]
9783	CodeEONA,
9784	#[cfg_attr( feature = "derive_serde", serde(rename = "EONS") )]
9785	CodeEONS,
9786	#[cfg_attr( feature = "derive_serde", serde(rename = "EURI") )]
9787	CodeEURI,
9788	#[cfg_attr( feature = "derive_serde", serde(rename = "EUUS") )]
9789	CodeEUUS,
9790	#[cfg_attr( feature = "derive_serde", serde(rename = "EUCH") )]
9791	CodeEUCH,
9792	#[cfg_attr( feature = "derive_serde", serde(rename = "FUSW") )]
9793	CodeFUSW,
9794	#[cfg_attr( feature = "derive_serde", serde(rename = "GCFR") )]
9795	CodeGCFR,
9796	#[cfg_attr( feature = "derive_serde", serde(rename = "ISDA") )]
9797	CodeISDA,
9798	#[cfg_attr( feature = "derive_serde", serde(rename = "JIBA") )]
9799	CodeJIBA,
9800	#[cfg_attr( feature = "derive_serde", serde(rename = "LIBI") )]
9801	CodeLIBI,
9802	#[cfg_attr( feature = "derive_serde", serde(rename = "LIBO") )]
9803	CodeLIBO,
9804	#[cfg_attr( feature = "derive_serde", serde(rename = "MOSP") )]
9805	CodeMOSP,
9806	#[cfg_attr( feature = "derive_serde", serde(rename = "MAAA") )]
9807	CodeMAAA,
9808	#[cfg_attr( feature = "derive_serde", serde(rename = "NIBO") )]
9809	CodeNIBO,
9810	#[cfg_attr( feature = "derive_serde", serde(rename = "PFAN") )]
9811	CodePFAN,
9812	#[cfg_attr( feature = "derive_serde", serde(rename = "PRBO") )]
9813	CodePRBO,
9814	#[cfg_attr( feature = "derive_serde", serde(rename = "STBO") )]
9815	CodeSTBO,
9816	#[cfg_attr( feature = "derive_serde", serde(rename = "SWAP") )]
9817	CodeSWAP,
9818	#[cfg_attr( feature = "derive_serde", serde(rename = "TLBO") )]
9819	CodeTLBO,
9820	#[cfg_attr( feature = "derive_serde", serde(rename = "TIBO") )]
9821	CodeTIBO,
9822	#[cfg_attr( feature = "derive_serde", serde(rename = "TREA") )]
9823	CodeTREA,
9824	#[cfg_attr( feature = "derive_serde", serde(rename = "WIBO") )]
9825	CodeWIBO,
9826	#[cfg_attr( feature = "derive_serde", serde(rename = "SOFR") )]
9827	CodeSOFR,
9828	#[cfg_attr( feature = "derive_serde", serde(rename = "SONA") )]
9829	CodeSONA,
9830}
9831
9832impl BenchmarkCurveName3Code {
9833	pub fn validate(&self) -> Result<(), ValidationError> {
9834		Ok(())
9835	}
9836}
9837
9838
9839// BenchmarkCurveName4Choice ...
9840#[cfg_attr(feature = "derive_debug", derive(Debug))]
9841#[cfg_attr(feature = "derive_default", derive(Default))]
9842#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9843#[cfg_attr(feature = "derive_clone", derive(Clone))]
9844#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9845pub struct BenchmarkCurveName4Choice {
9846	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
9847	pub isin: Option<String>,
9848	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
9849	pub indx: Option<BenchmarkCurveName2Code>,
9850	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
9851	pub nm: Option<String>,
9852}
9853
9854impl BenchmarkCurveName4Choice {
9855	pub fn validate(&self) -> Result<(), ValidationError> {
9856		if let Some(ref val) = self.isin {
9857			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
9858			if !pattern.is_match(val) {
9859				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
9860			}
9861		}
9862		if let Some(ref val) = self.indx { val.validate()? }
9863		if let Some(ref val) = self.nm {
9864			if val.chars().count() < 1 {
9865				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
9866			}
9867			if val.chars().count() > 25 {
9868				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 25".to_string()));
9869			}
9870		}
9871		Ok(())
9872	}
9873}
9874
9875
9876// BenchmarkCurveName5Choice ...
9877#[cfg_attr(feature = "derive_debug", derive(Debug))]
9878#[cfg_attr(feature = "derive_default", derive(Default))]
9879#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9880#[cfg_attr(feature = "derive_clone", derive(Clone))]
9881#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9882pub struct BenchmarkCurveName5Choice {
9883	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
9884	pub indx: Option<BenchmarkCurveName2Code>,
9885	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
9886	pub nm: Option<String>,
9887}
9888
9889impl BenchmarkCurveName5Choice {
9890	pub fn validate(&self) -> Result<(), ValidationError> {
9891		if let Some(ref val) = self.indx { val.validate()? }
9892		if let Some(ref val) = self.nm {
9893			if val.chars().count() < 1 {
9894				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
9895			}
9896			if val.chars().count() > 25 {
9897				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 25".to_string()));
9898			}
9899		}
9900		Ok(())
9901	}
9902}
9903
9904
9905// BenchmarkCurveName6Choice ...
9906#[cfg_attr(feature = "derive_debug", derive(Debug))]
9907#[cfg_attr(feature = "derive_default", derive(Default))]
9908#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9909#[cfg_attr(feature = "derive_clone", derive(Clone))]
9910#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9911pub struct BenchmarkCurveName6Choice {
9912	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
9913	pub isin: Option<String>,
9914	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
9915	pub indx: Option<BenchmarkCurveName2Code>,
9916	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
9917	pub nm: Option<String>,
9918}
9919
9920impl BenchmarkCurveName6Choice {
9921	pub fn validate(&self) -> Result<(), ValidationError> {
9922		if let Some(ref val) = self.isin {
9923			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
9924			if !pattern.is_match(val) {
9925				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
9926			}
9927		}
9928		if let Some(ref val) = self.indx { val.validate()? }
9929		if let Some(ref val) = self.nm {
9930			if val.chars().count() < 1 {
9931				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
9932			}
9933			if val.chars().count() > 25 {
9934				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 25".to_string()));
9935			}
9936		}
9937		Ok(())
9938	}
9939}
9940
9941
9942// BenchmarkCurveName7Choice ...
9943#[cfg_attr(feature = "derive_debug", derive(Debug))]
9944#[cfg_attr(feature = "derive_default", derive(Default))]
9945#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9946#[cfg_attr(feature = "derive_clone", derive(Clone))]
9947#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9948pub struct BenchmarkCurveName7Choice {
9949	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
9950	pub cd: Option<BenchmarkCurveName1Code>,
9951	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
9952	pub prtry: Option<GenericIdentification30>,
9953}
9954
9955impl BenchmarkCurveName7Choice {
9956	pub fn validate(&self) -> Result<(), ValidationError> {
9957		if let Some(ref val) = self.cd { val.validate()? }
9958		if let Some(ref val) = self.prtry { val.validate()? }
9959		Ok(())
9960	}
9961}
9962
9963
9964// BenchmarkDetail1 ...
9965#[cfg_attr(feature = "derive_debug", derive(Debug))]
9966#[cfg_attr(feature = "derive_default", derive(Default))]
9967#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
9968#[cfg_attr(feature = "derive_clone", derive(Clone))]
9969#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
9970pub struct BenchmarkDetail1 {
9971	#[cfg_attr( feature = "derive_serde", serde(rename = "FullNm") )]
9972	pub full_nm: String,
9973	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
9974	pub indx: Option<BenchmarkCurveName2Code>,
9975	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmnt", skip_serializing_if = "Option::is_none") )]
9976	pub cmnt: Option<String>,
9977}
9978
9979impl BenchmarkDetail1 {
9980	pub fn validate(&self) -> Result<(), ValidationError> {
9981		if self.full_nm.chars().count() < 1 {
9982			return Err(ValidationError::new(1001, "full_nm is shorter than the minimum length of 1".to_string()));
9983		}
9984		if self.full_nm.chars().count() > 350 {
9985			return Err(ValidationError::new(1002, "full_nm exceeds the maximum length of 350".to_string()));
9986		}
9987		if let Some(ref val) = self.indx { val.validate()? }
9988		if let Some(ref val) = self.cmnt {
9989			if val.chars().count() < 1 {
9990				return Err(ValidationError::new(1001, "cmnt is shorter than the minimum length of 1".to_string()));
9991			}
9992			if val.chars().count() > 20000 {
9993				return Err(ValidationError::new(1002, "cmnt exceeds the maximum length of 20000".to_string()));
9994			}
9995		}
9996		Ok(())
9997	}
9998}
9999
10000
10001// BenchmarkReport1Choice ...
10002#[cfg_attr(feature = "derive_debug", derive(Debug))]
10003#[cfg_attr(feature = "derive_default", derive(Default))]
10004#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10005#[cfg_attr(feature = "derive_clone", derive(Clone))]
10006#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10007pub struct BenchmarkReport1Choice {
10008	#[cfg_attr( feature = "derive_serde", serde(rename = "Cret", skip_serializing_if = "Option::is_none") )]
10009	pub cret: Option<BenchmarkCreate1>,
10010	#[cfg_attr( feature = "derive_serde", serde(rename = "Upd", skip_serializing_if = "Option::is_none") )]
10011	pub upd: Option<BenchmarkUpdate1>,
10012	#[cfg_attr( feature = "derive_serde", serde(rename = "Cxl", skip_serializing_if = "Option::is_none") )]
10013	pub cxl: Option<BenchmarkCancellation1>,
10014}
10015
10016impl BenchmarkReport1Choice {
10017	pub fn validate(&self) -> Result<(), ValidationError> {
10018		if let Some(ref val) = self.cret { val.validate()? }
10019		if let Some(ref val) = self.upd { val.validate()? }
10020		if let Some(ref val) = self.cxl { val.validate()? }
10021		Ok(())
10022	}
10023}
10024
10025
10026// BenchmarkUpdate1 ...
10027#[cfg_attr(feature = "derive_debug", derive(Debug))]
10028#[cfg_attr(feature = "derive_default", derive(Default))]
10029#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10030#[cfg_attr(feature = "derive_clone", derive(Clone))]
10031#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10032pub struct BenchmarkUpdate1 {
10033	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
10034	pub tech_rcrd_id: Option<String>,
10035	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
10036	pub id: SecurityIdentification19,
10037	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsId", skip_serializing_if = "Option::is_none") )]
10038	pub prvs_id: Option<SecurityIdentification19>,
10039	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr") )]
10040	pub othr: BenchmarkDetail1,
10041	#[cfg_attr( feature = "derive_serde", serde(rename = "Admstr") )]
10042	pub admstr: PartyIdentification136,
10043	#[cfg_attr( feature = "derive_serde", serde(rename = "NdrsngPty", skip_serializing_if = "Option::is_none") )]
10044	pub ndrsng_pty: Option<PartyIdentification136>,
10045	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
10046	pub sts: Option<StatusDetail1>,
10047	#[cfg_attr( feature = "derive_serde", serde(rename = "TechVldtyPrd", skip_serializing_if = "Option::is_none") )]
10048	pub tech_vldty_prd: Option<Period4Choice>,
10049	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
10050	pub splmtry_data: Option<Vec<SupplementaryData1>>,
10051}
10052
10053impl BenchmarkUpdate1 {
10054	pub fn validate(&self) -> Result<(), ValidationError> {
10055		if let Some(ref val) = self.tech_rcrd_id {
10056			if val.chars().count() < 1 {
10057				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
10058			}
10059			if val.chars().count() > 35 {
10060				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
10061			}
10062		}
10063		self.id.validate()?;
10064		if let Some(ref val) = self.prvs_id { val.validate()? }
10065		self.othr.validate()?;
10066		self.admstr.validate()?;
10067		if let Some(ref val) = self.ndrsng_pty { val.validate()? }
10068		if let Some(ref val) = self.sts { val.validate()? }
10069		if let Some(ref val) = self.tech_vldty_prd { val.validate()? }
10070		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
10071		Ok(())
10072	}
10073}
10074
10075
10076// BilateralLimit4 ...
10077#[cfg_attr(feature = "derive_debug", derive(Debug))]
10078#[cfg_attr(feature = "derive_default", derive(Default))]
10079#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10080#[cfg_attr(feature = "derive_clone", derive(Clone))]
10081#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10082pub struct BilateralLimit4 {
10083	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId") )]
10084	pub ctr_pty_id: BranchAndFinancialInstitutionIdentification8,
10085	#[cfg_attr( feature = "derive_serde", serde(rename = "LmtAmt") )]
10086	pub lmt_amt: Amount2Choice,
10087	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
10088	pub cdt_dbt_ind: CreditDebitCode,
10089	#[cfg_attr( feature = "derive_serde", serde(rename = "BilBal", skip_serializing_if = "Option::is_none") )]
10090	pub bil_bal: Option<Vec<CashBalance11>>,
10091}
10092
10093impl BilateralLimit4 {
10094	pub fn validate(&self) -> Result<(), ValidationError> {
10095		self.ctr_pty_id.validate()?;
10096		self.lmt_amt.validate()?;
10097		self.cdt_dbt_ind.validate()?;
10098		if let Some(ref vec) = self.bil_bal { for item in vec { item.validate()? } }
10099		Ok(())
10100	}
10101}
10102
10103
10104// BillingBalance1 ...
10105#[cfg_attr(feature = "derive_debug", derive(Debug))]
10106#[cfg_attr(feature = "derive_default", derive(Default))]
10107#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10108#[cfg_attr(feature = "derive_clone", derive(Clone))]
10109#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10110pub struct BillingBalance1 {
10111	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
10112	pub tp: BillingBalanceType1Choice,
10113	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
10114	pub val: AmountAndDirection34,
10115	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyTp", skip_serializing_if = "Option::is_none") )]
10116	pub ccy_tp: Option<BillingCurrencyType1Code>,
10117}
10118
10119impl BillingBalance1 {
10120	pub fn validate(&self) -> Result<(), ValidationError> {
10121		self.tp.validate()?;
10122		self.val.validate()?;
10123		if let Some(ref val) = self.ccy_tp { val.validate()? }
10124		Ok(())
10125	}
10126}
10127
10128
10129// BillingBalanceType1Choice ...
10130#[cfg_attr(feature = "derive_debug", derive(Debug))]
10131#[cfg_attr(feature = "derive_default", derive(Default))]
10132#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10133#[cfg_attr(feature = "derive_clone", derive(Clone))]
10134#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10135pub struct BillingBalanceType1Choice {
10136	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
10137	pub cd: Option<String>,
10138	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
10139	pub prtry: Option<String>,
10140}
10141
10142impl BillingBalanceType1Choice {
10143	pub fn validate(&self) -> Result<(), ValidationError> {
10144		if let Some(ref val) = self.cd {
10145			if val.chars().count() < 1 {
10146				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
10147			}
10148			if val.chars().count() > 4 {
10149				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
10150			}
10151		}
10152		if let Some(ref val) = self.prtry {
10153			if val.chars().count() < 1 {
10154				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
10155			}
10156			if val.chars().count() > 35 {
10157				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
10158			}
10159		}
10160		Ok(())
10161	}
10162}
10163
10164
10165// BillingChargeMethod1Code ...
10166#[cfg_attr(feature = "derive_debug", derive(Debug))]
10167#[cfg_attr(feature = "derive_default", derive(Default))]
10168#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10169#[cfg_attr(feature = "derive_clone", derive(Clone))]
10170#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10171pub enum BillingChargeMethod1Code {
10172	#[cfg_attr(feature = "derive_default", default)]
10173	#[cfg_attr( feature = "derive_serde", serde(rename = "UPRC") )]
10174	CodeUPRC,
10175	#[cfg_attr( feature = "derive_serde", serde(rename = "STAM") )]
10176	CodeSTAM,
10177	#[cfg_attr( feature = "derive_serde", serde(rename = "BCHG") )]
10178	CodeBCHG,
10179	#[cfg_attr( feature = "derive_serde", serde(rename = "DPRC") )]
10180	CodeDPRC,
10181	#[cfg_attr( feature = "derive_serde", serde(rename = "FCHG") )]
10182	CodeFCHG,
10183	#[cfg_attr( feature = "derive_serde", serde(rename = "LPRC") )]
10184	CodeLPRC,
10185	#[cfg_attr( feature = "derive_serde", serde(rename = "MCHG") )]
10186	CodeMCHG,
10187	#[cfg_attr( feature = "derive_serde", serde(rename = "MXRD") )]
10188	CodeMXRD,
10189	#[cfg_attr( feature = "derive_serde", serde(rename = "TIR1") )]
10190	CodeTIR1,
10191	#[cfg_attr( feature = "derive_serde", serde(rename = "TIR2") )]
10192	CodeTIR2,
10193	#[cfg_attr( feature = "derive_serde", serde(rename = "TIR3") )]
10194	CodeTIR3,
10195	#[cfg_attr( feature = "derive_serde", serde(rename = "TIR4") )]
10196	CodeTIR4,
10197	#[cfg_attr( feature = "derive_serde", serde(rename = "TIR5") )]
10198	CodeTIR5,
10199	#[cfg_attr( feature = "derive_serde", serde(rename = "TIR6") )]
10200	CodeTIR6,
10201	#[cfg_attr( feature = "derive_serde", serde(rename = "TIR7") )]
10202	CodeTIR7,
10203	#[cfg_attr( feature = "derive_serde", serde(rename = "TIR8") )]
10204	CodeTIR8,
10205	#[cfg_attr( feature = "derive_serde", serde(rename = "TIR9") )]
10206	CodeTIR9,
10207	#[cfg_attr( feature = "derive_serde", serde(rename = "TPRC") )]
10208	CodeTPRC,
10209	#[cfg_attr( feature = "derive_serde", serde(rename = "ZPRC") )]
10210	CodeZPRC,
10211	#[cfg_attr( feature = "derive_serde", serde(rename = "BBSE") )]
10212	CodeBBSE,
10213}
10214
10215impl BillingChargeMethod1Code {
10216	pub fn validate(&self) -> Result<(), ValidationError> {
10217		Ok(())
10218	}
10219}
10220
10221
10222// BillingCompensation1 ...
10223#[cfg_attr(feature = "derive_debug", derive(Debug))]
10224#[cfg_attr(feature = "derive_default", derive(Default))]
10225#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10226#[cfg_attr(feature = "derive_clone", derive(Clone))]
10227#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10228pub struct BillingCompensation1 {
10229	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
10230	pub tp: BillingCompensationType1Choice,
10231	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
10232	pub val: AmountAndDirection34,
10233	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyTp", skip_serializing_if = "Option::is_none") )]
10234	pub ccy_tp: Option<BillingCurrencyType2Code>,
10235}
10236
10237impl BillingCompensation1 {
10238	pub fn validate(&self) -> Result<(), ValidationError> {
10239		self.tp.validate()?;
10240		self.val.validate()?;
10241		if let Some(ref val) = self.ccy_tp { val.validate()? }
10242		Ok(())
10243	}
10244}
10245
10246
10247// BillingCompensationType1Choice ...
10248#[cfg_attr(feature = "derive_debug", derive(Debug))]
10249#[cfg_attr(feature = "derive_default", derive(Default))]
10250#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10251#[cfg_attr(feature = "derive_clone", derive(Clone))]
10252#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10253pub struct BillingCompensationType1Choice {
10254	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
10255	pub cd: Option<String>,
10256	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
10257	pub prtry: Option<String>,
10258}
10259
10260impl BillingCompensationType1Choice {
10261	pub fn validate(&self) -> Result<(), ValidationError> {
10262		if let Some(ref val) = self.cd {
10263			if val.chars().count() < 1 {
10264				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
10265			}
10266			if val.chars().count() > 4 {
10267				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
10268			}
10269		}
10270		if let Some(ref val) = self.prtry {
10271			if val.chars().count() < 1 {
10272				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
10273			}
10274			if val.chars().count() > 35 {
10275				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
10276			}
10277		}
10278		Ok(())
10279	}
10280}
10281
10282
10283// BillingCurrencyType1Code ...
10284#[cfg_attr(feature = "derive_debug", derive(Debug))]
10285#[cfg_attr(feature = "derive_default", derive(Default))]
10286#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10287#[cfg_attr(feature = "derive_clone", derive(Clone))]
10288#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10289pub enum BillingCurrencyType1Code {
10290	#[cfg_attr(feature = "derive_default", default)]
10291	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCT") )]
10292	CodeACCT,
10293	#[cfg_attr( feature = "derive_serde", serde(rename = "STLM") )]
10294	CodeSTLM,
10295	#[cfg_attr( feature = "derive_serde", serde(rename = "PRCG") )]
10296	CodePRCG,
10297}
10298
10299impl BillingCurrencyType1Code {
10300	pub fn validate(&self) -> Result<(), ValidationError> {
10301		Ok(())
10302	}
10303}
10304
10305
10306// BillingCurrencyType2Code ...
10307#[cfg_attr(feature = "derive_debug", derive(Debug))]
10308#[cfg_attr(feature = "derive_default", derive(Default))]
10309#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10310#[cfg_attr(feature = "derive_clone", derive(Clone))]
10311#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10312pub enum BillingCurrencyType2Code {
10313	#[cfg_attr(feature = "derive_default", default)]
10314	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCT") )]
10315	CodeACCT,
10316	#[cfg_attr( feature = "derive_serde", serde(rename = "STLM") )]
10317	CodeSTLM,
10318	#[cfg_attr( feature = "derive_serde", serde(rename = "PRCG") )]
10319	CodePRCG,
10320	#[cfg_attr( feature = "derive_serde", serde(rename = "HOST") )]
10321	CodeHOST,
10322}
10323
10324impl BillingCurrencyType2Code {
10325	pub fn validate(&self) -> Result<(), ValidationError> {
10326		Ok(())
10327	}
10328}
10329
10330
10331// BillingMethod1 ...
10332#[cfg_attr(feature = "derive_debug", derive(Debug))]
10333#[cfg_attr(feature = "derive_default", derive(Default))]
10334#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10335#[cfg_attr(feature = "derive_clone", derive(Clone))]
10336#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10337pub struct BillingMethod1 {
10338	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcChrgHstAmt") )]
10339	pub svc_chrg_hst_amt: AmountAndDirection34,
10340	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcTax") )]
10341	pub svc_tax: BillingServicesAmount1,
10342	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlChrg") )]
10343	pub ttl_chrg: BillingServicesAmount2,
10344	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxId") )]
10345	pub tax_id: Vec<BillingServicesTax1>,
10346}
10347
10348impl BillingMethod1 {
10349	pub fn validate(&self) -> Result<(), ValidationError> {
10350		self.svc_chrg_hst_amt.validate()?;
10351		self.svc_tax.validate()?;
10352		self.ttl_chrg.validate()?;
10353		for item in &self.tax_id { item.validate()? }
10354		Ok(())
10355	}
10356}
10357
10358
10359// BillingMethod1Choice ...
10360#[cfg_attr(feature = "derive_debug", derive(Debug))]
10361#[cfg_attr(feature = "derive_default", derive(Default))]
10362#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10363#[cfg_attr(feature = "derive_clone", derive(Clone))]
10364#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10365pub struct BillingMethod1Choice {
10366	#[cfg_attr( feature = "derive_serde", serde(rename = "MtdA", skip_serializing_if = "Option::is_none") )]
10367	pub mtd_a: Option<BillingMethod1>,
10368	#[cfg_attr( feature = "derive_serde", serde(rename = "MtdB", skip_serializing_if = "Option::is_none") )]
10369	pub mtd_b: Option<BillingMethod2>,
10370	#[cfg_attr( feature = "derive_serde", serde(rename = "MtdD", skip_serializing_if = "Option::is_none") )]
10371	pub mtd_d: Option<BillingMethod3>,
10372}
10373
10374impl BillingMethod1Choice {
10375	pub fn validate(&self) -> Result<(), ValidationError> {
10376		if let Some(ref val) = self.mtd_a { val.validate()? }
10377		if let Some(ref val) = self.mtd_b { val.validate()? }
10378		if let Some(ref val) = self.mtd_d { val.validate()? }
10379		Ok(())
10380	}
10381}
10382
10383
10384// BillingMethod2 ...
10385#[cfg_attr(feature = "derive_debug", derive(Debug))]
10386#[cfg_attr(feature = "derive_default", derive(Default))]
10387#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10388#[cfg_attr(feature = "derive_clone", derive(Clone))]
10389#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10390pub struct BillingMethod2 {
10391	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcChrgHstAmt") )]
10392	pub svc_chrg_hst_amt: AmountAndDirection34,
10393	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcTax") )]
10394	pub svc_tax: BillingServicesAmount1,
10395	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxId") )]
10396	pub tax_id: Vec<BillingServicesTax1>,
10397}
10398
10399impl BillingMethod2 {
10400	pub fn validate(&self) -> Result<(), ValidationError> {
10401		self.svc_chrg_hst_amt.validate()?;
10402		self.svc_tax.validate()?;
10403		for item in &self.tax_id { item.validate()? }
10404		Ok(())
10405	}
10406}
10407
10408
10409// BillingMethod3 ...
10410#[cfg_attr(feature = "derive_debug", derive(Debug))]
10411#[cfg_attr(feature = "derive_default", derive(Default))]
10412#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10413#[cfg_attr(feature = "derive_clone", derive(Clone))]
10414#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10415pub struct BillingMethod3 {
10416	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcTaxPricAmt") )]
10417	pub svc_tax_pric_amt: AmountAndDirection34,
10418	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxId") )]
10419	pub tax_id: Vec<BillingServicesTax2>,
10420}
10421
10422impl BillingMethod3 {
10423	pub fn validate(&self) -> Result<(), ValidationError> {
10424		self.svc_tax_pric_amt.validate()?;
10425		for item in &self.tax_id { item.validate()? }
10426		Ok(())
10427	}
10428}
10429
10430
10431// BillingMethod4 ...
10432#[cfg_attr(feature = "derive_debug", derive(Debug))]
10433#[cfg_attr(feature = "derive_default", derive(Default))]
10434#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10435#[cfg_attr(feature = "derive_clone", derive(Clone))]
10436#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10437pub struct BillingMethod4 {
10438	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcDtl") )]
10439	pub svc_dtl: Vec<BillingServiceParameters2>,
10440	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxClctn") )]
10441	pub tax_clctn: TaxCalculation1,
10442}
10443
10444impl BillingMethod4 {
10445	pub fn validate(&self) -> Result<(), ValidationError> {
10446		for item in &self.svc_dtl { item.validate()? }
10447		self.tax_clctn.validate()?;
10448		Ok(())
10449	}
10450}
10451
10452
10453// BillingPrice1 ...
10454#[cfg_attr(feature = "derive_debug", derive(Debug))]
10455#[cfg_attr(feature = "derive_default", derive(Default))]
10456#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10457#[cfg_attr(feature = "derive_clone", derive(Clone))]
10458#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10459pub struct BillingPrice1 {
10460	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
10461	pub ccy: Option<String>,
10462	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitPric", skip_serializing_if = "Option::is_none") )]
10463	pub unit_pric: Option<AmountAndDirection34>,
10464	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtd", skip_serializing_if = "Option::is_none") )]
10465	pub mtd: Option<BillingChargeMethod1Code>,
10466	#[cfg_attr( feature = "derive_serde", serde(rename = "Rule", skip_serializing_if = "Option::is_none") )]
10467	pub rule: Option<String>,
10468}
10469
10470impl BillingPrice1 {
10471	pub fn validate(&self) -> Result<(), ValidationError> {
10472		if let Some(ref val) = self.ccy {
10473			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
10474			if !pattern.is_match(val) {
10475				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
10476			}
10477		}
10478		if let Some(ref val) = self.unit_pric { val.validate()? }
10479		if let Some(ref val) = self.mtd { val.validate()? }
10480		if let Some(ref val) = self.rule {
10481			if val.chars().count() < 1 {
10482				return Err(ValidationError::new(1001, "rule is shorter than the minimum length of 1".to_string()));
10483			}
10484			if val.chars().count() > 20 {
10485				return Err(ValidationError::new(1002, "rule exceeds the maximum length of 20".to_string()));
10486			}
10487		}
10488		Ok(())
10489	}
10490}
10491
10492
10493// BillingRate1 ...
10494#[cfg_attr(feature = "derive_debug", derive(Debug))]
10495#[cfg_attr(feature = "derive_default", derive(Default))]
10496#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10497#[cfg_attr(feature = "derive_clone", derive(Clone))]
10498#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10499pub struct BillingRate1 {
10500	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
10501	pub id: BillingRateIdentification1Choice,
10502	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
10503	pub val: f64,
10504	#[cfg_attr( feature = "derive_serde", serde(rename = "DaysInPrd", skip_serializing_if = "Option::is_none") )]
10505	pub days_in_prd: Option<f64>,
10506	#[cfg_attr( feature = "derive_serde", serde(rename = "DaysInYr", skip_serializing_if = "Option::is_none") )]
10507	pub days_in_yr: Option<f64>,
10508}
10509
10510impl BillingRate1 {
10511	pub fn validate(&self) -> Result<(), ValidationError> {
10512		self.id.validate()?;
10513		Ok(())
10514	}
10515}
10516
10517
10518// BillingRateIdentification1Choice ...
10519#[cfg_attr(feature = "derive_debug", derive(Debug))]
10520#[cfg_attr(feature = "derive_default", derive(Default))]
10521#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10522#[cfg_attr(feature = "derive_clone", derive(Clone))]
10523#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10524pub struct BillingRateIdentification1Choice {
10525	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
10526	pub cd: Option<String>,
10527	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
10528	pub prtry: Option<String>,
10529}
10530
10531impl BillingRateIdentification1Choice {
10532	pub fn validate(&self) -> Result<(), ValidationError> {
10533		if let Some(ref val) = self.cd {
10534			if val.chars().count() < 1 {
10535				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
10536			}
10537			if val.chars().count() > 4 {
10538				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
10539			}
10540		}
10541		if let Some(ref val) = self.prtry {
10542			if val.chars().count() < 1 {
10543				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
10544			}
10545			if val.chars().count() > 35 {
10546				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
10547			}
10548		}
10549		Ok(())
10550	}
10551}
10552
10553
10554// BillingService2 ...
10555#[cfg_attr(feature = "derive_debug", derive(Debug))]
10556#[cfg_attr(feature = "derive_default", derive(Default))]
10557#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10558#[cfg_attr(feature = "derive_clone", derive(Clone))]
10559#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10560pub struct BillingService2 {
10561	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcDtl") )]
10562	pub svc_dtl: BillingServiceParameters3,
10563	#[cfg_attr( feature = "derive_serde", serde(rename = "Pric", skip_serializing_if = "Option::is_none") )]
10564	pub pric: Option<BillingPrice1>,
10565	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMtd") )]
10566	pub pmt_mtd: ServicePaymentMethod1Code,
10567	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlChrgPric") )]
10568	pub orgnl_chrg_pric: AmountAndDirection34,
10569	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlChrgSttlmAmt", skip_serializing_if = "Option::is_none") )]
10570	pub orgnl_chrg_sttlm_amt: Option<AmountAndDirection34>,
10571	#[cfg_attr( feature = "derive_serde", serde(rename = "BalReqrdAcctAmt", skip_serializing_if = "Option::is_none") )]
10572	pub bal_reqrd_acct_amt: Option<AmountAndDirection34>,
10573	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxDsgnt") )]
10574	pub tax_dsgnt: ServiceTaxDesignation1,
10575	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxClctn", skip_serializing_if = "Option::is_none") )]
10576	pub tax_clctn: Option<BillingMethod1Choice>,
10577}
10578
10579impl BillingService2 {
10580	pub fn validate(&self) -> Result<(), ValidationError> {
10581		self.svc_dtl.validate()?;
10582		if let Some(ref val) = self.pric { val.validate()? }
10583		self.pmt_mtd.validate()?;
10584		self.orgnl_chrg_pric.validate()?;
10585		if let Some(ref val) = self.orgnl_chrg_sttlm_amt { val.validate()? }
10586		if let Some(ref val) = self.bal_reqrd_acct_amt { val.validate()? }
10587		self.tax_dsgnt.validate()?;
10588		if let Some(ref val) = self.tax_clctn { val.validate()? }
10589		Ok(())
10590	}
10591}
10592
10593
10594// BillingServiceAdjustment1 ...
10595#[cfg_attr(feature = "derive_debug", derive(Debug))]
10596#[cfg_attr(feature = "derive_default", derive(Default))]
10597#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10598#[cfg_attr(feature = "derive_clone", derive(Clone))]
10599#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10600pub struct BillingServiceAdjustment1 {
10601	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
10602	pub tp: ServiceAdjustmentType1Code,
10603	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc") )]
10604	pub desc: String,
10605	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
10606	pub amt: AmountAndDirection34,
10607	#[cfg_attr( feature = "derive_serde", serde(rename = "BalReqrdAmt", skip_serializing_if = "Option::is_none") )]
10608	pub bal_reqrd_amt: Option<AmountAndDirection34>,
10609	#[cfg_attr( feature = "derive_serde", serde(rename = "ErrDt", skip_serializing_if = "Option::is_none") )]
10610	pub err_dt: Option<String>,
10611	#[cfg_attr( feature = "derive_serde", serde(rename = "AdjstmntId", skip_serializing_if = "Option::is_none") )]
10612	pub adjstmnt_id: Option<String>,
10613	#[cfg_attr( feature = "derive_serde", serde(rename = "SubSvc", skip_serializing_if = "Option::is_none") )]
10614	pub sub_svc: Option<BillingSubServiceIdentification1>,
10615	#[cfg_attr( feature = "derive_serde", serde(rename = "PricChng", skip_serializing_if = "Option::is_none") )]
10616	pub pric_chng: Option<AmountAndDirection34>,
10617	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPric", skip_serializing_if = "Option::is_none") )]
10618	pub orgnl_pric: Option<AmountAndDirection34>,
10619	#[cfg_attr( feature = "derive_serde", serde(rename = "NewPric", skip_serializing_if = "Option::is_none") )]
10620	pub new_pric: Option<AmountAndDirection34>,
10621	#[cfg_attr( feature = "derive_serde", serde(rename = "VolChng", skip_serializing_if = "Option::is_none") )]
10622	pub vol_chng: Option<f64>,
10623	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlVol", skip_serializing_if = "Option::is_none") )]
10624	pub orgnl_vol: Option<f64>,
10625	#[cfg_attr( feature = "derive_serde", serde(rename = "NewVol", skip_serializing_if = "Option::is_none") )]
10626	pub new_vol: Option<f64>,
10627	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlChrgAmt", skip_serializing_if = "Option::is_none") )]
10628	pub orgnl_chrg_amt: Option<AmountAndDirection34>,
10629	#[cfg_attr( feature = "derive_serde", serde(rename = "NewChrgAmt", skip_serializing_if = "Option::is_none") )]
10630	pub new_chrg_amt: Option<AmountAndDirection34>,
10631}
10632
10633impl BillingServiceAdjustment1 {
10634	pub fn validate(&self) -> Result<(), ValidationError> {
10635		self.tp.validate()?;
10636		if self.desc.chars().count() < 1 {
10637			return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
10638		}
10639		if self.desc.chars().count() > 140 {
10640			return Err(ValidationError::new(1002, "desc exceeds the maximum length of 140".to_string()));
10641		}
10642		self.amt.validate()?;
10643		if let Some(ref val) = self.bal_reqrd_amt { val.validate()? }
10644		if let Some(ref val) = self.adjstmnt_id {
10645			if val.chars().count() < 1 {
10646				return Err(ValidationError::new(1001, "adjstmnt_id is shorter than the minimum length of 1".to_string()));
10647			}
10648			if val.chars().count() > 35 {
10649				return Err(ValidationError::new(1002, "adjstmnt_id exceeds the maximum length of 35".to_string()));
10650			}
10651		}
10652		if let Some(ref val) = self.sub_svc { val.validate()? }
10653		if let Some(ref val) = self.pric_chng { val.validate()? }
10654		if let Some(ref val) = self.orgnl_pric { val.validate()? }
10655		if let Some(ref val) = self.new_pric { val.validate()? }
10656		if let Some(ref val) = self.orgnl_chrg_amt { val.validate()? }
10657		if let Some(ref val) = self.new_chrg_amt { val.validate()? }
10658		Ok(())
10659	}
10660}
10661
10662
10663// BillingServiceCommonIdentification1 ...
10664#[cfg_attr(feature = "derive_debug", derive(Debug))]
10665#[cfg_attr(feature = "derive_default", derive(Default))]
10666#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10667#[cfg_attr(feature = "derive_clone", derive(Clone))]
10668#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10669pub struct BillingServiceCommonIdentification1 {
10670	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr") )]
10671	pub issr: String,
10672	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
10673	pub id: String,
10674}
10675
10676impl BillingServiceCommonIdentification1 {
10677	pub fn validate(&self) -> Result<(), ValidationError> {
10678		if self.issr.chars().count() < 1 {
10679			return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
10680		}
10681		if self.issr.chars().count() > 6 {
10682			return Err(ValidationError::new(1002, "issr exceeds the maximum length of 6".to_string()));
10683		}
10684		if self.id.chars().count() < 1 {
10685			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
10686		}
10687		if self.id.chars().count() > 8 {
10688			return Err(ValidationError::new(1002, "id exceeds the maximum length of 8".to_string()));
10689		}
10690		Ok(())
10691	}
10692}
10693
10694
10695// BillingServiceIdentification2 ...
10696#[cfg_attr(feature = "derive_debug", derive(Debug))]
10697#[cfg_attr(feature = "derive_default", derive(Default))]
10698#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10699#[cfg_attr(feature = "derive_clone", derive(Clone))]
10700#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10701pub struct BillingServiceIdentification2 {
10702	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
10703	pub id: String,
10704	#[cfg_attr( feature = "derive_serde", serde(rename = "SubSvc", skip_serializing_if = "Option::is_none") )]
10705	pub sub_svc: Option<BillingSubServiceIdentification1>,
10706	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc") )]
10707	pub desc: String,
10708}
10709
10710impl BillingServiceIdentification2 {
10711	pub fn validate(&self) -> Result<(), ValidationError> {
10712		if self.id.chars().count() < 1 {
10713			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
10714		}
10715		if self.id.chars().count() > 35 {
10716			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
10717		}
10718		if let Some(ref val) = self.sub_svc { val.validate()? }
10719		if self.desc.chars().count() < 1 {
10720			return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
10721		}
10722		if self.desc.chars().count() > 70 {
10723			return Err(ValidationError::new(1002, "desc exceeds the maximum length of 70".to_string()));
10724		}
10725		Ok(())
10726	}
10727}
10728
10729
10730// BillingServiceIdentification3 ...
10731#[cfg_attr(feature = "derive_debug", derive(Debug))]
10732#[cfg_attr(feature = "derive_default", derive(Default))]
10733#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10734#[cfg_attr(feature = "derive_clone", derive(Clone))]
10735#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10736pub struct BillingServiceIdentification3 {
10737	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
10738	pub id: String,
10739	#[cfg_attr( feature = "derive_serde", serde(rename = "SubSvc", skip_serializing_if = "Option::is_none") )]
10740	pub sub_svc: Option<BillingSubServiceIdentification1>,
10741	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc") )]
10742	pub desc: String,
10743	#[cfg_attr( feature = "derive_serde", serde(rename = "CmonCd", skip_serializing_if = "Option::is_none") )]
10744	pub cmon_cd: Option<BillingServiceCommonIdentification1>,
10745	#[cfg_attr( feature = "derive_serde", serde(rename = "BkTxCd", skip_serializing_if = "Option::is_none") )]
10746	pub bk_tx_cd: Option<BankTransactionCodeStructure4>,
10747	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcTp", skip_serializing_if = "Option::is_none") )]
10748	pub svc_tp: Option<String>,
10749}
10750
10751impl BillingServiceIdentification3 {
10752	pub fn validate(&self) -> Result<(), ValidationError> {
10753		if self.id.chars().count() < 1 {
10754			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
10755		}
10756		if self.id.chars().count() > 35 {
10757			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
10758		}
10759		if let Some(ref val) = self.sub_svc { val.validate()? }
10760		if self.desc.chars().count() < 1 {
10761			return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
10762		}
10763		if self.desc.chars().count() > 70 {
10764			return Err(ValidationError::new(1002, "desc exceeds the maximum length of 70".to_string()));
10765		}
10766		if let Some(ref val) = self.cmon_cd { val.validate()? }
10767		if let Some(ref val) = self.bk_tx_cd { val.validate()? }
10768		if let Some(ref val) = self.svc_tp {
10769			if val.chars().count() < 1 {
10770				return Err(ValidationError::new(1001, "svc_tp is shorter than the minimum length of 1".to_string()));
10771			}
10772			if val.chars().count() > 12 {
10773				return Err(ValidationError::new(1002, "svc_tp exceeds the maximum length of 12".to_string()));
10774			}
10775		}
10776		Ok(())
10777	}
10778}
10779
10780
10781// BillingServiceParameters2 ...
10782#[cfg_attr(feature = "derive_debug", derive(Debug))]
10783#[cfg_attr(feature = "derive_default", derive(Default))]
10784#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10785#[cfg_attr(feature = "derive_clone", derive(Clone))]
10786#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10787pub struct BillingServiceParameters2 {
10788	#[cfg_attr( feature = "derive_serde", serde(rename = "BkSvc") )]
10789	pub bk_svc: BillingServiceIdentification2,
10790	#[cfg_attr( feature = "derive_serde", serde(rename = "Vol", skip_serializing_if = "Option::is_none") )]
10791	pub vol: Option<f64>,
10792	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitPric", skip_serializing_if = "Option::is_none") )]
10793	pub unit_pric: Option<AmountAndDirection34>,
10794	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcChrgAmt") )]
10795	pub svc_chrg_amt: AmountAndDirection34,
10796}
10797
10798impl BillingServiceParameters2 {
10799	pub fn validate(&self) -> Result<(), ValidationError> {
10800		self.bk_svc.validate()?;
10801		if let Some(ref val) = self.unit_pric { val.validate()? }
10802		self.svc_chrg_amt.validate()?;
10803		Ok(())
10804	}
10805}
10806
10807
10808// BillingServiceParameters3 ...
10809#[cfg_attr(feature = "derive_debug", derive(Debug))]
10810#[cfg_attr(feature = "derive_default", derive(Default))]
10811#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10812#[cfg_attr(feature = "derive_clone", derive(Clone))]
10813#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10814pub struct BillingServiceParameters3 {
10815	#[cfg_attr( feature = "derive_serde", serde(rename = "BkSvc") )]
10816	pub bk_svc: BillingServiceIdentification3,
10817	#[cfg_attr( feature = "derive_serde", serde(rename = "Vol", skip_serializing_if = "Option::is_none") )]
10818	pub vol: Option<f64>,
10819}
10820
10821impl BillingServiceParameters3 {
10822	pub fn validate(&self) -> Result<(), ValidationError> {
10823		self.bk_svc.validate()?;
10824		Ok(())
10825	}
10826}
10827
10828
10829// BillingServicesAmount1 ...
10830#[cfg_attr(feature = "derive_debug", derive(Debug))]
10831#[cfg_attr(feature = "derive_default", derive(Default))]
10832#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10833#[cfg_attr(feature = "derive_clone", derive(Clone))]
10834#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10835pub struct BillingServicesAmount1 {
10836	#[cfg_attr( feature = "derive_serde", serde(rename = "HstAmt") )]
10837	pub hst_amt: AmountAndDirection34,
10838	#[cfg_attr( feature = "derive_serde", serde(rename = "PricgAmt", skip_serializing_if = "Option::is_none") )]
10839	pub pricg_amt: Option<AmountAndDirection34>,
10840}
10841
10842impl BillingServicesAmount1 {
10843	pub fn validate(&self) -> Result<(), ValidationError> {
10844		self.hst_amt.validate()?;
10845		if let Some(ref val) = self.pricg_amt { val.validate()? }
10846		Ok(())
10847	}
10848}
10849
10850
10851// BillingServicesAmount2 ...
10852#[cfg_attr(feature = "derive_debug", derive(Debug))]
10853#[cfg_attr(feature = "derive_default", derive(Default))]
10854#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10855#[cfg_attr(feature = "derive_clone", derive(Clone))]
10856#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10857pub struct BillingServicesAmount2 {
10858	#[cfg_attr( feature = "derive_serde", serde(rename = "HstAmt") )]
10859	pub hst_amt: AmountAndDirection34,
10860	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmAmt", skip_serializing_if = "Option::is_none") )]
10861	pub sttlm_amt: Option<AmountAndDirection34>,
10862	#[cfg_attr( feature = "derive_serde", serde(rename = "PricgAmt", skip_serializing_if = "Option::is_none") )]
10863	pub pricg_amt: Option<AmountAndDirection34>,
10864}
10865
10866impl BillingServicesAmount2 {
10867	pub fn validate(&self) -> Result<(), ValidationError> {
10868		self.hst_amt.validate()?;
10869		if let Some(ref val) = self.sttlm_amt { val.validate()? }
10870		if let Some(ref val) = self.pricg_amt { val.validate()? }
10871		Ok(())
10872	}
10873}
10874
10875
10876// BillingServicesAmount3 ...
10877#[cfg_attr(feature = "derive_debug", derive(Debug))]
10878#[cfg_attr(feature = "derive_default", derive(Default))]
10879#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10880#[cfg_attr(feature = "derive_clone", derive(Clone))]
10881#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10882pub struct BillingServicesAmount3 {
10883	#[cfg_attr( feature = "derive_serde", serde(rename = "SrcAmt") )]
10884	pub src_amt: AmountAndDirection34,
10885	#[cfg_attr( feature = "derive_serde", serde(rename = "HstAmt") )]
10886	pub hst_amt: AmountAndDirection34,
10887}
10888
10889impl BillingServicesAmount3 {
10890	pub fn validate(&self) -> Result<(), ValidationError> {
10891		self.src_amt.validate()?;
10892		self.hst_amt.validate()?;
10893		Ok(())
10894	}
10895}
10896
10897
10898// BillingServicesTax1 ...
10899#[cfg_attr(feature = "derive_debug", derive(Debug))]
10900#[cfg_attr(feature = "derive_default", derive(Default))]
10901#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10902#[cfg_attr(feature = "derive_clone", derive(Clone))]
10903#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10904pub struct BillingServicesTax1 {
10905	#[cfg_attr( feature = "derive_serde", serde(rename = "Nb") )]
10906	pub nb: String,
10907	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
10908	pub desc: Option<String>,
10909	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate") )]
10910	pub rate: f64,
10911	#[cfg_attr( feature = "derive_serde", serde(rename = "HstAmt") )]
10912	pub hst_amt: AmountAndDirection34,
10913	#[cfg_attr( feature = "derive_serde", serde(rename = "PricgAmt", skip_serializing_if = "Option::is_none") )]
10914	pub pricg_amt: Option<AmountAndDirection34>,
10915}
10916
10917impl BillingServicesTax1 {
10918	pub fn validate(&self) -> Result<(), ValidationError> {
10919		if self.nb.chars().count() < 1 {
10920			return Err(ValidationError::new(1001, "nb is shorter than the minimum length of 1".to_string()));
10921		}
10922		if self.nb.chars().count() > 35 {
10923			return Err(ValidationError::new(1002, "nb exceeds the maximum length of 35".to_string()));
10924		}
10925		if let Some(ref val) = self.desc {
10926			if val.chars().count() < 1 {
10927				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
10928			}
10929			if val.chars().count() > 40 {
10930				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 40".to_string()));
10931			}
10932		}
10933		self.hst_amt.validate()?;
10934		if let Some(ref val) = self.pricg_amt { val.validate()? }
10935		Ok(())
10936	}
10937}
10938
10939
10940// BillingServicesTax2 ...
10941#[cfg_attr(feature = "derive_debug", derive(Debug))]
10942#[cfg_attr(feature = "derive_default", derive(Default))]
10943#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10944#[cfg_attr(feature = "derive_clone", derive(Clone))]
10945#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10946pub struct BillingServicesTax2 {
10947	#[cfg_attr( feature = "derive_serde", serde(rename = "Nb") )]
10948	pub nb: String,
10949	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
10950	pub desc: Option<String>,
10951	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate") )]
10952	pub rate: f64,
10953	#[cfg_attr( feature = "derive_serde", serde(rename = "PricgAmt") )]
10954	pub pricg_amt: AmountAndDirection34,
10955}
10956
10957impl BillingServicesTax2 {
10958	pub fn validate(&self) -> Result<(), ValidationError> {
10959		if self.nb.chars().count() < 1 {
10960			return Err(ValidationError::new(1001, "nb is shorter than the minimum length of 1".to_string()));
10961		}
10962		if self.nb.chars().count() > 35 {
10963			return Err(ValidationError::new(1002, "nb exceeds the maximum length of 35".to_string()));
10964		}
10965		if let Some(ref val) = self.desc {
10966			if val.chars().count() < 1 {
10967				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
10968			}
10969			if val.chars().count() > 40 {
10970				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 40".to_string()));
10971			}
10972		}
10973		self.pricg_amt.validate()?;
10974		Ok(())
10975	}
10976}
10977
10978
10979// BillingServicesTax3 ...
10980#[cfg_attr(feature = "derive_debug", derive(Debug))]
10981#[cfg_attr(feature = "derive_default", derive(Default))]
10982#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
10983#[cfg_attr(feature = "derive_clone", derive(Clone))]
10984#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
10985pub struct BillingServicesTax3 {
10986	#[cfg_attr( feature = "derive_serde", serde(rename = "Nb") )]
10987	pub nb: String,
10988	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
10989	pub desc: Option<String>,
10990	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate") )]
10991	pub rate: f64,
10992	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlTaxAmt") )]
10993	pub ttl_tax_amt: AmountAndDirection34,
10994}
10995
10996impl BillingServicesTax3 {
10997	pub fn validate(&self) -> Result<(), ValidationError> {
10998		if self.nb.chars().count() < 1 {
10999			return Err(ValidationError::new(1001, "nb is shorter than the minimum length of 1".to_string()));
11000		}
11001		if self.nb.chars().count() > 35 {
11002			return Err(ValidationError::new(1002, "nb exceeds the maximum length of 35".to_string()));
11003		}
11004		if let Some(ref val) = self.desc {
11005			if val.chars().count() < 1 {
11006				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
11007			}
11008			if val.chars().count() > 40 {
11009				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 40".to_string()));
11010			}
11011		}
11012		self.ttl_tax_amt.validate()?;
11013		Ok(())
11014	}
11015}
11016
11017
11018// BillingStatement5 ...
11019#[cfg_attr(feature = "derive_debug", derive(Debug))]
11020#[cfg_attr(feature = "derive_default", derive(Default))]
11021#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11022#[cfg_attr(feature = "derive_clone", derive(Clone))]
11023#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11024pub struct BillingStatement5 {
11025	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtId") )]
11026	pub stmt_id: String,
11027	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDt") )]
11028	pub fr_to_dt: DatePeriod1,
11029	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
11030	pub cre_dt_tm: String,
11031	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
11032	pub sts: BillingStatementStatus1Code,
11033	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctChrtcs") )]
11034	pub acct_chrtcs: CashAccountCharacteristics5,
11035	#[cfg_attr( feature = "derive_serde", serde(rename = "RateData", skip_serializing_if = "Option::is_none") )]
11036	pub rate_data: Option<Vec<BillingRate1>>,
11037	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyXchg", skip_serializing_if = "Option::is_none") )]
11038	pub ccy_xchg: Option<Vec<CurrencyExchange6>>,
11039	#[cfg_attr( feature = "derive_serde", serde(rename = "Bal", skip_serializing_if = "Option::is_none") )]
11040	pub bal: Option<Vec<BillingBalance1>>,
11041	#[cfg_attr( feature = "derive_serde", serde(rename = "Compstn", skip_serializing_if = "Option::is_none") )]
11042	pub compstn: Option<Vec<BillingCompensation1>>,
11043	#[cfg_attr( feature = "derive_serde", serde(rename = "Svc", skip_serializing_if = "Option::is_none") )]
11044	pub svc: Option<Vec<BillingService2>>,
11045	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRgn", skip_serializing_if = "Option::is_none") )]
11046	pub tax_rgn: Option<Vec<BillingTaxRegion3>>,
11047	#[cfg_attr( feature = "derive_serde", serde(rename = "BalAdjstmnt", skip_serializing_if = "Option::is_none") )]
11048	pub bal_adjstmnt: Option<Vec<BalanceAdjustment1>>,
11049	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcAdjstmnt", skip_serializing_if = "Option::is_none") )]
11050	pub svc_adjstmnt: Option<Vec<BillingServiceAdjustment1>>,
11051}
11052
11053impl BillingStatement5 {
11054	pub fn validate(&self) -> Result<(), ValidationError> {
11055		if self.stmt_id.chars().count() < 1 {
11056			return Err(ValidationError::new(1001, "stmt_id is shorter than the minimum length of 1".to_string()));
11057		}
11058		if self.stmt_id.chars().count() > 35 {
11059			return Err(ValidationError::new(1002, "stmt_id exceeds the maximum length of 35".to_string()));
11060		}
11061		self.fr_to_dt.validate()?;
11062		self.sts.validate()?;
11063		self.acct_chrtcs.validate()?;
11064		if let Some(ref vec) = self.rate_data { for item in vec { item.validate()? } }
11065		if let Some(ref vec) = self.ccy_xchg { for item in vec { item.validate()? } }
11066		if let Some(ref vec) = self.bal { for item in vec { item.validate()? } }
11067		if let Some(ref vec) = self.compstn { for item in vec { item.validate()? } }
11068		if let Some(ref vec) = self.svc { for item in vec { item.validate()? } }
11069		if let Some(ref vec) = self.tax_rgn { for item in vec { item.validate()? } }
11070		if let Some(ref vec) = self.bal_adjstmnt { for item in vec { item.validate()? } }
11071		if let Some(ref vec) = self.svc_adjstmnt { for item in vec { item.validate()? } }
11072		Ok(())
11073	}
11074}
11075
11076
11077// BillingStatementStatus1Code ...
11078#[cfg_attr(feature = "derive_debug", derive(Debug))]
11079#[cfg_attr(feature = "derive_default", derive(Default))]
11080#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11081#[cfg_attr(feature = "derive_clone", derive(Clone))]
11082#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11083pub enum BillingStatementStatus1Code {
11084	#[cfg_attr(feature = "derive_default", default)]
11085	#[cfg_attr( feature = "derive_serde", serde(rename = "ORGN") )]
11086	CodeORGN,
11087	#[cfg_attr( feature = "derive_serde", serde(rename = "RPLC") )]
11088	CodeRPLC,
11089	#[cfg_attr( feature = "derive_serde", serde(rename = "TEST") )]
11090	CodeTEST,
11091}
11092
11093impl BillingStatementStatus1Code {
11094	pub fn validate(&self) -> Result<(), ValidationError> {
11095		Ok(())
11096	}
11097}
11098
11099
11100// BillingSubServiceIdentification1 ...
11101#[cfg_attr(feature = "derive_debug", derive(Debug))]
11102#[cfg_attr(feature = "derive_default", derive(Default))]
11103#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11104#[cfg_attr(feature = "derive_clone", derive(Clone))]
11105#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11106pub struct BillingSubServiceIdentification1 {
11107	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr") )]
11108	pub issr: BillingSubServiceQualifier1Choice,
11109	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
11110	pub id: String,
11111}
11112
11113impl BillingSubServiceIdentification1 {
11114	pub fn validate(&self) -> Result<(), ValidationError> {
11115		self.issr.validate()?;
11116		if self.id.chars().count() < 1 {
11117			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
11118		}
11119		if self.id.chars().count() > 35 {
11120			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
11121		}
11122		Ok(())
11123	}
11124}
11125
11126
11127// BillingSubServiceQualifier1Choice ...
11128#[cfg_attr(feature = "derive_debug", derive(Debug))]
11129#[cfg_attr(feature = "derive_default", derive(Default))]
11130#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11131#[cfg_attr(feature = "derive_clone", derive(Clone))]
11132#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11133pub struct BillingSubServiceQualifier1Choice {
11134	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
11135	pub cd: Option<BillingSubServiceQualifier1Code>,
11136	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
11137	pub prtry: Option<String>,
11138}
11139
11140impl BillingSubServiceQualifier1Choice {
11141	pub fn validate(&self) -> Result<(), ValidationError> {
11142		if let Some(ref val) = self.cd { val.validate()? }
11143		if let Some(ref val) = self.prtry {
11144			if val.chars().count() < 1 {
11145				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
11146			}
11147			if val.chars().count() > 35 {
11148				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
11149			}
11150		}
11151		Ok(())
11152	}
11153}
11154
11155
11156// BillingSubServiceQualifier1Code ...
11157#[cfg_attr(feature = "derive_debug", derive(Debug))]
11158#[cfg_attr(feature = "derive_default", derive(Default))]
11159#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11160#[cfg_attr(feature = "derive_clone", derive(Clone))]
11161#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11162pub enum BillingSubServiceQualifier1Code {
11163	#[cfg_attr(feature = "derive_default", default)]
11164	#[cfg_attr( feature = "derive_serde", serde(rename = "LBOX") )]
11165	CodeLBOX,
11166	#[cfg_attr( feature = "derive_serde", serde(rename = "STOR") )]
11167	CodeSTOR,
11168	#[cfg_attr( feature = "derive_serde", serde(rename = "BILA") )]
11169	CodeBILA,
11170	#[cfg_attr( feature = "derive_serde", serde(rename = "SEQN") )]
11171	CodeSEQN,
11172	#[cfg_attr( feature = "derive_serde", serde(rename = "MACT") )]
11173	CodeMACT,
11174}
11175
11176impl BillingSubServiceQualifier1Code {
11177	pub fn validate(&self) -> Result<(), ValidationError> {
11178		Ok(())
11179	}
11180}
11181
11182
11183// BillingTaxCalculationMethod1Code ...
11184#[cfg_attr(feature = "derive_debug", derive(Debug))]
11185#[cfg_attr(feature = "derive_default", derive(Default))]
11186#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11187#[cfg_attr(feature = "derive_clone", derive(Clone))]
11188#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11189pub enum BillingTaxCalculationMethod1Code {
11190	#[cfg_attr(feature = "derive_default", default)]
11191	#[cfg_attr( feature = "derive_serde", serde(rename = "NTAX") )]
11192	CodeNTAX,
11193	#[cfg_attr( feature = "derive_serde", serde(rename = "MTDA") )]
11194	CodeMTDA,
11195	#[cfg_attr( feature = "derive_serde", serde(rename = "MTDB") )]
11196	CodeMTDB,
11197	#[cfg_attr( feature = "derive_serde", serde(rename = "MTDC") )]
11198	CodeMTDC,
11199	#[cfg_attr( feature = "derive_serde", serde(rename = "MTDD") )]
11200	CodeMTDD,
11201	#[cfg_attr( feature = "derive_serde", serde(rename = "UDFD") )]
11202	CodeUDFD,
11203}
11204
11205impl BillingTaxCalculationMethod1Code {
11206	pub fn validate(&self) -> Result<(), ValidationError> {
11207		Ok(())
11208	}
11209}
11210
11211
11212// BillingTaxIdentification3 ...
11213#[cfg_attr(feature = "derive_debug", derive(Debug))]
11214#[cfg_attr(feature = "derive_default", derive(Default))]
11215#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11216#[cfg_attr(feature = "derive_clone", derive(Clone))]
11217#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11218pub struct BillingTaxIdentification3 {
11219	#[cfg_attr( feature = "derive_serde", serde(rename = "VATRegnNb", skip_serializing_if = "Option::is_none") )]
11220	pub vat_regn_nb: Option<String>,
11221	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRegnNb", skip_serializing_if = "Option::is_none") )]
11222	pub tax_regn_nb: Option<String>,
11223	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxCtct", skip_serializing_if = "Option::is_none") )]
11224	pub tax_ctct: Option<Contact13>,
11225}
11226
11227impl BillingTaxIdentification3 {
11228	pub fn validate(&self) -> Result<(), ValidationError> {
11229		if let Some(ref val) = self.vat_regn_nb {
11230			if val.chars().count() < 1 {
11231				return Err(ValidationError::new(1001, "vat_regn_nb is shorter than the minimum length of 1".to_string()));
11232			}
11233			if val.chars().count() > 35 {
11234				return Err(ValidationError::new(1002, "vat_regn_nb exceeds the maximum length of 35".to_string()));
11235			}
11236		}
11237		if let Some(ref val) = self.tax_regn_nb {
11238			if val.chars().count() < 1 {
11239				return Err(ValidationError::new(1001, "tax_regn_nb is shorter than the minimum length of 1".to_string()));
11240			}
11241			if val.chars().count() > 35 {
11242				return Err(ValidationError::new(1002, "tax_regn_nb exceeds the maximum length of 35".to_string()));
11243			}
11244		}
11245		if let Some(ref val) = self.tax_ctct { val.validate()? }
11246		Ok(())
11247	}
11248}
11249
11250
11251// BillingTaxRegion3 ...
11252#[cfg_attr(feature = "derive_debug", derive(Debug))]
11253#[cfg_attr(feature = "derive_default", derive(Default))]
11254#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11255#[cfg_attr(feature = "derive_clone", derive(Clone))]
11256#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11257pub struct BillingTaxRegion3 {
11258	#[cfg_attr( feature = "derive_serde", serde(rename = "RgnNb") )]
11259	pub rgn_nb: String,
11260	#[cfg_attr( feature = "derive_serde", serde(rename = "RgnNm") )]
11261	pub rgn_nm: String,
11262	#[cfg_attr( feature = "derive_serde", serde(rename = "CstmrTaxId") )]
11263	pub cstmr_tax_id: String,
11264	#[cfg_attr( feature = "derive_serde", serde(rename = "PtDt", skip_serializing_if = "Option::is_none") )]
11265	pub pt_dt: Option<String>,
11266	#[cfg_attr( feature = "derive_serde", serde(rename = "SndgFI", skip_serializing_if = "Option::is_none") )]
11267	pub sndg_fi: Option<BillingTaxIdentification3>,
11268	#[cfg_attr( feature = "derive_serde", serde(rename = "InvcNb", skip_serializing_if = "Option::is_none") )]
11269	pub invc_nb: Option<String>,
11270	#[cfg_attr( feature = "derive_serde", serde(rename = "MtdC", skip_serializing_if = "Option::is_none") )]
11271	pub mtd_c: Option<BillingMethod4>,
11272	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmAmt") )]
11273	pub sttlm_amt: AmountAndDirection34,
11274	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxDueToRgn") )]
11275	pub tax_due_to_rgn: AmountAndDirection34,
11276}
11277
11278impl BillingTaxRegion3 {
11279	pub fn validate(&self) -> Result<(), ValidationError> {
11280		if self.rgn_nb.chars().count() < 1 {
11281			return Err(ValidationError::new(1001, "rgn_nb is shorter than the minimum length of 1".to_string()));
11282		}
11283		if self.rgn_nb.chars().count() > 40 {
11284			return Err(ValidationError::new(1002, "rgn_nb exceeds the maximum length of 40".to_string()));
11285		}
11286		if self.rgn_nm.chars().count() < 1 {
11287			return Err(ValidationError::new(1001, "rgn_nm is shorter than the minimum length of 1".to_string()));
11288		}
11289		if self.rgn_nm.chars().count() > 40 {
11290			return Err(ValidationError::new(1002, "rgn_nm exceeds the maximum length of 40".to_string()));
11291		}
11292		if self.cstmr_tax_id.chars().count() < 1 {
11293			return Err(ValidationError::new(1001, "cstmr_tax_id is shorter than the minimum length of 1".to_string()));
11294		}
11295		if self.cstmr_tax_id.chars().count() > 40 {
11296			return Err(ValidationError::new(1002, "cstmr_tax_id exceeds the maximum length of 40".to_string()));
11297		}
11298		if let Some(ref val) = self.sndg_fi { val.validate()? }
11299		if let Some(ref val) = self.invc_nb {
11300			if val.chars().count() < 1 {
11301				return Err(ValidationError::new(1001, "invc_nb is shorter than the minimum length of 1".to_string()));
11302			}
11303			if val.chars().count() > 40 {
11304				return Err(ValidationError::new(1002, "invc_nb exceeds the maximum length of 40".to_string()));
11305			}
11306		}
11307		if let Some(ref val) = self.mtd_c { val.validate()? }
11308		self.sttlm_amt.validate()?;
11309		self.tax_due_to_rgn.validate()?;
11310		Ok(())
11311	}
11312}
11313
11314
11315// BinaryFile1 ...
11316#[cfg_attr(feature = "derive_debug", derive(Debug))]
11317#[cfg_attr(feature = "derive_default", derive(Default))]
11318#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11319#[cfg_attr(feature = "derive_clone", derive(Clone))]
11320#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11321pub struct BinaryFile1 {
11322	#[cfg_attr( feature = "derive_serde", serde(rename = "MIMETp", skip_serializing_if = "Option::is_none") )]
11323	pub mime_tp: Option<String>,
11324	#[cfg_attr( feature = "derive_serde", serde(rename = "NcodgTp", skip_serializing_if = "Option::is_none") )]
11325	pub ncodg_tp: Option<String>,
11326	#[cfg_attr( feature = "derive_serde", serde(rename = "CharSet", skip_serializing_if = "Option::is_none") )]
11327	pub char_set: Option<String>,
11328	#[cfg_attr( feature = "derive_serde", serde(rename = "InclBinryObjct", skip_serializing_if = "Option::is_none") )]
11329	pub incl_binry_objct: Option<String>,
11330}
11331
11332impl BinaryFile1 {
11333	pub fn validate(&self) -> Result<(), ValidationError> {
11334		if let Some(ref val) = self.mime_tp {
11335			if val.chars().count() < 1 {
11336				return Err(ValidationError::new(1001, "mime_tp is shorter than the minimum length of 1".to_string()));
11337			}
11338			if val.chars().count() > 35 {
11339				return Err(ValidationError::new(1002, "mime_tp exceeds the maximum length of 35".to_string()));
11340			}
11341		}
11342		if let Some(ref val) = self.ncodg_tp {
11343			if val.chars().count() < 1 {
11344				return Err(ValidationError::new(1001, "ncodg_tp is shorter than the minimum length of 1".to_string()));
11345			}
11346			if val.chars().count() > 35 {
11347				return Err(ValidationError::new(1002, "ncodg_tp exceeds the maximum length of 35".to_string()));
11348			}
11349		}
11350		if let Some(ref val) = self.char_set {
11351			if val.chars().count() < 1 {
11352				return Err(ValidationError::new(1001, "char_set is shorter than the minimum length of 1".to_string()));
11353			}
11354			if val.chars().count() > 35 {
11355				return Err(ValidationError::new(1002, "char_set exceeds the maximum length of 35".to_string()));
11356			}
11357		}
11358		if let Some(ref val) = self.incl_binry_objct {
11359			if val.chars().count() < 1 {
11360				return Err(ValidationError::new(1001, "incl_binry_objct is shorter than the minimum length of 1".to_string()));
11361			}
11362			if val.chars().count() > 102400 {
11363				return Err(ValidationError::new(1002, "incl_binry_objct exceeds the maximum length of 102400".to_string()));
11364			}
11365		}
11366		Ok(())
11367	}
11368}
11369
11370
11371// BlockedHoldingDetails2 ...
11372#[cfg_attr(feature = "derive_debug", derive(Debug))]
11373#[cfg_attr(feature = "derive_default", derive(Default))]
11374#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11375#[cfg_attr(feature = "derive_clone", derive(Clone))]
11376#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11377pub struct BlockedHoldingDetails2 {
11378	#[cfg_attr( feature = "derive_serde", serde(rename = "BlckdHldg") )]
11379	pub blckd_hldg: Holding1Code,
11380	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtlHldgUnits", skip_serializing_if = "Option::is_none") )]
11381	pub prtl_hldg_units: Option<f64>,
11382	#[cfg_attr( feature = "derive_serde", serde(rename = "HldgCertNb", skip_serializing_if = "Option::is_none") )]
11383	pub hldg_cert_nb: Option<String>,
11384}
11385
11386impl BlockedHoldingDetails2 {
11387	pub fn validate(&self) -> Result<(), ValidationError> {
11388		self.blckd_hldg.validate()?;
11389		if let Some(ref val) = self.hldg_cert_nb {
11390			if val.chars().count() < 1 {
11391				return Err(ValidationError::new(1001, "hldg_cert_nb is shorter than the minimum length of 1".to_string()));
11392			}
11393			if val.chars().count() > 35 {
11394				return Err(ValidationError::new(1002, "hldg_cert_nb exceeds the maximum length of 35".to_string()));
11395			}
11396		}
11397		Ok(())
11398	}
11399}
11400
11401
11402// BlockedReason2Choice ...
11403#[cfg_attr(feature = "derive_debug", derive(Debug))]
11404#[cfg_attr(feature = "derive_default", derive(Default))]
11405#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11406#[cfg_attr(feature = "derive_clone", derive(Clone))]
11407#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11408pub struct BlockedReason2Choice {
11409	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
11410	pub cd: Option<BlockedReason2Code>,
11411	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
11412	pub prtry: Option<GenericIdentification47>,
11413}
11414
11415impl BlockedReason2Choice {
11416	pub fn validate(&self) -> Result<(), ValidationError> {
11417		if let Some(ref val) = self.cd { val.validate()? }
11418		if let Some(ref val) = self.prtry { val.validate()? }
11419		Ok(())
11420	}
11421}
11422
11423
11424// BlockedReason2Code ...
11425#[cfg_attr(feature = "derive_debug", derive(Debug))]
11426#[cfg_attr(feature = "derive_default", derive(Default))]
11427#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11428#[cfg_attr(feature = "derive_clone", derive(Clone))]
11429#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11430pub enum BlockedReason2Code {
11431	#[cfg_attr(feature = "derive_default", default)]
11432	#[cfg_attr( feature = "derive_serde", serde(rename = "BKRP") )]
11433	CodeBKRP,
11434	#[cfg_attr( feature = "derive_serde", serde(rename = "CMMT") )]
11435	CodeCMMT,
11436	#[cfg_attr( feature = "derive_serde", serde(rename = "CNFS") )]
11437	CodeCNFS,
11438	#[cfg_attr( feature = "derive_serde", serde(rename = "MORT") )]
11439	CodeMORT,
11440	#[cfg_attr( feature = "derive_serde", serde(rename = "PCOM") )]
11441	CodePCOM,
11442	#[cfg_attr( feature = "derive_serde", serde(rename = "PLDG") )]
11443	CodePLDG,
11444	#[cfg_attr( feature = "derive_serde", serde(rename = "TRPE") )]
11445	CodeTRPE,
11446	#[cfg_attr( feature = "derive_serde", serde(rename = "SANC") )]
11447	CodeSANC,
11448	#[cfg_attr( feature = "derive_serde", serde(rename = "TRAN") )]
11449	CodeTRAN,
11450}
11451
11452impl BlockedReason2Code {
11453	pub fn validate(&self) -> Result<(), ValidationError> {
11454		Ok(())
11455	}
11456}
11457
11458
11459// BlockedStatusReason2 ...
11460#[cfg_attr(feature = "derive_debug", derive(Debug))]
11461#[cfg_attr(feature = "derive_default", derive(Default))]
11462#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11463#[cfg_attr(feature = "derive_clone", derive(Clone))]
11464#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11465pub struct BlockedStatusReason2 {
11466	#[cfg_attr( feature = "derive_serde", serde(rename = "TxTp") )]
11467	pub tx_tp: TransactionType5Choice,
11468	#[cfg_attr( feature = "derive_serde", serde(rename = "Blckd") )]
11469	pub blckd: bool,
11470	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
11471	pub rsn: Option<Vec<BlockedReason2Choice>>,
11472	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf") )]
11473	pub addtl_inf: String,
11474}
11475
11476impl BlockedStatusReason2 {
11477	pub fn validate(&self) -> Result<(), ValidationError> {
11478		self.tx_tp.validate()?;
11479		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
11480		if self.addtl_inf.chars().count() < 1 {
11481			return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
11482		}
11483		if self.addtl_inf.chars().count() > 350 {
11484			return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 350".to_string()));
11485		}
11486		Ok(())
11487	}
11488}
11489
11490
11491// BlockedStatusReason2Choice ...
11492#[cfg_attr(feature = "derive_debug", derive(Debug))]
11493#[cfg_attr(feature = "derive_default", derive(Default))]
11494#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11495#[cfg_attr(feature = "derive_clone", derive(Clone))]
11496#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11497pub struct BlockedStatusReason2Choice {
11498	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
11499	pub no_spcfd_rsn: Option<NoReasonCode>,
11500	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
11501	pub rsn: Option<Vec<BlockedStatusReason2>>,
11502}
11503
11504impl BlockedStatusReason2Choice {
11505	pub fn validate(&self) -> Result<(), ValidationError> {
11506		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
11507		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
11508		Ok(())
11509	}
11510}
11511
11512
11513// BondDerivative2 ...
11514#[cfg_attr(feature = "derive_debug", derive(Debug))]
11515#[cfg_attr(feature = "derive_default", derive(Default))]
11516#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11517#[cfg_attr(feature = "derive_clone", derive(Clone))]
11518#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11519pub struct BondDerivative2 {
11520	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr") )]
11521	pub issr: String,
11522	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
11523	pub mtrty_dt: Option<String>,
11524	#[cfg_attr( feature = "derive_serde", serde(rename = "IssncDt", skip_serializing_if = "Option::is_none") )]
11525	pub issnc_dt: Option<String>,
11526}
11527
11528impl BondDerivative2 {
11529	pub fn validate(&self) -> Result<(), ValidationError> {
11530		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
11531		if !pattern.is_match(&self.issr) {
11532			return Err(ValidationError::new(1005, "issr does not match the required pattern".to_string()));
11533		}
11534		Ok(())
11535	}
11536}
11537
11538
11539// BondType1Code ...
11540#[cfg_attr(feature = "derive_debug", derive(Debug))]
11541#[cfg_attr(feature = "derive_default", derive(Default))]
11542#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11543#[cfg_attr(feature = "derive_clone", derive(Clone))]
11544#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11545pub enum BondType1Code {
11546	#[cfg_attr(feature = "derive_default", default)]
11547	#[cfg_attr( feature = "derive_serde", serde(rename = "EUSB") )]
11548	CodeEUSB,
11549	#[cfg_attr( feature = "derive_serde", serde(rename = "OEPB") )]
11550	CodeOEPB,
11551	#[cfg_attr( feature = "derive_serde", serde(rename = "CVTB") )]
11552	CodeCVTB,
11553	#[cfg_attr( feature = "derive_serde", serde(rename = "CRPB") )]
11554	CodeCRPB,
11555	#[cfg_attr( feature = "derive_serde", serde(rename = "CVDB") )]
11556	CodeCVDB,
11557	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
11558	CodeOTHR,
11559}
11560
11561impl BondType1Code {
11562	pub fn validate(&self) -> Result<(), ValidationError> {
11563		Ok(())
11564	}
11565}
11566
11567
11568// BookingConfirmation1 ...
11569#[cfg_attr(feature = "derive_debug", derive(Debug))]
11570#[cfg_attr(feature = "derive_default", derive(Default))]
11571#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11572#[cfg_attr(feature = "derive_clone", derive(Clone))]
11573#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11574pub struct BookingConfirmation1 {
11575	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
11576	pub amt: ActiveOrHistoricCurrencyAndAmount,
11577	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
11578	pub cdt_dbt_ind: CreditDebitCode,
11579	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate", skip_serializing_if = "Option::is_none") )]
11580	pub xchg_rate: Option<f64>,
11581	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct") )]
11582	pub acct: CashAccount40,
11583	#[cfg_attr( feature = "derive_serde", serde(rename = "BookgDt", skip_serializing_if = "Option::is_none") )]
11584	pub bookg_dt: Option<DateAndDateTime2Choice>,
11585	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt") )]
11586	pub val_dt: DateAndDateTime2Choice,
11587	#[cfg_attr( feature = "derive_serde", serde(rename = "Refs") )]
11588	pub refs: TransactionReferences6,
11589	#[cfg_attr( feature = "derive_serde", serde(rename = "Chrgs", skip_serializing_if = "Option::is_none") )]
11590	pub chrgs: Option<Charges6>,
11591	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
11592	pub rsn: Option<String>,
11593}
11594
11595impl BookingConfirmation1 {
11596	pub fn validate(&self) -> Result<(), ValidationError> {
11597		self.amt.validate()?;
11598		self.cdt_dbt_ind.validate()?;
11599		self.acct.validate()?;
11600		if let Some(ref val) = self.bookg_dt { val.validate()? }
11601		self.val_dt.validate()?;
11602		self.refs.validate()?;
11603		if let Some(ref val) = self.chrgs { val.validate()? }
11604		if let Some(ref val) = self.rsn {
11605			if val.chars().count() < 1 {
11606				return Err(ValidationError::new(1001, "rsn is shorter than the minimum length of 1".to_string()));
11607			}
11608			if val.chars().count() > 140 {
11609				return Err(ValidationError::new(1002, "rsn exceeds the maximum length of 140".to_string()));
11610			}
11611		}
11612		Ok(())
11613	}
11614}
11615
11616
11617// Branch5Choice ...
11618#[cfg_attr(feature = "derive_debug", derive(Debug))]
11619#[cfg_attr(feature = "derive_default", derive(Default))]
11620#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11621#[cfg_attr(feature = "derive_clone", derive(Clone))]
11622#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11623pub struct Branch5Choice {
11624	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
11625	pub id: Option<OrganisationIdentification15Choice>,
11626	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
11627	pub ctry: Option<String>,
11628}
11629
11630impl Branch5Choice {
11631	pub fn validate(&self) -> Result<(), ValidationError> {
11632		if let Some(ref val) = self.id { val.validate()? }
11633		if let Some(ref val) = self.ctry {
11634			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
11635			if !pattern.is_match(val) {
11636				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
11637			}
11638		}
11639		Ok(())
11640	}
11641}
11642
11643
11644// Branch6Choice ...
11645#[cfg_attr(feature = "derive_debug", derive(Debug))]
11646#[cfg_attr(feature = "derive_default", derive(Default))]
11647#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11648#[cfg_attr(feature = "derive_clone", derive(Clone))]
11649#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11650pub struct Branch6Choice {
11651	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
11652	pub id: Option<PartyIdentification236Choice>,
11653	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
11654	pub ctry: Option<String>,
11655}
11656
11657impl Branch6Choice {
11658	pub fn validate(&self) -> Result<(), ValidationError> {
11659		if let Some(ref val) = self.id { val.validate()? }
11660		if let Some(ref val) = self.ctry {
11661			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
11662			if !pattern.is_match(val) {
11663				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
11664			}
11665		}
11666		Ok(())
11667	}
11668}
11669
11670
11671// BranchAndFinancialInstitutionIdentification6 ...
11672#[cfg_attr(feature = "derive_debug", derive(Debug))]
11673#[cfg_attr(feature = "derive_default", derive(Default))]
11674#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11675#[cfg_attr(feature = "derive_clone", derive(Clone))]
11676#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11677pub struct BranchAndFinancialInstitutionIdentification6 {
11678	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstnId") )]
11679	pub fin_instn_id: FinancialInstitutionIdentification18,
11680	#[cfg_attr( feature = "derive_serde", serde(rename = "BrnchId", skip_serializing_if = "Option::is_none") )]
11681	pub brnch_id: Option<BranchData3>,
11682}
11683
11684impl BranchAndFinancialInstitutionIdentification6 {
11685	pub fn validate(&self) -> Result<(), ValidationError> {
11686		self.fin_instn_id.validate()?;
11687		if let Some(ref val) = self.brnch_id { val.validate()? }
11688		Ok(())
11689	}
11690}
11691
11692
11693// BranchAndFinancialInstitutionIdentification8 ...
11694#[cfg_attr(feature = "derive_debug", derive(Debug))]
11695#[cfg_attr(feature = "derive_default", derive(Default))]
11696#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11697#[cfg_attr(feature = "derive_clone", derive(Clone))]
11698#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11699pub struct BranchAndFinancialInstitutionIdentification8 {
11700	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstnId") )]
11701	pub fin_instn_id: FinancialInstitutionIdentification23,
11702	#[cfg_attr( feature = "derive_serde", serde(rename = "BrnchId", skip_serializing_if = "Option::is_none") )]
11703	pub brnch_id: Option<BranchData5>,
11704}
11705
11706impl BranchAndFinancialInstitutionIdentification8 {
11707	pub fn validate(&self) -> Result<(), ValidationError> {
11708		self.fin_instn_id.validate()?;
11709		if let Some(ref val) = self.brnch_id { val.validate()? }
11710		Ok(())
11711	}
11712}
11713
11714
11715// BranchData3 ...
11716#[cfg_attr(feature = "derive_debug", derive(Debug))]
11717#[cfg_attr(feature = "derive_default", derive(Default))]
11718#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11719#[cfg_attr(feature = "derive_clone", derive(Clone))]
11720#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11721pub struct BranchData3 {
11722	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
11723	pub id: Option<String>,
11724	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
11725	pub lei: Option<String>,
11726	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
11727	pub nm: Option<String>,
11728	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
11729	pub pstl_adr: Option<PostalAddress24>,
11730}
11731
11732impl BranchData3 {
11733	pub fn validate(&self) -> Result<(), ValidationError> {
11734		if let Some(ref val) = self.id {
11735			if val.chars().count() < 1 {
11736				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
11737			}
11738			if val.chars().count() > 35 {
11739				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
11740			}
11741		}
11742		if let Some(ref val) = self.lei {
11743			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
11744			if !pattern.is_match(val) {
11745				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
11746			}
11747		}
11748		if let Some(ref val) = self.nm {
11749			if val.chars().count() < 1 {
11750				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
11751			}
11752			if val.chars().count() > 140 {
11753				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
11754			}
11755		}
11756		if let Some(ref val) = self.pstl_adr { val.validate()? }
11757		Ok(())
11758	}
11759}
11760
11761
11762// BranchData4 ...
11763#[cfg_attr(feature = "derive_debug", derive(Debug))]
11764#[cfg_attr(feature = "derive_default", derive(Default))]
11765#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11766#[cfg_attr(feature = "derive_clone", derive(Clone))]
11767#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11768pub struct BranchData4 {
11769	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
11770	pub id: Option<String>,
11771	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
11772	pub nm: Option<String>,
11773	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
11774	pub pstl_adr: Option<PostalAddress1>,
11775}
11776
11777impl BranchData4 {
11778	pub fn validate(&self) -> Result<(), ValidationError> {
11779		if let Some(ref val) = self.id {
11780			if val.chars().count() < 1 {
11781				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
11782			}
11783			if val.chars().count() > 35 {
11784				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
11785			}
11786		}
11787		if let Some(ref val) = self.nm {
11788			if val.chars().count() < 1 {
11789				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
11790			}
11791			if val.chars().count() > 35 {
11792				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 35".to_string()));
11793			}
11794		}
11795		if let Some(ref val) = self.pstl_adr { val.validate()? }
11796		Ok(())
11797	}
11798}
11799
11800
11801// BranchData5 ...
11802#[cfg_attr(feature = "derive_debug", derive(Debug))]
11803#[cfg_attr(feature = "derive_default", derive(Default))]
11804#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11805#[cfg_attr(feature = "derive_clone", derive(Clone))]
11806#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11807pub struct BranchData5 {
11808	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
11809	pub id: Option<String>,
11810	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
11811	pub lei: Option<String>,
11812	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
11813	pub nm: Option<String>,
11814	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
11815	pub pstl_adr: Option<PostalAddress27>,
11816}
11817
11818impl BranchData5 {
11819	pub fn validate(&self) -> Result<(), ValidationError> {
11820		if let Some(ref val) = self.id {
11821			if val.chars().count() < 1 {
11822				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
11823			}
11824			if val.chars().count() > 35 {
11825				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
11826			}
11827		}
11828		if let Some(ref val) = self.lei {
11829			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
11830			if !pattern.is_match(val) {
11831				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
11832			}
11833		}
11834		if let Some(ref val) = self.nm {
11835			if val.chars().count() < 1 {
11836				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
11837			}
11838			if val.chars().count() > 140 {
11839				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
11840			}
11841		}
11842		if let Some(ref val) = self.pstl_adr { val.validate()? }
11843		Ok(())
11844	}
11845}
11846
11847
11848// BreakdownByCountry2 ...
11849#[cfg_attr(feature = "derive_debug", derive(Debug))]
11850#[cfg_attr(feature = "derive_default", derive(Default))]
11851#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11852#[cfg_attr(feature = "derive_clone", derive(Clone))]
11853#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11854pub struct BreakdownByCountry2 {
11855	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry") )]
11856	pub ctry: String,
11857	#[cfg_attr( feature = "derive_serde", serde(rename = "CshInFcst", skip_serializing_if = "Option::is_none") )]
11858	pub csh_in_fcst: Option<Vec<CashInForecast5>>,
11859	#[cfg_attr( feature = "derive_serde", serde(rename = "CshOutFcst", skip_serializing_if = "Option::is_none") )]
11860	pub csh_out_fcst: Option<Vec<CashOutForecast5>>,
11861	#[cfg_attr( feature = "derive_serde", serde(rename = "NetCshFcst", skip_serializing_if = "Option::is_none") )]
11862	pub net_csh_fcst: Option<Vec<NetCashForecast4>>,
11863}
11864
11865impl BreakdownByCountry2 {
11866	pub fn validate(&self) -> Result<(), ValidationError> {
11867		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
11868		if !pattern.is_match(&self.ctry) {
11869			return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
11870		}
11871		if let Some(ref vec) = self.csh_in_fcst { for item in vec { item.validate()? } }
11872		if let Some(ref vec) = self.csh_out_fcst { for item in vec { item.validate()? } }
11873		if let Some(ref vec) = self.net_csh_fcst { for item in vec { item.validate()? } }
11874		Ok(())
11875	}
11876}
11877
11878
11879// BreakdownByCurrency2 ...
11880#[cfg_attr(feature = "derive_debug", derive(Debug))]
11881#[cfg_attr(feature = "derive_default", derive(Default))]
11882#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11883#[cfg_attr(feature = "derive_clone", derive(Clone))]
11884#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11885pub struct BreakdownByCurrency2 {
11886	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
11887	pub ccy: String,
11888	#[cfg_attr( feature = "derive_serde", serde(rename = "CshOutFcst", skip_serializing_if = "Option::is_none") )]
11889	pub csh_out_fcst: Option<Vec<CashOutForecast5>>,
11890	#[cfg_attr( feature = "derive_serde", serde(rename = "CshInFcst", skip_serializing_if = "Option::is_none") )]
11891	pub csh_in_fcst: Option<Vec<CashInForecast5>>,
11892	#[cfg_attr( feature = "derive_serde", serde(rename = "NetCshFcst", skip_serializing_if = "Option::is_none") )]
11893	pub net_csh_fcst: Option<Vec<NetCashForecast4>>,
11894}
11895
11896impl BreakdownByCurrency2 {
11897	pub fn validate(&self) -> Result<(), ValidationError> {
11898		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
11899		if !pattern.is_match(&self.ccy) {
11900			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
11901		}
11902		if let Some(ref vec) = self.csh_out_fcst { for item in vec { item.validate()? } }
11903		if let Some(ref vec) = self.csh_in_fcst { for item in vec { item.validate()? } }
11904		if let Some(ref vec) = self.net_csh_fcst { for item in vec { item.validate()? } }
11905		Ok(())
11906	}
11907}
11908
11909
11910// BreakdownByParty3 ...
11911#[cfg_attr(feature = "derive_debug", derive(Debug))]
11912#[cfg_attr(feature = "derive_default", derive(Default))]
11913#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11914#[cfg_attr(feature = "derive_clone", derive(Clone))]
11915#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11916pub struct BreakdownByParty3 {
11917	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty") )]
11918	pub pty: InvestmentAccount42,
11919	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlParams", skip_serializing_if = "Option::is_none") )]
11920	pub addtl_params: Option<AdditionalParameters1>,
11921	#[cfg_attr( feature = "derive_serde", serde(rename = "CshInFcst", skip_serializing_if = "Option::is_none") )]
11922	pub csh_in_fcst: Option<Vec<CashInForecast5>>,
11923	#[cfg_attr( feature = "derive_serde", serde(rename = "CshOutFcst", skip_serializing_if = "Option::is_none") )]
11924	pub csh_out_fcst: Option<Vec<CashOutForecast5>>,
11925	#[cfg_attr( feature = "derive_serde", serde(rename = "NetCshFcst", skip_serializing_if = "Option::is_none") )]
11926	pub net_csh_fcst: Option<Vec<NetCashForecast4>>,
11927}
11928
11929impl BreakdownByParty3 {
11930	pub fn validate(&self) -> Result<(), ValidationError> {
11931		self.pty.validate()?;
11932		if let Some(ref val) = self.addtl_params { val.validate()? }
11933		if let Some(ref vec) = self.csh_in_fcst { for item in vec { item.validate()? } }
11934		if let Some(ref vec) = self.csh_out_fcst { for item in vec { item.validate()? } }
11935		if let Some(ref vec) = self.net_csh_fcst { for item in vec { item.validate()? } }
11936		Ok(())
11937	}
11938}
11939
11940
11941// BreakdownByUserDefinedParameter3 ...
11942#[cfg_attr(feature = "derive_debug", derive(Debug))]
11943#[cfg_attr(feature = "derive_default", derive(Default))]
11944#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11945#[cfg_attr(feature = "derive_clone", derive(Clone))]
11946#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11947pub struct BreakdownByUserDefinedParameter3 {
11948	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty", skip_serializing_if = "Option::is_none") )]
11949	pub pty: Option<InvestmentAccount42>,
11950	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
11951	pub ctry: Option<String>,
11952	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
11953	pub ccy: Option<String>,
11954	#[cfg_attr( feature = "derive_serde", serde(rename = "UsrDfnd", skip_serializing_if = "Option::is_none") )]
11955	pub usr_dfnd: Option<DataFormat2Choice>,
11956	#[cfg_attr( feature = "derive_serde", serde(rename = "CshInFcst", skip_serializing_if = "Option::is_none") )]
11957	pub csh_in_fcst: Option<Vec<CashInForecast5>>,
11958	#[cfg_attr( feature = "derive_serde", serde(rename = "CshOutFcst", skip_serializing_if = "Option::is_none") )]
11959	pub csh_out_fcst: Option<Vec<CashOutForecast5>>,
11960	#[cfg_attr( feature = "derive_serde", serde(rename = "NetCshFcst", skip_serializing_if = "Option::is_none") )]
11961	pub net_csh_fcst: Option<Vec<NetCashForecast4>>,
11962}
11963
11964impl BreakdownByUserDefinedParameter3 {
11965	pub fn validate(&self) -> Result<(), ValidationError> {
11966		if let Some(ref val) = self.pty { val.validate()? }
11967		if let Some(ref val) = self.ctry {
11968			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
11969			if !pattern.is_match(val) {
11970				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
11971			}
11972		}
11973		if let Some(ref val) = self.ccy {
11974			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
11975			if !pattern.is_match(val) {
11976				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
11977			}
11978		}
11979		if let Some(ref val) = self.usr_dfnd { val.validate()? }
11980		if let Some(ref vec) = self.csh_in_fcst { for item in vec { item.validate()? } }
11981		if let Some(ref vec) = self.csh_out_fcst { for item in vec { item.validate()? } }
11982		if let Some(ref vec) = self.net_csh_fcst { for item in vec { item.validate()? } }
11983		Ok(())
11984	}
11985}
11986
11987
11988// BrokeredDeal1Code ...
11989#[cfg_attr(feature = "derive_debug", derive(Debug))]
11990#[cfg_attr(feature = "derive_default", derive(Default))]
11991#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
11992#[cfg_attr(feature = "derive_clone", derive(Clone))]
11993#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
11994pub enum BrokeredDeal1Code {
11995	#[cfg_attr(feature = "derive_default", default)]
11996	#[cfg_attr( feature = "derive_serde", serde(rename = "BILA") )]
11997	CodeBILA,
11998	#[cfg_attr( feature = "derive_serde", serde(rename = "BROK") )]
11999	CodeBROK,
12000}
12001
12002impl BrokeredDeal1Code {
12003	pub fn validate(&self) -> Result<(), ValidationError> {
12004		Ok(())
12005	}
12006}
12007
12008
12009// BusinessApplicationHeader5 ...
12010#[cfg_attr(feature = "derive_debug", derive(Debug))]
12011#[cfg_attr(feature = "derive_default", derive(Default))]
12012#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12013#[cfg_attr(feature = "derive_clone", derive(Clone))]
12014#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12015pub struct BusinessApplicationHeader5 {
12016	#[cfg_attr( feature = "derive_serde", serde(rename = "CharSet", skip_serializing_if = "Option::is_none") )]
12017	pub char_set: Option<String>,
12018	#[cfg_attr( feature = "derive_serde", serde(rename = "Fr") )]
12019	pub fr: Party44Choice,
12020	#[cfg_attr( feature = "derive_serde", serde(rename = "To") )]
12021	pub to: Party44Choice,
12022	#[cfg_attr( feature = "derive_serde", serde(rename = "BizMsgIdr") )]
12023	pub biz_msg_idr: String,
12024	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgDefIdr") )]
12025	pub msg_def_idr: String,
12026	#[cfg_attr( feature = "derive_serde", serde(rename = "BizSvc", skip_serializing_if = "Option::is_none") )]
12027	pub biz_svc: Option<String>,
12028	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDt") )]
12029	pub cre_dt: String,
12030	#[cfg_attr( feature = "derive_serde", serde(rename = "CpyDplct", skip_serializing_if = "Option::is_none") )]
12031	pub cpy_dplct: Option<CopyDuplicate1Code>,
12032	#[cfg_attr( feature = "derive_serde", serde(rename = "PssblDplct", skip_serializing_if = "Option::is_none") )]
12033	pub pssbl_dplct: Option<bool>,
12034	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
12035	pub prty: Option<String>,
12036	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgntr", skip_serializing_if = "Option::is_none") )]
12037	pub sgntr: Option<SignatureEnvelope>,
12038}
12039
12040impl BusinessApplicationHeader5 {
12041	pub fn validate(&self) -> Result<(), ValidationError> {
12042		self.fr.validate()?;
12043		self.to.validate()?;
12044		if self.biz_msg_idr.chars().count() < 1 {
12045			return Err(ValidationError::new(1001, "biz_msg_idr is shorter than the minimum length of 1".to_string()));
12046		}
12047		if self.biz_msg_idr.chars().count() > 35 {
12048			return Err(ValidationError::new(1002, "biz_msg_idr exceeds the maximum length of 35".to_string()));
12049		}
12050		if self.msg_def_idr.chars().count() < 1 {
12051			return Err(ValidationError::new(1001, "msg_def_idr is shorter than the minimum length of 1".to_string()));
12052		}
12053		if self.msg_def_idr.chars().count() > 35 {
12054			return Err(ValidationError::new(1002, "msg_def_idr exceeds the maximum length of 35".to_string()));
12055		}
12056		if let Some(ref val) = self.biz_svc {
12057			if val.chars().count() < 1 {
12058				return Err(ValidationError::new(1001, "biz_svc is shorter than the minimum length of 1".to_string()));
12059			}
12060			if val.chars().count() > 35 {
12061				return Err(ValidationError::new(1002, "biz_svc exceeds the maximum length of 35".to_string()));
12062			}
12063		}
12064		if let Some(ref val) = self.cpy_dplct { val.validate()? }
12065		if let Some(ref val) = self.sgntr { val.validate()? }
12066		Ok(())
12067	}
12068}
12069
12070
12071// BusinessApplicationHeader8 ...
12072#[cfg_attr(feature = "derive_debug", derive(Debug))]
12073#[cfg_attr(feature = "derive_default", derive(Default))]
12074#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12075#[cfg_attr(feature = "derive_clone", derive(Clone))]
12076#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12077pub struct BusinessApplicationHeader8 {
12078	#[cfg_attr( feature = "derive_serde", serde(rename = "CharSet", skip_serializing_if = "Option::is_none") )]
12079	pub char_set: Option<String>,
12080	#[cfg_attr( feature = "derive_serde", serde(rename = "Fr") )]
12081	pub fr: Party51Choice,
12082	#[cfg_attr( feature = "derive_serde", serde(rename = "To") )]
12083	pub to: Party51Choice,
12084	#[cfg_attr( feature = "derive_serde", serde(rename = "BizMsgIdr") )]
12085	pub biz_msg_idr: String,
12086	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgDefIdr") )]
12087	pub msg_def_idr: String,
12088	#[cfg_attr( feature = "derive_serde", serde(rename = "BizSvc", skip_serializing_if = "Option::is_none") )]
12089	pub biz_svc: Option<String>,
12090	#[cfg_attr( feature = "derive_serde", serde(rename = "MktPrctc", skip_serializing_if = "Option::is_none") )]
12091	pub mkt_prctc: Option<ImplementationSpecification1>,
12092	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDt") )]
12093	pub cre_dt: String,
12094	#[cfg_attr( feature = "derive_serde", serde(rename = "BizPrcgDt", skip_serializing_if = "Option::is_none") )]
12095	pub biz_prcg_dt: Option<String>,
12096	#[cfg_attr( feature = "derive_serde", serde(rename = "CpyDplct", skip_serializing_if = "Option::is_none") )]
12097	pub cpy_dplct: Option<CopyDuplicate1Code>,
12098	#[cfg_attr( feature = "derive_serde", serde(rename = "PssblDplct", skip_serializing_if = "Option::is_none") )]
12099	pub pssbl_dplct: Option<bool>,
12100	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
12101	pub prty: Option<String>,
12102	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgntr", skip_serializing_if = "Option::is_none") )]
12103	pub sgntr: Option<SignatureEnvelope>,
12104}
12105
12106impl BusinessApplicationHeader8 {
12107	pub fn validate(&self) -> Result<(), ValidationError> {
12108		self.fr.validate()?;
12109		self.to.validate()?;
12110		if self.biz_msg_idr.chars().count() < 1 {
12111			return Err(ValidationError::new(1001, "biz_msg_idr is shorter than the minimum length of 1".to_string()));
12112		}
12113		if self.biz_msg_idr.chars().count() > 35 {
12114			return Err(ValidationError::new(1002, "biz_msg_idr exceeds the maximum length of 35".to_string()));
12115		}
12116		if self.msg_def_idr.chars().count() < 1 {
12117			return Err(ValidationError::new(1001, "msg_def_idr is shorter than the minimum length of 1".to_string()));
12118		}
12119		if self.msg_def_idr.chars().count() > 35 {
12120			return Err(ValidationError::new(1002, "msg_def_idr exceeds the maximum length of 35".to_string()));
12121		}
12122		if let Some(ref val) = self.biz_svc {
12123			if val.chars().count() < 1 {
12124				return Err(ValidationError::new(1001, "biz_svc is shorter than the minimum length of 1".to_string()));
12125			}
12126			if val.chars().count() > 35 {
12127				return Err(ValidationError::new(1002, "biz_svc exceeds the maximum length of 35".to_string()));
12128			}
12129		}
12130		if let Some(ref val) = self.mkt_prctc { val.validate()? }
12131		if let Some(ref val) = self.cpy_dplct { val.validate()? }
12132		if let Some(ref val) = self.sgntr { val.validate()? }
12133		Ok(())
12134	}
12135}
12136
12137
12138// BusinessApplicationHeaderV02 ...
12139#[cfg_attr(feature = "derive_debug", derive(Debug))]
12140#[cfg_attr(feature = "derive_default", derive(Default))]
12141#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12142#[cfg_attr(feature = "derive_clone", derive(Clone))]
12143#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12144pub struct BusinessApplicationHeaderV02 {
12145	#[cfg_attr( feature = "derive_serde", serde(rename = "CharSet", skip_serializing_if = "Option::is_none") )]
12146	pub char_set: Option<String>,
12147	#[cfg_attr( feature = "derive_serde", serde(rename = "Fr") )]
12148	pub fr: Party44Choice,
12149	#[cfg_attr( feature = "derive_serde", serde(rename = "To") )]
12150	pub to: Party44Choice,
12151	#[cfg_attr( feature = "derive_serde", serde(rename = "BizMsgIdr") )]
12152	pub biz_msg_idr: String,
12153	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgDefIdr") )]
12154	pub msg_def_idr: String,
12155	#[cfg_attr( feature = "derive_serde", serde(rename = "BizSvc", skip_serializing_if = "Option::is_none") )]
12156	pub biz_svc: Option<String>,
12157	#[cfg_attr( feature = "derive_serde", serde(rename = "MktPrctc", skip_serializing_if = "Option::is_none") )]
12158	pub mkt_prctc: Option<ImplementationSpecification1>,
12159	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDt") )]
12160	pub cre_dt: String,
12161	#[cfg_attr( feature = "derive_serde", serde(rename = "BizPrcgDt", skip_serializing_if = "Option::is_none") )]
12162	pub biz_prcg_dt: Option<String>,
12163	#[cfg_attr( feature = "derive_serde", serde(rename = "CpyDplct", skip_serializing_if = "Option::is_none") )]
12164	pub cpy_dplct: Option<CopyDuplicate1Code>,
12165	#[cfg_attr( feature = "derive_serde", serde(rename = "PssblDplct", skip_serializing_if = "Option::is_none") )]
12166	pub pssbl_dplct: Option<bool>,
12167	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
12168	pub prty: Option<String>,
12169	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgntr", skip_serializing_if = "Option::is_none") )]
12170	pub sgntr: Option<SignatureEnvelope>,
12171	#[cfg_attr( feature = "derive_serde", serde(rename = "Rltd", skip_serializing_if = "Option::is_none") )]
12172	pub rltd: Option<Vec<BusinessApplicationHeader5>>,
12173}
12174
12175impl BusinessApplicationHeaderV02 {
12176	pub fn validate(&self) -> Result<(), ValidationError> {
12177		self.fr.validate()?;
12178		self.to.validate()?;
12179		if self.biz_msg_idr.chars().count() < 1 {
12180			return Err(ValidationError::new(1001, "biz_msg_idr is shorter than the minimum length of 1".to_string()));
12181		}
12182		if self.biz_msg_idr.chars().count() > 35 {
12183			return Err(ValidationError::new(1002, "biz_msg_idr exceeds the maximum length of 35".to_string()));
12184		}
12185		if self.msg_def_idr.chars().count() < 1 {
12186			return Err(ValidationError::new(1001, "msg_def_idr is shorter than the minimum length of 1".to_string()));
12187		}
12188		if self.msg_def_idr.chars().count() > 35 {
12189			return Err(ValidationError::new(1002, "msg_def_idr exceeds the maximum length of 35".to_string()));
12190		}
12191		if let Some(ref val) = self.biz_svc {
12192			if val.chars().count() < 1 {
12193				return Err(ValidationError::new(1001, "biz_svc is shorter than the minimum length of 1".to_string()));
12194			}
12195			if val.chars().count() > 35 {
12196				return Err(ValidationError::new(1002, "biz_svc exceeds the maximum length of 35".to_string()));
12197			}
12198		}
12199		if let Some(ref val) = self.mkt_prctc { val.validate()? }
12200		if let Some(ref val) = self.cpy_dplct { val.validate()? }
12201		if let Some(ref val) = self.sgntr { val.validate()? }
12202		if let Some(ref vec) = self.rltd { for item in vec { item.validate()? } }
12203		Ok(())
12204	}
12205}
12206
12207
12208// BusinessApplicationHeaderV04 ...
12209#[cfg_attr(feature = "derive_debug", derive(Debug))]
12210#[cfg_attr(feature = "derive_default", derive(Default))]
12211#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12212#[cfg_attr(feature = "derive_clone", derive(Clone))]
12213#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12214pub struct BusinessApplicationHeaderV04 {
12215	#[cfg_attr( feature = "derive_serde", serde(rename = "CharSet", skip_serializing_if = "Option::is_none") )]
12216	pub char_set: Option<String>,
12217	#[cfg_attr( feature = "derive_serde", serde(rename = "Fr") )]
12218	pub fr: Party51Choice,
12219	#[cfg_attr( feature = "derive_serde", serde(rename = "To") )]
12220	pub to: Party51Choice,
12221	#[cfg_attr( feature = "derive_serde", serde(rename = "BizMsgIdr") )]
12222	pub biz_msg_idr: String,
12223	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgDefIdr") )]
12224	pub msg_def_idr: String,
12225	#[cfg_attr( feature = "derive_serde", serde(rename = "BizSvc", skip_serializing_if = "Option::is_none") )]
12226	pub biz_svc: Option<String>,
12227	#[cfg_attr( feature = "derive_serde", serde(rename = "MktPrctc", skip_serializing_if = "Option::is_none") )]
12228	pub mkt_prctc: Option<ImplementationSpecification1>,
12229	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDt") )]
12230	pub cre_dt: String,
12231	#[cfg_attr( feature = "derive_serde", serde(rename = "BizPrcgDt", skip_serializing_if = "Option::is_none") )]
12232	pub biz_prcg_dt: Option<String>,
12233	#[cfg_attr( feature = "derive_serde", serde(rename = "CpyDplct", skip_serializing_if = "Option::is_none") )]
12234	pub cpy_dplct: Option<CopyDuplicate1Code>,
12235	#[cfg_attr( feature = "derive_serde", serde(rename = "PssblDplct", skip_serializing_if = "Option::is_none") )]
12236	pub pssbl_dplct: Option<bool>,
12237	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
12238	pub prty: Option<String>,
12239	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgntr", skip_serializing_if = "Option::is_none") )]
12240	pub sgntr: Option<SignatureEnvelope>,
12241	#[cfg_attr( feature = "derive_serde", serde(rename = "Rltd", skip_serializing_if = "Option::is_none") )]
12242	pub rltd: Option<Vec<BusinessApplicationHeader8>>,
12243}
12244
12245impl BusinessApplicationHeaderV04 {
12246	pub fn validate(&self) -> Result<(), ValidationError> {
12247		self.fr.validate()?;
12248		self.to.validate()?;
12249		if self.biz_msg_idr.chars().count() < 1 {
12250			return Err(ValidationError::new(1001, "biz_msg_idr is shorter than the minimum length of 1".to_string()));
12251		}
12252		if self.biz_msg_idr.chars().count() > 35 {
12253			return Err(ValidationError::new(1002, "biz_msg_idr exceeds the maximum length of 35".to_string()));
12254		}
12255		if self.msg_def_idr.chars().count() < 1 {
12256			return Err(ValidationError::new(1001, "msg_def_idr is shorter than the minimum length of 1".to_string()));
12257		}
12258		if self.msg_def_idr.chars().count() > 35 {
12259			return Err(ValidationError::new(1002, "msg_def_idr exceeds the maximum length of 35".to_string()));
12260		}
12261		if let Some(ref val) = self.biz_svc {
12262			if val.chars().count() < 1 {
12263				return Err(ValidationError::new(1001, "biz_svc is shorter than the minimum length of 1".to_string()));
12264			}
12265			if val.chars().count() > 35 {
12266				return Err(ValidationError::new(1002, "biz_svc exceeds the maximum length of 35".to_string()));
12267			}
12268		}
12269		if let Some(ref val) = self.mkt_prctc { val.validate()? }
12270		if let Some(ref val) = self.cpy_dplct { val.validate()? }
12271		if let Some(ref val) = self.sgntr { val.validate()? }
12272		if let Some(ref vec) = self.rltd { for item in vec { item.validate()? } }
12273		Ok(())
12274	}
12275}
12276
12277
12278// BusinessDay8 ...
12279#[cfg_attr(feature = "derive_debug", derive(Debug))]
12280#[cfg_attr(feature = "derive_default", derive(Default))]
12281#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12282#[cfg_attr(feature = "derive_clone", derive(Clone))]
12283#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12284pub struct BusinessDay8 {
12285	#[cfg_attr( feature = "derive_serde", serde(rename = "SysId") )]
12286	pub sys_id: Vec<SystemIdentification2Choice>,
12287	#[cfg_attr( feature = "derive_serde", serde(rename = "BizDayOrErr") )]
12288	pub biz_day_or_err: BusinessDayReportOrError10Choice,
12289}
12290
12291impl BusinessDay8 {
12292	pub fn validate(&self) -> Result<(), ValidationError> {
12293		for item in &self.sys_id { item.validate()? }
12294		self.biz_day_or_err.validate()?;
12295		Ok(())
12296	}
12297}
12298
12299
12300// BusinessDay9 ...
12301#[cfg_attr(feature = "derive_debug", derive(Debug))]
12302#[cfg_attr(feature = "derive_default", derive(Default))]
12303#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12304#[cfg_attr(feature = "derive_clone", derive(Clone))]
12305#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12306pub struct BusinessDay9 {
12307	#[cfg_attr( feature = "derive_serde", serde(rename = "SysDt", skip_serializing_if = "Option::is_none") )]
12308	pub sys_dt: Option<DateAndDateTime2Choice>,
12309	#[cfg_attr( feature = "derive_serde", serde(rename = "SysSts", skip_serializing_if = "Option::is_none") )]
12310	pub sys_sts: Option<SystemStatus3>,
12311	#[cfg_attr( feature = "derive_serde", serde(rename = "SysInfPerCcy", skip_serializing_if = "Option::is_none") )]
12312	pub sys_inf_per_ccy: Option<Vec<SystemAvailabilityAndEvents3>>,
12313}
12314
12315impl BusinessDay9 {
12316	pub fn validate(&self) -> Result<(), ValidationError> {
12317		if let Some(ref val) = self.sys_dt { val.validate()? }
12318		if let Some(ref val) = self.sys_sts { val.validate()? }
12319		if let Some(ref vec) = self.sys_inf_per_ccy { for item in vec { item.validate()? } }
12320		Ok(())
12321	}
12322}
12323
12324
12325// BusinessDayConvention1Code ...
12326#[cfg_attr(feature = "derive_debug", derive(Debug))]
12327#[cfg_attr(feature = "derive_default", derive(Default))]
12328#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12329#[cfg_attr(feature = "derive_clone", derive(Clone))]
12330#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12331pub enum BusinessDayConvention1Code {
12332	#[cfg_attr(feature = "derive_default", default)]
12333	#[cfg_attr( feature = "derive_serde", serde(rename = "FWNG") )]
12334	CodeFWNG,
12335	#[cfg_attr( feature = "derive_serde", serde(rename = "PREC") )]
12336	CodePREC,
12337}
12338
12339impl BusinessDayConvention1Code {
12340	pub fn validate(&self) -> Result<(), ValidationError> {
12341		Ok(())
12342	}
12343}
12344
12345
12346// BusinessDayCriteria2 ...
12347#[cfg_attr(feature = "derive_debug", derive(Debug))]
12348#[cfg_attr(feature = "derive_default", derive(Default))]
12349#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12350#[cfg_attr(feature = "derive_clone", derive(Clone))]
12351#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12352pub struct BusinessDayCriteria2 {
12353	#[cfg_attr( feature = "derive_serde", serde(rename = "NewQryNm", skip_serializing_if = "Option::is_none") )]
12354	pub new_qry_nm: Option<String>,
12355	#[cfg_attr( feature = "derive_serde", serde(rename = "SchCrit", skip_serializing_if = "Option::is_none") )]
12356	pub sch_crit: Option<Vec<BusinessDaySearchCriteria2>>,
12357	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrCrit", skip_serializing_if = "Option::is_none") )]
12358	pub rtr_crit: Option<BusinessDayReturnCriteria2>,
12359}
12360
12361impl BusinessDayCriteria2 {
12362	pub fn validate(&self) -> Result<(), ValidationError> {
12363		if let Some(ref val) = self.new_qry_nm {
12364			if val.chars().count() < 1 {
12365				return Err(ValidationError::new(1001, "new_qry_nm is shorter than the minimum length of 1".to_string()));
12366			}
12367			if val.chars().count() > 35 {
12368				return Err(ValidationError::new(1002, "new_qry_nm exceeds the maximum length of 35".to_string()));
12369			}
12370		}
12371		if let Some(ref vec) = self.sch_crit { for item in vec { item.validate()? } }
12372		if let Some(ref val) = self.rtr_crit { val.validate()? }
12373		Ok(())
12374	}
12375}
12376
12377
12378// BusinessDayCriteria3Choice ...
12379#[cfg_attr(feature = "derive_debug", derive(Debug))]
12380#[cfg_attr(feature = "derive_default", derive(Default))]
12381#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12382#[cfg_attr(feature = "derive_clone", derive(Clone))]
12383#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12384pub struct BusinessDayCriteria3Choice {
12385	#[cfg_attr( feature = "derive_serde", serde(rename = "QryNm", skip_serializing_if = "Option::is_none") )]
12386	pub qry_nm: Option<String>,
12387	#[cfg_attr( feature = "derive_serde", serde(rename = "NewCrit", skip_serializing_if = "Option::is_none") )]
12388	pub new_crit: Option<BusinessDayCriteria2>,
12389}
12390
12391impl BusinessDayCriteria3Choice {
12392	pub fn validate(&self) -> Result<(), ValidationError> {
12393		if let Some(ref val) = self.qry_nm {
12394			if val.chars().count() < 1 {
12395				return Err(ValidationError::new(1001, "qry_nm is shorter than the minimum length of 1".to_string()));
12396			}
12397			if val.chars().count() > 35 {
12398				return Err(ValidationError::new(1002, "qry_nm exceeds the maximum length of 35".to_string()));
12399			}
12400		}
12401		if let Some(ref val) = self.new_crit { val.validate()? }
12402		Ok(())
12403	}
12404}
12405
12406
12407// BusinessDayQuery2 ...
12408#[cfg_attr(feature = "derive_debug", derive(Debug))]
12409#[cfg_attr(feature = "derive_default", derive(Default))]
12410#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12411#[cfg_attr(feature = "derive_clone", derive(Clone))]
12412#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12413pub struct BusinessDayQuery2 {
12414	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp", skip_serializing_if = "Option::is_none") )]
12415	pub qry_tp: Option<QueryType2Code>,
12416	#[cfg_attr( feature = "derive_serde", serde(rename = "Crit", skip_serializing_if = "Option::is_none") )]
12417	pub crit: Option<BusinessDayCriteria3Choice>,
12418}
12419
12420impl BusinessDayQuery2 {
12421	pub fn validate(&self) -> Result<(), ValidationError> {
12422		if let Some(ref val) = self.qry_tp { val.validate()? }
12423		if let Some(ref val) = self.crit { val.validate()? }
12424		Ok(())
12425	}
12426}
12427
12428
12429// BusinessDayReportOrError10Choice ...
12430#[cfg_attr(feature = "derive_debug", derive(Debug))]
12431#[cfg_attr(feature = "derive_default", derive(Default))]
12432#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12433#[cfg_attr(feature = "derive_clone", derive(Clone))]
12434#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12435pub struct BusinessDayReportOrError10Choice {
12436	#[cfg_attr( feature = "derive_serde", serde(rename = "BizDayInf", skip_serializing_if = "Option::is_none") )]
12437	pub biz_day_inf: Option<BusinessDay9>,
12438	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
12439	pub biz_err: Option<Vec<ErrorHandling5>>,
12440}
12441
12442impl BusinessDayReportOrError10Choice {
12443	pub fn validate(&self) -> Result<(), ValidationError> {
12444		if let Some(ref val) = self.biz_day_inf { val.validate()? }
12445		if let Some(ref vec) = self.biz_err { for item in vec { item.validate()? } }
12446		Ok(())
12447	}
12448}
12449
12450
12451// BusinessDayReportOrError9Choice ...
12452#[cfg_attr(feature = "derive_debug", derive(Debug))]
12453#[cfg_attr(feature = "derive_default", derive(Default))]
12454#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12455#[cfg_attr(feature = "derive_clone", derive(Clone))]
12456#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12457pub struct BusinessDayReportOrError9Choice {
12458	#[cfg_attr( feature = "derive_serde", serde(rename = "BizRpt", skip_serializing_if = "Option::is_none") )]
12459	pub biz_rpt: Option<Vec<BusinessDay8>>,
12460	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
12461	pub oprl_err: Option<Vec<ErrorHandling5>>,
12462}
12463
12464impl BusinessDayReportOrError9Choice {
12465	pub fn validate(&self) -> Result<(), ValidationError> {
12466		if let Some(ref vec) = self.biz_rpt { for item in vec { item.validate()? } }
12467		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
12468		Ok(())
12469	}
12470}
12471
12472
12473// BusinessDayReturnCriteria2 ...
12474#[cfg_attr(feature = "derive_debug", derive(Debug))]
12475#[cfg_attr(feature = "derive_default", derive(Default))]
12476#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12477#[cfg_attr(feature = "derive_clone", derive(Clone))]
12478#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12479pub struct BusinessDayReturnCriteria2 {
12480	#[cfg_attr( feature = "derive_serde", serde(rename = "SysDtInd", skip_serializing_if = "Option::is_none") )]
12481	pub sys_dt_ind: Option<bool>,
12482	#[cfg_attr( feature = "derive_serde", serde(rename = "SysStsInd", skip_serializing_if = "Option::is_none") )]
12483	pub sys_sts_ind: Option<bool>,
12484	#[cfg_attr( feature = "derive_serde", serde(rename = "SysCcyInd", skip_serializing_if = "Option::is_none") )]
12485	pub sys_ccy_ind: Option<bool>,
12486	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsrPrdInd", skip_serializing_if = "Option::is_none") )]
12487	pub clsr_prd_ind: Option<bool>,
12488	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtInd", skip_serializing_if = "Option::is_none") )]
12489	pub evt_ind: Option<bool>,
12490	#[cfg_attr( feature = "derive_serde", serde(rename = "SsnPrdInd", skip_serializing_if = "Option::is_none") )]
12491	pub ssn_prd_ind: Option<bool>,
12492	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtTpInd", skip_serializing_if = "Option::is_none") )]
12493	pub evt_tp_ind: Option<bool>,
12494}
12495
12496impl BusinessDayReturnCriteria2 {
12497	pub fn validate(&self) -> Result<(), ValidationError> {
12498		Ok(())
12499	}
12500}
12501
12502
12503// BusinessDaySearchCriteria2 ...
12504#[cfg_attr(feature = "derive_debug", derive(Debug))]
12505#[cfg_attr(feature = "derive_default", derive(Default))]
12506#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12507#[cfg_attr(feature = "derive_clone", derive(Clone))]
12508#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12509pub struct BusinessDaySearchCriteria2 {
12510	#[cfg_attr( feature = "derive_serde", serde(rename = "SysDt", skip_serializing_if = "Option::is_none") )]
12511	pub sys_dt: Option<String>,
12512	#[cfg_attr( feature = "derive_serde", serde(rename = "SysId", skip_serializing_if = "Option::is_none") )]
12513	pub sys_id: Option<Vec<SystemIdentification2Choice>>,
12514	#[cfg_attr( feature = "derive_serde", serde(rename = "SysCcy", skip_serializing_if = "Option::is_none") )]
12515	pub sys_ccy: Option<Vec<String>>,
12516	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtTp", skip_serializing_if = "Option::is_none") )]
12517	pub evt_tp: Option<SystemEventType2Choice>,
12518	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsrPrd", skip_serializing_if = "Option::is_none") )]
12519	pub clsr_prd: Option<DateTimePeriod1Choice>,
12520}
12521
12522impl BusinessDaySearchCriteria2 {
12523	pub fn validate(&self) -> Result<(), ValidationError> {
12524		if let Some(ref vec) = self.sys_id { for item in vec { item.validate()? } }
12525		if let Some(ref vec) = self.sys_ccy {
12526			for item in vec {
12527				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
12528				if !pattern.is_match(&item) {
12529					return Err(ValidationError::new(1005, "sys_ccy does not match the required pattern".to_string()));
12530				}
12531			}
12532		}
12533		if let Some(ref val) = self.evt_tp { val.validate()? }
12534		if let Some(ref val) = self.clsr_prd { val.validate()? }
12535		Ok(())
12536	}
12537}
12538
12539
12540// BusinessError4 ...
12541#[cfg_attr(feature = "derive_debug", derive(Debug))]
12542#[cfg_attr(feature = "derive_default", derive(Default))]
12543#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12544#[cfg_attr(feature = "derive_clone", derive(Clone))]
12545#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12546pub struct BusinessError4 {
12547	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId") )]
12548	pub fin_instrm_id: SecurityIdentification39,
12549	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr") )]
12550	pub biz_err: Vec<ErrorHandling5>,
12551}
12552
12553impl BusinessError4 {
12554	pub fn validate(&self) -> Result<(), ValidationError> {
12555		self.fin_instrm_id.validate()?;
12556		for item in &self.biz_err { item.validate()? }
12557		Ok(())
12558	}
12559}
12560
12561
12562// BusinessFileHeaderV01 ...
12563#[cfg_attr(feature = "derive_debug", derive(Debug))]
12564#[cfg_attr(feature = "derive_default", derive(Default))]
12565#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12566#[cfg_attr(feature = "derive_clone", derive(Clone))]
12567#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12568pub struct BusinessFileHeaderV01 {
12569	#[cfg_attr( feature = "derive_serde", serde(rename = "PyldDesc") )]
12570	pub pyld_desc: PayloadDescription2,
12571	#[cfg_attr( feature = "derive_serde", serde(rename = "Pyld", skip_serializing_if = "Option::is_none") )]
12572	pub pyld: Option<Vec<LaxPayload>>,
12573}
12574
12575impl BusinessFileHeaderV01 {
12576	pub fn validate(&self) -> Result<(), ValidationError> {
12577		self.pyld_desc.validate()?;
12578		if let Some(ref vec) = self.pyld { for item in vec { item.validate()? } }
12579		Ok(())
12580	}
12581}
12582
12583
12584// BusinessInformationCriteria1 ...
12585#[cfg_attr(feature = "derive_debug", derive(Debug))]
12586#[cfg_attr(feature = "derive_default", derive(Default))]
12587#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12588#[cfg_attr(feature = "derive_clone", derive(Clone))]
12589#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12590pub struct BusinessInformationCriteria1 {
12591	#[cfg_attr( feature = "derive_serde", serde(rename = "NewQryNm", skip_serializing_if = "Option::is_none") )]
12592	pub new_qry_nm: Option<String>,
12593	#[cfg_attr( feature = "derive_serde", serde(rename = "SchCrit", skip_serializing_if = "Option::is_none") )]
12594	pub sch_crit: Option<Vec<GeneralBusinessInformationSearchCriteria1>>,
12595	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrCrit", skip_serializing_if = "Option::is_none") )]
12596	pub rtr_crit: Option<GeneralBusinessInformationReturnCriteria1>,
12597}
12598
12599impl BusinessInformationCriteria1 {
12600	pub fn validate(&self) -> Result<(), ValidationError> {
12601		if let Some(ref val) = self.new_qry_nm {
12602			if val.chars().count() < 1 {
12603				return Err(ValidationError::new(1001, "new_qry_nm is shorter than the minimum length of 1".to_string()));
12604			}
12605			if val.chars().count() > 35 {
12606				return Err(ValidationError::new(1002, "new_qry_nm exceeds the maximum length of 35".to_string()));
12607			}
12608		}
12609		if let Some(ref vec) = self.sch_crit { for item in vec { item.validate()? } }
12610		if let Some(ref val) = self.rtr_crit { val.validate()? }
12611		Ok(())
12612	}
12613}
12614
12615
12616// BusinessInformationQueryDefinition3 ...
12617#[cfg_attr(feature = "derive_debug", derive(Debug))]
12618#[cfg_attr(feature = "derive_default", derive(Default))]
12619#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12620#[cfg_attr(feature = "derive_clone", derive(Clone))]
12621#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12622pub struct BusinessInformationQueryDefinition3 {
12623	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp", skip_serializing_if = "Option::is_none") )]
12624	pub qry_tp: Option<QueryType2Code>,
12625	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlBizInfCrit", skip_serializing_if = "Option::is_none") )]
12626	pub gnl_biz_inf_crit: Option<GeneralBusinessInformationCriteriaDefinition1Choice>,
12627}
12628
12629impl BusinessInformationQueryDefinition3 {
12630	pub fn validate(&self) -> Result<(), ValidationError> {
12631		if let Some(ref val) = self.qry_tp { val.validate()? }
12632		if let Some(ref val) = self.gnl_biz_inf_crit { val.validate()? }
12633		Ok(())
12634	}
12635}
12636
12637
12638// CRSForm1Choice ...
12639#[cfg_attr(feature = "derive_debug", derive(Debug))]
12640#[cfg_attr(feature = "derive_default", derive(Default))]
12641#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12642#[cfg_attr(feature = "derive_clone", derive(Clone))]
12643#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12644pub struct CRSForm1Choice {
12645	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
12646	pub cd: Option<CRSFormType1Code>,
12647	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
12648	pub prtry: Option<GenericIdentification47>,
12649}
12650
12651impl CRSForm1Choice {
12652	pub fn validate(&self) -> Result<(), ValidationError> {
12653		if let Some(ref val) = self.cd { val.validate()? }
12654		if let Some(ref val) = self.prtry { val.validate()? }
12655		Ok(())
12656	}
12657}
12658
12659
12660// CRSFormType1Code ...
12661#[cfg_attr(feature = "derive_debug", derive(Debug))]
12662#[cfg_attr(feature = "derive_default", derive(Default))]
12663#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12664#[cfg_attr(feature = "derive_clone", derive(Clone))]
12665#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12666pub enum CRSFormType1Code {
12667	#[cfg_attr(feature = "derive_default", default)]
12668	#[cfg_attr( feature = "derive_serde", serde(rename = "CER4") )]
12669	CodeCER4,
12670	#[cfg_attr( feature = "derive_serde", serde(rename = "CER3") )]
12671	CodeCER3,
12672	#[cfg_attr( feature = "derive_serde", serde(rename = "CER5") )]
12673	CodeCER5,
12674	#[cfg_attr( feature = "derive_serde", serde(rename = "CER6") )]
12675	CodeCER6,
12676	#[cfg_attr( feature = "derive_serde", serde(rename = "CER8") )]
12677	CodeCER8,
12678	#[cfg_attr( feature = "derive_serde", serde(rename = "CER1") )]
12679	CodeCER1,
12680	#[cfg_attr( feature = "derive_serde", serde(rename = "CER2") )]
12681	CodeCER2,
12682	#[cfg_attr( feature = "derive_serde", serde(rename = "CER7") )]
12683	CodeCER7,
12684}
12685
12686impl CRSFormType1Code {
12687	pub fn validate(&self) -> Result<(), ValidationError> {
12688		Ok(())
12689	}
12690}
12691
12692
12693// CRSSource1Choice ...
12694#[cfg_attr(feature = "derive_debug", derive(Debug))]
12695#[cfg_attr(feature = "derive_default", derive(Default))]
12696#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12697#[cfg_attr(feature = "derive_clone", derive(Clone))]
12698#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12699pub struct CRSSource1Choice {
12700	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
12701	pub cd: Option<CRSSourceStatus1Code>,
12702	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
12703	pub prtry: Option<GenericIdentification47>,
12704}
12705
12706impl CRSSource1Choice {
12707	pub fn validate(&self) -> Result<(), ValidationError> {
12708		if let Some(ref val) = self.cd { val.validate()? }
12709		if let Some(ref val) = self.prtry { val.validate()? }
12710		Ok(())
12711	}
12712}
12713
12714
12715// CRSSourceStatus1Code ...
12716#[cfg_attr(feature = "derive_debug", derive(Debug))]
12717#[cfg_attr(feature = "derive_default", derive(Default))]
12718#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12719#[cfg_attr(feature = "derive_clone", derive(Clone))]
12720#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12721pub enum CRSSourceStatus1Code {
12722	#[cfg_attr(feature = "derive_default", default)]
12723	#[cfg_attr( feature = "derive_serde", serde(rename = "CALC") )]
12724	CodeCALC,
12725	#[cfg_attr( feature = "derive_serde", serde(rename = "DECL") )]
12726	CodeDECL,
12727}
12728
12729impl CRSSourceStatus1Code {
12730	pub fn validate(&self) -> Result<(), ValidationError> {
12731		Ok(())
12732	}
12733}
12734
12735
12736// CRSStatus1Code ...
12737#[cfg_attr(feature = "derive_debug", derive(Debug))]
12738#[cfg_attr(feature = "derive_default", derive(Default))]
12739#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12740#[cfg_attr(feature = "derive_clone", derive(Clone))]
12741#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12742pub enum CRSStatus1Code {
12743	#[cfg_attr(feature = "derive_default", default)]
12744	#[cfg_attr( feature = "derive_serde", serde(rename = "C101") )]
12745	CodeC101,
12746	#[cfg_attr( feature = "derive_serde", serde(rename = "C102") )]
12747	CodeC102,
12748	#[cfg_attr( feature = "derive_serde", serde(rename = "C103") )]
12749	CodeC103,
12750	#[cfg_attr( feature = "derive_serde", serde(rename = "C104") )]
12751	CodeC104,
12752	#[cfg_attr( feature = "derive_serde", serde(rename = "C105") )]
12753	CodeC105,
12754	#[cfg_attr( feature = "derive_serde", serde(rename = "C106") )]
12755	CodeC106,
12756	#[cfg_attr( feature = "derive_serde", serde(rename = "C107") )]
12757	CodeC107,
12758	#[cfg_attr( feature = "derive_serde", serde(rename = "C108") )]
12759	CodeC108,
12760	#[cfg_attr( feature = "derive_serde", serde(rename = "C109") )]
12761	CodeC109,
12762	#[cfg_attr( feature = "derive_serde", serde(rename = "C110") )]
12763	CodeC110,
12764	#[cfg_attr( feature = "derive_serde", serde(rename = "C111") )]
12765	CodeC111,
12766	#[cfg_attr( feature = "derive_serde", serde(rename = "C112") )]
12767	CodeC112,
12768	#[cfg_attr( feature = "derive_serde", serde(rename = "C113") )]
12769	CodeC113,
12770	#[cfg_attr( feature = "derive_serde", serde(rename = "C114") )]
12771	CodeC114,
12772}
12773
12774impl CRSStatus1Code {
12775	pub fn validate(&self) -> Result<(), ValidationError> {
12776		Ok(())
12777	}
12778}
12779
12780
12781// CRSStatus3Choice ...
12782#[cfg_attr(feature = "derive_debug", derive(Debug))]
12783#[cfg_attr(feature = "derive_default", derive(Default))]
12784#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12785#[cfg_attr(feature = "derive_clone", derive(Clone))]
12786#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12787pub struct CRSStatus3Choice {
12788	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
12789	pub cd: Option<CRSStatus1Code>,
12790	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
12791	pub prtry: Option<GenericIdentification47>,
12792}
12793
12794impl CRSStatus3Choice {
12795	pub fn validate(&self) -> Result<(), ValidationError> {
12796		if let Some(ref val) = self.cd { val.validate()? }
12797		if let Some(ref val) = self.prtry { val.validate()? }
12798		Ok(())
12799	}
12800}
12801
12802
12803// CRSStatus4 ...
12804#[cfg_attr(feature = "derive_debug", derive(Debug))]
12805#[cfg_attr(feature = "derive_default", derive(Default))]
12806#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12807#[cfg_attr(feature = "derive_clone", derive(Clone))]
12808#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12809pub struct CRSStatus4 {
12810	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
12811	pub tp: CRSStatus3Choice,
12812	#[cfg_attr( feature = "derive_serde", serde(rename = "Src", skip_serializing_if = "Option::is_none") )]
12813	pub src: Option<CRSSource1Choice>,
12814	#[cfg_attr( feature = "derive_serde", serde(rename = "XcptnlRptgCtry", skip_serializing_if = "Option::is_none") )]
12815	pub xcptnl_rptg_ctry: Option<String>,
12816}
12817
12818impl CRSStatus4 {
12819	pub fn validate(&self) -> Result<(), ValidationError> {
12820		self.tp.validate()?;
12821		if let Some(ref val) = self.src { val.validate()? }
12822		if let Some(ref val) = self.xcptnl_rptg_ctry {
12823			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
12824			if !pattern.is_match(val) {
12825				return Err(ValidationError::new(1005, "xcptnl_rptg_ctry does not match the required pattern".to_string()));
12826			}
12827		}
12828		Ok(())
12829	}
12830}
12831
12832
12833// CSCManagement1Code ...
12834#[cfg_attr(feature = "derive_debug", derive(Debug))]
12835#[cfg_attr(feature = "derive_default", derive(Default))]
12836#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12837#[cfg_attr(feature = "derive_clone", derive(Clone))]
12838#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12839pub enum CSCManagement1Code {
12840	#[cfg_attr(feature = "derive_default", default)]
12841	#[cfg_attr( feature = "derive_serde", serde(rename = "PRST") )]
12842	CodePRST,
12843	#[cfg_attr( feature = "derive_serde", serde(rename = "BYPS") )]
12844	CodeBYPS,
12845	#[cfg_attr( feature = "derive_serde", serde(rename = "UNRD") )]
12846	CodeUNRD,
12847	#[cfg_attr( feature = "derive_serde", serde(rename = "NCSC") )]
12848	CodeNCSC,
12849}
12850
12851impl CSCManagement1Code {
12852	pub fn validate(&self) -> Result<(), ValidationError> {
12853		Ok(())
12854	}
12855}
12856
12857
12858// CalculationBasis2Code ...
12859#[cfg_attr(feature = "derive_debug", derive(Debug))]
12860#[cfg_attr(feature = "derive_default", derive(Default))]
12861#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12862#[cfg_attr(feature = "derive_clone", derive(Clone))]
12863#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12864pub enum CalculationBasis2Code {
12865	#[cfg_attr(feature = "derive_default", default)]
12866	#[cfg_attr( feature = "derive_serde", serde(rename = "AVER") )]
12867	CodeAVER,
12868	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
12869	CodeDAIL,
12870	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
12871	CodeMNTH,
12872	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
12873	CodeYEAR,
12874}
12875
12876impl CalculationBasis2Code {
12877	pub fn validate(&self) -> Result<(), ValidationError> {
12878		Ok(())
12879	}
12880}
12881
12882
12883// CalculationType1Code ...
12884#[cfg_attr(feature = "derive_debug", derive(Debug))]
12885#[cfg_attr(feature = "derive_default", derive(Default))]
12886#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12887#[cfg_attr(feature = "derive_clone", derive(Clone))]
12888#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12889pub enum CalculationType1Code {
12890	#[cfg_attr(feature = "derive_default", default)]
12891	#[cfg_attr( feature = "derive_serde", serde(rename = "AFTX") )]
12892	CodeAFTX,
12893	#[cfg_attr( feature = "derive_serde", serde(rename = "ANNU") )]
12894	CodeANNU,
12895	#[cfg_attr( feature = "derive_serde", serde(rename = "ISSU") )]
12896	CodeISSU,
12897	#[cfg_attr( feature = "derive_serde", serde(rename = "AVMA") )]
12898	CodeAVMA,
12899	#[cfg_attr( feature = "derive_serde", serde(rename = "BOOK") )]
12900	CodeBOOK,
12901	#[cfg_attr( feature = "derive_serde", serde(rename = "YTNC") )]
12902	CodeYTNC,
12903	#[cfg_attr( feature = "derive_serde", serde(rename = "CHCL") )]
12904	CodeCHCL,
12905	#[cfg_attr( feature = "derive_serde", serde(rename = "CLOS") )]
12906	CodeCLOS,
12907	#[cfg_attr( feature = "derive_serde", serde(rename = "CMPD") )]
12908	CodeCMPD,
12909	#[cfg_attr( feature = "derive_serde", serde(rename = "CUYI") )]
12910	CodeCUYI,
12911	#[cfg_attr( feature = "derive_serde", serde(rename = "TRGR") )]
12912	CodeTRGR,
12913	#[cfg_attr( feature = "derive_serde", serde(rename = "GVEQ") )]
12914	CodeGVEQ,
12915	#[cfg_attr( feature = "derive_serde", serde(rename = "FLAS") )]
12916	CodeFLAS,
12917	#[cfg_attr( feature = "derive_serde", serde(rename = "NVFL") )]
12918	CodeNVFL,
12919	#[cfg_attr( feature = "derive_serde", serde(rename = "LSCL") )]
12920	CodeLSCL,
12921	#[cfg_attr( feature = "derive_serde", serde(rename = "LSMT") )]
12922	CodeLSMT,
12923	#[cfg_attr( feature = "derive_serde", serde(rename = "LSQR") )]
12924	CodeLSQR,
12925	#[cfg_attr( feature = "derive_serde", serde(rename = "LSYR") )]
12926	CodeLSYR,
12927	#[cfg_attr( feature = "derive_serde", serde(rename = "LGAL") )]
12928	CodeLGAL,
12929	#[cfg_attr( feature = "derive_serde", serde(rename = "MARK") )]
12930	CodeMARK,
12931	#[cfg_attr( feature = "derive_serde", serde(rename = "YTMA") )]
12932	CodeYTMA,
12933	#[cfg_attr( feature = "derive_serde", serde(rename = "NXRF") )]
12934	CodeNXRF,
12935	#[cfg_attr( feature = "derive_serde", serde(rename = "PNAV") )]
12936	CodePNAV,
12937	#[cfg_attr( feature = "derive_serde", serde(rename = "NXPT") )]
12938	CodeNXPT,
12939	#[cfg_attr( feature = "derive_serde", serde(rename = "PRCL") )]
12940	CodePRCL,
12941	#[cfg_attr( feature = "derive_serde", serde(rename = "PRYL") )]
12942	CodePRYL,
12943	#[cfg_attr( feature = "derive_serde", serde(rename = "SEMI") )]
12944	CodeSEMI,
12945	#[cfg_attr( feature = "derive_serde", serde(rename = "SHLF") )]
12946	CodeSHLF,
12947	#[cfg_attr( feature = "derive_serde", serde(rename = "SPLL") )]
12948	CodeSPLL,
12949	#[cfg_attr( feature = "derive_serde", serde(rename = "TXQV") )]
12950	CodeTXQV,
12951	#[cfg_attr( feature = "derive_serde", serde(rename = "TTDT") )]
12952	CodeTTDT,
12953	#[cfg_attr( feature = "derive_serde", serde(rename = "TRYL") )]
12954	CodeTRYL,
12955	#[cfg_attr( feature = "derive_serde", serde(rename = "WRST") )]
12956	CodeWRST,
12957}
12958
12959impl CalculationType1Code {
12960	pub fn validate(&self) -> Result<(), ValidationError> {
12961		Ok(())
12962	}
12963}
12964
12965
12966// CalculationType3Choice ...
12967#[cfg_attr(feature = "derive_debug", derive(Debug))]
12968#[cfg_attr(feature = "derive_default", derive(Default))]
12969#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12970#[cfg_attr(feature = "derive_clone", derive(Clone))]
12971#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12972pub struct CalculationType3Choice {
12973	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
12974	pub cd: Option<CalculationType1Code>,
12975	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
12976	pub prtry: Option<GenericIdentification30>,
12977}
12978
12979impl CalculationType3Choice {
12980	pub fn validate(&self) -> Result<(), ValidationError> {
12981		if let Some(ref val) = self.cd { val.validate()? }
12982		if let Some(ref val) = self.prtry { val.validate()? }
12983		Ok(())
12984	}
12985}
12986
12987
12988// CalendarData1 ...
12989#[cfg_attr(feature = "derive_debug", derive(Debug))]
12990#[cfg_attr(feature = "derive_default", derive(Default))]
12991#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
12992#[cfg_attr(feature = "derive_clone", derive(Clone))]
12993#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
12994pub struct CalendarData1 {
12995	#[cfg_attr( feature = "derive_serde", serde(rename = "SysDt") )]
12996	pub sys_dt: String,
12997	#[cfg_attr( feature = "derive_serde", serde(rename = "SysSts") )]
12998	pub sys_sts: SystemStatus3Choice,
12999}
13000
13001impl CalendarData1 {
13002	pub fn validate(&self) -> Result<(), ValidationError> {
13003		self.sys_sts.validate()?;
13004		Ok(())
13005	}
13006}
13007
13008
13009// CalendarOrBusinessError1Choice ...
13010#[cfg_attr(feature = "derive_debug", derive(Debug))]
13011#[cfg_attr(feature = "derive_default", derive(Default))]
13012#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13013#[cfg_attr(feature = "derive_clone", derive(Clone))]
13014#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13015pub struct CalendarOrBusinessError1Choice {
13016	#[cfg_attr( feature = "derive_serde", serde(rename = "CalData", skip_serializing_if = "Option::is_none") )]
13017	pub cal_data: Option<Vec<CalendarData1>>,
13018	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
13019	pub biz_err: Option<Vec<ErrorHandling4>>,
13020}
13021
13022impl CalendarOrBusinessError1Choice {
13023	pub fn validate(&self) -> Result<(), ValidationError> {
13024		if let Some(ref vec) = self.cal_data { for item in vec { item.validate()? } }
13025		if let Some(ref vec) = self.biz_err { for item in vec { item.validate()? } }
13026		Ok(())
13027	}
13028}
13029
13030
13031// CalendarReport1 ...
13032#[cfg_attr(feature = "derive_debug", derive(Debug))]
13033#[cfg_attr(feature = "derive_default", derive(Default))]
13034#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13035#[cfg_attr(feature = "derive_clone", derive(Clone))]
13036#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13037pub struct CalendarReport1 {
13038	#[cfg_attr( feature = "derive_serde", serde(rename = "Svc", skip_serializing_if = "Option::is_none") )]
13039	pub svc: Option<SystemAndCurrency1>,
13040	#[cfg_attr( feature = "derive_serde", serde(rename = "CalOrErr") )]
13041	pub cal_or_err: CalendarOrBusinessError1Choice,
13042}
13043
13044impl CalendarReport1 {
13045	pub fn validate(&self) -> Result<(), ValidationError> {
13046		if let Some(ref val) = self.svc { val.validate()? }
13047		self.cal_or_err.validate()?;
13048		Ok(())
13049	}
13050}
13051
13052
13053// CalendarReportOrError1Choice ...
13054#[cfg_attr(feature = "derive_debug", derive(Debug))]
13055#[cfg_attr(feature = "derive_default", derive(Default))]
13056#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13057#[cfg_attr(feature = "derive_clone", derive(Clone))]
13058#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13059pub struct CalendarReportOrError1Choice {
13060	#[cfg_attr( feature = "derive_serde", serde(rename = "CalRpt", skip_serializing_if = "Option::is_none") )]
13061	pub cal_rpt: Option<CalendarReport1>,
13062	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
13063	pub oprl_err: Option<Vec<ErrorHandling4>>,
13064}
13065
13066impl CalendarReportOrError1Choice {
13067	pub fn validate(&self) -> Result<(), ValidationError> {
13068		if let Some(ref val) = self.cal_rpt { val.validate()? }
13069		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
13070		Ok(())
13071	}
13072}
13073
13074
13075// CalendarSearchCriteria1 ...
13076#[cfg_attr(feature = "derive_debug", derive(Debug))]
13077#[cfg_attr(feature = "derive_default", derive(Default))]
13078#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13079#[cfg_attr(feature = "derive_clone", derive(Clone))]
13080#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13081pub struct CalendarSearchCriteria1 {
13082	#[cfg_attr( feature = "derive_serde", serde(rename = "Yr", skip_serializing_if = "Option::is_none") )]
13083	pub yr: Option<String>,
13084	#[cfg_attr( feature = "derive_serde", serde(rename = "Mnth", skip_serializing_if = "Option::is_none") )]
13085	pub mnth: Option<String>,
13086	#[cfg_attr( feature = "derive_serde", serde(rename = "Svc", skip_serializing_if = "Option::is_none") )]
13087	pub svc: Option<SystemAndCurrency1>,
13088}
13089
13090impl CalendarSearchCriteria1 {
13091	pub fn validate(&self) -> Result<(), ValidationError> {
13092		if let Some(ref val) = self.svc { val.validate()? }
13093		Ok(())
13094	}
13095}
13096
13097
13098// CallIn1Code ...
13099#[cfg_attr(feature = "derive_debug", derive(Debug))]
13100#[cfg_attr(feature = "derive_default", derive(Default))]
13101#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13102#[cfg_attr(feature = "derive_clone", derive(Clone))]
13103#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13104pub enum CallIn1Code {
13105	#[cfg_attr(feature = "derive_default", default)]
13106	#[cfg_attr( feature = "derive_serde", serde(rename = "CFAV") )]
13107	CodeCFAV,
13108	#[cfg_attr( feature = "derive_serde", serde(rename = "CFST") )]
13109	CodeCFST,
13110	#[cfg_attr( feature = "derive_serde", serde(rename = "CFCC") )]
13111	CodeCFCC,
13112}
13113
13114impl CallIn1Code {
13115	pub fn validate(&self) -> Result<(), ValidationError> {
13116		Ok(())
13117	}
13118}
13119
13120
13121// CallType1Code ...
13122#[cfg_attr(feature = "derive_debug", derive(Debug))]
13123#[cfg_attr(feature = "derive_default", derive(Default))]
13124#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13125#[cfg_attr(feature = "derive_clone", derive(Clone))]
13126#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13127pub enum CallType1Code {
13128	#[cfg_attr(feature = "derive_default", default)]
13129	#[cfg_attr( feature = "derive_serde", serde(rename = "LOTT") )]
13130	CodeLOTT,
13131	#[cfg_attr( feature = "derive_serde", serde(rename = "PRTA") )]
13132	CodePRTA,
13133}
13134
13135impl CallType1Code {
13136	pub fn validate(&self) -> Result<(), ValidationError> {
13137		Ok(())
13138	}
13139}
13140
13141
13142// CallType3Choice ...
13143#[cfg_attr(feature = "derive_debug", derive(Debug))]
13144#[cfg_attr(feature = "derive_default", derive(Default))]
13145#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13146#[cfg_attr(feature = "derive_clone", derive(Clone))]
13147#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13148pub struct CallType3Choice {
13149	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
13150	pub cd: Option<CallType1Code>,
13151	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
13152	pub prtry: Option<GenericIdentification30>,
13153}
13154
13155impl CallType3Choice {
13156	pub fn validate(&self) -> Result<(), ValidationError> {
13157		if let Some(ref val) = self.cd { val.validate()? }
13158		if let Some(ref val) = self.prtry { val.validate()? }
13159		Ok(())
13160	}
13161}
13162
13163
13164// CancelOrderReport1 ...
13165#[cfg_attr(feature = "derive_debug", derive(Debug))]
13166#[cfg_attr(feature = "derive_default", derive(Default))]
13167#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13168#[cfg_attr(feature = "derive_clone", derive(Clone))]
13169#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13170pub struct CancelOrderReport1 {
13171	#[cfg_attr( feature = "derive_serde", serde(rename = "RptId") )]
13172	pub rpt_id: String,
13173}
13174
13175impl CancelOrderReport1 {
13176	pub fn validate(&self) -> Result<(), ValidationError> {
13177		if self.rpt_id.chars().count() < 1 {
13178			return Err(ValidationError::new(1001, "rpt_id is shorter than the minimum length of 1".to_string()));
13179		}
13180		if self.rpt_id.chars().count() > 140 {
13181			return Err(ValidationError::new(1002, "rpt_id exceeds the maximum length of 140".to_string()));
13182		}
13183		Ok(())
13184	}
13185}
13186
13187
13188// CancellationIndividualStatus1Code ...
13189#[cfg_attr(feature = "derive_debug", derive(Debug))]
13190#[cfg_attr(feature = "derive_default", derive(Default))]
13191#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13192#[cfg_attr(feature = "derive_clone", derive(Clone))]
13193#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13194pub enum CancellationIndividualStatus1Code {
13195	#[cfg_attr(feature = "derive_default", default)]
13196	#[cfg_attr( feature = "derive_serde", serde(rename = "RJCR") )]
13197	CodeRJCR,
13198	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCR") )]
13199	CodeACCR,
13200	#[cfg_attr( feature = "derive_serde", serde(rename = "PDCR") )]
13201	CodePDCR,
13202}
13203
13204impl CancellationIndividualStatus1Code {
13205	pub fn validate(&self) -> Result<(), ValidationError> {
13206		Ok(())
13207	}
13208}
13209
13210
13211// CancellationProcessingStatus3Code ...
13212#[cfg_attr(feature = "derive_debug", derive(Debug))]
13213#[cfg_attr(feature = "derive_default", derive(Default))]
13214#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13215#[cfg_attr(feature = "derive_clone", derive(Clone))]
13216#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13217pub enum CancellationProcessingStatus3Code {
13218	#[cfg_attr(feature = "derive_default", default)]
13219	#[cfg_attr( feature = "derive_serde", serde(rename = "CANP") )]
13220	CodeCANP,
13221	#[cfg_attr( feature = "derive_serde", serde(rename = "REJT") )]
13222	CodeREJT,
13223	#[cfg_attr( feature = "derive_serde", serde(rename = "REPR") )]
13224	CodeREPR,
13225	#[cfg_attr( feature = "derive_serde", serde(rename = "PACK") )]
13226	CodePACK,
13227	#[cfg_attr( feature = "derive_serde", serde(rename = "DEND") )]
13228	CodeDEND,
13229	#[cfg_attr( feature = "derive_serde", serde(rename = "CAND") )]
13230	CodeCAND,
13231}
13232
13233impl CancellationProcessingStatus3Code {
13234	pub fn validate(&self) -> Result<(), ValidationError> {
13235		Ok(())
13236	}
13237}
13238
13239
13240// CancellationProcessingStatus9Choice ...
13241#[cfg_attr(feature = "derive_debug", derive(Debug))]
13242#[cfg_attr(feature = "derive_default", derive(Default))]
13243#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13244#[cfg_attr(feature = "derive_clone", derive(Clone))]
13245#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13246pub struct CancellationProcessingStatus9Choice {
13247	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
13248	pub cd: Option<CancellationProcessingStatus3Code>,
13249	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
13250	pub prtry: Option<GenericIdentification30>,
13251}
13252
13253impl CancellationProcessingStatus9Choice {
13254	pub fn validate(&self) -> Result<(), ValidationError> {
13255		if let Some(ref val) = self.cd { val.validate()? }
13256		if let Some(ref val) = self.prtry { val.validate()? }
13257		Ok(())
13258	}
13259}
13260
13261
13262// CancellationReason10 ...
13263#[cfg_attr(feature = "derive_debug", derive(Debug))]
13264#[cfg_attr(feature = "derive_default", derive(Default))]
13265#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13266#[cfg_attr(feature = "derive_clone", derive(Clone))]
13267#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13268pub struct CancellationReason10 {
13269	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
13270	pub cd: CancellationReason21Choice,
13271	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
13272	pub addtl_rsn_inf: Option<String>,
13273}
13274
13275impl CancellationReason10 {
13276	pub fn validate(&self) -> Result<(), ValidationError> {
13277		self.cd.validate()?;
13278		if let Some(ref val) = self.addtl_rsn_inf {
13279			if val.chars().count() < 1 {
13280				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
13281			}
13282			if val.chars().count() > 210 {
13283				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
13284			}
13285		}
13286		Ok(())
13287	}
13288}
13289
13290
13291// CancellationReason19Choice ...
13292#[cfg_attr(feature = "derive_debug", derive(Debug))]
13293#[cfg_attr(feature = "derive_default", derive(Default))]
13294#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13295#[cfg_attr(feature = "derive_clone", derive(Clone))]
13296#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13297pub struct CancellationReason19Choice {
13298	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
13299	pub cd: Option<CancelledStatusReason13Code>,
13300	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
13301	pub prtry: Option<GenericIdentification30>,
13302}
13303
13304impl CancellationReason19Choice {
13305	pub fn validate(&self) -> Result<(), ValidationError> {
13306		if let Some(ref val) = self.cd { val.validate()? }
13307		if let Some(ref val) = self.prtry { val.validate()? }
13308		Ok(())
13309	}
13310}
13311
13312
13313// CancellationReason21Choice ...
13314#[cfg_attr(feature = "derive_debug", derive(Debug))]
13315#[cfg_attr(feature = "derive_default", derive(Default))]
13316#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13317#[cfg_attr(feature = "derive_clone", derive(Clone))]
13318#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13319pub struct CancellationReason21Choice {
13320	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
13321	pub cd: Option<CancelledStatusReason5Code>,
13322	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
13323	pub prtry: Option<GenericIdentification30>,
13324}
13325
13326impl CancellationReason21Choice {
13327	pub fn validate(&self) -> Result<(), ValidationError> {
13328		if let Some(ref val) = self.cd { val.validate()? }
13329		if let Some(ref val) = self.prtry { val.validate()? }
13330		Ok(())
13331	}
13332}
13333
13334
13335// CancellationReason33Choice ...
13336#[cfg_attr(feature = "derive_debug", derive(Debug))]
13337#[cfg_attr(feature = "derive_default", derive(Default))]
13338#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13339#[cfg_attr(feature = "derive_clone", derive(Clone))]
13340#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13341pub struct CancellationReason33Choice {
13342	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
13343	pub cd: Option<String>,
13344	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
13345	pub prtry: Option<String>,
13346}
13347
13348impl CancellationReason33Choice {
13349	pub fn validate(&self) -> Result<(), ValidationError> {
13350		if let Some(ref val) = self.cd {
13351			if val.chars().count() < 1 {
13352				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
13353			}
13354			if val.chars().count() > 4 {
13355				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
13356			}
13357		}
13358		if let Some(ref val) = self.prtry {
13359			if val.chars().count() < 1 {
13360				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
13361			}
13362			if val.chars().count() > 35 {
13363				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
13364			}
13365		}
13366		Ok(())
13367	}
13368}
13369
13370
13371// CancellationReason9 ...
13372#[cfg_attr(feature = "derive_debug", derive(Debug))]
13373#[cfg_attr(feature = "derive_default", derive(Default))]
13374#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13375#[cfg_attr(feature = "derive_clone", derive(Clone))]
13376#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13377pub struct CancellationReason9 {
13378	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
13379	pub cd: CancellationReason19Choice,
13380	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
13381	pub addtl_rsn_inf: Option<String>,
13382}
13383
13384impl CancellationReason9 {
13385	pub fn validate(&self) -> Result<(), ValidationError> {
13386		self.cd.validate()?;
13387		if let Some(ref val) = self.addtl_rsn_inf {
13388			if val.chars().count() < 1 {
13389				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
13390			}
13391			if val.chars().count() > 210 {
13392				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
13393			}
13394		}
13395		Ok(())
13396	}
13397}
13398
13399
13400// CancellationStatus14Choice ...
13401#[cfg_attr(feature = "derive_debug", derive(Debug))]
13402#[cfg_attr(feature = "derive_default", derive(Default))]
13403#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13404#[cfg_attr(feature = "derive_clone", derive(Clone))]
13405#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13406pub struct CancellationStatus14Choice {
13407	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
13408	pub no_spcfd_rsn: Option<NoReasonCode>,
13409	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
13410	pub rsn: Option<Vec<CancellationReason9>>,
13411}
13412
13413impl CancellationStatus14Choice {
13414	pub fn validate(&self) -> Result<(), ValidationError> {
13415		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
13416		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
13417		Ok(())
13418	}
13419}
13420
13421
13422// CancellationStatus15Choice ...
13423#[cfg_attr(feature = "derive_debug", derive(Debug))]
13424#[cfg_attr(feature = "derive_default", derive(Default))]
13425#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13426#[cfg_attr(feature = "derive_clone", derive(Clone))]
13427#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13428pub struct CancellationStatus15Choice {
13429	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
13430	pub no_spcfd_rsn: Option<NoReasonCode>,
13431	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
13432	pub rsn: Option<Vec<CancellationReason10>>,
13433}
13434
13435impl CancellationStatus15Choice {
13436	pub fn validate(&self) -> Result<(), ValidationError> {
13437		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
13438		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
13439		Ok(())
13440	}
13441}
13442
13443
13444// CancellationStatusReason3Choice ...
13445#[cfg_attr(feature = "derive_debug", derive(Debug))]
13446#[cfg_attr(feature = "derive_default", derive(Default))]
13447#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13448#[cfg_attr(feature = "derive_clone", derive(Clone))]
13449#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13450pub struct CancellationStatusReason3Choice {
13451	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
13452	pub cd: Option<String>,
13453	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
13454	pub prtry: Option<String>,
13455}
13456
13457impl CancellationStatusReason3Choice {
13458	pub fn validate(&self) -> Result<(), ValidationError> {
13459		if let Some(ref val) = self.cd {
13460			if val.chars().count() < 1 {
13461				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
13462			}
13463			if val.chars().count() > 4 {
13464				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
13465			}
13466		}
13467		if let Some(ref val) = self.prtry {
13468			if val.chars().count() < 1 {
13469				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
13470			}
13471			if val.chars().count() > 35 {
13472				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
13473			}
13474		}
13475		Ok(())
13476	}
13477}
13478
13479
13480// CancellationStatusReason5 ...
13481#[cfg_attr(feature = "derive_debug", derive(Debug))]
13482#[cfg_attr(feature = "derive_default", derive(Default))]
13483#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13484#[cfg_attr(feature = "derive_clone", derive(Clone))]
13485#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13486pub struct CancellationStatusReason5 {
13487	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
13488	pub orgtr: Option<PartyIdentification272>,
13489	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
13490	pub rsn: Option<CancellationStatusReason3Choice>,
13491	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
13492	pub addtl_inf: Option<Vec<String>>,
13493}
13494
13495impl CancellationStatusReason5 {
13496	pub fn validate(&self) -> Result<(), ValidationError> {
13497		if let Some(ref val) = self.orgtr { val.validate()? }
13498		if let Some(ref val) = self.rsn { val.validate()? }
13499		if let Some(ref vec) = self.addtl_inf {
13500			for item in vec {
13501				if item.chars().count() < 1 {
13502					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
13503				}
13504				if item.chars().count() > 105 {
13505					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
13506				}
13507			}
13508		}
13509		Ok(())
13510	}
13511}
13512
13513
13514// CancelledStatusReason13Code ...
13515#[cfg_attr(feature = "derive_debug", derive(Debug))]
13516#[cfg_attr(feature = "derive_default", derive(Default))]
13517#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13518#[cfg_attr(feature = "derive_clone", derive(Clone))]
13519#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13520pub enum CancelledStatusReason13Code {
13521	#[cfg_attr(feature = "derive_default", default)]
13522	#[cfg_attr( feature = "derive_serde", serde(rename = "CANI") )]
13523	CodeCANI,
13524	#[cfg_attr( feature = "derive_serde", serde(rename = "CANS") )]
13525	CodeCANS,
13526	#[cfg_attr( feature = "derive_serde", serde(rename = "CSUB") )]
13527	CodeCSUB,
13528	#[cfg_attr( feature = "derive_serde", serde(rename = "CXLR") )]
13529	CodeCXLR,
13530	#[cfg_attr( feature = "derive_serde", serde(rename = "CANT") )]
13531	CodeCANT,
13532	#[cfg_attr( feature = "derive_serde", serde(rename = "CANZ") )]
13533	CodeCANZ,
13534	#[cfg_attr( feature = "derive_serde", serde(rename = "CORP") )]
13535	CodeCORP,
13536	#[cfg_attr( feature = "derive_serde", serde(rename = "SCEX") )]
13537	CodeSCEX,
13538	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
13539	CodeOTHR,
13540	#[cfg_attr( feature = "derive_serde", serde(rename = "CTHP") )]
13541	CodeCTHP,
13542}
13543
13544impl CancelledStatusReason13Code {
13545	pub fn validate(&self) -> Result<(), ValidationError> {
13546		Ok(())
13547	}
13548}
13549
13550
13551// CancelledStatusReason15Code ...
13552#[cfg_attr(feature = "derive_debug", derive(Debug))]
13553#[cfg_attr(feature = "derive_default", derive(Default))]
13554#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13555#[cfg_attr(feature = "derive_clone", derive(Clone))]
13556#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13557pub enum CancelledStatusReason15Code {
13558	#[cfg_attr(feature = "derive_default", default)]
13559	#[cfg_attr( feature = "derive_serde", serde(rename = "CANI") )]
13560	CodeCANI,
13561	#[cfg_attr( feature = "derive_serde", serde(rename = "CSUB") )]
13562	CodeCSUB,
13563}
13564
13565impl CancelledStatusReason15Code {
13566	pub fn validate(&self) -> Result<(), ValidationError> {
13567		Ok(())
13568	}
13569}
13570
13571
13572// CancelledStatusReason1Code ...
13573#[cfg_attr(feature = "derive_debug", derive(Debug))]
13574#[cfg_attr(feature = "derive_default", derive(Default))]
13575#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13576#[cfg_attr(feature = "derive_clone", derive(Clone))]
13577#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13578pub enum CancelledStatusReason1Code {
13579	#[cfg_attr(feature = "derive_default", default)]
13580	#[cfg_attr( feature = "derive_serde", serde(rename = "CANI") )]
13581	CodeCANI,
13582	#[cfg_attr( feature = "derive_serde", serde(rename = "CANS") )]
13583	CodeCANS,
13584	#[cfg_attr( feature = "derive_serde", serde(rename = "CSUB") )]
13585	CodeCSUB,
13586}
13587
13588impl CancelledStatusReason1Code {
13589	pub fn validate(&self) -> Result<(), ValidationError> {
13590		Ok(())
13591	}
13592}
13593
13594
13595// CancelledStatusReason5Code ...
13596#[cfg_attr(feature = "derive_debug", derive(Debug))]
13597#[cfg_attr(feature = "derive_default", derive(Default))]
13598#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13599#[cfg_attr(feature = "derive_clone", derive(Clone))]
13600#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13601pub enum CancelledStatusReason5Code {
13602	#[cfg_attr(feature = "derive_default", default)]
13603	#[cfg_attr( feature = "derive_serde", serde(rename = "CANI") )]
13604	CodeCANI,
13605	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
13606	CodeOTHR,
13607}
13608
13609impl CancelledStatusReason5Code {
13610	pub fn validate(&self) -> Result<(), ValidationError> {
13611		Ok(())
13612	}
13613}
13614
13615
13616// CapitalRequirement1 ...
13617#[cfg_attr(feature = "derive_debug", derive(Debug))]
13618#[cfg_attr(feature = "derive_default", derive(Default))]
13619#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13620#[cfg_attr(feature = "derive_clone", derive(Clone))]
13621#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13622pub struct CapitalRequirement1 {
13623	#[cfg_attr( feature = "derive_serde", serde(rename = "WndgDwnOrRstrgRsk") )]
13624	pub wndg_dwn_or_rstrg_rsk: ActiveCurrencyAndAmount,
13625	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlAndLglRsk") )]
13626	pub oprl_and_lgl_rsk: ActiveCurrencyAndAmount,
13627	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtRsk") )]
13628	pub cdt_rsk: ActiveCurrencyAndAmount,
13629	#[cfg_attr( feature = "derive_serde", serde(rename = "CntrPtyRsk") )]
13630	pub cntr_pty_rsk: ActiveCurrencyAndAmount,
13631	#[cfg_attr( feature = "derive_serde", serde(rename = "MktRsk") )]
13632	pub mkt_rsk: ActiveCurrencyAndAmount,
13633	#[cfg_attr( feature = "derive_serde", serde(rename = "BizRsk") )]
13634	pub biz_rsk: ActiveCurrencyAndAmount,
13635	#[cfg_attr( feature = "derive_serde", serde(rename = "NtfctnBffr", skip_serializing_if = "Option::is_none") )]
13636	pub ntfctn_bffr: Option<f64>,
13637}
13638
13639impl CapitalRequirement1 {
13640	pub fn validate(&self) -> Result<(), ValidationError> {
13641		self.wndg_dwn_or_rstrg_rsk.validate()?;
13642		self.oprl_and_lgl_rsk.validate()?;
13643		self.cdt_rsk.validate()?;
13644		self.cntr_pty_rsk.validate()?;
13645		self.mkt_rsk.validate()?;
13646		self.biz_rsk.validate()?;
13647		Ok(())
13648	}
13649}
13650
13651
13652// CardAggregated2 ...
13653#[cfg_attr(feature = "derive_debug", derive(Debug))]
13654#[cfg_attr(feature = "derive_default", derive(Default))]
13655#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13656#[cfg_attr(feature = "derive_clone", derive(Clone))]
13657#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13658pub struct CardAggregated2 {
13659	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSvc", skip_serializing_if = "Option::is_none") )]
13660	pub addtl_svc: Option<CardPaymentServiceType2Code>,
13661	#[cfg_attr( feature = "derive_serde", serde(rename = "TxCtgy", skip_serializing_if = "Option::is_none") )]
13662	pub tx_ctgy: Option<String>,
13663	#[cfg_attr( feature = "derive_serde", serde(rename = "SaleRcncltnId", skip_serializing_if = "Option::is_none") )]
13664	pub sale_rcncltn_id: Option<String>,
13665	#[cfg_attr( feature = "derive_serde", serde(rename = "SeqNbRg", skip_serializing_if = "Option::is_none") )]
13666	pub seq_nb_rg: Option<CardSequenceNumberRange1>,
13667	#[cfg_attr( feature = "derive_serde", serde(rename = "TxDtRg", skip_serializing_if = "Option::is_none") )]
13668	pub tx_dt_rg: Option<DateOrDateTimePeriod1Choice>,
13669}
13670
13671impl CardAggregated2 {
13672	pub fn validate(&self) -> Result<(), ValidationError> {
13673		if let Some(ref val) = self.addtl_svc { val.validate()? }
13674		if let Some(ref val) = self.tx_ctgy {
13675			if val.chars().count() < 1 {
13676				return Err(ValidationError::new(1001, "tx_ctgy is shorter than the minimum length of 1".to_string()));
13677			}
13678			if val.chars().count() > 4 {
13679				return Err(ValidationError::new(1002, "tx_ctgy exceeds the maximum length of 4".to_string()));
13680			}
13681		}
13682		if let Some(ref val) = self.sale_rcncltn_id {
13683			if val.chars().count() < 1 {
13684				return Err(ValidationError::new(1001, "sale_rcncltn_id is shorter than the minimum length of 1".to_string()));
13685			}
13686			if val.chars().count() > 35 {
13687				return Err(ValidationError::new(1002, "sale_rcncltn_id exceeds the maximum length of 35".to_string()));
13688			}
13689		}
13690		if let Some(ref val) = self.seq_nb_rg { val.validate()? }
13691		if let Some(ref val) = self.tx_dt_rg { val.validate()? }
13692		Ok(())
13693	}
13694}
13695
13696
13697// CardDataReading1Code ...
13698#[cfg_attr(feature = "derive_debug", derive(Debug))]
13699#[cfg_attr(feature = "derive_default", derive(Default))]
13700#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13701#[cfg_attr(feature = "derive_clone", derive(Clone))]
13702#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13703pub enum CardDataReading1Code {
13704	#[cfg_attr(feature = "derive_default", default)]
13705	#[cfg_attr( feature = "derive_serde", serde(rename = "TAGC") )]
13706	CodeTAGC,
13707	#[cfg_attr( feature = "derive_serde", serde(rename = "PHYS") )]
13708	CodePHYS,
13709	#[cfg_attr( feature = "derive_serde", serde(rename = "BRCD") )]
13710	CodeBRCD,
13711	#[cfg_attr( feature = "derive_serde", serde(rename = "MGST") )]
13712	CodeMGST,
13713	#[cfg_attr( feature = "derive_serde", serde(rename = "CICC") )]
13714	CodeCICC,
13715	#[cfg_attr( feature = "derive_serde", serde(rename = "DFLE") )]
13716	CodeDFLE,
13717	#[cfg_attr( feature = "derive_serde", serde(rename = "CTLS") )]
13718	CodeCTLS,
13719	#[cfg_attr( feature = "derive_serde", serde(rename = "ECTL") )]
13720	CodeECTL,
13721}
13722
13723impl CardDataReading1Code {
13724	pub fn validate(&self) -> Result<(), ValidationError> {
13725		Ok(())
13726	}
13727}
13728
13729
13730// CardEntry5 ...
13731#[cfg_attr(feature = "derive_debug", derive(Debug))]
13732#[cfg_attr(feature = "derive_default", derive(Default))]
13733#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13734#[cfg_attr(feature = "derive_clone", derive(Clone))]
13735#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13736pub struct CardEntry5 {
13737	#[cfg_attr( feature = "derive_serde", serde(rename = "Card", skip_serializing_if = "Option::is_none") )]
13738	pub card: Option<PaymentCard4>,
13739	#[cfg_attr( feature = "derive_serde", serde(rename = "POI", skip_serializing_if = "Option::is_none") )]
13740	pub poi: Option<PointOfInteraction1>,
13741	#[cfg_attr( feature = "derive_serde", serde(rename = "AggtdNtry", skip_serializing_if = "Option::is_none") )]
13742	pub aggtd_ntry: Option<CardAggregated2>,
13743	#[cfg_attr( feature = "derive_serde", serde(rename = "PrePdAcct", skip_serializing_if = "Option::is_none") )]
13744	pub pre_pd_acct: Option<CashAccount40>,
13745}
13746
13747impl CardEntry5 {
13748	pub fn validate(&self) -> Result<(), ValidationError> {
13749		if let Some(ref val) = self.card { val.validate()? }
13750		if let Some(ref val) = self.poi { val.validate()? }
13751		if let Some(ref val) = self.aggtd_ntry { val.validate()? }
13752		if let Some(ref val) = self.pre_pd_acct { val.validate()? }
13753		Ok(())
13754	}
13755}
13756
13757
13758// CardIndividualTransaction2 ...
13759#[cfg_attr(feature = "derive_debug", derive(Debug))]
13760#[cfg_attr(feature = "derive_default", derive(Default))]
13761#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13762#[cfg_attr(feature = "derive_clone", derive(Clone))]
13763#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13764pub struct CardIndividualTransaction2 {
13765	#[cfg_attr( feature = "derive_serde", serde(rename = "ICCRltdData", skip_serializing_if = "Option::is_none") )]
13766	pub icc_rltd_data: Option<String>,
13767	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtCntxt", skip_serializing_if = "Option::is_none") )]
13768	pub pmt_cntxt: Option<PaymentContext3>,
13769	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSvc", skip_serializing_if = "Option::is_none") )]
13770	pub addtl_svc: Option<CardPaymentServiceType2Code>,
13771	#[cfg_attr( feature = "derive_serde", serde(rename = "TxCtgy", skip_serializing_if = "Option::is_none") )]
13772	pub tx_ctgy: Option<String>,
13773	#[cfg_attr( feature = "derive_serde", serde(rename = "SaleRcncltnId", skip_serializing_if = "Option::is_none") )]
13774	pub sale_rcncltn_id: Option<String>,
13775	#[cfg_attr( feature = "derive_serde", serde(rename = "SaleRefNb", skip_serializing_if = "Option::is_none") )]
13776	pub sale_ref_nb: Option<String>,
13777	#[cfg_attr( feature = "derive_serde", serde(rename = "RePresntmntRsn", skip_serializing_if = "Option::is_none") )]
13778	pub re_presntmnt_rsn: Option<String>,
13779	#[cfg_attr( feature = "derive_serde", serde(rename = "SeqNb", skip_serializing_if = "Option::is_none") )]
13780	pub seq_nb: Option<String>,
13781	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
13782	pub tx_id: Option<TransactionIdentifier1>,
13783	#[cfg_attr( feature = "derive_serde", serde(rename = "Pdct", skip_serializing_if = "Option::is_none") )]
13784	pub pdct: Option<Product2>,
13785	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtnDt", skip_serializing_if = "Option::is_none") )]
13786	pub vldtn_dt: Option<String>,
13787	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtnSeqNb", skip_serializing_if = "Option::is_none") )]
13788	pub vldtn_seq_nb: Option<String>,
13789}
13790
13791impl CardIndividualTransaction2 {
13792	pub fn validate(&self) -> Result<(), ValidationError> {
13793		if let Some(ref val) = self.icc_rltd_data {
13794			if val.chars().count() < 1 {
13795				return Err(ValidationError::new(1001, "icc_rltd_data is shorter than the minimum length of 1".to_string()));
13796			}
13797			if val.chars().count() > 1025 {
13798				return Err(ValidationError::new(1002, "icc_rltd_data exceeds the maximum length of 1025".to_string()));
13799			}
13800		}
13801		if let Some(ref val) = self.pmt_cntxt { val.validate()? }
13802		if let Some(ref val) = self.addtl_svc { val.validate()? }
13803		if let Some(ref val) = self.tx_ctgy {
13804			if val.chars().count() < 1 {
13805				return Err(ValidationError::new(1001, "tx_ctgy is shorter than the minimum length of 1".to_string()));
13806			}
13807			if val.chars().count() > 4 {
13808				return Err(ValidationError::new(1002, "tx_ctgy exceeds the maximum length of 4".to_string()));
13809			}
13810		}
13811		if let Some(ref val) = self.sale_rcncltn_id {
13812			if val.chars().count() < 1 {
13813				return Err(ValidationError::new(1001, "sale_rcncltn_id is shorter than the minimum length of 1".to_string()));
13814			}
13815			if val.chars().count() > 35 {
13816				return Err(ValidationError::new(1002, "sale_rcncltn_id exceeds the maximum length of 35".to_string()));
13817			}
13818		}
13819		if let Some(ref val) = self.sale_ref_nb {
13820			if val.chars().count() < 1 {
13821				return Err(ValidationError::new(1001, "sale_ref_nb is shorter than the minimum length of 1".to_string()));
13822			}
13823			if val.chars().count() > 35 {
13824				return Err(ValidationError::new(1002, "sale_ref_nb exceeds the maximum length of 35".to_string()));
13825			}
13826		}
13827		if let Some(ref val) = self.re_presntmnt_rsn {
13828			if val.chars().count() < 1 {
13829				return Err(ValidationError::new(1001, "re_presntmnt_rsn is shorter than the minimum length of 1".to_string()));
13830			}
13831			if val.chars().count() > 4 {
13832				return Err(ValidationError::new(1002, "re_presntmnt_rsn exceeds the maximum length of 4".to_string()));
13833			}
13834		}
13835		if let Some(ref val) = self.seq_nb {
13836			if val.chars().count() < 1 {
13837				return Err(ValidationError::new(1001, "seq_nb is shorter than the minimum length of 1".to_string()));
13838			}
13839			if val.chars().count() > 35 {
13840				return Err(ValidationError::new(1002, "seq_nb exceeds the maximum length of 35".to_string()));
13841			}
13842		}
13843		if let Some(ref val) = self.tx_id { val.validate()? }
13844		if let Some(ref val) = self.pdct { val.validate()? }
13845		if let Some(ref val) = self.vldtn_seq_nb {
13846			if val.chars().count() < 1 {
13847				return Err(ValidationError::new(1001, "vldtn_seq_nb is shorter than the minimum length of 1".to_string()));
13848			}
13849			if val.chars().count() > 35 {
13850				return Err(ValidationError::new(1002, "vldtn_seq_nb exceeds the maximum length of 35".to_string()));
13851			}
13852		}
13853		Ok(())
13854	}
13855}
13856
13857
13858// CardPaymentServiceType2Code ...
13859#[cfg_attr(feature = "derive_debug", derive(Debug))]
13860#[cfg_attr(feature = "derive_default", derive(Default))]
13861#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13862#[cfg_attr(feature = "derive_clone", derive(Clone))]
13863#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13864pub enum CardPaymentServiceType2Code {
13865	#[cfg_attr(feature = "derive_default", default)]
13866	#[cfg_attr( feature = "derive_serde", serde(rename = "AGGR") )]
13867	CodeAGGR,
13868	#[cfg_attr( feature = "derive_serde", serde(rename = "DCCV") )]
13869	CodeDCCV,
13870	#[cfg_attr( feature = "derive_serde", serde(rename = "GRTT") )]
13871	CodeGRTT,
13872	#[cfg_attr( feature = "derive_serde", serde(rename = "INSP") )]
13873	CodeINSP,
13874	#[cfg_attr( feature = "derive_serde", serde(rename = "LOYT") )]
13875	CodeLOYT,
13876	#[cfg_attr( feature = "derive_serde", serde(rename = "NRES") )]
13877	CodeNRES,
13878	#[cfg_attr( feature = "derive_serde", serde(rename = "PUCO") )]
13879	CodePUCO,
13880	#[cfg_attr( feature = "derive_serde", serde(rename = "RECP") )]
13881	CodeRECP,
13882	#[cfg_attr( feature = "derive_serde", serde(rename = "SOAF") )]
13883	CodeSOAF,
13884	#[cfg_attr( feature = "derive_serde", serde(rename = "UNAF") )]
13885	CodeUNAF,
13886	#[cfg_attr( feature = "derive_serde", serde(rename = "VCAU") )]
13887	CodeVCAU,
13888}
13889
13890impl CardPaymentServiceType2Code {
13891	pub fn validate(&self) -> Result<(), ValidationError> {
13892		Ok(())
13893	}
13894}
13895
13896
13897// CardSecurityInformation1 ...
13898#[cfg_attr(feature = "derive_debug", derive(Debug))]
13899#[cfg_attr(feature = "derive_default", derive(Default))]
13900#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13901#[cfg_attr(feature = "derive_clone", derive(Clone))]
13902#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13903pub struct CardSecurityInformation1 {
13904	#[cfg_attr( feature = "derive_serde", serde(rename = "CSCMgmt") )]
13905	pub csc_mgmt: CSCManagement1Code,
13906	#[cfg_attr( feature = "derive_serde", serde(rename = "CSCVal", skip_serializing_if = "Option::is_none") )]
13907	pub csc_val: Option<String>,
13908}
13909
13910impl CardSecurityInformation1 {
13911	pub fn validate(&self) -> Result<(), ValidationError> {
13912		self.csc_mgmt.validate()?;
13913		if let Some(ref val) = self.csc_val {
13914			let pattern = Regex::new("[0-9]{3,4}").unwrap();
13915			if !pattern.is_match(val) {
13916				return Err(ValidationError::new(1005, "csc_val does not match the required pattern".to_string()));
13917			}
13918		}
13919		Ok(())
13920	}
13921}
13922
13923
13924// CardSequenceNumberRange1 ...
13925#[cfg_attr(feature = "derive_debug", derive(Debug))]
13926#[cfg_attr(feature = "derive_default", derive(Default))]
13927#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13928#[cfg_attr(feature = "derive_clone", derive(Clone))]
13929#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13930pub struct CardSequenceNumberRange1 {
13931	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstTx", skip_serializing_if = "Option::is_none") )]
13932	pub frst_tx: Option<String>,
13933	#[cfg_attr( feature = "derive_serde", serde(rename = "LastTx", skip_serializing_if = "Option::is_none") )]
13934	pub last_tx: Option<String>,
13935}
13936
13937impl CardSequenceNumberRange1 {
13938	pub fn validate(&self) -> Result<(), ValidationError> {
13939		if let Some(ref val) = self.frst_tx {
13940			if val.chars().count() < 1 {
13941				return Err(ValidationError::new(1001, "frst_tx is shorter than the minimum length of 1".to_string()));
13942			}
13943			if val.chars().count() > 35 {
13944				return Err(ValidationError::new(1002, "frst_tx exceeds the maximum length of 35".to_string()));
13945			}
13946		}
13947		if let Some(ref val) = self.last_tx {
13948			if val.chars().count() < 1 {
13949				return Err(ValidationError::new(1001, "last_tx is shorter than the minimum length of 1".to_string()));
13950			}
13951			if val.chars().count() > 35 {
13952				return Err(ValidationError::new(1002, "last_tx exceeds the maximum length of 35".to_string()));
13953			}
13954		}
13955		Ok(())
13956	}
13957}
13958
13959
13960// CardTransaction18 ...
13961#[cfg_attr(feature = "derive_debug", derive(Debug))]
13962#[cfg_attr(feature = "derive_default", derive(Default))]
13963#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13964#[cfg_attr(feature = "derive_clone", derive(Clone))]
13965#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13966pub struct CardTransaction18 {
13967	#[cfg_attr( feature = "derive_serde", serde(rename = "Card", skip_serializing_if = "Option::is_none") )]
13968	pub card: Option<PaymentCard4>,
13969	#[cfg_attr( feature = "derive_serde", serde(rename = "POI", skip_serializing_if = "Option::is_none") )]
13970	pub poi: Option<PointOfInteraction1>,
13971	#[cfg_attr( feature = "derive_serde", serde(rename = "Tx", skip_serializing_if = "Option::is_none") )]
13972	pub tx: Option<CardTransaction3Choice>,
13973	#[cfg_attr( feature = "derive_serde", serde(rename = "PrePdAcct", skip_serializing_if = "Option::is_none") )]
13974	pub pre_pd_acct: Option<CashAccount40>,
13975}
13976
13977impl CardTransaction18 {
13978	pub fn validate(&self) -> Result<(), ValidationError> {
13979		if let Some(ref val) = self.card { val.validate()? }
13980		if let Some(ref val) = self.poi { val.validate()? }
13981		if let Some(ref val) = self.tx { val.validate()? }
13982		if let Some(ref val) = self.pre_pd_acct { val.validate()? }
13983		Ok(())
13984	}
13985}
13986
13987
13988// CardTransaction3Choice ...
13989#[cfg_attr(feature = "derive_debug", derive(Debug))]
13990#[cfg_attr(feature = "derive_default", derive(Default))]
13991#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
13992#[cfg_attr(feature = "derive_clone", derive(Clone))]
13993#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
13994pub struct CardTransaction3Choice {
13995	#[cfg_attr( feature = "derive_serde", serde(rename = "Aggtd", skip_serializing_if = "Option::is_none") )]
13996	pub aggtd: Option<CardAggregated2>,
13997	#[cfg_attr( feature = "derive_serde", serde(rename = "Indv", skip_serializing_if = "Option::is_none") )]
13998	pub indv: Option<CardIndividualTransaction2>,
13999}
14000
14001impl CardTransaction3Choice {
14002	pub fn validate(&self) -> Result<(), ValidationError> {
14003		if let Some(ref val) = self.aggtd { val.validate()? }
14004		if let Some(ref val) = self.indv { val.validate()? }
14005		Ok(())
14006	}
14007}
14008
14009
14010// CardType1Code ...
14011#[cfg_attr(feature = "derive_debug", derive(Debug))]
14012#[cfg_attr(feature = "derive_default", derive(Default))]
14013#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14014#[cfg_attr(feature = "derive_clone", derive(Clone))]
14015#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14016pub enum CardType1Code {
14017	#[cfg_attr(feature = "derive_default", default)]
14018	#[cfg_attr( feature = "derive_serde", serde(rename = "CRDT") )]
14019	CodeCRDT,
14020	#[cfg_attr( feature = "derive_serde", serde(rename = "DBIT") )]
14021	CodeDBIT,
14022}
14023
14024impl CardType1Code {
14025	pub fn validate(&self) -> Result<(), ValidationError> {
14026		Ok(())
14027	}
14028}
14029
14030
14031// CardholderAuthentication2 ...
14032#[cfg_attr(feature = "derive_debug", derive(Debug))]
14033#[cfg_attr(feature = "derive_default", derive(Default))]
14034#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14035#[cfg_attr(feature = "derive_clone", derive(Clone))]
14036#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14037pub struct CardholderAuthentication2 {
14038	#[cfg_attr( feature = "derive_serde", serde(rename = "AuthntcnMtd") )]
14039	pub authntcn_mtd: AuthenticationMethod1Code,
14040	#[cfg_attr( feature = "derive_serde", serde(rename = "AuthntcnNtty") )]
14041	pub authntcn_ntty: AuthenticationEntity1Code,
14042}
14043
14044impl CardholderAuthentication2 {
14045	pub fn validate(&self) -> Result<(), ValidationError> {
14046		self.authntcn_mtd.validate()?;
14047		self.authntcn_ntty.validate()?;
14048		Ok(())
14049	}
14050}
14051
14052
14053// CardholderVerificationCapability1Code ...
14054#[cfg_attr(feature = "derive_debug", derive(Debug))]
14055#[cfg_attr(feature = "derive_default", derive(Default))]
14056#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14057#[cfg_attr(feature = "derive_clone", derive(Clone))]
14058#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14059pub enum CardholderVerificationCapability1Code {
14060	#[cfg_attr(feature = "derive_default", default)]
14061	#[cfg_attr( feature = "derive_serde", serde(rename = "MNSG") )]
14062	CodeMNSG,
14063	#[cfg_attr( feature = "derive_serde", serde(rename = "NPIN") )]
14064	CodeNPIN,
14065	#[cfg_attr( feature = "derive_serde", serde(rename = "FCPN") )]
14066	CodeFCPN,
14067	#[cfg_attr( feature = "derive_serde", serde(rename = "FEPN") )]
14068	CodeFEPN,
14069	#[cfg_attr( feature = "derive_serde", serde(rename = "FDSG") )]
14070	CodeFDSG,
14071	#[cfg_attr( feature = "derive_serde", serde(rename = "FBIO") )]
14072	CodeFBIO,
14073	#[cfg_attr( feature = "derive_serde", serde(rename = "MNVR") )]
14074	CodeMNVR,
14075	#[cfg_attr( feature = "derive_serde", serde(rename = "FBIG") )]
14076	CodeFBIG,
14077	#[cfg_attr( feature = "derive_serde", serde(rename = "APKI") )]
14078	CodeAPKI,
14079	#[cfg_attr( feature = "derive_serde", serde(rename = "PKIS") )]
14080	CodePKIS,
14081	#[cfg_attr( feature = "derive_serde", serde(rename = "CHDT") )]
14082	CodeCHDT,
14083	#[cfg_attr( feature = "derive_serde", serde(rename = "SCEC") )]
14084	CodeSCEC,
14085}
14086
14087impl CardholderVerificationCapability1Code {
14088	pub fn validate(&self) -> Result<(), ValidationError> {
14089		Ok(())
14090	}
14091}
14092
14093
14094// Case6 ...
14095#[cfg_attr(feature = "derive_debug", derive(Debug))]
14096#[cfg_attr(feature = "derive_default", derive(Default))]
14097#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14098#[cfg_attr(feature = "derive_clone", derive(Clone))]
14099#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14100pub struct Case6 {
14101	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
14102	pub id: String,
14103	#[cfg_attr( feature = "derive_serde", serde(rename = "Cretr") )]
14104	pub cretr: Party50Choice,
14105	#[cfg_attr( feature = "derive_serde", serde(rename = "ReopCaseIndctn", skip_serializing_if = "Option::is_none") )]
14106	pub reop_case_indctn: Option<bool>,
14107}
14108
14109impl Case6 {
14110	pub fn validate(&self) -> Result<(), ValidationError> {
14111		if self.id.chars().count() < 1 {
14112			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
14113		}
14114		if self.id.chars().count() > 35 {
14115			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
14116		}
14117		self.cretr.validate()?;
14118		Ok(())
14119	}
14120}
14121
14122
14123// CaseAssignment6 ...
14124#[cfg_attr(feature = "derive_debug", derive(Debug))]
14125#[cfg_attr(feature = "derive_default", derive(Default))]
14126#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14127#[cfg_attr(feature = "derive_clone", derive(Clone))]
14128#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14129pub struct CaseAssignment6 {
14130	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
14131	pub id: String,
14132	#[cfg_attr( feature = "derive_serde", serde(rename = "Assgnr") )]
14133	pub assgnr: Party50Choice,
14134	#[cfg_attr( feature = "derive_serde", serde(rename = "Assgne") )]
14135	pub assgne: Party50Choice,
14136	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
14137	pub cre_dt_tm: String,
14138}
14139
14140impl CaseAssignment6 {
14141	pub fn validate(&self) -> Result<(), ValidationError> {
14142		if self.id.chars().count() < 1 {
14143			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
14144		}
14145		if self.id.chars().count() > 35 {
14146			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
14147		}
14148		self.assgnr.validate()?;
14149		self.assgne.validate()?;
14150		Ok(())
14151	}
14152}
14153
14154
14155// CaseForwardingNotification3 ...
14156#[cfg_attr(feature = "derive_debug", derive(Debug))]
14157#[cfg_attr(feature = "derive_default", derive(Default))]
14158#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14159#[cfg_attr(feature = "derive_clone", derive(Clone))]
14160#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14161pub struct CaseForwardingNotification3 {
14162	#[cfg_attr( feature = "derive_serde", serde(rename = "Justfn") )]
14163	pub justfn: CaseForwardingNotification3Code,
14164}
14165
14166impl CaseForwardingNotification3 {
14167	pub fn validate(&self) -> Result<(), ValidationError> {
14168		self.justfn.validate()?;
14169		Ok(())
14170	}
14171}
14172
14173
14174// CaseForwardingNotification3Code ...
14175#[cfg_attr(feature = "derive_debug", derive(Debug))]
14176#[cfg_attr(feature = "derive_default", derive(Default))]
14177#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14178#[cfg_attr(feature = "derive_clone", derive(Clone))]
14179#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14180pub enum CaseForwardingNotification3Code {
14181	#[cfg_attr(feature = "derive_default", default)]
14182	#[cfg_attr( feature = "derive_serde", serde(rename = "FTHI") )]
14183	CodeFTHI,
14184	#[cfg_attr( feature = "derive_serde", serde(rename = "CANC") )]
14185	CodeCANC,
14186	#[cfg_attr( feature = "derive_serde", serde(rename = "MODI") )]
14187	CodeMODI,
14188	#[cfg_attr( feature = "derive_serde", serde(rename = "DTAU") )]
14189	CodeDTAU,
14190	#[cfg_attr( feature = "derive_serde", serde(rename = "SAIN") )]
14191	CodeSAIN,
14192	#[cfg_attr( feature = "derive_serde", serde(rename = "MINE") )]
14193	CodeMINE,
14194}
14195
14196impl CaseForwardingNotification3Code {
14197	pub fn validate(&self) -> Result<(), ValidationError> {
14198		Ok(())
14199	}
14200}
14201
14202
14203// CaseStatus2 ...
14204#[cfg_attr(feature = "derive_debug", derive(Debug))]
14205#[cfg_attr(feature = "derive_default", derive(Default))]
14206#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14207#[cfg_attr(feature = "derive_clone", derive(Clone))]
14208#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14209pub struct CaseStatus2 {
14210	#[cfg_attr( feature = "derive_serde", serde(rename = "DtTm") )]
14211	pub dt_tm: String,
14212	#[cfg_attr( feature = "derive_serde", serde(rename = "CaseSts") )]
14213	pub case_sts: CaseStatus2Code,
14214	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
14215	pub rsn: Option<String>,
14216}
14217
14218impl CaseStatus2 {
14219	pub fn validate(&self) -> Result<(), ValidationError> {
14220		self.case_sts.validate()?;
14221		if let Some(ref val) = self.rsn {
14222			if val.chars().count() < 1 {
14223				return Err(ValidationError::new(1001, "rsn is shorter than the minimum length of 1".to_string()));
14224			}
14225			if val.chars().count() > 140 {
14226				return Err(ValidationError::new(1002, "rsn exceeds the maximum length of 140".to_string()));
14227			}
14228		}
14229		Ok(())
14230	}
14231}
14232
14233
14234// CaseStatus2Code ...
14235#[cfg_attr(feature = "derive_debug", derive(Debug))]
14236#[cfg_attr(feature = "derive_default", derive(Default))]
14237#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14238#[cfg_attr(feature = "derive_clone", derive(Clone))]
14239#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14240pub enum CaseStatus2Code {
14241	#[cfg_attr(feature = "derive_default", default)]
14242	#[cfg_attr( feature = "derive_serde", serde(rename = "CLSD") )]
14243	CodeCLSD,
14244	#[cfg_attr( feature = "derive_serde", serde(rename = "ASGN") )]
14245	CodeASGN,
14246	#[cfg_attr( feature = "derive_serde", serde(rename = "INVE") )]
14247	CodeINVE,
14248	#[cfg_attr( feature = "derive_serde", serde(rename = "UKNW") )]
14249	CodeUKNW,
14250	#[cfg_attr( feature = "derive_serde", serde(rename = "ODUE") )]
14251	CodeODUE,
14252}
14253
14254impl CaseStatus2Code {
14255	pub fn validate(&self) -> Result<(), ValidationError> {
14256		Ok(())
14257	}
14258}
14259
14260
14261// CashAccount204 ...
14262#[cfg_attr(feature = "derive_debug", derive(Debug))]
14263#[cfg_attr(feature = "derive_default", derive(Default))]
14264#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14265#[cfg_attr(feature = "derive_clone", derive(Clone))]
14266#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14267pub struct CashAccount204 {
14268	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcy") )]
14269	pub sttlm_ccy: String,
14270	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
14271	pub id: AccountIdentificationAndName5,
14272	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
14273	pub acct_ownr: Option<PartyIdentification125Choice>,
14274	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
14275	pub acct_svcr: Option<FinancialInstitutionIdentification11Choice>,
14276	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrBrnch", skip_serializing_if = "Option::is_none") )]
14277	pub acct_svcr_brnch: Option<BranchData4>,
14278	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnrOthrId", skip_serializing_if = "Option::is_none") )]
14279	pub acct_ownr_othr_id: Option<Vec<GenericIdentification82>>,
14280	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtAcctTp", skip_serializing_if = "Option::is_none") )]
14281	pub invstmt_acct_tp: Option<AccountType2Choice>,
14282	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbt", skip_serializing_if = "Option::is_none") )]
14283	pub cdt_dbt: Option<CreditDebit3Code>,
14284	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInstrRsn", skip_serializing_if = "Option::is_none") )]
14285	pub sttlm_instr_rsn: Option<SettlementInstructionReason1Choice>,
14286	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctPurp", skip_serializing_if = "Option::is_none") )]
14287	pub csh_acct_purp: Option<CashAccountType3Choice>,
14288	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctDsgnt", skip_serializing_if = "Option::is_none") )]
14289	pub csh_acct_dsgnt: Option<AccountDesignation1Choice>,
14290	#[cfg_attr( feature = "derive_serde", serde(rename = "DvddPctg", skip_serializing_if = "Option::is_none") )]
14291	pub dvdd_pctg: Option<f64>,
14292}
14293
14294impl CashAccount204 {
14295	pub fn validate(&self) -> Result<(), ValidationError> {
14296		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
14297		if !pattern.is_match(&self.sttlm_ccy) {
14298			return Err(ValidationError::new(1005, "sttlm_ccy does not match the required pattern".to_string()));
14299		}
14300		self.id.validate()?;
14301		if let Some(ref val) = self.acct_ownr { val.validate()? }
14302		if let Some(ref val) = self.acct_svcr { val.validate()? }
14303		if let Some(ref val) = self.acct_svcr_brnch { val.validate()? }
14304		if let Some(ref vec) = self.acct_ownr_othr_id { for item in vec { item.validate()? } }
14305		if let Some(ref val) = self.invstmt_acct_tp { val.validate()? }
14306		if let Some(ref val) = self.cdt_dbt { val.validate()? }
14307		if let Some(ref val) = self.sttlm_instr_rsn { val.validate()? }
14308		if let Some(ref val) = self.csh_acct_purp { val.validate()? }
14309		if let Some(ref val) = self.csh_acct_dsgnt { val.validate()? }
14310		if let Some(ref val) = self.dvdd_pctg {
14311			if *val < 0.000000 {
14312				return Err(ValidationError::new(1003, "dvdd_pctg is less than the minimum value of 0.000000".to_string()));
14313			}
14314			if *val > 100.000000 {
14315				return Err(ValidationError::new(1004, "dvdd_pctg exceeds the maximum value of 100.000000".to_string()));
14316			}
14317		}
14318		Ok(())
14319	}
14320}
14321
14322
14323// CashAccount205 ...
14324#[cfg_attr(feature = "derive_debug", derive(Debug))]
14325#[cfg_attr(feature = "derive_default", derive(Default))]
14326#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14327#[cfg_attr(feature = "derive_clone", derive(Clone))]
14328#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14329pub struct CashAccount205 {
14330	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
14331	pub ccy: Option<String>,
14332	#[cfg_attr( feature = "derive_serde", serde(rename = "PmryAcct", skip_serializing_if = "Option::is_none") )]
14333	pub pmry_acct: Option<CashAccount206>,
14334	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndryAcct", skip_serializing_if = "Option::is_none") )]
14335	pub scndry_acct: Option<CashAccount206>,
14336}
14337
14338impl CashAccount205 {
14339	pub fn validate(&self) -> Result<(), ValidationError> {
14340		if let Some(ref val) = self.ccy {
14341			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
14342			if !pattern.is_match(val) {
14343				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
14344			}
14345		}
14346		if let Some(ref val) = self.pmry_acct { val.validate()? }
14347		if let Some(ref val) = self.scndry_acct { val.validate()? }
14348		Ok(())
14349	}
14350}
14351
14352
14353// CashAccount206 ...
14354#[cfg_attr(feature = "derive_debug", derive(Debug))]
14355#[cfg_attr(feature = "derive_default", derive(Default))]
14356#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14357#[cfg_attr(feature = "derive_clone", derive(Clone))]
14358#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14359pub struct CashAccount206 {
14360	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId") )]
14361	pub acct_id: AccountIdentificationAndName7,
14362	#[cfg_attr( feature = "derive_serde", serde(rename = "Svcr", skip_serializing_if = "Option::is_none") )]
14363	pub svcr: Option<String>,
14364	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctTpDesc", skip_serializing_if = "Option::is_none") )]
14365	pub acct_tp_desc: Option<String>,
14366}
14367
14368impl CashAccount206 {
14369	pub fn validate(&self) -> Result<(), ValidationError> {
14370		self.acct_id.validate()?;
14371		if let Some(ref val) = self.svcr {
14372			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
14373			if !pattern.is_match(val) {
14374				return Err(ValidationError::new(1005, "svcr does not match the required pattern".to_string()));
14375			}
14376		}
14377		if let Some(ref val) = self.acct_tp_desc {
14378			if val.chars().count() < 1 {
14379				return Err(ValidationError::new(1001, "acct_tp_desc is shorter than the minimum length of 1".to_string()));
14380			}
14381			if val.chars().count() > 35 {
14382				return Err(ValidationError::new(1002, "acct_tp_desc exceeds the maximum length of 35".to_string()));
14383			}
14384		}
14385		Ok(())
14386	}
14387}
14388
14389
14390// CashAccount40 ...
14391#[cfg_attr(feature = "derive_debug", derive(Debug))]
14392#[cfg_attr(feature = "derive_default", derive(Default))]
14393#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14394#[cfg_attr(feature = "derive_clone", derive(Clone))]
14395#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14396pub struct CashAccount40 {
14397	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
14398	pub id: Option<AccountIdentification4Choice>,
14399	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
14400	pub tp: Option<CashAccountType2Choice>,
14401	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
14402	pub ccy: Option<String>,
14403	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
14404	pub nm: Option<String>,
14405	#[cfg_attr( feature = "derive_serde", serde(rename = "Prxy", skip_serializing_if = "Option::is_none") )]
14406	pub prxy: Option<ProxyAccountIdentification1>,
14407}
14408
14409impl CashAccount40 {
14410	pub fn validate(&self) -> Result<(), ValidationError> {
14411		if let Some(ref val) = self.id { val.validate()? }
14412		if let Some(ref val) = self.tp { val.validate()? }
14413		if let Some(ref val) = self.ccy {
14414			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
14415			if !pattern.is_match(val) {
14416				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
14417			}
14418		}
14419		if let Some(ref val) = self.nm {
14420			if val.chars().count() < 1 {
14421				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
14422			}
14423			if val.chars().count() > 70 {
14424				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 70".to_string()));
14425			}
14426		}
14427		if let Some(ref val) = self.prxy { val.validate()? }
14428		Ok(())
14429	}
14430}
14431
14432
14433// CashAccount43 ...
14434#[cfg_attr(feature = "derive_debug", derive(Debug))]
14435#[cfg_attr(feature = "derive_default", derive(Default))]
14436#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14437#[cfg_attr(feature = "derive_clone", derive(Clone))]
14438#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14439pub struct CashAccount43 {
14440	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
14441	pub id: Option<AccountIdentification4Choice>,
14442	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
14443	pub tp: Option<CashAccountType2Choice>,
14444	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
14445	pub ccy: Option<String>,
14446	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
14447	pub nm: Option<String>,
14448	#[cfg_attr( feature = "derive_serde", serde(rename = "Prxy", skip_serializing_if = "Option::is_none") )]
14449	pub prxy: Option<ProxyAccountIdentification1>,
14450	#[cfg_attr( feature = "derive_serde", serde(rename = "Ownr", skip_serializing_if = "Option::is_none") )]
14451	pub ownr: Option<PartyIdentification272>,
14452	#[cfg_attr( feature = "derive_serde", serde(rename = "Svcr", skip_serializing_if = "Option::is_none") )]
14453	pub svcr: Option<BranchAndFinancialInstitutionIdentification8>,
14454}
14455
14456impl CashAccount43 {
14457	pub fn validate(&self) -> Result<(), ValidationError> {
14458		if let Some(ref val) = self.id { val.validate()? }
14459		if let Some(ref val) = self.tp { val.validate()? }
14460		if let Some(ref val) = self.ccy {
14461			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
14462			if !pattern.is_match(val) {
14463				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
14464			}
14465		}
14466		if let Some(ref val) = self.nm {
14467			if val.chars().count() < 1 {
14468				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
14469			}
14470			if val.chars().count() > 70 {
14471				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 70".to_string()));
14472			}
14473		}
14474		if let Some(ref val) = self.prxy { val.validate()? }
14475		if let Some(ref val) = self.ownr { val.validate()? }
14476		if let Some(ref val) = self.svcr { val.validate()? }
14477		Ok(())
14478	}
14479}
14480
14481
14482// CashAccountAndEntry5 ...
14483#[cfg_attr(feature = "derive_debug", derive(Debug))]
14484#[cfg_attr(feature = "derive_default", derive(Default))]
14485#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14486#[cfg_attr(feature = "derive_clone", derive(Clone))]
14487#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14488pub struct CashAccountAndEntry5 {
14489	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct") )]
14490	pub acct: CashAccount43,
14491	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntry", skip_serializing_if = "Option::is_none") )]
14492	pub ntry: Option<CashEntry2>,
14493}
14494
14495impl CashAccountAndEntry5 {
14496	pub fn validate(&self) -> Result<(), ValidationError> {
14497		self.acct.validate()?;
14498		if let Some(ref val) = self.ntry { val.validate()? }
14499		Ok(())
14500	}
14501}
14502
14503
14504// CashAccountCharacteristics5 ...
14505#[cfg_attr(feature = "derive_debug", derive(Debug))]
14506#[cfg_attr(feature = "derive_default", derive(Default))]
14507#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14508#[cfg_attr(feature = "derive_clone", derive(Clone))]
14509#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14510pub struct CashAccountCharacteristics5 {
14511	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctLvl") )]
14512	pub acct_lvl: AccountLevel2Code,
14513	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcct") )]
14514	pub csh_acct: CashAccount40,
14515	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
14516	pub acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
14517	#[cfg_attr( feature = "derive_serde", serde(rename = "PrntAcct", skip_serializing_if = "Option::is_none") )]
14518	pub prnt_acct: Option<ParentCashAccount5>,
14519	#[cfg_attr( feature = "derive_serde", serde(rename = "CompstnMtd") )]
14520	pub compstn_mtd: CompensationMethod1Code,
14521	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtAcct", skip_serializing_if = "Option::is_none") )]
14522	pub dbt_acct: Option<AccountIdentification4Choice>,
14523	#[cfg_attr( feature = "derive_serde", serde(rename = "DelydDbtDt", skip_serializing_if = "Option::is_none") )]
14524	pub delyd_dbt_dt: Option<String>,
14525	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmAdvc", skip_serializing_if = "Option::is_none") )]
14526	pub sttlm_advc: Option<String>,
14527	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctBalCcyCd") )]
14528	pub acct_bal_ccy_cd: String,
14529	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcyCd", skip_serializing_if = "Option::is_none") )]
14530	pub sttlm_ccy_cd: Option<String>,
14531	#[cfg_attr( feature = "derive_serde", serde(rename = "HstCcyCd", skip_serializing_if = "Option::is_none") )]
14532	pub hst_ccy_cd: Option<String>,
14533	#[cfg_attr( feature = "derive_serde", serde(rename = "Tax", skip_serializing_if = "Option::is_none") )]
14534	pub tax: Option<AccountTax1>,
14535	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrCtct") )]
14536	pub acct_svcr_ctct: Contact13,
14537}
14538
14539impl CashAccountCharacteristics5 {
14540	pub fn validate(&self) -> Result<(), ValidationError> {
14541		self.acct_lvl.validate()?;
14542		self.csh_acct.validate()?;
14543		if let Some(ref val) = self.acct_svcr { val.validate()? }
14544		if let Some(ref val) = self.prnt_acct { val.validate()? }
14545		self.compstn_mtd.validate()?;
14546		if let Some(ref val) = self.dbt_acct { val.validate()? }
14547		if let Some(ref val) = self.sttlm_advc {
14548			if val.chars().count() < 1 {
14549				return Err(ValidationError::new(1001, "sttlm_advc is shorter than the minimum length of 1".to_string()));
14550			}
14551			if val.chars().count() > 105 {
14552				return Err(ValidationError::new(1002, "sttlm_advc exceeds the maximum length of 105".to_string()));
14553			}
14554		}
14555		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
14556		if !pattern.is_match(&self.acct_bal_ccy_cd) {
14557			return Err(ValidationError::new(1005, "acct_bal_ccy_cd does not match the required pattern".to_string()));
14558		}
14559		if let Some(ref val) = self.sttlm_ccy_cd {
14560			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
14561			if !pattern.is_match(val) {
14562				return Err(ValidationError::new(1005, "sttlm_ccy_cd does not match the required pattern".to_string()));
14563			}
14564		}
14565		if let Some(ref val) = self.hst_ccy_cd {
14566			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
14567			if !pattern.is_match(val) {
14568				return Err(ValidationError::new(1005, "hst_ccy_cd does not match the required pattern".to_string()));
14569			}
14570		}
14571		if let Some(ref val) = self.tax { val.validate()? }
14572		self.acct_svcr_ctct.validate()?;
14573		Ok(())
14574	}
14575}
14576
14577
14578// CashAccountData1 ...
14579#[cfg_attr(feature = "derive_debug", derive(Debug))]
14580#[cfg_attr(feature = "derive_default", derive(Default))]
14581#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14582#[cfg_attr(feature = "derive_clone", derive(Clone))]
14583#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14584pub struct CashAccountData1 {
14585	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
14586	pub nm: Option<String>,
14587	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
14588	pub tp: Option<CashAccountType2Choice>,
14589	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
14590	pub ccy: Option<String>,
14591	#[cfg_attr( feature = "derive_serde", serde(rename = "Prxy", skip_serializing_if = "Option::is_none") )]
14592	pub prxy: Option<ProxyAccountIdentification1>,
14593	#[cfg_attr( feature = "derive_serde", serde(rename = "CurMulLmt", skip_serializing_if = "Option::is_none") )]
14594	pub cur_mul_lmt: Option<Limit5>,
14595	#[cfg_attr( feature = "derive_serde", serde(rename = "Ownr", skip_serializing_if = "Option::is_none") )]
14596	pub ownr: Option<PartyIdentification272>,
14597	#[cfg_attr( feature = "derive_serde", serde(rename = "Svcr", skip_serializing_if = "Option::is_none") )]
14598	pub svcr: Option<BranchAndFinancialInstitutionIdentification8>,
14599	#[cfg_attr( feature = "derive_serde", serde(rename = "MulBal", skip_serializing_if = "Option::is_none") )]
14600	pub mul_bal: Option<Vec<CashBalance13>>,
14601	#[cfg_attr( feature = "derive_serde", serde(rename = "CurBilLmt", skip_serializing_if = "Option::is_none") )]
14602	pub cur_bil_lmt: Option<Vec<BilateralLimit4>>,
14603	#[cfg_attr( feature = "derive_serde", serde(rename = "StgOrdr", skip_serializing_if = "Option::is_none") )]
14604	pub stg_ordr: Option<Vec<StandingOrder11>>,
14605}
14606
14607impl CashAccountData1 {
14608	pub fn validate(&self) -> Result<(), ValidationError> {
14609		if let Some(ref val) = self.nm {
14610			if val.chars().count() < 1 {
14611				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
14612			}
14613			if val.chars().count() > 70 {
14614				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 70".to_string()));
14615			}
14616		}
14617		if let Some(ref val) = self.tp { val.validate()? }
14618		if let Some(ref val) = self.ccy {
14619			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
14620			if !pattern.is_match(val) {
14621				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
14622			}
14623		}
14624		if let Some(ref val) = self.prxy { val.validate()? }
14625		if let Some(ref val) = self.cur_mul_lmt { val.validate()? }
14626		if let Some(ref val) = self.ownr { val.validate()? }
14627		if let Some(ref val) = self.svcr { val.validate()? }
14628		if let Some(ref vec) = self.mul_bal { for item in vec { item.validate()? } }
14629		if let Some(ref vec) = self.cur_bil_lmt { for item in vec { item.validate()? } }
14630		if let Some(ref vec) = self.stg_ordr { for item in vec { item.validate()? } }
14631		Ok(())
14632	}
14633}
14634
14635
14636// CashAccountEntrySearch8 ...
14637#[cfg_attr(feature = "derive_debug", derive(Debug))]
14638#[cfg_attr(feature = "derive_default", derive(Default))]
14639#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14640#[cfg_attr(feature = "derive_clone", derive(Clone))]
14641#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14642pub struct CashAccountEntrySearch8 {
14643	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
14644	pub acct_id: Option<Vec<AccountIdentificationSearchCriteria2Choice>>,
14645	#[cfg_attr( feature = "derive_serde", serde(rename = "NtryAmt", skip_serializing_if = "Option::is_none") )]
14646	pub ntry_amt: Option<Vec<ActiveOrHistoricAmountRange2Choice>>,
14647	#[cfg_attr( feature = "derive_serde", serde(rename = "NtryAmtCcy", skip_serializing_if = "Option::is_none") )]
14648	pub ntry_amt_ccy: Option<Vec<String>>,
14649	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
14650	pub cdt_dbt_ind: Option<CreditDebitCode>,
14651	#[cfg_attr( feature = "derive_serde", serde(rename = "NtrySts", skip_serializing_if = "Option::is_none") )]
14652	pub ntry_sts: Option<Vec<EntryStatus1Code>>,
14653	#[cfg_attr( feature = "derive_serde", serde(rename = "NtryDt", skip_serializing_if = "Option::is_none") )]
14654	pub ntry_dt: Option<Vec<DateAndDateTimeSearch3Choice>>,
14655	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
14656	pub acct_ownr: Option<PartyIdentification272>,
14657	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
14658	pub acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
14659}
14660
14661impl CashAccountEntrySearch8 {
14662	pub fn validate(&self) -> Result<(), ValidationError> {
14663		if let Some(ref vec) = self.acct_id { for item in vec { item.validate()? } }
14664		if let Some(ref vec) = self.ntry_amt { for item in vec { item.validate()? } }
14665		if let Some(ref vec) = self.ntry_amt_ccy {
14666			for item in vec {
14667				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
14668				if !pattern.is_match(&item) {
14669					return Err(ValidationError::new(1005, "ntry_amt_ccy does not match the required pattern".to_string()));
14670				}
14671			}
14672		}
14673		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
14674		if let Some(ref vec) = self.ntry_sts { for item in vec { item.validate()? } }
14675		if let Some(ref vec) = self.ntry_dt { for item in vec { item.validate()? } }
14676		if let Some(ref val) = self.acct_ownr { val.validate()? }
14677		if let Some(ref val) = self.acct_svcr { val.validate()? }
14678		Ok(())
14679	}
14680}
14681
14682
14683// CashAccountIdentification8Choice ...
14684#[cfg_attr(feature = "derive_debug", derive(Debug))]
14685#[cfg_attr(feature = "derive_default", derive(Default))]
14686#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14687#[cfg_attr(feature = "derive_clone", derive(Clone))]
14688#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14689pub struct CashAccountIdentification8Choice {
14690	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
14691	pub othr: Option<GenericAccountIdentification1>,
14692	#[cfg_attr( feature = "derive_serde", serde(rename = "IBAN", skip_serializing_if = "Option::is_none") )]
14693	pub iban: Option<String>,
14694}
14695
14696impl CashAccountIdentification8Choice {
14697	pub fn validate(&self) -> Result<(), ValidationError> {
14698		if let Some(ref val) = self.othr { val.validate()? }
14699		if let Some(ref val) = self.iban {
14700			let pattern = Regex::new("[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}").unwrap();
14701			if !pattern.is_match(val) {
14702				return Err(ValidationError::new(1005, "iban does not match the required pattern".to_string()));
14703			}
14704		}
14705		Ok(())
14706	}
14707}
14708
14709
14710// CashAccountReturnCriteria5 ...
14711#[cfg_attr(feature = "derive_debug", derive(Debug))]
14712#[cfg_attr(feature = "derive_default", derive(Default))]
14713#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14714#[cfg_attr(feature = "derive_clone", derive(Clone))]
14715#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14716pub struct CashAccountReturnCriteria5 {
14717	#[cfg_attr( feature = "derive_serde", serde(rename = "NmInd", skip_serializing_if = "Option::is_none") )]
14718	pub nm_ind: Option<bool>,
14719	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyInd", skip_serializing_if = "Option::is_none") )]
14720	pub ccy_ind: Option<bool>,
14721	#[cfg_attr( feature = "derive_serde", serde(rename = "TpInd", skip_serializing_if = "Option::is_none") )]
14722	pub tp_ind: Option<bool>,
14723	#[cfg_attr( feature = "derive_serde", serde(rename = "MulLmtInd", skip_serializing_if = "Option::is_none") )]
14724	pub mul_lmt_ind: Option<bool>,
14725	#[cfg_attr( feature = "derive_serde", serde(rename = "MulBalRtrCrit", skip_serializing_if = "Option::is_none") )]
14726	pub mul_bal_rtr_crit: Option<CashBalanceReturnCriteria2>,
14727	#[cfg_attr( feature = "derive_serde", serde(rename = "BilLmtInd", skip_serializing_if = "Option::is_none") )]
14728	pub bil_lmt_ind: Option<bool>,
14729	#[cfg_attr( feature = "derive_serde", serde(rename = "BilBalRtrCrit", skip_serializing_if = "Option::is_none") )]
14730	pub bil_bal_rtr_crit: Option<CashBalanceReturnCriteria2>,
14731	#[cfg_attr( feature = "derive_serde", serde(rename = "StgOrdrInd", skip_serializing_if = "Option::is_none") )]
14732	pub stg_ordr_ind: Option<bool>,
14733	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnrInd", skip_serializing_if = "Option::is_none") )]
14734	pub acct_ownr_ind: Option<bool>,
14735	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrInd", skip_serializing_if = "Option::is_none") )]
14736	pub acct_svcr_ind: Option<bool>,
14737}
14738
14739impl CashAccountReturnCriteria5 {
14740	pub fn validate(&self) -> Result<(), ValidationError> {
14741		if let Some(ref val) = self.mul_bal_rtr_crit { val.validate()? }
14742		if let Some(ref val) = self.bil_bal_rtr_crit { val.validate()? }
14743		Ok(())
14744	}
14745}
14746
14747
14748// CashAccountSearchCriteria8 ...
14749#[cfg_attr(feature = "derive_debug", derive(Debug))]
14750#[cfg_attr(feature = "derive_default", derive(Default))]
14751#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14752#[cfg_attr(feature = "derive_clone", derive(Clone))]
14753#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14754pub struct CashAccountSearchCriteria8 {
14755	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
14756	pub acct_id: Option<Vec<AccountIdentificationSearchCriteria2Choice>>,
14757	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
14758	pub tp: Option<Vec<CashAccountType2Choice>>,
14759	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
14760	pub ccy: Option<Vec<String>>,
14761	#[cfg_attr( feature = "derive_serde", serde(rename = "Bal", skip_serializing_if = "Option::is_none") )]
14762	pub bal: Option<Vec<CashBalance14>>,
14763	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
14764	pub acct_ownr: Option<PartyIdentification272>,
14765	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
14766	pub acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
14767}
14768
14769impl CashAccountSearchCriteria8 {
14770	pub fn validate(&self) -> Result<(), ValidationError> {
14771		if let Some(ref vec) = self.acct_id { for item in vec { item.validate()? } }
14772		if let Some(ref vec) = self.tp { for item in vec { item.validate()? } }
14773		if let Some(ref vec) = self.ccy {
14774			for item in vec {
14775				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
14776				if !pattern.is_match(&item) {
14777					return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
14778				}
14779			}
14780		}
14781		if let Some(ref vec) = self.bal { for item in vec { item.validate()? } }
14782		if let Some(ref val) = self.acct_ownr { val.validate()? }
14783		if let Some(ref val) = self.acct_svcr { val.validate()? }
14784		Ok(())
14785	}
14786}
14787
14788
14789// CashAccountType2Choice ...
14790#[cfg_attr(feature = "derive_debug", derive(Debug))]
14791#[cfg_attr(feature = "derive_default", derive(Default))]
14792#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14793#[cfg_attr(feature = "derive_clone", derive(Clone))]
14794#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14795pub struct CashAccountType2Choice {
14796	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
14797	pub cd: Option<String>,
14798	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
14799	pub prtry: Option<String>,
14800}
14801
14802impl CashAccountType2Choice {
14803	pub fn validate(&self) -> Result<(), ValidationError> {
14804		if let Some(ref val) = self.cd {
14805			if val.chars().count() < 1 {
14806				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
14807			}
14808			if val.chars().count() > 4 {
14809				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
14810			}
14811		}
14812		if let Some(ref val) = self.prtry {
14813			if val.chars().count() < 1 {
14814				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
14815			}
14816			if val.chars().count() > 35 {
14817				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
14818			}
14819		}
14820		Ok(())
14821	}
14822}
14823
14824
14825// CashAccountType3Choice ...
14826#[cfg_attr(feature = "derive_debug", derive(Debug))]
14827#[cfg_attr(feature = "derive_default", derive(Default))]
14828#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14829#[cfg_attr(feature = "derive_clone", derive(Clone))]
14830#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14831pub struct CashAccountType3Choice {
14832	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
14833	pub cd: Option<CashAccountType5Code>,
14834	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
14835	pub prtry: Option<GenericIdentification47>,
14836}
14837
14838impl CashAccountType3Choice {
14839	pub fn validate(&self) -> Result<(), ValidationError> {
14840		if let Some(ref val) = self.cd { val.validate()? }
14841		if let Some(ref val) = self.prtry { val.validate()? }
14842		Ok(())
14843	}
14844}
14845
14846
14847// CashAccountType5Code ...
14848#[cfg_attr(feature = "derive_debug", derive(Debug))]
14849#[cfg_attr(feature = "derive_default", derive(Default))]
14850#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14851#[cfg_attr(feature = "derive_clone", derive(Clone))]
14852#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14853pub enum CashAccountType5Code {
14854	#[cfg_attr(feature = "derive_default", default)]
14855	#[cfg_attr( feature = "derive_serde", serde(rename = "LEND") )]
14856	CodeLEND,
14857	#[cfg_attr( feature = "derive_serde", serde(rename = "COLL") )]
14858	CodeCOLL,
14859	#[cfg_attr( feature = "derive_serde", serde(rename = "SETT") )]
14860	CodeSETT,
14861	#[cfg_attr( feature = "derive_serde", serde(rename = "MARR") )]
14862	CodeMARR,
14863	#[cfg_attr( feature = "derive_serde", serde(rename = "SEGT") )]
14864	CodeSEGT,
14865}
14866
14867impl CashAccountType5Code {
14868	pub fn validate(&self) -> Result<(), ValidationError> {
14869		Ok(())
14870	}
14871}
14872
14873
14874// CashAvailability1 ...
14875#[cfg_attr(feature = "derive_debug", derive(Debug))]
14876#[cfg_attr(feature = "derive_default", derive(Default))]
14877#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14878#[cfg_attr(feature = "derive_clone", derive(Clone))]
14879#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14880pub struct CashAvailability1 {
14881	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt") )]
14882	pub dt: CashAvailabilityDate1Choice,
14883	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
14884	pub amt: ActiveOrHistoricCurrencyAndAmount,
14885	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
14886	pub cdt_dbt_ind: CreditDebitCode,
14887}
14888
14889impl CashAvailability1 {
14890	pub fn validate(&self) -> Result<(), ValidationError> {
14891		self.dt.validate()?;
14892		self.amt.validate()?;
14893		self.cdt_dbt_ind.validate()?;
14894		Ok(())
14895	}
14896}
14897
14898
14899// CashAvailabilityDate1Choice ...
14900#[cfg_attr(feature = "derive_debug", derive(Debug))]
14901#[cfg_attr(feature = "derive_default", derive(Default))]
14902#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14903#[cfg_attr(feature = "derive_clone", derive(Clone))]
14904#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14905pub struct CashAvailabilityDate1Choice {
14906	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfDays", skip_serializing_if = "Option::is_none") )]
14907	pub nb_of_days: Option<String>,
14908	#[cfg_attr( feature = "derive_serde", serde(rename = "ActlDt", skip_serializing_if = "Option::is_none") )]
14909	pub actl_dt: Option<String>,
14910}
14911
14912impl CashAvailabilityDate1Choice {
14913	pub fn validate(&self) -> Result<(), ValidationError> {
14914		if let Some(ref val) = self.nb_of_days {
14915			let pattern = Regex::new("[\\+]{0,1}[0-9]{1,15}").unwrap();
14916			if !pattern.is_match(val) {
14917				return Err(ValidationError::new(1005, "nb_of_days does not match the required pattern".to_string()));
14918			}
14919		}
14920		Ok(())
14921	}
14922}
14923
14924
14925// CashBalance11 ...
14926#[cfg_attr(feature = "derive_debug", derive(Debug))]
14927#[cfg_attr(feature = "derive_default", derive(Default))]
14928#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14929#[cfg_attr(feature = "derive_clone", derive(Clone))]
14930#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14931pub struct CashBalance11 {
14932	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
14933	pub amt: f64,
14934	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
14935	pub cdt_dbt_ind: CreditDebitCode,
14936	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
14937	pub tp: Option<BalanceType9Choice>,
14938	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
14939	pub sts: Option<BalanceStatus1Code>,
14940	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
14941	pub val_dt: Option<DateAndDateTime2Choice>,
14942	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfPmts", skip_serializing_if = "Option::is_none") )]
14943	pub nb_of_pmts: Option<f64>,
14944}
14945
14946impl CashBalance11 {
14947	pub fn validate(&self) -> Result<(), ValidationError> {
14948		if self.amt < 0.000000 {
14949			return Err(ValidationError::new(1003, "amt is less than the minimum value of 0.000000".to_string()));
14950		}
14951		self.cdt_dbt_ind.validate()?;
14952		if let Some(ref val) = self.tp { val.validate()? }
14953		if let Some(ref val) = self.sts { val.validate()? }
14954		if let Some(ref val) = self.val_dt { val.validate()? }
14955		Ok(())
14956	}
14957}
14958
14959
14960// CashBalance13 ...
14961#[cfg_attr(feature = "derive_debug", derive(Debug))]
14962#[cfg_attr(feature = "derive_default", derive(Default))]
14963#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
14964#[cfg_attr(feature = "derive_clone", derive(Clone))]
14965#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
14966pub struct CashBalance13 {
14967	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
14968	pub amt: f64,
14969	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
14970	pub cdt_dbt_ind: CreditDebitCode,
14971	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
14972	pub tp: Option<BalanceType11Choice>,
14973	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
14974	pub sts: Option<BalanceStatus1Code>,
14975	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
14976	pub val_dt: Option<DateAndDateTime2Choice>,
14977	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgDt", skip_serializing_if = "Option::is_none") )]
14978	pub prcg_dt: Option<DateAndDateTime2Choice>,
14979	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfPmts", skip_serializing_if = "Option::is_none") )]
14980	pub nb_of_pmts: Option<f64>,
14981	#[cfg_attr( feature = "derive_serde", serde(rename = "RstrctnTp", skip_serializing_if = "Option::is_none") )]
14982	pub rstrctn_tp: Option<BalanceRestrictionType1>,
14983}
14984
14985impl CashBalance13 {
14986	pub fn validate(&self) -> Result<(), ValidationError> {
14987		if self.amt < 0.000000 {
14988			return Err(ValidationError::new(1003, "amt is less than the minimum value of 0.000000".to_string()));
14989		}
14990		self.cdt_dbt_ind.validate()?;
14991		if let Some(ref val) = self.tp { val.validate()? }
14992		if let Some(ref val) = self.sts { val.validate()? }
14993		if let Some(ref val) = self.val_dt { val.validate()? }
14994		if let Some(ref val) = self.prcg_dt { val.validate()? }
14995		if let Some(ref val) = self.rstrctn_tp { val.validate()? }
14996		Ok(())
14997	}
14998}
14999
15000
15001// CashBalance14 ...
15002#[cfg_attr(feature = "derive_debug", derive(Debug))]
15003#[cfg_attr(feature = "derive_default", derive(Default))]
15004#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15005#[cfg_attr(feature = "derive_clone", derive(Clone))]
15006#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15007pub struct CashBalance14 {
15008	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
15009	pub tp: Option<Vec<BalanceType11Choice>>,
15010	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyTp") )]
15011	pub ctr_pty_tp: BalanceCounterparty1Code,
15012	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId", skip_serializing_if = "Option::is_none") )]
15013	pub ctr_pty_id: Option<Vec<BranchAndFinancialInstitutionIdentification8>>,
15014	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
15015	pub val_dt: Option<Vec<DateAndDateTimeSearch4Choice>>,
15016	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgDt", skip_serializing_if = "Option::is_none") )]
15017	pub prcg_dt: Option<DateAndDateTimeSearch4Choice>,
15018}
15019
15020impl CashBalance14 {
15021	pub fn validate(&self) -> Result<(), ValidationError> {
15022		if let Some(ref vec) = self.tp { for item in vec { item.validate()? } }
15023		self.ctr_pty_tp.validate()?;
15024		if let Some(ref vec) = self.ctr_pty_id { for item in vec { item.validate()? } }
15025		if let Some(ref vec) = self.val_dt { for item in vec { item.validate()? } }
15026		if let Some(ref val) = self.prcg_dt { val.validate()? }
15027		Ok(())
15028	}
15029}
15030
15031
15032// CashBalance8 ...
15033#[cfg_attr(feature = "derive_debug", derive(Debug))]
15034#[cfg_attr(feature = "derive_default", derive(Default))]
15035#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15036#[cfg_attr(feature = "derive_clone", derive(Clone))]
15037#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15038pub struct CashBalance8 {
15039	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
15040	pub tp: BalanceType13,
15041	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtLine", skip_serializing_if = "Option::is_none") )]
15042	pub cdt_line: Option<Vec<CreditLine3>>,
15043	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
15044	pub amt: ActiveOrHistoricCurrencyAndAmount,
15045	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
15046	pub cdt_dbt_ind: CreditDebitCode,
15047	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt") )]
15048	pub dt: DateAndDateTime2Choice,
15049	#[cfg_attr( feature = "derive_serde", serde(rename = "Avlbty", skip_serializing_if = "Option::is_none") )]
15050	pub avlbty: Option<Vec<CashAvailability1>>,
15051}
15052
15053impl CashBalance8 {
15054	pub fn validate(&self) -> Result<(), ValidationError> {
15055		self.tp.validate()?;
15056		if let Some(ref vec) = self.cdt_line { for item in vec { item.validate()? } }
15057		self.amt.validate()?;
15058		self.cdt_dbt_ind.validate()?;
15059		self.dt.validate()?;
15060		if let Some(ref vec) = self.avlbty { for item in vec { item.validate()? } }
15061		Ok(())
15062	}
15063}
15064
15065
15066// CashBalanceReturnCriteria2 ...
15067#[cfg_attr(feature = "derive_debug", derive(Debug))]
15068#[cfg_attr(feature = "derive_default", derive(Default))]
15069#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15070#[cfg_attr(feature = "derive_clone", derive(Clone))]
15071#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15072pub struct CashBalanceReturnCriteria2 {
15073	#[cfg_attr( feature = "derive_serde", serde(rename = "TpInd") )]
15074	pub tp_ind: bool,
15075	#[cfg_attr( feature = "derive_serde", serde(rename = "StsInd") )]
15076	pub sts_ind: bool,
15077	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDtInd") )]
15078	pub val_dt_ind: bool,
15079	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgDtInd") )]
15080	pub prcg_dt_ind: bool,
15081	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfPmtsInd") )]
15082	pub nb_of_pmts_ind: bool,
15083}
15084
15085impl CashBalanceReturnCriteria2 {
15086	pub fn validate(&self) -> Result<(), ValidationError> {
15087		Ok(())
15088	}
15089}
15090
15091
15092// CashBalanceType3Choice ...
15093#[cfg_attr(feature = "derive_debug", derive(Debug))]
15094#[cfg_attr(feature = "derive_default", derive(Default))]
15095#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15096#[cfg_attr(feature = "derive_clone", derive(Clone))]
15097#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15098pub struct CashBalanceType3Choice {
15099	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
15100	pub cd: Option<String>,
15101	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
15102	pub prtry: Option<GenericIdentification30>,
15103}
15104
15105impl CashBalanceType3Choice {
15106	pub fn validate(&self) -> Result<(), ValidationError> {
15107		if let Some(ref val) = self.cd {
15108			if val.chars().count() < 1 {
15109				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
15110			}
15111			if val.chars().count() > 4 {
15112				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
15113			}
15114		}
15115		if let Some(ref val) = self.prtry { val.validate()? }
15116		Ok(())
15117	}
15118}
15119
15120
15121// CashCollateral5 ...
15122#[cfg_attr(feature = "derive_debug", derive(Debug))]
15123#[cfg_attr(feature = "derive_default", derive(Default))]
15124#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15125#[cfg_attr(feature = "derive_clone", derive(Clone))]
15126#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15127pub struct CashCollateral5 {
15128	#[cfg_attr( feature = "derive_serde", serde(rename = "CollId", skip_serializing_if = "Option::is_none") )]
15129	pub coll_id: Option<String>,
15130	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctId", skip_serializing_if = "Option::is_none") )]
15131	pub csh_acct_id: Option<AccountIdentification4Choice>,
15132	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstNb", skip_serializing_if = "Option::is_none") )]
15133	pub asst_nb: Option<String>,
15134	#[cfg_attr( feature = "derive_serde", serde(rename = "DpstAmt", skip_serializing_if = "Option::is_none") )]
15135	pub dpst_amt: Option<ActiveCurrencyAndAmount>,
15136	#[cfg_attr( feature = "derive_serde", serde(rename = "DpstTp", skip_serializing_if = "Option::is_none") )]
15137	pub dpst_tp: Option<DepositType1Code>,
15138	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
15139	pub mtrty_dt: Option<String>,
15140	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
15141	pub val_dt: Option<String>,
15142	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate", skip_serializing_if = "Option::is_none") )]
15143	pub xchg_rate: Option<f64>,
15144	#[cfg_attr( feature = "derive_serde", serde(rename = "CollVal") )]
15145	pub coll_val: ActiveCurrencyAndAmount,
15146	#[cfg_attr( feature = "derive_serde", serde(rename = "Hrcut", skip_serializing_if = "Option::is_none") )]
15147	pub hrcut: Option<f64>,
15148}
15149
15150impl CashCollateral5 {
15151	pub fn validate(&self) -> Result<(), ValidationError> {
15152		if let Some(ref val) = self.coll_id {
15153			if val.chars().count() < 1 {
15154				return Err(ValidationError::new(1001, "coll_id is shorter than the minimum length of 1".to_string()));
15155			}
15156			if val.chars().count() > 35 {
15157				return Err(ValidationError::new(1002, "coll_id exceeds the maximum length of 35".to_string()));
15158			}
15159		}
15160		if let Some(ref val) = self.csh_acct_id { val.validate()? }
15161		if let Some(ref val) = self.asst_nb {
15162			if val.chars().count() < 1 {
15163				return Err(ValidationError::new(1001, "asst_nb is shorter than the minimum length of 1".to_string()));
15164			}
15165			if val.chars().count() > 35 {
15166				return Err(ValidationError::new(1002, "asst_nb exceeds the maximum length of 35".to_string()));
15167			}
15168		}
15169		if let Some(ref val) = self.dpst_amt { val.validate()? }
15170		if let Some(ref val) = self.dpst_tp { val.validate()? }
15171		self.coll_val.validate()?;
15172		Ok(())
15173	}
15174}
15175
15176
15177// CashCompare3 ...
15178#[cfg_attr(feature = "derive_debug", derive(Debug))]
15179#[cfg_attr(feature = "derive_default", derive(Default))]
15180#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15181#[cfg_attr(feature = "derive_clone", derive(Clone))]
15182#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15183pub struct CashCompare3 {
15184	#[cfg_attr( feature = "derive_serde", serde(rename = "Val", skip_serializing_if = "Option::is_none") )]
15185	pub val: Option<CompareAmountAndDirection2>,
15186	#[cfg_attr( feature = "derive_serde", serde(rename = "HrcutOrMrgn", skip_serializing_if = "Option::is_none") )]
15187	pub hrcut_or_mrgn: Option<ComparePercentageRate3>,
15188}
15189
15190impl CashCompare3 {
15191	pub fn validate(&self) -> Result<(), ValidationError> {
15192		if let Some(ref val) = self.val { val.validate()? }
15193		if let Some(ref val) = self.hrcut_or_mrgn { val.validate()? }
15194		Ok(())
15195	}
15196}
15197
15198
15199// CashDeposit1 ...
15200#[cfg_attr(feature = "derive_debug", derive(Debug))]
15201#[cfg_attr(feature = "derive_default", derive(Default))]
15202#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15203#[cfg_attr(feature = "derive_clone", derive(Clone))]
15204#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15205pub struct CashDeposit1 {
15206	#[cfg_attr( feature = "derive_serde", serde(rename = "NoteDnmtn") )]
15207	pub note_dnmtn: ActiveCurrencyAndAmount,
15208	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfNotes") )]
15209	pub nb_of_notes: String,
15210	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
15211	pub amt: ActiveCurrencyAndAmount,
15212}
15213
15214impl CashDeposit1 {
15215	pub fn validate(&self) -> Result<(), ValidationError> {
15216		self.note_dnmtn.validate()?;
15217		let pattern = Regex::new("[0-9]{1,15}").unwrap();
15218		if !pattern.is_match(&self.nb_of_notes) {
15219			return Err(ValidationError::new(1005, "nb_of_notes does not match the required pattern".to_string()));
15220		}
15221		self.amt.validate()?;
15222		Ok(())
15223	}
15224}
15225
15226
15227// CashEntry2 ...
15228#[cfg_attr(feature = "derive_debug", derive(Debug))]
15229#[cfg_attr(feature = "derive_default", derive(Default))]
15230#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15231#[cfg_attr(feature = "derive_clone", derive(Clone))]
15232#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15233pub struct CashEntry2 {
15234	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
15235	pub amt: Option<ActiveCurrencyAndAmount>,
15236	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
15237	pub dt: Option<DateAndDateTime2Choice>,
15238	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
15239	pub sts: Option<EntryStatus1Code>,
15240	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
15241	pub id: Option<String>,
15242	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtId", skip_serializing_if = "Option::is_none") )]
15243	pub stmt_id: Option<String>,
15244	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrRef", skip_serializing_if = "Option::is_none") )]
15245	pub acct_svcr_ref: Option<f64>,
15246	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlNtryInf", skip_serializing_if = "Option::is_none") )]
15247	pub addtl_ntry_inf: Option<Vec<String>>,
15248}
15249
15250impl CashEntry2 {
15251	pub fn validate(&self) -> Result<(), ValidationError> {
15252		if let Some(ref val) = self.amt { val.validate()? }
15253		if let Some(ref val) = self.dt { val.validate()? }
15254		if let Some(ref val) = self.sts { val.validate()? }
15255		if let Some(ref val) = self.id {
15256			if val.chars().count() < 1 {
15257				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
15258			}
15259			if val.chars().count() > 35 {
15260				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
15261			}
15262		}
15263		if let Some(ref val) = self.stmt_id {
15264			if val.chars().count() < 1 {
15265				return Err(ValidationError::new(1001, "stmt_id is shorter than the minimum length of 1".to_string()));
15266			}
15267			if val.chars().count() > 35 {
15268				return Err(ValidationError::new(1002, "stmt_id exceeds the maximum length of 35".to_string()));
15269			}
15270		}
15271		if let Some(ref vec) = self.addtl_ntry_inf {
15272			for item in vec {
15273				if item.chars().count() < 1 {
15274					return Err(ValidationError::new(1001, "addtl_ntry_inf is shorter than the minimum length of 1".to_string()));
15275				}
15276				if item.chars().count() > 140 {
15277					return Err(ValidationError::new(1002, "addtl_ntry_inf exceeds the maximum length of 140".to_string()));
15278				}
15279			}
15280		}
15281		Ok(())
15282	}
15283}
15284
15285
15286// CashInForecast5 ...
15287#[cfg_attr(feature = "derive_debug", derive(Debug))]
15288#[cfg_attr(feature = "derive_default", derive(Default))]
15289#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15290#[cfg_attr(feature = "derive_clone", derive(Clone))]
15291#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15292pub struct CashInForecast5 {
15293	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSttlmDt") )]
15294	pub csh_sttlm_dt: String,
15295	#[cfg_attr( feature = "derive_serde", serde(rename = "SubTtlAmt", skip_serializing_if = "Option::is_none") )]
15296	pub sub_ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
15297	#[cfg_attr( feature = "derive_serde", serde(rename = "SubTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
15298	pub sub_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
15299	#[cfg_attr( feature = "derive_serde", serde(rename = "XcptnlCshFlowInd", skip_serializing_if = "Option::is_none") )]
15300	pub xcptnl_csh_flow_ind: Option<bool>,
15301	#[cfg_attr( feature = "derive_serde", serde(rename = "CshInBrkdwnDtls", skip_serializing_if = "Option::is_none") )]
15302	pub csh_in_brkdwn_dtls: Option<Vec<FundCashInBreakdown3>>,
15303	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlBal", skip_serializing_if = "Option::is_none") )]
15304	pub addtl_bal: Option<FundBalance1>,
15305}
15306
15307impl CashInForecast5 {
15308	pub fn validate(&self) -> Result<(), ValidationError> {
15309		if let Some(ref val) = self.sub_ttl_amt { val.validate()? }
15310		if let Some(ref val) = self.sub_ttl_units_nb { val.validate()? }
15311		if let Some(ref vec) = self.csh_in_brkdwn_dtls { for item in vec { item.validate()? } }
15312		if let Some(ref val) = self.addtl_bal { val.validate()? }
15313		Ok(())
15314	}
15315}
15316
15317
15318// CashInForecast6 ...
15319#[cfg_attr(feature = "derive_debug", derive(Debug))]
15320#[cfg_attr(feature = "derive_default", derive(Default))]
15321#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15322#[cfg_attr(feature = "derive_clone", derive(Clone))]
15323#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15324pub struct CashInForecast6 {
15325	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSttlmDt") )]
15326	pub csh_sttlm_dt: String,
15327	#[cfg_attr( feature = "derive_serde", serde(rename = "SubTtlAmt", skip_serializing_if = "Option::is_none") )]
15328	pub sub_ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
15329	#[cfg_attr( feature = "derive_serde", serde(rename = "SubTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
15330	pub sub_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
15331	#[cfg_attr( feature = "derive_serde", serde(rename = "XcptnlCshFlowInd", skip_serializing_if = "Option::is_none") )]
15332	pub xcptnl_csh_flow_ind: Option<bool>,
15333	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlBal", skip_serializing_if = "Option::is_none") )]
15334	pub addtl_bal: Option<FundBalance1>,
15335}
15336
15337impl CashInForecast6 {
15338	pub fn validate(&self) -> Result<(), ValidationError> {
15339		if let Some(ref val) = self.sub_ttl_amt { val.validate()? }
15340		if let Some(ref val) = self.sub_ttl_units_nb { val.validate()? }
15341		if let Some(ref val) = self.addtl_bal { val.validate()? }
15342		Ok(())
15343	}
15344}
15345
15346
15347// CashInOutForecast7 ...
15348#[cfg_attr(feature = "derive_debug", derive(Debug))]
15349#[cfg_attr(feature = "derive_default", derive(Default))]
15350#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15351#[cfg_attr(feature = "derive_clone", derive(Clone))]
15352#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15353pub struct CashInOutForecast7 {
15354	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSttlmDt", skip_serializing_if = "Option::is_none") )]
15355	pub csh_sttlm_dt: Option<String>,
15356	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
15357	pub amt: ActiveOrHistoricCurrencyAndAmount,
15358}
15359
15360impl CashInOutForecast7 {
15361	pub fn validate(&self) -> Result<(), ValidationError> {
15362		self.amt.validate()?;
15363		Ok(())
15364	}
15365}
15366
15367
15368// CashOutForecast5 ...
15369#[cfg_attr(feature = "derive_debug", derive(Debug))]
15370#[cfg_attr(feature = "derive_default", derive(Default))]
15371#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15372#[cfg_attr(feature = "derive_clone", derive(Clone))]
15373#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15374pub struct CashOutForecast5 {
15375	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSttlmDt") )]
15376	pub csh_sttlm_dt: String,
15377	#[cfg_attr( feature = "derive_serde", serde(rename = "SubTtlAmt", skip_serializing_if = "Option::is_none") )]
15378	pub sub_ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
15379	#[cfg_attr( feature = "derive_serde", serde(rename = "SubTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
15380	pub sub_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
15381	#[cfg_attr( feature = "derive_serde", serde(rename = "XcptnlCshFlowInd", skip_serializing_if = "Option::is_none") )]
15382	pub xcptnl_csh_flow_ind: Option<bool>,
15383	#[cfg_attr( feature = "derive_serde", serde(rename = "CshOutBrkdwnDtls", skip_serializing_if = "Option::is_none") )]
15384	pub csh_out_brkdwn_dtls: Option<Vec<FundCashOutBreakdown3>>,
15385	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlBal", skip_serializing_if = "Option::is_none") )]
15386	pub addtl_bal: Option<FundBalance1>,
15387}
15388
15389impl CashOutForecast5 {
15390	pub fn validate(&self) -> Result<(), ValidationError> {
15391		if let Some(ref val) = self.sub_ttl_amt { val.validate()? }
15392		if let Some(ref val) = self.sub_ttl_units_nb { val.validate()? }
15393		if let Some(ref vec) = self.csh_out_brkdwn_dtls { for item in vec { item.validate()? } }
15394		if let Some(ref val) = self.addtl_bal { val.validate()? }
15395		Ok(())
15396	}
15397}
15398
15399
15400// CashOutForecast6 ...
15401#[cfg_attr(feature = "derive_debug", derive(Debug))]
15402#[cfg_attr(feature = "derive_default", derive(Default))]
15403#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15404#[cfg_attr(feature = "derive_clone", derive(Clone))]
15405#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15406pub struct CashOutForecast6 {
15407	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSttlmDt") )]
15408	pub csh_sttlm_dt: String,
15409	#[cfg_attr( feature = "derive_serde", serde(rename = "SubTtlAmt", skip_serializing_if = "Option::is_none") )]
15410	pub sub_ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
15411	#[cfg_attr( feature = "derive_serde", serde(rename = "SubTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
15412	pub sub_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
15413	#[cfg_attr( feature = "derive_serde", serde(rename = "XcptnlCshFlowInd", skip_serializing_if = "Option::is_none") )]
15414	pub xcptnl_csh_flow_ind: Option<bool>,
15415	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlBal", skip_serializing_if = "Option::is_none") )]
15416	pub addtl_bal: Option<FundBalance1>,
15417}
15418
15419impl CashOutForecast6 {
15420	pub fn validate(&self) -> Result<(), ValidationError> {
15421		if let Some(ref val) = self.sub_ttl_amt { val.validate()? }
15422		if let Some(ref val) = self.sub_ttl_units_nb { val.validate()? }
15423		if let Some(ref val) = self.addtl_bal { val.validate()? }
15424		Ok(())
15425	}
15426}
15427
15428
15429// CashParties24 ...
15430#[cfg_attr(feature = "derive_debug", derive(Debug))]
15431#[cfg_attr(feature = "derive_default", derive(Default))]
15432#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15433#[cfg_attr(feature = "derive_clone", derive(Clone))]
15434#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15435pub struct CashParties24 {
15436	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
15437	pub cdtr: PartyIdentificationAndAccount96,
15438	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt") )]
15439	pub cdtr_agt: PartyIdentificationAndAccount97,
15440	#[cfg_attr( feature = "derive_serde", serde(rename = "Intrmy", skip_serializing_if = "Option::is_none") )]
15441	pub intrmy: Option<PartyIdentificationAndAccount97>,
15442	#[cfg_attr( feature = "derive_serde", serde(rename = "Intrmy2", skip_serializing_if = "Option::is_none") )]
15443	pub intrmy2: Option<PartyIdentificationAndAccount97>,
15444}
15445
15446impl CashParties24 {
15447	pub fn validate(&self) -> Result<(), ValidationError> {
15448		self.cdtr.validate()?;
15449		self.cdtr_agt.validate()?;
15450		if let Some(ref val) = self.intrmy { val.validate()? }
15451		if let Some(ref val) = self.intrmy2 { val.validate()? }
15452		Ok(())
15453	}
15454}
15455
15456
15457// CashPaymentStatus2Code ...
15458#[cfg_attr(feature = "derive_debug", derive(Debug))]
15459#[cfg_attr(feature = "derive_default", derive(Default))]
15460#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15461#[cfg_attr(feature = "derive_clone", derive(Clone))]
15462#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15463pub enum CashPaymentStatus2Code {
15464	#[cfg_attr(feature = "derive_default", default)]
15465	#[cfg_attr( feature = "derive_serde", serde(rename = "PDNG") )]
15466	CodePDNG,
15467	#[cfg_attr( feature = "derive_serde", serde(rename = "FINL") )]
15468	CodeFINL,
15469}
15470
15471impl CashPaymentStatus2Code {
15472	pub fn validate(&self) -> Result<(), ValidationError> {
15473		Ok(())
15474	}
15475}
15476
15477
15478// CashReuseData1 ...
15479#[cfg_attr(feature = "derive_debug", derive(Debug))]
15480#[cfg_attr(feature = "derive_default", derive(Default))]
15481#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15482#[cfg_attr(feature = "derive_clone", derive(Clone))]
15483#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15484pub struct CashReuseData1 {
15485	#[cfg_attr( feature = "derive_serde", serde(rename = "RinvstdCsh") )]
15486	pub rinvstd_csh: Vec<ReinvestedCashTypeAndAmount1>,
15487	#[cfg_attr( feature = "derive_serde", serde(rename = "CshRinvstmtRate") )]
15488	pub csh_rinvstmt_rate: f64,
15489}
15490
15491impl CashReuseData1 {
15492	pub fn validate(&self) -> Result<(), ValidationError> {
15493		for item in &self.rinvstd_csh { item.validate()? }
15494		Ok(())
15495	}
15496}
15497
15498
15499// CashSettlement3 ...
15500#[cfg_attr(feature = "derive_debug", derive(Debug))]
15501#[cfg_attr(feature = "derive_default", derive(Default))]
15502#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15503#[cfg_attr(feature = "derive_clone", derive(Clone))]
15504#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15505pub struct CashSettlement3 {
15506	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctDtls", skip_serializing_if = "Option::is_none") )]
15507	pub csh_acct_dtls: Option<Vec<CashAccount204>>,
15508	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCshSttlmDtls", skip_serializing_if = "Option::is_none") )]
15509	pub othr_csh_sttlm_dtls: Option<Vec<PaymentInstrument17>>,
15510}
15511
15512impl CashSettlement3 {
15513	pub fn validate(&self) -> Result<(), ValidationError> {
15514		if let Some(ref vec) = self.csh_acct_dtls { for item in vec { item.validate()? } }
15515		if let Some(ref vec) = self.othr_csh_sttlm_dtls { for item in vec { item.validate()? } }
15516		Ok(())
15517	}
15518}
15519
15520
15521// CashSettlement4 ...
15522#[cfg_attr(feature = "derive_debug", derive(Debug))]
15523#[cfg_attr(feature = "derive_default", derive(Default))]
15524#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15525#[cfg_attr(feature = "derive_clone", derive(Clone))]
15526#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15527pub struct CashSettlement4 {
15528	#[cfg_attr( feature = "derive_serde", serde(rename = "ModScpIndctn") )]
15529	pub mod_scp_indctn: DataModification2Code,
15530	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctDtls", skip_serializing_if = "Option::is_none") )]
15531	pub csh_acct_dtls: Option<Vec<CashAccount204>>,
15532	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCshSttlmDtls", skip_serializing_if = "Option::is_none") )]
15533	pub othr_csh_sttlm_dtls: Option<Vec<PaymentInstrument17>>,
15534}
15535
15536impl CashSettlement4 {
15537	pub fn validate(&self) -> Result<(), ValidationError> {
15538		self.mod_scp_indctn.validate()?;
15539		if let Some(ref vec) = self.csh_acct_dtls { for item in vec { item.validate()? } }
15540		if let Some(ref vec) = self.othr_csh_sttlm_dtls { for item in vec { item.validate()? } }
15541		Ok(())
15542	}
15543}
15544
15545
15546// CashSubBalanceTypeAndQuantityBreakdown3 ...
15547#[cfg_attr(feature = "derive_debug", derive(Debug))]
15548#[cfg_attr(feature = "derive_default", derive(Default))]
15549#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15550#[cfg_attr(feature = "derive_clone", derive(Clone))]
15551#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15552pub struct CashSubBalanceTypeAndQuantityBreakdown3 {
15553	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
15554	pub tp: CashBalanceType3Choice,
15555	#[cfg_attr( feature = "derive_serde", serde(rename = "QtyBrkdwn", skip_serializing_if = "Option::is_none") )]
15556	pub qty_brkdwn: Option<Vec<AmountAndQuantityBreakdown1>>,
15557}
15558
15559impl CashSubBalanceTypeAndQuantityBreakdown3 {
15560	pub fn validate(&self) -> Result<(), ValidationError> {
15561		self.tp.validate()?;
15562		if let Some(ref vec) = self.qty_brkdwn { for item in vec { item.validate()? } }
15563		Ok(())
15564	}
15565}
15566
15567
15568// CategoryPurpose1Choice ...
15569#[cfg_attr(feature = "derive_debug", derive(Debug))]
15570#[cfg_attr(feature = "derive_default", derive(Default))]
15571#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15572#[cfg_attr(feature = "derive_clone", derive(Clone))]
15573#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15574pub struct CategoryPurpose1Choice {
15575	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
15576	pub cd: Option<String>,
15577	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
15578	pub prtry: Option<String>,
15579}
15580
15581impl CategoryPurpose1Choice {
15582	pub fn validate(&self) -> Result<(), ValidationError> {
15583		if let Some(ref val) = self.cd {
15584			if val.chars().count() < 1 {
15585				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
15586			}
15587			if val.chars().count() > 4 {
15588				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
15589			}
15590		}
15591		if let Some(ref val) = self.prtry {
15592			if val.chars().count() < 1 {
15593				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
15594			}
15595			if val.chars().count() > 35 {
15596				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
15597			}
15598		}
15599		Ok(())
15600	}
15601}
15602
15603
15604// CertificateIdentification1 ...
15605#[cfg_attr(feature = "derive_debug", derive(Debug))]
15606#[cfg_attr(feature = "derive_default", derive(Default))]
15607#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15608#[cfg_attr(feature = "derive_clone", derive(Clone))]
15609#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15610pub struct CertificateIdentification1 {
15611	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId", skip_serializing_if = "Option::is_none") )]
15612	pub msg_id: Option<String>,
15613	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrRef", skip_serializing_if = "Option::is_none") )]
15614	pub acct_svcr_ref: Option<String>,
15615	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfId", skip_serializing_if = "Option::is_none") )]
15616	pub pmt_inf_id: Option<String>,
15617	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
15618	pub instr_id: Option<String>,
15619	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId", skip_serializing_if = "Option::is_none") )]
15620	pub end_to_end_id: Option<String>,
15621	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
15622	pub prtry: Option<ProprietaryReference1>,
15623}
15624
15625impl CertificateIdentification1 {
15626	pub fn validate(&self) -> Result<(), ValidationError> {
15627		if let Some(ref val) = self.msg_id {
15628			if val.chars().count() < 1 {
15629				return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
15630			}
15631			if val.chars().count() > 35 {
15632				return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
15633			}
15634		}
15635		if let Some(ref val) = self.acct_svcr_ref {
15636			if val.chars().count() < 1 {
15637				return Err(ValidationError::new(1001, "acct_svcr_ref is shorter than the minimum length of 1".to_string()));
15638			}
15639			if val.chars().count() > 35 {
15640				return Err(ValidationError::new(1002, "acct_svcr_ref exceeds the maximum length of 35".to_string()));
15641			}
15642		}
15643		if let Some(ref val) = self.pmt_inf_id {
15644			if val.chars().count() < 1 {
15645				return Err(ValidationError::new(1001, "pmt_inf_id is shorter than the minimum length of 1".to_string()));
15646			}
15647			if val.chars().count() > 35 {
15648				return Err(ValidationError::new(1002, "pmt_inf_id exceeds the maximum length of 35".to_string()));
15649			}
15650		}
15651		if let Some(ref val) = self.instr_id {
15652			if val.chars().count() < 1 {
15653				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
15654			}
15655			if val.chars().count() > 35 {
15656				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
15657			}
15658		}
15659		if let Some(ref val) = self.end_to_end_id {
15660			if val.chars().count() < 1 {
15661				return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
15662			}
15663			if val.chars().count() > 35 {
15664				return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
15665			}
15666		}
15667		if let Some(ref val) = self.prtry { val.validate()? }
15668		Ok(())
15669	}
15670}
15671
15672
15673// CertificateReference2 ...
15674#[cfg_attr(feature = "derive_debug", derive(Debug))]
15675#[cfg_attr(feature = "derive_default", derive(Default))]
15676#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15677#[cfg_attr(feature = "derive_clone", derive(Clone))]
15678#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15679pub struct CertificateReference2 {
15680	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
15681	pub id: CertificateIdentification1,
15682	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
15683	pub dt: Option<String>,
15684}
15685
15686impl CertificateReference2 {
15687	pub fn validate(&self) -> Result<(), ValidationError> {
15688		self.id.validate()?;
15689		Ok(())
15690	}
15691}
15692
15693
15694// CertificateType2Code ...
15695#[cfg_attr(feature = "derive_debug", derive(Debug))]
15696#[cfg_attr(feature = "derive_default", derive(Default))]
15697#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15698#[cfg_attr(feature = "derive_clone", derive(Clone))]
15699#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15700pub enum CertificateType2Code {
15701	#[cfg_attr(feature = "derive_default", default)]
15702	#[cfg_attr( feature = "derive_serde", serde(rename = "AMLC") )]
15703	CodeAMLC,
15704	#[cfg_attr( feature = "derive_serde", serde(rename = "DVLC") )]
15705	CodeDVLC,
15706	#[cfg_attr( feature = "derive_serde", serde(rename = "DFOR") )]
15707	CodeDFOR,
15708	#[cfg_attr( feature = "derive_serde", serde(rename = "GOST") )]
15709	CodeGOST,
15710	#[cfg_attr( feature = "derive_serde", serde(rename = "IDEN") )]
15711	CodeIDEN,
15712	#[cfg_attr( feature = "derive_serde", serde(rename = "INCU") )]
15713	CodeINCU,
15714	#[cfg_attr( feature = "derive_serde", serde(rename = "LREF") )]
15715	CodeLREF,
15716	#[cfg_attr( feature = "derive_serde", serde(rename = "PASS") )]
15717	CodePASS,
15718	#[cfg_attr( feature = "derive_serde", serde(rename = "PRAD") )]
15719	CodePRAD,
15720	#[cfg_attr( feature = "derive_serde", serde(rename = "PKIC") )]
15721	CodePKIC,
15722}
15723
15724impl CertificateType2Code {
15725	pub fn validate(&self) -> Result<(), ValidationError> {
15726		Ok(())
15727	}
15728}
15729
15730
15731// CertificationType1Choice ...
15732#[cfg_attr(feature = "derive_debug", derive(Debug))]
15733#[cfg_attr(feature = "derive_default", derive(Default))]
15734#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15735#[cfg_attr(feature = "derive_clone", derive(Clone))]
15736#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15737pub struct CertificationType1Choice {
15738	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
15739	pub cd: Option<CertificateType2Code>,
15740	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
15741	pub prtry: Option<GenericIdentification47>,
15742}
15743
15744impl CertificationType1Choice {
15745	pub fn validate(&self) -> Result<(), ValidationError> {
15746		if let Some(ref val) = self.cd { val.validate()? }
15747		if let Some(ref val) = self.prtry { val.validate()? }
15748		Ok(())
15749	}
15750}
15751
15752
15753// Channel2Choice ...
15754#[cfg_attr(feature = "derive_debug", derive(Debug))]
15755#[cfg_attr(feature = "derive_default", derive(Default))]
15756#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15757#[cfg_attr(feature = "derive_clone", derive(Clone))]
15758#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15759pub struct Channel2Choice {
15760	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
15761	pub cd: Option<CommunicationMethod3Code>,
15762	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
15763	pub prtry: Option<String>,
15764}
15765
15766impl Channel2Choice {
15767	pub fn validate(&self) -> Result<(), ValidationError> {
15768		if let Some(ref val) = self.cd { val.validate()? }
15769		if let Some(ref val) = self.prtry {
15770			if val.chars().count() < 1 {
15771				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
15772			}
15773			if val.chars().count() > 35 {
15774				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
15775			}
15776		}
15777		Ok(())
15778	}
15779}
15780
15781
15782// CharacterSearch1Choice ...
15783#[cfg_attr(feature = "derive_debug", derive(Debug))]
15784#[cfg_attr(feature = "derive_default", derive(Default))]
15785#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15786#[cfg_attr(feature = "derive_clone", derive(Clone))]
15787#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15788pub struct CharacterSearch1Choice {
15789	#[cfg_attr( feature = "derive_serde", serde(rename = "EQ", skip_serializing_if = "Option::is_none") )]
15790	pub eq: Option<String>,
15791	#[cfg_attr( feature = "derive_serde", serde(rename = "NEQ", skip_serializing_if = "Option::is_none") )]
15792	pub neq: Option<String>,
15793	#[cfg_attr( feature = "derive_serde", serde(rename = "CT", skip_serializing_if = "Option::is_none") )]
15794	pub ct: Option<String>,
15795	#[cfg_attr( feature = "derive_serde", serde(rename = "NCT", skip_serializing_if = "Option::is_none") )]
15796	pub nct: Option<String>,
15797}
15798
15799impl CharacterSearch1Choice {
15800	pub fn validate(&self) -> Result<(), ValidationError> {
15801		if let Some(ref val) = self.eq {
15802			if val.chars().count() < 1 {
15803				return Err(ValidationError::new(1001, "eq is shorter than the minimum length of 1".to_string()));
15804			}
15805			if val.chars().count() > 35 {
15806				return Err(ValidationError::new(1002, "eq exceeds the maximum length of 35".to_string()));
15807			}
15808		}
15809		if let Some(ref val) = self.neq {
15810			if val.chars().count() < 1 {
15811				return Err(ValidationError::new(1001, "neq is shorter than the minimum length of 1".to_string()));
15812			}
15813			if val.chars().count() > 35 {
15814				return Err(ValidationError::new(1002, "neq exceeds the maximum length of 35".to_string()));
15815			}
15816		}
15817		if let Some(ref val) = self.ct {
15818			if val.chars().count() < 1 {
15819				return Err(ValidationError::new(1001, "ct is shorter than the minimum length of 1".to_string()));
15820			}
15821			if val.chars().count() > 35 {
15822				return Err(ValidationError::new(1002, "ct exceeds the maximum length of 35".to_string()));
15823			}
15824		}
15825		if let Some(ref val) = self.nct {
15826			if val.chars().count() < 1 {
15827				return Err(ValidationError::new(1001, "nct is shorter than the minimum length of 1".to_string()));
15828			}
15829			if val.chars().count() > 35 {
15830				return Err(ValidationError::new(1002, "nct exceeds the maximum length of 35".to_string()));
15831			}
15832		}
15833		Ok(())
15834	}
15835}
15836
15837
15838// Charge15 ...
15839#[cfg_attr(feature = "derive_debug", derive(Debug))]
15840#[cfg_attr(feature = "derive_default", derive(Default))]
15841#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15842#[cfg_attr(feature = "derive_clone", derive(Clone))]
15843#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15844pub struct Charge15 {
15845	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
15846	pub tp: Option<ChargeType9Code>,
15847	#[cfg_attr( feature = "derive_serde", serde(rename = "XtndedTp", skip_serializing_if = "Option::is_none") )]
15848	pub xtnded_tp: Option<String>,
15849	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
15850	pub amt: Option<ActiveCurrencyAnd13DecimalAmount>,
15851	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
15852	pub rate: Option<f64>,
15853	#[cfg_attr( feature = "derive_serde", serde(rename = "ClctnBsis", skip_serializing_if = "Option::is_none") )]
15854	pub clctn_bsis: Option<CalculationBasis2Code>,
15855	#[cfg_attr( feature = "derive_serde", serde(rename = "XtndedClctnBsis", skip_serializing_if = "Option::is_none") )]
15856	pub xtnded_clctn_bsis: Option<String>,
15857}
15858
15859impl Charge15 {
15860	pub fn validate(&self) -> Result<(), ValidationError> {
15861		if let Some(ref val) = self.tp { val.validate()? }
15862		if let Some(ref val) = self.xtnded_tp {
15863			if val.chars().count() < 1 {
15864				return Err(ValidationError::new(1001, "xtnded_tp is shorter than the minimum length of 1".to_string()));
15865			}
15866			if val.chars().count() > 350 {
15867				return Err(ValidationError::new(1002, "xtnded_tp exceeds the maximum length of 350".to_string()));
15868			}
15869		}
15870		if let Some(ref val) = self.amt { val.validate()? }
15871		if let Some(ref val) = self.clctn_bsis { val.validate()? }
15872		if let Some(ref val) = self.xtnded_clctn_bsis {
15873			if val.chars().count() < 1 {
15874				return Err(ValidationError::new(1001, "xtnded_clctn_bsis is shorter than the minimum length of 1".to_string()));
15875			}
15876			if val.chars().count() > 350 {
15877				return Err(ValidationError::new(1002, "xtnded_clctn_bsis exceeds the maximum length of 350".to_string()));
15878			}
15879		}
15880		Ok(())
15881	}
15882}
15883
15884
15885// Charge26 ...
15886#[cfg_attr(feature = "derive_debug", derive(Debug))]
15887#[cfg_attr(feature = "derive_default", derive(Default))]
15888#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15889#[cfg_attr(feature = "derive_clone", derive(Clone))]
15890#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15891pub struct Charge26 {
15892	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
15893	pub tp: ChargeType4Choice,
15894	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgApld") )]
15895	pub chrg_apld: AmountOrRate3Choice,
15896}
15897
15898impl Charge26 {
15899	pub fn validate(&self) -> Result<(), ValidationError> {
15900		self.tp.validate()?;
15901		self.chrg_apld.validate()?;
15902		Ok(())
15903	}
15904}
15905
15906
15907// ChargeBearerType1Code ...
15908#[cfg_attr(feature = "derive_debug", derive(Debug))]
15909#[cfg_attr(feature = "derive_default", derive(Default))]
15910#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15911#[cfg_attr(feature = "derive_clone", derive(Clone))]
15912#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15913pub enum ChargeBearerType1Code {
15914	#[cfg_attr(feature = "derive_default", default)]
15915	#[cfg_attr( feature = "derive_serde", serde(rename = "DEBT") )]
15916	CodeDEBT,
15917	#[cfg_attr( feature = "derive_serde", serde(rename = "CRED") )]
15918	CodeCRED,
15919	#[cfg_attr( feature = "derive_serde", serde(rename = "SHAR") )]
15920	CodeSHAR,
15921	#[cfg_attr( feature = "derive_serde", serde(rename = "SLEV") )]
15922	CodeSLEV,
15923}
15924
15925impl ChargeBearerType1Code {
15926	pub fn validate(&self) -> Result<(), ValidationError> {
15927		Ok(())
15928	}
15929}
15930
15931
15932// ChargeType12Code ...
15933#[cfg_attr(feature = "derive_debug", derive(Debug))]
15934#[cfg_attr(feature = "derive_default", derive(Default))]
15935#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15936#[cfg_attr(feature = "derive_clone", derive(Clone))]
15937#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15938pub enum ChargeType12Code {
15939	#[cfg_attr(feature = "derive_default", default)]
15940	#[cfg_attr( feature = "derive_serde", serde(rename = "BEND") )]
15941	CodeBEND,
15942	#[cfg_attr( feature = "derive_serde", serde(rename = "DISC") )]
15943	CodeDISC,
15944	#[cfg_attr( feature = "derive_serde", serde(rename = "FEND") )]
15945	CodeFEND,
15946	#[cfg_attr( feature = "derive_serde", serde(rename = "POST") )]
15947	CodePOST,
15948	#[cfg_attr( feature = "derive_serde", serde(rename = "REGF") )]
15949	CodeREGF,
15950	#[cfg_attr( feature = "derive_serde", serde(rename = "SHIP") )]
15951	CodeSHIP,
15952	#[cfg_attr( feature = "derive_serde", serde(rename = "SPCN") )]
15953	CodeSPCN,
15954	#[cfg_attr( feature = "derive_serde", serde(rename = "TRAN") )]
15955	CodeTRAN,
15956}
15957
15958impl ChargeType12Code {
15959	pub fn validate(&self) -> Result<(), ValidationError> {
15960		Ok(())
15961	}
15962}
15963
15964
15965// ChargeType3Choice ...
15966#[cfg_attr(feature = "derive_debug", derive(Debug))]
15967#[cfg_attr(feature = "derive_default", derive(Default))]
15968#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15969#[cfg_attr(feature = "derive_clone", derive(Clone))]
15970#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
15971pub struct ChargeType3Choice {
15972	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
15973	pub cd: Option<String>,
15974	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
15975	pub prtry: Option<GenericIdentification3>,
15976}
15977
15978impl ChargeType3Choice {
15979	pub fn validate(&self) -> Result<(), ValidationError> {
15980		if let Some(ref val) = self.cd {
15981			if val.chars().count() < 1 {
15982				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
15983			}
15984			if val.chars().count() > 4 {
15985				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
15986			}
15987		}
15988		if let Some(ref val) = self.prtry { val.validate()? }
15989		Ok(())
15990	}
15991}
15992
15993
15994// ChargeType4Choice ...
15995#[cfg_attr(feature = "derive_debug", derive(Debug))]
15996#[cfg_attr(feature = "derive_default", derive(Default))]
15997#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
15998#[cfg_attr(feature = "derive_clone", derive(Clone))]
15999#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16000pub struct ChargeType4Choice {
16001	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
16002	pub cd: Option<ChargeType12Code>,
16003	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
16004	pub prtry: Option<GenericIdentification47>,
16005}
16006
16007impl ChargeType4Choice {
16008	pub fn validate(&self) -> Result<(), ValidationError> {
16009		if let Some(ref val) = self.cd { val.validate()? }
16010		if let Some(ref val) = self.prtry { val.validate()? }
16011		Ok(())
16012	}
16013}
16014
16015
16016// ChargeType8Choice ...
16017#[cfg_attr(feature = "derive_debug", derive(Debug))]
16018#[cfg_attr(feature = "derive_default", derive(Default))]
16019#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16020#[cfg_attr(feature = "derive_clone", derive(Clone))]
16021#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16022pub struct ChargeType8Choice {
16023	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
16024	pub cd: Option<InvestmentFundMiFIDFee2Code>,
16025	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
16026	pub prtry: Option<GenericIdentification47>,
16027}
16028
16029impl ChargeType8Choice {
16030	pub fn validate(&self) -> Result<(), ValidationError> {
16031		if let Some(ref val) = self.cd { val.validate()? }
16032		if let Some(ref val) = self.prtry { val.validate()? }
16033		Ok(())
16034	}
16035}
16036
16037
16038// ChargeType9Code ...
16039#[cfg_attr(feature = "derive_debug", derive(Debug))]
16040#[cfg_attr(feature = "derive_default", derive(Default))]
16041#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16042#[cfg_attr(feature = "derive_clone", derive(Clone))]
16043#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16044pub enum ChargeType9Code {
16045	#[cfg_attr(feature = "derive_default", default)]
16046	#[cfg_attr( feature = "derive_serde", serde(rename = "MANF") )]
16047	CodeMANF,
16048	#[cfg_attr( feature = "derive_serde", serde(rename = "BEND") )]
16049	CodeBEND,
16050	#[cfg_attr( feature = "derive_serde", serde(rename = "FEND") )]
16051	CodeFEND,
16052	#[cfg_attr( feature = "derive_serde", serde(rename = "ADVI") )]
16053	CodeADVI,
16054	#[cfg_attr( feature = "derive_serde", serde(rename = "CUST") )]
16055	CodeCUST,
16056	#[cfg_attr( feature = "derive_serde", serde(rename = "PUBL") )]
16057	CodePUBL,
16058	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCT") )]
16059	CodeACCT,
16060	#[cfg_attr( feature = "derive_serde", serde(rename = "EQUL") )]
16061	CodeEQUL,
16062	#[cfg_attr( feature = "derive_serde", serde(rename = "PENA") )]
16063	CodePENA,
16064}
16065
16066impl ChargeType9Code {
16067	pub fn validate(&self) -> Result<(), ValidationError> {
16068		Ok(())
16069	}
16070}
16071
16072
16073// Charges14 ...
16074#[cfg_attr(feature = "derive_debug", derive(Debug))]
16075#[cfg_attr(feature = "derive_default", derive(Default))]
16076#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16077#[cfg_attr(feature = "derive_clone", derive(Clone))]
16078#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16079pub struct Charges14 {
16080	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
16081	pub amt: ActiveOrHistoricCurrencyAndAmount,
16082	#[cfg_attr( feature = "derive_serde", serde(rename = "Agt") )]
16083	pub agt: BranchAndFinancialInstitutionIdentification8,
16084	#[cfg_attr( feature = "derive_serde", serde(rename = "AgtAcct", skip_serializing_if = "Option::is_none") )]
16085	pub agt_acct: Option<CashAccount40>,
16086	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
16087	pub tp: Option<ChargeType3Choice>,
16088}
16089
16090impl Charges14 {
16091	pub fn validate(&self) -> Result<(), ValidationError> {
16092		self.amt.validate()?;
16093		self.agt.validate()?;
16094		if let Some(ref val) = self.agt_acct { val.validate()? }
16095		if let Some(ref val) = self.tp { val.validate()? }
16096		Ok(())
16097	}
16098}
16099
16100
16101// Charges15 ...
16102#[cfg_attr(feature = "derive_debug", derive(Debug))]
16103#[cfg_attr(feature = "derive_default", derive(Default))]
16104#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16105#[cfg_attr(feature = "derive_clone", derive(Clone))]
16106#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16107pub struct Charges15 {
16108	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlChrgsAndTaxAmt", skip_serializing_if = "Option::is_none") )]
16109	pub ttl_chrgs_and_tax_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
16110	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcrd", skip_serializing_if = "Option::is_none") )]
16111	pub rcrd: Option<Vec<ChargesRecord8>>,
16112}
16113
16114impl Charges15 {
16115	pub fn validate(&self) -> Result<(), ValidationError> {
16116		if let Some(ref val) = self.ttl_chrgs_and_tax_amt { val.validate()? }
16117		if let Some(ref vec) = self.rcrd { for item in vec { item.validate()? } }
16118		Ok(())
16119	}
16120}
16121
16122
16123// Charges16 ...
16124#[cfg_attr(feature = "derive_debug", derive(Debug))]
16125#[cfg_attr(feature = "derive_default", derive(Default))]
16126#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16127#[cfg_attr(feature = "derive_clone", derive(Clone))]
16128#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16129pub struct Charges16 {
16130	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
16131	pub amt: ActiveOrHistoricCurrencyAndAmount,
16132	#[cfg_attr( feature = "derive_serde", serde(rename = "Agt") )]
16133	pub agt: BranchAndFinancialInstitutionIdentification8,
16134	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
16135	pub tp: Option<ChargeType3Choice>,
16136}
16137
16138impl Charges16 {
16139	pub fn validate(&self) -> Result<(), ValidationError> {
16140		self.amt.validate()?;
16141		self.agt.validate()?;
16142		if let Some(ref val) = self.tp { val.validate()? }
16143		Ok(())
16144	}
16145}
16146
16147
16148// Charges3Choice ...
16149#[cfg_attr(feature = "derive_debug", derive(Debug))]
16150#[cfg_attr(feature = "derive_default", derive(Default))]
16151#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16152#[cfg_attr(feature = "derive_clone", derive(Clone))]
16153#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16154pub struct Charges3Choice {
16155	#[cfg_attr( feature = "derive_serde", serde(rename = "Sngl", skip_serializing_if = "Option::is_none") )]
16156	pub sngl: Option<ChargesRecord9>,
16157	#[cfg_attr( feature = "derive_serde", serde(rename = "PerTx", skip_serializing_if = "Option::is_none") )]
16158	pub per_tx: Option<ChargesPerTransaction3>,
16159	#[cfg_attr( feature = "derive_serde", serde(rename = "PerTp", skip_serializing_if = "Option::is_none") )]
16160	pub per_tp: Option<Vec<ChargesPerType3>>,
16161}
16162
16163impl Charges3Choice {
16164	pub fn validate(&self) -> Result<(), ValidationError> {
16165		if let Some(ref val) = self.sngl { val.validate()? }
16166		if let Some(ref val) = self.per_tx { val.validate()? }
16167		if let Some(ref vec) = self.per_tp { for item in vec { item.validate()? } }
16168		Ok(())
16169	}
16170}
16171
16172
16173// Charges4Choice ...
16174#[cfg_attr(feature = "derive_debug", derive(Debug))]
16175#[cfg_attr(feature = "derive_default", derive(Default))]
16176#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16177#[cfg_attr(feature = "derive_clone", derive(Clone))]
16178#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16179pub struct Charges4Choice {
16180	#[cfg_attr( feature = "derive_serde", serde(rename = "Sngl", skip_serializing_if = "Option::is_none") )]
16181	pub sngl: Option<ChargesRecord10>,
16182	#[cfg_attr( feature = "derive_serde", serde(rename = "PerTx", skip_serializing_if = "Option::is_none") )]
16183	pub per_tx: Option<ChargesPerTransaction4>,
16184	#[cfg_attr( feature = "derive_serde", serde(rename = "PerTp", skip_serializing_if = "Option::is_none") )]
16185	pub per_tp: Option<Vec<ChargesPerType4>>,
16186}
16187
16188impl Charges4Choice {
16189	pub fn validate(&self) -> Result<(), ValidationError> {
16190		if let Some(ref val) = self.sngl { val.validate()? }
16191		if let Some(ref val) = self.per_tx { val.validate()? }
16192		if let Some(ref vec) = self.per_tp { for item in vec { item.validate()? } }
16193		Ok(())
16194	}
16195}
16196
16197
16198// Charges6 ...
16199#[cfg_attr(feature = "derive_debug", derive(Debug))]
16200#[cfg_attr(feature = "derive_default", derive(Default))]
16201#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16202#[cfg_attr(feature = "derive_clone", derive(Clone))]
16203#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16204pub struct Charges6 {
16205	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlChrgsAndTaxAmt", skip_serializing_if = "Option::is_none") )]
16206	pub ttl_chrgs_and_tax_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
16207	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcrd", skip_serializing_if = "Option::is_none") )]
16208	pub rcrd: Option<Vec<ChargesRecord3>>,
16209}
16210
16211impl Charges6 {
16212	pub fn validate(&self) -> Result<(), ValidationError> {
16213		if let Some(ref val) = self.ttl_chrgs_and_tax_amt { val.validate()? }
16214		if let Some(ref vec) = self.rcrd { for item in vec { item.validate()? } }
16215		Ok(())
16216	}
16217}
16218
16219
16220// Charges7 ...
16221#[cfg_attr(feature = "derive_debug", derive(Debug))]
16222#[cfg_attr(feature = "derive_default", derive(Default))]
16223#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16224#[cfg_attr(feature = "derive_clone", derive(Clone))]
16225#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16226pub struct Charges7 {
16227	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
16228	pub amt: ActiveOrHistoricCurrencyAndAmount,
16229	#[cfg_attr( feature = "derive_serde", serde(rename = "Agt") )]
16230	pub agt: BranchAndFinancialInstitutionIdentification6,
16231}
16232
16233impl Charges7 {
16234	pub fn validate(&self) -> Result<(), ValidationError> {
16235		self.amt.validate()?;
16236		self.agt.validate()?;
16237		Ok(())
16238	}
16239}
16240
16241
16242// ChargesBreakdown1 ...
16243#[cfg_attr(feature = "derive_debug", derive(Debug))]
16244#[cfg_attr(feature = "derive_default", derive(Default))]
16245#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16246#[cfg_attr(feature = "derive_clone", derive(Clone))]
16247#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16248pub struct ChargesBreakdown1 {
16249	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
16250	pub amt: ActiveCurrencyAndAmount,
16251	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
16252	pub cdt_dbt_ind: Option<CreditDebitCode>,
16253	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
16254	pub tp: Option<ChargeType3Choice>,
16255}
16256
16257impl ChargesBreakdown1 {
16258	pub fn validate(&self) -> Result<(), ValidationError> {
16259		self.amt.validate()?;
16260		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
16261		if let Some(ref val) = self.tp { val.validate()? }
16262		Ok(())
16263	}
16264}
16265
16266
16267// ChargesPerTransaction3 ...
16268#[cfg_attr(feature = "derive_debug", derive(Debug))]
16269#[cfg_attr(feature = "derive_default", derive(Default))]
16270#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16271#[cfg_attr(feature = "derive_clone", derive(Clone))]
16272#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16273pub struct ChargesPerTransaction3 {
16274	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsId", skip_serializing_if = "Option::is_none") )]
16275	pub chrgs_id: Option<String>,
16276	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlChrgsPerTx", skip_serializing_if = "Option::is_none") )]
16277	pub ttl_chrgs_per_tx: Option<TotalCharges7>,
16278	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgt", skip_serializing_if = "Option::is_none") )]
16279	pub chrgs_acct_agt: Option<BranchAndFinancialInstitutionIdentification8>,
16280	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgtAcct", skip_serializing_if = "Option::is_none") )]
16281	pub chrgs_acct_agt_acct: Option<CashAccount40>,
16282	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcrd") )]
16283	pub rcrd: Vec<ChargesPerTransactionRecord3>,
16284	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
16285	pub addtl_inf: Option<String>,
16286}
16287
16288impl ChargesPerTransaction3 {
16289	pub fn validate(&self) -> Result<(), ValidationError> {
16290		if let Some(ref val) = self.chrgs_id {
16291			if val.chars().count() < 1 {
16292				return Err(ValidationError::new(1001, "chrgs_id is shorter than the minimum length of 1".to_string()));
16293			}
16294			if val.chars().count() > 35 {
16295				return Err(ValidationError::new(1002, "chrgs_id exceeds the maximum length of 35".to_string()));
16296			}
16297		}
16298		if let Some(ref val) = self.ttl_chrgs_per_tx { val.validate()? }
16299		if let Some(ref val) = self.chrgs_acct_agt { val.validate()? }
16300		if let Some(ref val) = self.chrgs_acct_agt_acct { val.validate()? }
16301		for item in &self.rcrd { item.validate()? }
16302		if let Some(ref val) = self.addtl_inf {
16303			if val.chars().count() < 1 {
16304				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
16305			}
16306			if val.chars().count() > 140 {
16307				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
16308			}
16309		}
16310		Ok(())
16311	}
16312}
16313
16314
16315// ChargesPerTransaction4 ...
16316#[cfg_attr(feature = "derive_debug", derive(Debug))]
16317#[cfg_attr(feature = "derive_default", derive(Default))]
16318#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16319#[cfg_attr(feature = "derive_clone", derive(Clone))]
16320#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16321pub struct ChargesPerTransaction4 {
16322	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsId", skip_serializing_if = "Option::is_none") )]
16323	pub chrgs_id: Option<String>,
16324	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlChrgsPerTx", skip_serializing_if = "Option::is_none") )]
16325	pub ttl_chrgs_per_tx: Option<TotalCharges7>,
16326	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcct", skip_serializing_if = "Option::is_none") )]
16327	pub chrgs_acct: Option<CashAccount40>,
16328	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctOwnr", skip_serializing_if = "Option::is_none") )]
16329	pub chrgs_acct_ownr: Option<BranchAndFinancialInstitutionIdentification8>,
16330	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcrd") )]
16331	pub rcrd: Vec<ChargesPerTransactionRecord4>,
16332	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
16333	pub addtl_inf: Option<String>,
16334}
16335
16336impl ChargesPerTransaction4 {
16337	pub fn validate(&self) -> Result<(), ValidationError> {
16338		if let Some(ref val) = self.chrgs_id {
16339			if val.chars().count() < 1 {
16340				return Err(ValidationError::new(1001, "chrgs_id is shorter than the minimum length of 1".to_string()));
16341			}
16342			if val.chars().count() > 35 {
16343				return Err(ValidationError::new(1002, "chrgs_id exceeds the maximum length of 35".to_string()));
16344			}
16345		}
16346		if let Some(ref val) = self.ttl_chrgs_per_tx { val.validate()? }
16347		if let Some(ref val) = self.chrgs_acct { val.validate()? }
16348		if let Some(ref val) = self.chrgs_acct_ownr { val.validate()? }
16349		for item in &self.rcrd { item.validate()? }
16350		if let Some(ref val) = self.addtl_inf {
16351			if val.chars().count() < 1 {
16352				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
16353			}
16354			if val.chars().count() > 140 {
16355				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
16356			}
16357		}
16358		Ok(())
16359	}
16360}
16361
16362
16363// ChargesPerTransactionRecord3 ...
16364#[cfg_attr(feature = "derive_debug", derive(Debug))]
16365#[cfg_attr(feature = "derive_default", derive(Default))]
16366#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16367#[cfg_attr(feature = "derive_clone", derive(Clone))]
16368#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16369pub struct ChargesPerTransactionRecord3 {
16370	#[cfg_attr( feature = "derive_serde", serde(rename = "RcrdId", skip_serializing_if = "Option::is_none") )]
16371	pub rcrd_id: Option<String>,
16372	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsRqstr", skip_serializing_if = "Option::is_none") )]
16373	pub chrgs_rqstr: Option<BranchAndFinancialInstitutionIdentification8>,
16374	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygTx") )]
16375	pub undrlyg_tx: TransactionReferences7,
16376	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlChrgsPerRcrd", skip_serializing_if = "Option::is_none") )]
16377	pub ttl_chrgs_per_rcrd: Option<TotalCharges8>,
16378	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsBrkdwn") )]
16379	pub chrgs_brkdwn: Vec<ChargesBreakdown1>,
16380	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
16381	pub val_dt: Option<DateAndDateTime2Choice>,
16382	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
16383	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
16384	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
16385	pub dbtr_agt_acct: Option<CashAccount40>,
16386	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgt", skip_serializing_if = "Option::is_none") )]
16387	pub chrgs_acct_agt: Option<BranchAndFinancialInstitutionIdentification8>,
16388	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgtAcct", skip_serializing_if = "Option::is_none") )]
16389	pub chrgs_acct_agt_acct: Option<CashAccount40>,
16390	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForInstdAgt", skip_serializing_if = "Option::is_none") )]
16391	pub instr_for_instd_agt: Option<InstructionForInstructedAgent1>,
16392	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
16393	pub addtl_inf: Option<String>,
16394}
16395
16396impl ChargesPerTransactionRecord3 {
16397	pub fn validate(&self) -> Result<(), ValidationError> {
16398		if let Some(ref val) = self.rcrd_id {
16399			if val.chars().count() < 1 {
16400				return Err(ValidationError::new(1001, "rcrd_id is shorter than the minimum length of 1".to_string()));
16401			}
16402			if val.chars().count() > 35 {
16403				return Err(ValidationError::new(1002, "rcrd_id exceeds the maximum length of 35".to_string()));
16404			}
16405		}
16406		if let Some(ref val) = self.chrgs_rqstr { val.validate()? }
16407		self.undrlyg_tx.validate()?;
16408		if let Some(ref val) = self.ttl_chrgs_per_rcrd { val.validate()? }
16409		for item in &self.chrgs_brkdwn { item.validate()? }
16410		if let Some(ref val) = self.val_dt { val.validate()? }
16411		if let Some(ref val) = self.dbtr_agt { val.validate()? }
16412		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
16413		if let Some(ref val) = self.chrgs_acct_agt { val.validate()? }
16414		if let Some(ref val) = self.chrgs_acct_agt_acct { val.validate()? }
16415		if let Some(ref val) = self.instr_for_instd_agt { val.validate()? }
16416		if let Some(ref val) = self.addtl_inf {
16417			if val.chars().count() < 1 {
16418				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
16419			}
16420			if val.chars().count() > 140 {
16421				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
16422			}
16423		}
16424		Ok(())
16425	}
16426}
16427
16428
16429// ChargesPerTransactionRecord4 ...
16430#[cfg_attr(feature = "derive_debug", derive(Debug))]
16431#[cfg_attr(feature = "derive_default", derive(Default))]
16432#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16433#[cfg_attr(feature = "derive_clone", derive(Clone))]
16434#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16435pub struct ChargesPerTransactionRecord4 {
16436	#[cfg_attr( feature = "derive_serde", serde(rename = "RcrdId", skip_serializing_if = "Option::is_none") )]
16437	pub rcrd_id: Option<String>,
16438	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsRqstr", skip_serializing_if = "Option::is_none") )]
16439	pub chrgs_rqstr: Option<BranchAndFinancialInstitutionIdentification8>,
16440	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygTx") )]
16441	pub undrlyg_tx: TransactionReferences7,
16442	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlChrgsPerRcrd", skip_serializing_if = "Option::is_none") )]
16443	pub ttl_chrgs_per_rcrd: Option<TotalCharges8>,
16444	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsBrkdwn") )]
16445	pub chrgs_brkdwn: Vec<ChargesBreakdown1>,
16446	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
16447	pub val_dt: Option<DateAndDateTime2Choice>,
16448	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
16449	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
16450	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
16451	pub dbtr_agt_acct: Option<CashAccount40>,
16452	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcct", skip_serializing_if = "Option::is_none") )]
16453	pub chrgs_acct: Option<CashAccount40>,
16454	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctOwnr", skip_serializing_if = "Option::is_none") )]
16455	pub chrgs_acct_ownr: Option<BranchAndFinancialInstitutionIdentification8>,
16456	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForInstdAgt", skip_serializing_if = "Option::is_none") )]
16457	pub instr_for_instd_agt: Option<InstructionForInstructedAgent1>,
16458	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
16459	pub addtl_inf: Option<String>,
16460}
16461
16462impl ChargesPerTransactionRecord4 {
16463	pub fn validate(&self) -> Result<(), ValidationError> {
16464		if let Some(ref val) = self.rcrd_id {
16465			if val.chars().count() < 1 {
16466				return Err(ValidationError::new(1001, "rcrd_id is shorter than the minimum length of 1".to_string()));
16467			}
16468			if val.chars().count() > 35 {
16469				return Err(ValidationError::new(1002, "rcrd_id exceeds the maximum length of 35".to_string()));
16470			}
16471		}
16472		if let Some(ref val) = self.chrgs_rqstr { val.validate()? }
16473		self.undrlyg_tx.validate()?;
16474		if let Some(ref val) = self.ttl_chrgs_per_rcrd { val.validate()? }
16475		for item in &self.chrgs_brkdwn { item.validate()? }
16476		if let Some(ref val) = self.val_dt { val.validate()? }
16477		if let Some(ref val) = self.dbtr_agt { val.validate()? }
16478		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
16479		if let Some(ref val) = self.chrgs_acct { val.validate()? }
16480		if let Some(ref val) = self.chrgs_acct_ownr { val.validate()? }
16481		if let Some(ref val) = self.instr_for_instd_agt { val.validate()? }
16482		if let Some(ref val) = self.addtl_inf {
16483			if val.chars().count() < 1 {
16484				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
16485			}
16486			if val.chars().count() > 140 {
16487				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
16488			}
16489		}
16490		Ok(())
16491	}
16492}
16493
16494
16495// ChargesPerType3 ...
16496#[cfg_attr(feature = "derive_debug", derive(Debug))]
16497#[cfg_attr(feature = "derive_default", derive(Default))]
16498#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16499#[cfg_attr(feature = "derive_clone", derive(Clone))]
16500#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16501pub struct ChargesPerType3 {
16502	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsId", skip_serializing_if = "Option::is_none") )]
16503	pub chrgs_id: Option<String>,
16504	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlChrgsPerChrgTp", skip_serializing_if = "Option::is_none") )]
16505	pub ttl_chrgs_per_chrg_tp: Option<TotalCharges7>,
16506	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgt", skip_serializing_if = "Option::is_none") )]
16507	pub chrgs_acct_agt: Option<BranchAndFinancialInstitutionIdentification8>,
16508	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgtAcct", skip_serializing_if = "Option::is_none") )]
16509	pub chrgs_acct_agt_acct: Option<CashAccount40>,
16510	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
16511	pub tp: ChargeType3Choice,
16512	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcrd") )]
16513	pub rcrd: Vec<ChargesPerTypeRecord3>,
16514	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
16515	pub addtl_inf: Option<String>,
16516}
16517
16518impl ChargesPerType3 {
16519	pub fn validate(&self) -> Result<(), ValidationError> {
16520		if let Some(ref val) = self.chrgs_id {
16521			if val.chars().count() < 1 {
16522				return Err(ValidationError::new(1001, "chrgs_id is shorter than the minimum length of 1".to_string()));
16523			}
16524			if val.chars().count() > 35 {
16525				return Err(ValidationError::new(1002, "chrgs_id exceeds the maximum length of 35".to_string()));
16526			}
16527		}
16528		if let Some(ref val) = self.ttl_chrgs_per_chrg_tp { val.validate()? }
16529		if let Some(ref val) = self.chrgs_acct_agt { val.validate()? }
16530		if let Some(ref val) = self.chrgs_acct_agt_acct { val.validate()? }
16531		self.tp.validate()?;
16532		for item in &self.rcrd { item.validate()? }
16533		if let Some(ref val) = self.addtl_inf {
16534			if val.chars().count() < 1 {
16535				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
16536			}
16537			if val.chars().count() > 140 {
16538				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
16539			}
16540		}
16541		Ok(())
16542	}
16543}
16544
16545
16546// ChargesPerType4 ...
16547#[cfg_attr(feature = "derive_debug", derive(Debug))]
16548#[cfg_attr(feature = "derive_default", derive(Default))]
16549#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16550#[cfg_attr(feature = "derive_clone", derive(Clone))]
16551#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16552pub struct ChargesPerType4 {
16553	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsId", skip_serializing_if = "Option::is_none") )]
16554	pub chrgs_id: Option<String>,
16555	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlChrgsPerChrgTp", skip_serializing_if = "Option::is_none") )]
16556	pub ttl_chrgs_per_chrg_tp: Option<TotalCharges7>,
16557	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcct", skip_serializing_if = "Option::is_none") )]
16558	pub chrgs_acct: Option<CashAccount40>,
16559	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctOwnr", skip_serializing_if = "Option::is_none") )]
16560	pub chrgs_acct_ownr: Option<BranchAndFinancialInstitutionIdentification8>,
16561	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
16562	pub tp: ChargeType3Choice,
16563	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcrd") )]
16564	pub rcrd: Vec<ChargesPerTypeRecord4>,
16565	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
16566	pub addtl_inf: Option<String>,
16567}
16568
16569impl ChargesPerType4 {
16570	pub fn validate(&self) -> Result<(), ValidationError> {
16571		if let Some(ref val) = self.chrgs_id {
16572			if val.chars().count() < 1 {
16573				return Err(ValidationError::new(1001, "chrgs_id is shorter than the minimum length of 1".to_string()));
16574			}
16575			if val.chars().count() > 35 {
16576				return Err(ValidationError::new(1002, "chrgs_id exceeds the maximum length of 35".to_string()));
16577			}
16578		}
16579		if let Some(ref val) = self.ttl_chrgs_per_chrg_tp { val.validate()? }
16580		if let Some(ref val) = self.chrgs_acct { val.validate()? }
16581		if let Some(ref val) = self.chrgs_acct_ownr { val.validate()? }
16582		self.tp.validate()?;
16583		for item in &self.rcrd { item.validate()? }
16584		if let Some(ref val) = self.addtl_inf {
16585			if val.chars().count() < 1 {
16586				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
16587			}
16588			if val.chars().count() > 140 {
16589				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
16590			}
16591		}
16592		Ok(())
16593	}
16594}
16595
16596
16597// ChargesPerTypeRecord3 ...
16598#[cfg_attr(feature = "derive_debug", derive(Debug))]
16599#[cfg_attr(feature = "derive_default", derive(Default))]
16600#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16601#[cfg_attr(feature = "derive_clone", derive(Clone))]
16602#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16603pub struct ChargesPerTypeRecord3 {
16604	#[cfg_attr( feature = "derive_serde", serde(rename = "RcrdId", skip_serializing_if = "Option::is_none") )]
16605	pub rcrd_id: Option<String>,
16606	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsRqstr", skip_serializing_if = "Option::is_none") )]
16607	pub chrgs_rqstr: Option<BranchAndFinancialInstitutionIdentification8>,
16608	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygTx") )]
16609	pub undrlyg_tx: TransactionReferences7,
16610	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
16611	pub amt: ActiveCurrencyAndAmount,
16612	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
16613	pub cdt_dbt_ind: Option<CreditDebitCode>,
16614	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
16615	pub val_dt: Option<DateAndDateTime2Choice>,
16616	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
16617	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
16618	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
16619	pub dbtr_agt_acct: Option<CashAccount40>,
16620	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgt", skip_serializing_if = "Option::is_none") )]
16621	pub chrgs_acct_agt: Option<BranchAndFinancialInstitutionIdentification8>,
16622	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgtAcct", skip_serializing_if = "Option::is_none") )]
16623	pub chrgs_acct_agt_acct: Option<CashAccount40>,
16624	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForInstdAgt", skip_serializing_if = "Option::is_none") )]
16625	pub instr_for_instd_agt: Option<InstructionForInstructedAgent1>,
16626	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
16627	pub addtl_inf: Option<String>,
16628}
16629
16630impl ChargesPerTypeRecord3 {
16631	pub fn validate(&self) -> Result<(), ValidationError> {
16632		if let Some(ref val) = self.rcrd_id {
16633			if val.chars().count() < 1 {
16634				return Err(ValidationError::new(1001, "rcrd_id is shorter than the minimum length of 1".to_string()));
16635			}
16636			if val.chars().count() > 35 {
16637				return Err(ValidationError::new(1002, "rcrd_id exceeds the maximum length of 35".to_string()));
16638			}
16639		}
16640		if let Some(ref val) = self.chrgs_rqstr { val.validate()? }
16641		self.undrlyg_tx.validate()?;
16642		self.amt.validate()?;
16643		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
16644		if let Some(ref val) = self.val_dt { val.validate()? }
16645		if let Some(ref val) = self.dbtr_agt { val.validate()? }
16646		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
16647		if let Some(ref val) = self.chrgs_acct_agt { val.validate()? }
16648		if let Some(ref val) = self.chrgs_acct_agt_acct { val.validate()? }
16649		if let Some(ref val) = self.instr_for_instd_agt { val.validate()? }
16650		if let Some(ref val) = self.addtl_inf {
16651			if val.chars().count() < 1 {
16652				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
16653			}
16654			if val.chars().count() > 140 {
16655				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
16656			}
16657		}
16658		Ok(())
16659	}
16660}
16661
16662
16663// ChargesPerTypeRecord4 ...
16664#[cfg_attr(feature = "derive_debug", derive(Debug))]
16665#[cfg_attr(feature = "derive_default", derive(Default))]
16666#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16667#[cfg_attr(feature = "derive_clone", derive(Clone))]
16668#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16669pub struct ChargesPerTypeRecord4 {
16670	#[cfg_attr( feature = "derive_serde", serde(rename = "RcrdId", skip_serializing_if = "Option::is_none") )]
16671	pub rcrd_id: Option<String>,
16672	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsRqstr", skip_serializing_if = "Option::is_none") )]
16673	pub chrgs_rqstr: Option<BranchAndFinancialInstitutionIdentification8>,
16674	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygTx") )]
16675	pub undrlyg_tx: TransactionReferences7,
16676	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
16677	pub amt: ActiveCurrencyAndAmount,
16678	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
16679	pub cdt_dbt_ind: Option<CreditDebitCode>,
16680	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
16681	pub val_dt: Option<DateAndDateTime2Choice>,
16682	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
16683	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
16684	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
16685	pub dbtr_agt_acct: Option<CashAccount40>,
16686	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcct", skip_serializing_if = "Option::is_none") )]
16687	pub chrgs_acct: Option<CashAccount40>,
16688	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctOwnr", skip_serializing_if = "Option::is_none") )]
16689	pub chrgs_acct_ownr: Option<BranchAndFinancialInstitutionIdentification8>,
16690	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForInstdAgt", skip_serializing_if = "Option::is_none") )]
16691	pub instr_for_instd_agt: Option<InstructionForInstructedAgent1>,
16692	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
16693	pub addtl_inf: Option<String>,
16694}
16695
16696impl ChargesPerTypeRecord4 {
16697	pub fn validate(&self) -> Result<(), ValidationError> {
16698		if let Some(ref val) = self.rcrd_id {
16699			if val.chars().count() < 1 {
16700				return Err(ValidationError::new(1001, "rcrd_id is shorter than the minimum length of 1".to_string()));
16701			}
16702			if val.chars().count() > 35 {
16703				return Err(ValidationError::new(1002, "rcrd_id exceeds the maximum length of 35".to_string()));
16704			}
16705		}
16706		if let Some(ref val) = self.chrgs_rqstr { val.validate()? }
16707		self.undrlyg_tx.validate()?;
16708		self.amt.validate()?;
16709		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
16710		if let Some(ref val) = self.val_dt { val.validate()? }
16711		if let Some(ref val) = self.dbtr_agt { val.validate()? }
16712		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
16713		if let Some(ref val) = self.chrgs_acct { val.validate()? }
16714		if let Some(ref val) = self.chrgs_acct_ownr { val.validate()? }
16715		if let Some(ref val) = self.instr_for_instd_agt { val.validate()? }
16716		if let Some(ref val) = self.addtl_inf {
16717			if val.chars().count() < 1 {
16718				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
16719			}
16720			if val.chars().count() > 140 {
16721				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
16722			}
16723		}
16724		Ok(())
16725	}
16726}
16727
16728
16729// ChargesRecord10 ...
16730#[cfg_attr(feature = "derive_debug", derive(Debug))]
16731#[cfg_attr(feature = "derive_default", derive(Default))]
16732#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16733#[cfg_attr(feature = "derive_clone", derive(Clone))]
16734#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16735pub struct ChargesRecord10 {
16736	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsId", skip_serializing_if = "Option::is_none") )]
16737	pub chrgs_id: Option<String>,
16738	#[cfg_attr( feature = "derive_serde", serde(rename = "RcrdId", skip_serializing_if = "Option::is_none") )]
16739	pub rcrd_id: Option<String>,
16740	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsRqstr", skip_serializing_if = "Option::is_none") )]
16741	pub chrgs_rqstr: Option<BranchAndFinancialInstitutionIdentification8>,
16742	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygTx") )]
16743	pub undrlyg_tx: TransactionReferences7,
16744	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
16745	pub amt: ActiveCurrencyAndAmount,
16746	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
16747	pub cdt_dbt_ind: Option<CreditDebitCode>,
16748	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
16749	pub val_dt: Option<DateAndDateTime2Choice>,
16750	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
16751	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
16752	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
16753	pub dbtr_agt_acct: Option<CashAccount40>,
16754	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcct", skip_serializing_if = "Option::is_none") )]
16755	pub chrgs_acct: Option<CashAccount40>,
16756	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctOwnr", skip_serializing_if = "Option::is_none") )]
16757	pub chrgs_acct_ownr: Option<BranchAndFinancialInstitutionIdentification8>,
16758	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
16759	pub tp: Option<ChargeType3Choice>,
16760	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForInstdAgt", skip_serializing_if = "Option::is_none") )]
16761	pub instr_for_instd_agt: Option<InstructionForInstructedAgent1>,
16762	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
16763	pub addtl_inf: Option<String>,
16764}
16765
16766impl ChargesRecord10 {
16767	pub fn validate(&self) -> Result<(), ValidationError> {
16768		if let Some(ref val) = self.chrgs_id {
16769			if val.chars().count() < 1 {
16770				return Err(ValidationError::new(1001, "chrgs_id is shorter than the minimum length of 1".to_string()));
16771			}
16772			if val.chars().count() > 35 {
16773				return Err(ValidationError::new(1002, "chrgs_id exceeds the maximum length of 35".to_string()));
16774			}
16775		}
16776		if let Some(ref val) = self.rcrd_id {
16777			if val.chars().count() < 1 {
16778				return Err(ValidationError::new(1001, "rcrd_id is shorter than the minimum length of 1".to_string()));
16779			}
16780			if val.chars().count() > 35 {
16781				return Err(ValidationError::new(1002, "rcrd_id exceeds the maximum length of 35".to_string()));
16782			}
16783		}
16784		if let Some(ref val) = self.chrgs_rqstr { val.validate()? }
16785		self.undrlyg_tx.validate()?;
16786		self.amt.validate()?;
16787		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
16788		if let Some(ref val) = self.val_dt { val.validate()? }
16789		if let Some(ref val) = self.dbtr_agt { val.validate()? }
16790		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
16791		if let Some(ref val) = self.chrgs_acct { val.validate()? }
16792		if let Some(ref val) = self.chrgs_acct_ownr { val.validate()? }
16793		if let Some(ref val) = self.tp { val.validate()? }
16794		if let Some(ref val) = self.instr_for_instd_agt { val.validate()? }
16795		if let Some(ref val) = self.addtl_inf {
16796			if val.chars().count() < 1 {
16797				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
16798			}
16799			if val.chars().count() > 140 {
16800				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
16801			}
16802		}
16803		Ok(())
16804	}
16805}
16806
16807
16808// ChargesRecord3 ...
16809#[cfg_attr(feature = "derive_debug", derive(Debug))]
16810#[cfg_attr(feature = "derive_default", derive(Default))]
16811#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16812#[cfg_attr(feature = "derive_clone", derive(Clone))]
16813#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16814pub struct ChargesRecord3 {
16815	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
16816	pub amt: ActiveOrHistoricCurrencyAndAmount,
16817	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
16818	pub cdt_dbt_ind: Option<CreditDebitCode>,
16819	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgInclInd", skip_serializing_if = "Option::is_none") )]
16820	pub chrg_incl_ind: Option<bool>,
16821	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
16822	pub tp: Option<ChargeType3Choice>,
16823	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
16824	pub rate: Option<f64>,
16825	#[cfg_attr( feature = "derive_serde", serde(rename = "Br", skip_serializing_if = "Option::is_none") )]
16826	pub br: Option<ChargeBearerType1Code>,
16827	#[cfg_attr( feature = "derive_serde", serde(rename = "Agt", skip_serializing_if = "Option::is_none") )]
16828	pub agt: Option<BranchAndFinancialInstitutionIdentification6>,
16829	#[cfg_attr( feature = "derive_serde", serde(rename = "Tax", skip_serializing_if = "Option::is_none") )]
16830	pub tax: Option<TaxCharges2>,
16831}
16832
16833impl ChargesRecord3 {
16834	pub fn validate(&self) -> Result<(), ValidationError> {
16835		self.amt.validate()?;
16836		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
16837		if let Some(ref val) = self.tp { val.validate()? }
16838		if let Some(ref val) = self.br { val.validate()? }
16839		if let Some(ref val) = self.agt { val.validate()? }
16840		if let Some(ref val) = self.tax { val.validate()? }
16841		Ok(())
16842	}
16843}
16844
16845
16846// ChargesRecord8 ...
16847#[cfg_attr(feature = "derive_debug", derive(Debug))]
16848#[cfg_attr(feature = "derive_default", derive(Default))]
16849#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16850#[cfg_attr(feature = "derive_clone", derive(Clone))]
16851#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16852pub struct ChargesRecord8 {
16853	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
16854	pub amt: ActiveOrHistoricCurrencyAndAmount,
16855	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
16856	pub cdt_dbt_ind: Option<CreditDebitCode>,
16857	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgInclInd", skip_serializing_if = "Option::is_none") )]
16858	pub chrg_incl_ind: Option<bool>,
16859	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
16860	pub tp: Option<ChargeType3Choice>,
16861	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
16862	pub rate: Option<f64>,
16863	#[cfg_attr( feature = "derive_serde", serde(rename = "Br", skip_serializing_if = "Option::is_none") )]
16864	pub br: Option<ChargeBearerType1Code>,
16865	#[cfg_attr( feature = "derive_serde", serde(rename = "Agt", skip_serializing_if = "Option::is_none") )]
16866	pub agt: Option<BranchAndFinancialInstitutionIdentification8>,
16867	#[cfg_attr( feature = "derive_serde", serde(rename = "Tax", skip_serializing_if = "Option::is_none") )]
16868	pub tax: Option<TaxCharges2>,
16869}
16870
16871impl ChargesRecord8 {
16872	pub fn validate(&self) -> Result<(), ValidationError> {
16873		self.amt.validate()?;
16874		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
16875		if let Some(ref val) = self.tp { val.validate()? }
16876		if let Some(ref val) = self.br { val.validate()? }
16877		if let Some(ref val) = self.agt { val.validate()? }
16878		if let Some(ref val) = self.tax { val.validate()? }
16879		Ok(())
16880	}
16881}
16882
16883
16884// ChargesRecord9 ...
16885#[cfg_attr(feature = "derive_debug", derive(Debug))]
16886#[cfg_attr(feature = "derive_default", derive(Default))]
16887#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16888#[cfg_attr(feature = "derive_clone", derive(Clone))]
16889#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16890pub struct ChargesRecord9 {
16891	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsId", skip_serializing_if = "Option::is_none") )]
16892	pub chrgs_id: Option<String>,
16893	#[cfg_attr( feature = "derive_serde", serde(rename = "RcrdId", skip_serializing_if = "Option::is_none") )]
16894	pub rcrd_id: Option<String>,
16895	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsRqstr", skip_serializing_if = "Option::is_none") )]
16896	pub chrgs_rqstr: Option<BranchAndFinancialInstitutionIdentification8>,
16897	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygTx") )]
16898	pub undrlyg_tx: TransactionReferences7,
16899	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
16900	pub amt: ActiveCurrencyAndAmount,
16901	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
16902	pub cdt_dbt_ind: Option<CreditDebitCode>,
16903	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
16904	pub val_dt: Option<DateAndDateTime2Choice>,
16905	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
16906	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
16907	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
16908	pub dbtr_agt_acct: Option<CashAccount40>,
16909	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgt", skip_serializing_if = "Option::is_none") )]
16910	pub chrgs_acct_agt: Option<BranchAndFinancialInstitutionIdentification8>,
16911	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgtAcct", skip_serializing_if = "Option::is_none") )]
16912	pub chrgs_acct_agt_acct: Option<CashAccount40>,
16913	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
16914	pub tp: Option<ChargeType3Choice>,
16915	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForInstdAgt", skip_serializing_if = "Option::is_none") )]
16916	pub instr_for_instd_agt: Option<InstructionForInstructedAgent1>,
16917	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
16918	pub addtl_inf: Option<String>,
16919}
16920
16921impl ChargesRecord9 {
16922	pub fn validate(&self) -> Result<(), ValidationError> {
16923		if let Some(ref val) = self.chrgs_id {
16924			if val.chars().count() < 1 {
16925				return Err(ValidationError::new(1001, "chrgs_id is shorter than the minimum length of 1".to_string()));
16926			}
16927			if val.chars().count() > 35 {
16928				return Err(ValidationError::new(1002, "chrgs_id exceeds the maximum length of 35".to_string()));
16929			}
16930		}
16931		if let Some(ref val) = self.rcrd_id {
16932			if val.chars().count() < 1 {
16933				return Err(ValidationError::new(1001, "rcrd_id is shorter than the minimum length of 1".to_string()));
16934			}
16935			if val.chars().count() > 35 {
16936				return Err(ValidationError::new(1002, "rcrd_id exceeds the maximum length of 35".to_string()));
16937			}
16938		}
16939		if let Some(ref val) = self.chrgs_rqstr { val.validate()? }
16940		self.undrlyg_tx.validate()?;
16941		self.amt.validate()?;
16942		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
16943		if let Some(ref val) = self.val_dt { val.validate()? }
16944		if let Some(ref val) = self.dbtr_agt { val.validate()? }
16945		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
16946		if let Some(ref val) = self.chrgs_acct_agt { val.validate()? }
16947		if let Some(ref val) = self.chrgs_acct_agt_acct { val.validate()? }
16948		if let Some(ref val) = self.tp { val.validate()? }
16949		if let Some(ref val) = self.instr_for_instd_agt { val.validate()? }
16950		if let Some(ref val) = self.addtl_inf {
16951			if val.chars().count() < 1 {
16952				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
16953			}
16954			if val.chars().count() > 140 {
16955				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
16956			}
16957		}
16958		Ok(())
16959	}
16960}
16961
16962
16963// Cheque17 ...
16964#[cfg_attr(feature = "derive_debug", derive(Debug))]
16965#[cfg_attr(feature = "derive_default", derive(Default))]
16966#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
16967#[cfg_attr(feature = "derive_clone", derive(Clone))]
16968#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
16969pub struct Cheque17 {
16970	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
16971	pub instr_id: Option<String>,
16972	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqNb") )]
16973	pub chq_nb: String,
16974	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseDt") )]
16975	pub isse_dt: String,
16976	#[cfg_attr( feature = "derive_serde", serde(rename = "StlDt", skip_serializing_if = "Option::is_none") )]
16977	pub stl_dt: Option<String>,
16978	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
16979	pub amt: ActiveCurrencyAndAmount,
16980	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
16981	pub val_dt: Option<DateAndDateTime2Choice>,
16982	#[cfg_attr( feature = "derive_serde", serde(rename = "Pyer", skip_serializing_if = "Option::is_none") )]
16983	pub pyer: Option<PartyIdentification272>,
16984	#[cfg_attr( feature = "derive_serde", serde(rename = "PyerAcct", skip_serializing_if = "Option::is_none") )]
16985	pub pyer_acct: Option<CashAccount40>,
16986	#[cfg_attr( feature = "derive_serde", serde(rename = "DrwrAgt", skip_serializing_if = "Option::is_none") )]
16987	pub drwr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
16988	#[cfg_attr( feature = "derive_serde", serde(rename = "DrwrAgtAcct", skip_serializing_if = "Option::is_none") )]
16989	pub drwr_agt_acct: Option<CashAccount40>,
16990	#[cfg_attr( feature = "derive_serde", serde(rename = "Pyee") )]
16991	pub pyee: PartyIdentification272,
16992	#[cfg_attr( feature = "derive_serde", serde(rename = "PyeeAcct", skip_serializing_if = "Option::is_none") )]
16993	pub pyee_acct: Option<CashAccount40>,
16994	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForChqAgt", skip_serializing_if = "Option::is_none") )]
16995	pub instr_for_chq_agt: Option<Vec<InstructionForChequeAgent1>>,
16996}
16997
16998impl Cheque17 {
16999	pub fn validate(&self) -> Result<(), ValidationError> {
17000		if let Some(ref val) = self.instr_id {
17001			if val.chars().count() < 1 {
17002				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
17003			}
17004			if val.chars().count() > 35 {
17005				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
17006			}
17007		}
17008		if self.chq_nb.chars().count() < 1 {
17009			return Err(ValidationError::new(1001, "chq_nb is shorter than the minimum length of 1".to_string()));
17010		}
17011		if self.chq_nb.chars().count() > 35 {
17012			return Err(ValidationError::new(1002, "chq_nb exceeds the maximum length of 35".to_string()));
17013		}
17014		self.amt.validate()?;
17015		if let Some(ref val) = self.val_dt { val.validate()? }
17016		if let Some(ref val) = self.pyer { val.validate()? }
17017		if let Some(ref val) = self.pyer_acct { val.validate()? }
17018		if let Some(ref val) = self.drwr_agt { val.validate()? }
17019		if let Some(ref val) = self.drwr_agt_acct { val.validate()? }
17020		self.pyee.validate()?;
17021		if let Some(ref val) = self.pyee_acct { val.validate()? }
17022		if let Some(ref vec) = self.instr_for_chq_agt { for item in vec { item.validate()? } }
17023		Ok(())
17024	}
17025}
17026
17027
17028// Cheque18 ...
17029#[cfg_attr(feature = "derive_debug", derive(Debug))]
17030#[cfg_attr(feature = "derive_default", derive(Default))]
17031#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17032#[cfg_attr(feature = "derive_clone", derive(Clone))]
17033#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17034pub struct Cheque18 {
17035	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
17036	pub instr_id: Option<String>,
17037	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
17038	pub orgnl_instr_id: Option<String>,
17039	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqNb") )]
17040	pub chq_nb: String,
17041	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseDt") )]
17042	pub isse_dt: String,
17043	#[cfg_attr( feature = "derive_serde", serde(rename = "StlDt", skip_serializing_if = "Option::is_none") )]
17044	pub stl_dt: Option<String>,
17045	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
17046	pub amt: ActiveCurrencyAndAmount,
17047	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvDt", skip_serializing_if = "Option::is_none") )]
17048	pub fctv_dt: Option<DateAndDateTime2Choice>,
17049	#[cfg_attr( feature = "derive_serde", serde(rename = "DrwrAgt", skip_serializing_if = "Option::is_none") )]
17050	pub drwr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
17051	#[cfg_attr( feature = "derive_serde", serde(rename = "DrwrAgtAcct", skip_serializing_if = "Option::is_none") )]
17052	pub drwr_agt_acct: Option<CashAccount40>,
17053	#[cfg_attr( feature = "derive_serde", serde(rename = "Pyee", skip_serializing_if = "Option::is_none") )]
17054	pub pyee: Option<PartyIdentification272>,
17055	#[cfg_attr( feature = "derive_serde", serde(rename = "PyeeAcct", skip_serializing_if = "Option::is_none") )]
17056	pub pyee_acct: Option<CashAccount40>,
17057	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqCxlOrStopSts") )]
17058	pub chq_cxl_or_stop_sts: ChequeCancellationStatus1,
17059}
17060
17061impl Cheque18 {
17062	pub fn validate(&self) -> Result<(), ValidationError> {
17063		if let Some(ref val) = self.instr_id {
17064			if val.chars().count() < 1 {
17065				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
17066			}
17067			if val.chars().count() > 35 {
17068				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
17069			}
17070		}
17071		if let Some(ref val) = self.orgnl_instr_id {
17072			if val.chars().count() < 1 {
17073				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
17074			}
17075			if val.chars().count() > 35 {
17076				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
17077			}
17078		}
17079		if self.chq_nb.chars().count() < 1 {
17080			return Err(ValidationError::new(1001, "chq_nb is shorter than the minimum length of 1".to_string()));
17081		}
17082		if self.chq_nb.chars().count() > 35 {
17083			return Err(ValidationError::new(1002, "chq_nb exceeds the maximum length of 35".to_string()));
17084		}
17085		self.amt.validate()?;
17086		if let Some(ref val) = self.fctv_dt { val.validate()? }
17087		if let Some(ref val) = self.drwr_agt { val.validate()? }
17088		if let Some(ref val) = self.drwr_agt_acct { val.validate()? }
17089		if let Some(ref val) = self.pyee { val.validate()? }
17090		if let Some(ref val) = self.pyee_acct { val.validate()? }
17091		self.chq_cxl_or_stop_sts.validate()?;
17092		Ok(())
17093	}
17094}
17095
17096
17097// Cheque19 ...
17098#[cfg_attr(feature = "derive_debug", derive(Debug))]
17099#[cfg_attr(feature = "derive_default", derive(Default))]
17100#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17101#[cfg_attr(feature = "derive_clone", derive(Clone))]
17102#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17103pub struct Cheque19 {
17104	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqTp", skip_serializing_if = "Option::is_none") )]
17105	pub chq_tp: Option<ChequeType2Code>,
17106	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqNb", skip_serializing_if = "Option::is_none") )]
17107	pub chq_nb: Option<String>,
17108	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqFr", skip_serializing_if = "Option::is_none") )]
17109	pub chq_fr: Option<NameAndAddress18>,
17110	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryMtd", skip_serializing_if = "Option::is_none") )]
17111	pub dlvry_mtd: Option<ChequeDeliveryMethod1Choice>,
17112	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvrTo", skip_serializing_if = "Option::is_none") )]
17113	pub dlvr_to: Option<NameAndAddress18>,
17114	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrPrty", skip_serializing_if = "Option::is_none") )]
17115	pub instr_prty: Option<Priority2Code>,
17116	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqMtrtyDt", skip_serializing_if = "Option::is_none") )]
17117	pub chq_mtrty_dt: Option<String>,
17118	#[cfg_attr( feature = "derive_serde", serde(rename = "FrmsCd", skip_serializing_if = "Option::is_none") )]
17119	pub frms_cd: Option<String>,
17120	#[cfg_attr( feature = "derive_serde", serde(rename = "MemoFld", skip_serializing_if = "Option::is_none") )]
17121	pub memo_fld: Option<Vec<String>>,
17122	#[cfg_attr( feature = "derive_serde", serde(rename = "RgnlClrZone", skip_serializing_if = "Option::is_none") )]
17123	pub rgnl_clr_zone: Option<String>,
17124	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtLctn", skip_serializing_if = "Option::is_none") )]
17125	pub prt_lctn: Option<String>,
17126	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgntr", skip_serializing_if = "Option::is_none") )]
17127	pub sgntr: Option<Vec<String>>,
17128}
17129
17130impl Cheque19 {
17131	pub fn validate(&self) -> Result<(), ValidationError> {
17132		if let Some(ref val) = self.chq_tp { val.validate()? }
17133		if let Some(ref val) = self.chq_nb {
17134			if val.chars().count() < 1 {
17135				return Err(ValidationError::new(1001, "chq_nb is shorter than the minimum length of 1".to_string()));
17136			}
17137			if val.chars().count() > 35 {
17138				return Err(ValidationError::new(1002, "chq_nb exceeds the maximum length of 35".to_string()));
17139			}
17140		}
17141		if let Some(ref val) = self.chq_fr { val.validate()? }
17142		if let Some(ref val) = self.dlvry_mtd { val.validate()? }
17143		if let Some(ref val) = self.dlvr_to { val.validate()? }
17144		if let Some(ref val) = self.instr_prty { val.validate()? }
17145		if let Some(ref val) = self.frms_cd {
17146			if val.chars().count() < 1 {
17147				return Err(ValidationError::new(1001, "frms_cd is shorter than the minimum length of 1".to_string()));
17148			}
17149			if val.chars().count() > 35 {
17150				return Err(ValidationError::new(1002, "frms_cd exceeds the maximum length of 35".to_string()));
17151			}
17152		}
17153		if let Some(ref vec) = self.memo_fld {
17154			for item in vec {
17155				if item.chars().count() < 1 {
17156					return Err(ValidationError::new(1001, "memo_fld is shorter than the minimum length of 1".to_string()));
17157				}
17158				if item.chars().count() > 35 {
17159					return Err(ValidationError::new(1002, "memo_fld exceeds the maximum length of 35".to_string()));
17160				}
17161			}
17162		}
17163		if let Some(ref val) = self.rgnl_clr_zone {
17164			if val.chars().count() < 1 {
17165				return Err(ValidationError::new(1001, "rgnl_clr_zone is shorter than the minimum length of 1".to_string()));
17166			}
17167			if val.chars().count() > 35 {
17168				return Err(ValidationError::new(1002, "rgnl_clr_zone exceeds the maximum length of 35".to_string()));
17169			}
17170		}
17171		if let Some(ref val) = self.prt_lctn {
17172			if val.chars().count() < 1 {
17173				return Err(ValidationError::new(1001, "prt_lctn is shorter than the minimum length of 1".to_string()));
17174			}
17175			if val.chars().count() > 35 {
17176				return Err(ValidationError::new(1002, "prt_lctn exceeds the maximum length of 35".to_string()));
17177			}
17178		}
17179		if let Some(ref vec) = self.sgntr {
17180			for item in vec {
17181				if item.chars().count() < 1 {
17182					return Err(ValidationError::new(1001, "sgntr is shorter than the minimum length of 1".to_string()));
17183				}
17184				if item.chars().count() > 70 {
17185					return Err(ValidationError::new(1002, "sgntr exceeds the maximum length of 70".to_string()));
17186				}
17187			}
17188		}
17189		Ok(())
17190	}
17191}
17192
17193
17194// Cheque20 ...
17195#[cfg_attr(feature = "derive_debug", derive(Debug))]
17196#[cfg_attr(feature = "derive_default", derive(Default))]
17197#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17198#[cfg_attr(feature = "derive_clone", derive(Clone))]
17199#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17200pub struct Cheque20 {
17201	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
17202	pub instr_id: Option<String>,
17203	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
17204	pub orgnl_instr_id: Option<String>,
17205	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqNb") )]
17206	pub chq_nb: String,
17207	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseDt") )]
17208	pub isse_dt: String,
17209	#[cfg_attr( feature = "derive_serde", serde(rename = "StlDt", skip_serializing_if = "Option::is_none") )]
17210	pub stl_dt: Option<String>,
17211	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
17212	pub amt: ActiveCurrencyAndAmount,
17213	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvDt", skip_serializing_if = "Option::is_none") )]
17214	pub fctv_dt: Option<DateAndDateTime2Choice>,
17215	#[cfg_attr( feature = "derive_serde", serde(rename = "DrwrAgt", skip_serializing_if = "Option::is_none") )]
17216	pub drwr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
17217	#[cfg_attr( feature = "derive_serde", serde(rename = "DrwrAgtAcct", skip_serializing_if = "Option::is_none") )]
17218	pub drwr_agt_acct: Option<CashAccount40>,
17219	#[cfg_attr( feature = "derive_serde", serde(rename = "Pyee", skip_serializing_if = "Option::is_none") )]
17220	pub pyee: Option<PartyIdentification272>,
17221	#[cfg_attr( feature = "derive_serde", serde(rename = "PyeeAcct", skip_serializing_if = "Option::is_none") )]
17222	pub pyee_acct: Option<CashAccount40>,
17223	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqCxlOrStopRsn", skip_serializing_if = "Option::is_none") )]
17224	pub chq_cxl_or_stop_rsn: Option<ChequeCancellationReason1>,
17225}
17226
17227impl Cheque20 {
17228	pub fn validate(&self) -> Result<(), ValidationError> {
17229		if let Some(ref val) = self.instr_id {
17230			if val.chars().count() < 1 {
17231				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
17232			}
17233			if val.chars().count() > 35 {
17234				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
17235			}
17236		}
17237		if let Some(ref val) = self.orgnl_instr_id {
17238			if val.chars().count() < 1 {
17239				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
17240			}
17241			if val.chars().count() > 35 {
17242				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
17243			}
17244		}
17245		if self.chq_nb.chars().count() < 1 {
17246			return Err(ValidationError::new(1001, "chq_nb is shorter than the minimum length of 1".to_string()));
17247		}
17248		if self.chq_nb.chars().count() > 35 {
17249			return Err(ValidationError::new(1002, "chq_nb exceeds the maximum length of 35".to_string()));
17250		}
17251		self.amt.validate()?;
17252		if let Some(ref val) = self.fctv_dt { val.validate()? }
17253		if let Some(ref val) = self.drwr_agt { val.validate()? }
17254		if let Some(ref val) = self.drwr_agt_acct { val.validate()? }
17255		if let Some(ref val) = self.pyee { val.validate()? }
17256		if let Some(ref val) = self.pyee_acct { val.validate()? }
17257		if let Some(ref val) = self.chq_cxl_or_stop_rsn { val.validate()? }
17258		Ok(())
17259	}
17260}
17261
17262
17263// Cheque4 ...
17264#[cfg_attr(feature = "derive_debug", derive(Debug))]
17265#[cfg_attr(feature = "derive_default", derive(Default))]
17266#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17267#[cfg_attr(feature = "derive_clone", derive(Clone))]
17268#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17269pub struct Cheque4 {
17270	#[cfg_attr( feature = "derive_serde", serde(rename = "PyeeId") )]
17271	pub pyee_id: NameAndAddress5,
17272}
17273
17274impl Cheque4 {
17275	pub fn validate(&self) -> Result<(), ValidationError> {
17276		self.pyee_id.validate()?;
17277		Ok(())
17278	}
17279}
17280
17281
17282// ChequeCancellationReason1 ...
17283#[cfg_attr(feature = "derive_debug", derive(Debug))]
17284#[cfg_attr(feature = "derive_default", derive(Default))]
17285#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17286#[cfg_attr(feature = "derive_clone", derive(Clone))]
17287#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17288pub struct ChequeCancellationReason1 {
17289	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
17290	pub orgtr: Option<ChequePartyRole1Code>,
17291	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
17292	pub rsn: ChequeCancellationReason1Choice,
17293	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
17294	pub addtl_inf: Option<String>,
17295}
17296
17297impl ChequeCancellationReason1 {
17298	pub fn validate(&self) -> Result<(), ValidationError> {
17299		if let Some(ref val) = self.orgtr { val.validate()? }
17300		self.rsn.validate()?;
17301		if let Some(ref val) = self.addtl_inf {
17302			if val.chars().count() < 1 {
17303				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
17304			}
17305			if val.chars().count() > 140 {
17306				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
17307			}
17308		}
17309		Ok(())
17310	}
17311}
17312
17313
17314// ChequeCancellationReason1Choice ...
17315#[cfg_attr(feature = "derive_debug", derive(Debug))]
17316#[cfg_attr(feature = "derive_default", derive(Default))]
17317#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17318#[cfg_attr(feature = "derive_clone", derive(Clone))]
17319#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17320pub struct ChequeCancellationReason1Choice {
17321	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
17322	pub cd: Option<String>,
17323	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
17324	pub prtry: Option<String>,
17325}
17326
17327impl ChequeCancellationReason1Choice {
17328	pub fn validate(&self) -> Result<(), ValidationError> {
17329		if let Some(ref val) = self.cd {
17330			if val.chars().count() < 1 {
17331				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
17332			}
17333			if val.chars().count() > 4 {
17334				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
17335			}
17336		}
17337		if let Some(ref val) = self.prtry {
17338			if val.chars().count() < 1 {
17339				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
17340			}
17341			if val.chars().count() > 35 {
17342				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
17343			}
17344		}
17345		Ok(())
17346	}
17347}
17348
17349
17350// ChequeCancellationStatus1 ...
17351#[cfg_attr(feature = "derive_debug", derive(Debug))]
17352#[cfg_attr(feature = "derive_default", derive(Default))]
17353#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17354#[cfg_attr(feature = "derive_clone", derive(Clone))]
17355#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17356pub struct ChequeCancellationStatus1 {
17357	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
17358	pub orgtr: Option<ChequePartyRole1Code>,
17359	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
17360	pub sts: ChequeCancellationStatus1Choice,
17361	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
17362	pub addtl_inf: Option<String>,
17363}
17364
17365impl ChequeCancellationStatus1 {
17366	pub fn validate(&self) -> Result<(), ValidationError> {
17367		if let Some(ref val) = self.orgtr { val.validate()? }
17368		self.sts.validate()?;
17369		if let Some(ref val) = self.addtl_inf {
17370			if val.chars().count() < 1 {
17371				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
17372			}
17373			if val.chars().count() > 140 {
17374				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
17375			}
17376		}
17377		Ok(())
17378	}
17379}
17380
17381
17382// ChequeCancellationStatus1Choice ...
17383#[cfg_attr(feature = "derive_debug", derive(Debug))]
17384#[cfg_attr(feature = "derive_default", derive(Default))]
17385#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17386#[cfg_attr(feature = "derive_clone", derive(Clone))]
17387#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17388pub struct ChequeCancellationStatus1Choice {
17389	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
17390	pub cd: Option<String>,
17391	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
17392	pub prtry: Option<String>,
17393}
17394
17395impl ChequeCancellationStatus1Choice {
17396	pub fn validate(&self) -> Result<(), ValidationError> {
17397		if let Some(ref val) = self.cd {
17398			if val.chars().count() < 1 {
17399				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
17400			}
17401			if val.chars().count() > 4 {
17402				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
17403			}
17404		}
17405		if let Some(ref val) = self.prtry {
17406			if val.chars().count() < 1 {
17407				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
17408			}
17409			if val.chars().count() > 35 {
17410				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
17411			}
17412		}
17413		Ok(())
17414	}
17415}
17416
17417
17418// ChequeDelivery1Code ...
17419#[cfg_attr(feature = "derive_debug", derive(Debug))]
17420#[cfg_attr(feature = "derive_default", derive(Default))]
17421#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17422#[cfg_attr(feature = "derive_clone", derive(Clone))]
17423#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17424pub enum ChequeDelivery1Code {
17425	#[cfg_attr(feature = "derive_default", default)]
17426	#[cfg_attr( feature = "derive_serde", serde(rename = "MLDB") )]
17427	CodeMLDB,
17428	#[cfg_attr( feature = "derive_serde", serde(rename = "MLCD") )]
17429	CodeMLCD,
17430	#[cfg_attr( feature = "derive_serde", serde(rename = "MLFA") )]
17431	CodeMLFA,
17432	#[cfg_attr( feature = "derive_serde", serde(rename = "CRDB") )]
17433	CodeCRDB,
17434	#[cfg_attr( feature = "derive_serde", serde(rename = "CRCD") )]
17435	CodeCRCD,
17436	#[cfg_attr( feature = "derive_serde", serde(rename = "CRFA") )]
17437	CodeCRFA,
17438	#[cfg_attr( feature = "derive_serde", serde(rename = "PUDB") )]
17439	CodePUDB,
17440	#[cfg_attr( feature = "derive_serde", serde(rename = "PUCD") )]
17441	CodePUCD,
17442	#[cfg_attr( feature = "derive_serde", serde(rename = "PUFA") )]
17443	CodePUFA,
17444	#[cfg_attr( feature = "derive_serde", serde(rename = "RGDB") )]
17445	CodeRGDB,
17446	#[cfg_attr( feature = "derive_serde", serde(rename = "RGCD") )]
17447	CodeRGCD,
17448	#[cfg_attr( feature = "derive_serde", serde(rename = "RGFA") )]
17449	CodeRGFA,
17450}
17451
17452impl ChequeDelivery1Code {
17453	pub fn validate(&self) -> Result<(), ValidationError> {
17454		Ok(())
17455	}
17456}
17457
17458
17459// ChequeDeliveryMethod1Choice ...
17460#[cfg_attr(feature = "derive_debug", derive(Debug))]
17461#[cfg_attr(feature = "derive_default", derive(Default))]
17462#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17463#[cfg_attr(feature = "derive_clone", derive(Clone))]
17464#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17465pub struct ChequeDeliveryMethod1Choice {
17466	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
17467	pub cd: Option<ChequeDelivery1Code>,
17468	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
17469	pub prtry: Option<String>,
17470}
17471
17472impl ChequeDeliveryMethod1Choice {
17473	pub fn validate(&self) -> Result<(), ValidationError> {
17474		if let Some(ref val) = self.cd { val.validate()? }
17475		if let Some(ref val) = self.prtry {
17476			if val.chars().count() < 1 {
17477				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
17478			}
17479			if val.chars().count() > 35 {
17480				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
17481			}
17482		}
17483		Ok(())
17484	}
17485}
17486
17487
17488// ChequePartyRole1Code ...
17489#[cfg_attr(feature = "derive_debug", derive(Debug))]
17490#[cfg_attr(feature = "derive_default", derive(Default))]
17491#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17492#[cfg_attr(feature = "derive_clone", derive(Clone))]
17493#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17494pub enum ChequePartyRole1Code {
17495	#[cfg_attr(feature = "derive_default", default)]
17496	#[cfg_attr( feature = "derive_serde", serde(rename = "DWEA") )]
17497	CodeDWEA,
17498	#[cfg_attr( feature = "derive_serde", serde(rename = "DWRA") )]
17499	CodeDWRA,
17500	#[cfg_attr( feature = "derive_serde", serde(rename = "PAYE") )]
17501	CodePAYE,
17502	#[cfg_attr( feature = "derive_serde", serde(rename = "PAYR") )]
17503	CodePAYR,
17504}
17505
17506impl ChequePartyRole1Code {
17507	pub fn validate(&self) -> Result<(), ValidationError> {
17508		Ok(())
17509	}
17510}
17511
17512
17513// ChequeType2Code ...
17514#[cfg_attr(feature = "derive_debug", derive(Debug))]
17515#[cfg_attr(feature = "derive_default", derive(Default))]
17516#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17517#[cfg_attr(feature = "derive_clone", derive(Clone))]
17518#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17519pub enum ChequeType2Code {
17520	#[cfg_attr(feature = "derive_default", default)]
17521	#[cfg_attr( feature = "derive_serde", serde(rename = "CCHQ") )]
17522	CodeCCHQ,
17523	#[cfg_attr( feature = "derive_serde", serde(rename = "CCCH") )]
17524	CodeCCCH,
17525	#[cfg_attr( feature = "derive_serde", serde(rename = "BCHQ") )]
17526	CodeBCHQ,
17527	#[cfg_attr( feature = "derive_serde", serde(rename = "DRFT") )]
17528	CodeDRFT,
17529	#[cfg_attr( feature = "derive_serde", serde(rename = "ELDR") )]
17530	CodeELDR,
17531}
17532
17533impl ChequeType2Code {
17534	pub fn validate(&self) -> Result<(), ValidationError> {
17535		Ok(())
17536	}
17537}
17538
17539
17540// CitizenshipInformation1 ...
17541#[cfg_attr(feature = "derive_debug", derive(Debug))]
17542#[cfg_attr(feature = "derive_default", derive(Default))]
17543#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17544#[cfg_attr(feature = "derive_clone", derive(Clone))]
17545#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17546pub struct CitizenshipInformation1 {
17547	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntlty") )]
17548	pub ntlty: String,
17549	#[cfg_attr( feature = "derive_serde", serde(rename = "MnrInd", skip_serializing_if = "Option::is_none") )]
17550	pub mnr_ind: Option<bool>,
17551	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
17552	pub start_dt: Option<String>,
17553	#[cfg_attr( feature = "derive_serde", serde(rename = "EndDt", skip_serializing_if = "Option::is_none") )]
17554	pub end_dt: Option<String>,
17555}
17556
17557impl CitizenshipInformation1 {
17558	pub fn validate(&self) -> Result<(), ValidationError> {
17559		Ok(())
17560	}
17561}
17562
17563
17564// CitizenshipInformation2 ...
17565#[cfg_attr(feature = "derive_debug", derive(Debug))]
17566#[cfg_attr(feature = "derive_default", derive(Default))]
17567#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17568#[cfg_attr(feature = "derive_clone", derive(Clone))]
17569#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17570pub struct CitizenshipInformation2 {
17571	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntlty") )]
17572	pub ntlty: String,
17573	#[cfg_attr( feature = "derive_serde", serde(rename = "MnrInd") )]
17574	pub mnr_ind: bool,
17575}
17576
17577impl CitizenshipInformation2 {
17578	pub fn validate(&self) -> Result<(), ValidationError> {
17579		Ok(())
17580	}
17581}
17582
17583
17584// CivilStatus1Choice ...
17585#[cfg_attr(feature = "derive_debug", derive(Debug))]
17586#[cfg_attr(feature = "derive_default", derive(Default))]
17587#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17588#[cfg_attr(feature = "derive_clone", derive(Clone))]
17589#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17590pub struct CivilStatus1Choice {
17591	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
17592	pub cd: Option<CivilStatus1Code>,
17593	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
17594	pub prtry: Option<GenericIdentification47>,
17595}
17596
17597impl CivilStatus1Choice {
17598	pub fn validate(&self) -> Result<(), ValidationError> {
17599		if let Some(ref val) = self.cd { val.validate()? }
17600		if let Some(ref val) = self.prtry { val.validate()? }
17601		Ok(())
17602	}
17603}
17604
17605
17606// CivilStatus1Code ...
17607#[cfg_attr(feature = "derive_debug", derive(Debug))]
17608#[cfg_attr(feature = "derive_default", derive(Default))]
17609#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17610#[cfg_attr(feature = "derive_clone", derive(Clone))]
17611#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17612pub enum CivilStatus1Code {
17613	#[cfg_attr(feature = "derive_default", default)]
17614	#[cfg_attr( feature = "derive_serde", serde(rename = "DIVO") )]
17615	CodeDIVO,
17616	#[cfg_attr( feature = "derive_serde", serde(rename = "LDIV") )]
17617	CodeLDIV,
17618	#[cfg_attr( feature = "derive_serde", serde(rename = "MARR") )]
17619	CodeMARR,
17620	#[cfg_attr( feature = "derive_serde", serde(rename = "SEPA") )]
17621	CodeSEPA,
17622	#[cfg_attr( feature = "derive_serde", serde(rename = "SING") )]
17623	CodeSING,
17624	#[cfg_attr( feature = "derive_serde", serde(rename = "UNIO") )]
17625	CodeUNIO,
17626	#[cfg_attr( feature = "derive_serde", serde(rename = "WIDO") )]
17627	CodeWIDO,
17628}
17629
17630impl CivilStatus1Code {
17631	pub fn validate(&self) -> Result<(), ValidationError> {
17632		Ok(())
17633	}
17634}
17635
17636
17637// ClaimNonReceipt3 ...
17638#[cfg_attr(feature = "derive_debug", derive(Debug))]
17639#[cfg_attr(feature = "derive_default", derive(Default))]
17640#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17641#[cfg_attr(feature = "derive_clone", derive(Clone))]
17642#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17643pub struct ClaimNonReceipt3 {
17644	#[cfg_attr( feature = "derive_serde", serde(rename = "DtPrcd") )]
17645	pub dt_prcd: String,
17646	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNxtAgt", skip_serializing_if = "Option::is_none") )]
17647	pub orgnl_nxt_agt: Option<BranchAndFinancialInstitutionIdentification8>,
17648}
17649
17650impl ClaimNonReceipt3 {
17651	pub fn validate(&self) -> Result<(), ValidationError> {
17652		if let Some(ref val) = self.orgnl_nxt_agt { val.validate()? }
17653		Ok(())
17654	}
17655}
17656
17657
17658// ClaimNonReceipt3Choice ...
17659#[cfg_attr(feature = "derive_debug", derive(Debug))]
17660#[cfg_attr(feature = "derive_default", derive(Default))]
17661#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17662#[cfg_attr(feature = "derive_clone", derive(Clone))]
17663#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17664pub struct ClaimNonReceipt3Choice {
17665	#[cfg_attr( feature = "derive_serde", serde(rename = "Accptd", skip_serializing_if = "Option::is_none") )]
17666	pub accptd: Option<ClaimNonReceipt3>,
17667	#[cfg_attr( feature = "derive_serde", serde(rename = "Rjctd", skip_serializing_if = "Option::is_none") )]
17668	pub rjctd: Option<ClaimNonReceiptRejectReason1Choice>,
17669}
17670
17671impl ClaimNonReceipt3Choice {
17672	pub fn validate(&self) -> Result<(), ValidationError> {
17673		if let Some(ref val) = self.accptd { val.validate()? }
17674		if let Some(ref val) = self.rjctd { val.validate()? }
17675		Ok(())
17676	}
17677}
17678
17679
17680// ClaimNonReceiptRejectReason1Choice ...
17681#[cfg_attr(feature = "derive_debug", derive(Debug))]
17682#[cfg_attr(feature = "derive_default", derive(Default))]
17683#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17684#[cfg_attr(feature = "derive_clone", derive(Clone))]
17685#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17686pub struct ClaimNonReceiptRejectReason1Choice {
17687	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
17688	pub cd: Option<String>,
17689	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
17690	pub prtry: Option<String>,
17691}
17692
17693impl ClaimNonReceiptRejectReason1Choice {
17694	pub fn validate(&self) -> Result<(), ValidationError> {
17695		if let Some(ref val) = self.cd {
17696			if val.chars().count() < 1 {
17697				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
17698			}
17699			if val.chars().count() > 4 {
17700				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
17701			}
17702		}
17703		if let Some(ref val) = self.prtry {
17704			if val.chars().count() < 1 {
17705				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
17706			}
17707			if val.chars().count() > 35 {
17708				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
17709			}
17710		}
17711		Ok(())
17712	}
17713}
17714
17715
17716// ClassificationType1Choice ...
17717#[cfg_attr(feature = "derive_debug", derive(Debug))]
17718#[cfg_attr(feature = "derive_default", derive(Default))]
17719#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17720#[cfg_attr(feature = "derive_clone", derive(Clone))]
17721#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17722pub struct ClassificationType1Choice {
17723	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnFinInstrm", skip_serializing_if = "Option::is_none") )]
17724	pub clssfctn_fin_instrm: Option<String>,
17725	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrnClssfctn", skip_serializing_if = "Option::is_none") )]
17726	pub altrn_clssfctn: Option<GenericIdentification1>,
17727}
17728
17729impl ClassificationType1Choice {
17730	pub fn validate(&self) -> Result<(), ValidationError> {
17731		if let Some(ref val) = self.clssfctn_fin_instrm {
17732			let pattern = Regex::new("[A-Z]{6,6}").unwrap();
17733			if !pattern.is_match(val) {
17734				return Err(ValidationError::new(1005, "clssfctn_fin_instrm does not match the required pattern".to_string()));
17735			}
17736		}
17737		if let Some(ref val) = self.altrn_clssfctn { val.validate()? }
17738		Ok(())
17739	}
17740}
17741
17742
17743// ClassificationType2 ...
17744#[cfg_attr(feature = "derive_debug", derive(Debug))]
17745#[cfg_attr(feature = "derive_default", derive(Default))]
17746#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17747#[cfg_attr(feature = "derive_clone", derive(Clone))]
17748#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17749pub struct ClassificationType2 {
17750	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnFinInstrm", skip_serializing_if = "Option::is_none") )]
17751	pub clssfctn_fin_instrm: Option<String>,
17752	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmPdctTpCd", skip_serializing_if = "Option::is_none") )]
17753	pub fin_instrm_pdct_tp_cd: Option<String>,
17754	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrnClssfctn", skip_serializing_if = "Option::is_none") )]
17755	pub altrn_clssfctn: Option<Vec<GenericIdentification36>>,
17756}
17757
17758impl ClassificationType2 {
17759	pub fn validate(&self) -> Result<(), ValidationError> {
17760		if let Some(ref val) = self.clssfctn_fin_instrm {
17761			let pattern = Regex::new("[A-Z]{6,6}").unwrap();
17762			if !pattern.is_match(val) {
17763				return Err(ValidationError::new(1005, "clssfctn_fin_instrm does not match the required pattern".to_string()));
17764			}
17765		}
17766		if let Some(ref val) = self.fin_instrm_pdct_tp_cd {
17767			if val.chars().count() < 1 {
17768				return Err(ValidationError::new(1001, "fin_instrm_pdct_tp_cd is shorter than the minimum length of 1".to_string()));
17769			}
17770			if val.chars().count() > 4 {
17771				return Err(ValidationError::new(1002, "fin_instrm_pdct_tp_cd exceeds the maximum length of 4".to_string()));
17772			}
17773		}
17774		if let Some(ref vec) = self.altrn_clssfctn { for item in vec { item.validate()? } }
17775		Ok(())
17776	}
17777}
17778
17779
17780// Cleared16Choice ...
17781#[cfg_attr(feature = "derive_debug", derive(Debug))]
17782#[cfg_attr(feature = "derive_default", derive(Default))]
17783#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17784#[cfg_attr(feature = "derive_clone", derive(Clone))]
17785#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17786pub struct Cleared16Choice {
17787	#[cfg_attr( feature = "derive_serde", serde(rename = "Clrd", skip_serializing_if = "Option::is_none") )]
17788	pub clrd: Option<ClearingPartyAndTime14>,
17789	#[cfg_attr( feature = "derive_serde", serde(rename = "NonClrd", skip_serializing_if = "Option::is_none") )]
17790	pub non_clrd: Option<NoReasonCode>,
17791}
17792
17793impl Cleared16Choice {
17794	pub fn validate(&self) -> Result<(), ValidationError> {
17795		if let Some(ref val) = self.clrd { val.validate()? }
17796		if let Some(ref val) = self.non_clrd { val.validate()? }
17797		Ok(())
17798	}
17799}
17800
17801
17802// Cleared23Choice ...
17803#[cfg_attr(feature = "derive_debug", derive(Debug))]
17804#[cfg_attr(feature = "derive_default", derive(Default))]
17805#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17806#[cfg_attr(feature = "derive_clone", derive(Clone))]
17807#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17808pub struct Cleared23Choice {
17809	#[cfg_attr( feature = "derive_serde", serde(rename = "Clrd", skip_serializing_if = "Option::is_none") )]
17810	pub clrd: Option<ClearingPartyAndTime21Choice>,
17811	#[cfg_attr( feature = "derive_serde", serde(rename = "IntndToClear", skip_serializing_if = "Option::is_none") )]
17812	pub intnd_to_clear: Option<ClearingPartyAndTime22Choice>,
17813	#[cfg_attr( feature = "derive_serde", serde(rename = "NonClrd", skip_serializing_if = "Option::is_none") )]
17814	pub non_clrd: Option<ClearingExceptionOrExemption3Choice>,
17815}
17816
17817impl Cleared23Choice {
17818	pub fn validate(&self) -> Result<(), ValidationError> {
17819		if let Some(ref val) = self.clrd { val.validate()? }
17820		if let Some(ref val) = self.intnd_to_clear { val.validate()? }
17821		if let Some(ref val) = self.non_clrd { val.validate()? }
17822		Ok(())
17823	}
17824}
17825
17826
17827// Cleared4Choice ...
17828#[cfg_attr(feature = "derive_debug", derive(Debug))]
17829#[cfg_attr(feature = "derive_default", derive(Default))]
17830#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17831#[cfg_attr(feature = "derive_clone", derive(Clone))]
17832#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17833pub struct Cleared4Choice {
17834	#[cfg_attr( feature = "derive_serde", serde(rename = "Clrd", skip_serializing_if = "Option::is_none") )]
17835	pub clrd: Option<NoReasonCode>,
17836	#[cfg_attr( feature = "derive_serde", serde(rename = "NonClrd", skip_serializing_if = "Option::is_none") )]
17837	pub non_clrd: Option<NoReasonCode>,
17838}
17839
17840impl Cleared4Choice {
17841	pub fn validate(&self) -> Result<(), ValidationError> {
17842		if let Some(ref val) = self.clrd { val.validate()? }
17843		if let Some(ref val) = self.non_clrd { val.validate()? }
17844		Ok(())
17845	}
17846}
17847
17848
17849// ClearedProduct1 ...
17850#[cfg_attr(feature = "derive_debug", derive(Debug))]
17851#[cfg_attr(feature = "derive_default", derive(Default))]
17852#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17853#[cfg_attr(feature = "derive_clone", derive(Clone))]
17854#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17855pub struct ClearedProduct1 {
17856	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn") )]
17857	pub tradg_vn: Vec<String>,
17858	#[cfg_attr( feature = "derive_serde", serde(rename = "CCPPdctId") )]
17859	pub ccp_pdct_id: GenericIdentification168,
17860	#[cfg_attr( feature = "derive_serde", serde(rename = "UvrslPdctId", skip_serializing_if = "Option::is_none") )]
17861	pub uvrsl_pdct_id: Option<GenericIdentification168>,
17862	#[cfg_attr( feature = "derive_serde", serde(rename = "Pdct") )]
17863	pub pdct: Product1Choice,
17864	#[cfg_attr( feature = "derive_serde", serde(rename = "OpnIntrst") )]
17865	pub opn_intrst: OpenInterest1,
17866	#[cfg_attr( feature = "derive_serde", serde(rename = "TrdsClrd", skip_serializing_if = "Option::is_none") )]
17867	pub trds_clrd: Option<f64>,
17868}
17869
17870impl ClearedProduct1 {
17871	pub fn validate(&self) -> Result<(), ValidationError> {
17872		for item in &self.tradg_vn {
17873			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
17874			if !pattern.is_match(&item) {
17875				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
17876			}
17877		}
17878		self.ccp_pdct_id.validate()?;
17879		if let Some(ref val) = self.uvrsl_pdct_id { val.validate()? }
17880		self.pdct.validate()?;
17881		self.opn_intrst.validate()?;
17882		if let Some(ref val) = self.trds_clrd {
17883			if *val < 0.000000 {
17884				return Err(ValidationError::new(1003, "trds_clrd is less than the minimum value of 0.000000".to_string()));
17885			}
17886		}
17887		Ok(())
17888	}
17889}
17890
17891
17892// ClearingAccount1 ...
17893#[cfg_attr(feature = "derive_debug", derive(Debug))]
17894#[cfg_attr(feature = "derive_default", derive(Default))]
17895#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17896#[cfg_attr(feature = "derive_clone", derive(Clone))]
17897#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17898pub struct ClearingAccount1 {
17899	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctTp") )]
17900	pub acct_tp: ClearingAccountType3Code,
17901	#[cfg_attr( feature = "derive_serde", serde(rename = "CollAcctOwnr") )]
17902	pub coll_acct_ownr: Vec<CollateralAccount5>,
17903}
17904
17905impl ClearingAccount1 {
17906	pub fn validate(&self) -> Result<(), ValidationError> {
17907		self.acct_tp.validate()?;
17908		for item in &self.coll_acct_ownr { item.validate()? }
17909		Ok(())
17910	}
17911}
17912
17913
17914// ClearingAccountType3Code ...
17915#[cfg_attr(feature = "derive_debug", derive(Debug))]
17916#[cfg_attr(feature = "derive_default", derive(Default))]
17917#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17918#[cfg_attr(feature = "derive_clone", derive(Clone))]
17919#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17920pub enum ClearingAccountType3Code {
17921	#[cfg_attr(feature = "derive_default", default)]
17922	#[cfg_attr( feature = "derive_serde", serde(rename = "NOSA") )]
17923	CodeNOSA,
17924	#[cfg_attr( feature = "derive_serde", serde(rename = "ISEG") )]
17925	CodeISEG,
17926	#[cfg_attr( feature = "derive_serde", serde(rename = "HOUS") )]
17927	CodeHOUS,
17928	#[cfg_attr( feature = "derive_serde", serde(rename = "GOSA") )]
17929	CodeGOSA,
17930}
17931
17932impl ClearingAccountType3Code {
17933	pub fn validate(&self) -> Result<(), ValidationError> {
17934		Ok(())
17935	}
17936}
17937
17938
17939// ClearingAccountType4Code ...
17940#[cfg_attr(feature = "derive_debug", derive(Debug))]
17941#[cfg_attr(feature = "derive_default", derive(Default))]
17942#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17943#[cfg_attr(feature = "derive_clone", derive(Clone))]
17944#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17945pub enum ClearingAccountType4Code {
17946	#[cfg_attr(feature = "derive_default", default)]
17947	#[cfg_attr( feature = "derive_serde", serde(rename = "CLIE") )]
17948	CodeCLIE,
17949	#[cfg_attr( feature = "derive_serde", serde(rename = "HOUS") )]
17950	CodeHOUS,
17951}
17952
17953impl ClearingAccountType4Code {
17954	pub fn validate(&self) -> Result<(), ValidationError> {
17955		Ok(())
17956	}
17957}
17958
17959
17960// ClearingChannel2Code ...
17961#[cfg_attr(feature = "derive_debug", derive(Debug))]
17962#[cfg_attr(feature = "derive_default", derive(Default))]
17963#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17964#[cfg_attr(feature = "derive_clone", derive(Clone))]
17965#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17966pub enum ClearingChannel2Code {
17967	#[cfg_attr(feature = "derive_default", default)]
17968	#[cfg_attr( feature = "derive_serde", serde(rename = "RTGS") )]
17969	CodeRTGS,
17970	#[cfg_attr( feature = "derive_serde", serde(rename = "RTNS") )]
17971	CodeRTNS,
17972	#[cfg_attr( feature = "derive_serde", serde(rename = "MPNS") )]
17973	CodeMPNS,
17974	#[cfg_attr( feature = "derive_serde", serde(rename = "BOOK") )]
17975	CodeBOOK,
17976}
17977
17978impl ClearingChannel2Code {
17979	pub fn validate(&self) -> Result<(), ValidationError> {
17980		Ok(())
17981	}
17982}
17983
17984
17985// ClearingExceptionOrExemption2 ...
17986#[cfg_attr(feature = "derive_debug", derive(Debug))]
17987#[cfg_attr(feature = "derive_default", derive(Default))]
17988#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
17989#[cfg_attr(feature = "derive_clone", derive(Clone))]
17990#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
17991pub struct ClearingExceptionOrExemption2 {
17992	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty") )]
17993	pub rptg_ctr_pty: NonClearingReason2,
17994	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty", skip_serializing_if = "Option::is_none") )]
17995	pub othr_ctr_pty: Option<NonClearingReason2>,
17996}
17997
17998impl ClearingExceptionOrExemption2 {
17999	pub fn validate(&self) -> Result<(), ValidationError> {
18000		self.rptg_ctr_pty.validate()?;
18001		if let Some(ref val) = self.othr_ctr_pty { val.validate()? }
18002		Ok(())
18003	}
18004}
18005
18006
18007// ClearingExceptionOrExemption3Choice ...
18008#[cfg_attr(feature = "derive_debug", derive(Debug))]
18009#[cfg_attr(feature = "derive_default", derive(Default))]
18010#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18011#[cfg_attr(feature = "derive_clone", derive(Clone))]
18012#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18013pub struct ClearingExceptionOrExemption3Choice {
18014	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
18015	pub rsn: Option<NoReasonCode>,
18016	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPties", skip_serializing_if = "Option::is_none") )]
18017	pub ctr_pties: Option<ClearingExceptionOrExemption2>,
18018}
18019
18020impl ClearingExceptionOrExemption3Choice {
18021	pub fn validate(&self) -> Result<(), ValidationError> {
18022		if let Some(ref val) = self.rsn { val.validate()? }
18023		if let Some(ref val) = self.ctr_pties { val.validate()? }
18024		Ok(())
18025	}
18026}
18027
18028
18029// ClearingExemptionException1Code ...
18030#[cfg_attr(feature = "derive_debug", derive(Debug))]
18031#[cfg_attr(feature = "derive_default", derive(Default))]
18032#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18033#[cfg_attr(feature = "derive_clone", derive(Clone))]
18034#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18035pub enum ClearingExemptionException1Code {
18036	#[cfg_attr(feature = "derive_default", default)]
18037	#[cfg_attr( feature = "derive_serde", serde(rename = "COOP") )]
18038	CodeCOOP,
18039	#[cfg_attr( feature = "derive_serde", serde(rename = "ENDU") )]
18040	CodeENDU,
18041	#[cfg_attr( feature = "derive_serde", serde(rename = "AFFL") )]
18042	CodeAFFL,
18043	#[cfg_attr( feature = "derive_serde", serde(rename = "NOAL") )]
18044	CodeNOAL,
18045	#[cfg_attr( feature = "derive_serde", serde(rename = "NORE") )]
18046	CodeNORE,
18047	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
18048	CodeOTHR,
18049	#[cfg_attr( feature = "derive_serde", serde(rename = "SMBK") )]
18050	CodeSMBK,
18051}
18052
18053impl ClearingExemptionException1Code {
18054	pub fn validate(&self) -> Result<(), ValidationError> {
18055		Ok(())
18056	}
18057}
18058
18059
18060// ClearingMember1 ...
18061#[cfg_attr(feature = "derive_debug", derive(Debug))]
18062#[cfg_attr(feature = "derive_default", derive(Default))]
18063#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18064#[cfg_attr(feature = "derive_clone", derive(Clone))]
18065#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18066pub struct ClearingMember1 {
18067	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
18068	pub id: PartyIdentification118Choice,
18069	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtQlty") )]
18070	pub cdt_qlty: CreditQuality1Code,
18071	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtPrntId", skip_serializing_if = "Option::is_none") )]
18072	pub ultmt_prnt_id: Option<PartyIdentification118Choice>,
18073	#[cfg_attr( feature = "derive_serde", serde(rename = "FutrsComssnMrchntInd") )]
18074	pub futrs_comssn_mrchnt_ind: bool,
18075	#[cfg_attr( feature = "derive_serde", serde(rename = "MmbshVldFr") )]
18076	pub mmbsh_vld_fr: String,
18077	#[cfg_attr( feature = "derive_serde", serde(rename = "MmbshVldTo", skip_serializing_if = "Option::is_none") )]
18078	pub mmbsh_vld_to: Option<String>,
18079	#[cfg_attr( feature = "derive_serde", serde(rename = "SpnsrgClrMmbId", skip_serializing_if = "Option::is_none") )]
18080	pub spnsrg_clr_mmb_id: Option<PartyIdentification118Choice>,
18081	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrAcctOwnr") )]
18082	pub clr_acct_ownr: Vec<ClearingAccount1>,
18083}
18084
18085impl ClearingMember1 {
18086	pub fn validate(&self) -> Result<(), ValidationError> {
18087		self.id.validate()?;
18088		self.cdt_qlty.validate()?;
18089		if let Some(ref val) = self.ultmt_prnt_id { val.validate()? }
18090		if let Some(ref val) = self.spnsrg_clr_mmb_id { val.validate()? }
18091		for item in &self.clr_acct_ownr { item.validate()? }
18092		Ok(())
18093	}
18094}
18095
18096
18097// ClearingObligationType1Code ...
18098#[cfg_attr(feature = "derive_debug", derive(Debug))]
18099#[cfg_attr(feature = "derive_default", derive(Default))]
18100#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18101#[cfg_attr(feature = "derive_clone", derive(Clone))]
18102#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18103pub enum ClearingObligationType1Code {
18104	#[cfg_attr(feature = "derive_default", default)]
18105	#[cfg_attr( feature = "derive_serde", serde(rename = "FLSE") )]
18106	CodeFLSE,
18107	#[cfg_attr( feature = "derive_serde", serde(rename = "UKWN") )]
18108	CodeUKWN,
18109	#[cfg_attr( feature = "derive_serde", serde(rename = "TRUE") )]
18110	CodeTRUE,
18111}
18112
18113impl ClearingObligationType1Code {
18114	pub fn validate(&self) -> Result<(), ValidationError> {
18115		Ok(())
18116	}
18117}
18118
18119
18120// ClearingPartyAndTime14 ...
18121#[cfg_attr(feature = "derive_debug", derive(Debug))]
18122#[cfg_attr(feature = "derive_default", derive(Default))]
18123#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18124#[cfg_attr(feature = "derive_clone", derive(Clone))]
18125#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18126pub struct ClearingPartyAndTime14 {
18127	#[cfg_attr( feature = "derive_serde", serde(rename = "CCP", skip_serializing_if = "Option::is_none") )]
18128	pub ccp: Option<OrganisationIdentification15Choice>,
18129	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrDtTm", skip_serializing_if = "Option::is_none") )]
18130	pub clr_dt_tm: Option<String>,
18131	#[cfg_attr( feature = "derive_serde", serde(rename = "RptTrckgNb", skip_serializing_if = "Option::is_none") )]
18132	pub rpt_trckg_nb: Option<String>,
18133	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtflCd", skip_serializing_if = "Option::is_none") )]
18134	pub prtfl_cd: Option<String>,
18135}
18136
18137impl ClearingPartyAndTime14 {
18138	pub fn validate(&self) -> Result<(), ValidationError> {
18139		if let Some(ref val) = self.ccp { val.validate()? }
18140		if let Some(ref val) = self.rpt_trckg_nb {
18141			if val.chars().count() < 1 {
18142				return Err(ValidationError::new(1001, "rpt_trckg_nb is shorter than the minimum length of 1".to_string()));
18143			}
18144			if val.chars().count() > 52 {
18145				return Err(ValidationError::new(1002, "rpt_trckg_nb exceeds the maximum length of 52".to_string()));
18146			}
18147		}
18148		if let Some(ref val) = self.prtfl_cd {
18149			if val.chars().count() < 1 {
18150				return Err(ValidationError::new(1001, "prtfl_cd is shorter than the minimum length of 1".to_string()));
18151			}
18152			if val.chars().count() > 52 {
18153				return Err(ValidationError::new(1002, "prtfl_cd exceeds the maximum length of 52".to_string()));
18154			}
18155		}
18156		Ok(())
18157	}
18158}
18159
18160
18161// ClearingPartyAndTime21Choice ...
18162#[cfg_attr(feature = "derive_debug", derive(Debug))]
18163#[cfg_attr(feature = "derive_default", derive(Default))]
18164#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18165#[cfg_attr(feature = "derive_clone", derive(Clone))]
18166#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18167pub struct ClearingPartyAndTime21Choice {
18168	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
18169	pub rsn: Option<NoReasonCode>,
18170	#[cfg_attr( feature = "derive_serde", serde(rename = "Dtls", skip_serializing_if = "Option::is_none") )]
18171	pub dtls: Option<ClearingPartyAndTime22>,
18172}
18173
18174impl ClearingPartyAndTime21Choice {
18175	pub fn validate(&self) -> Result<(), ValidationError> {
18176		if let Some(ref val) = self.rsn { val.validate()? }
18177		if let Some(ref val) = self.dtls { val.validate()? }
18178		Ok(())
18179	}
18180}
18181
18182
18183// ClearingPartyAndTime22 ...
18184#[cfg_attr(feature = "derive_debug", derive(Debug))]
18185#[cfg_attr(feature = "derive_default", derive(Default))]
18186#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18187#[cfg_attr(feature = "derive_clone", derive(Clone))]
18188#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18189pub struct ClearingPartyAndTime22 {
18190	#[cfg_attr( feature = "derive_serde", serde(rename = "CCP", skip_serializing_if = "Option::is_none") )]
18191	pub ccp: Option<OrganisationIdentification15Choice>,
18192	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrRctDtTm", skip_serializing_if = "Option::is_none") )]
18193	pub clr_rct_dt_tm: Option<String>,
18194	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrDtTm", skip_serializing_if = "Option::is_none") )]
18195	pub clr_dt_tm: Option<String>,
18196	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrIdr", skip_serializing_if = "Option::is_none") )]
18197	pub clr_idr: Option<UniqueTransactionIdentifier2Choice>,
18198	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIdr", skip_serializing_if = "Option::is_none") )]
18199	pub orgnl_idr: Option<UniqueTransactionIdentifier2Choice>,
18200	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTradRpstryIdr", skip_serializing_if = "Option::is_none") )]
18201	pub orgnl_trad_rpstry_idr: Option<OrganisationIdentification15Choice>,
18202	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrAcctOrgn", skip_serializing_if = "Option::is_none") )]
18203	pub clr_acct_orgn: Option<ClearingAccountType4Code>,
18204}
18205
18206impl ClearingPartyAndTime22 {
18207	pub fn validate(&self) -> Result<(), ValidationError> {
18208		if let Some(ref val) = self.ccp { val.validate()? }
18209		if let Some(ref val) = self.clr_idr { val.validate()? }
18210		if let Some(ref val) = self.orgnl_idr { val.validate()? }
18211		if let Some(ref val) = self.orgnl_trad_rpstry_idr { val.validate()? }
18212		if let Some(ref val) = self.clr_acct_orgn { val.validate()? }
18213		Ok(())
18214	}
18215}
18216
18217
18218// ClearingPartyAndTime22Choice ...
18219#[cfg_attr(feature = "derive_debug", derive(Debug))]
18220#[cfg_attr(feature = "derive_default", derive(Default))]
18221#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18222#[cfg_attr(feature = "derive_clone", derive(Clone))]
18223#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18224pub struct ClearingPartyAndTime22Choice {
18225	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
18226	pub rsn: Option<NoReasonCode>,
18227	#[cfg_attr( feature = "derive_serde", serde(rename = "Dtls", skip_serializing_if = "Option::is_none") )]
18228	pub dtls: Option<ClearingPartyAndTime23>,
18229}
18230
18231impl ClearingPartyAndTime22Choice {
18232	pub fn validate(&self) -> Result<(), ValidationError> {
18233		if let Some(ref val) = self.rsn { val.validate()? }
18234		if let Some(ref val) = self.dtls { val.validate()? }
18235		Ok(())
18236	}
18237}
18238
18239
18240// ClearingPartyAndTime23 ...
18241#[cfg_attr(feature = "derive_debug", derive(Debug))]
18242#[cfg_attr(feature = "derive_default", derive(Default))]
18243#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18244#[cfg_attr(feature = "derive_clone", derive(Clone))]
18245#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18246pub struct ClearingPartyAndTime23 {
18247	#[cfg_attr( feature = "derive_serde", serde(rename = "CCP", skip_serializing_if = "Option::is_none") )]
18248	pub ccp: Option<OrganisationIdentification15Choice>,
18249	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrRctDtTm", skip_serializing_if = "Option::is_none") )]
18250	pub clr_rct_dt_tm: Option<String>,
18251	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrDtTm", skip_serializing_if = "Option::is_none") )]
18252	pub clr_dt_tm: Option<String>,
18253	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrIdr", skip_serializing_if = "Option::is_none") )]
18254	pub clr_idr: Option<UniqueTransactionIdentifier1Choice>,
18255	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIdr", skip_serializing_if = "Option::is_none") )]
18256	pub orgnl_idr: Option<UniqueTransactionIdentifier1Choice>,
18257	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTradRpstryIdr", skip_serializing_if = "Option::is_none") )]
18258	pub orgnl_trad_rpstry_idr: Option<OrganisationIdentification15Choice>,
18259}
18260
18261impl ClearingPartyAndTime23 {
18262	pub fn validate(&self) -> Result<(), ValidationError> {
18263		if let Some(ref val) = self.ccp { val.validate()? }
18264		if let Some(ref val) = self.clr_idr { val.validate()? }
18265		if let Some(ref val) = self.orgnl_idr { val.validate()? }
18266		if let Some(ref val) = self.orgnl_trad_rpstry_idr { val.validate()? }
18267		Ok(())
18268	}
18269}
18270
18271
18272// ClearingSystemIdentification2Choice ...
18273#[cfg_attr(feature = "derive_debug", derive(Debug))]
18274#[cfg_attr(feature = "derive_default", derive(Default))]
18275#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18276#[cfg_attr(feature = "derive_clone", derive(Clone))]
18277#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18278pub struct ClearingSystemIdentification2Choice {
18279	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
18280	pub cd: Option<String>,
18281	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
18282	pub prtry: Option<String>,
18283}
18284
18285impl ClearingSystemIdentification2Choice {
18286	pub fn validate(&self) -> Result<(), ValidationError> {
18287		if let Some(ref val) = self.cd {
18288			if val.chars().count() < 1 {
18289				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
18290			}
18291			if val.chars().count() > 5 {
18292				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 5".to_string()));
18293			}
18294		}
18295		if let Some(ref val) = self.prtry {
18296			if val.chars().count() < 1 {
18297				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
18298			}
18299			if val.chars().count() > 35 {
18300				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
18301			}
18302		}
18303		Ok(())
18304	}
18305}
18306
18307
18308// ClearingSystemIdentification3Choice ...
18309#[cfg_attr(feature = "derive_debug", derive(Debug))]
18310#[cfg_attr(feature = "derive_default", derive(Default))]
18311#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18312#[cfg_attr(feature = "derive_clone", derive(Clone))]
18313#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18314pub struct ClearingSystemIdentification3Choice {
18315	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
18316	pub cd: Option<String>,
18317	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
18318	pub prtry: Option<String>,
18319}
18320
18321impl ClearingSystemIdentification3Choice {
18322	pub fn validate(&self) -> Result<(), ValidationError> {
18323		if let Some(ref val) = self.cd {
18324			if val.chars().count() < 1 {
18325				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
18326			}
18327			if val.chars().count() > 3 {
18328				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 3".to_string()));
18329			}
18330		}
18331		if let Some(ref val) = self.prtry {
18332			if val.chars().count() < 1 {
18333				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
18334			}
18335			if val.chars().count() > 35 {
18336				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
18337			}
18338		}
18339		Ok(())
18340	}
18341}
18342
18343
18344// ClearingSystemMemberIdentification2 ...
18345#[cfg_attr(feature = "derive_debug", derive(Debug))]
18346#[cfg_attr(feature = "derive_default", derive(Default))]
18347#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18348#[cfg_attr(feature = "derive_clone", derive(Clone))]
18349#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18350pub struct ClearingSystemMemberIdentification2 {
18351	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysId", skip_serializing_if = "Option::is_none") )]
18352	pub clr_sys_id: Option<ClearingSystemIdentification2Choice>,
18353	#[cfg_attr( feature = "derive_serde", serde(rename = "MmbId") )]
18354	pub mmb_id: String,
18355}
18356
18357impl ClearingSystemMemberIdentification2 {
18358	pub fn validate(&self) -> Result<(), ValidationError> {
18359		if let Some(ref val) = self.clr_sys_id { val.validate()? }
18360		if self.mmb_id.chars().count() < 1 {
18361			return Err(ValidationError::new(1001, "mmb_id is shorter than the minimum length of 1".to_string()));
18362		}
18363		if self.mmb_id.chars().count() > 35 {
18364			return Err(ValidationError::new(1002, "mmb_id exceeds the maximum length of 35".to_string()));
18365		}
18366		Ok(())
18367	}
18368}
18369
18370
18371// ClearingSystemMemberIdentification4Choice ...
18372#[cfg_attr(feature = "derive_debug", derive(Debug))]
18373#[cfg_attr(feature = "derive_default", derive(Default))]
18374#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18375#[cfg_attr(feature = "derive_clone", derive(Clone))]
18376#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18377pub struct ClearingSystemMemberIdentification4Choice {
18378	#[cfg_attr( feature = "derive_serde", serde(rename = "USCHU", skip_serializing_if = "Option::is_none") )]
18379	pub uschu: Option<String>,
18380	#[cfg_attr( feature = "derive_serde", serde(rename = "NZNCC", skip_serializing_if = "Option::is_none") )]
18381	pub nzncc: Option<String>,
18382	#[cfg_attr( feature = "derive_serde", serde(rename = "IENSC", skip_serializing_if = "Option::is_none") )]
18383	pub iensc: Option<String>,
18384	#[cfg_attr( feature = "derive_serde", serde(rename = "GBSC", skip_serializing_if = "Option::is_none") )]
18385	pub gbsc: Option<String>,
18386	#[cfg_attr( feature = "derive_serde", serde(rename = "USCH", skip_serializing_if = "Option::is_none") )]
18387	pub usch: Option<String>,
18388	#[cfg_attr( feature = "derive_serde", serde(rename = "CHBC", skip_serializing_if = "Option::is_none") )]
18389	pub chbc: Option<String>,
18390	#[cfg_attr( feature = "derive_serde", serde(rename = "USFW", skip_serializing_if = "Option::is_none") )]
18391	pub usfw: Option<String>,
18392	#[cfg_attr( feature = "derive_serde", serde(rename = "PTNCC", skip_serializing_if = "Option::is_none") )]
18393	pub ptncc: Option<String>,
18394	#[cfg_attr( feature = "derive_serde", serde(rename = "RUCB", skip_serializing_if = "Option::is_none") )]
18395	pub rucb: Option<String>,
18396	#[cfg_attr( feature = "derive_serde", serde(rename = "ITNCC", skip_serializing_if = "Option::is_none") )]
18397	pub itncc: Option<String>,
18398	#[cfg_attr( feature = "derive_serde", serde(rename = "ATBLZ", skip_serializing_if = "Option::is_none") )]
18399	pub atblz: Option<String>,
18400	#[cfg_attr( feature = "derive_serde", serde(rename = "CACPA", skip_serializing_if = "Option::is_none") )]
18401	pub cacpa: Option<String>,
18402	#[cfg_attr( feature = "derive_serde", serde(rename = "CHSIC", skip_serializing_if = "Option::is_none") )]
18403	pub chsic: Option<String>,
18404	#[cfg_attr( feature = "derive_serde", serde(rename = "DEBLZ", skip_serializing_if = "Option::is_none") )]
18405	pub deblz: Option<String>,
18406	#[cfg_attr( feature = "derive_serde", serde(rename = "ESNCC", skip_serializing_if = "Option::is_none") )]
18407	pub esncc: Option<String>,
18408	#[cfg_attr( feature = "derive_serde", serde(rename = "ZANCC", skip_serializing_if = "Option::is_none") )]
18409	pub zancc: Option<String>,
18410	#[cfg_attr( feature = "derive_serde", serde(rename = "HKNCC", skip_serializing_if = "Option::is_none") )]
18411	pub hkncc: Option<String>,
18412	#[cfg_attr( feature = "derive_serde", serde(rename = "AUBSBx", skip_serializing_if = "Option::is_none") )]
18413	pub aubs_bx: Option<String>,
18414	#[cfg_attr( feature = "derive_serde", serde(rename = "AUBSBs", skip_serializing_if = "Option::is_none") )]
18415	pub aubs_bs: Option<String>,
18416}
18417
18418impl ClearingSystemMemberIdentification4Choice {
18419	pub fn validate(&self) -> Result<(), ValidationError> {
18420		if let Some(ref val) = self.uschu {
18421			let pattern = Regex::new("CH[0-9]{6,6}").unwrap();
18422			if !pattern.is_match(val) {
18423				return Err(ValidationError::new(1005, "uschu does not match the required pattern".to_string()));
18424			}
18425		}
18426		if let Some(ref val) = self.nzncc {
18427			let pattern = Regex::new("NZ[0-9]{6,6}").unwrap();
18428			if !pattern.is_match(val) {
18429				return Err(ValidationError::new(1005, "nzncc does not match the required pattern".to_string()));
18430			}
18431		}
18432		if let Some(ref val) = self.iensc {
18433			let pattern = Regex::new("IE[0-9]{6,6}").unwrap();
18434			if !pattern.is_match(val) {
18435				return Err(ValidationError::new(1005, "iensc does not match the required pattern".to_string()));
18436			}
18437		}
18438		if let Some(ref val) = self.gbsc {
18439			let pattern = Regex::new("SC[0-9]{6,6}").unwrap();
18440			if !pattern.is_match(val) {
18441				return Err(ValidationError::new(1005, "gbsc does not match the required pattern".to_string()));
18442			}
18443		}
18444		if let Some(ref val) = self.usch {
18445			let pattern = Regex::new("CP[0-9]{4,4}").unwrap();
18446			if !pattern.is_match(val) {
18447				return Err(ValidationError::new(1005, "usch does not match the required pattern".to_string()));
18448			}
18449		}
18450		if let Some(ref val) = self.chbc {
18451			let pattern = Regex::new("SW[0-9]{3,5}").unwrap();
18452			if !pattern.is_match(val) {
18453				return Err(ValidationError::new(1005, "chbc does not match the required pattern".to_string()));
18454			}
18455		}
18456		if let Some(ref val) = self.usfw {
18457			let pattern = Regex::new("FW[0-9]{9,9}").unwrap();
18458			if !pattern.is_match(val) {
18459				return Err(ValidationError::new(1005, "usfw does not match the required pattern".to_string()));
18460			}
18461		}
18462		if let Some(ref val) = self.ptncc {
18463			let pattern = Regex::new("PT[0-9]{8,8}").unwrap();
18464			if !pattern.is_match(val) {
18465				return Err(ValidationError::new(1005, "ptncc does not match the required pattern".to_string()));
18466			}
18467		}
18468		if let Some(ref val) = self.rucb {
18469			let pattern = Regex::new("RU[0-9]{9,9}").unwrap();
18470			if !pattern.is_match(val) {
18471				return Err(ValidationError::new(1005, "rucb does not match the required pattern".to_string()));
18472			}
18473		}
18474		if let Some(ref val) = self.itncc {
18475			let pattern = Regex::new("IT[0-9]{10,10}").unwrap();
18476			if !pattern.is_match(val) {
18477				return Err(ValidationError::new(1005, "itncc does not match the required pattern".to_string()));
18478			}
18479		}
18480		if let Some(ref val) = self.atblz {
18481			let pattern = Regex::new("AT[0-9]{5,5}").unwrap();
18482			if !pattern.is_match(val) {
18483				return Err(ValidationError::new(1005, "atblz does not match the required pattern".to_string()));
18484			}
18485		}
18486		if let Some(ref val) = self.cacpa {
18487			let pattern = Regex::new("CA[0-9]{9,9}").unwrap();
18488			if !pattern.is_match(val) {
18489				return Err(ValidationError::new(1005, "cacpa does not match the required pattern".to_string()));
18490			}
18491		}
18492		if let Some(ref val) = self.chsic {
18493			let pattern = Regex::new("SW[0-9]{6,6}").unwrap();
18494			if !pattern.is_match(val) {
18495				return Err(ValidationError::new(1005, "chsic does not match the required pattern".to_string()));
18496			}
18497		}
18498		if let Some(ref val) = self.deblz {
18499			let pattern = Regex::new("BL[0-9]{8,8}").unwrap();
18500			if !pattern.is_match(val) {
18501				return Err(ValidationError::new(1005, "deblz does not match the required pattern".to_string()));
18502			}
18503		}
18504		if let Some(ref val) = self.esncc {
18505			let pattern = Regex::new("ES[0-9]{8,9}").unwrap();
18506			if !pattern.is_match(val) {
18507				return Err(ValidationError::new(1005, "esncc does not match the required pattern".to_string()));
18508			}
18509		}
18510		if let Some(ref val) = self.zancc {
18511			let pattern = Regex::new("ZA[0-9]{6,6}").unwrap();
18512			if !pattern.is_match(val) {
18513				return Err(ValidationError::new(1005, "zancc does not match the required pattern".to_string()));
18514			}
18515		}
18516		if let Some(ref val) = self.hkncc {
18517			let pattern = Regex::new("HK[0-9]{3,3}").unwrap();
18518			if !pattern.is_match(val) {
18519				return Err(ValidationError::new(1005, "hkncc does not match the required pattern".to_string()));
18520			}
18521		}
18522		if let Some(ref val) = self.aubs_bx {
18523			let pattern = Regex::new("AU[0-9]{6,6}").unwrap();
18524			if !pattern.is_match(val) {
18525				return Err(ValidationError::new(1005, "aubs_bx does not match the required pattern".to_string()));
18526			}
18527		}
18528		if let Some(ref val) = self.aubs_bs {
18529			let pattern = Regex::new("AU[0-9]{6,6}").unwrap();
18530			if !pattern.is_match(val) {
18531				return Err(ValidationError::new(1005, "aubs_bs does not match the required pattern".to_string()));
18532			}
18533		}
18534		Ok(())
18535	}
18536}
18537
18538
18539// ClosedStatusReason1 ...
18540#[cfg_attr(feature = "derive_debug", derive(Debug))]
18541#[cfg_attr(feature = "derive_default", derive(Default))]
18542#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18543#[cfg_attr(feature = "derive_clone", derive(Clone))]
18544#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18545pub struct ClosedStatusReason1 {
18546	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
18547	pub cd: ClosedStatusReason2Choice,
18548	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
18549	pub addtl_inf: Option<String>,
18550}
18551
18552impl ClosedStatusReason1 {
18553	pub fn validate(&self) -> Result<(), ValidationError> {
18554		self.cd.validate()?;
18555		if let Some(ref val) = self.addtl_inf {
18556			if val.chars().count() < 1 {
18557				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
18558			}
18559			if val.chars().count() > 350 {
18560				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 350".to_string()));
18561			}
18562		}
18563		Ok(())
18564	}
18565}
18566
18567
18568// ClosedStatusReason1Choice ...
18569#[cfg_attr(feature = "derive_debug", derive(Debug))]
18570#[cfg_attr(feature = "derive_default", derive(Default))]
18571#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18572#[cfg_attr(feature = "derive_clone", derive(Clone))]
18573#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18574pub struct ClosedStatusReason1Choice {
18575	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
18576	pub no_spcfd_rsn: Option<NoReasonCode>,
18577	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
18578	pub rsn: Option<Vec<ClosedStatusReason1>>,
18579}
18580
18581impl ClosedStatusReason1Choice {
18582	pub fn validate(&self) -> Result<(), ValidationError> {
18583		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
18584		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
18585		Ok(())
18586	}
18587}
18588
18589
18590// ClosedStatusReason1Code ...
18591#[cfg_attr(feature = "derive_debug", derive(Debug))]
18592#[cfg_attr(feature = "derive_default", derive(Default))]
18593#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18594#[cfg_attr(feature = "derive_clone", derive(Clone))]
18595#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18596pub enum ClosedStatusReason1Code {
18597	#[cfg_attr(feature = "derive_default", default)]
18598	#[cfg_attr( feature = "derive_serde", serde(rename = "ASIN") )]
18599	CodeASIN,
18600	#[cfg_attr( feature = "derive_serde", serde(rename = "CLIN") )]
18601	CodeCLIN,
18602}
18603
18604impl ClosedStatusReason1Code {
18605	pub fn validate(&self) -> Result<(), ValidationError> {
18606		Ok(())
18607	}
18608}
18609
18610
18611// ClosedStatusReason2Choice ...
18612#[cfg_attr(feature = "derive_debug", derive(Debug))]
18613#[cfg_attr(feature = "derive_default", derive(Default))]
18614#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18615#[cfg_attr(feature = "derive_clone", derive(Clone))]
18616#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18617pub struct ClosedStatusReason2Choice {
18618	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
18619	pub cd: Option<ClosedStatusReason1Code>,
18620	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
18621	pub prtry: Option<GenericIdentification36>,
18622}
18623
18624impl ClosedStatusReason2Choice {
18625	pub fn validate(&self) -> Result<(), ValidationError> {
18626		if let Some(ref val) = self.cd { val.validate()? }
18627		if let Some(ref val) = self.prtry { val.validate()? }
18628		Ok(())
18629	}
18630}
18631
18632
18633// ClosurePendingStatusReason1 ...
18634#[cfg_attr(feature = "derive_debug", derive(Debug))]
18635#[cfg_attr(feature = "derive_default", derive(Default))]
18636#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18637#[cfg_attr(feature = "derive_clone", derive(Clone))]
18638#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18639pub struct ClosurePendingStatusReason1 {
18640	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
18641	pub cd: ClosurePendingStatusReason2Choice,
18642	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
18643	pub addtl_inf: Option<String>,
18644}
18645
18646impl ClosurePendingStatusReason1 {
18647	pub fn validate(&self) -> Result<(), ValidationError> {
18648		self.cd.validate()?;
18649		if let Some(ref val) = self.addtl_inf {
18650			if val.chars().count() < 1 {
18651				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
18652			}
18653			if val.chars().count() > 350 {
18654				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 350".to_string()));
18655			}
18656		}
18657		Ok(())
18658	}
18659}
18660
18661
18662// ClosurePendingStatusReason1Choice ...
18663#[cfg_attr(feature = "derive_debug", derive(Debug))]
18664#[cfg_attr(feature = "derive_default", derive(Default))]
18665#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18666#[cfg_attr(feature = "derive_clone", derive(Clone))]
18667#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18668pub struct ClosurePendingStatusReason1Choice {
18669	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
18670	pub no_spcfd_rsn: Option<NoReasonCode>,
18671	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
18672	pub rsn: Option<Vec<ClosurePendingStatusReason1>>,
18673}
18674
18675impl ClosurePendingStatusReason1Choice {
18676	pub fn validate(&self) -> Result<(), ValidationError> {
18677		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
18678		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
18679		Ok(())
18680	}
18681}
18682
18683
18684// ClosurePendingStatusReason1Code ...
18685#[cfg_attr(feature = "derive_debug", derive(Debug))]
18686#[cfg_attr(feature = "derive_default", derive(Default))]
18687#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18688#[cfg_attr(feature = "derive_clone", derive(Clone))]
18689#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18690pub enum ClosurePendingStatusReason1Code {
18691	#[cfg_attr(feature = "derive_default", default)]
18692	#[cfg_attr( feature = "derive_serde", serde(rename = "CLOS") )]
18693	CodeCLOS,
18694	#[cfg_attr( feature = "derive_serde", serde(rename = "PEND") )]
18695	CodePEND,
18696}
18697
18698impl ClosurePendingStatusReason1Code {
18699	pub fn validate(&self) -> Result<(), ValidationError> {
18700		Ok(())
18701	}
18702}
18703
18704
18705// ClosurePendingStatusReason2Choice ...
18706#[cfg_attr(feature = "derive_debug", derive(Debug))]
18707#[cfg_attr(feature = "derive_default", derive(Default))]
18708#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18709#[cfg_attr(feature = "derive_clone", derive(Clone))]
18710#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18711pub struct ClosurePendingStatusReason2Choice {
18712	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
18713	pub cd: Option<ClosurePendingStatusReason1Code>,
18714	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
18715	pub prtry: Option<GenericIdentification36>,
18716}
18717
18718impl ClosurePendingStatusReason2Choice {
18719	pub fn validate(&self) -> Result<(), ValidationError> {
18720		if let Some(ref val) = self.cd { val.validate()? }
18721		if let Some(ref val) = self.prtry { val.validate()? }
18722		Ok(())
18723	}
18724}
18725
18726
18727// ClosureReason2Choice ...
18728#[cfg_attr(feature = "derive_debug", derive(Debug))]
18729#[cfg_attr(feature = "derive_default", derive(Default))]
18730#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18731#[cfg_attr(feature = "derive_clone", derive(Clone))]
18732#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18733pub struct ClosureReason2Choice {
18734	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
18735	pub cd: Option<SystemClosureReason1Code>,
18736	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
18737	pub prtry: Option<String>,
18738}
18739
18740impl ClosureReason2Choice {
18741	pub fn validate(&self) -> Result<(), ValidationError> {
18742		if let Some(ref val) = self.cd { val.validate()? }
18743		if let Some(ref val) = self.prtry {
18744			if val.chars().count() < 1 {
18745				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
18746			}
18747			if val.chars().count() > 35 {
18748				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
18749			}
18750		}
18751		Ok(())
18752	}
18753}
18754
18755
18756// CodeOrProprietary1Choice ...
18757#[cfg_attr(feature = "derive_debug", derive(Debug))]
18758#[cfg_attr(feature = "derive_default", derive(Default))]
18759#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18760#[cfg_attr(feature = "derive_clone", derive(Clone))]
18761#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18762pub struct CodeOrProprietary1Choice {
18763	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
18764	pub cd: Option<String>,
18765	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
18766	pub prtry: Option<GenericIdentification13>,
18767}
18768
18769impl CodeOrProprietary1Choice {
18770	pub fn validate(&self) -> Result<(), ValidationError> {
18771		if let Some(ref val) = self.cd {
18772			if val.chars().count() < 1 {
18773				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
18774			}
18775			if val.chars().count() > 4 {
18776				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
18777			}
18778		}
18779		if let Some(ref val) = self.prtry { val.validate()? }
18780		Ok(())
18781	}
18782}
18783
18784
18785// Collateral18 ...
18786#[cfg_attr(feature = "derive_debug", derive(Debug))]
18787#[cfg_attr(feature = "derive_default", derive(Default))]
18788#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18789#[cfg_attr(feature = "derive_clone", derive(Clone))]
18790#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18791pub struct Collateral18 {
18792	#[cfg_attr( feature = "derive_serde", serde(rename = "Valtn") )]
18793	pub valtn: SecuredCollateral2Choice,
18794	#[cfg_attr( feature = "derive_serde", serde(rename = "Hrcut", skip_serializing_if = "Option::is_none") )]
18795	pub hrcut: Option<f64>,
18796	#[cfg_attr( feature = "derive_serde", serde(rename = "SpclCollInd", skip_serializing_if = "Option::is_none") )]
18797	pub spcl_coll_ind: Option<SpecialCollateral2Code>,
18798}
18799
18800impl Collateral18 {
18801	pub fn validate(&self) -> Result<(), ValidationError> {
18802		self.valtn.validate()?;
18803		if let Some(ref val) = self.spcl_coll_ind { val.validate()? }
18804		Ok(())
18805	}
18806}
18807
18808
18809// Collateral1Code ...
18810#[cfg_attr(feature = "derive_debug", derive(Debug))]
18811#[cfg_attr(feature = "derive_default", derive(Default))]
18812#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18813#[cfg_attr(feature = "derive_clone", derive(Clone))]
18814#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18815pub enum Collateral1Code {
18816	#[cfg_attr(feature = "derive_default", default)]
18817	#[cfg_attr( feature = "derive_serde", serde(rename = "COLL") )]
18818	CodeCOLL,
18819	#[cfg_attr( feature = "derive_serde", serde(rename = "NCOL") )]
18820	CodeNCOL,
18821}
18822
18823impl Collateral1Code {
18824	pub fn validate(&self) -> Result<(), ValidationError> {
18825		Ok(())
18826	}
18827}
18828
18829
18830// Collateral52 ...
18831#[cfg_attr(feature = "derive_debug", derive(Debug))]
18832#[cfg_attr(feature = "derive_default", derive(Default))]
18833#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18834#[cfg_attr(feature = "derive_clone", derive(Clone))]
18835#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18836pub struct Collateral52 {
18837	#[cfg_attr( feature = "derive_serde", serde(rename = "CollValDt", skip_serializing_if = "Option::is_none") )]
18838	pub coll_val_dt: Option<String>,
18839	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstTp", skip_serializing_if = "Option::is_none") )]
18840	pub asst_tp: Option<CollateralType21>,
18841	#[cfg_attr( feature = "derive_serde", serde(rename = "NetXpsrCollstnInd", skip_serializing_if = "Option::is_none") )]
18842	pub net_xpsr_collstn_ind: Option<bool>,
18843	#[cfg_attr( feature = "derive_serde", serde(rename = "BsktIdr", skip_serializing_if = "Option::is_none") )]
18844	pub bskt_idr: Option<SecurityIdentification26Choice>,
18845}
18846
18847impl Collateral52 {
18848	pub fn validate(&self) -> Result<(), ValidationError> {
18849		if let Some(ref val) = self.asst_tp { val.validate()? }
18850		if let Some(ref val) = self.bskt_idr { val.validate()? }
18851		Ok(())
18852	}
18853}
18854
18855
18856// CollateralAccount4 ...
18857#[cfg_attr(feature = "derive_debug", derive(Debug))]
18858#[cfg_attr(feature = "derive_default", derive(Default))]
18859#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18860#[cfg_attr(feature = "derive_clone", derive(Clone))]
18861#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18862pub struct CollateralAccount4 {
18863	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
18864	pub id: GenericIdentification165,
18865	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstHldg") )]
18866	pub asst_hldg: Vec<AssetHolding1>,
18867}
18868
18869impl CollateralAccount4 {
18870	pub fn validate(&self) -> Result<(), ValidationError> {
18871		self.id.validate()?;
18872		for item in &self.asst_hldg { item.validate()? }
18873		Ok(())
18874	}
18875}
18876
18877
18878// CollateralAccount5 ...
18879#[cfg_attr(feature = "derive_debug", derive(Debug))]
18880#[cfg_attr(feature = "derive_default", derive(Default))]
18881#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18882#[cfg_attr(feature = "derive_clone", derive(Clone))]
18883#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18884pub struct CollateralAccount5 {
18885	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
18886	pub id: PartyIdentification118Choice,
18887	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdMrgnAcct") )]
18888	pub rltd_mrgn_acct: Vec<MarginAccount1>,
18889	#[cfg_attr( feature = "derive_serde", serde(rename = "TitlTrfCollArrgmnt", skip_serializing_if = "Option::is_none") )]
18890	pub titl_trf_coll_arrgmnt: Option<bool>,
18891	#[cfg_attr( feature = "derive_serde", serde(rename = "CollSgrtnByVal", skip_serializing_if = "Option::is_none") )]
18892	pub coll_sgrtn_by_val: Option<bool>,
18893}
18894
18895impl CollateralAccount5 {
18896	pub fn validate(&self) -> Result<(), ValidationError> {
18897		self.id.validate()?;
18898		for item in &self.rltd_mrgn_acct { item.validate()? }
18899		Ok(())
18900	}
18901}
18902
18903
18904// CollateralAccountType3Code ...
18905#[cfg_attr(feature = "derive_debug", derive(Debug))]
18906#[cfg_attr(feature = "derive_default", derive(Default))]
18907#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18908#[cfg_attr(feature = "derive_clone", derive(Clone))]
18909#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18910pub enum CollateralAccountType3Code {
18911	#[cfg_attr(feature = "derive_default", default)]
18912	#[cfg_attr( feature = "derive_serde", serde(rename = "MGIN") )]
18913	CodeMGIN,
18914	#[cfg_attr( feature = "derive_serde", serde(rename = "DFLT") )]
18915	CodeDFLT,
18916}
18917
18918impl CollateralAccountType3Code {
18919	pub fn validate(&self) -> Result<(), ValidationError> {
18920		Ok(())
18921	}
18922}
18923
18924
18925// CollateralData33 ...
18926#[cfg_attr(feature = "derive_debug", derive(Debug))]
18927#[cfg_attr(feature = "derive_default", derive(Default))]
18928#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18929#[cfg_attr(feature = "derive_clone", derive(Clone))]
18930#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18931pub struct CollateralData33 {
18932	#[cfg_attr( feature = "derive_serde", serde(rename = "NetXpsrCollstnInd", skip_serializing_if = "Option::is_none") )]
18933	pub net_xpsr_collstn_ind: Option<bool>,
18934	#[cfg_attr( feature = "derive_serde", serde(rename = "CmpntTp", skip_serializing_if = "Option::is_none") )]
18935	pub cmpnt_tp: Option<CollateralType6Code>,
18936	#[cfg_attr( feature = "derive_serde", serde(rename = "CshCollCcy", skip_serializing_if = "Option::is_none") )]
18937	pub csh_coll_ccy: Option<String>,
18938	#[cfg_attr( feature = "derive_serde", serde(rename = "PricCcy", skip_serializing_if = "Option::is_none") )]
18939	pub pric_ccy: Option<String>,
18940	#[cfg_attr( feature = "derive_serde", serde(rename = "Qlty", skip_serializing_if = "Option::is_none") )]
18941	pub qlty: Option<CollateralQualityType1Code>,
18942	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtrty", skip_serializing_if = "Option::is_none") )]
18943	pub mtrty: Option<ContractTerm6Choice>,
18944	#[cfg_attr( feature = "derive_serde", serde(rename = "IssrJursdctn", skip_serializing_if = "Option::is_none") )]
18945	pub issr_jursdctn: Option<IssuerJurisdiction1Choice>,
18946	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
18947	pub tp: Option<SecuritiesLendingType3Choice>,
18948	#[cfg_attr( feature = "derive_serde", serde(rename = "TradRpstry", skip_serializing_if = "Option::is_none") )]
18949	pub trad_rpstry: Option<OrganisationIdentification15Choice>,
18950	#[cfg_attr( feature = "derive_serde", serde(rename = "RcncltnFlg", skip_serializing_if = "Option::is_none") )]
18951	pub rcncltn_flg: Option<ReconciliationFlag2>,
18952	#[cfg_attr( feature = "derive_serde", serde(rename = "RinvstdCsh", skip_serializing_if = "Option::is_none") )]
18953	pub rinvstd_csh: Option<ReinvestedCashTypeAndAmount2>,
18954}
18955
18956impl CollateralData33 {
18957	pub fn validate(&self) -> Result<(), ValidationError> {
18958		if let Some(ref val) = self.cmpnt_tp { val.validate()? }
18959		if let Some(ref val) = self.csh_coll_ccy {
18960			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
18961			if !pattern.is_match(val) {
18962				return Err(ValidationError::new(1005, "csh_coll_ccy does not match the required pattern".to_string()));
18963			}
18964		}
18965		if let Some(ref val) = self.pric_ccy {
18966			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
18967			if !pattern.is_match(val) {
18968				return Err(ValidationError::new(1005, "pric_ccy does not match the required pattern".to_string()));
18969			}
18970		}
18971		if let Some(ref val) = self.qlty { val.validate()? }
18972		if let Some(ref val) = self.mtrty { val.validate()? }
18973		if let Some(ref val) = self.issr_jursdctn { val.validate()? }
18974		if let Some(ref val) = self.tp { val.validate()? }
18975		if let Some(ref val) = self.trad_rpstry { val.validate()? }
18976		if let Some(ref val) = self.rcncltn_flg { val.validate()? }
18977		if let Some(ref val) = self.rinvstd_csh { val.validate()? }
18978		Ok(())
18979	}
18980}
18981
18982
18983// CollateralData35 ...
18984#[cfg_attr(feature = "derive_debug", derive(Debug))]
18985#[cfg_attr(feature = "derive_default", derive(Default))]
18986#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
18987#[cfg_attr(feature = "derive_clone", derive(Clone))]
18988#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
18989pub struct CollateralData35 {
18990	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstTp", skip_serializing_if = "Option::is_none") )]
18991	pub asst_tp: Option<CollateralType21>,
18992	#[cfg_attr( feature = "derive_serde", serde(rename = "NetXpsrCollstnInd", skip_serializing_if = "Option::is_none") )]
18993	pub net_xpsr_collstn_ind: Option<bool>,
18994	#[cfg_attr( feature = "derive_serde", serde(rename = "BsktIdr", skip_serializing_if = "Option::is_none") )]
18995	pub bskt_idr: Option<SecurityIdentification26Choice>,
18996}
18997
18998impl CollateralData35 {
18999	pub fn validate(&self) -> Result<(), ValidationError> {
19000		if let Some(ref val) = self.asst_tp { val.validate()? }
19001		if let Some(ref val) = self.bskt_idr { val.validate()? }
19002		Ok(())
19003	}
19004}
19005
19006
19007// CollateralDeliveryMethod1Code ...
19008#[cfg_attr(feature = "derive_debug", derive(Debug))]
19009#[cfg_attr(feature = "derive_default", derive(Default))]
19010#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19011#[cfg_attr(feature = "derive_clone", derive(Clone))]
19012#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19013pub enum CollateralDeliveryMethod1Code {
19014	#[cfg_attr(feature = "derive_default", default)]
19015	#[cfg_attr( feature = "derive_serde", serde(rename = "SICA") )]
19016	CodeSICA,
19017	#[cfg_attr( feature = "derive_serde", serde(rename = "SIUR") )]
19018	CodeSIUR,
19019	#[cfg_attr( feature = "derive_serde", serde(rename = "TTCA") )]
19020	CodeTTCA,
19021}
19022
19023impl CollateralDeliveryMethod1Code {
19024	pub fn validate(&self) -> Result<(), ValidationError> {
19025		Ok(())
19026	}
19027}
19028
19029
19030// CollateralFlag13Choice ...
19031#[cfg_attr(feature = "derive_debug", derive(Debug))]
19032#[cfg_attr(feature = "derive_default", derive(Default))]
19033#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19034#[cfg_attr(feature = "derive_clone", derive(Clone))]
19035#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19036pub struct CollateralFlag13Choice {
19037	#[cfg_attr( feature = "derive_serde", serde(rename = "Collsd", skip_serializing_if = "Option::is_none") )]
19038	pub collsd: Option<CollaterisedData12>,
19039	#[cfg_attr( feature = "derive_serde", serde(rename = "Uncollsd", skip_serializing_if = "Option::is_none") )]
19040	pub uncollsd: Option<NoReasonCode>,
19041}
19042
19043impl CollateralFlag13Choice {
19044	pub fn validate(&self) -> Result<(), ValidationError> {
19045		if let Some(ref val) = self.collsd { val.validate()? }
19046		if let Some(ref val) = self.uncollsd { val.validate()? }
19047		Ok(())
19048	}
19049}
19050
19051
19052// CollateralMarginCorrection6 ...
19053#[cfg_attr(feature = "derive_debug", derive(Debug))]
19054#[cfg_attr(feature = "derive_default", derive(Default))]
19055#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19056#[cfg_attr(feature = "derive_clone", derive(Clone))]
19057#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19058pub struct CollateralMarginCorrection6 {
19059	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
19060	pub tech_rcrd_id: Option<String>,
19061	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDtTm") )]
19062	pub rptg_dt_tm: String,
19063	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
19064	pub evt_dt: String,
19065	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPty") )]
19066	pub ctr_pty: Counterparty39,
19067	#[cfg_attr( feature = "derive_serde", serde(rename = "CollPrtflId") )]
19068	pub coll_prtfl_id: String,
19069	#[cfg_attr( feature = "derive_serde", serde(rename = "PstdMrgnOrColl", skip_serializing_if = "Option::is_none") )]
19070	pub pstd_mrgn_or_coll: Option<PostedMarginOrCollateral4>,
19071	#[cfg_attr( feature = "derive_serde", serde(rename = "RcvdMrgnOrColl", skip_serializing_if = "Option::is_none") )]
19072	pub rcvd_mrgn_or_coll: Option<ReceivedMarginOrCollateral4>,
19073	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
19074	pub splmtry_data: Option<Vec<SupplementaryData1>>,
19075}
19076
19077impl CollateralMarginCorrection6 {
19078	pub fn validate(&self) -> Result<(), ValidationError> {
19079		if let Some(ref val) = self.tech_rcrd_id {
19080			if val.chars().count() < 1 {
19081				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
19082			}
19083			if val.chars().count() > 140 {
19084				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
19085			}
19086		}
19087		self.ctr_pty.validate()?;
19088		if self.coll_prtfl_id.chars().count() < 1 {
19089			return Err(ValidationError::new(1001, "coll_prtfl_id is shorter than the minimum length of 1".to_string()));
19090		}
19091		if self.coll_prtfl_id.chars().count() > 52 {
19092			return Err(ValidationError::new(1002, "coll_prtfl_id exceeds the maximum length of 52".to_string()));
19093		}
19094		if let Some(ref val) = self.pstd_mrgn_or_coll { val.validate()? }
19095		if let Some(ref val) = self.rcvd_mrgn_or_coll { val.validate()? }
19096		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
19097		Ok(())
19098	}
19099}
19100
19101
19102// CollateralMarginError4 ...
19103#[cfg_attr(feature = "derive_debug", derive(Debug))]
19104#[cfg_attr(feature = "derive_default", derive(Default))]
19105#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19106#[cfg_attr(feature = "derive_clone", derive(Clone))]
19107#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19108pub struct CollateralMarginError4 {
19109	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
19110	pub tech_rcrd_id: Option<String>,
19111	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDtTm") )]
19112	pub rptg_dt_tm: String,
19113	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPty") )]
19114	pub ctr_pty: Counterparty39,
19115	#[cfg_attr( feature = "derive_serde", serde(rename = "CollPrtflId") )]
19116	pub coll_prtfl_id: String,
19117	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
19118	pub splmtry_data: Option<Vec<SupplementaryData1>>,
19119}
19120
19121impl CollateralMarginError4 {
19122	pub fn validate(&self) -> Result<(), ValidationError> {
19123		if let Some(ref val) = self.tech_rcrd_id {
19124			if val.chars().count() < 1 {
19125				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
19126			}
19127			if val.chars().count() > 140 {
19128				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
19129			}
19130		}
19131		self.ctr_pty.validate()?;
19132		if self.coll_prtfl_id.chars().count() < 1 {
19133			return Err(ValidationError::new(1001, "coll_prtfl_id is shorter than the minimum length of 1".to_string()));
19134		}
19135		if self.coll_prtfl_id.chars().count() > 52 {
19136			return Err(ValidationError::new(1002, "coll_prtfl_id exceeds the maximum length of 52".to_string()));
19137		}
19138		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
19139		Ok(())
19140	}
19141}
19142
19143
19144// CollateralMarginMarginUpdate5 ...
19145#[cfg_attr(feature = "derive_debug", derive(Debug))]
19146#[cfg_attr(feature = "derive_default", derive(Default))]
19147#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19148#[cfg_attr(feature = "derive_clone", derive(Clone))]
19149#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19150pub struct CollateralMarginMarginUpdate5 {
19151	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
19152	pub tech_rcrd_id: Option<String>,
19153	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDtTm") )]
19154	pub rptg_dt_tm: String,
19155	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
19156	pub evt_dt: String,
19157	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPty", skip_serializing_if = "Option::is_none") )]
19158	pub ctr_pty: Option<Counterparty39>,
19159	#[cfg_attr( feature = "derive_serde", serde(rename = "CollPrtflId") )]
19160	pub coll_prtfl_id: String,
19161	#[cfg_attr( feature = "derive_serde", serde(rename = "PstdMrgnOrColl", skip_serializing_if = "Option::is_none") )]
19162	pub pstd_mrgn_or_coll: Option<PostedMarginOrCollateral4>,
19163	#[cfg_attr( feature = "derive_serde", serde(rename = "RcvdMrgnOrColl", skip_serializing_if = "Option::is_none") )]
19164	pub rcvd_mrgn_or_coll: Option<ReceivedMarginOrCollateral4>,
19165	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
19166	pub splmtry_data: Option<Vec<SupplementaryData1>>,
19167}
19168
19169impl CollateralMarginMarginUpdate5 {
19170	pub fn validate(&self) -> Result<(), ValidationError> {
19171		if let Some(ref val) = self.tech_rcrd_id {
19172			if val.chars().count() < 1 {
19173				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
19174			}
19175			if val.chars().count() > 140 {
19176				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
19177			}
19178		}
19179		if let Some(ref val) = self.ctr_pty { val.validate()? }
19180		if self.coll_prtfl_id.chars().count() < 1 {
19181			return Err(ValidationError::new(1001, "coll_prtfl_id is shorter than the minimum length of 1".to_string()));
19182		}
19183		if self.coll_prtfl_id.chars().count() > 52 {
19184			return Err(ValidationError::new(1002, "coll_prtfl_id exceeds the maximum length of 52".to_string()));
19185		}
19186		if let Some(ref val) = self.pstd_mrgn_or_coll { val.validate()? }
19187		if let Some(ref val) = self.rcvd_mrgn_or_coll { val.validate()? }
19188		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
19189		Ok(())
19190	}
19191}
19192
19193
19194// CollateralMarginNew10 ...
19195#[cfg_attr(feature = "derive_debug", derive(Debug))]
19196#[cfg_attr(feature = "derive_default", derive(Default))]
19197#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19198#[cfg_attr(feature = "derive_clone", derive(Clone))]
19199#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19200pub struct CollateralMarginNew10 {
19201	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
19202	pub tech_rcrd_id: Option<String>,
19203	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDtTm") )]
19204	pub rptg_dt_tm: String,
19205	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
19206	pub evt_dt: String,
19207	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPty") )]
19208	pub ctr_pty: Counterparty39,
19209	#[cfg_attr( feature = "derive_serde", serde(rename = "CollPrtflId") )]
19210	pub coll_prtfl_id: String,
19211	#[cfg_attr( feature = "derive_serde", serde(rename = "PstdMrgnOrColl", skip_serializing_if = "Option::is_none") )]
19212	pub pstd_mrgn_or_coll: Option<PostedMarginOrCollateral4>,
19213	#[cfg_attr( feature = "derive_serde", serde(rename = "RcvdMrgnOrColl", skip_serializing_if = "Option::is_none") )]
19214	pub rcvd_mrgn_or_coll: Option<ReceivedMarginOrCollateral4>,
19215	#[cfg_attr( feature = "derive_serde", serde(rename = "RcncltnFlg", skip_serializing_if = "Option::is_none") )]
19216	pub rcncltn_flg: Option<ReconciliationFlag2>,
19217	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctMod") )]
19218	pub ctrct_mod: ContractModification3,
19219	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
19220	pub splmtry_data: Option<Vec<SupplementaryData1>>,
19221}
19222
19223impl CollateralMarginNew10 {
19224	pub fn validate(&self) -> Result<(), ValidationError> {
19225		if let Some(ref val) = self.tech_rcrd_id {
19226			if val.chars().count() < 1 {
19227				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
19228			}
19229			if val.chars().count() > 140 {
19230				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
19231			}
19232		}
19233		self.ctr_pty.validate()?;
19234		if self.coll_prtfl_id.chars().count() < 1 {
19235			return Err(ValidationError::new(1001, "coll_prtfl_id is shorter than the minimum length of 1".to_string()));
19236		}
19237		if self.coll_prtfl_id.chars().count() > 52 {
19238			return Err(ValidationError::new(1002, "coll_prtfl_id exceeds the maximum length of 52".to_string()));
19239		}
19240		if let Some(ref val) = self.pstd_mrgn_or_coll { val.validate()? }
19241		if let Some(ref val) = self.rcvd_mrgn_or_coll { val.validate()? }
19242		if let Some(ref val) = self.rcncltn_flg { val.validate()? }
19243		self.ctrct_mod.validate()?;
19244		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
19245		Ok(())
19246	}
19247}
19248
19249
19250// CollateralMatchingCriteria6 ...
19251#[cfg_attr(feature = "derive_debug", derive(Debug))]
19252#[cfg_attr(feature = "derive_default", derive(Default))]
19253#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19254#[cfg_attr(feature = "derive_clone", derive(Clone))]
19255#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19256pub struct CollateralMatchingCriteria6 {
19257	#[cfg_attr( feature = "derive_serde", serde(rename = "UncollsdFlg", skip_serializing_if = "Option::is_none") )]
19258	pub uncollsd_flg: Option<CompareTrueFalseIndicator3>,
19259	#[cfg_attr( feature = "derive_serde", serde(rename = "NetXpsrCollstnInd", skip_serializing_if = "Option::is_none") )]
19260	pub net_xpsr_collstn_ind: Option<CompareTrueFalseIndicator3>,
19261	#[cfg_attr( feature = "derive_serde", serde(rename = "CollValDt", skip_serializing_if = "Option::is_none") )]
19262	pub coll_val_dt: Option<CompareDate3>,
19263	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstTp", skip_serializing_if = "Option::is_none") )]
19264	pub asst_tp: Option<SecurityCommodityCash4>,
19265	#[cfg_attr( feature = "derive_serde", serde(rename = "BsktIdr", skip_serializing_if = "Option::is_none") )]
19266	pub bskt_idr: Option<CompareSecurityIdentification4>,
19267}
19268
19269impl CollateralMatchingCriteria6 {
19270	pub fn validate(&self) -> Result<(), ValidationError> {
19271		if let Some(ref val) = self.uncollsd_flg { val.validate()? }
19272		if let Some(ref val) = self.net_xpsr_collstn_ind { val.validate()? }
19273		if let Some(ref val) = self.coll_val_dt { val.validate()? }
19274		if let Some(ref val) = self.asst_tp { val.validate()? }
19275		if let Some(ref val) = self.bskt_idr { val.validate()? }
19276		Ok(())
19277	}
19278}
19279
19280
19281// CollateralPool1Code ...
19282#[cfg_attr(feature = "derive_debug", derive(Debug))]
19283#[cfg_attr(feature = "derive_default", derive(Default))]
19284#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19285#[cfg_attr(feature = "derive_clone", derive(Clone))]
19286#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19287pub enum CollateralPool1Code {
19288	#[cfg_attr(feature = "derive_default", default)]
19289	#[cfg_attr( feature = "derive_serde", serde(rename = "NOPL") )]
19290	CodeNOPL,
19291	#[cfg_attr( feature = "derive_serde", serde(rename = "POOL") )]
19292	CodePOOL,
19293}
19294
19295impl CollateralPool1Code {
19296	pub fn validate(&self) -> Result<(), ValidationError> {
19297		Ok(())
19298	}
19299}
19300
19301
19302// CollateralPortfolioCode5Choice ...
19303#[cfg_attr(feature = "derive_debug", derive(Debug))]
19304#[cfg_attr(feature = "derive_default", derive(Default))]
19305#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19306#[cfg_attr(feature = "derive_clone", derive(Clone))]
19307#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19308pub struct CollateralPortfolioCode5Choice {
19309	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtfl", skip_serializing_if = "Option::is_none") )]
19310	pub prtfl: Option<PortfolioCode3Choice>,
19311	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnPrtflCd", skip_serializing_if = "Option::is_none") )]
19312	pub mrgn_prtfl_cd: Option<MarginPortfolio3>,
19313}
19314
19315impl CollateralPortfolioCode5Choice {
19316	pub fn validate(&self) -> Result<(), ValidationError> {
19317		if let Some(ref val) = self.prtfl { val.validate()? }
19318		if let Some(ref val) = self.mrgn_prtfl_cd { val.validate()? }
19319		Ok(())
19320	}
19321}
19322
19323
19324// CollateralPortfolioCode6Choice ...
19325#[cfg_attr(feature = "derive_debug", derive(Debug))]
19326#[cfg_attr(feature = "derive_default", derive(Default))]
19327#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19328#[cfg_attr(feature = "derive_clone", derive(Clone))]
19329#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19330pub struct CollateralPortfolioCode6Choice {
19331	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtfl", skip_serializing_if = "Option::is_none") )]
19332	pub prtfl: Option<PortfolioCode3Choice>,
19333	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnPrtflCd", skip_serializing_if = "Option::is_none") )]
19334	pub mrgn_prtfl_cd: Option<MarginPortfolio4>,
19335}
19336
19337impl CollateralPortfolioCode6Choice {
19338	pub fn validate(&self) -> Result<(), ValidationError> {
19339		if let Some(ref val) = self.prtfl { val.validate()? }
19340		if let Some(ref val) = self.mrgn_prtfl_cd { val.validate()? }
19341		Ok(())
19342	}
19343}
19344
19345
19346// CollateralQualityType1Code ...
19347#[cfg_attr(feature = "derive_debug", derive(Debug))]
19348#[cfg_attr(feature = "derive_default", derive(Default))]
19349#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19350#[cfg_attr(feature = "derive_clone", derive(Clone))]
19351#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19352pub enum CollateralQualityType1Code {
19353	#[cfg_attr(feature = "derive_default", default)]
19354	#[cfg_attr( feature = "derive_serde", serde(rename = "INVG") )]
19355	CodeINVG,
19356	#[cfg_attr( feature = "derive_serde", serde(rename = "NIVG") )]
19357	CodeNIVG,
19358	#[cfg_attr( feature = "derive_serde", serde(rename = "NOTR") )]
19359	CodeNOTR,
19360	#[cfg_attr( feature = "derive_serde", serde(rename = "NOAP") )]
19361	CodeNOAP,
19362}
19363
19364impl CollateralQualityType1Code {
19365	pub fn validate(&self) -> Result<(), ValidationError> {
19366		Ok(())
19367	}
19368}
19369
19370
19371// CollateralRole1Code ...
19372#[cfg_attr(feature = "derive_debug", derive(Debug))]
19373#[cfg_attr(feature = "derive_default", derive(Default))]
19374#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19375#[cfg_attr(feature = "derive_clone", derive(Clone))]
19376#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19377pub enum CollateralRole1Code {
19378	#[cfg_attr(feature = "derive_default", default)]
19379	#[cfg_attr( feature = "derive_serde", serde(rename = "GIVE") )]
19380	CodeGIVE,
19381	#[cfg_attr( feature = "derive_serde", serde(rename = "TAKE") )]
19382	CodeTAKE,
19383}
19384
19385impl CollateralRole1Code {
19386	pub fn validate(&self) -> Result<(), ValidationError> {
19387		Ok(())
19388	}
19389}
19390
19391
19392// CollateralType19 ...
19393#[cfg_attr(feature = "derive_debug", derive(Debug))]
19394#[cfg_attr(feature = "derive_default", derive(Default))]
19395#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19396#[cfg_attr(feature = "derive_clone", derive(Clone))]
19397#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19398pub struct CollateralType19 {
19399	#[cfg_attr( feature = "derive_serde", serde(rename = "Scty", skip_serializing_if = "Option::is_none") )]
19400	pub scty: Option<Vec<SecurityReuseData1>>,
19401	#[cfg_attr( feature = "derive_serde", serde(rename = "Csh", skip_serializing_if = "Option::is_none") )]
19402	pub csh: Option<Vec<CashReuseData1>>,
19403}
19404
19405impl CollateralType19 {
19406	pub fn validate(&self) -> Result<(), ValidationError> {
19407		if let Some(ref vec) = self.scty { for item in vec { item.validate()? } }
19408		if let Some(ref vec) = self.csh { for item in vec { item.validate()? } }
19409		Ok(())
19410	}
19411}
19412
19413
19414// CollateralType21 ...
19415#[cfg_attr(feature = "derive_debug", derive(Debug))]
19416#[cfg_attr(feature = "derive_default", derive(Default))]
19417#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19418#[cfg_attr(feature = "derive_clone", derive(Clone))]
19419#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19420pub struct CollateralType21 {
19421	#[cfg_attr( feature = "derive_serde", serde(rename = "Scty", skip_serializing_if = "Option::is_none") )]
19422	pub scty: Option<Vec<Security52>>,
19423	#[cfg_attr( feature = "derive_serde", serde(rename = "Csh", skip_serializing_if = "Option::is_none") )]
19424	pub csh: Option<Vec<AmountHaircutMargin1>>,
19425	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmmdty", skip_serializing_if = "Option::is_none") )]
19426	pub cmmdty: Option<Vec<Commodity43>>,
19427}
19428
19429impl CollateralType21 {
19430	pub fn validate(&self) -> Result<(), ValidationError> {
19431		if let Some(ref vec) = self.scty { for item in vec { item.validate()? } }
19432		if let Some(ref vec) = self.csh { for item in vec { item.validate()? } }
19433		if let Some(ref vec) = self.cmmdty { for item in vec { item.validate()? } }
19434		Ok(())
19435	}
19436}
19437
19438
19439// CollateralType22Choice ...
19440#[cfg_attr(feature = "derive_debug", derive(Debug))]
19441#[cfg_attr(feature = "derive_default", derive(Default))]
19442#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19443#[cfg_attr(feature = "derive_clone", derive(Clone))]
19444#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19445pub struct CollateralType22Choice {
19446	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlColl", skip_serializing_if = "Option::is_none") )]
19447	pub gnl_coll: Option<GeneralCollateral4>,
19448	#[cfg_attr( feature = "derive_serde", serde(rename = "SpcfcColl", skip_serializing_if = "Option::is_none") )]
19449	pub spcfc_coll: Option<SpecificCollateral3>,
19450}
19451
19452impl CollateralType22Choice {
19453	pub fn validate(&self) -> Result<(), ValidationError> {
19454		if let Some(ref val) = self.gnl_coll { val.validate()? }
19455		if let Some(ref val) = self.spcfc_coll { val.validate()? }
19456		Ok(())
19457	}
19458}
19459
19460
19461// CollateralType6Code ...
19462#[cfg_attr(feature = "derive_debug", derive(Debug))]
19463#[cfg_attr(feature = "derive_default", derive(Default))]
19464#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19465#[cfg_attr(feature = "derive_clone", derive(Clone))]
19466#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19467pub enum CollateralType6Code {
19468	#[cfg_attr(feature = "derive_default", default)]
19469	#[cfg_attr( feature = "derive_serde", serde(rename = "GBBK") )]
19470	CodeGBBK,
19471	#[cfg_attr( feature = "derive_serde", serde(rename = "BOND") )]
19472	CodeBOND,
19473	#[cfg_attr( feature = "derive_serde", serde(rename = "CASH") )]
19474	CodeCASH,
19475	#[cfg_attr( feature = "derive_serde", serde(rename = "COMM") )]
19476	CodeCOMM,
19477	#[cfg_attr( feature = "derive_serde", serde(rename = "INSU") )]
19478	CodeINSU,
19479	#[cfg_attr( feature = "derive_serde", serde(rename = "LCRE") )]
19480	CodeLCRE,
19481	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
19482	CodeOTHR,
19483	#[cfg_attr( feature = "derive_serde", serde(rename = "PHYS") )]
19484	CodePHYS,
19485	#[cfg_attr( feature = "derive_serde", serde(rename = "SECU") )]
19486	CodeSECU,
19487	#[cfg_attr( feature = "derive_serde", serde(rename = "STCF") )]
19488	CodeSTCF,
19489}
19490
19491impl CollateralType6Code {
19492	pub fn validate(&self) -> Result<(), ValidationError> {
19493		Ok(())
19494	}
19495}
19496
19497
19498// CollateralValuation6 ...
19499#[cfg_attr(feature = "derive_debug", derive(Debug))]
19500#[cfg_attr(feature = "derive_default", derive(Default))]
19501#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19502#[cfg_attr(feature = "derive_clone", derive(Clone))]
19503#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19504pub struct CollateralValuation6 {
19505	#[cfg_attr( feature = "derive_serde", serde(rename = "NmnlAmt", skip_serializing_if = "Option::is_none") )]
19506	pub nmnl_amt: Option<ActiveCurrencyAndAmount>,
19507	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN") )]
19508	pub isin: String,
19509}
19510
19511impl CollateralValuation6 {
19512	pub fn validate(&self) -> Result<(), ValidationError> {
19513		if let Some(ref val) = self.nmnl_amt { val.validate()? }
19514		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
19515		if !pattern.is_match(&self.isin) {
19516			return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
19517		}
19518		Ok(())
19519	}
19520}
19521
19522
19523// CollateralValuation7 ...
19524#[cfg_attr(feature = "derive_debug", derive(Debug))]
19525#[cfg_attr(feature = "derive_default", derive(Default))]
19526#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19527#[cfg_attr(feature = "derive_clone", derive(Clone))]
19528#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19529pub struct CollateralValuation7 {
19530	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolSts") )]
19531	pub pool_sts: CollateralPool1Code,
19532	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
19533	pub tp: String,
19534	#[cfg_attr( feature = "derive_serde", serde(rename = "Sctr") )]
19535	pub sctr: String,
19536	#[cfg_attr( feature = "derive_serde", serde(rename = "NmnlAmt", skip_serializing_if = "Option::is_none") )]
19537	pub nmnl_amt: Option<ActiveCurrencyAndAmount>,
19538}
19539
19540impl CollateralValuation7 {
19541	pub fn validate(&self) -> Result<(), ValidationError> {
19542		self.pool_sts.validate()?;
19543		let pattern = Regex::new("[A-Z]{6,6}").unwrap();
19544		if !pattern.is_match(&self.tp) {
19545			return Err(ValidationError::new(1005, "tp does not match the required pattern".to_string()));
19546		}
19547		if let Some(ref val) = self.nmnl_amt { val.validate()? }
19548		Ok(())
19549	}
19550}
19551
19552
19553// CollateralisationType3Code ...
19554#[cfg_attr(feature = "derive_debug", derive(Debug))]
19555#[cfg_attr(feature = "derive_default", derive(Default))]
19556#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19557#[cfg_attr(feature = "derive_clone", derive(Clone))]
19558#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19559pub enum CollateralisationType3Code {
19560	#[cfg_attr(feature = "derive_default", default)]
19561	#[cfg_attr( feature = "derive_serde", serde(rename = "FLCL") )]
19562	CodeFLCL,
19563	#[cfg_attr( feature = "derive_serde", serde(rename = "OWCL") )]
19564	CodeOWCL,
19565	#[cfg_attr( feature = "derive_serde", serde(rename = "OWC1") )]
19566	CodeOWC1,
19567	#[cfg_attr( feature = "derive_serde", serde(rename = "OWC2") )]
19568	CodeOWC2,
19569	#[cfg_attr( feature = "derive_serde", serde(rename = "OWP1") )]
19570	CodeOWP1,
19571	#[cfg_attr( feature = "derive_serde", serde(rename = "OWP2") )]
19572	CodeOWP2,
19573	#[cfg_attr( feature = "derive_serde", serde(rename = "PRCL") )]
19574	CodePRCL,
19575	#[cfg_attr( feature = "derive_serde", serde(rename = "PRC1") )]
19576	CodePRC1,
19577	#[cfg_attr( feature = "derive_serde", serde(rename = "PRC2") )]
19578	CodePRC2,
19579	#[cfg_attr( feature = "derive_serde", serde(rename = "UNCL") )]
19580	CodeUNCL,
19581}
19582
19583impl CollateralisationType3Code {
19584	pub fn validate(&self) -> Result<(), ValidationError> {
19585		Ok(())
19586	}
19587}
19588
19589
19590// CollaterisedData12 ...
19591#[cfg_attr(feature = "derive_debug", derive(Debug))]
19592#[cfg_attr(feature = "derive_default", derive(Default))]
19593#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19594#[cfg_attr(feature = "derive_clone", derive(Clone))]
19595#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19596pub struct CollaterisedData12 {
19597	#[cfg_attr( feature = "derive_serde", serde(rename = "CollValDt", skip_serializing_if = "Option::is_none") )]
19598	pub coll_val_dt: Option<String>,
19599	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstTp", skip_serializing_if = "Option::is_none") )]
19600	pub asst_tp: Option<CollateralType21>,
19601	#[cfg_attr( feature = "derive_serde", serde(rename = "NetXpsrCollstnInd", skip_serializing_if = "Option::is_none") )]
19602	pub net_xpsr_collstn_ind: Option<bool>,
19603	#[cfg_attr( feature = "derive_serde", serde(rename = "BsktIdr", skip_serializing_if = "Option::is_none") )]
19604	pub bskt_idr: Option<SecurityIdentification26Choice>,
19605}
19606
19607impl CollaterisedData12 {
19608	pub fn validate(&self) -> Result<(), ValidationError> {
19609		if let Some(ref val) = self.asst_tp { val.validate()? }
19610		if let Some(ref val) = self.bskt_idr { val.validate()? }
19611		Ok(())
19612	}
19613}
19614
19615
19616// Commission21 ...
19617#[cfg_attr(feature = "derive_debug", derive(Debug))]
19618#[cfg_attr(feature = "derive_default", derive(Default))]
19619#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19620#[cfg_attr(feature = "derive_clone", derive(Clone))]
19621#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19622pub struct Commission21 {
19623	#[cfg_attr( feature = "derive_serde", serde(rename = "ComssnTp") )]
19624	pub comssn_tp: CommissionType5Choice,
19625	#[cfg_attr( feature = "derive_serde", serde(rename = "ComssnApld") )]
19626	pub comssn_apld: AmountOrRate3Choice,
19627}
19628
19629impl Commission21 {
19630	pub fn validate(&self) -> Result<(), ValidationError> {
19631		self.comssn_tp.validate()?;
19632		self.comssn_apld.validate()?;
19633		Ok(())
19634	}
19635}
19636
19637
19638// CommissionType5Choice ...
19639#[cfg_attr(feature = "derive_debug", derive(Debug))]
19640#[cfg_attr(feature = "derive_default", derive(Default))]
19641#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19642#[cfg_attr(feature = "derive_clone", derive(Clone))]
19643#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19644pub struct CommissionType5Choice {
19645	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
19646	pub cd: Option<CommissionType6Code>,
19647	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
19648	pub prtry: Option<GenericIdentification47>,
19649}
19650
19651impl CommissionType5Choice {
19652	pub fn validate(&self) -> Result<(), ValidationError> {
19653		if let Some(ref val) = self.cd { val.validate()? }
19654		if let Some(ref val) = self.prtry { val.validate()? }
19655		Ok(())
19656	}
19657}
19658
19659
19660// CommissionType6Code ...
19661#[cfg_attr(feature = "derive_debug", derive(Debug))]
19662#[cfg_attr(feature = "derive_default", derive(Default))]
19663#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19664#[cfg_attr(feature = "derive_clone", derive(Clone))]
19665#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19666pub enum CommissionType6Code {
19667	#[cfg_attr(feature = "derive_default", default)]
19668	#[cfg_attr( feature = "derive_serde", serde(rename = "FEND") )]
19669	CodeFEND,
19670	#[cfg_attr( feature = "derive_serde", serde(rename = "BEND") )]
19671	CodeBEND,
19672	#[cfg_attr( feature = "derive_serde", serde(rename = "CDPL") )]
19673	CodeCDPL,
19674}
19675
19676impl CommissionType6Code {
19677	pub fn validate(&self) -> Result<(), ValidationError> {
19678		Ok(())
19679	}
19680}
19681
19682
19683// Commodity2 ...
19684#[cfg_attr(feature = "derive_debug", derive(Debug))]
19685#[cfg_attr(feature = "derive_default", derive(Default))]
19686#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19687#[cfg_attr(feature = "derive_clone", derive(Clone))]
19688#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19689pub struct Commodity2 {
19690	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal") )]
19691	pub mkt_val: ActiveCurrencyAnd24Amount,
19692	#[cfg_attr( feature = "derive_serde", serde(rename = "CmmdtyTp") )]
19693	pub cmmdty_tp: AssetClassDetailedSubProductType1Choice,
19694}
19695
19696impl Commodity2 {
19697	pub fn validate(&self) -> Result<(), ValidationError> {
19698		self.mkt_val.validate()?;
19699		self.cmmdty_tp.validate()?;
19700		Ok(())
19701	}
19702}
19703
19704
19705// Commodity42 ...
19706#[cfg_attr(feature = "derive_debug", derive(Debug))]
19707#[cfg_attr(feature = "derive_default", derive(Default))]
19708#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19709#[cfg_attr(feature = "derive_clone", derive(Clone))]
19710#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19711pub struct Commodity42 {
19712	#[cfg_attr( feature = "derive_serde", serde(rename = "Clssfctn", skip_serializing_if = "Option::is_none") )]
19713	pub clssfctn: Option<CompareCommodityAssetClass3>,
19714	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty", skip_serializing_if = "Option::is_none") )]
19715	pub qty: Option<CompareDecimalNumber3>,
19716	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitPric", skip_serializing_if = "Option::is_none") )]
19717	pub unit_pric: Option<CompareUnitPrice6>,
19718	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal", skip_serializing_if = "Option::is_none") )]
19719	pub mkt_val: Option<CompareAmountAndDirection2>,
19720	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitOfMeasr", skip_serializing_if = "Option::is_none") )]
19721	pub unit_of_measr: Option<CompareUnitOfMeasure3>,
19722}
19723
19724impl Commodity42 {
19725	pub fn validate(&self) -> Result<(), ValidationError> {
19726		if let Some(ref val) = self.clssfctn { val.validate()? }
19727		if let Some(ref val) = self.qty { val.validate()? }
19728		if let Some(ref val) = self.unit_pric { val.validate()? }
19729		if let Some(ref val) = self.mkt_val { val.validate()? }
19730		if let Some(ref val) = self.unit_of_measr { val.validate()? }
19731		Ok(())
19732	}
19733}
19734
19735
19736// Commodity43 ...
19737#[cfg_attr(feature = "derive_debug", derive(Debug))]
19738#[cfg_attr(feature = "derive_default", derive(Default))]
19739#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19740#[cfg_attr(feature = "derive_clone", derive(Clone))]
19741#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19742pub struct Commodity43 {
19743	#[cfg_attr( feature = "derive_serde", serde(rename = "Clssfctn", skip_serializing_if = "Option::is_none") )]
19744	pub clssfctn: Option<AssetClassCommodity5Choice>,
19745	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty", skip_serializing_if = "Option::is_none") )]
19746	pub qty: Option<Quantity17>,
19747	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitPric", skip_serializing_if = "Option::is_none") )]
19748	pub unit_pric: Option<SecuritiesTransactionPrice19Choice>,
19749	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal", skip_serializing_if = "Option::is_none") )]
19750	pub mkt_val: Option<AmountAndDirection53>,
19751}
19752
19753impl Commodity43 {
19754	pub fn validate(&self) -> Result<(), ValidationError> {
19755		if let Some(ref val) = self.clssfctn { val.validate()? }
19756		if let Some(ref val) = self.qty { val.validate()? }
19757		if let Some(ref val) = self.unit_pric { val.validate()? }
19758		if let Some(ref val) = self.mkt_val { val.validate()? }
19759		Ok(())
19760	}
19761}
19762
19763
19764// CommodityDerivative2Choice ...
19765#[cfg_attr(feature = "derive_debug", derive(Debug))]
19766#[cfg_attr(feature = "derive_default", derive(Default))]
19767#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19768#[cfg_attr(feature = "derive_clone", derive(Clone))]
19769#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19770pub struct CommodityDerivative2Choice {
19771	#[cfg_attr( feature = "derive_serde", serde(rename = "Frght", skip_serializing_if = "Option::is_none") )]
19772	pub frght: Option<CommodityDerivative5>,
19773	#[cfg_attr( feature = "derive_serde", serde(rename = "Nrgy", skip_serializing_if = "Option::is_none") )]
19774	pub nrgy: Option<CommodityDerivative6>,
19775}
19776
19777impl CommodityDerivative2Choice {
19778	pub fn validate(&self) -> Result<(), ValidationError> {
19779		if let Some(ref val) = self.frght { val.validate()? }
19780		if let Some(ref val) = self.nrgy { val.validate()? }
19781		Ok(())
19782	}
19783}
19784
19785
19786// CommodityDerivative4 ...
19787#[cfg_attr(feature = "derive_debug", derive(Debug))]
19788#[cfg_attr(feature = "derive_default", derive(Default))]
19789#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19790#[cfg_attr(feature = "derive_clone", derive(Clone))]
19791#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19792pub struct CommodityDerivative4 {
19793	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssSpcfc", skip_serializing_if = "Option::is_none") )]
19794	pub clss_spcfc: Option<CommodityDerivative2Choice>,
19795	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlCcy") )]
19796	pub ntnl_ccy: String,
19797}
19798
19799impl CommodityDerivative4 {
19800	pub fn validate(&self) -> Result<(), ValidationError> {
19801		if let Some(ref val) = self.clss_spcfc { val.validate()? }
19802		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
19803		if !pattern.is_match(&self.ntnl_ccy) {
19804			return Err(ValidationError::new(1005, "ntnl_ccy does not match the required pattern".to_string()));
19805		}
19806		Ok(())
19807	}
19808}
19809
19810
19811// CommodityDerivative5 ...
19812#[cfg_attr(feature = "derive_debug", derive(Debug))]
19813#[cfg_attr(feature = "derive_default", derive(Default))]
19814#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19815#[cfg_attr(feature = "derive_clone", derive(Clone))]
19816#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19817pub struct CommodityDerivative5 {
19818	#[cfg_attr( feature = "derive_serde", serde(rename = "Sz") )]
19819	pub sz: String,
19820	#[cfg_attr( feature = "derive_serde", serde(rename = "AvrgTmChrtr") )]
19821	pub avrg_tm_chrtr: String,
19822}
19823
19824impl CommodityDerivative5 {
19825	pub fn validate(&self) -> Result<(), ValidationError> {
19826		if self.sz.chars().count() < 1 {
19827			return Err(ValidationError::new(1001, "sz is shorter than the minimum length of 1".to_string()));
19828		}
19829		if self.sz.chars().count() > 25 {
19830			return Err(ValidationError::new(1002, "sz exceeds the maximum length of 25".to_string()));
19831		}
19832		if self.avrg_tm_chrtr.chars().count() < 1 {
19833			return Err(ValidationError::new(1001, "avrg_tm_chrtr is shorter than the minimum length of 1".to_string()));
19834		}
19835		if self.avrg_tm_chrtr.chars().count() > 25 {
19836			return Err(ValidationError::new(1002, "avrg_tm_chrtr exceeds the maximum length of 25".to_string()));
19837		}
19838		Ok(())
19839	}
19840}
19841
19842
19843// CommodityDerivative6 ...
19844#[cfg_attr(feature = "derive_debug", derive(Debug))]
19845#[cfg_attr(feature = "derive_default", derive(Default))]
19846#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19847#[cfg_attr(feature = "derive_clone", derive(Clone))]
19848#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19849pub struct CommodityDerivative6 {
19850	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmLctn") )]
19851	pub sttlm_lctn: String,
19852}
19853
19854impl CommodityDerivative6 {
19855	pub fn validate(&self) -> Result<(), ValidationError> {
19856		if self.sttlm_lctn.chars().count() < 1 {
19857			return Err(ValidationError::new(1001, "sttlm_lctn is shorter than the minimum length of 1".to_string()));
19858		}
19859		if self.sttlm_lctn.chars().count() > 25 {
19860			return Err(ValidationError::new(1002, "sttlm_lctn exceeds the maximum length of 25".to_string()));
19861		}
19862		Ok(())
19863	}
19864}
19865
19866
19867// CommonFinancialInstrumentAttributes10 ...
19868#[cfg_attr(feature = "derive_debug", derive(Debug))]
19869#[cfg_attr(feature = "derive_default", derive(Default))]
19870#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
19871#[cfg_attr(feature = "derive_clone", derive(Clone))]
19872#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
19873pub struct CommonFinancialInstrumentAttributes10 {
19874	#[cfg_attr( feature = "derive_serde", serde(rename = "SctySts", skip_serializing_if = "Option::is_none") )]
19875	pub scty_sts: Option<SecurityStatus3Choice>,
19876	#[cfg_attr( feature = "derive_serde", serde(rename = "ISOSctyLngNm", skip_serializing_if = "Option::is_none") )]
19877	pub iso_scty_lng_nm: Option<String>,
19878	#[cfg_attr( feature = "derive_serde", serde(rename = "ISOSctyShrtNm", skip_serializing_if = "Option::is_none") )]
19879	pub iso_scty_shrt_nm: Option<String>,
19880	#[cfg_attr( feature = "derive_serde", serde(rename = "NmVldFr", skip_serializing_if = "Option::is_none") )]
19881	pub nm_vld_fr: Option<DateAndDateTime2Choice>,
19882	#[cfg_attr( feature = "derive_serde", serde(rename = "DnmtnCcy") )]
19883	pub dnmtn_ccy: String,
19884	#[cfg_attr( feature = "derive_serde", serde(rename = "CertNb", skip_serializing_if = "Option::is_none") )]
19885	pub cert_nb: Option<String>,
19886	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctVrsnNb", skip_serializing_if = "Option::is_none") )]
19887	pub ctrct_vrsn_nb: Option<f64>,
19888	#[cfg_attr( feature = "derive_serde", serde(rename = "CpnAttchdNb", skip_serializing_if = "Option::is_none") )]
19889	pub cpn_attchd_nb: Option<String>,
19890	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxLotNb", skip_serializing_if = "Option::is_none") )]
19891	pub tax_lot_nb: Option<String>,
19892	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolNb", skip_serializing_if = "Option::is_none") )]
19893	pub pool_nb: Option<String>,
19894	#[cfg_attr( feature = "derive_serde", serde(rename = "CvrdInd", skip_serializing_if = "Option::is_none") )]
19895	pub cvrd_ind: Option<bool>,
19896	#[cfg_attr( feature = "derive_serde", serde(rename = "LglRstrctns", skip_serializing_if = "Option::is_none") )]
19897	pub lgl_rstrctns: Option<LegalRestrictions4Choice>,
19898	#[cfg_attr( feature = "derive_serde", serde(rename = "PosLmt", skip_serializing_if = "Option::is_none") )]
19899	pub pos_lmt: Option<FinancialInstrumentQuantity1Choice>,
19900	#[cfg_attr( feature = "derive_serde", serde(rename = "NearTermPosLmt", skip_serializing_if = "Option::is_none") )]
19901	pub near_term_pos_lmt: Option<FinancialInstrumentQuantity1Choice>,
19902	#[cfg_attr( feature = "derive_serde", serde(rename = "ListgDt", skip_serializing_if = "Option::is_none") )]
19903	pub listg_dt: Option<String>,
19904	#[cfg_attr( feature = "derive_serde", serde(rename = "RcrdDt", skip_serializing_if = "Option::is_none") )]
19905	pub rcrd_dt: Option<String>,
19906	#[cfg_attr( feature = "derive_serde", serde(rename = "XpryDt", skip_serializing_if = "Option::is_none") )]
19907	pub xpry_dt: Option<String>,
19908	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
19909	pub purp: Option<String>,
19910	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnTp", skip_serializing_if = "Option::is_none") )]
19911	pub clssfctn_tp: Option<ClassificationType2>,
19912	#[cfg_attr( feature = "derive_serde", serde(rename = "Issnc", skip_serializing_if = "Option::is_none") )]
19913	pub issnc: Option<Issuance5>,
19914	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgMkt", skip_serializing_if = "Option::is_none") )]
19915	pub tradg_mkt: Option<Vec<TradingParameters2>>,
19916	#[cfg_attr( feature = "derive_serde", serde(rename = "SprdAndBchmkCrv", skip_serializing_if = "Option::is_none") )]
19917	pub sprd_and_bchmk_crv: Option<Vec<BenchmarkCurve6>>,
19918	#[cfg_attr( feature = "derive_serde", serde(rename = "PutTp", skip_serializing_if = "Option::is_none") )]
19919	pub put_tp: Option<PutType3Choice>,
19920	#[cfg_attr( feature = "derive_serde", serde(rename = "CallTp", skip_serializing_if = "Option::is_none") )]
19921	pub call_tp: Option<CallType3Choice>,
19922	#[cfg_attr( feature = "derive_serde", serde(rename = "FngbInd", skip_serializing_if = "Option::is_none") )]
19923	pub fngb_ind: Option<bool>,
19924	#[cfg_attr( feature = "derive_serde", serde(rename = "Cnfdtl", skip_serializing_if = "Option::is_none") )]
19925	pub cnfdtl: Option<bool>,
19926	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvtPlcmnt", skip_serializing_if = "Option::is_none") )]
19927	pub prvt_plcmnt: Option<bool>,
19928	#[cfg_attr( feature = "derive_serde", serde(rename = "ConvtblInd", skip_serializing_if = "Option::is_none") )]
19929	pub convtbl_ind: Option<bool>,
19930	#[cfg_attr( feature = "derive_serde", serde(rename = "ConvsPrd", skip_serializing_if = "Option::is_none") )]
19931	pub convs_prd: Option<DateTimePeriod1>,
19932	#[cfg_attr( feature = "derive_serde", serde(rename = "ConvsRatioNmrtr", skip_serializing_if = "Option::is_none") )]
19933	pub convs_ratio_nmrtr: Option<FinancialInstrumentQuantity1Choice>,
19934	#[cfg_attr( feature = "derive_serde", serde(rename = "ConvsRatioDnmtr", skip_serializing_if = "Option::is_none") )]
19935	pub convs_ratio_dnmtr: Option<FinancialInstrumentQuantity1Choice>,
19936	#[cfg_attr( feature = "derive_serde", serde(rename = "PmryPlcOfDpst", skip_serializing_if = "Option::is_none") )]
19937	pub pmry_plc_of_dpst: Option<PartyIdentification136>,
19938	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgMtd", skip_serializing_if = "Option::is_none") )]
19939	pub tradg_mtd: Option<UnitOrFaceAmount1Choice>,
19940	#[cfg_attr( feature = "derive_serde", serde(rename = "TEFRARule", skip_serializing_if = "Option::is_none") )]
19941	pub tefra_rule: Option<TEFRARules3Choice>,
19942	#[cfg_attr( feature = "derive_serde", serde(rename = "SrNb", skip_serializing_if = "Option::is_none") )]
19943	pub sr_nb: Option<String>,
19944	#[cfg_attr( feature = "derive_serde", serde(rename = "Clss", skip_serializing_if = "Option::is_none") )]
19945	pub clss: Option<String>,
19946	#[cfg_attr( feature = "derive_serde", serde(rename = "WhldgTaxRgm", skip_serializing_if = "Option::is_none") )]
19947	pub whldg_tax_rgm: Option<Vec<SecurityWithHoldingTax1>>,
19948	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtSts", skip_serializing_if = "Option::is_none") )]
19949	pub pmt_sts: Option<SecuritiesPaymentStatus5Choice>,
19950	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlPhysForm", skip_serializing_if = "Option::is_none") )]
19951	pub initl_phys_form: Option<InitialPhysicalForm4Choice>,
19952	#[cfg_attr( feature = "derive_serde", serde(rename = "AftrXchgPhysForm", skip_serializing_if = "Option::is_none") )]
19953	pub aftr_xchg_phys_form: Option<InitialPhysicalForm3Choice>,
19954	#[cfg_attr( feature = "derive_serde", serde(rename = "CmonSfkpr", skip_serializing_if = "Option::is_none") )]
19955	pub cmon_sfkpr: Option<String>,
19956	#[cfg_attr( feature = "derive_serde", serde(rename = "RedTp", skip_serializing_if = "Option::is_none") )]
19957	pub red_tp: Option<MaturityRedemptionType3Choice>,
19958	#[cfg_attr( feature = "derive_serde", serde(rename = "RedPmtCcy", skip_serializing_if = "Option::is_none") )]
19959	pub red_pmt_ccy: Option<String>,
19960	#[cfg_attr( feature = "derive_serde", serde(rename = "Rstrctn", skip_serializing_if = "Option::is_none") )]
19961	pub rstrctn: Option<Vec<SecurityRestriction3>>,
19962	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInf", skip_serializing_if = "Option::is_none") )]
19963	pub sttlm_inf: Option<Vec<SettlementInformation17>>,
19964	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmForm", skip_serializing_if = "Option::is_none") )]
19965	pub fin_instrm_form: Option<FinancialInstrumentForm2>,
19966	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctNm", skip_serializing_if = "Option::is_none") )]
19967	pub ctct_nm: Option<Organisation38>,
19968	#[cfg_attr( feature = "derive_serde", serde(rename = "LeadMgr", skip_serializing_if = "Option::is_none") )]
19969	pub lead_mgr: Option<Organisation38>,
19970	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplPngAgt", skip_serializing_if = "Option::is_none") )]
19971	pub prncpl_png_agt: Option<Organisation38>,
19972	#[cfg_attr( feature = "derive_serde", serde(rename = "PngAgt", skip_serializing_if = "Option::is_none") )]
19973	pub png_agt: Option<Organisation38>,
19974	#[cfg_attr( feature = "derive_serde", serde(rename = "Dpstry", skip_serializing_if = "Option::is_none") )]
19975	pub dpstry: Option<Organisation38>,
19976	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygRsk", skip_serializing_if = "Option::is_none") )]
19977	pub undrlyg_rsk: Option<Organisation38>,
19978}
19979
19980impl CommonFinancialInstrumentAttributes10 {
19981	pub fn validate(&self) -> Result<(), ValidationError> {
19982		if let Some(ref val) = self.scty_sts { val.validate()? }
19983		if let Some(ref val) = self.iso_scty_lng_nm {
19984			if val.chars().count() < 1 {
19985				return Err(ValidationError::new(1001, "iso_scty_lng_nm is shorter than the minimum length of 1".to_string()));
19986			}
19987			if val.chars().count() > 350 {
19988				return Err(ValidationError::new(1002, "iso_scty_lng_nm exceeds the maximum length of 350".to_string()));
19989			}
19990		}
19991		if let Some(ref val) = self.iso_scty_shrt_nm {
19992			if val.chars().count() < 1 {
19993				return Err(ValidationError::new(1001, "iso_scty_shrt_nm is shorter than the minimum length of 1".to_string()));
19994			}
19995			if val.chars().count() > 35 {
19996				return Err(ValidationError::new(1002, "iso_scty_shrt_nm exceeds the maximum length of 35".to_string()));
19997			}
19998		}
19999		if let Some(ref val) = self.nm_vld_fr { val.validate()? }
20000		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
20001		if !pattern.is_match(&self.dnmtn_ccy) {
20002			return Err(ValidationError::new(1005, "dnmtn_ccy does not match the required pattern".to_string()));
20003		}
20004		if let Some(ref val) = self.cert_nb {
20005			if val.chars().count() < 1 {
20006				return Err(ValidationError::new(1001, "cert_nb is shorter than the minimum length of 1".to_string()));
20007			}
20008			if val.chars().count() > 35 {
20009				return Err(ValidationError::new(1002, "cert_nb exceeds the maximum length of 35".to_string()));
20010			}
20011		}
20012		if let Some(ref val) = self.cpn_attchd_nb {
20013			let pattern = Regex::new("[0-9]{1,3}").unwrap();
20014			if !pattern.is_match(val) {
20015				return Err(ValidationError::new(1005, "cpn_attchd_nb does not match the required pattern".to_string()));
20016			}
20017		}
20018		if let Some(ref val) = self.tax_lot_nb {
20019			let pattern = Regex::new("[0-9]{1,15}").unwrap();
20020			if !pattern.is_match(val) {
20021				return Err(ValidationError::new(1005, "tax_lot_nb does not match the required pattern".to_string()));
20022			}
20023		}
20024		if let Some(ref val) = self.pool_nb {
20025			let pattern = Regex::new("[0-9]{1,15}").unwrap();
20026			if !pattern.is_match(val) {
20027				return Err(ValidationError::new(1005, "pool_nb does not match the required pattern".to_string()));
20028			}
20029		}
20030		if let Some(ref val) = self.lgl_rstrctns { val.validate()? }
20031		if let Some(ref val) = self.pos_lmt { val.validate()? }
20032		if let Some(ref val) = self.near_term_pos_lmt { val.validate()? }
20033		if let Some(ref val) = self.purp {
20034			if val.chars().count() < 1 {
20035				return Err(ValidationError::new(1001, "purp is shorter than the minimum length of 1".to_string()));
20036			}
20037			if val.chars().count() > 256 {
20038				return Err(ValidationError::new(1002, "purp exceeds the maximum length of 256".to_string()));
20039			}
20040		}
20041		if let Some(ref val) = self.clssfctn_tp { val.validate()? }
20042		if let Some(ref val) = self.issnc { val.validate()? }
20043		if let Some(ref vec) = self.tradg_mkt { for item in vec { item.validate()? } }
20044		if let Some(ref vec) = self.sprd_and_bchmk_crv { for item in vec { item.validate()? } }
20045		if let Some(ref val) = self.put_tp { val.validate()? }
20046		if let Some(ref val) = self.call_tp { val.validate()? }
20047		if let Some(ref val) = self.convs_prd { val.validate()? }
20048		if let Some(ref val) = self.convs_ratio_nmrtr { val.validate()? }
20049		if let Some(ref val) = self.convs_ratio_dnmtr { val.validate()? }
20050		if let Some(ref val) = self.pmry_plc_of_dpst { val.validate()? }
20051		if let Some(ref val) = self.tradg_mtd { val.validate()? }
20052		if let Some(ref val) = self.tefra_rule { val.validate()? }
20053		if let Some(ref val) = self.sr_nb {
20054			if val.chars().count() < 1 {
20055				return Err(ValidationError::new(1001, "sr_nb is shorter than the minimum length of 1".to_string()));
20056			}
20057			if val.chars().count() > 16 {
20058				return Err(ValidationError::new(1002, "sr_nb exceeds the maximum length of 16".to_string()));
20059			}
20060		}
20061		if let Some(ref val) = self.clss {
20062			if val.chars().count() < 1 {
20063				return Err(ValidationError::new(1001, "clss is shorter than the minimum length of 1".to_string()));
20064			}
20065			if val.chars().count() > 16 {
20066				return Err(ValidationError::new(1002, "clss exceeds the maximum length of 16".to_string()));
20067			}
20068		}
20069		if let Some(ref vec) = self.whldg_tax_rgm { for item in vec { item.validate()? } }
20070		if let Some(ref val) = self.pmt_sts { val.validate()? }
20071		if let Some(ref val) = self.initl_phys_form { val.validate()? }
20072		if let Some(ref val) = self.aftr_xchg_phys_form { val.validate()? }
20073		if let Some(ref val) = self.cmon_sfkpr {
20074			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
20075			if !pattern.is_match(val) {
20076				return Err(ValidationError::new(1005, "cmon_sfkpr does not match the required pattern".to_string()));
20077			}
20078		}
20079		if let Some(ref val) = self.red_tp { val.validate()? }
20080		if let Some(ref val) = self.red_pmt_ccy {
20081			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
20082			if !pattern.is_match(val) {
20083				return Err(ValidationError::new(1005, "red_pmt_ccy does not match the required pattern".to_string()));
20084			}
20085		}
20086		if let Some(ref vec) = self.rstrctn { for item in vec { item.validate()? } }
20087		if let Some(ref vec) = self.sttlm_inf { for item in vec { item.validate()? } }
20088		if let Some(ref val) = self.fin_instrm_form { val.validate()? }
20089		if let Some(ref val) = self.ctct_nm { val.validate()? }
20090		if let Some(ref val) = self.lead_mgr { val.validate()? }
20091		if let Some(ref val) = self.prncpl_png_agt { val.validate()? }
20092		if let Some(ref val) = self.png_agt { val.validate()? }
20093		if let Some(ref val) = self.dpstry { val.validate()? }
20094		if let Some(ref val) = self.undrlyg_rsk { val.validate()? }
20095		Ok(())
20096	}
20097}
20098
20099
20100// CommonFinancialInstrumentAttributes11 ...
20101#[cfg_attr(feature = "derive_debug", derive(Debug))]
20102#[cfg_attr(feature = "derive_default", derive(Default))]
20103#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
20104#[cfg_attr(feature = "derive_clone", derive(Clone))]
20105#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
20106pub struct CommonFinancialInstrumentAttributes11 {
20107	#[cfg_attr( feature = "derive_serde", serde(rename = "SctySts", skip_serializing_if = "Option::is_none") )]
20108	pub scty_sts: Option<SecurityStatus3Choice>,
20109	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmNm", skip_serializing_if = "Option::is_none") )]
20110	pub fin_instrm_nm: Option<Vec<FinancialInstrumentName2>>,
20111	#[cfg_attr( feature = "derive_serde", serde(rename = "DnmtnCcy", skip_serializing_if = "Option::is_none") )]
20112	pub dnmtn_ccy: Option<String>,
20113	#[cfg_attr( feature = "derive_serde", serde(rename = "CertNb", skip_serializing_if = "Option::is_none") )]
20114	pub cert_nb: Option<String>,
20115	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctVrsnNb", skip_serializing_if = "Option::is_none") )]
20116	pub ctrct_vrsn_nb: Option<f64>,
20117	#[cfg_attr( feature = "derive_serde", serde(rename = "CpnAttchdNb", skip_serializing_if = "Option::is_none") )]
20118	pub cpn_attchd_nb: Option<String>,
20119	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxLotNb", skip_serializing_if = "Option::is_none") )]
20120	pub tax_lot_nb: Option<String>,
20121	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolNb", skip_serializing_if = "Option::is_none") )]
20122	pub pool_nb: Option<String>,
20123	#[cfg_attr( feature = "derive_serde", serde(rename = "CvrdInd", skip_serializing_if = "Option::is_none") )]
20124	pub cvrd_ind: Option<bool>,
20125	#[cfg_attr( feature = "derive_serde", serde(rename = "LglRstrctns", skip_serializing_if = "Option::is_none") )]
20126	pub lgl_rstrctns: Option<LegalRestrictions4Choice>,
20127	#[cfg_attr( feature = "derive_serde", serde(rename = "PosLmt", skip_serializing_if = "Option::is_none") )]
20128	pub pos_lmt: Option<FinancialInstrumentQuantity1Choice>,
20129	#[cfg_attr( feature = "derive_serde", serde(rename = "NearTermPosLmt", skip_serializing_if = "Option::is_none") )]
20130	pub near_term_pos_lmt: Option<FinancialInstrumentQuantity1Choice>,
20131	#[cfg_attr( feature = "derive_serde", serde(rename = "ListgDt", skip_serializing_if = "Option::is_none") )]
20132	pub listg_dt: Option<String>,
20133	#[cfg_attr( feature = "derive_serde", serde(rename = "RcrdDt", skip_serializing_if = "Option::is_none") )]
20134	pub rcrd_dt: Option<String>,
20135	#[cfg_attr( feature = "derive_serde", serde(rename = "XpryDt", skip_serializing_if = "Option::is_none") )]
20136	pub xpry_dt: Option<String>,
20137	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
20138	pub purp: Option<String>,
20139	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnTp", skip_serializing_if = "Option::is_none") )]
20140	pub clssfctn_tp: Option<ClassificationType2>,
20141	#[cfg_attr( feature = "derive_serde", serde(rename = "Issnc", skip_serializing_if = "Option::is_none") )]
20142	pub issnc: Option<Issuance6>,
20143	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgMkt", skip_serializing_if = "Option::is_none") )]
20144	pub tradg_mkt: Option<Vec<TradingParameters2>>,
20145	#[cfg_attr( feature = "derive_serde", serde(rename = "SprdAndBchmkCrv", skip_serializing_if = "Option::is_none") )]
20146	pub sprd_and_bchmk_crv: Option<Vec<BenchmarkCurve6>>,
20147	#[cfg_attr( feature = "derive_serde", serde(rename = "PutTp", skip_serializing_if = "Option::is_none") )]
20148	pub put_tp: Option<PutType3Choice>,
20149	#[cfg_attr( feature = "derive_serde", serde(rename = "CallTp", skip_serializing_if = "Option::is_none") )]
20150	pub call_tp: Option<CallType3Choice>,
20151	#[cfg_attr( feature = "derive_serde", serde(rename = "FngbInd", skip_serializing_if = "Option::is_none") )]
20152	pub fngb_ind: Option<bool>,
20153	#[cfg_attr( feature = "derive_serde", serde(rename = "Cnfdtl", skip_serializing_if = "Option::is_none") )]
20154	pub cnfdtl: Option<bool>,
20155	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvtPlcmnt", skip_serializing_if = "Option::is_none") )]
20156	pub prvt_plcmnt: Option<bool>,
20157	#[cfg_attr( feature = "derive_serde", serde(rename = "ConvtblInd", skip_serializing_if = "Option::is_none") )]
20158	pub convtbl_ind: Option<bool>,
20159	#[cfg_attr( feature = "derive_serde", serde(rename = "ConvsPrd", skip_serializing_if = "Option::is_none") )]
20160	pub convs_prd: Option<DateTimePeriod1>,
20161	#[cfg_attr( feature = "derive_serde", serde(rename = "ConvsRatioNmrtr", skip_serializing_if = "Option::is_none") )]
20162	pub convs_ratio_nmrtr: Option<FinancialInstrumentQuantity1Choice>,
20163	#[cfg_attr( feature = "derive_serde", serde(rename = "ConvsRatioDnmtr", skip_serializing_if = "Option::is_none") )]
20164	pub convs_ratio_dnmtr: Option<FinancialInstrumentQuantity1Choice>,
20165	#[cfg_attr( feature = "derive_serde", serde(rename = "PmryPlcOfDpst", skip_serializing_if = "Option::is_none") )]
20166	pub pmry_plc_of_dpst: Option<PartyIdentification136>,
20167	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgMtd", skip_serializing_if = "Option::is_none") )]
20168	pub tradg_mtd: Option<UnitOrFaceAmount1Choice>,
20169	#[cfg_attr( feature = "derive_serde", serde(rename = "TEFRARule", skip_serializing_if = "Option::is_none") )]
20170	pub tefra_rule: Option<TEFRARules3Choice>,
20171	#[cfg_attr( feature = "derive_serde", serde(rename = "SrNb", skip_serializing_if = "Option::is_none") )]
20172	pub sr_nb: Option<String>,
20173	#[cfg_attr( feature = "derive_serde", serde(rename = "Clss", skip_serializing_if = "Option::is_none") )]
20174	pub clss: Option<String>,
20175	#[cfg_attr( feature = "derive_serde", serde(rename = "WhldgTaxRgm", skip_serializing_if = "Option::is_none") )]
20176	pub whldg_tax_rgm: Option<Vec<SecurityWithHoldingTax1>>,
20177	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtSts", skip_serializing_if = "Option::is_none") )]
20178	pub pmt_sts: Option<SecuritiesPaymentStatus5Choice>,
20179	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlPhysForm", skip_serializing_if = "Option::is_none") )]
20180	pub initl_phys_form: Option<InitialPhysicalForm4Choice>,
20181	#[cfg_attr( feature = "derive_serde", serde(rename = "AftrXchgPhysForm", skip_serializing_if = "Option::is_none") )]
20182	pub aftr_xchg_phys_form: Option<InitialPhysicalForm3Choice>,
20183	#[cfg_attr( feature = "derive_serde", serde(rename = "CmonSfkpr", skip_serializing_if = "Option::is_none") )]
20184	pub cmon_sfkpr: Option<PartyIdentification177Choice>,
20185	#[cfg_attr( feature = "derive_serde", serde(rename = "RedTp", skip_serializing_if = "Option::is_none") )]
20186	pub red_tp: Option<MaturityRedemptionType3Choice>,
20187	#[cfg_attr( feature = "derive_serde", serde(rename = "RedPmtCcy", skip_serializing_if = "Option::is_none") )]
20188	pub red_pmt_ccy: Option<String>,
20189	#[cfg_attr( feature = "derive_serde", serde(rename = "Rstrctn", skip_serializing_if = "Option::is_none") )]
20190	pub rstrctn: Option<Vec<SecurityRestriction3>>,
20191	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmIdVldty", skip_serializing_if = "Option::is_none") )]
20192	pub fin_instrm_id_vldty: Option<Vec<FinancialInstrumentIdentificationValidity3>>,
20193	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInf", skip_serializing_if = "Option::is_none") )]
20194	pub sttlm_inf: Option<Vec<SettlementInformation17>>,
20195	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmForm", skip_serializing_if = "Option::is_none") )]
20196	pub fin_instrm_form: Option<FinancialInstrumentForm2>,
20197	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctNm", skip_serializing_if = "Option::is_none") )]
20198	pub ctct_nm: Option<Organisation38>,
20199	#[cfg_attr( feature = "derive_serde", serde(rename = "LeadMgr", skip_serializing_if = "Option::is_none") )]
20200	pub lead_mgr: Option<Organisation38>,
20201	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplPngAgt", skip_serializing_if = "Option::is_none") )]
20202	pub prncpl_png_agt: Option<Organisation38>,
20203	#[cfg_attr( feature = "derive_serde", serde(rename = "PngAgt", skip_serializing_if = "Option::is_none") )]
20204	pub png_agt: Option<Organisation38>,
20205	#[cfg_attr( feature = "derive_serde", serde(rename = "Dpstry", skip_serializing_if = "Option::is_none") )]
20206	pub dpstry: Option<Organisation38>,
20207	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygRsk", skip_serializing_if = "Option::is_none") )]
20208	pub undrlyg_rsk: Option<Organisation38>,
20209	#[cfg_attr( feature = "derive_serde", serde(rename = "SctyCSDLk", skip_serializing_if = "Option::is_none") )]
20210	pub scty_csd_lk: Option<Vec<SecurityCSDLink7>>,
20211}
20212
20213impl CommonFinancialInstrumentAttributes11 {
20214	pub fn validate(&self) -> Result<(), ValidationError> {
20215		if let Some(ref val) = self.scty_sts { val.validate()? }
20216		if let Some(ref vec) = self.fin_instrm_nm { for item in vec { item.validate()? } }
20217		if let Some(ref val) = self.dnmtn_ccy {
20218			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
20219			if !pattern.is_match(val) {
20220				return Err(ValidationError::new(1005, "dnmtn_ccy does not match the required pattern".to_string()));
20221			}
20222		}
20223		if let Some(ref val) = self.cert_nb {
20224			if val.chars().count() < 1 {
20225				return Err(ValidationError::new(1001, "cert_nb is shorter than the minimum length of 1".to_string()));
20226			}
20227			if val.chars().count() > 35 {
20228				return Err(ValidationError::new(1002, "cert_nb exceeds the maximum length of 35".to_string()));
20229			}
20230		}
20231		if let Some(ref val) = self.cpn_attchd_nb {
20232			let pattern = Regex::new("[0-9]{1,3}").unwrap();
20233			if !pattern.is_match(val) {
20234				return Err(ValidationError::new(1005, "cpn_attchd_nb does not match the required pattern".to_string()));
20235			}
20236		}
20237		if let Some(ref val) = self.tax_lot_nb {
20238			let pattern = Regex::new("[0-9]{1,15}").unwrap();
20239			if !pattern.is_match(val) {
20240				return Err(ValidationError::new(1005, "tax_lot_nb does not match the required pattern".to_string()));
20241			}
20242		}
20243		if let Some(ref val) = self.pool_nb {
20244			let pattern = Regex::new("[0-9]{1,15}").unwrap();
20245			if !pattern.is_match(val) {
20246				return Err(ValidationError::new(1005, "pool_nb does not match the required pattern".to_string()));
20247			}
20248		}
20249		if let Some(ref val) = self.lgl_rstrctns { val.validate()? }
20250		if let Some(ref val) = self.pos_lmt { val.validate()? }
20251		if let Some(ref val) = self.near_term_pos_lmt { val.validate()? }
20252		if let Some(ref val) = self.purp {
20253			if val.chars().count() < 1 {
20254				return Err(ValidationError::new(1001, "purp is shorter than the minimum length of 1".to_string()));
20255			}
20256			if val.chars().count() > 256 {
20257				return Err(ValidationError::new(1002, "purp exceeds the maximum length of 256".to_string()));
20258			}
20259		}
20260		if let Some(ref val) = self.clssfctn_tp { val.validate()? }
20261		if let Some(ref val) = self.issnc { val.validate()? }
20262		if let Some(ref vec) = self.tradg_mkt { for item in vec { item.validate()? } }
20263		if let Some(ref vec) = self.sprd_and_bchmk_crv { for item in vec { item.validate()? } }
20264		if let Some(ref val) = self.put_tp { val.validate()? }
20265		if let Some(ref val) = self.call_tp { val.validate()? }
20266		if let Some(ref val) = self.convs_prd { val.validate()? }
20267		if let Some(ref val) = self.convs_ratio_nmrtr { val.validate()? }
20268		if let Some(ref val) = self.convs_ratio_dnmtr { val.validate()? }
20269		if let Some(ref val) = self.pmry_plc_of_dpst { val.validate()? }
20270		if let Some(ref val) = self.tradg_mtd { val.validate()? }
20271		if let Some(ref val) = self.tefra_rule { val.validate()? }
20272		if let Some(ref val) = self.sr_nb {
20273			if val.chars().count() < 1 {
20274				return Err(ValidationError::new(1001, "sr_nb is shorter than the minimum length of 1".to_string()));
20275			}
20276			if val.chars().count() > 16 {
20277				return Err(ValidationError::new(1002, "sr_nb exceeds the maximum length of 16".to_string()));
20278			}
20279		}
20280		if let Some(ref val) = self.clss {
20281			if val.chars().count() < 1 {
20282				return Err(ValidationError::new(1001, "clss is shorter than the minimum length of 1".to_string()));
20283			}
20284			if val.chars().count() > 16 {
20285				return Err(ValidationError::new(1002, "clss exceeds the maximum length of 16".to_string()));
20286			}
20287		}
20288		if let Some(ref vec) = self.whldg_tax_rgm { for item in vec { item.validate()? } }
20289		if let Some(ref val) = self.pmt_sts { val.validate()? }
20290		if let Some(ref val) = self.initl_phys_form { val.validate()? }
20291		if let Some(ref val) = self.aftr_xchg_phys_form { val.validate()? }
20292		if let Some(ref val) = self.cmon_sfkpr { val.validate()? }
20293		if let Some(ref val) = self.red_tp { val.validate()? }
20294		if let Some(ref val) = self.red_pmt_ccy {
20295			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
20296			if !pattern.is_match(val) {
20297				return Err(ValidationError::new(1005, "red_pmt_ccy does not match the required pattern".to_string()));
20298			}
20299		}
20300		if let Some(ref vec) = self.rstrctn { for item in vec { item.validate()? } }
20301		if let Some(ref vec) = self.fin_instrm_id_vldty { for item in vec { item.validate()? } }
20302		if let Some(ref vec) = self.sttlm_inf { for item in vec { item.validate()? } }
20303		if let Some(ref val) = self.fin_instrm_form { val.validate()? }
20304		if let Some(ref val) = self.ctct_nm { val.validate()? }
20305		if let Some(ref val) = self.lead_mgr { val.validate()? }
20306		if let Some(ref val) = self.prncpl_png_agt { val.validate()? }
20307		if let Some(ref val) = self.png_agt { val.validate()? }
20308		if let Some(ref val) = self.dpstry { val.validate()? }
20309		if let Some(ref val) = self.undrlyg_rsk { val.validate()? }
20310		if let Some(ref vec) = self.scty_csd_lk { for item in vec { item.validate()? } }
20311		Ok(())
20312	}
20313}
20314
20315
20316// CommonFinancialInstrumentAttributes12 ...
20317#[cfg_attr(feature = "derive_debug", derive(Debug))]
20318#[cfg_attr(feature = "derive_default", derive(Default))]
20319#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
20320#[cfg_attr(feature = "derive_clone", derive(Clone))]
20321#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
20322pub struct CommonFinancialInstrumentAttributes12 {
20323	#[cfg_attr( feature = "derive_serde", serde(rename = "SctySts", skip_serializing_if = "Option::is_none") )]
20324	pub scty_sts: Option<SecurityStatus3Choice>,
20325	#[cfg_attr( feature = "derive_serde", serde(rename = "ISOSctyLngNm", skip_serializing_if = "Option::is_none") )]
20326	pub iso_scty_lng_nm: Option<String>,
20327	#[cfg_attr( feature = "derive_serde", serde(rename = "ISOSctyShrtNm", skip_serializing_if = "Option::is_none") )]
20328	pub iso_scty_shrt_nm: Option<String>,
20329	#[cfg_attr( feature = "derive_serde", serde(rename = "NmVldFr", skip_serializing_if = "Option::is_none") )]
20330	pub nm_vld_fr: Option<DateAndDateTime2Choice>,
20331	#[cfg_attr( feature = "derive_serde", serde(rename = "DnmtnCcy", skip_serializing_if = "Option::is_none") )]
20332	pub dnmtn_ccy: Option<String>,
20333	#[cfg_attr( feature = "derive_serde", serde(rename = "CertNb", skip_serializing_if = "Option::is_none") )]
20334	pub cert_nb: Option<String>,
20335	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctVrsnNb", skip_serializing_if = "Option::is_none") )]
20336	pub ctrct_vrsn_nb: Option<f64>,
20337	#[cfg_attr( feature = "derive_serde", serde(rename = "CpnAttchdNb", skip_serializing_if = "Option::is_none") )]
20338	pub cpn_attchd_nb: Option<String>,
20339	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxLotNb", skip_serializing_if = "Option::is_none") )]
20340	pub tax_lot_nb: Option<String>,
20341	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolNb", skip_serializing_if = "Option::is_none") )]
20342	pub pool_nb: Option<String>,
20343	#[cfg_attr( feature = "derive_serde", serde(rename = "CvrdInd", skip_serializing_if = "Option::is_none") )]
20344	pub cvrd_ind: Option<bool>,
20345	#[cfg_attr( feature = "derive_serde", serde(rename = "LglRstrctns", skip_serializing_if = "Option::is_none") )]
20346	pub lgl_rstrctns: Option<LegalRestrictions4Choice>,
20347	#[cfg_attr( feature = "derive_serde", serde(rename = "PosLmt", skip_serializing_if = "Option::is_none") )]
20348	pub pos_lmt: Option<FinancialInstrumentQuantity1Choice>,
20349	#[cfg_attr( feature = "derive_serde", serde(rename = "NearTermPosLmt", skip_serializing_if = "Option::is_none") )]
20350	pub near_term_pos_lmt: Option<FinancialInstrumentQuantity1Choice>,
20351	#[cfg_attr( feature = "derive_serde", serde(rename = "ListgDt", skip_serializing_if = "Option::is_none") )]
20352	pub listg_dt: Option<String>,
20353	#[cfg_attr( feature = "derive_serde", serde(rename = "RcrdDt", skip_serializing_if = "Option::is_none") )]
20354	pub rcrd_dt: Option<String>,
20355	#[cfg_attr( feature = "derive_serde", serde(rename = "XpryDt", skip_serializing_if = "Option::is_none") )]
20356	pub xpry_dt: Option<String>,
20357	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
20358	pub purp: Option<String>,
20359	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnTp", skip_serializing_if = "Option::is_none") )]
20360	pub clssfctn_tp: Option<ClassificationType2>,
20361	#[cfg_attr( feature = "derive_serde", serde(rename = "Issnc", skip_serializing_if = "Option::is_none") )]
20362	pub issnc: Option<Issuance5>,
20363	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgMkt", skip_serializing_if = "Option::is_none") )]
20364	pub tradg_mkt: Option<Vec<TradingParameters2>>,
20365	#[cfg_attr( feature = "derive_serde", serde(rename = "SprdAndBchmkCrv", skip_serializing_if = "Option::is_none") )]
20366	pub sprd_and_bchmk_crv: Option<Vec<BenchmarkCurve6>>,
20367	#[cfg_attr( feature = "derive_serde", serde(rename = "PutTp", skip_serializing_if = "Option::is_none") )]
20368	pub put_tp: Option<PutType3Choice>,
20369	#[cfg_attr( feature = "derive_serde", serde(rename = "CallTp", skip_serializing_if = "Option::is_none") )]
20370	pub call_tp: Option<CallType3Choice>,
20371	#[cfg_attr( feature = "derive_serde", serde(rename = "FngbInd", skip_serializing_if = "Option::is_none") )]
20372	pub fngb_ind: Option<bool>,
20373	#[cfg_attr( feature = "derive_serde", serde(rename = "Cnfdtl", skip_serializing_if = "Option::is_none") )]
20374	pub cnfdtl: Option<bool>,
20375	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvtPlcmnt", skip_serializing_if = "Option::is_none") )]
20376	pub prvt_plcmnt: Option<bool>,
20377	#[cfg_attr( feature = "derive_serde", serde(rename = "ConvtblInd", skip_serializing_if = "Option::is_none") )]
20378	pub convtbl_ind: Option<bool>,
20379	#[cfg_attr( feature = "derive_serde", serde(rename = "ConvsPrd", skip_serializing_if = "Option::is_none") )]
20380	pub convs_prd: Option<DateTimePeriod1>,
20381	#[cfg_attr( feature = "derive_serde", serde(rename = "ConvsRatioNmrtr", skip_serializing_if = "Option::is_none") )]
20382	pub convs_ratio_nmrtr: Option<FinancialInstrumentQuantity1Choice>,
20383	#[cfg_attr( feature = "derive_serde", serde(rename = "ConvsRatioDnmtr", skip_serializing_if = "Option::is_none") )]
20384	pub convs_ratio_dnmtr: Option<FinancialInstrumentQuantity1Choice>,
20385	#[cfg_attr( feature = "derive_serde", serde(rename = "PmryPlcOfDpst", skip_serializing_if = "Option::is_none") )]
20386	pub pmry_plc_of_dpst: Option<PartyIdentification136>,
20387	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgMtd", skip_serializing_if = "Option::is_none") )]
20388	pub tradg_mtd: Option<UnitOrFaceAmount1Choice>,
20389	#[cfg_attr( feature = "derive_serde", serde(rename = "TEFRARule", skip_serializing_if = "Option::is_none") )]
20390	pub tefra_rule: Option<TEFRARules3Choice>,
20391	#[cfg_attr( feature = "derive_serde", serde(rename = "SrNb", skip_serializing_if = "Option::is_none") )]
20392	pub sr_nb: Option<String>,
20393	#[cfg_attr( feature = "derive_serde", serde(rename = "Clss", skip_serializing_if = "Option::is_none") )]
20394	pub clss: Option<String>,
20395	#[cfg_attr( feature = "derive_serde", serde(rename = "WhldgTaxRgm", skip_serializing_if = "Option::is_none") )]
20396	pub whldg_tax_rgm: Option<Vec<SecurityWithHoldingTax1>>,
20397	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtSts", skip_serializing_if = "Option::is_none") )]
20398	pub pmt_sts: Option<SecuritiesPaymentStatus5Choice>,
20399	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlPhysForm", skip_serializing_if = "Option::is_none") )]
20400	pub initl_phys_form: Option<InitialPhysicalForm4Choice>,
20401	#[cfg_attr( feature = "derive_serde", serde(rename = "AftrXchgPhysForm", skip_serializing_if = "Option::is_none") )]
20402	pub aftr_xchg_phys_form: Option<InitialPhysicalForm3Choice>,
20403	#[cfg_attr( feature = "derive_serde", serde(rename = "CmonSfkpr", skip_serializing_if = "Option::is_none") )]
20404	pub cmon_sfkpr: Option<PartyIdentification177Choice>,
20405	#[cfg_attr( feature = "derive_serde", serde(rename = "RedTp", skip_serializing_if = "Option::is_none") )]
20406	pub red_tp: Option<MaturityRedemptionType3Choice>,
20407	#[cfg_attr( feature = "derive_serde", serde(rename = "RedPmtCcy", skip_serializing_if = "Option::is_none") )]
20408	pub red_pmt_ccy: Option<String>,
20409	#[cfg_attr( feature = "derive_serde", serde(rename = "Rstrctn", skip_serializing_if = "Option::is_none") )]
20410	pub rstrctn: Option<Vec<SecurityRestriction3>>,
20411	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId", skip_serializing_if = "Option::is_none") )]
20412	pub fin_instrm_id: Option<SecurityIdentification39>,
20413	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInf", skip_serializing_if = "Option::is_none") )]
20414	pub sttlm_inf: Option<Vec<SettlementInformation17>>,
20415	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmForm", skip_serializing_if = "Option::is_none") )]
20416	pub fin_instrm_form: Option<FinancialInstrumentForm2>,
20417	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctNm", skip_serializing_if = "Option::is_none") )]
20418	pub ctct_nm: Option<Organisation38>,
20419	#[cfg_attr( feature = "derive_serde", serde(rename = "LeadMgr", skip_serializing_if = "Option::is_none") )]
20420	pub lead_mgr: Option<Organisation38>,
20421	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplPngAgt", skip_serializing_if = "Option::is_none") )]
20422	pub prncpl_png_agt: Option<Organisation38>,
20423	#[cfg_attr( feature = "derive_serde", serde(rename = "PngAgt", skip_serializing_if = "Option::is_none") )]
20424	pub png_agt: Option<Organisation38>,
20425	#[cfg_attr( feature = "derive_serde", serde(rename = "Dpstry", skip_serializing_if = "Option::is_none") )]
20426	pub dpstry: Option<Organisation38>,
20427	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygRsk", skip_serializing_if = "Option::is_none") )]
20428	pub undrlyg_rsk: Option<Organisation38>,
20429}
20430
20431impl CommonFinancialInstrumentAttributes12 {
20432	pub fn validate(&self) -> Result<(), ValidationError> {
20433		if let Some(ref val) = self.scty_sts { val.validate()? }
20434		if let Some(ref val) = self.iso_scty_lng_nm {
20435			if val.chars().count() < 1 {
20436				return Err(ValidationError::new(1001, "iso_scty_lng_nm is shorter than the minimum length of 1".to_string()));
20437			}
20438			if val.chars().count() > 350 {
20439				return Err(ValidationError::new(1002, "iso_scty_lng_nm exceeds the maximum length of 350".to_string()));
20440			}
20441		}
20442		if let Some(ref val) = self.iso_scty_shrt_nm {
20443			if val.chars().count() < 1 {
20444				return Err(ValidationError::new(1001, "iso_scty_shrt_nm is shorter than the minimum length of 1".to_string()));
20445			}
20446			if val.chars().count() > 35 {
20447				return Err(ValidationError::new(1002, "iso_scty_shrt_nm exceeds the maximum length of 35".to_string()));
20448			}
20449		}
20450		if let Some(ref val) = self.nm_vld_fr { val.validate()? }
20451		if let Some(ref val) = self.dnmtn_ccy {
20452			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
20453			if !pattern.is_match(val) {
20454				return Err(ValidationError::new(1005, "dnmtn_ccy does not match the required pattern".to_string()));
20455			}
20456		}
20457		if let Some(ref val) = self.cert_nb {
20458			if val.chars().count() < 1 {
20459				return Err(ValidationError::new(1001, "cert_nb is shorter than the minimum length of 1".to_string()));
20460			}
20461			if val.chars().count() > 35 {
20462				return Err(ValidationError::new(1002, "cert_nb exceeds the maximum length of 35".to_string()));
20463			}
20464		}
20465		if let Some(ref val) = self.cpn_attchd_nb {
20466			let pattern = Regex::new("[0-9]{1,3}").unwrap();
20467			if !pattern.is_match(val) {
20468				return Err(ValidationError::new(1005, "cpn_attchd_nb does not match the required pattern".to_string()));
20469			}
20470		}
20471		if let Some(ref val) = self.tax_lot_nb {
20472			let pattern = Regex::new("[0-9]{1,15}").unwrap();
20473			if !pattern.is_match(val) {
20474				return Err(ValidationError::new(1005, "tax_lot_nb does not match the required pattern".to_string()));
20475			}
20476		}
20477		if let Some(ref val) = self.pool_nb {
20478			let pattern = Regex::new("[0-9]{1,15}").unwrap();
20479			if !pattern.is_match(val) {
20480				return Err(ValidationError::new(1005, "pool_nb does not match the required pattern".to_string()));
20481			}
20482		}
20483		if let Some(ref val) = self.lgl_rstrctns { val.validate()? }
20484		if let Some(ref val) = self.pos_lmt { val.validate()? }
20485		if let Some(ref val) = self.near_term_pos_lmt { val.validate()? }
20486		if let Some(ref val) = self.purp {
20487			if val.chars().count() < 1 {
20488				return Err(ValidationError::new(1001, "purp is shorter than the minimum length of 1".to_string()));
20489			}
20490			if val.chars().count() > 256 {
20491				return Err(ValidationError::new(1002, "purp exceeds the maximum length of 256".to_string()));
20492			}
20493		}
20494		if let Some(ref val) = self.clssfctn_tp { val.validate()? }
20495		if let Some(ref val) = self.issnc { val.validate()? }
20496		if let Some(ref vec) = self.tradg_mkt { for item in vec { item.validate()? } }
20497		if let Some(ref vec) = self.sprd_and_bchmk_crv { for item in vec { item.validate()? } }
20498		if let Some(ref val) = self.put_tp { val.validate()? }
20499		if let Some(ref val) = self.call_tp { val.validate()? }
20500		if let Some(ref val) = self.convs_prd { val.validate()? }
20501		if let Some(ref val) = self.convs_ratio_nmrtr { val.validate()? }
20502		if let Some(ref val) = self.convs_ratio_dnmtr { val.validate()? }
20503		if let Some(ref val) = self.pmry_plc_of_dpst { val.validate()? }
20504		if let Some(ref val) = self.tradg_mtd { val.validate()? }
20505		if let Some(ref val) = self.tefra_rule { val.validate()? }
20506		if let Some(ref val) = self.sr_nb {
20507			if val.chars().count() < 1 {
20508				return Err(ValidationError::new(1001, "sr_nb is shorter than the minimum length of 1".to_string()));
20509			}
20510			if val.chars().count() > 16 {
20511				return Err(ValidationError::new(1002, "sr_nb exceeds the maximum length of 16".to_string()));
20512			}
20513		}
20514		if let Some(ref val) = self.clss {
20515			if val.chars().count() < 1 {
20516				return Err(ValidationError::new(1001, "clss is shorter than the minimum length of 1".to_string()));
20517			}
20518			if val.chars().count() > 16 {
20519				return Err(ValidationError::new(1002, "clss exceeds the maximum length of 16".to_string()));
20520			}
20521		}
20522		if let Some(ref vec) = self.whldg_tax_rgm { for item in vec { item.validate()? } }
20523		if let Some(ref val) = self.pmt_sts { val.validate()? }
20524		if let Some(ref val) = self.initl_phys_form { val.validate()? }
20525		if let Some(ref val) = self.aftr_xchg_phys_form { val.validate()? }
20526		if let Some(ref val) = self.cmon_sfkpr { val.validate()? }
20527		if let Some(ref val) = self.red_tp { val.validate()? }
20528		if let Some(ref val) = self.red_pmt_ccy {
20529			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
20530			if !pattern.is_match(val) {
20531				return Err(ValidationError::new(1005, "red_pmt_ccy does not match the required pattern".to_string()));
20532			}
20533		}
20534		if let Some(ref vec) = self.rstrctn { for item in vec { item.validate()? } }
20535		if let Some(ref val) = self.fin_instrm_id { val.validate()? }
20536		if let Some(ref vec) = self.sttlm_inf { for item in vec { item.validate()? } }
20537		if let Some(ref val) = self.fin_instrm_form { val.validate()? }
20538		if let Some(ref val) = self.ctct_nm { val.validate()? }
20539		if let Some(ref val) = self.lead_mgr { val.validate()? }
20540		if let Some(ref val) = self.prncpl_png_agt { val.validate()? }
20541		if let Some(ref val) = self.png_agt { val.validate()? }
20542		if let Some(ref val) = self.dpstry { val.validate()? }
20543		if let Some(ref val) = self.undrlyg_rsk { val.validate()? }
20544		Ok(())
20545	}
20546}
20547
20548
20549// CommonTradeDataReport71 ...
20550#[cfg_attr(feature = "derive_debug", derive(Debug))]
20551#[cfg_attr(feature = "derive_default", derive(Default))]
20552#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
20553#[cfg_attr(feature = "derive_clone", derive(Clone))]
20554#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
20555pub struct CommonTradeDataReport71 {
20556	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctData", skip_serializing_if = "Option::is_none") )]
20557	pub ctrct_data: Option<ContractType15>,
20558	#[cfg_attr( feature = "derive_serde", serde(rename = "TxData") )]
20559	pub tx_data: TradeTransaction50,
20560}
20561
20562impl CommonTradeDataReport71 {
20563	pub fn validate(&self) -> Result<(), ValidationError> {
20564		if let Some(ref val) = self.ctrct_data { val.validate()? }
20565		self.tx_data.validate()?;
20566		Ok(())
20567	}
20568}
20569
20570
20571// CommonTradeDataReport72 ...
20572#[cfg_attr(feature = "derive_debug", derive(Debug))]
20573#[cfg_attr(feature = "derive_default", derive(Default))]
20574#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
20575#[cfg_attr(feature = "derive_clone", derive(Clone))]
20576#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
20577pub struct CommonTradeDataReport72 {
20578	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctData", skip_serializing_if = "Option::is_none") )]
20579	pub ctrct_data: Option<ContractType15>,
20580	#[cfg_attr( feature = "derive_serde", serde(rename = "TxData") )]
20581	pub tx_data: TradeTransaction50,
20582	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctMod", skip_serializing_if = "Option::is_none") )]
20583	pub ctrct_mod: Option<ContractModification9>,
20584}
20585
20586impl CommonTradeDataReport72 {
20587	pub fn validate(&self) -> Result<(), ValidationError> {
20588		if let Some(ref val) = self.ctrct_data { val.validate()? }
20589		self.tx_data.validate()?;
20590		if let Some(ref val) = self.ctrct_mod { val.validate()? }
20591		Ok(())
20592	}
20593}
20594
20595
20596// CommunicationAddress10 ...
20597#[cfg_attr(feature = "derive_debug", derive(Debug))]
20598#[cfg_attr(feature = "derive_default", derive(Default))]
20599#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
20600#[cfg_attr(feature = "derive_clone", derive(Clone))]
20601#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
20602pub struct CommunicationAddress10 {
20603	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr") )]
20604	pub pstl_adr: LongPostalAddress1Choice,
20605	#[cfg_attr( feature = "derive_serde", serde(rename = "PhneNb") )]
20606	pub phne_nb: String,
20607	#[cfg_attr( feature = "derive_serde", serde(rename = "FaxNb", skip_serializing_if = "Option::is_none") )]
20608	pub fax_nb: Option<String>,
20609	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailAdr", skip_serializing_if = "Option::is_none") )]
20610	pub email_adr: Option<String>,
20611}
20612
20613impl CommunicationAddress10 {
20614	pub fn validate(&self) -> Result<(), ValidationError> {
20615		self.pstl_adr.validate()?;
20616		let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
20617		if !pattern.is_match(&self.phne_nb) {
20618			return Err(ValidationError::new(1005, "phne_nb does not match the required pattern".to_string()));
20619		}
20620		if let Some(ref val) = self.fax_nb {
20621			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
20622			if !pattern.is_match(val) {
20623				return Err(ValidationError::new(1005, "fax_nb does not match the required pattern".to_string()));
20624			}
20625		}
20626		if let Some(ref val) = self.email_adr {
20627			if val.chars().count() < 1 {
20628				return Err(ValidationError::new(1001, "email_adr is shorter than the minimum length of 1".to_string()));
20629			}
20630			if val.chars().count() > 2048 {
20631				return Err(ValidationError::new(1002, "email_adr exceeds the maximum length of 2048".to_string()));
20632			}
20633		}
20634		Ok(())
20635	}
20636}
20637
20638
20639// CommunicationAddress3 ...
20640#[cfg_attr(feature = "derive_debug", derive(Debug))]
20641#[cfg_attr(feature = "derive_default", derive(Default))]
20642#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
20643#[cfg_attr(feature = "derive_clone", derive(Clone))]
20644#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
20645pub struct CommunicationAddress3 {
20646	#[cfg_attr( feature = "derive_serde", serde(rename = "Email", skip_serializing_if = "Option::is_none") )]
20647	pub email: Option<String>,
20648	#[cfg_attr( feature = "derive_serde", serde(rename = "Phne", skip_serializing_if = "Option::is_none") )]
20649	pub phne: Option<String>,
20650	#[cfg_attr( feature = "derive_serde", serde(rename = "Mob", skip_serializing_if = "Option::is_none") )]
20651	pub mob: Option<String>,
20652	#[cfg_attr( feature = "derive_serde", serde(rename = "FaxNb", skip_serializing_if = "Option::is_none") )]
20653	pub fax_nb: Option<String>,
20654	#[cfg_attr( feature = "derive_serde", serde(rename = "TlxAdr", skip_serializing_if = "Option::is_none") )]
20655	pub tlx_adr: Option<String>,
20656	#[cfg_attr( feature = "derive_serde", serde(rename = "URLAdr", skip_serializing_if = "Option::is_none") )]
20657	pub url_adr: Option<String>,
20658}
20659
20660impl CommunicationAddress3 {
20661	pub fn validate(&self) -> Result<(), ValidationError> {
20662		if let Some(ref val) = self.email {
20663			if val.chars().count() < 1 {
20664				return Err(ValidationError::new(1001, "email is shorter than the minimum length of 1".to_string()));
20665			}
20666			if val.chars().count() > 256 {
20667				return Err(ValidationError::new(1002, "email exceeds the maximum length of 256".to_string()));
20668			}
20669		}
20670		if let Some(ref val) = self.phne {
20671			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
20672			if !pattern.is_match(val) {
20673				return Err(ValidationError::new(1005, "phne does not match the required pattern".to_string()));
20674			}
20675		}
20676		if let Some(ref val) = self.mob {
20677			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
20678			if !pattern.is_match(val) {
20679				return Err(ValidationError::new(1005, "mob does not match the required pattern".to_string()));
20680			}
20681		}
20682		if let Some(ref val) = self.fax_nb {
20683			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
20684			if !pattern.is_match(val) {
20685				return Err(ValidationError::new(1005, "fax_nb does not match the required pattern".to_string()));
20686			}
20687		}
20688		if let Some(ref val) = self.tlx_adr {
20689			if val.chars().count() < 1 {
20690				return Err(ValidationError::new(1001, "tlx_adr is shorter than the minimum length of 1".to_string()));
20691			}
20692			if val.chars().count() > 35 {
20693				return Err(ValidationError::new(1002, "tlx_adr exceeds the maximum length of 35".to_string()));
20694			}
20695		}
20696		if let Some(ref val) = self.url_adr {
20697			if val.chars().count() < 1 {
20698				return Err(ValidationError::new(1001, "url_adr is shorter than the minimum length of 1".to_string()));
20699			}
20700			if val.chars().count() > 256 {
20701				return Err(ValidationError::new(1002, "url_adr exceeds the maximum length of 256".to_string()));
20702			}
20703		}
20704		Ok(())
20705	}
20706}
20707
20708
20709// CommunicationAddress6 ...
20710#[cfg_attr(feature = "derive_debug", derive(Debug))]
20711#[cfg_attr(feature = "derive_default", derive(Default))]
20712#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
20713#[cfg_attr(feature = "derive_clone", derive(Clone))]
20714#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
20715pub struct CommunicationAddress6 {
20716	#[cfg_attr( feature = "derive_serde", serde(rename = "AdrTp", skip_serializing_if = "Option::is_none") )]
20717	pub adr_tp: Option<AddressType1Choice>,
20718	#[cfg_attr( feature = "derive_serde", serde(rename = "Email", skip_serializing_if = "Option::is_none") )]
20719	pub email: Option<String>,
20720	#[cfg_attr( feature = "derive_serde", serde(rename = "Phne", skip_serializing_if = "Option::is_none") )]
20721	pub phne: Option<String>,
20722	#[cfg_attr( feature = "derive_serde", serde(rename = "Mob", skip_serializing_if = "Option::is_none") )]
20723	pub mob: Option<String>,
20724	#[cfg_attr( feature = "derive_serde", serde(rename = "FaxNb", skip_serializing_if = "Option::is_none") )]
20725	pub fax_nb: Option<String>,
20726	#[cfg_attr( feature = "derive_serde", serde(rename = "TlxAdr", skip_serializing_if = "Option::is_none") )]
20727	pub tlx_adr: Option<String>,
20728	#[cfg_attr( feature = "derive_serde", serde(rename = "URLAdr", skip_serializing_if = "Option::is_none") )]
20729	pub url_adr: Option<String>,
20730}
20731
20732impl CommunicationAddress6 {
20733	pub fn validate(&self) -> Result<(), ValidationError> {
20734		if let Some(ref val) = self.adr_tp { val.validate()? }
20735		if let Some(ref val) = self.email {
20736			if val.chars().count() < 1 {
20737				return Err(ValidationError::new(1001, "email is shorter than the minimum length of 1".to_string()));
20738			}
20739			if val.chars().count() > 256 {
20740				return Err(ValidationError::new(1002, "email exceeds the maximum length of 256".to_string()));
20741			}
20742		}
20743		if let Some(ref val) = self.phne {
20744			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
20745			if !pattern.is_match(val) {
20746				return Err(ValidationError::new(1005, "phne does not match the required pattern".to_string()));
20747			}
20748		}
20749		if let Some(ref val) = self.mob {
20750			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
20751			if !pattern.is_match(val) {
20752				return Err(ValidationError::new(1005, "mob does not match the required pattern".to_string()));
20753			}
20754		}
20755		if let Some(ref val) = self.fax_nb {
20756			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
20757			if !pattern.is_match(val) {
20758				return Err(ValidationError::new(1005, "fax_nb does not match the required pattern".to_string()));
20759			}
20760		}
20761		if let Some(ref val) = self.tlx_adr {
20762			if val.chars().count() < 1 {
20763				return Err(ValidationError::new(1001, "tlx_adr is shorter than the minimum length of 1".to_string()));
20764			}
20765			if val.chars().count() > 35 {
20766				return Err(ValidationError::new(1002, "tlx_adr exceeds the maximum length of 35".to_string()));
20767			}
20768		}
20769		if let Some(ref val) = self.url_adr {
20770			if val.chars().count() < 1 {
20771				return Err(ValidationError::new(1001, "url_adr is shorter than the minimum length of 1".to_string()));
20772			}
20773			if val.chars().count() > 256 {
20774				return Err(ValidationError::new(1002, "url_adr exceeds the maximum length of 256".to_string()));
20775			}
20776		}
20777		Ok(())
20778	}
20779}
20780
20781
20782// CommunicationAddress7 ...
20783#[cfg_attr(feature = "derive_debug", derive(Debug))]
20784#[cfg_attr(feature = "derive_default", derive(Default))]
20785#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
20786#[cfg_attr(feature = "derive_clone", derive(Clone))]
20787#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
20788pub struct CommunicationAddress7 {
20789	#[cfg_attr( feature = "derive_serde", serde(rename = "Email", skip_serializing_if = "Option::is_none") )]
20790	pub email: Option<String>,
20791	#[cfg_attr( feature = "derive_serde", serde(rename = "PhneNb", skip_serializing_if = "Option::is_none") )]
20792	pub phne_nb: Option<String>,
20793	#[cfg_attr( feature = "derive_serde", serde(rename = "MobNb", skip_serializing_if = "Option::is_none") )]
20794	pub mob_nb: Option<String>,
20795	#[cfg_attr( feature = "derive_serde", serde(rename = "FaxNb", skip_serializing_if = "Option::is_none") )]
20796	pub fax_nb: Option<String>,
20797	#[cfg_attr( feature = "derive_serde", serde(rename = "TlxAdr", skip_serializing_if = "Option::is_none") )]
20798	pub tlx_adr: Option<String>,
20799	#[cfg_attr( feature = "derive_serde", serde(rename = "URLAdr", skip_serializing_if = "Option::is_none") )]
20800	pub url_adr: Option<String>,
20801}
20802
20803impl CommunicationAddress7 {
20804	pub fn validate(&self) -> Result<(), ValidationError> {
20805		if let Some(ref val) = self.email {
20806			if val.chars().count() < 1 {
20807				return Err(ValidationError::new(1001, "email is shorter than the minimum length of 1".to_string()));
20808			}
20809			if val.chars().count() > 2048 {
20810				return Err(ValidationError::new(1002, "email exceeds the maximum length of 2048".to_string()));
20811			}
20812		}
20813		if let Some(ref val) = self.phne_nb {
20814			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
20815			if !pattern.is_match(val) {
20816				return Err(ValidationError::new(1005, "phne_nb does not match the required pattern".to_string()));
20817			}
20818		}
20819		if let Some(ref val) = self.mob_nb {
20820			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
20821			if !pattern.is_match(val) {
20822				return Err(ValidationError::new(1005, "mob_nb does not match the required pattern".to_string()));
20823			}
20824		}
20825		if let Some(ref val) = self.fax_nb {
20826			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
20827			if !pattern.is_match(val) {
20828				return Err(ValidationError::new(1005, "fax_nb does not match the required pattern".to_string()));
20829			}
20830		}
20831		if let Some(ref val) = self.tlx_adr {
20832			if val.chars().count() < 1 {
20833				return Err(ValidationError::new(1001, "tlx_adr is shorter than the minimum length of 1".to_string()));
20834			}
20835			if val.chars().count() > 35 {
20836				return Err(ValidationError::new(1002, "tlx_adr exceeds the maximum length of 35".to_string()));
20837			}
20838		}
20839		if let Some(ref val) = self.url_adr {
20840			if val.chars().count() < 1 {
20841				return Err(ValidationError::new(1001, "url_adr is shorter than the minimum length of 1".to_string()));
20842			}
20843			if val.chars().count() > 2048 {
20844				return Err(ValidationError::new(1002, "url_adr exceeds the maximum length of 2048".to_string()));
20845			}
20846		}
20847		Ok(())
20848	}
20849}
20850
20851
20852// CommunicationAddress8 ...
20853#[cfg_attr(feature = "derive_debug", derive(Debug))]
20854#[cfg_attr(feature = "derive_default", derive(Default))]
20855#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
20856#[cfg_attr(feature = "derive_clone", derive(Clone))]
20857#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
20858pub struct CommunicationAddress8 {
20859	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr") )]
20860	pub pstl_adr: LongPostalAddress1Choice,
20861	#[cfg_attr( feature = "derive_serde", serde(rename = "PhneNb") )]
20862	pub phne_nb: String,
20863	#[cfg_attr( feature = "derive_serde", serde(rename = "FaxNb", skip_serializing_if = "Option::is_none") )]
20864	pub fax_nb: Option<String>,
20865	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailAdr", skip_serializing_if = "Option::is_none") )]
20866	pub email_adr: Option<String>,
20867}
20868
20869impl CommunicationAddress8 {
20870	pub fn validate(&self) -> Result<(), ValidationError> {
20871		self.pstl_adr.validate()?;
20872		let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
20873		if !pattern.is_match(&self.phne_nb) {
20874			return Err(ValidationError::new(1005, "phne_nb does not match the required pattern".to_string()));
20875		}
20876		if let Some(ref val) = self.fax_nb {
20877			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
20878			if !pattern.is_match(val) {
20879				return Err(ValidationError::new(1005, "fax_nb does not match the required pattern".to_string()));
20880			}
20881		}
20882		if let Some(ref val) = self.email_adr {
20883			if val.chars().count() < 1 {
20884				return Err(ValidationError::new(1001, "email_adr is shorter than the minimum length of 1".to_string()));
20885			}
20886			if val.chars().count() > 256 {
20887				return Err(ValidationError::new(1002, "email_adr exceeds the maximum length of 256".to_string()));
20888			}
20889		}
20890		Ok(())
20891	}
20892}
20893
20894
20895// CommunicationFormat1Choice ...
20896#[cfg_attr(feature = "derive_debug", derive(Debug))]
20897#[cfg_attr(feature = "derive_default", derive(Default))]
20898#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
20899#[cfg_attr(feature = "derive_clone", derive(Clone))]
20900#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
20901pub struct CommunicationFormat1Choice {
20902	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
20903	pub cd: Option<String>,
20904	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
20905	pub prtry: Option<String>,
20906}
20907
20908impl CommunicationFormat1Choice {
20909	pub fn validate(&self) -> Result<(), ValidationError> {
20910		if let Some(ref val) = self.cd {
20911			if val.chars().count() < 1 {
20912				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
20913			}
20914			if val.chars().count() > 4 {
20915				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
20916			}
20917		}
20918		if let Some(ref val) = self.prtry {
20919			if val.chars().count() < 1 {
20920				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
20921			}
20922			if val.chars().count() > 35 {
20923				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
20924			}
20925		}
20926		Ok(())
20927	}
20928}
20929
20930
20931// CommunicationMethod1Code ...
20932#[cfg_attr(feature = "derive_debug", derive(Debug))]
20933#[cfg_attr(feature = "derive_default", derive(Default))]
20934#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
20935#[cfg_attr(feature = "derive_clone", derive(Clone))]
20936#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
20937pub enum CommunicationMethod1Code {
20938	#[cfg_attr(feature = "derive_default", default)]
20939	#[cfg_attr( feature = "derive_serde", serde(rename = "SWMT") )]
20940	CodeSWMT,
20941	#[cfg_attr( feature = "derive_serde", serde(rename = "SWMX") )]
20942	CodeSWMX,
20943	#[cfg_attr( feature = "derive_serde", serde(rename = "FAXI") )]
20944	CodeFAXI,
20945	#[cfg_attr( feature = "derive_serde", serde(rename = "EMAL") )]
20946	CodeEMAL,
20947	#[cfg_attr( feature = "derive_serde", serde(rename = "PROP") )]
20948	CodePROP,
20949}
20950
20951impl CommunicationMethod1Code {
20952	pub fn validate(&self) -> Result<(), ValidationError> {
20953		Ok(())
20954	}
20955}
20956
20957
20958// CommunicationMethod2Choice ...
20959#[cfg_attr(feature = "derive_debug", derive(Debug))]
20960#[cfg_attr(feature = "derive_default", derive(Default))]
20961#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
20962#[cfg_attr(feature = "derive_clone", derive(Clone))]
20963#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
20964pub struct CommunicationMethod2Choice {
20965	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
20966	pub cd: Option<CommunicationMethod2Code>,
20967	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
20968	pub prtry: Option<String>,
20969}
20970
20971impl CommunicationMethod2Choice {
20972	pub fn validate(&self) -> Result<(), ValidationError> {
20973		if let Some(ref val) = self.cd { val.validate()? }
20974		if let Some(ref val) = self.prtry {
20975			if val.chars().count() < 1 {
20976				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
20977			}
20978			if val.chars().count() > 35 {
20979				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
20980			}
20981		}
20982		Ok(())
20983	}
20984}
20985
20986
20987// CommunicationMethod2Code ...
20988#[cfg_attr(feature = "derive_debug", derive(Debug))]
20989#[cfg_attr(feature = "derive_default", derive(Default))]
20990#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
20991#[cfg_attr(feature = "derive_clone", derive(Clone))]
20992#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
20993pub enum CommunicationMethod2Code {
20994	#[cfg_attr(feature = "derive_default", default)]
20995	#[cfg_attr( feature = "derive_serde", serde(rename = "EMAL") )]
20996	CodeEMAL,
20997	#[cfg_attr( feature = "derive_serde", serde(rename = "FAXI") )]
20998	CodeFAXI,
20999	#[cfg_attr( feature = "derive_serde", serde(rename = "FILE") )]
21000	CodeFILE,
21001	#[cfg_attr( feature = "derive_serde", serde(rename = "ONLI") )]
21002	CodeONLI,
21003	#[cfg_attr( feature = "derive_serde", serde(rename = "POST") )]
21004	CodePOST,
21005}
21006
21007impl CommunicationMethod2Code {
21008	pub fn validate(&self) -> Result<(), ValidationError> {
21009		Ok(())
21010	}
21011}
21012
21013
21014// CommunicationMethod3Choice ...
21015#[cfg_attr(feature = "derive_debug", derive(Debug))]
21016#[cfg_attr(feature = "derive_default", derive(Default))]
21017#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21018#[cfg_attr(feature = "derive_clone", derive(Clone))]
21019#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21020pub struct CommunicationMethod3Choice {
21021	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
21022	pub cd: Option<CommunicationMethod1Code>,
21023	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
21024	pub prtry: Option<GenericIdentification47>,
21025}
21026
21027impl CommunicationMethod3Choice {
21028	pub fn validate(&self) -> Result<(), ValidationError> {
21029		if let Some(ref val) = self.cd { val.validate()? }
21030		if let Some(ref val) = self.prtry { val.validate()? }
21031		Ok(())
21032	}
21033}
21034
21035
21036// CommunicationMethod3Code ...
21037#[cfg_attr(feature = "derive_debug", derive(Debug))]
21038#[cfg_attr(feature = "derive_default", derive(Default))]
21039#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21040#[cfg_attr(feature = "derive_clone", derive(Clone))]
21041#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21042pub enum CommunicationMethod3Code {
21043	#[cfg_attr(feature = "derive_default", default)]
21044	#[cfg_attr( feature = "derive_serde", serde(rename = "EMAL") )]
21045	CodeEMAL,
21046	#[cfg_attr( feature = "derive_serde", serde(rename = "FAXI") )]
21047	CodeFAXI,
21048	#[cfg_attr( feature = "derive_serde", serde(rename = "POST") )]
21049	CodePOST,
21050	#[cfg_attr( feature = "derive_serde", serde(rename = "PHON") )]
21051	CodePHON,
21052	#[cfg_attr( feature = "derive_serde", serde(rename = "FILE") )]
21053	CodeFILE,
21054	#[cfg_attr( feature = "derive_serde", serde(rename = "ONLI") )]
21055	CodeONLI,
21056}
21057
21058impl CommunicationMethod3Code {
21059	pub fn validate(&self) -> Result<(), ValidationError> {
21060		Ok(())
21061	}
21062}
21063
21064
21065// CommunicationMethod4Code ...
21066#[cfg_attr(feature = "derive_debug", derive(Debug))]
21067#[cfg_attr(feature = "derive_default", derive(Default))]
21068#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21069#[cfg_attr(feature = "derive_clone", derive(Clone))]
21070#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21071pub enum CommunicationMethod4Code {
21072	#[cfg_attr(feature = "derive_default", default)]
21073	#[cfg_attr( feature = "derive_serde", serde(rename = "EMAL") )]
21074	CodeEMAL,
21075	#[cfg_attr( feature = "derive_serde", serde(rename = "FAXI") )]
21076	CodeFAXI,
21077	#[cfg_attr( feature = "derive_serde", serde(rename = "FILE") )]
21078	CodeFILE,
21079	#[cfg_attr( feature = "derive_serde", serde(rename = "ONLI") )]
21080	CodeONLI,
21081	#[cfg_attr( feature = "derive_serde", serde(rename = "PHON") )]
21082	CodePHON,
21083	#[cfg_attr( feature = "derive_serde", serde(rename = "POST") )]
21084	CodePOST,
21085	#[cfg_attr( feature = "derive_serde", serde(rename = "PROP") )]
21086	CodePROP,
21087	#[cfg_attr( feature = "derive_serde", serde(rename = "SWMT") )]
21088	CodeSWMT,
21089	#[cfg_attr( feature = "derive_serde", serde(rename = "SWMX") )]
21090	CodeSWMX,
21091}
21092
21093impl CommunicationMethod4Code {
21094	pub fn validate(&self) -> Result<(), ValidationError> {
21095		Ok(())
21096	}
21097}
21098
21099
21100// CompanyLink1Choice ...
21101#[cfg_attr(feature = "derive_debug", derive(Debug))]
21102#[cfg_attr(feature = "derive_default", derive(Default))]
21103#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21104#[cfg_attr(feature = "derive_clone", derive(Clone))]
21105#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21106pub struct CompanyLink1Choice {
21107	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
21108	pub cd: Option<CompanyLink1Code>,
21109	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
21110	pub prtry: Option<GenericIdentification47>,
21111}
21112
21113impl CompanyLink1Choice {
21114	pub fn validate(&self) -> Result<(), ValidationError> {
21115		if let Some(ref val) = self.cd { val.validate()? }
21116		if let Some(ref val) = self.prtry { val.validate()? }
21117		Ok(())
21118	}
21119}
21120
21121
21122// CompanyLink1Code ...
21123#[cfg_attr(feature = "derive_debug", derive(Debug))]
21124#[cfg_attr(feature = "derive_default", derive(Default))]
21125#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21126#[cfg_attr(feature = "derive_clone", derive(Clone))]
21127#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21128pub enum CompanyLink1Code {
21129	#[cfg_attr(feature = "derive_default", default)]
21130	#[cfg_attr( feature = "derive_serde", serde(rename = "AGEN") )]
21131	CodeAGEN,
21132	#[cfg_attr( feature = "derive_serde", serde(rename = "BROK") )]
21133	CodeBROK,
21134	#[cfg_attr( feature = "derive_serde", serde(rename = "PART") )]
21135	CodePART,
21136	#[cfg_attr( feature = "derive_serde", serde(rename = "MEMB") )]
21137	CodeMEMB,
21138	#[cfg_attr( feature = "derive_serde", serde(rename = "PCOM") )]
21139	CodePCOM,
21140	#[cfg_attr( feature = "derive_serde", serde(rename = "RELA") )]
21141	CodeRELA,
21142}
21143
21144impl CompanyLink1Code {
21145	pub fn validate(&self) -> Result<(), ValidationError> {
21146		Ok(())
21147	}
21148}
21149
21150
21151// CompareActiveOrHistoricCurrencyAndAmount3 ...
21152#[cfg_attr(feature = "derive_debug", derive(Debug))]
21153#[cfg_attr(feature = "derive_default", derive(Default))]
21154#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21155#[cfg_attr(feature = "derive_clone", derive(Clone))]
21156#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21157pub struct CompareActiveOrHistoricCurrencyAndAmount3 {
21158	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21159	pub val1: Option<ActiveOrHistoricCurrencyAndAmount>,
21160	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21161	pub val2: Option<ActiveOrHistoricCurrencyAndAmount>,
21162}
21163
21164impl CompareActiveOrHistoricCurrencyAndAmount3 {
21165	pub fn validate(&self) -> Result<(), ValidationError> {
21166		if let Some(ref val) = self.val1 { val.validate()? }
21167		if let Some(ref val) = self.val2 { val.validate()? }
21168		Ok(())
21169	}
21170}
21171
21172
21173// CompareActiveOrHistoricCurrencyAndAmount4 ...
21174#[cfg_attr(feature = "derive_debug", derive(Debug))]
21175#[cfg_attr(feature = "derive_default", derive(Default))]
21176#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21177#[cfg_attr(feature = "derive_clone", derive(Clone))]
21178#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21179pub struct CompareActiveOrHistoricCurrencyAndAmount4 {
21180	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21181	pub val1: Option<ActiveOrHistoricCurrencyAnd19DecimalAmount>,
21182	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21183	pub val2: Option<ActiveOrHistoricCurrencyAnd19DecimalAmount>,
21184}
21185
21186impl CompareActiveOrHistoricCurrencyAndAmount4 {
21187	pub fn validate(&self) -> Result<(), ValidationError> {
21188		if let Some(ref val) = self.val1 { val.validate()? }
21189		if let Some(ref val) = self.val2 { val.validate()? }
21190		Ok(())
21191	}
21192}
21193
21194
21195// CompareActiveOrHistoricCurrencyCode1 ...
21196#[cfg_attr(feature = "derive_debug", derive(Debug))]
21197#[cfg_attr(feature = "derive_default", derive(Default))]
21198#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21199#[cfg_attr(feature = "derive_clone", derive(Clone))]
21200#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21201pub struct CompareActiveOrHistoricCurrencyCode1 {
21202	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21203	pub val1: Option<String>,
21204	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21205	pub val2: Option<String>,
21206}
21207
21208impl CompareActiveOrHistoricCurrencyCode1 {
21209	pub fn validate(&self) -> Result<(), ValidationError> {
21210		if let Some(ref val) = self.val1 {
21211			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
21212			if !pattern.is_match(val) {
21213				return Err(ValidationError::new(1005, "val1 does not match the required pattern".to_string()));
21214			}
21215		}
21216		if let Some(ref val) = self.val2 {
21217			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
21218			if !pattern.is_match(val) {
21219				return Err(ValidationError::new(1005, "val2 does not match the required pattern".to_string()));
21220			}
21221		}
21222		Ok(())
21223	}
21224}
21225
21226
21227// CompareAgreementType2 ...
21228#[cfg_attr(feature = "derive_debug", derive(Debug))]
21229#[cfg_attr(feature = "derive_default", derive(Default))]
21230#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21231#[cfg_attr(feature = "derive_clone", derive(Clone))]
21232#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21233pub struct CompareAgreementType2 {
21234	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21235	pub val1: Option<AgreementType1Choice>,
21236	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21237	pub val2: Option<AgreementType1Choice>,
21238}
21239
21240impl CompareAgreementType2 {
21241	pub fn validate(&self) -> Result<(), ValidationError> {
21242		if let Some(ref val) = self.val1 { val.validate()? }
21243		if let Some(ref val) = self.val2 { val.validate()? }
21244		Ok(())
21245	}
21246}
21247
21248
21249// CompareAmountAndDirection1 ...
21250#[cfg_attr(feature = "derive_debug", derive(Debug))]
21251#[cfg_attr(feature = "derive_default", derive(Default))]
21252#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21253#[cfg_attr(feature = "derive_clone", derive(Clone))]
21254#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21255pub struct CompareAmountAndDirection1 {
21256	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21257	pub val1: Option<AmountAndDirection53>,
21258	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21259	pub val2: Option<AmountAndDirection53>,
21260}
21261
21262impl CompareAmountAndDirection1 {
21263	pub fn validate(&self) -> Result<(), ValidationError> {
21264		if let Some(ref val) = self.val1 { val.validate()? }
21265		if let Some(ref val) = self.val2 { val.validate()? }
21266		Ok(())
21267	}
21268}
21269
21270
21271// CompareAmountAndDirection2 ...
21272#[cfg_attr(feature = "derive_debug", derive(Debug))]
21273#[cfg_attr(feature = "derive_default", derive(Default))]
21274#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21275#[cfg_attr(feature = "derive_clone", derive(Clone))]
21276#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21277pub struct CompareAmountAndDirection2 {
21278	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21279	pub val1: Option<AmountAndDirection53>,
21280	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21281	pub val2: Option<AmountAndDirection53>,
21282}
21283
21284impl CompareAmountAndDirection2 {
21285	pub fn validate(&self) -> Result<(), ValidationError> {
21286		if let Some(ref val) = self.val1 { val.validate()? }
21287		if let Some(ref val) = self.val2 { val.validate()? }
21288		Ok(())
21289	}
21290}
21291
21292
21293// CompareAmountAndDirection3 ...
21294#[cfg_attr(feature = "derive_debug", derive(Debug))]
21295#[cfg_attr(feature = "derive_default", derive(Default))]
21296#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21297#[cfg_attr(feature = "derive_clone", derive(Clone))]
21298#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21299pub struct CompareAmountAndDirection3 {
21300	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21301	pub val1: Option<AmountAndDirection106>,
21302	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21303	pub val2: Option<AmountAndDirection106>,
21304}
21305
21306impl CompareAmountAndDirection3 {
21307	pub fn validate(&self) -> Result<(), ValidationError> {
21308		if let Some(ref val) = self.val1 { val.validate()? }
21309		if let Some(ref val) = self.val2 { val.validate()? }
21310		Ok(())
21311	}
21312}
21313
21314
21315// CompareAssetClass1 ...
21316#[cfg_attr(feature = "derive_debug", derive(Debug))]
21317#[cfg_attr(feature = "derive_default", derive(Default))]
21318#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21319#[cfg_attr(feature = "derive_clone", derive(Clone))]
21320#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21321pub struct CompareAssetClass1 {
21322	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21323	pub val1: Option<ProductType4Code>,
21324	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21325	pub val2: Option<ProductType4Code>,
21326}
21327
21328impl CompareAssetClass1 {
21329	pub fn validate(&self) -> Result<(), ValidationError> {
21330		if let Some(ref val) = self.val1 { val.validate()? }
21331		if let Some(ref val) = self.val2 { val.validate()? }
21332		Ok(())
21333	}
21334}
21335
21336
21337// CompareBenchmarkCode1 ...
21338#[cfg_attr(feature = "derive_debug", derive(Debug))]
21339#[cfg_attr(feature = "derive_default", derive(Default))]
21340#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21341#[cfg_attr(feature = "derive_clone", derive(Clone))]
21342#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21343pub struct CompareBenchmarkCode1 {
21344	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21345	pub val1: Option<String>,
21346	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21347	pub val2: Option<String>,
21348}
21349
21350impl CompareBenchmarkCode1 {
21351	pub fn validate(&self) -> Result<(), ValidationError> {
21352		if let Some(ref val) = self.val1 {
21353			if val.chars().count() < 1 {
21354				return Err(ValidationError::new(1001, "val1 is shorter than the minimum length of 1".to_string()));
21355			}
21356			if val.chars().count() > 4 {
21357				return Err(ValidationError::new(1002, "val1 exceeds the maximum length of 4".to_string()));
21358			}
21359		}
21360		if let Some(ref val) = self.val2 {
21361			if val.chars().count() < 1 {
21362				return Err(ValidationError::new(1001, "val2 is shorter than the minimum length of 1".to_string()));
21363			}
21364			if val.chars().count() > 4 {
21365				return Err(ValidationError::new(1002, "val2 exceeds the maximum length of 4".to_string()));
21366			}
21367		}
21368		Ok(())
21369	}
21370}
21371
21372
21373// CompareBenchmarkCurveName3 ...
21374#[cfg_attr(feature = "derive_debug", derive(Debug))]
21375#[cfg_attr(feature = "derive_default", derive(Default))]
21376#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21377#[cfg_attr(feature = "derive_clone", derive(Clone))]
21378#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21379pub struct CompareBenchmarkCurveName3 {
21380	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21381	pub val1: Option<BenchmarkCurveName10Choice>,
21382	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21383	pub val2: Option<BenchmarkCurveName10Choice>,
21384}
21385
21386impl CompareBenchmarkCurveName3 {
21387	pub fn validate(&self) -> Result<(), ValidationError> {
21388		if let Some(ref val) = self.val1 { val.validate()? }
21389		if let Some(ref val) = self.val2 { val.validate()? }
21390		Ok(())
21391	}
21392}
21393
21394
21395// CompareCFIIdentifier3 ...
21396#[cfg_attr(feature = "derive_debug", derive(Debug))]
21397#[cfg_attr(feature = "derive_default", derive(Default))]
21398#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21399#[cfg_attr(feature = "derive_clone", derive(Clone))]
21400#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21401pub struct CompareCFIIdentifier3 {
21402	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21403	pub val1: Option<String>,
21404	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21405	pub val2: Option<String>,
21406}
21407
21408impl CompareCFIIdentifier3 {
21409	pub fn validate(&self) -> Result<(), ValidationError> {
21410		if let Some(ref val) = self.val1 {
21411			let pattern = Regex::new("[A-Z]{6,6}").unwrap();
21412			if !pattern.is_match(val) {
21413				return Err(ValidationError::new(1005, "val1 does not match the required pattern".to_string()));
21414			}
21415		}
21416		if let Some(ref val) = self.val2 {
21417			let pattern = Regex::new("[A-Z]{6,6}").unwrap();
21418			if !pattern.is_match(val) {
21419				return Err(ValidationError::new(1005, "val2 does not match the required pattern".to_string()));
21420			}
21421		}
21422		Ok(())
21423	}
21424}
21425
21426
21427// CompareClearingStatus3 ...
21428#[cfg_attr(feature = "derive_debug", derive(Debug))]
21429#[cfg_attr(feature = "derive_default", derive(Default))]
21430#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21431#[cfg_attr(feature = "derive_clone", derive(Clone))]
21432#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21433pub struct CompareClearingStatus3 {
21434	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21435	pub val1: Option<Cleared4Choice>,
21436	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21437	pub val2: Option<Cleared4Choice>,
21438}
21439
21440impl CompareClearingStatus3 {
21441	pub fn validate(&self) -> Result<(), ValidationError> {
21442		if let Some(ref val) = self.val1 { val.validate()? }
21443		if let Some(ref val) = self.val2 { val.validate()? }
21444		Ok(())
21445	}
21446}
21447
21448
21449// CompareCollateralQualityType3 ...
21450#[cfg_attr(feature = "derive_debug", derive(Debug))]
21451#[cfg_attr(feature = "derive_default", derive(Default))]
21452#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21453#[cfg_attr(feature = "derive_clone", derive(Clone))]
21454#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21455pub struct CompareCollateralQualityType3 {
21456	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21457	pub val1: Option<CollateralQualityType1Code>,
21458	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21459	pub val2: Option<CollateralQualityType1Code>,
21460}
21461
21462impl CompareCollateralQualityType3 {
21463	pub fn validate(&self) -> Result<(), ValidationError> {
21464		if let Some(ref val) = self.val1 { val.validate()? }
21465		if let Some(ref val) = self.val2 { val.validate()? }
21466		Ok(())
21467	}
21468}
21469
21470
21471// CompareCommodityAssetClass3 ...
21472#[cfg_attr(feature = "derive_debug", derive(Debug))]
21473#[cfg_attr(feature = "derive_default", derive(Default))]
21474#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21475#[cfg_attr(feature = "derive_clone", derive(Clone))]
21476#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21477pub struct CompareCommodityAssetClass3 {
21478	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21479	pub val1: Option<AssetClassCommodity5Choice>,
21480	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21481	pub val2: Option<AssetClassCommodity5Choice>,
21482}
21483
21484impl CompareCommodityAssetClass3 {
21485	pub fn validate(&self) -> Result<(), ValidationError> {
21486		if let Some(ref val) = self.val1 { val.validate()? }
21487		if let Some(ref val) = self.val2 { val.validate()? }
21488		Ok(())
21489	}
21490}
21491
21492
21493// CompareCommodityAssetClass4 ...
21494#[cfg_attr(feature = "derive_debug", derive(Debug))]
21495#[cfg_attr(feature = "derive_default", derive(Default))]
21496#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21497#[cfg_attr(feature = "derive_clone", derive(Clone))]
21498#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21499pub struct CompareCommodityAssetClass4 {
21500	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21501	pub val1: Option<AssetClassCommodity6Choice>,
21502	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21503	pub val2: Option<AssetClassCommodity6Choice>,
21504}
21505
21506impl CompareCommodityAssetClass4 {
21507	pub fn validate(&self) -> Result<(), ValidationError> {
21508		if let Some(ref val) = self.val1 { val.validate()? }
21509		if let Some(ref val) = self.val2 { val.validate()? }
21510		Ok(())
21511	}
21512}
21513
21514
21515// CompareCounterpartySide2 ...
21516#[cfg_attr(feature = "derive_debug", derive(Debug))]
21517#[cfg_attr(feature = "derive_default", derive(Default))]
21518#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21519#[cfg_attr(feature = "derive_clone", derive(Clone))]
21520#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21521pub struct CompareCounterpartySide2 {
21522	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21523	pub val1: Option<CollateralRole1Code>,
21524	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21525	pub val2: Option<CollateralRole1Code>,
21526}
21527
21528impl CompareCounterpartySide2 {
21529	pub fn validate(&self) -> Result<(), ValidationError> {
21530		if let Some(ref val) = self.val1 { val.validate()? }
21531		if let Some(ref val) = self.val2 { val.validate()? }
21532		Ok(())
21533	}
21534}
21535
21536
21537// CompareCountryCode3 ...
21538#[cfg_attr(feature = "derive_debug", derive(Debug))]
21539#[cfg_attr(feature = "derive_default", derive(Default))]
21540#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21541#[cfg_attr(feature = "derive_clone", derive(Clone))]
21542#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21543pub struct CompareCountryCode3 {
21544	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21545	pub val1: Option<String>,
21546	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21547	pub val2: Option<String>,
21548}
21549
21550impl CompareCountryCode3 {
21551	pub fn validate(&self) -> Result<(), ValidationError> {
21552		if let Some(ref val) = self.val1 {
21553			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
21554			if !pattern.is_match(val) {
21555				return Err(ValidationError::new(1005, "val1 does not match the required pattern".to_string()));
21556			}
21557		}
21558		if let Some(ref val) = self.val2 {
21559			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
21560			if !pattern.is_match(val) {
21561				return Err(ValidationError::new(1005, "val2 does not match the required pattern".to_string()));
21562			}
21563		}
21564		Ok(())
21565	}
21566}
21567
21568
21569// CompareDate3 ...
21570#[cfg_attr(feature = "derive_debug", derive(Debug))]
21571#[cfg_attr(feature = "derive_default", derive(Default))]
21572#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21573#[cfg_attr(feature = "derive_clone", derive(Clone))]
21574#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21575pub struct CompareDate3 {
21576	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21577	pub val1: Option<String>,
21578	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21579	pub val2: Option<String>,
21580}
21581
21582impl CompareDate3 {
21583	pub fn validate(&self) -> Result<(), ValidationError> {
21584		Ok(())
21585	}
21586}
21587
21588
21589// CompareDatePeriod2 ...
21590#[cfg_attr(feature = "derive_debug", derive(Debug))]
21591#[cfg_attr(feature = "derive_default", derive(Default))]
21592#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21593#[cfg_attr(feature = "derive_clone", derive(Clone))]
21594#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21595pub struct CompareDatePeriod2 {
21596	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21597	pub val1: Option<DatePeriod4>,
21598	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21599	pub val2: Option<DatePeriod4>,
21600}
21601
21602impl CompareDatePeriod2 {
21603	pub fn validate(&self) -> Result<(), ValidationError> {
21604		if let Some(ref val) = self.val1 { val.validate()? }
21605		if let Some(ref val) = self.val2 { val.validate()? }
21606		Ok(())
21607	}
21608}
21609
21610
21611// CompareDateTime3 ...
21612#[cfg_attr(feature = "derive_debug", derive(Debug))]
21613#[cfg_attr(feature = "derive_default", derive(Default))]
21614#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21615#[cfg_attr(feature = "derive_clone", derive(Clone))]
21616#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21617pub struct CompareDateTime3 {
21618	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21619	pub val1: Option<String>,
21620	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21621	pub val2: Option<String>,
21622}
21623
21624impl CompareDateTime3 {
21625	pub fn validate(&self) -> Result<(), ValidationError> {
21626		Ok(())
21627	}
21628}
21629
21630
21631// CompareDayCount1 ...
21632#[cfg_attr(feature = "derive_debug", derive(Debug))]
21633#[cfg_attr(feature = "derive_default", derive(Default))]
21634#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21635#[cfg_attr(feature = "derive_clone", derive(Clone))]
21636#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21637pub struct CompareDayCount1 {
21638	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21639	pub val1: Option<InterestComputationMethodFormat7>,
21640	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21641	pub val2: Option<InterestComputationMethodFormat7>,
21642}
21643
21644impl CompareDayCount1 {
21645	pub fn validate(&self) -> Result<(), ValidationError> {
21646		if let Some(ref val) = self.val1 { val.validate()? }
21647		if let Some(ref val) = self.val2 { val.validate()? }
21648		Ok(())
21649	}
21650}
21651
21652
21653// CompareDecimalNumber3 ...
21654#[cfg_attr(feature = "derive_debug", derive(Debug))]
21655#[cfg_attr(feature = "derive_default", derive(Default))]
21656#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21657#[cfg_attr(feature = "derive_clone", derive(Clone))]
21658#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21659pub struct CompareDecimalNumber3 {
21660	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21661	pub val1: Option<f64>,
21662	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21663	pub val2: Option<f64>,
21664}
21665
21666impl CompareDecimalNumber3 {
21667	pub fn validate(&self) -> Result<(), ValidationError> {
21668		Ok(())
21669	}
21670}
21671
21672
21673// CompareDeliveryInterconnectionPoint1 ...
21674#[cfg_attr(feature = "derive_debug", derive(Debug))]
21675#[cfg_attr(feature = "derive_default", derive(Default))]
21676#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21677#[cfg_attr(feature = "derive_clone", derive(Clone))]
21678#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21679pub struct CompareDeliveryInterconnectionPoint1 {
21680	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21681	pub val1: Option<DeliveryInterconnectionPoint1Choice>,
21682	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21683	pub val2: Option<DeliveryInterconnectionPoint1Choice>,
21684}
21685
21686impl CompareDeliveryInterconnectionPoint1 {
21687	pub fn validate(&self) -> Result<(), ValidationError> {
21688		if let Some(ref val) = self.val1 { val.validate()? }
21689		if let Some(ref val) = self.val2 { val.validate()? }
21690		Ok(())
21691	}
21692}
21693
21694
21695// CompareDeliveryMethod3 ...
21696#[cfg_attr(feature = "derive_debug", derive(Debug))]
21697#[cfg_attr(feature = "derive_default", derive(Default))]
21698#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21699#[cfg_attr(feature = "derive_clone", derive(Clone))]
21700#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21701pub struct CompareDeliveryMethod3 {
21702	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21703	pub val1: Option<CollateralDeliveryMethod1Code>,
21704	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21705	pub val2: Option<CollateralDeliveryMethod1Code>,
21706}
21707
21708impl CompareDeliveryMethod3 {
21709	pub fn validate(&self) -> Result<(), ValidationError> {
21710		if let Some(ref val) = self.val1 { val.validate()? }
21711		if let Some(ref val) = self.val2 { val.validate()? }
21712		Ok(())
21713	}
21714}
21715
21716
21717// CompareDeliveryType1 ...
21718#[cfg_attr(feature = "derive_debug", derive(Debug))]
21719#[cfg_attr(feature = "derive_default", derive(Default))]
21720#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21721#[cfg_attr(feature = "derive_clone", derive(Clone))]
21722#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21723pub struct CompareDeliveryType1 {
21724	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21725	pub val1: Option<PhysicalTransferType4Code>,
21726	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21727	pub val2: Option<PhysicalTransferType4Code>,
21728}
21729
21730impl CompareDeliveryType1 {
21731	pub fn validate(&self) -> Result<(), ValidationError> {
21732		if let Some(ref val) = self.val1 { val.validate()? }
21733		if let Some(ref val) = self.val2 { val.validate()? }
21734		Ok(())
21735	}
21736}
21737
21738
21739// CompareDerivativeEvent1 ...
21740#[cfg_attr(feature = "derive_debug", derive(Debug))]
21741#[cfg_attr(feature = "derive_default", derive(Default))]
21742#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21743#[cfg_attr(feature = "derive_clone", derive(Clone))]
21744#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21745pub struct CompareDerivativeEvent1 {
21746	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21747	pub val1: Option<DerivativeEvent6>,
21748	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21749	pub val2: Option<DerivativeEvent6>,
21750}
21751
21752impl CompareDerivativeEvent1 {
21753	pub fn validate(&self) -> Result<(), ValidationError> {
21754		if let Some(ref val) = self.val1 { val.validate()? }
21755		if let Some(ref val) = self.val2 { val.validate()? }
21756		Ok(())
21757	}
21758}
21759
21760
21761// CompareDurationType1 ...
21762#[cfg_attr(feature = "derive_debug", derive(Debug))]
21763#[cfg_attr(feature = "derive_default", derive(Default))]
21764#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21765#[cfg_attr(feature = "derive_clone", derive(Clone))]
21766#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21767pub struct CompareDurationType1 {
21768	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21769	pub val1: Option<DurationType1Code>,
21770	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21771	pub val2: Option<DurationType1Code>,
21772}
21773
21774impl CompareDurationType1 {
21775	pub fn validate(&self) -> Result<(), ValidationError> {
21776		if let Some(ref val) = self.val1 { val.validate()? }
21777		if let Some(ref val) = self.val2 { val.validate()? }
21778		Ok(())
21779	}
21780}
21781
21782
21783// CompareEnergyDeliveryAttribute1 ...
21784#[cfg_attr(feature = "derive_debug", derive(Debug))]
21785#[cfg_attr(feature = "derive_default", derive(Default))]
21786#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21787#[cfg_attr(feature = "derive_clone", derive(Clone))]
21788#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21789pub struct CompareEnergyDeliveryAttribute1 {
21790	#[cfg_attr( feature = "derive_serde", serde(rename = "NrgyDlvryIntrvl", skip_serializing_if = "Option::is_none") )]
21791	pub nrgy_dlvry_intrvl: Option<Vec<CompareTimePeriod2>>,
21792	#[cfg_attr( feature = "derive_serde", serde(rename = "NrgyDt", skip_serializing_if = "Option::is_none") )]
21793	pub nrgy_dt: Option<CompareDatePeriod2>,
21794	#[cfg_attr( feature = "derive_serde", serde(rename = "NrgyDrtn", skip_serializing_if = "Option::is_none") )]
21795	pub nrgy_drtn: Option<CompareDurationType1>,
21796	#[cfg_attr( feature = "derive_serde", serde(rename = "NrgyWkDay", skip_serializing_if = "Option::is_none") )]
21797	pub nrgy_wk_day: Option<Vec<CompareWeekDay1>>,
21798	#[cfg_attr( feature = "derive_serde", serde(rename = "NrgyDlvryCpcty", skip_serializing_if = "Option::is_none") )]
21799	pub nrgy_dlvry_cpcty: Option<CompareLongFraction19DecimalNumber1>,
21800	#[cfg_attr( feature = "derive_serde", serde(rename = "NrgyQtyUnit", skip_serializing_if = "Option::is_none") )]
21801	pub nrgy_qty_unit: Option<CompareEnergyQuantityUnit1>,
21802	#[cfg_attr( feature = "derive_serde", serde(rename = "NrgyPricTmIntrvlQty", skip_serializing_if = "Option::is_none") )]
21803	pub nrgy_pric_tm_intrvl_qty: Option<CompareAmountAndDirection3>,
21804}
21805
21806impl CompareEnergyDeliveryAttribute1 {
21807	pub fn validate(&self) -> Result<(), ValidationError> {
21808		if let Some(ref vec) = self.nrgy_dlvry_intrvl { for item in vec { item.validate()? } }
21809		if let Some(ref val) = self.nrgy_dt { val.validate()? }
21810		if let Some(ref val) = self.nrgy_drtn { val.validate()? }
21811		if let Some(ref vec) = self.nrgy_wk_day { for item in vec { item.validate()? } }
21812		if let Some(ref val) = self.nrgy_dlvry_cpcty { val.validate()? }
21813		if let Some(ref val) = self.nrgy_qty_unit { val.validate()? }
21814		if let Some(ref val) = self.nrgy_pric_tm_intrvl_qty { val.validate()? }
21815		Ok(())
21816	}
21817}
21818
21819
21820// CompareEnergyLoadType1 ...
21821#[cfg_attr(feature = "derive_debug", derive(Debug))]
21822#[cfg_attr(feature = "derive_default", derive(Default))]
21823#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21824#[cfg_attr(feature = "derive_clone", derive(Clone))]
21825#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21826pub struct CompareEnergyLoadType1 {
21827	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21828	pub val1: Option<EnergyLoadType1Code>,
21829	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21830	pub val2: Option<EnergyLoadType1Code>,
21831}
21832
21833impl CompareEnergyLoadType1 {
21834	pub fn validate(&self) -> Result<(), ValidationError> {
21835		if let Some(ref val) = self.val1 { val.validate()? }
21836		if let Some(ref val) = self.val2 { val.validate()? }
21837		Ok(())
21838	}
21839}
21840
21841
21842// CompareEnergyQuantityUnit1 ...
21843#[cfg_attr(feature = "derive_debug", derive(Debug))]
21844#[cfg_attr(feature = "derive_default", derive(Default))]
21845#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21846#[cfg_attr(feature = "derive_clone", derive(Clone))]
21847#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21848pub struct CompareEnergyQuantityUnit1 {
21849	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21850	pub val1: Option<EnergyQuantityUnit2Choice>,
21851	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21852	pub val2: Option<EnergyQuantityUnit2Choice>,
21853}
21854
21855impl CompareEnergyQuantityUnit1 {
21856	pub fn validate(&self) -> Result<(), ValidationError> {
21857		if let Some(ref val) = self.val1 { val.validate()? }
21858		if let Some(ref val) = self.val2 { val.validate()? }
21859		Ok(())
21860	}
21861}
21862
21863
21864// CompareExchangeRate1 ...
21865#[cfg_attr(feature = "derive_debug", derive(Debug))]
21866#[cfg_attr(feature = "derive_default", derive(Default))]
21867#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21868#[cfg_attr(feature = "derive_clone", derive(Clone))]
21869#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21870pub struct CompareExchangeRate1 {
21871	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21872	pub val1: Option<f64>,
21873	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21874	pub val2: Option<f64>,
21875}
21876
21877impl CompareExchangeRate1 {
21878	pub fn validate(&self) -> Result<(), ValidationError> {
21879		Ok(())
21880	}
21881}
21882
21883
21884// CompareExchangeRateBasis1 ...
21885#[cfg_attr(feature = "derive_debug", derive(Debug))]
21886#[cfg_attr(feature = "derive_default", derive(Default))]
21887#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21888#[cfg_attr(feature = "derive_clone", derive(Clone))]
21889#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21890pub struct CompareExchangeRateBasis1 {
21891	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21892	pub val1: Option<ExchangeRateBasis1Choice>,
21893	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21894	pub val2: Option<ExchangeRateBasis1Choice>,
21895}
21896
21897impl CompareExchangeRateBasis1 {
21898	pub fn validate(&self) -> Result<(), ValidationError> {
21899		if let Some(ref val) = self.val1 { val.validate()? }
21900		if let Some(ref val) = self.val2 { val.validate()? }
21901		Ok(())
21902	}
21903}
21904
21905
21906// CompareExposureType3 ...
21907#[cfg_attr(feature = "derive_debug", derive(Debug))]
21908#[cfg_attr(feature = "derive_default", derive(Default))]
21909#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21910#[cfg_attr(feature = "derive_clone", derive(Clone))]
21911#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21912pub struct CompareExposureType3 {
21913	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21914	pub val1: Option<ExposureType10Code>,
21915	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21916	pub val2: Option<ExposureType10Code>,
21917}
21918
21919impl CompareExposureType3 {
21920	pub fn validate(&self) -> Result<(), ValidationError> {
21921		if let Some(ref val) = self.val1 { val.validate()? }
21922		if let Some(ref val) = self.val2 { val.validate()? }
21923		Ok(())
21924	}
21925}
21926
21927
21928// CompareFinancialInstrumentContractType1 ...
21929#[cfg_attr(feature = "derive_debug", derive(Debug))]
21930#[cfg_attr(feature = "derive_default", derive(Default))]
21931#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21932#[cfg_attr(feature = "derive_clone", derive(Clone))]
21933#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21934pub struct CompareFinancialInstrumentContractType1 {
21935	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21936	pub val1: Option<FinancialInstrumentContractType2Code>,
21937	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21938	pub val2: Option<FinancialInstrumentContractType2Code>,
21939}
21940
21941impl CompareFinancialInstrumentContractType1 {
21942	pub fn validate(&self) -> Result<(), ValidationError> {
21943		if let Some(ref val) = self.val1 { val.validate()? }
21944		if let Some(ref val) = self.val2 { val.validate()? }
21945		Ok(())
21946	}
21947}
21948
21949
21950// CompareFrequencyUnit1 ...
21951#[cfg_attr(feature = "derive_debug", derive(Debug))]
21952#[cfg_attr(feature = "derive_default", derive(Default))]
21953#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21954#[cfg_attr(feature = "derive_clone", derive(Clone))]
21955#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21956pub struct CompareFrequencyUnit1 {
21957	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21958	pub val1: Option<Frequency13Code>,
21959	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21960	pub val2: Option<Frequency13Code>,
21961}
21962
21963impl CompareFrequencyUnit1 {
21964	pub fn validate(&self) -> Result<(), ValidationError> {
21965		if let Some(ref val) = self.val1 { val.validate()? }
21966		if let Some(ref val) = self.val2 { val.validate()? }
21967		Ok(())
21968	}
21969}
21970
21971
21972// CompareISINIdentifier2 ...
21973#[cfg_attr(feature = "derive_debug", derive(Debug))]
21974#[cfg_attr(feature = "derive_default", derive(Default))]
21975#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
21976#[cfg_attr(feature = "derive_clone", derive(Clone))]
21977#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
21978pub struct CompareISINIdentifier2 {
21979	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
21980	pub val1: Option<String>,
21981	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
21982	pub val2: Option<String>,
21983}
21984
21985impl CompareISINIdentifier2 {
21986	pub fn validate(&self) -> Result<(), ValidationError> {
21987		if let Some(ref val) = self.val1 {
21988			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
21989			if !pattern.is_match(val) {
21990				return Err(ValidationError::new(1005, "val1 does not match the required pattern".to_string()));
21991			}
21992		}
21993		if let Some(ref val) = self.val2 {
21994			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
21995			if !pattern.is_match(val) {
21996				return Err(ValidationError::new(1005, "val2 does not match the required pattern".to_string()));
21997			}
21998		}
21999		Ok(())
22000	}
22001}
22002
22003
22004// CompareISINIdentifier4 ...
22005#[cfg_attr(feature = "derive_debug", derive(Debug))]
22006#[cfg_attr(feature = "derive_default", derive(Default))]
22007#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22008#[cfg_attr(feature = "derive_clone", derive(Clone))]
22009#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22010pub struct CompareISINIdentifier4 {
22011	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22012	pub val1: Option<String>,
22013	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22014	pub val2: Option<String>,
22015}
22016
22017impl CompareISINIdentifier4 {
22018	pub fn validate(&self) -> Result<(), ValidationError> {
22019		if let Some(ref val) = self.val1 {
22020			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
22021			if !pattern.is_match(val) {
22022				return Err(ValidationError::new(1005, "val1 does not match the required pattern".to_string()));
22023			}
22024		}
22025		if let Some(ref val) = self.val2 {
22026			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
22027			if !pattern.is_match(val) {
22028				return Err(ValidationError::new(1005, "val2 does not match the required pattern".to_string()));
22029			}
22030		}
22031		Ok(())
22032	}
22033}
22034
22035
22036// CompareInterestComputationMethod3 ...
22037#[cfg_attr(feature = "derive_debug", derive(Debug))]
22038#[cfg_attr(feature = "derive_default", derive(Default))]
22039#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22040#[cfg_attr(feature = "derive_clone", derive(Clone))]
22041#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22042pub struct CompareInterestComputationMethod3 {
22043	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22044	pub val1: Option<InterestComputationMethodFormat6Choice>,
22045	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22046	pub val2: Option<InterestComputationMethodFormat6Choice>,
22047}
22048
22049impl CompareInterestComputationMethod3 {
22050	pub fn validate(&self) -> Result<(), ValidationError> {
22051		if let Some(ref val) = self.val1 { val.validate()? }
22052		if let Some(ref val) = self.val2 { val.validate()? }
22053		Ok(())
22054	}
22055}
22056
22057
22058// CompareInterestRate1 ...
22059#[cfg_attr(feature = "derive_debug", derive(Debug))]
22060#[cfg_attr(feature = "derive_default", derive(Default))]
22061#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22062#[cfg_attr(feature = "derive_clone", derive(Clone))]
22063#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22064pub struct CompareInterestRate1 {
22065	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnLnAmt", skip_serializing_if = "Option::is_none") )]
22066	pub mrgn_ln_amt: Option<CompareAmountAndDirection1>,
22067	#[cfg_attr( feature = "derive_serde", serde(rename = "FxdIntrstRate", skip_serializing_if = "Option::is_none") )]
22068	pub fxd_intrst_rate: Option<ComparePercentageRate3>,
22069	#[cfg_attr( feature = "derive_serde", serde(rename = "DayCntBsis", skip_serializing_if = "Option::is_none") )]
22070	pub day_cnt_bsis: Option<CompareInterestComputationMethod3>,
22071	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgIntrstRefRate", skip_serializing_if = "Option::is_none") )]
22072	pub fltg_intrst_ref_rate: Option<CompareBenchmarkCurveName3>,
22073	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgIntrstRateTermUnit", skip_serializing_if = "Option::is_none") )]
22074	pub fltg_intrst_rate_term_unit: Option<CompareRateBasis3>,
22075	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgIntrstRateTermVal", skip_serializing_if = "Option::is_none") )]
22076	pub fltg_intrst_rate_term_val: Option<CompareNumber5>,
22077	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgIntrstRatePmtFrqcyUnit", skip_serializing_if = "Option::is_none") )]
22078	pub fltg_intrst_rate_pmt_frqcy_unit: Option<CompareRateBasis3>,
22079	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgIntrstRatePmtFrqcyVal", skip_serializing_if = "Option::is_none") )]
22080	pub fltg_intrst_rate_pmt_frqcy_val: Option<CompareNumber5>,
22081	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgIntrstRateRstFrqcyUnit", skip_serializing_if = "Option::is_none") )]
22082	pub fltg_intrst_rate_rst_frqcy_unit: Option<CompareRateBasis3>,
22083	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgIntrstRateRstFrqcyVal", skip_serializing_if = "Option::is_none") )]
22084	pub fltg_intrst_rate_rst_frqcy_val: Option<CompareNumber6>,
22085	#[cfg_attr( feature = "derive_serde", serde(rename = "BsisPtSprd", skip_serializing_if = "Option::is_none") )]
22086	pub bsis_pt_sprd: Option<CompareDecimalNumber3>,
22087}
22088
22089impl CompareInterestRate1 {
22090	pub fn validate(&self) -> Result<(), ValidationError> {
22091		if let Some(ref val) = self.mrgn_ln_amt { val.validate()? }
22092		if let Some(ref val) = self.fxd_intrst_rate { val.validate()? }
22093		if let Some(ref val) = self.day_cnt_bsis { val.validate()? }
22094		if let Some(ref val) = self.fltg_intrst_ref_rate { val.validate()? }
22095		if let Some(ref val) = self.fltg_intrst_rate_term_unit { val.validate()? }
22096		if let Some(ref val) = self.fltg_intrst_rate_term_val { val.validate()? }
22097		if let Some(ref val) = self.fltg_intrst_rate_pmt_frqcy_unit { val.validate()? }
22098		if let Some(ref val) = self.fltg_intrst_rate_pmt_frqcy_val { val.validate()? }
22099		if let Some(ref val) = self.fltg_intrst_rate_rst_frqcy_unit { val.validate()? }
22100		if let Some(ref val) = self.fltg_intrst_rate_rst_frqcy_val { val.validate()? }
22101		if let Some(ref val) = self.bsis_pt_sprd { val.validate()? }
22102		Ok(())
22103	}
22104}
22105
22106
22107// CompareLegDirection2 ...
22108#[cfg_attr(feature = "derive_debug", derive(Debug))]
22109#[cfg_attr(feature = "derive_default", derive(Default))]
22110#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22111#[cfg_attr(feature = "derive_clone", derive(Clone))]
22112#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22113pub struct CompareLegDirection2 {
22114	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22115	pub val1: Option<Direction4Choice>,
22116	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22117	pub val2: Option<Direction4Choice>,
22118}
22119
22120impl CompareLegDirection2 {
22121	pub fn validate(&self) -> Result<(), ValidationError> {
22122		if let Some(ref val) = self.val1 { val.validate()? }
22123		if let Some(ref val) = self.val2 { val.validate()? }
22124		Ok(())
22125	}
22126}
22127
22128
22129// CompareLongFraction19DecimalNumber1 ...
22130#[cfg_attr(feature = "derive_debug", derive(Debug))]
22131#[cfg_attr(feature = "derive_default", derive(Default))]
22132#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22133#[cfg_attr(feature = "derive_clone", derive(Clone))]
22134#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22135pub struct CompareLongFraction19DecimalNumber1 {
22136	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22137	pub val1: Option<f64>,
22138	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22139	pub val2: Option<f64>,
22140}
22141
22142impl CompareLongFraction19DecimalNumber1 {
22143	pub fn validate(&self) -> Result<(), ValidationError> {
22144		Ok(())
22145	}
22146}
22147
22148
22149// CompareMICIdentifier3 ...
22150#[cfg_attr(feature = "derive_debug", derive(Debug))]
22151#[cfg_attr(feature = "derive_default", derive(Default))]
22152#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22153#[cfg_attr(feature = "derive_clone", derive(Clone))]
22154#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22155pub struct CompareMICIdentifier3 {
22156	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22157	pub val1: Option<String>,
22158	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22159	pub val2: Option<String>,
22160}
22161
22162impl CompareMICIdentifier3 {
22163	pub fn validate(&self) -> Result<(), ValidationError> {
22164		if let Some(ref val) = self.val1 {
22165			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
22166			if !pattern.is_match(val) {
22167				return Err(ValidationError::new(1005, "val1 does not match the required pattern".to_string()));
22168			}
22169		}
22170		if let Some(ref val) = self.val2 {
22171			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
22172			if !pattern.is_match(val) {
22173				return Err(ValidationError::new(1005, "val2 does not match the required pattern".to_string()));
22174			}
22175		}
22176		Ok(())
22177	}
22178}
22179
22180
22181// CompareMasterAgreementType1 ...
22182#[cfg_attr(feature = "derive_debug", derive(Debug))]
22183#[cfg_attr(feature = "derive_default", derive(Default))]
22184#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22185#[cfg_attr(feature = "derive_clone", derive(Clone))]
22186#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22187pub struct CompareMasterAgreementType1 {
22188	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22189	pub val1: Option<AgreementType2Choice>,
22190	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22191	pub val2: Option<AgreementType2Choice>,
22192}
22193
22194impl CompareMasterAgreementType1 {
22195	pub fn validate(&self) -> Result<(), ValidationError> {
22196		if let Some(ref val) = self.val1 { val.validate()? }
22197		if let Some(ref val) = self.val2 { val.validate()? }
22198		Ok(())
22199	}
22200}
22201
22202
22203// CompareMax350Text1 ...
22204#[cfg_attr(feature = "derive_debug", derive(Debug))]
22205#[cfg_attr(feature = "derive_default", derive(Default))]
22206#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22207#[cfg_attr(feature = "derive_clone", derive(Clone))]
22208#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22209pub struct CompareMax350Text1 {
22210	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22211	pub val1: Option<String>,
22212	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22213	pub val2: Option<String>,
22214}
22215
22216impl CompareMax350Text1 {
22217	pub fn validate(&self) -> Result<(), ValidationError> {
22218		if let Some(ref val) = self.val1 {
22219			if val.chars().count() < 1 {
22220				return Err(ValidationError::new(1001, "val1 is shorter than the minimum length of 1".to_string()));
22221			}
22222			if val.chars().count() > 350 {
22223				return Err(ValidationError::new(1002, "val1 exceeds the maximum length of 350".to_string()));
22224			}
22225		}
22226		if let Some(ref val) = self.val2 {
22227			if val.chars().count() < 1 {
22228				return Err(ValidationError::new(1001, "val2 is shorter than the minimum length of 1".to_string()));
22229			}
22230			if val.chars().count() > 350 {
22231				return Err(ValidationError::new(1002, "val2 exceeds the maximum length of 350".to_string()));
22232			}
22233		}
22234		Ok(())
22235	}
22236}
22237
22238
22239// CompareMax50Text1 ...
22240#[cfg_attr(feature = "derive_debug", derive(Debug))]
22241#[cfg_attr(feature = "derive_default", derive(Default))]
22242#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22243#[cfg_attr(feature = "derive_clone", derive(Clone))]
22244#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22245pub struct CompareMax50Text1 {
22246	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22247	pub val1: Option<String>,
22248	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22249	pub val2: Option<String>,
22250}
22251
22252impl CompareMax50Text1 {
22253	pub fn validate(&self) -> Result<(), ValidationError> {
22254		if let Some(ref val) = self.val1 {
22255			if val.chars().count() < 1 {
22256				return Err(ValidationError::new(1001, "val1 is shorter than the minimum length of 1".to_string()));
22257			}
22258			if val.chars().count() > 50 {
22259				return Err(ValidationError::new(1002, "val1 exceeds the maximum length of 50".to_string()));
22260			}
22261		}
22262		if let Some(ref val) = self.val2 {
22263			if val.chars().count() < 1 {
22264				return Err(ValidationError::new(1001, "val2 is shorter than the minimum length of 1".to_string()));
22265			}
22266			if val.chars().count() > 50 {
22267				return Err(ValidationError::new(1002, "val2 exceeds the maximum length of 50".to_string()));
22268			}
22269		}
22270		Ok(())
22271	}
22272}
22273
22274
22275// CompareNumber5 ...
22276#[cfg_attr(feature = "derive_debug", derive(Debug))]
22277#[cfg_attr(feature = "derive_default", derive(Default))]
22278#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22279#[cfg_attr(feature = "derive_clone", derive(Clone))]
22280#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22281pub struct CompareNumber5 {
22282	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22283	pub val1: Option<f64>,
22284	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22285	pub val2: Option<f64>,
22286}
22287
22288impl CompareNumber5 {
22289	pub fn validate(&self) -> Result<(), ValidationError> {
22290		Ok(())
22291	}
22292}
22293
22294
22295// CompareNumber6 ...
22296#[cfg_attr(feature = "derive_debug", derive(Debug))]
22297#[cfg_attr(feature = "derive_default", derive(Default))]
22298#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22299#[cfg_attr(feature = "derive_clone", derive(Clone))]
22300#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22301pub struct CompareNumber6 {
22302	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22303	pub val1: Option<f64>,
22304	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22305	pub val2: Option<f64>,
22306}
22307
22308impl CompareNumber6 {
22309	pub fn validate(&self) -> Result<(), ValidationError> {
22310		Ok(())
22311	}
22312}
22313
22314
22315// CompareNumber7 ...
22316#[cfg_attr(feature = "derive_debug", derive(Debug))]
22317#[cfg_attr(feature = "derive_default", derive(Default))]
22318#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22319#[cfg_attr(feature = "derive_clone", derive(Clone))]
22320#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22321pub struct CompareNumber7 {
22322	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22323	pub val1: Option<f64>,
22324	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22325	pub val2: Option<f64>,
22326}
22327
22328impl CompareNumber7 {
22329	pub fn validate(&self) -> Result<(), ValidationError> {
22330		Ok(())
22331	}
22332}
22333
22334
22335// CompareOptionStyle1 ...
22336#[cfg_attr(feature = "derive_debug", derive(Debug))]
22337#[cfg_attr(feature = "derive_default", derive(Default))]
22338#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22339#[cfg_attr(feature = "derive_clone", derive(Clone))]
22340#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22341pub struct CompareOptionStyle1 {
22342	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22343	pub val1: Option<OptionStyle6Code>,
22344	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22345	pub val2: Option<OptionStyle6Code>,
22346}
22347
22348impl CompareOptionStyle1 {
22349	pub fn validate(&self) -> Result<(), ValidationError> {
22350		if let Some(ref val) = self.val1 { val.validate()? }
22351		if let Some(ref val) = self.val2 { val.validate()? }
22352		Ok(())
22353	}
22354}
22355
22356
22357// CompareOptionType1 ...
22358#[cfg_attr(feature = "derive_debug", derive(Debug))]
22359#[cfg_attr(feature = "derive_default", derive(Default))]
22360#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22361#[cfg_attr(feature = "derive_clone", derive(Clone))]
22362#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22363pub struct CompareOptionType1 {
22364	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22365	pub val1: Option<OptionType2Code>,
22366	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22367	pub val2: Option<OptionType2Code>,
22368}
22369
22370impl CompareOptionType1 {
22371	pub fn validate(&self) -> Result<(), ValidationError> {
22372		if let Some(ref val) = self.val1 { val.validate()? }
22373		if let Some(ref val) = self.val2 { val.validate()? }
22374		Ok(())
22375	}
22376}
22377
22378
22379// CompareOrganisationIdentification6 ...
22380#[cfg_attr(feature = "derive_debug", derive(Debug))]
22381#[cfg_attr(feature = "derive_default", derive(Default))]
22382#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22383#[cfg_attr(feature = "derive_clone", derive(Clone))]
22384#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22385pub struct CompareOrganisationIdentification6 {
22386	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22387	pub val1: Option<OrganisationIdentification15Choice>,
22388	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22389	pub val2: Option<OrganisationIdentification15Choice>,
22390}
22391
22392impl CompareOrganisationIdentification6 {
22393	pub fn validate(&self) -> Result<(), ValidationError> {
22394		if let Some(ref val) = self.val1 { val.validate()? }
22395		if let Some(ref val) = self.val2 { val.validate()? }
22396		Ok(())
22397	}
22398}
22399
22400
22401// CompareOrganisationIdentification7 ...
22402#[cfg_attr(feature = "derive_debug", derive(Debug))]
22403#[cfg_attr(feature = "derive_default", derive(Default))]
22404#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22405#[cfg_attr(feature = "derive_clone", derive(Clone))]
22406#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22407pub struct CompareOrganisationIdentification7 {
22408	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22409	pub val1: Option<PartyIdentification236Choice>,
22410	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22411	pub val2: Option<PartyIdentification236Choice>,
22412}
22413
22414impl CompareOrganisationIdentification7 {
22415	pub fn validate(&self) -> Result<(), ValidationError> {
22416		if let Some(ref val) = self.val1 { val.validate()? }
22417		if let Some(ref val) = self.val2 { val.validate()? }
22418		Ok(())
22419	}
22420}
22421
22422
22423// CompareOtherPayment1 ...
22424#[cfg_attr(feature = "derive_debug", derive(Debug))]
22425#[cfg_attr(feature = "derive_default", derive(Default))]
22426#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22427#[cfg_attr(feature = "derive_clone", derive(Clone))]
22428#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22429pub struct CompareOtherPayment1 {
22430	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPmtTp", skip_serializing_if = "Option::is_none") )]
22431	pub othr_pmt_tp: Option<CompareOtherPaymentType1>,
22432	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPmtAmt", skip_serializing_if = "Option::is_none") )]
22433	pub othr_pmt_amt: Option<CompareAmountAndDirection3>,
22434	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPmtDt", skip_serializing_if = "Option::is_none") )]
22435	pub othr_pmt_dt: Option<CompareDate3>,
22436	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPmtPyer", skip_serializing_if = "Option::is_none") )]
22437	pub othr_pmt_pyer: Option<CompareOrganisationIdentification7>,
22438	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPmtRcvr", skip_serializing_if = "Option::is_none") )]
22439	pub othr_pmt_rcvr: Option<CompareOrganisationIdentification7>,
22440}
22441
22442impl CompareOtherPayment1 {
22443	pub fn validate(&self) -> Result<(), ValidationError> {
22444		if let Some(ref val) = self.othr_pmt_tp { val.validate()? }
22445		if let Some(ref val) = self.othr_pmt_amt { val.validate()? }
22446		if let Some(ref val) = self.othr_pmt_dt { val.validate()? }
22447		if let Some(ref val) = self.othr_pmt_pyer { val.validate()? }
22448		if let Some(ref val) = self.othr_pmt_rcvr { val.validate()? }
22449		Ok(())
22450	}
22451}
22452
22453
22454// CompareOtherPaymentType1 ...
22455#[cfg_attr(feature = "derive_debug", derive(Debug))]
22456#[cfg_attr(feature = "derive_default", derive(Default))]
22457#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22458#[cfg_attr(feature = "derive_clone", derive(Clone))]
22459#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22460pub struct CompareOtherPaymentType1 {
22461	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22462	pub val1: Option<PaymentType5Choice>,
22463	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22464	pub val2: Option<PaymentType5Choice>,
22465}
22466
22467impl CompareOtherPaymentType1 {
22468	pub fn validate(&self) -> Result<(), ValidationError> {
22469		if let Some(ref val) = self.val1 { val.validate()? }
22470		if let Some(ref val) = self.val2 { val.validate()? }
22471		Ok(())
22472	}
22473}
22474
22475
22476// ComparePercentageRate3 ...
22477#[cfg_attr(feature = "derive_debug", derive(Debug))]
22478#[cfg_attr(feature = "derive_default", derive(Default))]
22479#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22480#[cfg_attr(feature = "derive_clone", derive(Clone))]
22481#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22482pub struct ComparePercentageRate3 {
22483	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22484	pub val1: Option<f64>,
22485	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22486	pub val2: Option<f64>,
22487}
22488
22489impl ComparePercentageRate3 {
22490	pub fn validate(&self) -> Result<(), ValidationError> {
22491		Ok(())
22492	}
22493}
22494
22495
22496// ComparePostTradeRiskReduction2 ...
22497#[cfg_attr(feature = "derive_debug", derive(Debug))]
22498#[cfg_attr(feature = "derive_default", derive(Default))]
22499#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22500#[cfg_attr(feature = "derive_clone", derive(Clone))]
22501#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22502pub struct ComparePostTradeRiskReduction2 {
22503	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22504	pub val1: Option<PTRREvent3>,
22505	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22506	pub val2: Option<PTRREvent3>,
22507}
22508
22509impl ComparePostTradeRiskReduction2 {
22510	pub fn validate(&self) -> Result<(), ValidationError> {
22511		if let Some(ref val) = self.val1 { val.validate()? }
22512		if let Some(ref val) = self.val2 { val.validate()? }
22513		Ok(())
22514	}
22515}
22516
22517
22518// CompareRateBasis3 ...
22519#[cfg_attr(feature = "derive_debug", derive(Debug))]
22520#[cfg_attr(feature = "derive_default", derive(Default))]
22521#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22522#[cfg_attr(feature = "derive_clone", derive(Clone))]
22523#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22524pub struct CompareRateBasis3 {
22525	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22526	pub val1: Option<RateBasis1Code>,
22527	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22528	pub val2: Option<RateBasis1Code>,
22529}
22530
22531impl CompareRateBasis3 {
22532	pub fn validate(&self) -> Result<(), ValidationError> {
22533		if let Some(ref val) = self.val1 { val.validate()? }
22534		if let Some(ref val) = self.val2 { val.validate()? }
22535		Ok(())
22536	}
22537}
22538
22539
22540// CompareReferenceParty1 ...
22541#[cfg_attr(feature = "derive_debug", derive(Debug))]
22542#[cfg_attr(feature = "derive_default", derive(Default))]
22543#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22544#[cfg_attr(feature = "derive_clone", derive(Clone))]
22545#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22546pub struct CompareReferenceParty1 {
22547	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22548	pub val1: Option<DerivativePartyIdentification1Choice>,
22549	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22550	pub val2: Option<DerivativePartyIdentification1Choice>,
22551}
22552
22553impl CompareReferenceParty1 {
22554	pub fn validate(&self) -> Result<(), ValidationError> {
22555		if let Some(ref val) = self.val1 { val.validate()? }
22556		if let Some(ref val) = self.val2 { val.validate()? }
22557		Ok(())
22558	}
22559}
22560
22561
22562// CompareReportingLevelType2 ...
22563#[cfg_attr(feature = "derive_debug", derive(Debug))]
22564#[cfg_attr(feature = "derive_default", derive(Default))]
22565#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22566#[cfg_attr(feature = "derive_clone", derive(Clone))]
22567#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22568pub struct CompareReportingLevelType2 {
22569	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22570	pub val1: Option<ModificationLevel1Code>,
22571	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22572	pub val2: Option<ModificationLevel1Code>,
22573}
22574
22575impl CompareReportingLevelType2 {
22576	pub fn validate(&self) -> Result<(), ValidationError> {
22577		if let Some(ref val) = self.val1 { val.validate()? }
22578		if let Some(ref val) = self.val2 { val.validate()? }
22579		Ok(())
22580	}
22581}
22582
22583
22584// CompareReportingLevelType3 ...
22585#[cfg_attr(feature = "derive_debug", derive(Debug))]
22586#[cfg_attr(feature = "derive_default", derive(Default))]
22587#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22588#[cfg_attr(feature = "derive_clone", derive(Clone))]
22589#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22590pub struct CompareReportingLevelType3 {
22591	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22592	pub val1: Option<ModificationLevel1Code>,
22593	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22594	pub val2: Option<ModificationLevel1Code>,
22595}
22596
22597impl CompareReportingLevelType3 {
22598	pub fn validate(&self) -> Result<(), ValidationError> {
22599		if let Some(ref val) = self.val1 { val.validate()? }
22600		if let Some(ref val) = self.val2 { val.validate()? }
22601		Ok(())
22602	}
22603}
22604
22605
22606// CompareSecuritiesLendingType3 ...
22607#[cfg_attr(feature = "derive_debug", derive(Debug))]
22608#[cfg_attr(feature = "derive_default", derive(Default))]
22609#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22610#[cfg_attr(feature = "derive_clone", derive(Clone))]
22611#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22612pub struct CompareSecuritiesLendingType3 {
22613	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22614	pub val1: Option<SecuritiesLendingType3Choice>,
22615	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22616	pub val2: Option<SecuritiesLendingType3Choice>,
22617}
22618
22619impl CompareSecuritiesLendingType3 {
22620	pub fn validate(&self) -> Result<(), ValidationError> {
22621		if let Some(ref val) = self.val1 { val.validate()? }
22622		if let Some(ref val) = self.val2 { val.validate()? }
22623		Ok(())
22624	}
22625}
22626
22627
22628// CompareSecurityIdentification4 ...
22629#[cfg_attr(feature = "derive_debug", derive(Debug))]
22630#[cfg_attr(feature = "derive_default", derive(Default))]
22631#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22632#[cfg_attr(feature = "derive_clone", derive(Clone))]
22633#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22634pub struct CompareSecurityIdentification4 {
22635	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22636	pub val1: Option<SecurityIdentification26Choice>,
22637	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22638	pub val2: Option<SecurityIdentification26Choice>,
22639}
22640
22641impl CompareSecurityIdentification4 {
22642	pub fn validate(&self) -> Result<(), ValidationError> {
22643		if let Some(ref val) = self.val1 { val.validate()? }
22644		if let Some(ref val) = self.val2 { val.validate()? }
22645		Ok(())
22646	}
22647}
22648
22649
22650// CompareSeniorityType1 ...
22651#[cfg_attr(feature = "derive_debug", derive(Debug))]
22652#[cfg_attr(feature = "derive_default", derive(Default))]
22653#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22654#[cfg_attr(feature = "derive_clone", derive(Clone))]
22655#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22656pub struct CompareSeniorityType1 {
22657	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22658	pub val1: Option<DebtInstrumentSeniorityType2Code>,
22659	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22660	pub val2: Option<DebtInstrumentSeniorityType2Code>,
22661}
22662
22663impl CompareSeniorityType1 {
22664	pub fn validate(&self) -> Result<(), ValidationError> {
22665		if let Some(ref val) = self.val1 { val.validate()? }
22666		if let Some(ref val) = self.val2 { val.validate()? }
22667		Ok(())
22668	}
22669}
22670
22671
22672// CompareSpecialCollateral3 ...
22673#[cfg_attr(feature = "derive_debug", derive(Debug))]
22674#[cfg_attr(feature = "derive_default", derive(Default))]
22675#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22676#[cfg_attr(feature = "derive_clone", derive(Clone))]
22677#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22678pub struct CompareSpecialCollateral3 {
22679	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22680	pub val1: Option<SpecialCollateral1Code>,
22681	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22682	pub val2: Option<SpecialCollateral1Code>,
22683}
22684
22685impl CompareSpecialCollateral3 {
22686	pub fn validate(&self) -> Result<(), ValidationError> {
22687		if let Some(ref val) = self.val1 { val.validate()? }
22688		if let Some(ref val) = self.val2 { val.validate()? }
22689		Ok(())
22690	}
22691}
22692
22693
22694// CompareTerminationOption3 ...
22695#[cfg_attr(feature = "derive_debug", derive(Debug))]
22696#[cfg_attr(feature = "derive_default", derive(Default))]
22697#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22698#[cfg_attr(feature = "derive_clone", derive(Clone))]
22699#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22700pub struct CompareTerminationOption3 {
22701	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22702	pub val1: Option<RepoTerminationOption2Code>,
22703	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22704	pub val2: Option<RepoTerminationOption2Code>,
22705}
22706
22707impl CompareTerminationOption3 {
22708	pub fn validate(&self) -> Result<(), ValidationError> {
22709		if let Some(ref val) = self.val1 { val.validate()? }
22710		if let Some(ref val) = self.val2 { val.validate()? }
22711		Ok(())
22712	}
22713}
22714
22715
22716// CompareText1 ...
22717#[cfg_attr(feature = "derive_debug", derive(Debug))]
22718#[cfg_attr(feature = "derive_default", derive(Default))]
22719#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22720#[cfg_attr(feature = "derive_clone", derive(Clone))]
22721#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22722pub struct CompareText1 {
22723	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22724	pub val1: Option<String>,
22725	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22726	pub val2: Option<String>,
22727}
22728
22729impl CompareText1 {
22730	pub fn validate(&self) -> Result<(), ValidationError> {
22731		if let Some(ref val) = self.val1 {
22732			if val.chars().count() < 1 {
22733				return Err(ValidationError::new(1001, "val1 is shorter than the minimum length of 1".to_string()));
22734			}
22735			if val.chars().count() > 52 {
22736				return Err(ValidationError::new(1002, "val1 exceeds the maximum length of 52".to_string()));
22737			}
22738		}
22739		if let Some(ref val) = self.val2 {
22740			if val.chars().count() < 1 {
22741				return Err(ValidationError::new(1001, "val2 is shorter than the minimum length of 1".to_string()));
22742			}
22743			if val.chars().count() > 52 {
22744				return Err(ValidationError::new(1002, "val2 exceeds the maximum length of 52".to_string()));
22745			}
22746		}
22747		Ok(())
22748	}
22749}
22750
22751
22752// CompareText2 ...
22753#[cfg_attr(feature = "derive_debug", derive(Debug))]
22754#[cfg_attr(feature = "derive_default", derive(Default))]
22755#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22756#[cfg_attr(feature = "derive_clone", derive(Clone))]
22757#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22758pub struct CompareText2 {
22759	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22760	pub val1: Option<String>,
22761	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22762	pub val2: Option<String>,
22763}
22764
22765impl CompareText2 {
22766	pub fn validate(&self) -> Result<(), ValidationError> {
22767		if let Some(ref val) = self.val1 {
22768			if val.chars().count() < 1 {
22769				return Err(ValidationError::new(1001, "val1 is shorter than the minimum length of 1".to_string()));
22770			}
22771			if val.chars().count() > 52 {
22772				return Err(ValidationError::new(1002, "val1 exceeds the maximum length of 52".to_string()));
22773			}
22774		}
22775		if let Some(ref val) = self.val2 {
22776			if val.chars().count() < 1 {
22777				return Err(ValidationError::new(1001, "val2 is shorter than the minimum length of 1".to_string()));
22778			}
22779			if val.chars().count() > 52 {
22780				return Err(ValidationError::new(1002, "val2 exceeds the maximum length of 52".to_string()));
22781			}
22782		}
22783		Ok(())
22784	}
22785}
22786
22787
22788// CompareTimePeriod2 ...
22789#[cfg_attr(feature = "derive_debug", derive(Debug))]
22790#[cfg_attr(feature = "derive_default", derive(Default))]
22791#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22792#[cfg_attr(feature = "derive_clone", derive(Clone))]
22793#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22794pub struct CompareTimePeriod2 {
22795	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22796	pub val1: Option<TimePeriod3>,
22797	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22798	pub val2: Option<TimePeriod3>,
22799}
22800
22801impl CompareTimePeriod2 {
22802	pub fn validate(&self) -> Result<(), ValidationError> {
22803		if let Some(ref val) = self.val1 { val.validate()? }
22804		if let Some(ref val) = self.val2 { val.validate()? }
22805		Ok(())
22806	}
22807}
22808
22809
22810// CompareTradeClearingObligation1 ...
22811#[cfg_attr(feature = "derive_debug", derive(Debug))]
22812#[cfg_attr(feature = "derive_default", derive(Default))]
22813#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22814#[cfg_attr(feature = "derive_clone", derive(Clone))]
22815#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22816pub struct CompareTradeClearingObligation1 {
22817	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22818	pub val1: Option<ClearingObligationType1Code>,
22819	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22820	pub val2: Option<ClearingObligationType1Code>,
22821}
22822
22823impl CompareTradeClearingObligation1 {
22824	pub fn validate(&self) -> Result<(), ValidationError> {
22825		if let Some(ref val) = self.val1 { val.validate()? }
22826		if let Some(ref val) = self.val2 { val.validate()? }
22827		Ok(())
22828	}
22829}
22830
22831
22832// CompareTradeClearingStatus3 ...
22833#[cfg_attr(feature = "derive_debug", derive(Debug))]
22834#[cfg_attr(feature = "derive_default", derive(Default))]
22835#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22836#[cfg_attr(feature = "derive_clone", derive(Clone))]
22837#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22838pub struct CompareTradeClearingStatus3 {
22839	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22840	pub val1: Option<Cleared23Choice>,
22841	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22842	pub val2: Option<Cleared23Choice>,
22843}
22844
22845impl CompareTradeClearingStatus3 {
22846	pub fn validate(&self) -> Result<(), ValidationError> {
22847		if let Some(ref val) = self.val1 { val.validate()? }
22848		if let Some(ref val) = self.val2 { val.validate()? }
22849		Ok(())
22850	}
22851}
22852
22853
22854// CompareTradeConfirmation2 ...
22855#[cfg_attr(feature = "derive_debug", derive(Debug))]
22856#[cfg_attr(feature = "derive_default", derive(Default))]
22857#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22858#[cfg_attr(feature = "derive_clone", derive(Clone))]
22859#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22860pub struct CompareTradeConfirmation2 {
22861	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22862	pub val1: Option<TradeConfirmation3Choice>,
22863	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22864	pub val2: Option<TradeConfirmation3Choice>,
22865}
22866
22867impl CompareTradeConfirmation2 {
22868	pub fn validate(&self) -> Result<(), ValidationError> {
22869		if let Some(ref val) = self.val1 { val.validate()? }
22870		if let Some(ref val) = self.val2 { val.validate()? }
22871		Ok(())
22872	}
22873}
22874
22875
22876// CompareTrancheIndicator1 ...
22877#[cfg_attr(feature = "derive_debug", derive(Debug))]
22878#[cfg_attr(feature = "derive_default", derive(Default))]
22879#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22880#[cfg_attr(feature = "derive_clone", derive(Clone))]
22881#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22882pub struct CompareTrancheIndicator1 {
22883	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22884	pub val1: Option<TrancheIndicator3Choice>,
22885	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22886	pub val2: Option<TrancheIndicator3Choice>,
22887}
22888
22889impl CompareTrancheIndicator1 {
22890	pub fn validate(&self) -> Result<(), ValidationError> {
22891		if let Some(ref val) = self.val1 { val.validate()? }
22892		if let Some(ref val) = self.val2 { val.validate()? }
22893		Ok(())
22894	}
22895}
22896
22897
22898// CompareTrueFalseIndicator3 ...
22899#[cfg_attr(feature = "derive_debug", derive(Debug))]
22900#[cfg_attr(feature = "derive_default", derive(Default))]
22901#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22902#[cfg_attr(feature = "derive_clone", derive(Clone))]
22903#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22904pub struct CompareTrueFalseIndicator3 {
22905	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22906	pub val1: Option<bool>,
22907	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22908	pub val2: Option<bool>,
22909}
22910
22911impl CompareTrueFalseIndicator3 {
22912	pub fn validate(&self) -> Result<(), ValidationError> {
22913		Ok(())
22914	}
22915}
22916
22917
22918// CompareUnderlyingInstrument3 ...
22919#[cfg_attr(feature = "derive_debug", derive(Debug))]
22920#[cfg_attr(feature = "derive_default", derive(Default))]
22921#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22922#[cfg_attr(feature = "derive_clone", derive(Clone))]
22923#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22924pub struct CompareUnderlyingInstrument3 {
22925	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22926	pub val1: Option<SecurityIdentification41Choice>,
22927	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22928	pub val2: Option<SecurityIdentification41Choice>,
22929}
22930
22931impl CompareUnderlyingInstrument3 {
22932	pub fn validate(&self) -> Result<(), ValidationError> {
22933		if let Some(ref val) = self.val1 { val.validate()? }
22934		if let Some(ref val) = self.val2 { val.validate()? }
22935		Ok(())
22936	}
22937}
22938
22939
22940// CompareUniqueProductIdentifier2 ...
22941#[cfg_attr(feature = "derive_debug", derive(Debug))]
22942#[cfg_attr(feature = "derive_default", derive(Default))]
22943#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22944#[cfg_attr(feature = "derive_clone", derive(Clone))]
22945#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22946pub struct CompareUniqueProductIdentifier2 {
22947	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22948	pub val1: Option<UniqueProductIdentifier2Choice>,
22949	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22950	pub val2: Option<UniqueProductIdentifier2Choice>,
22951}
22952
22953impl CompareUniqueProductIdentifier2 {
22954	pub fn validate(&self) -> Result<(), ValidationError> {
22955		if let Some(ref val) = self.val1 { val.validate()? }
22956		if let Some(ref val) = self.val2 { val.validate()? }
22957		Ok(())
22958	}
22959}
22960
22961
22962// CompareUniqueTransactionIdentifier2 ...
22963#[cfg_attr(feature = "derive_debug", derive(Debug))]
22964#[cfg_attr(feature = "derive_default", derive(Default))]
22965#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22966#[cfg_attr(feature = "derive_clone", derive(Clone))]
22967#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22968pub struct CompareUniqueTransactionIdentifier2 {
22969	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22970	pub val1: Option<UniqueTransactionIdentifier2Choice>,
22971	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22972	pub val2: Option<UniqueTransactionIdentifier2Choice>,
22973}
22974
22975impl CompareUniqueTransactionIdentifier2 {
22976	pub fn validate(&self) -> Result<(), ValidationError> {
22977		if let Some(ref val) = self.val1 { val.validate()? }
22978		if let Some(ref val) = self.val2 { val.validate()? }
22979		Ok(())
22980	}
22981}
22982
22983
22984// CompareUnitOfMeasure3 ...
22985#[cfg_attr(feature = "derive_debug", derive(Debug))]
22986#[cfg_attr(feature = "derive_default", derive(Default))]
22987#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
22988#[cfg_attr(feature = "derive_clone", derive(Clone))]
22989#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
22990pub struct CompareUnitOfMeasure3 {
22991	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
22992	pub val1: Option<UnitOfMeasure11Code>,
22993	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
22994	pub val2: Option<UnitOfMeasure11Code>,
22995}
22996
22997impl CompareUnitOfMeasure3 {
22998	pub fn validate(&self) -> Result<(), ValidationError> {
22999		if let Some(ref val) = self.val1 { val.validate()? }
23000		if let Some(ref val) = self.val2 { val.validate()? }
23001		Ok(())
23002	}
23003}
23004
23005
23006// CompareUnitPrice4 ...
23007#[cfg_attr(feature = "derive_debug", derive(Debug))]
23008#[cfg_attr(feature = "derive_default", derive(Default))]
23009#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23010#[cfg_attr(feature = "derive_clone", derive(Clone))]
23011#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23012pub struct CompareUnitPrice4 {
23013	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
23014	pub val1: Option<SecuritiesTransactionPrice17Choice>,
23015	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
23016	pub val2: Option<SecuritiesTransactionPrice17Choice>,
23017}
23018
23019impl CompareUnitPrice4 {
23020	pub fn validate(&self) -> Result<(), ValidationError> {
23021		if let Some(ref val) = self.val1 { val.validate()? }
23022		if let Some(ref val) = self.val2 { val.validate()? }
23023		Ok(())
23024	}
23025}
23026
23027
23028// CompareUnitPrice5 ...
23029#[cfg_attr(feature = "derive_debug", derive(Debug))]
23030#[cfg_attr(feature = "derive_default", derive(Default))]
23031#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23032#[cfg_attr(feature = "derive_clone", derive(Clone))]
23033#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23034pub struct CompareUnitPrice5 {
23035	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
23036	pub val1: Option<SecuritiesTransactionPrice17Choice>,
23037	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
23038	pub val2: Option<SecuritiesTransactionPrice17Choice>,
23039}
23040
23041impl CompareUnitPrice5 {
23042	pub fn validate(&self) -> Result<(), ValidationError> {
23043		if let Some(ref val) = self.val1 { val.validate()? }
23044		if let Some(ref val) = self.val2 { val.validate()? }
23045		Ok(())
23046	}
23047}
23048
23049
23050// CompareUnitPrice6 ...
23051#[cfg_attr(feature = "derive_debug", derive(Debug))]
23052#[cfg_attr(feature = "derive_default", derive(Default))]
23053#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23054#[cfg_attr(feature = "derive_clone", derive(Clone))]
23055#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23056pub struct CompareUnitPrice6 {
23057	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
23058	pub val1: Option<SecuritiesTransactionPrice19Choice>,
23059	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
23060	pub val2: Option<SecuritiesTransactionPrice19Choice>,
23061}
23062
23063impl CompareUnitPrice6 {
23064	pub fn validate(&self) -> Result<(), ValidationError> {
23065		if let Some(ref val) = self.val1 { val.validate()? }
23066		if let Some(ref val) = self.val2 { val.validate()? }
23067		Ok(())
23068	}
23069}
23070
23071
23072// CompareUnitPrice7 ...
23073#[cfg_attr(feature = "derive_debug", derive(Debug))]
23074#[cfg_attr(feature = "derive_default", derive(Default))]
23075#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23076#[cfg_attr(feature = "derive_clone", derive(Clone))]
23077#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23078pub struct CompareUnitPrice7 {
23079	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
23080	pub val1: Option<SecuritiesTransactionPrice14Choice>,
23081	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
23082	pub val2: Option<SecuritiesTransactionPrice14Choice>,
23083}
23084
23085impl CompareUnitPrice7 {
23086	pub fn validate(&self) -> Result<(), ValidationError> {
23087		if let Some(ref val) = self.val1 { val.validate()? }
23088		if let Some(ref val) = self.val2 { val.validate()? }
23089		Ok(())
23090	}
23091}
23092
23093
23094// CompareUnitPrice8 ...
23095#[cfg_attr(feature = "derive_debug", derive(Debug))]
23096#[cfg_attr(feature = "derive_default", derive(Default))]
23097#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23098#[cfg_attr(feature = "derive_clone", derive(Clone))]
23099#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23100pub struct CompareUnitPrice8 {
23101	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
23102	pub val1: Option<SecuritiesTransactionPrice13Choice>,
23103	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
23104	pub val2: Option<SecuritiesTransactionPrice13Choice>,
23105}
23106
23107impl CompareUnitPrice8 {
23108	pub fn validate(&self) -> Result<(), ValidationError> {
23109		if let Some(ref val) = self.val1 { val.validate()? }
23110		if let Some(ref val) = self.val2 { val.validate()? }
23111		Ok(())
23112	}
23113}
23114
23115
23116// CompareValuationType1 ...
23117#[cfg_attr(feature = "derive_debug", derive(Debug))]
23118#[cfg_attr(feature = "derive_default", derive(Default))]
23119#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23120#[cfg_attr(feature = "derive_clone", derive(Clone))]
23121#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23122pub struct CompareValuationType1 {
23123	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
23124	pub val1: Option<ValuationType1Code>,
23125	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
23126	pub val2: Option<ValuationType1Code>,
23127}
23128
23129impl CompareValuationType1 {
23130	pub fn validate(&self) -> Result<(), ValidationError> {
23131		if let Some(ref val) = self.val1 { val.validate()? }
23132		if let Some(ref val) = self.val2 { val.validate()? }
23133		Ok(())
23134	}
23135}
23136
23137
23138// CompareWeekDay1 ...
23139#[cfg_attr(feature = "derive_debug", derive(Debug))]
23140#[cfg_attr(feature = "derive_default", derive(Default))]
23141#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23142#[cfg_attr(feature = "derive_clone", derive(Clone))]
23143#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23144pub struct CompareWeekDay1 {
23145	#[cfg_attr( feature = "derive_serde", serde(rename = "Val1", skip_serializing_if = "Option::is_none") )]
23146	pub val1: Option<WeekDay3Code>,
23147	#[cfg_attr( feature = "derive_serde", serde(rename = "Val2", skip_serializing_if = "Option::is_none") )]
23148	pub val2: Option<WeekDay3Code>,
23149}
23150
23151impl CompareWeekDay1 {
23152	pub fn validate(&self) -> Result<(), ValidationError> {
23153		if let Some(ref val) = self.val1 { val.validate()? }
23154		if let Some(ref val) = self.val2 { val.validate()? }
23155		Ok(())
23156	}
23157}
23158
23159
23160// Compensation5 ...
23161#[cfg_attr(feature = "derive_debug", derive(Debug))]
23162#[cfg_attr(feature = "derive_default", derive(Default))]
23163#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23164#[cfg_attr(feature = "derive_clone", derive(Clone))]
23165#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23166pub struct Compensation5 {
23167	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
23168	pub amt: ActiveCurrencyAndAmount,
23169	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt") )]
23170	pub dbtr_agt: BranchAndFinancialInstitutionIdentification8,
23171	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
23172	pub dbtr_agt_acct: Option<CashAccount40>,
23173	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt") )]
23174	pub cdtr_agt: BranchAndFinancialInstitutionIdentification8,
23175	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
23176	pub cdtr_agt_acct: Option<CashAccount40>,
23177	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
23178	pub rsn: CompensationReason1Choice,
23179}
23180
23181impl Compensation5 {
23182	pub fn validate(&self) -> Result<(), ValidationError> {
23183		self.amt.validate()?;
23184		self.dbtr_agt.validate()?;
23185		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
23186		self.cdtr_agt.validate()?;
23187		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
23188		self.rsn.validate()?;
23189		Ok(())
23190	}
23191}
23192
23193
23194// CompensationMethod1Code ...
23195#[cfg_attr(feature = "derive_debug", derive(Debug))]
23196#[cfg_attr(feature = "derive_default", derive(Default))]
23197#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23198#[cfg_attr(feature = "derive_clone", derive(Clone))]
23199#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23200pub enum CompensationMethod1Code {
23201	#[cfg_attr(feature = "derive_default", default)]
23202	#[cfg_attr( feature = "derive_serde", serde(rename = "NOCP") )]
23203	CodeNOCP,
23204	#[cfg_attr( feature = "derive_serde", serde(rename = "DBTD") )]
23205	CodeDBTD,
23206	#[cfg_attr( feature = "derive_serde", serde(rename = "INVD") )]
23207	CodeINVD,
23208	#[cfg_attr( feature = "derive_serde", serde(rename = "DDBT") )]
23209	CodeDDBT,
23210}
23211
23212impl CompensationMethod1Code {
23213	pub fn validate(&self) -> Result<(), ValidationError> {
23214		Ok(())
23215	}
23216}
23217
23218
23219// CompensationReason1Choice ...
23220#[cfg_attr(feature = "derive_debug", derive(Debug))]
23221#[cfg_attr(feature = "derive_default", derive(Default))]
23222#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23223#[cfg_attr(feature = "derive_clone", derive(Clone))]
23224#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23225pub struct CompensationReason1Choice {
23226	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
23227	pub cd: Option<String>,
23228	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
23229	pub prtry: Option<String>,
23230}
23231
23232impl CompensationReason1Choice {
23233	pub fn validate(&self) -> Result<(), ValidationError> {
23234		if let Some(ref val) = self.cd {
23235			if val.chars().count() < 1 {
23236				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
23237			}
23238			if val.chars().count() > 4 {
23239				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
23240			}
23241		}
23242		if let Some(ref val) = self.prtry {
23243			if val.chars().count() < 1 {
23244				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
23245			}
23246			if val.chars().count() > 35 {
23247				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
23248			}
23249		}
23250		Ok(())
23251	}
23252}
23253
23254
23255// CompensationRequest1 ...
23256#[cfg_attr(feature = "derive_debug", derive(Debug))]
23257#[cfg_attr(feature = "derive_default", derive(Default))]
23258#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23259#[cfg_attr(feature = "derive_clone", derive(Clone))]
23260#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23261pub struct CompensationRequest1 {
23262	#[cfg_attr( feature = "derive_serde", serde(rename = "CompstnAcct", skip_serializing_if = "Option::is_none") )]
23263	pub compstn_acct: Option<CashAccount40>,
23264	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd") )]
23265	pub prd: DatePeriod2,
23266	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
23267	pub amt: Option<ActiveCurrencyAndAmount>,
23268	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdValDt", skip_serializing_if = "Option::is_none") )]
23269	pub xpctd_val_dt: Option<String>,
23270	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRate", skip_serializing_if = "Option::is_none") )]
23271	pub intrst_rate: Option<f64>,
23272	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
23273	pub rsn: Option<Vec<String>>,
23274}
23275
23276impl CompensationRequest1 {
23277	pub fn validate(&self) -> Result<(), ValidationError> {
23278		if let Some(ref val) = self.compstn_acct { val.validate()? }
23279		self.prd.validate()?;
23280		if let Some(ref val) = self.amt { val.validate()? }
23281		if let Some(ref vec) = self.rsn {
23282			for item in vec {
23283				if item.chars().count() < 1 {
23284					return Err(ValidationError::new(1001, "rsn is shorter than the minimum length of 1".to_string()));
23285				}
23286				if item.chars().count() > 140 {
23287					return Err(ValidationError::new(1002, "rsn exceeds the maximum length of 140".to_string()));
23288				}
23289			}
23290		}
23291		Ok(())
23292	}
23293}
23294
23295
23296// CompensationResponse1 ...
23297#[cfg_attr(feature = "derive_debug", derive(Debug))]
23298#[cfg_attr(feature = "derive_default", derive(Default))]
23299#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23300#[cfg_attr(feature = "derive_clone", derive(Clone))]
23301#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23302pub struct CompensationResponse1 {
23303	#[cfg_attr( feature = "derive_serde", serde(rename = "Grantd") )]
23304	pub grantd: bool,
23305	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlAmt", skip_serializing_if = "Option::is_none") )]
23306	pub initl_amt: Option<ActiveCurrencyAndAmount>,
23307	#[cfg_attr( feature = "derive_serde", serde(rename = "PdChrgs", skip_serializing_if = "Option::is_none") )]
23308	pub pd_chrgs: Option<ActiveCurrencyAndAmount>,
23309	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtDue", skip_serializing_if = "Option::is_none") )]
23310	pub amt_due: Option<ActiveCurrencyAndAmount>,
23311	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdValDt", skip_serializing_if = "Option::is_none") )]
23312	pub xpctd_val_dt: Option<String>,
23313	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd", skip_serializing_if = "Option::is_none") )]
23314	pub prd: Option<DatePeriod2>,
23315	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRate", skip_serializing_if = "Option::is_none") )]
23316	pub intrst_rate: Option<f64>,
23317	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
23318	pub rsn: Option<String>,
23319}
23320
23321impl CompensationResponse1 {
23322	pub fn validate(&self) -> Result<(), ValidationError> {
23323		if let Some(ref val) = self.initl_amt { val.validate()? }
23324		if let Some(ref val) = self.pd_chrgs { val.validate()? }
23325		if let Some(ref val) = self.amt_due { val.validate()? }
23326		if let Some(ref val) = self.prd { val.validate()? }
23327		if let Some(ref val) = self.rsn {
23328			if val.chars().count() < 1 {
23329				return Err(ValidationError::new(1001, "rsn is shorter than the minimum length of 1".to_string()));
23330			}
23331			if val.chars().count() > 140 {
23332				return Err(ValidationError::new(1002, "rsn exceeds the maximum length of 140".to_string()));
23333			}
23334		}
23335		Ok(())
23336	}
23337}
23338
23339
23340// ConcentrationAccount1 ...
23341#[cfg_attr(feature = "derive_debug", derive(Debug))]
23342#[cfg_attr(feature = "derive_default", derive(Default))]
23343#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23344#[cfg_attr(feature = "derive_clone", derive(Clone))]
23345#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23346pub struct ConcentrationAccount1 {
23347	#[cfg_attr( feature = "derive_serde", serde(rename = "InFlow") )]
23348	pub in_flow: Flows1,
23349	#[cfg_attr( feature = "derive_serde", serde(rename = "OutFlow") )]
23350	pub out_flow: Flows1,
23351	#[cfg_attr( feature = "derive_serde", serde(rename = "EndOfDay") )]
23352	pub end_of_day: AmountAndDirection102,
23353	#[cfg_attr( feature = "derive_serde", serde(rename = "PeakCdt") )]
23354	pub peak_cdt: ActiveCurrencyAndAmount,
23355	#[cfg_attr( feature = "derive_serde", serde(rename = "PeakDbt") )]
23356	pub peak_dbt: ActiveCurrencyAndAmount,
23357	#[cfg_attr( feature = "derive_serde", serde(rename = "LatePmtConf") )]
23358	pub late_pmt_conf: String,
23359}
23360
23361impl ConcentrationAccount1 {
23362	pub fn validate(&self) -> Result<(), ValidationError> {
23363		self.in_flow.validate()?;
23364		self.out_flow.validate()?;
23365		self.end_of_day.validate()?;
23366		self.peak_cdt.validate()?;
23367		self.peak_dbt.validate()?;
23368		let pattern = Regex::new("[0-9]{1,10}").unwrap();
23369		if !pattern.is_match(&self.late_pmt_conf) {
23370			return Err(ValidationError::new(1005, "late_pmt_conf does not match the required pattern".to_string()));
23371		}
23372		Ok(())
23373	}
23374}
23375
23376
23377// ConcentrationAgent1 ...
23378#[cfg_attr(feature = "derive_debug", derive(Debug))]
23379#[cfg_attr(feature = "derive_default", derive(Default))]
23380#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23381#[cfg_attr(feature = "derive_clone", derive(Clone))]
23382#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23383pub struct ConcentrationAgent1 {
23384	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
23385	pub id: String,
23386	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct") )]
23387	pub acct: Vec<ConcentrationAccount1>,
23388}
23389
23390impl ConcentrationAgent1 {
23391	pub fn validate(&self) -> Result<(), ValidationError> {
23392		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
23393		if !pattern.is_match(&self.id) {
23394			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
23395		}
23396		for item in &self.acct { item.validate()? }
23397		Ok(())
23398	}
23399}
23400
23401
23402// ConductClassification1Code ...
23403#[cfg_attr(feature = "derive_debug", derive(Debug))]
23404#[cfg_attr(feature = "derive_default", derive(Default))]
23405#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23406#[cfg_attr(feature = "derive_clone", derive(Clone))]
23407#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23408pub enum ConductClassification1Code {
23409	#[cfg_attr(feature = "derive_default", default)]
23410	#[cfg_attr( feature = "derive_serde", serde(rename = "NSTA") )]
23411	CodeNSTA,
23412	#[cfg_attr( feature = "derive_serde", serde(rename = "RCLT") )]
23413	CodeRCLT,
23414	#[cfg_attr( feature = "derive_serde", serde(rename = "STAN") )]
23415	CodeSTAN,
23416}
23417
23418impl ConductClassification1Code {
23419	pub fn validate(&self) -> Result<(), ValidationError> {
23420		Ok(())
23421	}
23422}
23423
23424
23425// ConfirmationType1Choice ...
23426#[cfg_attr(feature = "derive_debug", derive(Debug))]
23427#[cfg_attr(feature = "derive_default", derive(Default))]
23428#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23429#[cfg_attr(feature = "derive_clone", derive(Clone))]
23430#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23431pub struct ConfirmationType1Choice {
23432	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
23433	pub cd: Option<AccountManagementType2Code>,
23434	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
23435	pub prtry: Option<GenericIdentification47>,
23436}
23437
23438impl ConfirmationType1Choice {
23439	pub fn validate(&self) -> Result<(), ValidationError> {
23440		if let Some(ref val) = self.cd { val.validate()? }
23441		if let Some(ref val) = self.prtry { val.validate()? }
23442		Ok(())
23443	}
23444}
23445
23446
23447// ConsolidationType1Choice ...
23448#[cfg_attr(feature = "derive_debug", derive(Debug))]
23449#[cfg_attr(feature = "derive_default", derive(Default))]
23450#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23451#[cfg_attr(feature = "derive_clone", derive(Clone))]
23452#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23453pub struct ConsolidationType1Choice {
23454	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
23455	pub cd: Option<ConsolidationType1Code>,
23456	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
23457	pub prtry: Option<GenericIdentification47>,
23458}
23459
23460impl ConsolidationType1Choice {
23461	pub fn validate(&self) -> Result<(), ValidationError> {
23462		if let Some(ref val) = self.cd { val.validate()? }
23463		if let Some(ref val) = self.prtry { val.validate()? }
23464		Ok(())
23465	}
23466}
23467
23468
23469// ConsolidationType1Code ...
23470#[cfg_attr(feature = "derive_debug", derive(Debug))]
23471#[cfg_attr(feature = "derive_default", derive(Default))]
23472#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23473#[cfg_attr(feature = "derive_clone", derive(Clone))]
23474#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23475pub enum ConsolidationType1Code {
23476	#[cfg_attr(feature = "derive_default", default)]
23477	#[cfg_attr( feature = "derive_serde", serde(rename = "GENL") )]
23478	CodeGENL,
23479	#[cfg_attr( feature = "derive_serde", serde(rename = "PART") )]
23480	CodePART,
23481}
23482
23483impl ConsolidationType1Code {
23484	pub fn validate(&self) -> Result<(), ValidationError> {
23485		Ok(())
23486	}
23487}
23488
23489
23490// Contact13 ...
23491#[cfg_attr(feature = "derive_debug", derive(Debug))]
23492#[cfg_attr(feature = "derive_default", derive(Default))]
23493#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23494#[cfg_attr(feature = "derive_clone", derive(Clone))]
23495#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23496pub struct Contact13 {
23497	#[cfg_attr( feature = "derive_serde", serde(rename = "NmPrfx", skip_serializing_if = "Option::is_none") )]
23498	pub nm_prfx: Option<NamePrefix2Code>,
23499	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
23500	pub nm: Option<String>,
23501	#[cfg_attr( feature = "derive_serde", serde(rename = "PhneNb", skip_serializing_if = "Option::is_none") )]
23502	pub phne_nb: Option<String>,
23503	#[cfg_attr( feature = "derive_serde", serde(rename = "MobNb", skip_serializing_if = "Option::is_none") )]
23504	pub mob_nb: Option<String>,
23505	#[cfg_attr( feature = "derive_serde", serde(rename = "FaxNb", skip_serializing_if = "Option::is_none") )]
23506	pub fax_nb: Option<String>,
23507	#[cfg_attr( feature = "derive_serde", serde(rename = "URLAdr", skip_serializing_if = "Option::is_none") )]
23508	pub url_adr: Option<String>,
23509	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailAdr", skip_serializing_if = "Option::is_none") )]
23510	pub email_adr: Option<String>,
23511	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailPurp", skip_serializing_if = "Option::is_none") )]
23512	pub email_purp: Option<String>,
23513	#[cfg_attr( feature = "derive_serde", serde(rename = "JobTitl", skip_serializing_if = "Option::is_none") )]
23514	pub job_titl: Option<String>,
23515	#[cfg_attr( feature = "derive_serde", serde(rename = "Rspnsblty", skip_serializing_if = "Option::is_none") )]
23516	pub rspnsblty: Option<String>,
23517	#[cfg_attr( feature = "derive_serde", serde(rename = "Dept", skip_serializing_if = "Option::is_none") )]
23518	pub dept: Option<String>,
23519	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
23520	pub othr: Option<Vec<OtherContact1>>,
23521	#[cfg_attr( feature = "derive_serde", serde(rename = "PrefrdMtd", skip_serializing_if = "Option::is_none") )]
23522	pub prefrd_mtd: Option<PreferredContactMethod2Code>,
23523}
23524
23525impl Contact13 {
23526	pub fn validate(&self) -> Result<(), ValidationError> {
23527		if let Some(ref val) = self.nm_prfx { val.validate()? }
23528		if let Some(ref val) = self.nm {
23529			if val.chars().count() < 1 {
23530				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
23531			}
23532			if val.chars().count() > 140 {
23533				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
23534			}
23535		}
23536		if let Some(ref val) = self.phne_nb {
23537			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
23538			if !pattern.is_match(val) {
23539				return Err(ValidationError::new(1005, "phne_nb does not match the required pattern".to_string()));
23540			}
23541		}
23542		if let Some(ref val) = self.mob_nb {
23543			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
23544			if !pattern.is_match(val) {
23545				return Err(ValidationError::new(1005, "mob_nb does not match the required pattern".to_string()));
23546			}
23547		}
23548		if let Some(ref val) = self.fax_nb {
23549			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
23550			if !pattern.is_match(val) {
23551				return Err(ValidationError::new(1005, "fax_nb does not match the required pattern".to_string()));
23552			}
23553		}
23554		if let Some(ref val) = self.url_adr {
23555			if val.chars().count() < 1 {
23556				return Err(ValidationError::new(1001, "url_adr is shorter than the minimum length of 1".to_string()));
23557			}
23558			if val.chars().count() > 2048 {
23559				return Err(ValidationError::new(1002, "url_adr exceeds the maximum length of 2048".to_string()));
23560			}
23561		}
23562		if let Some(ref val) = self.email_adr {
23563			if val.chars().count() < 1 {
23564				return Err(ValidationError::new(1001, "email_adr is shorter than the minimum length of 1".to_string()));
23565			}
23566			if val.chars().count() > 256 {
23567				return Err(ValidationError::new(1002, "email_adr exceeds the maximum length of 256".to_string()));
23568			}
23569		}
23570		if let Some(ref val) = self.email_purp {
23571			if val.chars().count() < 1 {
23572				return Err(ValidationError::new(1001, "email_purp is shorter than the minimum length of 1".to_string()));
23573			}
23574			if val.chars().count() > 35 {
23575				return Err(ValidationError::new(1002, "email_purp exceeds the maximum length of 35".to_string()));
23576			}
23577		}
23578		if let Some(ref val) = self.job_titl {
23579			if val.chars().count() < 1 {
23580				return Err(ValidationError::new(1001, "job_titl is shorter than the minimum length of 1".to_string()));
23581			}
23582			if val.chars().count() > 35 {
23583				return Err(ValidationError::new(1002, "job_titl exceeds the maximum length of 35".to_string()));
23584			}
23585		}
23586		if let Some(ref val) = self.rspnsblty {
23587			if val.chars().count() < 1 {
23588				return Err(ValidationError::new(1001, "rspnsblty is shorter than the minimum length of 1".to_string()));
23589			}
23590			if val.chars().count() > 35 {
23591				return Err(ValidationError::new(1002, "rspnsblty exceeds the maximum length of 35".to_string()));
23592			}
23593		}
23594		if let Some(ref val) = self.dept {
23595			if val.chars().count() < 1 {
23596				return Err(ValidationError::new(1001, "dept is shorter than the minimum length of 1".to_string()));
23597			}
23598			if val.chars().count() > 70 {
23599				return Err(ValidationError::new(1002, "dept exceeds the maximum length of 70".to_string()));
23600			}
23601		}
23602		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
23603		if let Some(ref val) = self.prefrd_mtd { val.validate()? }
23604		Ok(())
23605	}
23606}
23607
23608
23609// Contact14 ...
23610#[cfg_attr(feature = "derive_debug", derive(Debug))]
23611#[cfg_attr(feature = "derive_default", derive(Default))]
23612#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23613#[cfg_attr(feature = "derive_clone", derive(Clone))]
23614#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23615pub struct Contact14 {
23616	#[cfg_attr( feature = "derive_serde", serde(rename = "NmPrfx", skip_serializing_if = "Option::is_none") )]
23617	pub nm_prfx: Option<NamePrefix2Code>,
23618	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
23619	pub nm: Option<String>,
23620	#[cfg_attr( feature = "derive_serde", serde(rename = "PhneNb", skip_serializing_if = "Option::is_none") )]
23621	pub phne_nb: Option<String>,
23622	#[cfg_attr( feature = "derive_serde", serde(rename = "MobNb", skip_serializing_if = "Option::is_none") )]
23623	pub mob_nb: Option<String>,
23624	#[cfg_attr( feature = "derive_serde", serde(rename = "FaxNb", skip_serializing_if = "Option::is_none") )]
23625	pub fax_nb: Option<String>,
23626	#[cfg_attr( feature = "derive_serde", serde(rename = "URLAdr", skip_serializing_if = "Option::is_none") )]
23627	pub url_adr: Option<String>,
23628	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailAdr", skip_serializing_if = "Option::is_none") )]
23629	pub email_adr: Option<String>,
23630	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailPurp", skip_serializing_if = "Option::is_none") )]
23631	pub email_purp: Option<String>,
23632	#[cfg_attr( feature = "derive_serde", serde(rename = "JobTitl", skip_serializing_if = "Option::is_none") )]
23633	pub job_titl: Option<String>,
23634	#[cfg_attr( feature = "derive_serde", serde(rename = "Rspnsblty", skip_serializing_if = "Option::is_none") )]
23635	pub rspnsblty: Option<String>,
23636	#[cfg_attr( feature = "derive_serde", serde(rename = "Dept", skip_serializing_if = "Option::is_none") )]
23637	pub dept: Option<String>,
23638	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
23639	pub othr: Option<Vec<OtherContact1>>,
23640	#[cfg_attr( feature = "derive_serde", serde(rename = "PrefrdMtd", skip_serializing_if = "Option::is_none") )]
23641	pub prefrd_mtd: Option<PreferredContactMethod2Code>,
23642	#[cfg_attr( feature = "derive_serde", serde(rename = "VldFr", skip_serializing_if = "Option::is_none") )]
23643	pub vld_fr: Option<String>,
23644	#[cfg_attr( feature = "derive_serde", serde(rename = "VldTo", skip_serializing_if = "Option::is_none") )]
23645	pub vld_to: Option<String>,
23646}
23647
23648impl Contact14 {
23649	pub fn validate(&self) -> Result<(), ValidationError> {
23650		if let Some(ref val) = self.nm_prfx { val.validate()? }
23651		if let Some(ref val) = self.nm {
23652			if val.chars().count() < 1 {
23653				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
23654			}
23655			if val.chars().count() > 140 {
23656				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
23657			}
23658		}
23659		if let Some(ref val) = self.phne_nb {
23660			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
23661			if !pattern.is_match(val) {
23662				return Err(ValidationError::new(1005, "phne_nb does not match the required pattern".to_string()));
23663			}
23664		}
23665		if let Some(ref val) = self.mob_nb {
23666			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
23667			if !pattern.is_match(val) {
23668				return Err(ValidationError::new(1005, "mob_nb does not match the required pattern".to_string()));
23669			}
23670		}
23671		if let Some(ref val) = self.fax_nb {
23672			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
23673			if !pattern.is_match(val) {
23674				return Err(ValidationError::new(1005, "fax_nb does not match the required pattern".to_string()));
23675			}
23676		}
23677		if let Some(ref val) = self.url_adr {
23678			if val.chars().count() < 1 {
23679				return Err(ValidationError::new(1001, "url_adr is shorter than the minimum length of 1".to_string()));
23680			}
23681			if val.chars().count() > 2048 {
23682				return Err(ValidationError::new(1002, "url_adr exceeds the maximum length of 2048".to_string()));
23683			}
23684		}
23685		if let Some(ref val) = self.email_adr {
23686			if val.chars().count() < 1 {
23687				return Err(ValidationError::new(1001, "email_adr is shorter than the minimum length of 1".to_string()));
23688			}
23689			if val.chars().count() > 256 {
23690				return Err(ValidationError::new(1002, "email_adr exceeds the maximum length of 256".to_string()));
23691			}
23692		}
23693		if let Some(ref val) = self.email_purp {
23694			if val.chars().count() < 1 {
23695				return Err(ValidationError::new(1001, "email_purp is shorter than the minimum length of 1".to_string()));
23696			}
23697			if val.chars().count() > 35 {
23698				return Err(ValidationError::new(1002, "email_purp exceeds the maximum length of 35".to_string()));
23699			}
23700		}
23701		if let Some(ref val) = self.job_titl {
23702			if val.chars().count() < 1 {
23703				return Err(ValidationError::new(1001, "job_titl is shorter than the minimum length of 1".to_string()));
23704			}
23705			if val.chars().count() > 35 {
23706				return Err(ValidationError::new(1002, "job_titl exceeds the maximum length of 35".to_string()));
23707			}
23708		}
23709		if let Some(ref val) = self.rspnsblty {
23710			if val.chars().count() < 1 {
23711				return Err(ValidationError::new(1001, "rspnsblty is shorter than the minimum length of 1".to_string()));
23712			}
23713			if val.chars().count() > 35 {
23714				return Err(ValidationError::new(1002, "rspnsblty exceeds the maximum length of 35".to_string()));
23715			}
23716		}
23717		if let Some(ref val) = self.dept {
23718			if val.chars().count() < 1 {
23719				return Err(ValidationError::new(1001, "dept is shorter than the minimum length of 1".to_string()));
23720			}
23721			if val.chars().count() > 70 {
23722				return Err(ValidationError::new(1002, "dept exceeds the maximum length of 70".to_string()));
23723			}
23724		}
23725		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
23726		if let Some(ref val) = self.prefrd_mtd { val.validate()? }
23727		Ok(())
23728	}
23729}
23730
23731
23732// Contact4 ...
23733#[cfg_attr(feature = "derive_debug", derive(Debug))]
23734#[cfg_attr(feature = "derive_default", derive(Default))]
23735#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23736#[cfg_attr(feature = "derive_clone", derive(Clone))]
23737#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23738pub struct Contact4 {
23739	#[cfg_attr( feature = "derive_serde", serde(rename = "NmPrfx", skip_serializing_if = "Option::is_none") )]
23740	pub nm_prfx: Option<NamePrefix2Code>,
23741	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
23742	pub nm: Option<String>,
23743	#[cfg_attr( feature = "derive_serde", serde(rename = "PhneNb", skip_serializing_if = "Option::is_none") )]
23744	pub phne_nb: Option<String>,
23745	#[cfg_attr( feature = "derive_serde", serde(rename = "MobNb", skip_serializing_if = "Option::is_none") )]
23746	pub mob_nb: Option<String>,
23747	#[cfg_attr( feature = "derive_serde", serde(rename = "FaxNb", skip_serializing_if = "Option::is_none") )]
23748	pub fax_nb: Option<String>,
23749	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailAdr", skip_serializing_if = "Option::is_none") )]
23750	pub email_adr: Option<String>,
23751	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailPurp", skip_serializing_if = "Option::is_none") )]
23752	pub email_purp: Option<String>,
23753	#[cfg_attr( feature = "derive_serde", serde(rename = "JobTitl", skip_serializing_if = "Option::is_none") )]
23754	pub job_titl: Option<String>,
23755	#[cfg_attr( feature = "derive_serde", serde(rename = "Rspnsblty", skip_serializing_if = "Option::is_none") )]
23756	pub rspnsblty: Option<String>,
23757	#[cfg_attr( feature = "derive_serde", serde(rename = "Dept", skip_serializing_if = "Option::is_none") )]
23758	pub dept: Option<String>,
23759	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
23760	pub othr: Option<Vec<OtherContact1>>,
23761	#[cfg_attr( feature = "derive_serde", serde(rename = "PrefrdMtd", skip_serializing_if = "Option::is_none") )]
23762	pub prefrd_mtd: Option<PreferredContactMethod1Code>,
23763}
23764
23765impl Contact4 {
23766	pub fn validate(&self) -> Result<(), ValidationError> {
23767		if let Some(ref val) = self.nm_prfx { val.validate()? }
23768		if let Some(ref val) = self.nm {
23769			if val.chars().count() < 1 {
23770				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
23771			}
23772			if val.chars().count() > 140 {
23773				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
23774			}
23775		}
23776		if let Some(ref val) = self.phne_nb {
23777			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
23778			if !pattern.is_match(val) {
23779				return Err(ValidationError::new(1005, "phne_nb does not match the required pattern".to_string()));
23780			}
23781		}
23782		if let Some(ref val) = self.mob_nb {
23783			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
23784			if !pattern.is_match(val) {
23785				return Err(ValidationError::new(1005, "mob_nb does not match the required pattern".to_string()));
23786			}
23787		}
23788		if let Some(ref val) = self.fax_nb {
23789			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
23790			if !pattern.is_match(val) {
23791				return Err(ValidationError::new(1005, "fax_nb does not match the required pattern".to_string()));
23792			}
23793		}
23794		if let Some(ref val) = self.email_adr {
23795			if val.chars().count() < 1 {
23796				return Err(ValidationError::new(1001, "email_adr is shorter than the minimum length of 1".to_string()));
23797			}
23798			if val.chars().count() > 2048 {
23799				return Err(ValidationError::new(1002, "email_adr exceeds the maximum length of 2048".to_string()));
23800			}
23801		}
23802		if let Some(ref val) = self.email_purp {
23803			if val.chars().count() < 1 {
23804				return Err(ValidationError::new(1001, "email_purp is shorter than the minimum length of 1".to_string()));
23805			}
23806			if val.chars().count() > 35 {
23807				return Err(ValidationError::new(1002, "email_purp exceeds the maximum length of 35".to_string()));
23808			}
23809		}
23810		if let Some(ref val) = self.job_titl {
23811			if val.chars().count() < 1 {
23812				return Err(ValidationError::new(1001, "job_titl is shorter than the minimum length of 1".to_string()));
23813			}
23814			if val.chars().count() > 35 {
23815				return Err(ValidationError::new(1002, "job_titl exceeds the maximum length of 35".to_string()));
23816			}
23817		}
23818		if let Some(ref val) = self.rspnsblty {
23819			if val.chars().count() < 1 {
23820				return Err(ValidationError::new(1001, "rspnsblty is shorter than the minimum length of 1".to_string()));
23821			}
23822			if val.chars().count() > 35 {
23823				return Err(ValidationError::new(1002, "rspnsblty exceeds the maximum length of 35".to_string()));
23824			}
23825		}
23826		if let Some(ref val) = self.dept {
23827			if val.chars().count() < 1 {
23828				return Err(ValidationError::new(1001, "dept is shorter than the minimum length of 1".to_string()));
23829			}
23830			if val.chars().count() > 70 {
23831				return Err(ValidationError::new(1002, "dept exceeds the maximum length of 70".to_string()));
23832			}
23833		}
23834		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
23835		if let Some(ref val) = self.prefrd_mtd { val.validate()? }
23836		Ok(())
23837	}
23838}
23839
23840
23841// Contact9 ...
23842#[cfg_attr(feature = "derive_debug", derive(Debug))]
23843#[cfg_attr(feature = "derive_default", derive(Default))]
23844#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23845#[cfg_attr(feature = "derive_clone", derive(Clone))]
23846#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23847pub struct Contact9 {
23848	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
23849	pub nm: String,
23850	#[cfg_attr( feature = "derive_serde", serde(rename = "PhneNb") )]
23851	pub phne_nb: String,
23852	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailAdr") )]
23853	pub email_adr: String,
23854	#[cfg_attr( feature = "derive_serde", serde(rename = "Fctn", skip_serializing_if = "Option::is_none") )]
23855	pub fctn: Option<String>,
23856}
23857
23858impl Contact9 {
23859	pub fn validate(&self) -> Result<(), ValidationError> {
23860		if self.nm.chars().count() < 1 {
23861			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
23862		}
23863		if self.nm.chars().count() > 140 {
23864			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
23865		}
23866		let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
23867		if !pattern.is_match(&self.phne_nb) {
23868			return Err(ValidationError::new(1005, "phne_nb does not match the required pattern".to_string()));
23869		}
23870		if self.email_adr.chars().count() < 1 {
23871			return Err(ValidationError::new(1001, "email_adr is shorter than the minimum length of 1".to_string()));
23872		}
23873		if self.email_adr.chars().count() > 256 {
23874			return Err(ValidationError::new(1002, "email_adr exceeds the maximum length of 256".to_string()));
23875		}
23876		if let Some(ref val) = self.fctn {
23877			if val.chars().count() < 1 {
23878				return Err(ValidationError::new(1001, "fctn is shorter than the minimum length of 1".to_string()));
23879			}
23880			if val.chars().count() > 140 {
23881				return Err(ValidationError::new(1002, "fctn exceeds the maximum length of 140".to_string()));
23882			}
23883		}
23884		Ok(())
23885	}
23886}
23887
23888
23889// ContactAttributes5 ...
23890#[cfg_attr(feature = "derive_debug", derive(Debug))]
23891#[cfg_attr(feature = "derive_default", derive(Default))]
23892#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23893#[cfg_attr(feature = "derive_clone", derive(Clone))]
23894#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23895pub struct ContactAttributes5 {
23896	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
23897	pub nm: String,
23898	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
23899	pub pstl_adr: Option<PostalAddress1>,
23900	#[cfg_attr( feature = "derive_serde", serde(rename = "PhneNb", skip_serializing_if = "Option::is_none") )]
23901	pub phne_nb: Option<String>,
23902	#[cfg_attr( feature = "derive_serde", serde(rename = "FaxNb", skip_serializing_if = "Option::is_none") )]
23903	pub fax_nb: Option<String>,
23904	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailAdr", skip_serializing_if = "Option::is_none") )]
23905	pub email_adr: Option<String>,
23906	#[cfg_attr( feature = "derive_serde", serde(rename = "URLAdr", skip_serializing_if = "Option::is_none") )]
23907	pub url_adr: Option<String>,
23908	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
23909	pub any_bic: Option<String>,
23910	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
23911	pub lei: Option<String>,
23912}
23913
23914impl ContactAttributes5 {
23915	pub fn validate(&self) -> Result<(), ValidationError> {
23916		if self.nm.chars().count() < 1 {
23917			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
23918		}
23919		if self.nm.chars().count() > 350 {
23920			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
23921		}
23922		if let Some(ref val) = self.pstl_adr { val.validate()? }
23923		if let Some(ref val) = self.phne_nb {
23924			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
23925			if !pattern.is_match(val) {
23926				return Err(ValidationError::new(1005, "phne_nb does not match the required pattern".to_string()));
23927			}
23928		}
23929		if let Some(ref val) = self.fax_nb {
23930			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
23931			if !pattern.is_match(val) {
23932				return Err(ValidationError::new(1005, "fax_nb does not match the required pattern".to_string()));
23933			}
23934		}
23935		if let Some(ref val) = self.email_adr {
23936			if val.chars().count() < 1 {
23937				return Err(ValidationError::new(1001, "email_adr is shorter than the minimum length of 1".to_string()));
23938			}
23939			if val.chars().count() > 256 {
23940				return Err(ValidationError::new(1002, "email_adr exceeds the maximum length of 256".to_string()));
23941			}
23942		}
23943		if let Some(ref val) = self.url_adr {
23944			if val.chars().count() < 1 {
23945				return Err(ValidationError::new(1001, "url_adr is shorter than the minimum length of 1".to_string()));
23946			}
23947			if val.chars().count() > 2048 {
23948				return Err(ValidationError::new(1002, "url_adr exceeds the maximum length of 2048".to_string()));
23949			}
23950		}
23951		if let Some(ref val) = self.any_bic {
23952			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
23953			if !pattern.is_match(val) {
23954				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
23955			}
23956		}
23957		if let Some(ref val) = self.lei {
23958			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
23959			if !pattern.is_match(val) {
23960				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
23961			}
23962		}
23963		Ok(())
23964	}
23965}
23966
23967
23968// ContactAttributes6 ...
23969#[cfg_attr(feature = "derive_debug", derive(Debug))]
23970#[cfg_attr(feature = "derive_default", derive(Default))]
23971#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
23972#[cfg_attr(feature = "derive_clone", derive(Clone))]
23973#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
23974pub struct ContactAttributes6 {
23975	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
23976	pub nm: Option<String>,
23977	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
23978	pub pstl_adr: Option<PostalAddress1>,
23979	#[cfg_attr( feature = "derive_serde", serde(rename = "PhneNb", skip_serializing_if = "Option::is_none") )]
23980	pub phne_nb: Option<String>,
23981	#[cfg_attr( feature = "derive_serde", serde(rename = "FaxNb", skip_serializing_if = "Option::is_none") )]
23982	pub fax_nb: Option<String>,
23983	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailAdr", skip_serializing_if = "Option::is_none") )]
23984	pub email_adr: Option<String>,
23985	#[cfg_attr( feature = "derive_serde", serde(rename = "URLAdr", skip_serializing_if = "Option::is_none") )]
23986	pub url_adr: Option<String>,
23987	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
23988	pub any_bic: Option<String>,
23989	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
23990	pub lei: Option<String>,
23991}
23992
23993impl ContactAttributes6 {
23994	pub fn validate(&self) -> Result<(), ValidationError> {
23995		if let Some(ref val) = self.nm {
23996			if val.chars().count() < 1 {
23997				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
23998			}
23999			if val.chars().count() > 350 {
24000				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
24001			}
24002		}
24003		if let Some(ref val) = self.pstl_adr { val.validate()? }
24004		if let Some(ref val) = self.phne_nb {
24005			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
24006			if !pattern.is_match(val) {
24007				return Err(ValidationError::new(1005, "phne_nb does not match the required pattern".to_string()));
24008			}
24009		}
24010		if let Some(ref val) = self.fax_nb {
24011			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
24012			if !pattern.is_match(val) {
24013				return Err(ValidationError::new(1005, "fax_nb does not match the required pattern".to_string()));
24014			}
24015		}
24016		if let Some(ref val) = self.email_adr {
24017			if val.chars().count() < 1 {
24018				return Err(ValidationError::new(1001, "email_adr is shorter than the minimum length of 1".to_string()));
24019			}
24020			if val.chars().count() > 256 {
24021				return Err(ValidationError::new(1002, "email_adr exceeds the maximum length of 256".to_string()));
24022			}
24023		}
24024		if let Some(ref val) = self.url_adr {
24025			if val.chars().count() < 1 {
24026				return Err(ValidationError::new(1001, "url_adr is shorter than the minimum length of 1".to_string()));
24027			}
24028			if val.chars().count() > 2048 {
24029				return Err(ValidationError::new(1002, "url_adr exceeds the maximum length of 2048".to_string()));
24030			}
24031		}
24032		if let Some(ref val) = self.any_bic {
24033			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
24034			if !pattern.is_match(val) {
24035				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
24036			}
24037		}
24038		if let Some(ref val) = self.lei {
24039			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
24040			if !pattern.is_match(val) {
24041				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
24042			}
24043		}
24044		Ok(())
24045	}
24046}
24047
24048
24049// ContactDetails2 ...
24050#[cfg_attr(feature = "derive_debug", derive(Debug))]
24051#[cfg_attr(feature = "derive_default", derive(Default))]
24052#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24053#[cfg_attr(feature = "derive_clone", derive(Clone))]
24054#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24055pub struct ContactDetails2 {
24056	#[cfg_attr( feature = "derive_serde", serde(rename = "NmPrfx", skip_serializing_if = "Option::is_none") )]
24057	pub nm_prfx: Option<NamePrefix1Code>,
24058	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
24059	pub nm: Option<String>,
24060	#[cfg_attr( feature = "derive_serde", serde(rename = "PhneNb", skip_serializing_if = "Option::is_none") )]
24061	pub phne_nb: Option<String>,
24062	#[cfg_attr( feature = "derive_serde", serde(rename = "MobNb", skip_serializing_if = "Option::is_none") )]
24063	pub mob_nb: Option<String>,
24064	#[cfg_attr( feature = "derive_serde", serde(rename = "FaxNb", skip_serializing_if = "Option::is_none") )]
24065	pub fax_nb: Option<String>,
24066	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailAdr", skip_serializing_if = "Option::is_none") )]
24067	pub email_adr: Option<String>,
24068	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
24069	pub othr: Option<String>,
24070}
24071
24072impl ContactDetails2 {
24073	pub fn validate(&self) -> Result<(), ValidationError> {
24074		if let Some(ref val) = self.nm_prfx { val.validate()? }
24075		if let Some(ref val) = self.nm {
24076			if val.chars().count() < 1 {
24077				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
24078			}
24079			if val.chars().count() > 140 {
24080				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
24081			}
24082		}
24083		if let Some(ref val) = self.phne_nb {
24084			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
24085			if !pattern.is_match(val) {
24086				return Err(ValidationError::new(1005, "phne_nb does not match the required pattern".to_string()));
24087			}
24088		}
24089		if let Some(ref val) = self.mob_nb {
24090			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
24091			if !pattern.is_match(val) {
24092				return Err(ValidationError::new(1005, "mob_nb does not match the required pattern".to_string()));
24093			}
24094		}
24095		if let Some(ref val) = self.fax_nb {
24096			let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
24097			if !pattern.is_match(val) {
24098				return Err(ValidationError::new(1005, "fax_nb does not match the required pattern".to_string()));
24099			}
24100		}
24101		if let Some(ref val) = self.email_adr {
24102			if val.chars().count() < 1 {
24103				return Err(ValidationError::new(1001, "email_adr is shorter than the minimum length of 1".to_string()));
24104			}
24105			if val.chars().count() > 2048 {
24106				return Err(ValidationError::new(1002, "email_adr exceeds the maximum length of 2048".to_string()));
24107			}
24108		}
24109		if let Some(ref val) = self.othr {
24110			if val.chars().count() < 1 {
24111				return Err(ValidationError::new(1001, "othr is shorter than the minimum length of 1".to_string()));
24112			}
24113			if val.chars().count() > 35 {
24114				return Err(ValidationError::new(1002, "othr exceeds the maximum length of 35".to_string()));
24115			}
24116		}
24117		Ok(())
24118	}
24119}
24120
24121
24122// ContactDetails4 ...
24123#[cfg_attr(feature = "derive_debug", derive(Debug))]
24124#[cfg_attr(feature = "derive_default", derive(Default))]
24125#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24126#[cfg_attr(feature = "derive_clone", derive(Clone))]
24127#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24128pub struct ContactDetails4 {
24129	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
24130	pub nm: String,
24131	#[cfg_attr( feature = "derive_serde", serde(rename = "PhneNb") )]
24132	pub phne_nb: String,
24133	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailAdr") )]
24134	pub email_adr: String,
24135	#[cfg_attr( feature = "derive_serde", serde(rename = "Fctn") )]
24136	pub fctn: String,
24137}
24138
24139impl ContactDetails4 {
24140	pub fn validate(&self) -> Result<(), ValidationError> {
24141		if self.nm.chars().count() < 1 {
24142			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
24143		}
24144		if self.nm.chars().count() > 140 {
24145			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
24146		}
24147		let pattern = Regex::new("\\+[0-9]{1,3}-[0-9()+\\-]{1,30}").unwrap();
24148		if !pattern.is_match(&self.phne_nb) {
24149			return Err(ValidationError::new(1005, "phne_nb does not match the required pattern".to_string()));
24150		}
24151		if self.email_adr.chars().count() < 1 {
24152			return Err(ValidationError::new(1001, "email_adr is shorter than the minimum length of 1".to_string()));
24153		}
24154		if self.email_adr.chars().count() > 2048 {
24155			return Err(ValidationError::new(1002, "email_adr exceeds the maximum length of 2048".to_string()));
24156		}
24157		if self.fctn.chars().count() < 1 {
24158			return Err(ValidationError::new(1001, "fctn is shorter than the minimum length of 1".to_string()));
24159		}
24160		if self.fctn.chars().count() > 140 {
24161			return Err(ValidationError::new(1002, "fctn exceeds the maximum length of 140".to_string()));
24162		}
24163		Ok(())
24164	}
24165}
24166
24167
24168// ContactIdentificationAndAddress1 ...
24169#[cfg_attr(feature = "derive_debug", derive(Debug))]
24170#[cfg_attr(feature = "derive_default", derive(Default))]
24171#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24172#[cfg_attr(feature = "derive_clone", derive(Clone))]
24173#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24174pub struct ContactIdentificationAndAddress1 {
24175	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
24176	pub nm: Option<String>,
24177	#[cfg_attr( feature = "derive_serde", serde(rename = "Role") )]
24178	pub role: PaymentRole1Code,
24179	#[cfg_attr( feature = "derive_serde", serde(rename = "ComAdr") )]
24180	pub com_adr: CommunicationAddress8,
24181}
24182
24183impl ContactIdentificationAndAddress1 {
24184	pub fn validate(&self) -> Result<(), ValidationError> {
24185		if let Some(ref val) = self.nm {
24186			if val.chars().count() < 1 {
24187				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
24188			}
24189			if val.chars().count() > 35 {
24190				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 35".to_string()));
24191			}
24192		}
24193		self.role.validate()?;
24194		self.com_adr.validate()?;
24195		Ok(())
24196	}
24197}
24198
24199
24200// ContactIdentificationAndAddress2 ...
24201#[cfg_attr(feature = "derive_debug", derive(Debug))]
24202#[cfg_attr(feature = "derive_default", derive(Default))]
24203#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24204#[cfg_attr(feature = "derive_clone", derive(Clone))]
24205#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24206pub struct ContactIdentificationAndAddress2 {
24207	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
24208	pub nm: Option<String>,
24209	#[cfg_attr( feature = "derive_serde", serde(rename = "Role") )]
24210	pub role: PaymentRole1Choice,
24211	#[cfg_attr( feature = "derive_serde", serde(rename = "ComAdr") )]
24212	pub com_adr: CommunicationAddress10,
24213}
24214
24215impl ContactIdentificationAndAddress2 {
24216	pub fn validate(&self) -> Result<(), ValidationError> {
24217		if let Some(ref val) = self.nm {
24218			if val.chars().count() < 1 {
24219				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
24220			}
24221			if val.chars().count() > 35 {
24222				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 35".to_string()));
24223			}
24224		}
24225		self.role.validate()?;
24226		self.com_adr.validate()?;
24227		Ok(())
24228	}
24229}
24230
24231
24232// ContractBalance1 ...
24233#[cfg_attr(feature = "derive_debug", derive(Debug))]
24234#[cfg_attr(feature = "derive_default", derive(Default))]
24235#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24236#[cfg_attr(feature = "derive_clone", derive(Clone))]
24237#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24238pub struct ContractBalance1 {
24239	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
24240	pub tp: ContractBalanceType1Choice,
24241	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
24242	pub amt: ActiveCurrencyAndAmount,
24243	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
24244	pub cdt_dbt_ind: CreditDebit3Code,
24245}
24246
24247impl ContractBalance1 {
24248	pub fn validate(&self) -> Result<(), ValidationError> {
24249		self.tp.validate()?;
24250		self.amt.validate()?;
24251		self.cdt_dbt_ind.validate()?;
24252		Ok(())
24253	}
24254}
24255
24256
24257// ContractBalanceType1Choice ...
24258#[cfg_attr(feature = "derive_debug", derive(Debug))]
24259#[cfg_attr(feature = "derive_default", derive(Default))]
24260#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24261#[cfg_attr(feature = "derive_clone", derive(Clone))]
24262#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24263pub struct ContractBalanceType1Choice {
24264	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
24265	pub cd: Option<String>,
24266	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
24267	pub prtry: Option<String>,
24268}
24269
24270impl ContractBalanceType1Choice {
24271	pub fn validate(&self) -> Result<(), ValidationError> {
24272		if let Some(ref val) = self.cd {
24273			if val.chars().count() < 1 {
24274				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
24275			}
24276			if val.chars().count() > 4 {
24277				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
24278			}
24279		}
24280		if let Some(ref val) = self.prtry {
24281			if val.chars().count() < 1 {
24282				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
24283			}
24284			if val.chars().count() > 35 {
24285				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
24286			}
24287		}
24288		Ok(())
24289	}
24290}
24291
24292
24293// ContractCessionData2 ...
24294#[cfg_attr(feature = "derive_debug", derive(Debug))]
24295#[cfg_attr(feature = "derive_default", derive(Default))]
24296#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24297#[cfg_attr(feature = "derive_clone", derive(Clone))]
24298#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24299pub struct ContractCessionData2 {
24300	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty") )]
24301	pub pty: TradeParty6,
24302	#[cfg_attr( feature = "derive_serde", serde(rename = "DocNb", skip_serializing_if = "Option::is_none") )]
24303	pub doc_nb: Option<String>,
24304	#[cfg_attr( feature = "derive_serde", serde(rename = "DocDt", skip_serializing_if = "Option::is_none") )]
24305	pub doc_dt: Option<String>,
24306}
24307
24308impl ContractCessionData2 {
24309	pub fn validate(&self) -> Result<(), ValidationError> {
24310		self.pty.validate()?;
24311		if let Some(ref val) = self.doc_nb {
24312			if val.chars().count() < 1 {
24313				return Err(ValidationError::new(1001, "doc_nb is shorter than the minimum length of 1".to_string()));
24314			}
24315			if val.chars().count() > 35 {
24316				return Err(ValidationError::new(1002, "doc_nb exceeds the maximum length of 35".to_string()));
24317			}
24318		}
24319		Ok(())
24320	}
24321}
24322
24323
24324// ContractClosureReason1Choice ...
24325#[cfg_attr(feature = "derive_debug", derive(Debug))]
24326#[cfg_attr(feature = "derive_default", derive(Default))]
24327#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24328#[cfg_attr(feature = "derive_clone", derive(Clone))]
24329#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24330pub struct ContractClosureReason1Choice {
24331	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
24332	pub cd: Option<String>,
24333	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
24334	pub prtry: Option<String>,
24335}
24336
24337impl ContractClosureReason1Choice {
24338	pub fn validate(&self) -> Result<(), ValidationError> {
24339		if let Some(ref val) = self.cd {
24340			if val.chars().count() < 1 {
24341				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
24342			}
24343			if val.chars().count() > 4 {
24344				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
24345			}
24346		}
24347		if let Some(ref val) = self.prtry {
24348			if val.chars().count() < 1 {
24349				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
24350			}
24351			if val.chars().count() > 35 {
24352				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
24353			}
24354		}
24355		Ok(())
24356	}
24357}
24358
24359
24360// ContractCollateral1 ...
24361#[cfg_attr(feature = "derive_debug", derive(Debug))]
24362#[cfg_attr(feature = "derive_default", derive(Default))]
24363#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24364#[cfg_attr(feature = "derive_clone", derive(Clone))]
24365#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24366pub struct ContractCollateral1 {
24367	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlAmt") )]
24368	pub ttl_amt: ActiveCurrencyAndAmount,
24369	#[cfg_attr( feature = "derive_serde", serde(rename = "CollDesc", skip_serializing_if = "Option::is_none") )]
24370	pub coll_desc: Option<Vec<CashCollateral5>>,
24371	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
24372	pub addtl_inf: Option<String>,
24373}
24374
24375impl ContractCollateral1 {
24376	pub fn validate(&self) -> Result<(), ValidationError> {
24377		self.ttl_amt.validate()?;
24378		if let Some(ref vec) = self.coll_desc { for item in vec { item.validate()? } }
24379		if let Some(ref val) = self.addtl_inf {
24380			if val.chars().count() < 1 {
24381				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
24382			}
24383			if val.chars().count() > 1025 {
24384				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 1025".to_string()));
24385			}
24386		}
24387		Ok(())
24388	}
24389}
24390
24391
24392// ContractDocument1 ...
24393#[cfg_attr(feature = "derive_debug", derive(Debug))]
24394#[cfg_attr(feature = "derive_default", derive(Default))]
24395#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24396#[cfg_attr(feature = "derive_clone", derive(Clone))]
24397#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24398pub struct ContractDocument1 {
24399	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref") )]
24400	pub ref_attr: String,
24401	#[cfg_attr( feature = "derive_serde", serde(rename = "SgnOffDt", skip_serializing_if = "Option::is_none") )]
24402	pub sgn_off_dt: Option<String>,
24403	#[cfg_attr( feature = "derive_serde", serde(rename = "Vrsn", skip_serializing_if = "Option::is_none") )]
24404	pub vrsn: Option<String>,
24405}
24406
24407impl ContractDocument1 {
24408	pub fn validate(&self) -> Result<(), ValidationError> {
24409		if self.ref_attr.chars().count() < 1 {
24410			return Err(ValidationError::new(1001, "ref_attr is shorter than the minimum length of 1".to_string()));
24411		}
24412		if self.ref_attr.chars().count() > 35 {
24413			return Err(ValidationError::new(1002, "ref_attr exceeds the maximum length of 35".to_string()));
24414		}
24415		if let Some(ref val) = self.vrsn {
24416			if val.chars().count() < 1 {
24417				return Err(ValidationError::new(1001, "vrsn is shorter than the minimum length of 1".to_string()));
24418			}
24419			if val.chars().count() > 6 {
24420				return Err(ValidationError::new(1002, "vrsn exceeds the maximum length of 6".to_string()));
24421			}
24422		}
24423		Ok(())
24424	}
24425}
24426
24427
24428// ContractForDifference2 ...
24429#[cfg_attr(feature = "derive_debug", derive(Debug))]
24430#[cfg_attr(feature = "derive_default", derive(Default))]
24431#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24432#[cfg_attr(feature = "derive_clone", derive(Clone))]
24433#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24434pub struct ContractForDifference2 {
24435	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygTp") )]
24436	pub undrlyg_tp: UnderlyingContractForDifferenceType3Code,
24437	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlCcy1", skip_serializing_if = "Option::is_none") )]
24438	pub ntnl_ccy1: Option<String>,
24439	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlCcy2", skip_serializing_if = "Option::is_none") )]
24440	pub ntnl_ccy2: Option<String>,
24441}
24442
24443impl ContractForDifference2 {
24444	pub fn validate(&self) -> Result<(), ValidationError> {
24445		self.undrlyg_tp.validate()?;
24446		if let Some(ref val) = self.ntnl_ccy1 {
24447			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
24448			if !pattern.is_match(val) {
24449				return Err(ValidationError::new(1005, "ntnl_ccy1 does not match the required pattern".to_string()));
24450			}
24451		}
24452		if let Some(ref val) = self.ntnl_ccy2 {
24453			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
24454			if !pattern.is_match(val) {
24455				return Err(ValidationError::new(1005, "ntnl_ccy2 does not match the required pattern".to_string()));
24456			}
24457		}
24458		Ok(())
24459	}
24460}
24461
24462
24463// ContractMatchingCriteria3 ...
24464#[cfg_attr(feature = "derive_debug", derive(Debug))]
24465#[cfg_attr(feature = "derive_default", derive(Default))]
24466#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24467#[cfg_attr(feature = "derive_clone", derive(Clone))]
24468#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24469pub struct ContractMatchingCriteria3 {
24470	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
24471	pub isin: Option<CompareISINIdentifier2>,
24472	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqPdctIdr", skip_serializing_if = "Option::is_none") )]
24473	pub unq_pdct_idr: Option<CompareUniqueProductIdentifier2>,
24474	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrntvInstrmId", skip_serializing_if = "Option::is_none") )]
24475	pub altrntv_instrm_id: Option<CompareText1>,
24476	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctClssfctn", skip_serializing_if = "Option::is_none") )]
24477	pub pdct_clssfctn: Option<CompareCFIIdentifier3>,
24478	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctTp", skip_serializing_if = "Option::is_none") )]
24479	pub ctrct_tp: Option<CompareFinancialInstrumentContractType1>,
24480	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstClss", skip_serializing_if = "Option::is_none") )]
24481	pub asst_clss: Option<CompareAssetClass1>,
24482	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivBasedOnCrptAsst", skip_serializing_if = "Option::is_none") )]
24483	pub deriv_based_on_crpt_asst: Option<CompareTrueFalseIndicator3>,
24484	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygInstrm", skip_serializing_if = "Option::is_none") )]
24485	pub undrlyg_instrm: Option<CompareUnderlyingInstrument3>,
24486	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcy", skip_serializing_if = "Option::is_none") )]
24487	pub sttlm_ccy: Option<CompareActiveOrHistoricCurrencyCode1>,
24488	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcyScndLeg", skip_serializing_if = "Option::is_none") )]
24489	pub sttlm_ccy_scnd_leg: Option<CompareActiveOrHistoricCurrencyCode1>,
24490}
24491
24492impl ContractMatchingCriteria3 {
24493	pub fn validate(&self) -> Result<(), ValidationError> {
24494		if let Some(ref val) = self.isin { val.validate()? }
24495		if let Some(ref val) = self.unq_pdct_idr { val.validate()? }
24496		if let Some(ref val) = self.altrntv_instrm_id { val.validate()? }
24497		if let Some(ref val) = self.pdct_clssfctn { val.validate()? }
24498		if let Some(ref val) = self.ctrct_tp { val.validate()? }
24499		if let Some(ref val) = self.asst_clss { val.validate()? }
24500		if let Some(ref val) = self.deriv_based_on_crpt_asst { val.validate()? }
24501		if let Some(ref val) = self.undrlyg_instrm { val.validate()? }
24502		if let Some(ref val) = self.sttlm_ccy { val.validate()? }
24503		if let Some(ref val) = self.sttlm_ccy_scnd_leg { val.validate()? }
24504		Ok(())
24505	}
24506}
24507
24508
24509// ContractModification3 ...
24510#[cfg_attr(feature = "derive_debug", derive(Debug))]
24511#[cfg_attr(feature = "derive_default", derive(Default))]
24512#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24513#[cfg_attr(feature = "derive_clone", derive(Clone))]
24514#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24515pub struct ContractModification3 {
24516	#[cfg_attr( feature = "derive_serde", serde(rename = "ActnTp") )]
24517	pub actn_tp: TransactionOperationType6Code,
24518	#[cfg_attr( feature = "derive_serde", serde(rename = "Lvl", skip_serializing_if = "Option::is_none") )]
24519	pub lvl: Option<ModificationLevel1Code>,
24520}
24521
24522impl ContractModification3 {
24523	pub fn validate(&self) -> Result<(), ValidationError> {
24524		self.actn_tp.validate()?;
24525		if let Some(ref val) = self.lvl { val.validate()? }
24526		Ok(())
24527	}
24528}
24529
24530
24531// ContractModification8 ...
24532#[cfg_attr(feature = "derive_debug", derive(Debug))]
24533#[cfg_attr(feature = "derive_default", derive(Default))]
24534#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24535#[cfg_attr(feature = "derive_clone", derive(Clone))]
24536#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24537pub struct ContractModification8 {
24538	#[cfg_attr( feature = "derive_serde", serde(rename = "ActnTp") )]
24539	pub actn_tp: TransactionOperationType11Code,
24540}
24541
24542impl ContractModification8 {
24543	pub fn validate(&self) -> Result<(), ValidationError> {
24544		self.actn_tp.validate()?;
24545		Ok(())
24546	}
24547}
24548
24549
24550// ContractModification9 ...
24551#[cfg_attr(feature = "derive_debug", derive(Debug))]
24552#[cfg_attr(feature = "derive_default", derive(Default))]
24553#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24554#[cfg_attr(feature = "derive_clone", derive(Clone))]
24555#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24556pub struct ContractModification9 {
24557	#[cfg_attr( feature = "derive_serde", serde(rename = "ActnTp", skip_serializing_if = "Option::is_none") )]
24558	pub actn_tp: Option<TransactionOperationType10Code>,
24559	#[cfg_attr( feature = "derive_serde", serde(rename = "Lvl", skip_serializing_if = "Option::is_none") )]
24560	pub lvl: Option<ModificationLevel1Code>,
24561}
24562
24563impl ContractModification9 {
24564	pub fn validate(&self) -> Result<(), ValidationError> {
24565		if let Some(ref val) = self.actn_tp { val.validate()? }
24566		if let Some(ref val) = self.lvl { val.validate()? }
24567		Ok(())
24568	}
24569}
24570
24571
24572// ContractReference1 ...
24573#[cfg_attr(feature = "derive_debug", derive(Debug))]
24574#[cfg_attr(feature = "derive_default", derive(Default))]
24575#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24576#[cfg_attr(feature = "derive_clone", derive(Clone))]
24577#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24578pub struct ContractReference1 {
24579	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
24580	pub tp: Option<DocumentType1Choice>,
24581	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref") )]
24582	pub ref_attr: String,
24583}
24584
24585impl ContractReference1 {
24586	pub fn validate(&self) -> Result<(), ValidationError> {
24587		if let Some(ref val) = self.tp { val.validate()? }
24588		if self.ref_attr.chars().count() < 1 {
24589			return Err(ValidationError::new(1001, "ref_attr is shorter than the minimum length of 1".to_string()));
24590		}
24591		if self.ref_attr.chars().count() > 500 {
24592			return Err(ValidationError::new(1002, "ref_attr exceeds the maximum length of 500".to_string()));
24593		}
24594		Ok(())
24595	}
24596}
24597
24598
24599// ContractRegistration7 ...
24600#[cfg_attr(feature = "derive_debug", derive(Debug))]
24601#[cfg_attr(feature = "derive_default", derive(Default))]
24602#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24603#[cfg_attr(feature = "derive_clone", derive(Clone))]
24604#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24605pub struct ContractRegistration7 {
24606	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctRegnId") )]
24607	pub ctrct_regn_id: String,
24608	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPty") )]
24609	pub rptg_pty: TradeParty6,
24610	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnAgt") )]
24611	pub regn_agt: BranchAndFinancialInstitutionIdentification8,
24612	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctRegnOpng") )]
24613	pub ctrct_regn_opng: Vec<ContractRegistration8>,
24614	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
24615	pub splmtry_data: Option<Vec<SupplementaryData1>>,
24616}
24617
24618impl ContractRegistration7 {
24619	pub fn validate(&self) -> Result<(), ValidationError> {
24620		if self.ctrct_regn_id.chars().count() < 1 {
24621			return Err(ValidationError::new(1001, "ctrct_regn_id is shorter than the minimum length of 1".to_string()));
24622		}
24623		if self.ctrct_regn_id.chars().count() > 35 {
24624			return Err(ValidationError::new(1002, "ctrct_regn_id exceeds the maximum length of 35".to_string()));
24625		}
24626		self.rptg_pty.validate()?;
24627		self.regn_agt.validate()?;
24628		for item in &self.ctrct_regn_opng { item.validate()? }
24629		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
24630		Ok(())
24631	}
24632}
24633
24634
24635// ContractRegistration8 ...
24636#[cfg_attr(feature = "derive_debug", derive(Debug))]
24637#[cfg_attr(feature = "derive_default", derive(Default))]
24638#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24639#[cfg_attr(feature = "derive_clone", derive(Clone))]
24640#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24641pub struct ContractRegistration8 {
24642	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctRegnOpngId") )]
24643	pub ctrct_regn_opng_id: String,
24644	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty") )]
24645	pub prty: Priority2Code,
24646	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctrct") )]
24647	pub ctrct: UnderlyingContract4Choice,
24648	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctBal", skip_serializing_if = "Option::is_none") )]
24649	pub ctrct_bal: Option<Vec<ContractBalance1>>,
24650	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtSchdlTp", skip_serializing_if = "Option::is_none") )]
24651	pub pmt_schdl_tp: Option<PaymentScheduleType2Choice>,
24652	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsRegnId", skip_serializing_if = "Option::is_none") )]
24653	pub prvs_regn_id: Option<Vec<DocumentIdentification22>>,
24654	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
24655	pub addtl_inf: Option<String>,
24656	#[cfg_attr( feature = "derive_serde", serde(rename = "Attchmnt", skip_serializing_if = "Option::is_none") )]
24657	pub attchmnt: Option<Vec<DocumentGeneralInformation5>>,
24658	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
24659	pub splmtry_data: Option<Vec<SupplementaryData1>>,
24660}
24661
24662impl ContractRegistration8 {
24663	pub fn validate(&self) -> Result<(), ValidationError> {
24664		if self.ctrct_regn_opng_id.chars().count() < 1 {
24665			return Err(ValidationError::new(1001, "ctrct_regn_opng_id is shorter than the minimum length of 1".to_string()));
24666		}
24667		if self.ctrct_regn_opng_id.chars().count() > 35 {
24668			return Err(ValidationError::new(1002, "ctrct_regn_opng_id exceeds the maximum length of 35".to_string()));
24669		}
24670		self.prty.validate()?;
24671		self.ctrct.validate()?;
24672		if let Some(ref vec) = self.ctrct_bal { for item in vec { item.validate()? } }
24673		if let Some(ref val) = self.pmt_schdl_tp { val.validate()? }
24674		if let Some(ref vec) = self.prvs_regn_id { for item in vec { item.validate()? } }
24675		if let Some(ref val) = self.addtl_inf {
24676			if val.chars().count() < 1 {
24677				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
24678			}
24679			if val.chars().count() > 1025 {
24680				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 1025".to_string()));
24681			}
24682		}
24683		if let Some(ref vec) = self.attchmnt { for item in vec { item.validate()? } }
24684		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
24685		Ok(())
24686	}
24687}
24688
24689
24690// ContractRegistrationReference2Choice ...
24691#[cfg_attr(feature = "derive_debug", derive(Debug))]
24692#[cfg_attr(feature = "derive_default", derive(Default))]
24693#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24694#[cfg_attr(feature = "derive_clone", derive(Clone))]
24695#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24696pub struct ContractRegistrationReference2Choice {
24697	#[cfg_attr( feature = "derive_serde", serde(rename = "RegdCtrctId", skip_serializing_if = "Option::is_none") )]
24698	pub regd_ctrct_id: Option<String>,
24699	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctrct", skip_serializing_if = "Option::is_none") )]
24700	pub ctrct: Option<DocumentIdentification35>,
24701}
24702
24703impl ContractRegistrationReference2Choice {
24704	pub fn validate(&self) -> Result<(), ValidationError> {
24705		if let Some(ref val) = self.regd_ctrct_id {
24706			if val.chars().count() < 1 {
24707				return Err(ValidationError::new(1001, "regd_ctrct_id is shorter than the minimum length of 1".to_string()));
24708			}
24709			if val.chars().count() > 35 {
24710				return Err(ValidationError::new(1002, "regd_ctrct_id exceeds the maximum length of 35".to_string()));
24711			}
24712		}
24713		if let Some(ref val) = self.ctrct { val.validate()? }
24714		Ok(())
24715	}
24716}
24717
24718
24719// ContractRegistrationStatement4 ...
24720#[cfg_attr(feature = "derive_debug", derive(Debug))]
24721#[cfg_attr(feature = "derive_default", derive(Default))]
24722#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24723#[cfg_attr(feature = "derive_clone", derive(Clone))]
24724#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24725pub struct ContractRegistrationStatement4 {
24726	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtId", skip_serializing_if = "Option::is_none") )]
24727	pub stmt_id: Option<String>,
24728	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPty") )]
24729	pub rptg_pty: TradeParty6,
24730	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnAgt") )]
24731	pub regn_agt: BranchAndFinancialInstitutionIdentification8,
24732	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPrd") )]
24733	pub rptg_prd: ReportingPeriod4,
24734	#[cfg_attr( feature = "derive_serde", serde(rename = "RegdCtrct") )]
24735	pub regd_ctrct: RegisteredContract18,
24736	#[cfg_attr( feature = "derive_serde", serde(rename = "TxJrnl", skip_serializing_if = "Option::is_none") )]
24737	pub tx_jrnl: Option<Vec<TransactionCertificate4>>,
24738	#[cfg_attr( feature = "derive_serde", serde(rename = "SpprtgDocJrnl", skip_serializing_if = "Option::is_none") )]
24739	pub spprtg_doc_jrnl: Option<Vec<SupportingDocument4>>,
24740	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSpprtgDocJrnl", skip_serializing_if = "Option::is_none") )]
24741	pub addtl_spprtg_doc_jrnl: Option<Vec<SupportingDocument4>>,
24742	#[cfg_attr( feature = "derive_serde", serde(rename = "RgltryRuleVldtn", skip_serializing_if = "Option::is_none") )]
24743	pub rgltry_rule_vldtn: Option<Vec<GenericValidationRuleIdentification1>>,
24744	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlCtrctTrnvrSum") )]
24745	pub ttl_ctrct_trnvr_sum: ActiveCurrencyAndAmount,
24746	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
24747	pub splmtry_data: Option<Vec<SupplementaryData1>>,
24748}
24749
24750impl ContractRegistrationStatement4 {
24751	pub fn validate(&self) -> Result<(), ValidationError> {
24752		if let Some(ref val) = self.stmt_id {
24753			if val.chars().count() < 1 {
24754				return Err(ValidationError::new(1001, "stmt_id is shorter than the minimum length of 1".to_string()));
24755			}
24756			if val.chars().count() > 35 {
24757				return Err(ValidationError::new(1002, "stmt_id exceeds the maximum length of 35".to_string()));
24758			}
24759		}
24760		self.rptg_pty.validate()?;
24761		self.regn_agt.validate()?;
24762		self.rptg_prd.validate()?;
24763		self.regd_ctrct.validate()?;
24764		if let Some(ref vec) = self.tx_jrnl { for item in vec { item.validate()? } }
24765		if let Some(ref vec) = self.spprtg_doc_jrnl { for item in vec { item.validate()? } }
24766		if let Some(ref vec) = self.addtl_spprtg_doc_jrnl { for item in vec { item.validate()? } }
24767		if let Some(ref vec) = self.rgltry_rule_vldtn { for item in vec { item.validate()? } }
24768		self.ttl_ctrct_trnvr_sum.validate()?;
24769		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
24770		Ok(())
24771	}
24772}
24773
24774
24775// ContractRegistrationStatementCriteria1 ...
24776#[cfg_attr(feature = "derive_debug", derive(Debug))]
24777#[cfg_attr(feature = "derive_default", derive(Default))]
24778#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24779#[cfg_attr(feature = "derive_clone", derive(Clone))]
24780#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24781pub struct ContractRegistrationStatementCriteria1 {
24782	#[cfg_attr( feature = "derive_serde", serde(rename = "TxJrnl", skip_serializing_if = "Option::is_none") )]
24783	pub tx_jrnl: Option<bool>,
24784	#[cfg_attr( feature = "derive_serde", serde(rename = "SpprtgDocJrnl", skip_serializing_if = "Option::is_none") )]
24785	pub spprtg_doc_jrnl: Option<bool>,
24786	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSpprtgDocJrnl", skip_serializing_if = "Option::is_none") )]
24787	pub addtl_spprtg_doc_jrnl: Option<bool>,
24788	#[cfg_attr( feature = "derive_serde", serde(rename = "RgltryRuleVldtn", skip_serializing_if = "Option::is_none") )]
24789	pub rgltry_rule_vldtn: Option<bool>,
24790}
24791
24792impl ContractRegistrationStatementCriteria1 {
24793	pub fn validate(&self) -> Result<(), ValidationError> {
24794		Ok(())
24795	}
24796}
24797
24798
24799// ContractRegistrationStatementRequest3 ...
24800#[cfg_attr(feature = "derive_debug", derive(Debug))]
24801#[cfg_attr(feature = "derive_default", derive(Default))]
24802#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24803#[cfg_attr(feature = "derive_clone", derive(Clone))]
24804#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24805pub struct ContractRegistrationStatementRequest3 {
24806	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtReqId") )]
24807	pub stmt_req_id: String,
24808	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPrd") )]
24809	pub rptg_prd: ReportingPeriod4,
24810	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPty") )]
24811	pub rptg_pty: TradeParty6,
24812	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnAgt") )]
24813	pub regn_agt: BranchAndFinancialInstitutionIdentification8,
24814	#[cfg_attr( feature = "derive_serde", serde(rename = "RegdCtrctId") )]
24815	pub regd_ctrct_id: String,
24816	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrCrit", skip_serializing_if = "Option::is_none") )]
24817	pub rtr_crit: Option<ContractRegistrationStatementCriteria1>,
24818	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
24819	pub splmtry_data: Option<Vec<SupplementaryData1>>,
24820}
24821
24822impl ContractRegistrationStatementRequest3 {
24823	pub fn validate(&self) -> Result<(), ValidationError> {
24824		if self.stmt_req_id.chars().count() < 1 {
24825			return Err(ValidationError::new(1001, "stmt_req_id is shorter than the minimum length of 1".to_string()));
24826		}
24827		if self.stmt_req_id.chars().count() > 35 {
24828			return Err(ValidationError::new(1002, "stmt_req_id exceeds the maximum length of 35".to_string()));
24829		}
24830		self.rptg_prd.validate()?;
24831		self.rptg_pty.validate()?;
24832		self.regn_agt.validate()?;
24833		if self.regd_ctrct_id.chars().count() < 1 {
24834			return Err(ValidationError::new(1001, "regd_ctrct_id is shorter than the minimum length of 1".to_string()));
24835		}
24836		if self.regd_ctrct_id.chars().count() > 35 {
24837			return Err(ValidationError::new(1002, "regd_ctrct_id exceeds the maximum length of 35".to_string()));
24838		}
24839		if let Some(ref val) = self.rtr_crit { val.validate()? }
24840		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
24841		Ok(())
24842	}
24843}
24844
24845
24846// ContractSize1 ...
24847#[cfg_attr(feature = "derive_debug", derive(Debug))]
24848#[cfg_attr(feature = "derive_default", derive(Default))]
24849#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24850#[cfg_attr(feature = "derive_clone", derive(Clone))]
24851#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24852pub struct ContractSize1 {
24853	#[cfg_attr( feature = "derive_serde", serde(rename = "LotSz") )]
24854	pub lot_sz: f64,
24855	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit", skip_serializing_if = "Option::is_none") )]
24856	pub unit: Option<UnitOfMeasure5Choice>,
24857}
24858
24859impl ContractSize1 {
24860	pub fn validate(&self) -> Result<(), ValidationError> {
24861		if self.lot_sz < 1.000000 {
24862			return Err(ValidationError::new(1003, "lot_sz is less than the minimum value of 1.000000".to_string()));
24863		}
24864		if let Some(ref val) = self.unit { val.validate()? }
24865		Ok(())
24866	}
24867}
24868
24869
24870// ContractTerm6Choice ...
24871#[cfg_attr(feature = "derive_debug", derive(Debug))]
24872#[cfg_attr(feature = "derive_default", derive(Default))]
24873#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24874#[cfg_attr(feature = "derive_clone", derive(Clone))]
24875#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24876pub struct ContractTerm6Choice {
24877	#[cfg_attr( feature = "derive_serde", serde(rename = "Opn", skip_serializing_if = "Option::is_none") )]
24878	pub opn: Option<bool>,
24879	#[cfg_attr( feature = "derive_serde", serde(rename = "Fxd", skip_serializing_if = "Option::is_none") )]
24880	pub fxd: Option<TimeToMaturity2Choice>,
24881}
24882
24883impl ContractTerm6Choice {
24884	pub fn validate(&self) -> Result<(), ValidationError> {
24885		if let Some(ref val) = self.fxd { val.validate()? }
24886		Ok(())
24887	}
24888}
24889
24890
24891// ContractTerm7Choice ...
24892#[cfg_attr(feature = "derive_debug", derive(Debug))]
24893#[cfg_attr(feature = "derive_default", derive(Default))]
24894#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24895#[cfg_attr(feature = "derive_clone", derive(Clone))]
24896#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24897pub struct ContractTerm7Choice {
24898	#[cfg_attr( feature = "derive_serde", serde(rename = "Opn", skip_serializing_if = "Option::is_none") )]
24899	pub opn: Option<FixedOpenTermContract2>,
24900	#[cfg_attr( feature = "derive_serde", serde(rename = "Fxd", skip_serializing_if = "Option::is_none") )]
24901	pub fxd: Option<FixedOpenTermContract2>,
24902}
24903
24904impl ContractTerm7Choice {
24905	pub fn validate(&self) -> Result<(), ValidationError> {
24906		if let Some(ref val) = self.opn { val.validate()? }
24907		if let Some(ref val) = self.fxd { val.validate()? }
24908		Ok(())
24909	}
24910}
24911
24912
24913// ContractType15 ...
24914#[cfg_attr(feature = "derive_debug", derive(Debug))]
24915#[cfg_attr(feature = "derive_default", derive(Default))]
24916#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24917#[cfg_attr(feature = "derive_clone", derive(Clone))]
24918#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24919pub struct ContractType15 {
24920	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctTp", skip_serializing_if = "Option::is_none") )]
24921	pub ctrct_tp: Option<FinancialInstrumentContractType2Code>,
24922	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstClss", skip_serializing_if = "Option::is_none") )]
24923	pub asst_clss: Option<ProductType4Code>,
24924	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctClssfctn", skip_serializing_if = "Option::is_none") )]
24925	pub pdct_clssfctn: Option<String>,
24926	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctId", skip_serializing_if = "Option::is_none") )]
24927	pub pdct_id: Option<SecurityIdentification46>,
24928	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygInstrm", skip_serializing_if = "Option::is_none") )]
24929	pub undrlyg_instrm: Option<SecurityIdentification41Choice>,
24930	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygAsstTradgPltfmIdr", skip_serializing_if = "Option::is_none") )]
24931	pub undrlyg_asst_tradg_pltfm_idr: Option<String>,
24932	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygAsstPricSrc", skip_serializing_if = "Option::is_none") )]
24933	pub undrlyg_asst_pric_src: Option<String>,
24934	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcy", skip_serializing_if = "Option::is_none") )]
24935	pub sttlm_ccy: Option<CurrencyExchange23>,
24936	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcyScndLeg", skip_serializing_if = "Option::is_none") )]
24937	pub sttlm_ccy_scnd_leg: Option<CurrencyExchange23>,
24938	#[cfg_attr( feature = "derive_serde", serde(rename = "PlcOfSttlm", skip_serializing_if = "Option::is_none") )]
24939	pub plc_of_sttlm: Option<String>,
24940	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivBasedOnCrptAsst", skip_serializing_if = "Option::is_none") )]
24941	pub deriv_based_on_crpt_asst: Option<bool>,
24942}
24943
24944impl ContractType15 {
24945	pub fn validate(&self) -> Result<(), ValidationError> {
24946		if let Some(ref val) = self.ctrct_tp { val.validate()? }
24947		if let Some(ref val) = self.asst_clss { val.validate()? }
24948		if let Some(ref val) = self.pdct_clssfctn {
24949			let pattern = Regex::new("[A-Z]{6,6}").unwrap();
24950			if !pattern.is_match(val) {
24951				return Err(ValidationError::new(1005, "pdct_clssfctn does not match the required pattern".to_string()));
24952			}
24953		}
24954		if let Some(ref val) = self.pdct_id { val.validate()? }
24955		if let Some(ref val) = self.undrlyg_instrm { val.validate()? }
24956		if let Some(ref val) = self.undrlyg_asst_tradg_pltfm_idr {
24957			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
24958			if !pattern.is_match(val) {
24959				return Err(ValidationError::new(1005, "undrlyg_asst_tradg_pltfm_idr does not match the required pattern".to_string()));
24960			}
24961		}
24962		if let Some(ref val) = self.undrlyg_asst_pric_src {
24963			if val.chars().count() < 1 {
24964				return Err(ValidationError::new(1001, "undrlyg_asst_pric_src is shorter than the minimum length of 1".to_string()));
24965			}
24966			if val.chars().count() > 50 {
24967				return Err(ValidationError::new(1002, "undrlyg_asst_pric_src exceeds the maximum length of 50".to_string()));
24968			}
24969		}
24970		if let Some(ref val) = self.sttlm_ccy { val.validate()? }
24971		if let Some(ref val) = self.sttlm_ccy_scnd_leg { val.validate()? }
24972		if let Some(ref val) = self.plc_of_sttlm {
24973			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
24974			if !pattern.is_match(val) {
24975				return Err(ValidationError::new(1005, "plc_of_sttlm does not match the required pattern".to_string()));
24976			}
24977		}
24978		Ok(())
24979	}
24980}
24981
24982
24983// ContractValuationData8 ...
24984#[cfg_attr(feature = "derive_debug", derive(Debug))]
24985#[cfg_attr(feature = "derive_default", derive(Default))]
24986#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
24987#[cfg_attr(feature = "derive_clone", derive(Clone))]
24988#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
24989pub struct ContractValuationData8 {
24990	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctVal", skip_serializing_if = "Option::is_none") )]
24991	pub ctrct_val: Option<AmountAndDirection109>,
24992	#[cfg_attr( feature = "derive_serde", serde(rename = "TmStmp", skip_serializing_if = "Option::is_none") )]
24993	pub tm_stmp: Option<String>,
24994	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
24995	pub tp: Option<ValuationType1Code>,
24996	#[cfg_attr( feature = "derive_serde", serde(rename = "Dlta", skip_serializing_if = "Option::is_none") )]
24997	pub dlta: Option<f64>,
24998}
24999
25000impl ContractValuationData8 {
25001	pub fn validate(&self) -> Result<(), ValidationError> {
25002		if let Some(ref val) = self.ctrct_val { val.validate()? }
25003		if let Some(ref val) = self.tp { val.validate()? }
25004		Ok(())
25005	}
25006}
25007
25008
25009// ControlData1 ...
25010#[cfg_attr(feature = "derive_debug", derive(Debug))]
25011#[cfg_attr(feature = "derive_default", derive(Default))]
25012#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25013#[cfg_attr(feature = "derive_clone", derive(Clone))]
25014#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25015pub struct ControlData1 {
25016	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs") )]
25017	pub nb_of_txs: String,
25018	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
25019	pub ctrl_sum: Option<f64>,
25020}
25021
25022impl ControlData1 {
25023	pub fn validate(&self) -> Result<(), ValidationError> {
25024		let pattern = Regex::new("[0-9]{1,15}").unwrap();
25025		if !pattern.is_match(&self.nb_of_txs) {
25026			return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
25027		}
25028		Ok(())
25029	}
25030}
25031
25032
25033// CopyDuplicate1Code ...
25034#[cfg_attr(feature = "derive_debug", derive(Debug))]
25035#[cfg_attr(feature = "derive_default", derive(Default))]
25036#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25037#[cfg_attr(feature = "derive_clone", derive(Clone))]
25038#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25039pub enum CopyDuplicate1Code {
25040	#[cfg_attr(feature = "derive_default", default)]
25041	#[cfg_attr( feature = "derive_serde", serde(rename = "CODU") )]
25042	CodeCODU,
25043	#[cfg_attr( feature = "derive_serde", serde(rename = "COPY") )]
25044	CodeCOPY,
25045	#[cfg_attr( feature = "derive_serde", serde(rename = "DUPL") )]
25046	CodeDUPL,
25047}
25048
25049impl CopyDuplicate1Code {
25050	pub fn validate(&self) -> Result<(), ValidationError> {
25051		Ok(())
25052	}
25053}
25054
25055
25056// CorporateAction9 ...
25057#[cfg_attr(feature = "derive_debug", derive(Debug))]
25058#[cfg_attr(feature = "derive_default", derive(Default))]
25059#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25060#[cfg_attr(feature = "derive_clone", derive(Clone))]
25061#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25062pub struct CorporateAction9 {
25063	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtTp") )]
25064	pub evt_tp: String,
25065	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtId") )]
25066	pub evt_id: String,
25067}
25068
25069impl CorporateAction9 {
25070	pub fn validate(&self) -> Result<(), ValidationError> {
25071		if self.evt_tp.chars().count() < 1 {
25072			return Err(ValidationError::new(1001, "evt_tp is shorter than the minimum length of 1".to_string()));
25073		}
25074		if self.evt_tp.chars().count() > 35 {
25075			return Err(ValidationError::new(1002, "evt_tp exceeds the maximum length of 35".to_string()));
25076		}
25077		if self.evt_id.chars().count() < 1 {
25078			return Err(ValidationError::new(1001, "evt_id is shorter than the minimum length of 1".to_string()));
25079		}
25080		if self.evt_id.chars().count() > 35 {
25081			return Err(ValidationError::new(1002, "evt_id exceeds the maximum length of 35".to_string()));
25082		}
25083		Ok(())
25084	}
25085}
25086
25087
25088// CorporateSectorCriteria5 ...
25089#[cfg_attr(feature = "derive_debug", derive(Debug))]
25090#[cfg_attr(feature = "derive_default", derive(Default))]
25091#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25092#[cfg_attr(feature = "derive_clone", derive(Clone))]
25093#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25094pub struct CorporateSectorCriteria5 {
25095	#[cfg_attr( feature = "derive_serde", serde(rename = "FISctr", skip_serializing_if = "Option::is_none") )]
25096	pub fi_sctr: Option<Vec<FinancialPartySectorType2Code>>,
25097	#[cfg_attr( feature = "derive_serde", serde(rename = "NFISctr", skip_serializing_if = "Option::is_none") )]
25098	pub nfi_sctr: Option<Vec<String>>,
25099	#[cfg_attr( feature = "derive_serde", serde(rename = "NotRptd", skip_serializing_if = "Option::is_none") )]
25100	pub not_rptd: Option<NotReported1Code>,
25101}
25102
25103impl CorporateSectorCriteria5 {
25104	pub fn validate(&self) -> Result<(), ValidationError> {
25105		if let Some(ref vec) = self.fi_sctr { for item in vec { item.validate()? } }
25106		if let Some(ref vec) = self.nfi_sctr {
25107			for item in vec {
25108				let pattern = Regex::new("[A-U]{1,1}").unwrap();
25109				if !pattern.is_match(&item) {
25110					return Err(ValidationError::new(1005, "nfi_sctr does not match the required pattern".to_string()));
25111				}
25112			}
25113		}
25114		if let Some(ref val) = self.not_rptd { val.validate()? }
25115		Ok(())
25116	}
25117}
25118
25119
25120// CorporateSectorCriteria6 ...
25121#[cfg_attr(feature = "derive_debug", derive(Debug))]
25122#[cfg_attr(feature = "derive_default", derive(Default))]
25123#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25124#[cfg_attr(feature = "derive_clone", derive(Clone))]
25125#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25126pub struct CorporateSectorCriteria6 {
25127	#[cfg_attr( feature = "derive_serde", serde(rename = "FISctr", skip_serializing_if = "Option::is_none") )]
25128	pub fi_sctr: Option<Vec<FinancialPartySectorType2Code>>,
25129	#[cfg_attr( feature = "derive_serde", serde(rename = "NFISctr", skip_serializing_if = "Option::is_none") )]
25130	pub nfi_sctr: Option<Vec<NonFinancialPartySector1Code>>,
25131	#[cfg_attr( feature = "derive_serde", serde(rename = "NotRptd", skip_serializing_if = "Option::is_none") )]
25132	pub not_rptd: Option<NotReported1Code>,
25133}
25134
25135impl CorporateSectorCriteria6 {
25136	pub fn validate(&self) -> Result<(), ValidationError> {
25137		if let Some(ref vec) = self.fi_sctr { for item in vec { item.validate()? } }
25138		if let Some(ref vec) = self.nfi_sctr { for item in vec { item.validate()? } }
25139		if let Some(ref val) = self.not_rptd { val.validate()? }
25140		Ok(())
25141	}
25142}
25143
25144
25145// CorrectiveGroupInformation1 ...
25146#[cfg_attr(feature = "derive_debug", derive(Debug))]
25147#[cfg_attr(feature = "derive_default", derive(Default))]
25148#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25149#[cfg_attr(feature = "derive_clone", derive(Clone))]
25150#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25151pub struct CorrectiveGroupInformation1 {
25152	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
25153	pub msg_id: String,
25154	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNmId") )]
25155	pub msg_nm_id: String,
25156	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
25157	pub cre_dt_tm: Option<String>,
25158}
25159
25160impl CorrectiveGroupInformation1 {
25161	pub fn validate(&self) -> Result<(), ValidationError> {
25162		if self.msg_id.chars().count() < 1 {
25163			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
25164		}
25165		if self.msg_id.chars().count() > 35 {
25166			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
25167		}
25168		if self.msg_nm_id.chars().count() < 1 {
25169			return Err(ValidationError::new(1001, "msg_nm_id is shorter than the minimum length of 1".to_string()));
25170		}
25171		if self.msg_nm_id.chars().count() > 35 {
25172			return Err(ValidationError::new(1002, "msg_nm_id exceeds the maximum length of 35".to_string()));
25173		}
25174		Ok(())
25175	}
25176}
25177
25178
25179// CorrectiveInterbankTransaction3 ...
25180#[cfg_attr(feature = "derive_debug", derive(Debug))]
25181#[cfg_attr(feature = "derive_default", derive(Default))]
25182#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25183#[cfg_attr(feature = "derive_clone", derive(Clone))]
25184#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25185pub struct CorrectiveInterbankTransaction3 {
25186	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpHdr", skip_serializing_if = "Option::is_none") )]
25187	pub grp_hdr: Option<CorrectiveGroupInformation1>,
25188	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
25189	pub instr_id: Option<String>,
25190	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId", skip_serializing_if = "Option::is_none") )]
25191	pub end_to_end_id: Option<String>,
25192	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
25193	pub tx_id: Option<String>,
25194	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
25195	pub uetr: Option<String>,
25196	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmt") )]
25197	pub intr_bk_sttlm_amt: ActiveOrHistoricCurrencyAndAmount,
25198	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt") )]
25199	pub intr_bk_sttlm_dt: String,
25200}
25201
25202impl CorrectiveInterbankTransaction3 {
25203	pub fn validate(&self) -> Result<(), ValidationError> {
25204		if let Some(ref val) = self.grp_hdr { val.validate()? }
25205		if let Some(ref val) = self.instr_id {
25206			if val.chars().count() < 1 {
25207				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
25208			}
25209			if val.chars().count() > 35 {
25210				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
25211			}
25212		}
25213		if let Some(ref val) = self.end_to_end_id {
25214			if val.chars().count() < 1 {
25215				return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
25216			}
25217			if val.chars().count() > 35 {
25218				return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
25219			}
25220		}
25221		if let Some(ref val) = self.tx_id {
25222			if val.chars().count() < 1 {
25223				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
25224			}
25225			if val.chars().count() > 35 {
25226				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
25227			}
25228		}
25229		if let Some(ref val) = self.uetr {
25230			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
25231			if !pattern.is_match(val) {
25232				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
25233			}
25234		}
25235		self.intr_bk_sttlm_amt.validate()?;
25236		Ok(())
25237	}
25238}
25239
25240
25241// CorrectivePaymentInitiation5 ...
25242#[cfg_attr(feature = "derive_debug", derive(Debug))]
25243#[cfg_attr(feature = "derive_default", derive(Default))]
25244#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25245#[cfg_attr(feature = "derive_clone", derive(Clone))]
25246#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25247pub struct CorrectivePaymentInitiation5 {
25248	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpHdr", skip_serializing_if = "Option::is_none") )]
25249	pub grp_hdr: Option<CorrectiveGroupInformation1>,
25250	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfId", skip_serializing_if = "Option::is_none") )]
25251	pub pmt_inf_id: Option<String>,
25252	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
25253	pub instr_id: Option<String>,
25254	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId", skip_serializing_if = "Option::is_none") )]
25255	pub end_to_end_id: Option<String>,
25256	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
25257	pub uetr: Option<String>,
25258	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAmt") )]
25259	pub instd_amt: ActiveOrHistoricCurrencyAndAmount,
25260	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
25261	pub reqd_exctn_dt: Option<DateAndDateTime2Choice>,
25262	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdColltnDt", skip_serializing_if = "Option::is_none") )]
25263	pub reqd_colltn_dt: Option<String>,
25264}
25265
25266impl CorrectivePaymentInitiation5 {
25267	pub fn validate(&self) -> Result<(), ValidationError> {
25268		if let Some(ref val) = self.grp_hdr { val.validate()? }
25269		if let Some(ref val) = self.pmt_inf_id {
25270			if val.chars().count() < 1 {
25271				return Err(ValidationError::new(1001, "pmt_inf_id is shorter than the minimum length of 1".to_string()));
25272			}
25273			if val.chars().count() > 35 {
25274				return Err(ValidationError::new(1002, "pmt_inf_id exceeds the maximum length of 35".to_string()));
25275			}
25276		}
25277		if let Some(ref val) = self.instr_id {
25278			if val.chars().count() < 1 {
25279				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
25280			}
25281			if val.chars().count() > 35 {
25282				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
25283			}
25284		}
25285		if let Some(ref val) = self.end_to_end_id {
25286			if val.chars().count() < 1 {
25287				return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
25288			}
25289			if val.chars().count() > 35 {
25290				return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
25291			}
25292		}
25293		if let Some(ref val) = self.uetr {
25294			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
25295			if !pattern.is_match(val) {
25296				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
25297			}
25298		}
25299		self.instd_amt.validate()?;
25300		if let Some(ref val) = self.reqd_exctn_dt { val.validate()? }
25301		Ok(())
25302	}
25303}
25304
25305
25306// CorrectiveTransaction5Choice ...
25307#[cfg_attr(feature = "derive_debug", derive(Debug))]
25308#[cfg_attr(feature = "derive_default", derive(Default))]
25309#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25310#[cfg_attr(feature = "derive_clone", derive(Clone))]
25311#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25312pub struct CorrectiveTransaction5Choice {
25313	#[cfg_attr( feature = "derive_serde", serde(rename = "Initn", skip_serializing_if = "Option::is_none") )]
25314	pub initn: Option<CorrectivePaymentInitiation5>,
25315	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBk", skip_serializing_if = "Option::is_none") )]
25316	pub intr_bk: Option<CorrectiveInterbankTransaction3>,
25317}
25318
25319impl CorrectiveTransaction5Choice {
25320	pub fn validate(&self) -> Result<(), ValidationError> {
25321		if let Some(ref val) = self.initn { val.validate()? }
25322		if let Some(ref val) = self.intr_bk { val.validate()? }
25323		Ok(())
25324	}
25325}
25326
25327
25328// CorrespondenceNotification1 ...
25329#[cfg_attr(feature = "derive_debug", derive(Debug))]
25330#[cfg_attr(feature = "derive_default", derive(Default))]
25331#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25332#[cfg_attr(feature = "derive_clone", derive(Clone))]
25333#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25334pub struct CorrespondenceNotification1 {
25335	#[cfg_attr( feature = "derive_serde", serde(rename = "SndrNtfctnId") )]
25336	pub sndr_ntfctn_id: String,
25337	#[cfg_attr( feature = "derive_serde", serde(rename = "NtfctnTp") )]
25338	pub ntfctn_tp: NotificationType1Choice,
25339	#[cfg_attr( feature = "derive_serde", serde(rename = "NtfctnSubTp", skip_serializing_if = "Option::is_none") )]
25340	pub ntfctn_sub_tp: Option<NotificationSubType1Choice>,
25341	#[cfg_attr( feature = "derive_serde", serde(rename = "NtfctnNrrtv", skip_serializing_if = "Option::is_none") )]
25342	pub ntfctn_nrrtv: Option<Vec<String>>,
25343	#[cfg_attr( feature = "derive_serde", serde(rename = "NclsdFile", skip_serializing_if = "Option::is_none") )]
25344	pub nclsd_file: Option<Vec<Document15>>,
25345	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdNtfctnData", skip_serializing_if = "Option::is_none") )]
25346	pub rltd_ntfctn_data: Option<Vec<RelatedNotificationData1>>,
25347}
25348
25349impl CorrespondenceNotification1 {
25350	pub fn validate(&self) -> Result<(), ValidationError> {
25351		if self.sndr_ntfctn_id.chars().count() < 1 {
25352			return Err(ValidationError::new(1001, "sndr_ntfctn_id is shorter than the minimum length of 1".to_string()));
25353		}
25354		if self.sndr_ntfctn_id.chars().count() > 35 {
25355			return Err(ValidationError::new(1002, "sndr_ntfctn_id exceeds the maximum length of 35".to_string()));
25356		}
25357		self.ntfctn_tp.validate()?;
25358		if let Some(ref val) = self.ntfctn_sub_tp { val.validate()? }
25359		if let Some(ref vec) = self.ntfctn_nrrtv {
25360			for item in vec {
25361				if item.chars().count() < 1 {
25362					return Err(ValidationError::new(1001, "ntfctn_nrrtv is shorter than the minimum length of 1".to_string()));
25363				}
25364				if item.chars().count() > 2000 {
25365					return Err(ValidationError::new(1002, "ntfctn_nrrtv exceeds the maximum length of 2000".to_string()));
25366				}
25367			}
25368		}
25369		if let Some(ref vec) = self.nclsd_file { for item in vec { item.validate()? } }
25370		if let Some(ref vec) = self.rltd_ntfctn_data { for item in vec { item.validate()? } }
25371		Ok(())
25372	}
25373}
25374
25375
25376// CostsAndCharges2 ...
25377#[cfg_attr(feature = "derive_debug", derive(Debug))]
25378#[cfg_attr(feature = "derive_default", derive(Default))]
25379#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25380#[cfg_attr(feature = "derive_clone", derive(Clone))]
25381#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25382pub struct CostsAndCharges2 {
25383	#[cfg_attr( feature = "derive_serde", serde(rename = "ExAnteRefDt", skip_serializing_if = "Option::is_none") )]
25384	pub ex_ante_ref_dt: Option<String>,
25385	#[cfg_attr( feature = "derive_serde", serde(rename = "IndvCostOrChrg") )]
25386	pub indv_cost_or_chrg: Vec<IndividualCostOrCharge2>,
25387	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
25388	pub addtl_inf: Option<AdditionalInformation15>,
25389}
25390
25391impl CostsAndCharges2 {
25392	pub fn validate(&self) -> Result<(), ValidationError> {
25393		for item in &self.indv_cost_or_chrg { item.validate()? }
25394		if let Some(ref val) = self.addtl_inf { val.validate()? }
25395		Ok(())
25396	}
25397}
25398
25399
25400// Counterparty39 ...
25401#[cfg_attr(feature = "derive_debug", derive(Debug))]
25402#[cfg_attr(feature = "derive_default", derive(Default))]
25403#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25404#[cfg_attr(feature = "derive_clone", derive(Clone))]
25405#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25406pub struct Counterparty39 {
25407	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty") )]
25408	pub rptg_ctr_pty: OrganisationIdentification15Choice,
25409	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty") )]
25410	pub othr_ctr_pty: PartyIdentification236Choice,
25411	#[cfg_attr( feature = "derive_serde", serde(rename = "NttyRspnsblForRpt", skip_serializing_if = "Option::is_none") )]
25412	pub ntty_rspnsbl_for_rpt: Option<OrganisationIdentification15Choice>,
25413	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSubmitgNtty", skip_serializing_if = "Option::is_none") )]
25414	pub rpt_submitg_ntty: Option<OrganisationIdentification15Choice>,
25415}
25416
25417impl Counterparty39 {
25418	pub fn validate(&self) -> Result<(), ValidationError> {
25419		self.rptg_ctr_pty.validate()?;
25420		self.othr_ctr_pty.validate()?;
25421		if let Some(ref val) = self.ntty_rspnsbl_for_rpt { val.validate()? }
25422		if let Some(ref val) = self.rpt_submitg_ntty { val.validate()? }
25423		Ok(())
25424	}
25425}
25426
25427
25428// Counterparty45 ...
25429#[cfg_attr(feature = "derive_debug", derive(Debug))]
25430#[cfg_attr(feature = "derive_default", derive(Default))]
25431#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25432#[cfg_attr(feature = "derive_clone", derive(Clone))]
25433#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25434pub struct Counterparty45 {
25435	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
25436	pub id: PartyIdentification248Choice,
25437	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntr", skip_serializing_if = "Option::is_none") )]
25438	pub ntr: Option<CounterpartyTradeNature15Choice>,
25439	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgCpcty", skip_serializing_if = "Option::is_none") )]
25440	pub tradg_cpcty: Option<TradingCapacity7Code>,
25441	#[cfg_attr( feature = "derive_serde", serde(rename = "DrctnOrSd", skip_serializing_if = "Option::is_none") )]
25442	pub drctn_or_sd: Option<Direction4Choice>,
25443	#[cfg_attr( feature = "derive_serde", serde(rename = "TradrLctn", skip_serializing_if = "Option::is_none") )]
25444	pub tradr_lctn: Option<String>,
25445	#[cfg_attr( feature = "derive_serde", serde(rename = "BookgLctn", skip_serializing_if = "Option::is_none") )]
25446	pub bookg_lctn: Option<String>,
25447	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgXmptn", skip_serializing_if = "Option::is_none") )]
25448	pub rptg_xmptn: Option<ReportingExemption1>,
25449}
25450
25451impl Counterparty45 {
25452	pub fn validate(&self) -> Result<(), ValidationError> {
25453		self.id.validate()?;
25454		if let Some(ref val) = self.ntr { val.validate()? }
25455		if let Some(ref val) = self.tradg_cpcty { val.validate()? }
25456		if let Some(ref val) = self.drctn_or_sd { val.validate()? }
25457		if let Some(ref val) = self.tradr_lctn {
25458			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
25459			if !pattern.is_match(val) {
25460				return Err(ValidationError::new(1005, "tradr_lctn does not match the required pattern".to_string()));
25461			}
25462		}
25463		if let Some(ref val) = self.bookg_lctn {
25464			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
25465			if !pattern.is_match(val) {
25466				return Err(ValidationError::new(1005, "bookg_lctn does not match the required pattern".to_string()));
25467			}
25468		}
25469		if let Some(ref val) = self.rptg_xmptn { val.validate()? }
25470		Ok(())
25471	}
25472}
25473
25474
25475// Counterparty46 ...
25476#[cfg_attr(feature = "derive_debug", derive(Debug))]
25477#[cfg_attr(feature = "derive_default", derive(Default))]
25478#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25479#[cfg_attr(feature = "derive_clone", derive(Clone))]
25480#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25481pub struct Counterparty46 {
25482	#[cfg_attr( feature = "derive_serde", serde(rename = "IdTp", skip_serializing_if = "Option::is_none") )]
25483	pub id_tp: Option<PartyIdentification248Choice>,
25484	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntr", skip_serializing_if = "Option::is_none") )]
25485	pub ntr: Option<CounterpartyTradeNature15Choice>,
25486	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgOblgtn", skip_serializing_if = "Option::is_none") )]
25487	pub rptg_oblgtn: Option<bool>,
25488}
25489
25490impl Counterparty46 {
25491	pub fn validate(&self) -> Result<(), ValidationError> {
25492		if let Some(ref val) = self.id_tp { val.validate()? }
25493		if let Some(ref val) = self.ntr { val.validate()? }
25494		Ok(())
25495	}
25496}
25497
25498
25499// CounterpartyData86 ...
25500#[cfg_attr(feature = "derive_debug", derive(Debug))]
25501#[cfg_attr(feature = "derive_default", derive(Default))]
25502#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25503#[cfg_attr(feature = "derive_clone", derive(Clone))]
25504#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25505pub struct CounterpartyData86 {
25506	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty", skip_serializing_if = "Option::is_none") )]
25507	pub rptg_ctr_pty: Option<CounterpartyIdentification10>,
25508	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty", skip_serializing_if = "Option::is_none") )]
25509	pub othr_ctr_pty: Option<OrganisationIdentification15Choice>,
25510	#[cfg_attr( feature = "derive_serde", serde(rename = "TrptyAgt", skip_serializing_if = "Option::is_none") )]
25511	pub trpty_agt: Option<bool>,
25512	#[cfg_attr( feature = "derive_serde", serde(rename = "AgtLndr", skip_serializing_if = "Option::is_none") )]
25513	pub agt_lndr: Option<bool>,
25514}
25515
25516impl CounterpartyData86 {
25517	pub fn validate(&self) -> Result<(), ValidationError> {
25518		if let Some(ref val) = self.rptg_ctr_pty { val.validate()? }
25519		if let Some(ref val) = self.othr_ctr_pty { val.validate()? }
25520		Ok(())
25521	}
25522}
25523
25524
25525// CounterpartyData87 ...
25526#[cfg_attr(feature = "derive_debug", derive(Debug))]
25527#[cfg_attr(feature = "derive_default", derive(Default))]
25528#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25529#[cfg_attr(feature = "derive_clone", derive(Clone))]
25530#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25531pub struct CounterpartyData87 {
25532	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSubmitgNtty") )]
25533	pub rpt_submitg_ntty: OrganisationIdentification15Choice,
25534	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty") )]
25535	pub rptg_ctr_pty: OrganisationIdentification15Choice,
25536	#[cfg_attr( feature = "derive_serde", serde(rename = "NttyRspnsblForRpt", skip_serializing_if = "Option::is_none") )]
25537	pub ntty_rspnsbl_for_rpt: Option<OrganisationIdentification15Choice>,
25538}
25539
25540impl CounterpartyData87 {
25541	pub fn validate(&self) -> Result<(), ValidationError> {
25542		self.rpt_submitg_ntty.validate()?;
25543		self.rptg_ctr_pty.validate()?;
25544		if let Some(ref val) = self.ntty_rspnsbl_for_rpt { val.validate()? }
25545		Ok(())
25546	}
25547}
25548
25549
25550// CounterpartyData88 ...
25551#[cfg_attr(feature = "derive_debug", derive(Debug))]
25552#[cfg_attr(feature = "derive_default", derive(Default))]
25553#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25554#[cfg_attr(feature = "derive_clone", derive(Clone))]
25555#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25556pub struct CounterpartyData88 {
25557	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDtTm") )]
25558	pub rptg_dt_tm: String,
25559	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSubmitgNtty") )]
25560	pub rpt_submitg_ntty: OrganisationIdentification15Choice,
25561	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPty") )]
25562	pub ctr_pty: Vec<CounterpartyData89>,
25563}
25564
25565impl CounterpartyData88 {
25566	pub fn validate(&self) -> Result<(), ValidationError> {
25567		self.rpt_submitg_ntty.validate()?;
25568		for item in &self.ctr_pty { item.validate()? }
25569		Ok(())
25570	}
25571}
25572
25573
25574// CounterpartyData89 ...
25575#[cfg_attr(feature = "derive_debug", derive(Debug))]
25576#[cfg_attr(feature = "derive_default", derive(Default))]
25577#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25578#[cfg_attr(feature = "derive_clone", derive(Clone))]
25579#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25580pub struct CounterpartyData89 {
25581	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty") )]
25582	pub rptg_ctr_pty: CounterpartyIdentification11,
25583	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty") )]
25584	pub othr_ctr_pty: CounterpartyIdentification12,
25585	#[cfg_attr( feature = "derive_serde", serde(rename = "NttyRspnsblForRpt", skip_serializing_if = "Option::is_none") )]
25586	pub ntty_rspnsbl_for_rpt: Option<OrganisationIdentification15Choice>,
25587	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPtyData", skip_serializing_if = "Option::is_none") )]
25588	pub othr_pty_data: Option<TransactionCounterpartyData11>,
25589}
25590
25591impl CounterpartyData89 {
25592	pub fn validate(&self) -> Result<(), ValidationError> {
25593		self.rptg_ctr_pty.validate()?;
25594		self.othr_ctr_pty.validate()?;
25595		if let Some(ref val) = self.ntty_rspnsbl_for_rpt { val.validate()? }
25596		if let Some(ref val) = self.othr_pty_data { val.validate()? }
25597		Ok(())
25598	}
25599}
25600
25601
25602// CounterpartyData91 ...
25603#[cfg_attr(feature = "derive_debug", derive(Debug))]
25604#[cfg_attr(feature = "derive_default", derive(Default))]
25605#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25606#[cfg_attr(feature = "derive_clone", derive(Clone))]
25607#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25608pub struct CounterpartyData91 {
25609	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty", skip_serializing_if = "Option::is_none") )]
25610	pub rptg_ctr_pty: Option<OrganisationIdentification15Choice>,
25611	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty", skip_serializing_if = "Option::is_none") )]
25612	pub othr_ctr_pty: Option<PartyIdentification236Choice>,
25613	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSubmitgNtty", skip_serializing_if = "Option::is_none") )]
25614	pub rpt_submitg_ntty: Option<OrganisationIdentification15Choice>,
25615	#[cfg_attr( feature = "derive_serde", serde(rename = "NttyRspnsblForRpt", skip_serializing_if = "Option::is_none") )]
25616	pub ntty_rspnsbl_for_rpt: Option<OrganisationIdentification15Choice>,
25617}
25618
25619impl CounterpartyData91 {
25620	pub fn validate(&self) -> Result<(), ValidationError> {
25621		if let Some(ref val) = self.rptg_ctr_pty { val.validate()? }
25622		if let Some(ref val) = self.othr_ctr_pty { val.validate()? }
25623		if let Some(ref val) = self.rpt_submitg_ntty { val.validate()? }
25624		if let Some(ref val) = self.ntty_rspnsbl_for_rpt { val.validate()? }
25625		Ok(())
25626	}
25627}
25628
25629
25630// CounterpartyData92 ...
25631#[cfg_attr(feature = "derive_debug", derive(Debug))]
25632#[cfg_attr(feature = "derive_default", derive(Default))]
25633#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25634#[cfg_attr(feature = "derive_clone", derive(Clone))]
25635#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25636pub struct CounterpartyData92 {
25637	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty", skip_serializing_if = "Option::is_none") )]
25638	pub rptg_ctr_pty: Option<OrganisationIdentification15Choice>,
25639	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSubmitgNtty", skip_serializing_if = "Option::is_none") )]
25640	pub rpt_submitg_ntty: Option<OrganisationIdentification15Choice>,
25641	#[cfg_attr( feature = "derive_serde", serde(rename = "NttyRspnsblForRpt", skip_serializing_if = "Option::is_none") )]
25642	pub ntty_rspnsbl_for_rpt: Option<OrganisationIdentification15Choice>,
25643}
25644
25645impl CounterpartyData92 {
25646	pub fn validate(&self) -> Result<(), ValidationError> {
25647		if let Some(ref val) = self.rptg_ctr_pty { val.validate()? }
25648		if let Some(ref val) = self.rpt_submitg_ntty { val.validate()? }
25649		if let Some(ref val) = self.ntty_rspnsbl_for_rpt { val.validate()? }
25650		Ok(())
25651	}
25652}
25653
25654
25655// CounterpartyIdentification10 ...
25656#[cfg_attr(feature = "derive_debug", derive(Debug))]
25657#[cfg_attr(feature = "derive_default", derive(Default))]
25658#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25659#[cfg_attr(feature = "derive_clone", derive(Clone))]
25660#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25661pub struct CounterpartyIdentification10 {
25662	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
25663	pub id: Option<OrganisationIdentification15Choice>,
25664	#[cfg_attr( feature = "derive_serde", serde(rename = "Sd", skip_serializing_if = "Option::is_none") )]
25665	pub sd: Option<CollateralRole1Code>,
25666}
25667
25668impl CounterpartyIdentification10 {
25669	pub fn validate(&self) -> Result<(), ValidationError> {
25670		if let Some(ref val) = self.id { val.validate()? }
25671		if let Some(ref val) = self.sd { val.validate()? }
25672		Ok(())
25673	}
25674}
25675
25676
25677// CounterpartyIdentification11 ...
25678#[cfg_attr(feature = "derive_debug", derive(Debug))]
25679#[cfg_attr(feature = "derive_default", derive(Default))]
25680#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25681#[cfg_attr(feature = "derive_clone", derive(Clone))]
25682#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25683pub struct CounterpartyIdentification11 {
25684	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
25685	pub id: OrganisationIdentification15Choice,
25686	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntr", skip_serializing_if = "Option::is_none") )]
25687	pub ntr: Option<CounterpartyTradeNature7Choice>,
25688	#[cfg_attr( feature = "derive_serde", serde(rename = "Brnch", skip_serializing_if = "Option::is_none") )]
25689	pub brnch: Option<Branch5Choice>,
25690	#[cfg_attr( feature = "derive_serde", serde(rename = "Sd", skip_serializing_if = "Option::is_none") )]
25691	pub sd: Option<CollateralRole1Code>,
25692}
25693
25694impl CounterpartyIdentification11 {
25695	pub fn validate(&self) -> Result<(), ValidationError> {
25696		self.id.validate()?;
25697		if let Some(ref val) = self.ntr { val.validate()? }
25698		if let Some(ref val) = self.brnch { val.validate()? }
25699		if let Some(ref val) = self.sd { val.validate()? }
25700		Ok(())
25701	}
25702}
25703
25704
25705// CounterpartyIdentification12 ...
25706#[cfg_attr(feature = "derive_debug", derive(Debug))]
25707#[cfg_attr(feature = "derive_default", derive(Default))]
25708#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25709#[cfg_attr(feature = "derive_clone", derive(Clone))]
25710#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25711pub struct CounterpartyIdentification12 {
25712	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
25713	pub id: PartyIdentification236Choice,
25714	#[cfg_attr( feature = "derive_serde", serde(rename = "Brnch", skip_serializing_if = "Option::is_none") )]
25715	pub brnch: Option<Branch6Choice>,
25716	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryCd", skip_serializing_if = "Option::is_none") )]
25717	pub ctry_cd: Option<String>,
25718}
25719
25720impl CounterpartyIdentification12 {
25721	pub fn validate(&self) -> Result<(), ValidationError> {
25722		self.id.validate()?;
25723		if let Some(ref val) = self.brnch { val.validate()? }
25724		if let Some(ref val) = self.ctry_cd {
25725			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
25726			if !pattern.is_match(val) {
25727				return Err(ValidationError::new(1005, "ctry_cd does not match the required pattern".to_string()));
25728			}
25729		}
25730		Ok(())
25731	}
25732}
25733
25734
25735// CounterpartyIdentification3Choice ...
25736#[cfg_attr(feature = "derive_debug", derive(Debug))]
25737#[cfg_attr(feature = "derive_default", derive(Default))]
25738#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25739#[cfg_attr(feature = "derive_clone", derive(Clone))]
25740#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25741pub struct CounterpartyIdentification3Choice {
25742	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
25743	pub lei: Option<String>,
25744	#[cfg_attr( feature = "derive_serde", serde(rename = "SctrAndLctn", skip_serializing_if = "Option::is_none") )]
25745	pub sctr_and_lctn: Option<SectorAndLocation1>,
25746	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndLctn", skip_serializing_if = "Option::is_none") )]
25747	pub nm_and_lctn: Option<NameAndLocation1>,
25748}
25749
25750impl CounterpartyIdentification3Choice {
25751	pub fn validate(&self) -> Result<(), ValidationError> {
25752		if let Some(ref val) = self.lei {
25753			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
25754			if !pattern.is_match(val) {
25755				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
25756			}
25757		}
25758		if let Some(ref val) = self.sctr_and_lctn { val.validate()? }
25759		if let Some(ref val) = self.nm_and_lctn { val.validate()? }
25760		Ok(())
25761	}
25762}
25763
25764
25765// CounterpartyMatchingCriteria4 ...
25766#[cfg_attr(feature = "derive_debug", derive(Debug))]
25767#[cfg_attr(feature = "derive_default", derive(Default))]
25768#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25769#[cfg_attr(feature = "derive_clone", derive(Clone))]
25770#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25771pub struct CounterpartyMatchingCriteria4 {
25772	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty", skip_serializing_if = "Option::is_none") )]
25773	pub rptg_ctr_pty: Option<CompareOrganisationIdentification6>,
25774	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty", skip_serializing_if = "Option::is_none") )]
25775	pub othr_ctr_pty: Option<CompareOrganisationIdentification7>,
25776	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtySd", skip_serializing_if = "Option::is_none") )]
25777	pub ctr_pty_sd: Option<CompareCounterpartySide2>,
25778}
25779
25780impl CounterpartyMatchingCriteria4 {
25781	pub fn validate(&self) -> Result<(), ValidationError> {
25782		if let Some(ref val) = self.rptg_ctr_pty { val.validate()? }
25783		if let Some(ref val) = self.othr_ctr_pty { val.validate()? }
25784		if let Some(ref val) = self.ctr_pty_sd { val.validate()? }
25785		Ok(())
25786	}
25787}
25788
25789
25790// CounterpartyMatchingCriteria6 ...
25791#[cfg_attr(feature = "derive_debug", derive(Debug))]
25792#[cfg_attr(feature = "derive_default", derive(Default))]
25793#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25794#[cfg_attr(feature = "derive_clone", derive(Clone))]
25795#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25796pub struct CounterpartyMatchingCriteria6 {
25797	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty", skip_serializing_if = "Option::is_none") )]
25798	pub rptg_ctr_pty: Option<CompareOrganisationIdentification6>,
25799	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty", skip_serializing_if = "Option::is_none") )]
25800	pub othr_ctr_pty: Option<CompareOrganisationIdentification7>,
25801	#[cfg_attr( feature = "derive_serde", serde(rename = "DrctnOrSd", skip_serializing_if = "Option::is_none") )]
25802	pub drctn_or_sd: Option<CompareLegDirection2>,
25803}
25804
25805impl CounterpartyMatchingCriteria6 {
25806	pub fn validate(&self) -> Result<(), ValidationError> {
25807		if let Some(ref val) = self.rptg_ctr_pty { val.validate()? }
25808		if let Some(ref val) = self.othr_ctr_pty { val.validate()? }
25809		if let Some(ref val) = self.drctn_or_sd { val.validate()? }
25810		Ok(())
25811	}
25812}
25813
25814
25815// CounterpartySpecificData36 ...
25816#[cfg_attr(feature = "derive_debug", derive(Debug))]
25817#[cfg_attr(feature = "derive_default", derive(Default))]
25818#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25819#[cfg_attr(feature = "derive_clone", derive(Clone))]
25820#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25821pub struct CounterpartySpecificData36 {
25822	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPty") )]
25823	pub ctr_pty: TradeCounterpartyReport20,
25824	#[cfg_attr( feature = "derive_serde", serde(rename = "Valtn", skip_serializing_if = "Option::is_none") )]
25825	pub valtn: Option<ContractValuationData8>,
25826	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgTmStmp", skip_serializing_if = "Option::is_none") )]
25827	pub rptg_tm_stmp: Option<String>,
25828}
25829
25830impl CounterpartySpecificData36 {
25831	pub fn validate(&self) -> Result<(), ValidationError> {
25832		self.ctr_pty.validate()?;
25833		if let Some(ref val) = self.valtn { val.validate()? }
25834		Ok(())
25835	}
25836}
25837
25838
25839// CounterpartyTradeNature15Choice ...
25840#[cfg_attr(feature = "derive_debug", derive(Debug))]
25841#[cfg_attr(feature = "derive_default", derive(Default))]
25842#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25843#[cfg_attr(feature = "derive_clone", derive(Clone))]
25844#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25845pub struct CounterpartyTradeNature15Choice {
25846	#[cfg_attr( feature = "derive_serde", serde(rename = "FI", skip_serializing_if = "Option::is_none") )]
25847	pub fi: Option<FinancialInstitutionSector1>,
25848	#[cfg_attr( feature = "derive_serde", serde(rename = "NFI", skip_serializing_if = "Option::is_none") )]
25849	pub nfi: Option<NonFinancialInstitutionSector10>,
25850	#[cfg_attr( feature = "derive_serde", serde(rename = "CntrlCntrPty", skip_serializing_if = "Option::is_none") )]
25851	pub cntrl_cntr_pty: Option<NoReasonCode>,
25852	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
25853	pub othr: Option<NoReasonCode>,
25854}
25855
25856impl CounterpartyTradeNature15Choice {
25857	pub fn validate(&self) -> Result<(), ValidationError> {
25858		if let Some(ref val) = self.fi { val.validate()? }
25859		if let Some(ref val) = self.nfi { val.validate()? }
25860		if let Some(ref val) = self.cntrl_cntr_pty { val.validate()? }
25861		if let Some(ref val) = self.othr { val.validate()? }
25862		Ok(())
25863	}
25864}
25865
25866
25867// CounterpartyTradeNature7Choice ...
25868#[cfg_attr(feature = "derive_debug", derive(Debug))]
25869#[cfg_attr(feature = "derive_default", derive(Default))]
25870#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25871#[cfg_attr(feature = "derive_clone", derive(Clone))]
25872#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25873pub struct CounterpartyTradeNature7Choice {
25874	#[cfg_attr( feature = "derive_serde", serde(rename = "FI", skip_serializing_if = "Option::is_none") )]
25875	pub fi: Option<FinancialPartyClassification1>,
25876	#[cfg_attr( feature = "derive_serde", serde(rename = "NFI", skip_serializing_if = "Option::is_none") )]
25877	pub nfi: Option<Vec<FinancialPartyClassification2>>,
25878}
25879
25880impl CounterpartyTradeNature7Choice {
25881	pub fn validate(&self) -> Result<(), ValidationError> {
25882		if let Some(ref val) = self.fi { val.validate()? }
25883		if let Some(ref vec) = self.nfi { for item in vec { item.validate()? } }
25884		Ok(())
25885	}
25886}
25887
25888
25889// CountryAndResidentialStatusType1 ...
25890#[cfg_attr(feature = "derive_debug", derive(Debug))]
25891#[cfg_attr(feature = "derive_default", derive(Default))]
25892#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25893#[cfg_attr(feature = "derive_clone", derive(Clone))]
25894#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25895pub struct CountryAndResidentialStatusType1 {
25896	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry") )]
25897	pub ctry: String,
25898	#[cfg_attr( feature = "derive_serde", serde(rename = "ResdtlSts") )]
25899	pub resdtl_sts: ResidentialStatus1Code,
25900}
25901
25902impl CountryAndResidentialStatusType1 {
25903	pub fn validate(&self) -> Result<(), ValidationError> {
25904		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
25905		if !pattern.is_match(&self.ctry) {
25906			return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
25907		}
25908		self.resdtl_sts.validate()?;
25909		Ok(())
25910	}
25911}
25912
25913
25914// CountryAndResidentialStatusType2 ...
25915#[cfg_attr(feature = "derive_debug", derive(Debug))]
25916#[cfg_attr(feature = "derive_default", derive(Default))]
25917#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25918#[cfg_attr(feature = "derive_clone", derive(Clone))]
25919#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25920pub struct CountryAndResidentialStatusType2 {
25921	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry") )]
25922	pub ctry: String,
25923	#[cfg_attr( feature = "derive_serde", serde(rename = "ResdtlSts") )]
25924	pub resdtl_sts: ResidentialStatus1Code,
25925}
25926
25927impl CountryAndResidentialStatusType2 {
25928	pub fn validate(&self) -> Result<(), ValidationError> {
25929		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
25930		if !pattern.is_match(&self.ctry) {
25931			return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
25932		}
25933		self.resdtl_sts.validate()?;
25934		Ok(())
25935	}
25936}
25937
25938
25939// CountryCodeAndName3 ...
25940#[cfg_attr(feature = "derive_debug", derive(Debug))]
25941#[cfg_attr(feature = "derive_default", derive(Default))]
25942#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25943#[cfg_attr(feature = "derive_clone", derive(Clone))]
25944#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25945pub struct CountryCodeAndName3 {
25946	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
25947	pub cd: String,
25948	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
25949	pub nm: String,
25950}
25951
25952impl CountryCodeAndName3 {
25953	pub fn validate(&self) -> Result<(), ValidationError> {
25954		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
25955		if !pattern.is_match(&self.cd) {
25956			return Err(ValidationError::new(1005, "cd does not match the required pattern".to_string()));
25957		}
25958		if self.nm.chars().count() < 1 {
25959			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
25960		}
25961		if self.nm.chars().count() > 70 {
25962			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 70".to_string()));
25963		}
25964		Ok(())
25965	}
25966}
25967
25968
25969// CoverTwoDefaulters1 ...
25970#[cfg_attr(feature = "derive_debug", derive(Debug))]
25971#[cfg_attr(feature = "derive_default", derive(Default))]
25972#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
25973#[cfg_attr(feature = "derive_clone", derive(Clone))]
25974#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
25975pub struct CoverTwoDefaulters1 {
25976	#[cfg_attr( feature = "derive_serde", serde(rename = "Cover1Id") )]
25977	pub cover1_id: String,
25978	#[cfg_attr( feature = "derive_serde", serde(rename = "Cover2Id") )]
25979	pub cover2_id: String,
25980}
25981
25982impl CoverTwoDefaulters1 {
25983	pub fn validate(&self) -> Result<(), ValidationError> {
25984		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
25985		if !pattern.is_match(&self.cover1_id) {
25986			return Err(ValidationError::new(1005, "cover1_id does not match the required pattern".to_string()));
25987		}
25988		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
25989		if !pattern.is_match(&self.cover2_id) {
25990			return Err(ValidationError::new(1005, "cover2_id does not match the required pattern".to_string()));
25991		}
25992		Ok(())
25993	}
25994}
25995
25996
25997// CreditDebit3Code ...
25998#[cfg_attr(feature = "derive_debug", derive(Debug))]
25999#[cfg_attr(feature = "derive_default", derive(Default))]
26000#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26001#[cfg_attr(feature = "derive_clone", derive(Clone))]
26002#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26003pub enum CreditDebit3Code {
26004	#[cfg_attr(feature = "derive_default", default)]
26005	#[cfg_attr( feature = "derive_serde", serde(rename = "CRDT") )]
26006	CodeCRDT,
26007	#[cfg_attr( feature = "derive_serde", serde(rename = "DBIT") )]
26008	CodeDBIT,
26009}
26010
26011impl CreditDebit3Code {
26012	pub fn validate(&self) -> Result<(), ValidationError> {
26013		Ok(())
26014	}
26015}
26016
26017
26018// CreditDebitCode ...
26019#[cfg_attr(feature = "derive_debug", derive(Debug))]
26020#[cfg_attr(feature = "derive_default", derive(Default))]
26021#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26022#[cfg_attr(feature = "derive_clone", derive(Clone))]
26023#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26024pub enum CreditDebitCode {
26025	#[cfg_attr(feature = "derive_default", default)]
26026	#[cfg_attr( feature = "derive_serde", serde(rename = "CRDT") )]
26027	CodeCRDT,
26028	#[cfg_attr( feature = "derive_serde", serde(rename = "DBIT") )]
26029	CodeDBIT,
26030}
26031
26032impl CreditDebitCode {
26033	pub fn validate(&self) -> Result<(), ValidationError> {
26034		Ok(())
26035	}
26036}
26037
26038
26039// CreditDefaultSwapDerivative5 ...
26040#[cfg_attr(feature = "derive_debug", derive(Debug))]
26041#[cfg_attr(feature = "derive_default", derive(Default))]
26042#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26043#[cfg_attr(feature = "derive_clone", derive(Clone))]
26044#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26045pub struct CreditDefaultSwapDerivative5 {
26046	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygCdtDfltSwpId", skip_serializing_if = "Option::is_none") )]
26047	pub undrlyg_cdt_dflt_swp_id: Option<String>,
26048	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygCdtDfltSwpIndx") )]
26049	pub undrlyg_cdt_dflt_swp_indx: CreditDefaultSwapIndex3,
26050}
26051
26052impl CreditDefaultSwapDerivative5 {
26053	pub fn validate(&self) -> Result<(), ValidationError> {
26054		if let Some(ref val) = self.undrlyg_cdt_dflt_swp_id {
26055			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
26056			if !pattern.is_match(val) {
26057				return Err(ValidationError::new(1005, "undrlyg_cdt_dflt_swp_id does not match the required pattern".to_string()));
26058			}
26059		}
26060		self.undrlyg_cdt_dflt_swp_indx.validate()?;
26061		Ok(())
26062	}
26063}
26064
26065
26066// CreditDefaultSwapDerivative6 ...
26067#[cfg_attr(feature = "derive_debug", derive(Debug))]
26068#[cfg_attr(feature = "derive_default", derive(Default))]
26069#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26070#[cfg_attr(feature = "derive_clone", derive(Clone))]
26071#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26072pub struct CreditDefaultSwapDerivative6 {
26073	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygCdtDfltSwpId", skip_serializing_if = "Option::is_none") )]
26074	pub undrlyg_cdt_dflt_swp_id: Option<String>,
26075	#[cfg_attr( feature = "derive_serde", serde(rename = "OblgtnId") )]
26076	pub oblgtn_id: String,
26077	#[cfg_attr( feature = "derive_serde", serde(rename = "SnglNm") )]
26078	pub sngl_nm: CreditDefaultSwapSingleName2,
26079}
26080
26081impl CreditDefaultSwapDerivative6 {
26082	pub fn validate(&self) -> Result<(), ValidationError> {
26083		if let Some(ref val) = self.undrlyg_cdt_dflt_swp_id {
26084			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
26085			if !pattern.is_match(val) {
26086				return Err(ValidationError::new(1005, "undrlyg_cdt_dflt_swp_id does not match the required pattern".to_string()));
26087			}
26088		}
26089		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
26090		if !pattern.is_match(&self.oblgtn_id) {
26091			return Err(ValidationError::new(1005, "oblgtn_id does not match the required pattern".to_string()));
26092		}
26093		self.sngl_nm.validate()?;
26094		Ok(())
26095	}
26096}
26097
26098
26099// CreditDefaultSwapIndex3 ...
26100#[cfg_attr(feature = "derive_debug", derive(Debug))]
26101#[cfg_attr(feature = "derive_default", derive(Default))]
26102#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26103#[cfg_attr(feature = "derive_clone", derive(Clone))]
26104#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26105pub struct CreditDefaultSwapIndex3 {
26106	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygIndxId", skip_serializing_if = "Option::is_none") )]
26107	pub undrlyg_indx_id: Option<String>,
26108	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygIndxNm", skip_serializing_if = "Option::is_none") )]
26109	pub undrlyg_indx_nm: Option<String>,
26110	#[cfg_attr( feature = "derive_serde", serde(rename = "Srs", skip_serializing_if = "Option::is_none") )]
26111	pub srs: Option<f64>,
26112	#[cfg_attr( feature = "derive_serde", serde(rename = "Vrsn", skip_serializing_if = "Option::is_none") )]
26113	pub vrsn: Option<f64>,
26114	#[cfg_attr( feature = "derive_serde", serde(rename = "RollMnth", skip_serializing_if = "Option::is_none") )]
26115	pub roll_mnth: Option<Vec<f64>>,
26116	#[cfg_attr( feature = "derive_serde", serde(rename = "NxtRollDt", skip_serializing_if = "Option::is_none") )]
26117	pub nxt_roll_dt: Option<String>,
26118	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlCcy") )]
26119	pub ntnl_ccy: String,
26120}
26121
26122impl CreditDefaultSwapIndex3 {
26123	pub fn validate(&self) -> Result<(), ValidationError> {
26124		if let Some(ref val) = self.undrlyg_indx_id {
26125			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
26126			if !pattern.is_match(val) {
26127				return Err(ValidationError::new(1005, "undrlyg_indx_id does not match the required pattern".to_string()));
26128			}
26129		}
26130		if let Some(ref val) = self.undrlyg_indx_nm {
26131			if val.chars().count() < 1 {
26132				return Err(ValidationError::new(1001, "undrlyg_indx_nm is shorter than the minimum length of 1".to_string()));
26133			}
26134			if val.chars().count() > 25 {
26135				return Err(ValidationError::new(1002, "undrlyg_indx_nm exceeds the maximum length of 25".to_string()));
26136			}
26137		}
26138		if let Some(ref vec) = self.roll_mnth {
26139			for item in vec {
26140				if *item < 1.000000 {
26141					return Err(ValidationError::new(1003, "roll_mnth is less than the minimum value of 1.000000".to_string()));
26142				}
26143				if *item > 12.000000 {
26144					return Err(ValidationError::new(1004, "roll_mnth exceeds the maximum value of 12.000000".to_string()));
26145				}
26146			}
26147		}
26148		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
26149		if !pattern.is_match(&self.ntnl_ccy) {
26150			return Err(ValidationError::new(1005, "ntnl_ccy does not match the required pattern".to_string()));
26151		}
26152		Ok(())
26153	}
26154}
26155
26156
26157// CreditDefaultSwapSingleName2 ...
26158#[cfg_attr(feature = "derive_debug", derive(Debug))]
26159#[cfg_attr(feature = "derive_default", derive(Default))]
26160#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26161#[cfg_attr(feature = "derive_clone", derive(Clone))]
26162#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26163pub struct CreditDefaultSwapSingleName2 {
26164	#[cfg_attr( feature = "derive_serde", serde(rename = "SvrgnIssr") )]
26165	pub svrgn_issr: bool,
26166	#[cfg_attr( feature = "derive_serde", serde(rename = "RefPty", skip_serializing_if = "Option::is_none") )]
26167	pub ref_pty: Option<DerivativePartyIdentification1Choice>,
26168	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlCcy") )]
26169	pub ntnl_ccy: String,
26170}
26171
26172impl CreditDefaultSwapSingleName2 {
26173	pub fn validate(&self) -> Result<(), ValidationError> {
26174		if let Some(ref val) = self.ref_pty { val.validate()? }
26175		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
26176		if !pattern.is_match(&self.ntnl_ccy) {
26177			return Err(ValidationError::new(1005, "ntnl_ccy does not match the required pattern".to_string()));
26178		}
26179		Ok(())
26180	}
26181}
26182
26183
26184// CreditDefaultSwapsDerivative4Choice ...
26185#[cfg_attr(feature = "derive_debug", derive(Debug))]
26186#[cfg_attr(feature = "derive_default", derive(Default))]
26187#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26188#[cfg_attr(feature = "derive_clone", derive(Clone))]
26189#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26190pub struct CreditDefaultSwapsDerivative4Choice {
26191	#[cfg_attr( feature = "derive_serde", serde(rename = "SnglNmCdtDfltSwp", skip_serializing_if = "Option::is_none") )]
26192	pub sngl_nm_cdt_dflt_swp: Option<CreditDefaultSwapSingleName2>,
26193	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDfltSwpIndx", skip_serializing_if = "Option::is_none") )]
26194	pub cdt_dflt_swp_indx: Option<CreditDefaultSwapIndex3>,
26195	#[cfg_attr( feature = "derive_serde", serde(rename = "SnglNmCdtDfltSwpDeriv", skip_serializing_if = "Option::is_none") )]
26196	pub sngl_nm_cdt_dflt_swp_deriv: Option<CreditDefaultSwapDerivative6>,
26197	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDfltSwpIndxDeriv", skip_serializing_if = "Option::is_none") )]
26198	pub cdt_dflt_swp_indx_deriv: Option<CreditDefaultSwapDerivative5>,
26199}
26200
26201impl CreditDefaultSwapsDerivative4Choice {
26202	pub fn validate(&self) -> Result<(), ValidationError> {
26203		if let Some(ref val) = self.sngl_nm_cdt_dflt_swp { val.validate()? }
26204		if let Some(ref val) = self.cdt_dflt_swp_indx { val.validate()? }
26205		if let Some(ref val) = self.sngl_nm_cdt_dflt_swp_deriv { val.validate()? }
26206		if let Some(ref val) = self.cdt_dflt_swp_indx_deriv { val.validate()? }
26207		Ok(())
26208	}
26209}
26210
26211
26212// CreditDerivative4 ...
26213#[cfg_attr(feature = "derive_debug", derive(Debug))]
26214#[cfg_attr(feature = "derive_default", derive(Default))]
26215#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26216#[cfg_attr(feature = "derive_clone", derive(Clone))]
26217#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26218pub struct CreditDerivative4 {
26219	#[cfg_attr( feature = "derive_serde", serde(rename = "Snrty", skip_serializing_if = "Option::is_none") )]
26220	pub snrty: Option<DebtInstrumentSeniorityType2Code>,
26221	#[cfg_attr( feature = "derive_serde", serde(rename = "RefPty", skip_serializing_if = "Option::is_none") )]
26222	pub ref_pty: Option<DerivativePartyIdentification1Choice>,
26223	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtFrqcy", skip_serializing_if = "Option::is_none") )]
26224	pub pmt_frqcy: Option<Frequency13Code>,
26225	#[cfg_attr( feature = "derive_serde", serde(rename = "ClctnBsis", skip_serializing_if = "Option::is_none") )]
26226	pub clctn_bsis: Option<String>,
26227	#[cfg_attr( feature = "derive_serde", serde(rename = "Srs", skip_serializing_if = "Option::is_none") )]
26228	pub srs: Option<f64>,
26229	#[cfg_attr( feature = "derive_serde", serde(rename = "Vrsn", skip_serializing_if = "Option::is_none") )]
26230	pub vrsn: Option<f64>,
26231	#[cfg_attr( feature = "derive_serde", serde(rename = "IndxFctr", skip_serializing_if = "Option::is_none") )]
26232	pub indx_fctr: Option<f64>,
26233	#[cfg_attr( feature = "derive_serde", serde(rename = "Trch", skip_serializing_if = "Option::is_none") )]
26234	pub trch: Option<TrancheIndicator3Choice>,
26235}
26236
26237impl CreditDerivative4 {
26238	pub fn validate(&self) -> Result<(), ValidationError> {
26239		if let Some(ref val) = self.snrty { val.validate()? }
26240		if let Some(ref val) = self.ref_pty { val.validate()? }
26241		if let Some(ref val) = self.pmt_frqcy { val.validate()? }
26242		if let Some(ref val) = self.clctn_bsis {
26243			if val.chars().count() < 1 {
26244				return Err(ValidationError::new(1001, "clctn_bsis is shorter than the minimum length of 1".to_string()));
26245			}
26246			if val.chars().count() > 35 {
26247				return Err(ValidationError::new(1002, "clctn_bsis exceeds the maximum length of 35".to_string()));
26248			}
26249		}
26250		if let Some(ref val) = self.trch { val.validate()? }
26251		Ok(())
26252	}
26253}
26254
26255
26256// CreditDerivative7 ...
26257#[cfg_attr(feature = "derive_debug", derive(Debug))]
26258#[cfg_attr(feature = "derive_default", derive(Default))]
26259#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26260#[cfg_attr(feature = "derive_clone", derive(Clone))]
26261#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26262pub struct CreditDerivative7 {
26263	#[cfg_attr( feature = "derive_serde", serde(rename = "Snrty", skip_serializing_if = "Option::is_none") )]
26264	pub snrty: Option<DebtInstrumentSeniorityType2Code>,
26265	#[cfg_attr( feature = "derive_serde", serde(rename = "RefPty", skip_serializing_if = "Option::is_none") )]
26266	pub ref_pty: Option<DerivativePartyIdentification1Choice>,
26267	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtFrqcy", skip_serializing_if = "Option::is_none") )]
26268	pub pmt_frqcy: Option<Frequency13Code>,
26269	#[cfg_attr( feature = "derive_serde", serde(rename = "ClctnBsis", skip_serializing_if = "Option::is_none") )]
26270	pub clctn_bsis: Option<String>,
26271	#[cfg_attr( feature = "derive_serde", serde(rename = "Srs", skip_serializing_if = "Option::is_none") )]
26272	pub srs: Option<f64>,
26273	#[cfg_attr( feature = "derive_serde", serde(rename = "Vrsn", skip_serializing_if = "Option::is_none") )]
26274	pub vrsn: Option<f64>,
26275	#[cfg_attr( feature = "derive_serde", serde(rename = "IndxFctr", skip_serializing_if = "Option::is_none") )]
26276	pub indx_fctr: Option<f64>,
26277	#[cfg_attr( feature = "derive_serde", serde(rename = "TrchInd", skip_serializing_if = "Option::is_none") )]
26278	pub trch_ind: Option<bool>,
26279}
26280
26281impl CreditDerivative7 {
26282	pub fn validate(&self) -> Result<(), ValidationError> {
26283		if let Some(ref val) = self.snrty { val.validate()? }
26284		if let Some(ref val) = self.ref_pty { val.validate()? }
26285		if let Some(ref val) = self.pmt_frqcy { val.validate()? }
26286		if let Some(ref val) = self.clctn_bsis {
26287			if val.chars().count() < 1 {
26288				return Err(ValidationError::new(1001, "clctn_bsis is shorter than the minimum length of 1".to_string()));
26289			}
26290			if val.chars().count() > 35 {
26291				return Err(ValidationError::new(1002, "clctn_bsis exceeds the maximum length of 35".to_string()));
26292			}
26293		}
26294		Ok(())
26295	}
26296}
26297
26298
26299// CreditLine3 ...
26300#[cfg_attr(feature = "derive_debug", derive(Debug))]
26301#[cfg_attr(feature = "derive_default", derive(Default))]
26302#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26303#[cfg_attr(feature = "derive_clone", derive(Clone))]
26304#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26305pub struct CreditLine3 {
26306	#[cfg_attr( feature = "derive_serde", serde(rename = "Incl") )]
26307	pub incl: bool,
26308	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
26309	pub tp: Option<CreditLineType1Choice>,
26310	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
26311	pub amt: Option<ActiveOrHistoricCurrencyAndAmount>,
26312	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
26313	pub dt: Option<DateAndDateTime2Choice>,
26314}
26315
26316impl CreditLine3 {
26317	pub fn validate(&self) -> Result<(), ValidationError> {
26318		if let Some(ref val) = self.tp { val.validate()? }
26319		if let Some(ref val) = self.amt { val.validate()? }
26320		if let Some(ref val) = self.dt { val.validate()? }
26321		Ok(())
26322	}
26323}
26324
26325
26326// CreditLineType1Choice ...
26327#[cfg_attr(feature = "derive_debug", derive(Debug))]
26328#[cfg_attr(feature = "derive_default", derive(Default))]
26329#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26330#[cfg_attr(feature = "derive_clone", derive(Clone))]
26331#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26332pub struct CreditLineType1Choice {
26333	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
26334	pub cd: Option<String>,
26335	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
26336	pub prtry: Option<String>,
26337}
26338
26339impl CreditLineType1Choice {
26340	pub fn validate(&self) -> Result<(), ValidationError> {
26341		if let Some(ref val) = self.cd {
26342			if val.chars().count() < 1 {
26343				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
26344			}
26345			if val.chars().count() > 4 {
26346				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
26347			}
26348		}
26349		if let Some(ref val) = self.prtry {
26350			if val.chars().count() < 1 {
26351				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
26352			}
26353			if val.chars().count() > 35 {
26354				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
26355			}
26356		}
26357		Ok(())
26358	}
26359}
26360
26361
26362// CreditQuality1Code ...
26363#[cfg_attr(feature = "derive_debug", derive(Debug))]
26364#[cfg_attr(feature = "derive_default", derive(Default))]
26365#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26366#[cfg_attr(feature = "derive_clone", derive(Clone))]
26367#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26368pub enum CreditQuality1Code {
26369	#[cfg_attr(feature = "derive_default", default)]
26370	#[cfg_attr( feature = "derive_serde", serde(rename = "DFIM") )]
26371	CodeDFIM,
26372	#[cfg_attr( feature = "derive_serde", serde(rename = "EXSP") )]
26373	CodeEXSP,
26374	#[cfg_attr( feature = "derive_serde", serde(rename = "HIGR") )]
26375	CodeHIGR,
26376	#[cfg_attr( feature = "derive_serde", serde(rename = "HISP") )]
26377	CodeHISP,
26378	#[cfg_attr( feature = "derive_serde", serde(rename = "INDF") )]
26379	CodeINDF,
26380	#[cfg_attr( feature = "derive_serde", serde(rename = "LMGR") )]
26381	CodeLMGR,
26382	#[cfg_attr( feature = "derive_serde", serde(rename = "NIGS") )]
26383	CodeNIGS,
26384	#[cfg_attr( feature = "derive_serde", serde(rename = "PRIM") )]
26385	CodePRIM,
26386	#[cfg_attr( feature = "derive_serde", serde(rename = "SURI") )]
26387	CodeSURI,
26388	#[cfg_attr( feature = "derive_serde", serde(rename = "UMGR") )]
26389	CodeUMGR,
26390}
26391
26392impl CreditQuality1Code {
26393	pub fn validate(&self) -> Result<(), ValidationError> {
26394		Ok(())
26395	}
26396}
26397
26398
26399// CreditTransferMandateData1 ...
26400#[cfg_attr(feature = "derive_debug", derive(Debug))]
26401#[cfg_attr(feature = "derive_default", derive(Default))]
26402#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26403#[cfg_attr(feature = "derive_clone", derive(Clone))]
26404#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26405pub struct CreditTransferMandateData1 {
26406	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtId", skip_serializing_if = "Option::is_none") )]
26407	pub mndt_id: Option<String>,
26408	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
26409	pub tp: Option<MandateTypeInformation2>,
26410	#[cfg_attr( feature = "derive_serde", serde(rename = "DtOfSgntr", skip_serializing_if = "Option::is_none") )]
26411	pub dt_of_sgntr: Option<String>,
26412	#[cfg_attr( feature = "derive_serde", serde(rename = "DtOfVrfctn", skip_serializing_if = "Option::is_none") )]
26413	pub dt_of_vrfctn: Option<String>,
26414	#[cfg_attr( feature = "derive_serde", serde(rename = "ElctrncSgntr", skip_serializing_if = "Option::is_none") )]
26415	pub elctrnc_sgntr: Option<String>,
26416	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstPmtDt", skip_serializing_if = "Option::is_none") )]
26417	pub frst_pmt_dt: Option<String>,
26418	#[cfg_attr( feature = "derive_serde", serde(rename = "FnlPmtDt", skip_serializing_if = "Option::is_none") )]
26419	pub fnl_pmt_dt: Option<String>,
26420	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy", skip_serializing_if = "Option::is_none") )]
26421	pub frqcy: Option<Frequency36Choice>,
26422	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
26423	pub rsn: Option<MandateSetupReason1Choice>,
26424}
26425
26426impl CreditTransferMandateData1 {
26427	pub fn validate(&self) -> Result<(), ValidationError> {
26428		if let Some(ref val) = self.mndt_id {
26429			if val.chars().count() < 1 {
26430				return Err(ValidationError::new(1001, "mndt_id is shorter than the minimum length of 1".to_string()));
26431			}
26432			if val.chars().count() > 35 {
26433				return Err(ValidationError::new(1002, "mndt_id exceeds the maximum length of 35".to_string()));
26434			}
26435		}
26436		if let Some(ref val) = self.tp { val.validate()? }
26437		if let Some(ref val) = self.elctrnc_sgntr {
26438			if val.chars().count() < 1 {
26439				return Err(ValidationError::new(1001, "elctrnc_sgntr is shorter than the minimum length of 1".to_string()));
26440			}
26441			if val.chars().count() > 10240 {
26442				return Err(ValidationError::new(1002, "elctrnc_sgntr exceeds the maximum length of 10240".to_string()));
26443			}
26444		}
26445		if let Some(ref val) = self.frqcy { val.validate()? }
26446		if let Some(ref val) = self.rsn { val.validate()? }
26447		Ok(())
26448	}
26449}
26450
26451
26452// CreditTransferTransaction59 ...
26453#[cfg_attr(feature = "derive_debug", derive(Debug))]
26454#[cfg_attr(feature = "derive_default", derive(Default))]
26455#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26456#[cfg_attr(feature = "derive_clone", derive(Clone))]
26457#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26458pub struct CreditTransferTransaction59 {
26459	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtId") )]
26460	pub pmt_id: PaymentIdentification6,
26461	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
26462	pub pmt_tp_inf: Option<PaymentTypeInformation26>,
26463	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRateMrkr", skip_serializing_if = "Option::is_none") )]
26464	pub tax_rate_mrkr: Option<TaxRateMarker1Code>,
26465	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
26466	pub amt: ActiveCurrencyAndAmount,
26467	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr", skip_serializing_if = "Option::is_none") )]
26468	pub chrg_br: Option<ChargeBearerType1Code>,
26469	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqInstr", skip_serializing_if = "Option::is_none") )]
26470	pub chq_instr: Option<Cheque19>,
26471	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy", skip_serializing_if = "Option::is_none") )]
26472	pub frqcy: Option<Frequency1>,
26473	#[cfg_attr( feature = "derive_serde", serde(rename = "TrfInstr", skip_serializing_if = "Option::is_none") )]
26474	pub trf_instr: Option<TransferInstruction1>,
26475	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
26476	pub ultmt_dbtr: Option<PartyIdentification272>,
26477	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1", skip_serializing_if = "Option::is_none") )]
26478	pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
26479	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2", skip_serializing_if = "Option::is_none") )]
26480	pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
26481	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3", skip_serializing_if = "Option::is_none") )]
26482	pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
26483	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt") )]
26484	pub cdtr_agt: BranchAndFinancialInstitutionIdentification8,
26485	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
26486	pub cdtr: Option<PartyIdentification272>,
26487	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
26488	pub cdtr_acct: Option<CashAccount40>,
26489	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
26490	pub ultmt_cdtr: Option<PartyIdentification272>,
26491	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForCdtrAgt", skip_serializing_if = "Option::is_none") )]
26492	pub instr_for_cdtr_agt: Option<Vec<InstructionForCreditorAgent3>>,
26493	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
26494	pub purp: Option<Purpose2Choice>,
26495	#[cfg_attr( feature = "derive_serde", serde(rename = "RgltryRptg", skip_serializing_if = "Option::is_none") )]
26496	pub rgltry_rptg: Option<Vec<RegulatoryReporting3>>,
26497	#[cfg_attr( feature = "derive_serde", serde(rename = "Tax", skip_serializing_if = "Option::is_none") )]
26498	pub tax: Option<TaxData1>,
26499	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdRmtInf", skip_serializing_if = "Option::is_none") )]
26500	pub rltd_rmt_inf: Option<Vec<RemittanceLocation9>>,
26501	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
26502	pub rmt_inf: Option<RemittanceInformation22>,
26503}
26504
26505impl CreditTransferTransaction59 {
26506	pub fn validate(&self) -> Result<(), ValidationError> {
26507		self.pmt_id.validate()?;
26508		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
26509		if let Some(ref val) = self.tax_rate_mrkr { val.validate()? }
26510		self.amt.validate()?;
26511		if let Some(ref val) = self.chrg_br { val.validate()? }
26512		if let Some(ref val) = self.chq_instr { val.validate()? }
26513		if let Some(ref val) = self.frqcy { val.validate()? }
26514		if let Some(ref val) = self.trf_instr { val.validate()? }
26515		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
26516		if let Some(ref val) = self.intrmy_agt1 { val.validate()? }
26517		if let Some(ref val) = self.intrmy_agt2 { val.validate()? }
26518		if let Some(ref val) = self.intrmy_agt3 { val.validate()? }
26519		self.cdtr_agt.validate()?;
26520		if let Some(ref val) = self.cdtr { val.validate()? }
26521		if let Some(ref val) = self.cdtr_acct { val.validate()? }
26522		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
26523		if let Some(ref vec) = self.instr_for_cdtr_agt { for item in vec { item.validate()? } }
26524		if let Some(ref val) = self.purp { val.validate()? }
26525		if let Some(ref vec) = self.rgltry_rptg { for item in vec { item.validate()? } }
26526		if let Some(ref val) = self.tax { val.validate()? }
26527		if let Some(ref vec) = self.rltd_rmt_inf { for item in vec { item.validate()? } }
26528		if let Some(ref val) = self.rmt_inf { val.validate()? }
26529		Ok(())
26530	}
26531}
26532
26533
26534// CreditTransferTransaction61 ...
26535#[cfg_attr(feature = "derive_debug", derive(Debug))]
26536#[cfg_attr(feature = "derive_default", derive(Default))]
26537#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26538#[cfg_attr(feature = "derive_clone", derive(Clone))]
26539#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26540pub struct CreditTransferTransaction61 {
26541	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtId") )]
26542	pub pmt_id: PaymentIdentification6,
26543	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
26544	pub pmt_tp_inf: Option<PaymentTypeInformation26>,
26545	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
26546	pub amt: AmountType4Choice,
26547	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRateInf", skip_serializing_if = "Option::is_none") )]
26548	pub xchg_rate_inf: Option<ExchangeRate1>,
26549	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr", skip_serializing_if = "Option::is_none") )]
26550	pub chrg_br: Option<ChargeBearerType1Code>,
26551	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtRltdInf", skip_serializing_if = "Option::is_none") )]
26552	pub mndt_rltd_inf: Option<CreditTransferMandateData1>,
26553	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqInstr", skip_serializing_if = "Option::is_none") )]
26554	pub chq_instr: Option<Cheque19>,
26555	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
26556	pub ultmt_dbtr: Option<PartyIdentification272>,
26557	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1", skip_serializing_if = "Option::is_none") )]
26558	pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
26559	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1Acct", skip_serializing_if = "Option::is_none") )]
26560	pub intrmy_agt1_acct: Option<CashAccount40>,
26561	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2", skip_serializing_if = "Option::is_none") )]
26562	pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
26563	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2Acct", skip_serializing_if = "Option::is_none") )]
26564	pub intrmy_agt2_acct: Option<CashAccount40>,
26565	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3", skip_serializing_if = "Option::is_none") )]
26566	pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
26567	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3Acct", skip_serializing_if = "Option::is_none") )]
26568	pub intrmy_agt3_acct: Option<CashAccount40>,
26569	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
26570	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
26571	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
26572	pub cdtr_agt_acct: Option<CashAccount40>,
26573	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
26574	pub cdtr: Option<PartyIdentification272>,
26575	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
26576	pub cdtr_acct: Option<CashAccount40>,
26577	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
26578	pub ultmt_cdtr: Option<PartyIdentification272>,
26579	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForCdtrAgt", skip_serializing_if = "Option::is_none") )]
26580	pub instr_for_cdtr_agt: Option<Vec<InstructionForCreditorAgent3>>,
26581	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForDbtrAgt", skip_serializing_if = "Option::is_none") )]
26582	pub instr_for_dbtr_agt: Option<InstructionForDebtorAgent1>,
26583	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
26584	pub purp: Option<Purpose2Choice>,
26585	#[cfg_attr( feature = "derive_serde", serde(rename = "RgltryRptg", skip_serializing_if = "Option::is_none") )]
26586	pub rgltry_rptg: Option<Vec<RegulatoryReporting3>>,
26587	#[cfg_attr( feature = "derive_serde", serde(rename = "Tax", skip_serializing_if = "Option::is_none") )]
26588	pub tax: Option<TaxData1>,
26589	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdRmtInf", skip_serializing_if = "Option::is_none") )]
26590	pub rltd_rmt_inf: Option<Vec<RemittanceLocation8>>,
26591	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
26592	pub rmt_inf: Option<RemittanceInformation22>,
26593	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
26594	pub splmtry_data: Option<Vec<SupplementaryData1>>,
26595}
26596
26597impl CreditTransferTransaction61 {
26598	pub fn validate(&self) -> Result<(), ValidationError> {
26599		self.pmt_id.validate()?;
26600		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
26601		self.amt.validate()?;
26602		if let Some(ref val) = self.xchg_rate_inf { val.validate()? }
26603		if let Some(ref val) = self.chrg_br { val.validate()? }
26604		if let Some(ref val) = self.mndt_rltd_inf { val.validate()? }
26605		if let Some(ref val) = self.chq_instr { val.validate()? }
26606		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
26607		if let Some(ref val) = self.intrmy_agt1 { val.validate()? }
26608		if let Some(ref val) = self.intrmy_agt1_acct { val.validate()? }
26609		if let Some(ref val) = self.intrmy_agt2 { val.validate()? }
26610		if let Some(ref val) = self.intrmy_agt2_acct { val.validate()? }
26611		if let Some(ref val) = self.intrmy_agt3 { val.validate()? }
26612		if let Some(ref val) = self.intrmy_agt3_acct { val.validate()? }
26613		if let Some(ref val) = self.cdtr_agt { val.validate()? }
26614		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
26615		if let Some(ref val) = self.cdtr { val.validate()? }
26616		if let Some(ref val) = self.cdtr_acct { val.validate()? }
26617		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
26618		if let Some(ref vec) = self.instr_for_cdtr_agt { for item in vec { item.validate()? } }
26619		if let Some(ref val) = self.instr_for_dbtr_agt { val.validate()? }
26620		if let Some(ref val) = self.purp { val.validate()? }
26621		if let Some(ref vec) = self.rgltry_rptg { for item in vec { item.validate()? } }
26622		if let Some(ref val) = self.tax { val.validate()? }
26623		if let Some(ref vec) = self.rltd_rmt_inf { for item in vec { item.validate()? } }
26624		if let Some(ref val) = self.rmt_inf { val.validate()? }
26625		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
26626		Ok(())
26627	}
26628}
26629
26630
26631// CreditTransferTransaction62 ...
26632#[cfg_attr(feature = "derive_debug", derive(Debug))]
26633#[cfg_attr(feature = "derive_default", derive(Default))]
26634#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26635#[cfg_attr(feature = "derive_clone", derive(Clone))]
26636#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26637pub struct CreditTransferTransaction62 {
26638	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtId") )]
26639	pub pmt_id: PaymentIdentification13,
26640	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
26641	pub pmt_tp_inf: Option<PaymentTypeInformation28>,
26642	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmt") )]
26643	pub intr_bk_sttlm_amt: ActiveCurrencyAndAmount,
26644	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
26645	pub intr_bk_sttlm_dt: Option<String>,
26646	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmPrty", skip_serializing_if = "Option::is_none") )]
26647	pub sttlm_prty: Option<Priority3Code>,
26648	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmTmIndctn", skip_serializing_if = "Option::is_none") )]
26649	pub sttlm_tm_indctn: Option<SettlementDateTimeIndication1>,
26650	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmTmReq", skip_serializing_if = "Option::is_none") )]
26651	pub sttlm_tm_req: Option<SettlementTimeRequest2>,
26652	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt1", skip_serializing_if = "Option::is_none") )]
26653	pub prvs_instg_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
26654	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt1Acct", skip_serializing_if = "Option::is_none") )]
26655	pub prvs_instg_agt1_acct: Option<CashAccount40>,
26656	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt2", skip_serializing_if = "Option::is_none") )]
26657	pub prvs_instg_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
26658	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt2Acct", skip_serializing_if = "Option::is_none") )]
26659	pub prvs_instg_agt2_acct: Option<CashAccount40>,
26660	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt3", skip_serializing_if = "Option::is_none") )]
26661	pub prvs_instg_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
26662	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt3Acct", skip_serializing_if = "Option::is_none") )]
26663	pub prvs_instg_agt3_acct: Option<CashAccount40>,
26664	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
26665	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
26666	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
26667	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
26668	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1", skip_serializing_if = "Option::is_none") )]
26669	pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
26670	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1Acct", skip_serializing_if = "Option::is_none") )]
26671	pub intrmy_agt1_acct: Option<CashAccount40>,
26672	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2", skip_serializing_if = "Option::is_none") )]
26673	pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
26674	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2Acct", skip_serializing_if = "Option::is_none") )]
26675	pub intrmy_agt2_acct: Option<CashAccount40>,
26676	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3", skip_serializing_if = "Option::is_none") )]
26677	pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
26678	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3Acct", skip_serializing_if = "Option::is_none") )]
26679	pub intrmy_agt3_acct: Option<CashAccount40>,
26680	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
26681	pub ultmt_dbtr: Option<BranchAndFinancialInstitutionIdentification8>,
26682	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr") )]
26683	pub dbtr: BranchAndFinancialInstitutionIdentification8,
26684	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
26685	pub dbtr_acct: Option<CashAccount40>,
26686	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
26687	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
26688	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
26689	pub dbtr_agt_acct: Option<CashAccount40>,
26690	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
26691	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
26692	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
26693	pub cdtr_agt_acct: Option<CashAccount40>,
26694	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
26695	pub cdtr: BranchAndFinancialInstitutionIdentification8,
26696	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
26697	pub cdtr_acct: Option<CashAccount40>,
26698	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
26699	pub ultmt_cdtr: Option<BranchAndFinancialInstitutionIdentification8>,
26700	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForCdtrAgt", skip_serializing_if = "Option::is_none") )]
26701	pub instr_for_cdtr_agt: Option<Vec<InstructionForCreditorAgent3>>,
26702	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForNxtAgt", skip_serializing_if = "Option::is_none") )]
26703	pub instr_for_nxt_agt: Option<Vec<InstructionForNextAgent1>>,
26704	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
26705	pub purp: Option<Purpose2Choice>,
26706	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
26707	pub rmt_inf: Option<RemittanceInformation2>,
26708	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygAllcn", skip_serializing_if = "Option::is_none") )]
26709	pub undrlyg_allcn: Option<Vec<TransactionAllocation1>>,
26710	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygCstmrCdtTrf", skip_serializing_if = "Option::is_none") )]
26711	pub undrlyg_cstmr_cdt_trf: Option<CreditTransferTransaction63>,
26712	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
26713	pub splmtry_data: Option<Vec<SupplementaryData1>>,
26714}
26715
26716impl CreditTransferTransaction62 {
26717	pub fn validate(&self) -> Result<(), ValidationError> {
26718		self.pmt_id.validate()?;
26719		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
26720		self.intr_bk_sttlm_amt.validate()?;
26721		if let Some(ref val) = self.sttlm_prty { val.validate()? }
26722		if let Some(ref val) = self.sttlm_tm_indctn { val.validate()? }
26723		if let Some(ref val) = self.sttlm_tm_req { val.validate()? }
26724		if let Some(ref val) = self.prvs_instg_agt1 { val.validate()? }
26725		if let Some(ref val) = self.prvs_instg_agt1_acct { val.validate()? }
26726		if let Some(ref val) = self.prvs_instg_agt2 { val.validate()? }
26727		if let Some(ref val) = self.prvs_instg_agt2_acct { val.validate()? }
26728		if let Some(ref val) = self.prvs_instg_agt3 { val.validate()? }
26729		if let Some(ref val) = self.prvs_instg_agt3_acct { val.validate()? }
26730		if let Some(ref val) = self.instg_agt { val.validate()? }
26731		if let Some(ref val) = self.instd_agt { val.validate()? }
26732		if let Some(ref val) = self.intrmy_agt1 { val.validate()? }
26733		if let Some(ref val) = self.intrmy_agt1_acct { val.validate()? }
26734		if let Some(ref val) = self.intrmy_agt2 { val.validate()? }
26735		if let Some(ref val) = self.intrmy_agt2_acct { val.validate()? }
26736		if let Some(ref val) = self.intrmy_agt3 { val.validate()? }
26737		if let Some(ref val) = self.intrmy_agt3_acct { val.validate()? }
26738		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
26739		self.dbtr.validate()?;
26740		if let Some(ref val) = self.dbtr_acct { val.validate()? }
26741		if let Some(ref val) = self.dbtr_agt { val.validate()? }
26742		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
26743		if let Some(ref val) = self.cdtr_agt { val.validate()? }
26744		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
26745		self.cdtr.validate()?;
26746		if let Some(ref val) = self.cdtr_acct { val.validate()? }
26747		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
26748		if let Some(ref vec) = self.instr_for_cdtr_agt { for item in vec { item.validate()? } }
26749		if let Some(ref vec) = self.instr_for_nxt_agt { for item in vec { item.validate()? } }
26750		if let Some(ref val) = self.purp { val.validate()? }
26751		if let Some(ref val) = self.rmt_inf { val.validate()? }
26752		if let Some(ref vec) = self.undrlyg_allcn { for item in vec { item.validate()? } }
26753		if let Some(ref val) = self.undrlyg_cstmr_cdt_trf { val.validate()? }
26754		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
26755		Ok(())
26756	}
26757}
26758
26759
26760// CreditTransferTransaction63 ...
26761#[cfg_attr(feature = "derive_debug", derive(Debug))]
26762#[cfg_attr(feature = "derive_default", derive(Default))]
26763#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26764#[cfg_attr(feature = "derive_clone", derive(Clone))]
26765#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26766pub struct CreditTransferTransaction63 {
26767	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
26768	pub ultmt_dbtr: Option<PartyIdentification272>,
26769	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty", skip_serializing_if = "Option::is_none") )]
26770	pub initg_pty: Option<PartyIdentification272>,
26771	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr") )]
26772	pub dbtr: PartyIdentification272,
26773	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
26774	pub dbtr_acct: Option<CashAccount40>,
26775	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt") )]
26776	pub dbtr_agt: BranchAndFinancialInstitutionIdentification8,
26777	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
26778	pub dbtr_agt_acct: Option<CashAccount40>,
26779	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt1", skip_serializing_if = "Option::is_none") )]
26780	pub prvs_instg_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
26781	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt1Acct", skip_serializing_if = "Option::is_none") )]
26782	pub prvs_instg_agt1_acct: Option<CashAccount40>,
26783	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt2", skip_serializing_if = "Option::is_none") )]
26784	pub prvs_instg_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
26785	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt2Acct", skip_serializing_if = "Option::is_none") )]
26786	pub prvs_instg_agt2_acct: Option<CashAccount40>,
26787	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt3", skip_serializing_if = "Option::is_none") )]
26788	pub prvs_instg_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
26789	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt3Acct", skip_serializing_if = "Option::is_none") )]
26790	pub prvs_instg_agt3_acct: Option<CashAccount40>,
26791	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1", skip_serializing_if = "Option::is_none") )]
26792	pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
26793	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1Acct", skip_serializing_if = "Option::is_none") )]
26794	pub intrmy_agt1_acct: Option<CashAccount40>,
26795	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2", skip_serializing_if = "Option::is_none") )]
26796	pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
26797	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2Acct", skip_serializing_if = "Option::is_none") )]
26798	pub intrmy_agt2_acct: Option<CashAccount40>,
26799	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3", skip_serializing_if = "Option::is_none") )]
26800	pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
26801	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3Acct", skip_serializing_if = "Option::is_none") )]
26802	pub intrmy_agt3_acct: Option<CashAccount40>,
26803	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt") )]
26804	pub cdtr_agt: BranchAndFinancialInstitutionIdentification8,
26805	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
26806	pub cdtr_agt_acct: Option<CashAccount40>,
26807	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
26808	pub cdtr: PartyIdentification272,
26809	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
26810	pub cdtr_acct: Option<CashAccount40>,
26811	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
26812	pub ultmt_cdtr: Option<PartyIdentification272>,
26813	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForCdtrAgt", skip_serializing_if = "Option::is_none") )]
26814	pub instr_for_cdtr_agt: Option<Vec<InstructionForCreditorAgent3>>,
26815	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForNxtAgt", skip_serializing_if = "Option::is_none") )]
26816	pub instr_for_nxt_agt: Option<Vec<InstructionForNextAgent1>>,
26817	#[cfg_attr( feature = "derive_serde", serde(rename = "Tax", skip_serializing_if = "Option::is_none") )]
26818	pub tax: Option<TaxData1>,
26819	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
26820	pub rmt_inf: Option<RemittanceInformation22>,
26821	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAmt", skip_serializing_if = "Option::is_none") )]
26822	pub instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
26823}
26824
26825impl CreditTransferTransaction63 {
26826	pub fn validate(&self) -> Result<(), ValidationError> {
26827		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
26828		if let Some(ref val) = self.initg_pty { val.validate()? }
26829		self.dbtr.validate()?;
26830		if let Some(ref val) = self.dbtr_acct { val.validate()? }
26831		self.dbtr_agt.validate()?;
26832		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
26833		if let Some(ref val) = self.prvs_instg_agt1 { val.validate()? }
26834		if let Some(ref val) = self.prvs_instg_agt1_acct { val.validate()? }
26835		if let Some(ref val) = self.prvs_instg_agt2 { val.validate()? }
26836		if let Some(ref val) = self.prvs_instg_agt2_acct { val.validate()? }
26837		if let Some(ref val) = self.prvs_instg_agt3 { val.validate()? }
26838		if let Some(ref val) = self.prvs_instg_agt3_acct { val.validate()? }
26839		if let Some(ref val) = self.intrmy_agt1 { val.validate()? }
26840		if let Some(ref val) = self.intrmy_agt1_acct { val.validate()? }
26841		if let Some(ref val) = self.intrmy_agt2 { val.validate()? }
26842		if let Some(ref val) = self.intrmy_agt2_acct { val.validate()? }
26843		if let Some(ref val) = self.intrmy_agt3 { val.validate()? }
26844		if let Some(ref val) = self.intrmy_agt3_acct { val.validate()? }
26845		self.cdtr_agt.validate()?;
26846		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
26847		self.cdtr.validate()?;
26848		if let Some(ref val) = self.cdtr_acct { val.validate()? }
26849		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
26850		if let Some(ref vec) = self.instr_for_cdtr_agt { for item in vec { item.validate()? } }
26851		if let Some(ref vec) = self.instr_for_nxt_agt { for item in vec { item.validate()? } }
26852		if let Some(ref val) = self.tax { val.validate()? }
26853		if let Some(ref val) = self.rmt_inf { val.validate()? }
26854		if let Some(ref val) = self.instd_amt { val.validate()? }
26855		Ok(())
26856	}
26857}
26858
26859
26860// CreditTransferTransaction64 ...
26861#[cfg_attr(feature = "derive_debug", derive(Debug))]
26862#[cfg_attr(feature = "derive_default", derive(Default))]
26863#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
26864#[cfg_attr(feature = "derive_clone", derive(Clone))]
26865#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
26866pub struct CreditTransferTransaction64 {
26867	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtId") )]
26868	pub pmt_id: PaymentIdentification13,
26869	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
26870	pub pmt_tp_inf: Option<PaymentTypeInformation28>,
26871	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmt") )]
26872	pub intr_bk_sttlm_amt: ActiveCurrencyAndAmount,
26873	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
26874	pub intr_bk_sttlm_dt: Option<String>,
26875	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmPrty", skip_serializing_if = "Option::is_none") )]
26876	pub sttlm_prty: Option<Priority3Code>,
26877	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmTmIndctn", skip_serializing_if = "Option::is_none") )]
26878	pub sttlm_tm_indctn: Option<SettlementDateTimeIndication1>,
26879	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmTmReq", skip_serializing_if = "Option::is_none") )]
26880	pub sttlm_tm_req: Option<SettlementTimeRequest2>,
26881	#[cfg_attr( feature = "derive_serde", serde(rename = "AccptncDtTm", skip_serializing_if = "Option::is_none") )]
26882	pub accptnc_dt_tm: Option<String>,
26883	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolgAdjstmntDt", skip_serializing_if = "Option::is_none") )]
26884	pub poolg_adjstmnt_dt: Option<String>,
26885	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAmt", skip_serializing_if = "Option::is_none") )]
26886	pub instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
26887	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate", skip_serializing_if = "Option::is_none") )]
26888	pub xchg_rate: Option<f64>,
26889	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr") )]
26890	pub chrg_br: ChargeBearerType1Code,
26891	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsInf", skip_serializing_if = "Option::is_none") )]
26892	pub chrgs_inf: Option<Vec<Charges16>>,
26893	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtRltdInf", skip_serializing_if = "Option::is_none") )]
26894	pub mndt_rltd_inf: Option<CreditTransferMandateData1>,
26895	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt1", skip_serializing_if = "Option::is_none") )]
26896	pub prvs_instg_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
26897	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt1Acct", skip_serializing_if = "Option::is_none") )]
26898	pub prvs_instg_agt1_acct: Option<CashAccount40>,
26899	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt2", skip_serializing_if = "Option::is_none") )]
26900	pub prvs_instg_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
26901	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt2Acct", skip_serializing_if = "Option::is_none") )]
26902	pub prvs_instg_agt2_acct: Option<CashAccount40>,
26903	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt3", skip_serializing_if = "Option::is_none") )]
26904	pub prvs_instg_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
26905	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt3Acct", skip_serializing_if = "Option::is_none") )]
26906	pub prvs_instg_agt3_acct: Option<CashAccount40>,
26907	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
26908	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
26909	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
26910	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
26911	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1", skip_serializing_if = "Option::is_none") )]
26912	pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
26913	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1Acct", skip_serializing_if = "Option::is_none") )]
26914	pub intrmy_agt1_acct: Option<CashAccount40>,
26915	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2", skip_serializing_if = "Option::is_none") )]
26916	pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
26917	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2Acct", skip_serializing_if = "Option::is_none") )]
26918	pub intrmy_agt2_acct: Option<CashAccount40>,
26919	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3", skip_serializing_if = "Option::is_none") )]
26920	pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
26921	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3Acct", skip_serializing_if = "Option::is_none") )]
26922	pub intrmy_agt3_acct: Option<CashAccount40>,
26923	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
26924	pub ultmt_dbtr: Option<PartyIdentification272>,
26925	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty", skip_serializing_if = "Option::is_none") )]
26926	pub initg_pty: Option<PartyIdentification272>,
26927	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr") )]
26928	pub dbtr: PartyIdentification272,
26929	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
26930	pub dbtr_acct: Option<CashAccount40>,
26931	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt") )]
26932	pub dbtr_agt: BranchAndFinancialInstitutionIdentification8,
26933	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
26934	pub dbtr_agt_acct: Option<CashAccount40>,
26935	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt") )]
26936	pub cdtr_agt: BranchAndFinancialInstitutionIdentification8,
26937	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
26938	pub cdtr_agt_acct: Option<CashAccount40>,
26939	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
26940	pub cdtr: PartyIdentification272,
26941	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
26942	pub cdtr_acct: Option<CashAccount40>,
26943	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
26944	pub ultmt_cdtr: Option<PartyIdentification272>,
26945	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForCdtrAgt", skip_serializing_if = "Option::is_none") )]
26946	pub instr_for_cdtr_agt: Option<Vec<InstructionForCreditorAgent3>>,
26947	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForNxtAgt", skip_serializing_if = "Option::is_none") )]
26948	pub instr_for_nxt_agt: Option<Vec<InstructionForNextAgent1>>,
26949	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
26950	pub purp: Option<Purpose2Choice>,
26951	#[cfg_attr( feature = "derive_serde", serde(rename = "RgltryRptg", skip_serializing_if = "Option::is_none") )]
26952	pub rgltry_rptg: Option<Vec<RegulatoryReporting3>>,
26953	#[cfg_attr( feature = "derive_serde", serde(rename = "Tax", skip_serializing_if = "Option::is_none") )]
26954	pub tax: Option<TaxData1>,
26955	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdRmtInf", skip_serializing_if = "Option::is_none") )]
26956	pub rltd_rmt_inf: Option<Vec<RemittanceLocation8>>,
26957	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
26958	pub rmt_inf: Option<RemittanceInformation22>,
26959	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
26960	pub splmtry_data: Option<Vec<SupplementaryData1>>,
26961}
26962
26963impl CreditTransferTransaction64 {
26964	pub fn validate(&self) -> Result<(), ValidationError> {
26965		self.pmt_id.validate()?;
26966		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
26967		self.intr_bk_sttlm_amt.validate()?;
26968		if let Some(ref val) = self.sttlm_prty { val.validate()? }
26969		if let Some(ref val) = self.sttlm_tm_indctn { val.validate()? }
26970		if let Some(ref val) = self.sttlm_tm_req { val.validate()? }
26971		if let Some(ref val) = self.instd_amt { val.validate()? }
26972		self.chrg_br.validate()?;
26973		if let Some(ref vec) = self.chrgs_inf { for item in vec { item.validate()? } }
26974		if let Some(ref val) = self.mndt_rltd_inf { val.validate()? }
26975		if let Some(ref val) = self.prvs_instg_agt1 { val.validate()? }
26976		if let Some(ref val) = self.prvs_instg_agt1_acct { val.validate()? }
26977		if let Some(ref val) = self.prvs_instg_agt2 { val.validate()? }
26978		if let Some(ref val) = self.prvs_instg_agt2_acct { val.validate()? }
26979		if let Some(ref val) = self.prvs_instg_agt3 { val.validate()? }
26980		if let Some(ref val) = self.prvs_instg_agt3_acct { val.validate()? }
26981		if let Some(ref val) = self.instg_agt { val.validate()? }
26982		if let Some(ref val) = self.instd_agt { val.validate()? }
26983		if let Some(ref val) = self.intrmy_agt1 { val.validate()? }
26984		if let Some(ref val) = self.intrmy_agt1_acct { val.validate()? }
26985		if let Some(ref val) = self.intrmy_agt2 { val.validate()? }
26986		if let Some(ref val) = self.intrmy_agt2_acct { val.validate()? }
26987		if let Some(ref val) = self.intrmy_agt3 { val.validate()? }
26988		if let Some(ref val) = self.intrmy_agt3_acct { val.validate()? }
26989		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
26990		if let Some(ref val) = self.initg_pty { val.validate()? }
26991		self.dbtr.validate()?;
26992		if let Some(ref val) = self.dbtr_acct { val.validate()? }
26993		self.dbtr_agt.validate()?;
26994		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
26995		self.cdtr_agt.validate()?;
26996		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
26997		self.cdtr.validate()?;
26998		if let Some(ref val) = self.cdtr_acct { val.validate()? }
26999		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
27000		if let Some(ref vec) = self.instr_for_cdtr_agt { for item in vec { item.validate()? } }
27001		if let Some(ref vec) = self.instr_for_nxt_agt { for item in vec { item.validate()? } }
27002		if let Some(ref val) = self.purp { val.validate()? }
27003		if let Some(ref vec) = self.rgltry_rptg { for item in vec { item.validate()? } }
27004		if let Some(ref val) = self.tax { val.validate()? }
27005		if let Some(ref vec) = self.rltd_rmt_inf { for item in vec { item.validate()? } }
27006		if let Some(ref val) = self.rmt_inf { val.validate()? }
27007		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
27008		Ok(())
27009	}
27010}
27011
27012
27013// CreditTransferTransaction65 ...
27014#[cfg_attr(feature = "derive_debug", derive(Debug))]
27015#[cfg_attr(feature = "derive_default", derive(Default))]
27016#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27017#[cfg_attr(feature = "derive_clone", derive(Clone))]
27018#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27019pub struct CreditTransferTransaction65 {
27020	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtId") )]
27021	pub pmt_id: PaymentIdentification6,
27022	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
27023	pub pmt_tp_inf: Option<PaymentTypeInformation29>,
27024	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtCond", skip_serializing_if = "Option::is_none") )]
27025	pub pmt_cond: Option<PaymentCondition2>,
27026	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
27027	pub reqd_exctn_dt: Option<DateAndDateTime2Choice>,
27028	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
27029	pub amt: AmountType4Choice,
27030	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr", skip_serializing_if = "Option::is_none") )]
27031	pub chrg_br: Option<ChargeBearerType1Code>,
27032	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtRltdInf", skip_serializing_if = "Option::is_none") )]
27033	pub mndt_rltd_inf: Option<CreditTransferMandateData1>,
27034	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqInstr", skip_serializing_if = "Option::is_none") )]
27035	pub chq_instr: Option<Cheque19>,
27036	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
27037	pub ultmt_dbtr: Option<PartyIdentification272>,
27038	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1", skip_serializing_if = "Option::is_none") )]
27039	pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
27040	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2", skip_serializing_if = "Option::is_none") )]
27041	pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
27042	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3", skip_serializing_if = "Option::is_none") )]
27043	pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
27044	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt") )]
27045	pub cdtr_agt: BranchAndFinancialInstitutionIdentification8,
27046	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
27047	pub cdtr_agt_acct: Option<CashAccount40>,
27048	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
27049	pub cdtr: PartyIdentification272,
27050	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
27051	pub cdtr_acct: Option<CashAccount40>,
27052	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
27053	pub ultmt_cdtr: Option<PartyIdentification272>,
27054	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForCdtrAgt", skip_serializing_if = "Option::is_none") )]
27055	pub instr_for_cdtr_agt: Option<Vec<InstructionForCreditorAgent3>>,
27056	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
27057	pub purp: Option<Purpose2Choice>,
27058	#[cfg_attr( feature = "derive_serde", serde(rename = "RgltryRptg", skip_serializing_if = "Option::is_none") )]
27059	pub rgltry_rptg: Option<Vec<RegulatoryReporting3>>,
27060	#[cfg_attr( feature = "derive_serde", serde(rename = "Tax", skip_serializing_if = "Option::is_none") )]
27061	pub tax: Option<TaxData1>,
27062	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdRmtInf", skip_serializing_if = "Option::is_none") )]
27063	pub rltd_rmt_inf: Option<Vec<RemittanceLocation8>>,
27064	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
27065	pub rmt_inf: Option<RemittanceInformation22>,
27066	#[cfg_attr( feature = "derive_serde", serde(rename = "NclsdFile", skip_serializing_if = "Option::is_none") )]
27067	pub nclsd_file: Option<Vec<Document15>>,
27068	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
27069	pub splmtry_data: Option<Vec<SupplementaryData1>>,
27070}
27071
27072impl CreditTransferTransaction65 {
27073	pub fn validate(&self) -> Result<(), ValidationError> {
27074		self.pmt_id.validate()?;
27075		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
27076		if let Some(ref val) = self.pmt_cond { val.validate()? }
27077		if let Some(ref val) = self.reqd_exctn_dt { val.validate()? }
27078		self.amt.validate()?;
27079		if let Some(ref val) = self.chrg_br { val.validate()? }
27080		if let Some(ref val) = self.mndt_rltd_inf { val.validate()? }
27081		if let Some(ref val) = self.chq_instr { val.validate()? }
27082		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
27083		if let Some(ref val) = self.intrmy_agt1 { val.validate()? }
27084		if let Some(ref val) = self.intrmy_agt2 { val.validate()? }
27085		if let Some(ref val) = self.intrmy_agt3 { val.validate()? }
27086		self.cdtr_agt.validate()?;
27087		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
27088		self.cdtr.validate()?;
27089		if let Some(ref val) = self.cdtr_acct { val.validate()? }
27090		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
27091		if let Some(ref vec) = self.instr_for_cdtr_agt { for item in vec { item.validate()? } }
27092		if let Some(ref val) = self.purp { val.validate()? }
27093		if let Some(ref vec) = self.rgltry_rptg { for item in vec { item.validate()? } }
27094		if let Some(ref val) = self.tax { val.validate()? }
27095		if let Some(ref vec) = self.rltd_rmt_inf { for item in vec { item.validate()? } }
27096		if let Some(ref val) = self.rmt_inf { val.validate()? }
27097		if let Some(ref vec) = self.nclsd_file { for item in vec { item.validate()? } }
27098		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
27099		Ok(())
27100	}
27101}
27102
27103
27104// CreditTransferTransaction66 ...
27105#[cfg_attr(feature = "derive_debug", derive(Debug))]
27106#[cfg_attr(feature = "derive_default", derive(Default))]
27107#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27108#[cfg_attr(feature = "derive_clone", derive(Clone))]
27109#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27110pub struct CreditTransferTransaction66 {
27111	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtId") )]
27112	pub cdt_id: String,
27113	#[cfg_attr( feature = "derive_serde", serde(rename = "BtchBookg", skip_serializing_if = "Option::is_none") )]
27114	pub btch_bookg: Option<bool>,
27115	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
27116	pub pmt_tp_inf: Option<PaymentTypeInformation28>,
27117	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlIntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
27118	pub ttl_intr_bk_sttlm_amt: Option<ActiveCurrencyAndAmount>,
27119	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
27120	pub intr_bk_sttlm_dt: Option<String>,
27121	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmTmIndctn", skip_serializing_if = "Option::is_none") )]
27122	pub sttlm_tm_indctn: Option<SettlementDateTimeIndication1>,
27123	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
27124	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
27125	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
27126	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
27127	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1", skip_serializing_if = "Option::is_none") )]
27128	pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
27129	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1Acct", skip_serializing_if = "Option::is_none") )]
27130	pub intrmy_agt1_acct: Option<CashAccount40>,
27131	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2", skip_serializing_if = "Option::is_none") )]
27132	pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
27133	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2Acct", skip_serializing_if = "Option::is_none") )]
27134	pub intrmy_agt2_acct: Option<CashAccount40>,
27135	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3", skip_serializing_if = "Option::is_none") )]
27136	pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
27137	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3Acct", skip_serializing_if = "Option::is_none") )]
27138	pub intrmy_agt3_acct: Option<CashAccount40>,
27139	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
27140	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
27141	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
27142	pub cdtr_agt_acct: Option<CashAccount40>,
27143	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
27144	pub cdtr: BranchAndFinancialInstitutionIdentification8,
27145	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
27146	pub cdtr_acct: Option<CashAccount40>,
27147	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
27148	pub ultmt_cdtr: Option<BranchAndFinancialInstitutionIdentification8>,
27149	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForCdtrAgt", skip_serializing_if = "Option::is_none") )]
27150	pub instr_for_cdtr_agt: Option<Vec<InstructionForCreditorAgent3>>,
27151	#[cfg_attr( feature = "derive_serde", serde(rename = "DrctDbtTxInf") )]
27152	pub drct_dbt_tx_inf: Vec<DirectDebitTransactionInformation33>,
27153	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
27154	pub splmtry_data: Option<Vec<SupplementaryData1>>,
27155}
27156
27157impl CreditTransferTransaction66 {
27158	pub fn validate(&self) -> Result<(), ValidationError> {
27159		if self.cdt_id.chars().count() < 1 {
27160			return Err(ValidationError::new(1001, "cdt_id is shorter than the minimum length of 1".to_string()));
27161		}
27162		if self.cdt_id.chars().count() > 35 {
27163			return Err(ValidationError::new(1002, "cdt_id exceeds the maximum length of 35".to_string()));
27164		}
27165		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
27166		if let Some(ref val) = self.ttl_intr_bk_sttlm_amt { val.validate()? }
27167		if let Some(ref val) = self.sttlm_tm_indctn { val.validate()? }
27168		if let Some(ref val) = self.instg_agt { val.validate()? }
27169		if let Some(ref val) = self.instd_agt { val.validate()? }
27170		if let Some(ref val) = self.intrmy_agt1 { val.validate()? }
27171		if let Some(ref val) = self.intrmy_agt1_acct { val.validate()? }
27172		if let Some(ref val) = self.intrmy_agt2 { val.validate()? }
27173		if let Some(ref val) = self.intrmy_agt2_acct { val.validate()? }
27174		if let Some(ref val) = self.intrmy_agt3 { val.validate()? }
27175		if let Some(ref val) = self.intrmy_agt3_acct { val.validate()? }
27176		if let Some(ref val) = self.cdtr_agt { val.validate()? }
27177		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
27178		self.cdtr.validate()?;
27179		if let Some(ref val) = self.cdtr_acct { val.validate()? }
27180		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
27181		if let Some(ref vec) = self.instr_for_cdtr_agt { for item in vec { item.validate()? } }
27182		for item in &self.drct_dbt_tx_inf { item.validate()? }
27183		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
27184		Ok(())
27185	}
27186}
27187
27188
27189// CreditorEnrolment5 ...
27190#[cfg_attr(feature = "derive_debug", derive(Debug))]
27191#[cfg_attr(feature = "derive_default", derive(Default))]
27192#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27193#[cfg_attr(feature = "derive_clone", derive(Clone))]
27194#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27195pub struct CreditorEnrolment5 {
27196	#[cfg_attr( feature = "derive_serde", serde(rename = "Enrlmnt") )]
27197	pub enrlmnt: CreditorServiceEnrolment1,
27198	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrTradgNm", skip_serializing_if = "Option::is_none") )]
27199	pub cdtr_tradg_nm: Option<String>,
27200	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
27201	pub cdtr: RTPPartyIdentification2,
27202	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
27203	pub ultmt_cdtr: Option<RTPPartyIdentification2>,
27204	#[cfg_attr( feature = "derive_serde", serde(rename = "MrchntCtgyCd") )]
27205	pub mrchnt_ctgy_cd: String,
27206	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrLogo", skip_serializing_if = "Option::is_none") )]
27207	pub cdtr_logo: Option<String>,
27208}
27209
27210impl CreditorEnrolment5 {
27211	pub fn validate(&self) -> Result<(), ValidationError> {
27212		self.enrlmnt.validate()?;
27213		if let Some(ref val) = self.cdtr_tradg_nm {
27214			if val.chars().count() < 1 {
27215				return Err(ValidationError::new(1001, "cdtr_tradg_nm is shorter than the minimum length of 1".to_string()));
27216			}
27217			if val.chars().count() > 140 {
27218				return Err(ValidationError::new(1002, "cdtr_tradg_nm exceeds the maximum length of 140".to_string()));
27219			}
27220		}
27221		self.cdtr.validate()?;
27222		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
27223		let pattern = Regex::new("[0-9]{4,4}").unwrap();
27224		if !pattern.is_match(&self.mrchnt_ctgy_cd) {
27225			return Err(ValidationError::new(1005, "mrchnt_ctgy_cd does not match the required pattern".to_string()));
27226		}
27227		if let Some(ref val) = self.cdtr_logo {
27228			if val.chars().count() < 1 {
27229				return Err(ValidationError::new(1001, "cdtr_logo is shorter than the minimum length of 1".to_string()));
27230			}
27231			if val.chars().count() > 10240 {
27232				return Err(ValidationError::new(1002, "cdtr_logo exceeds the maximum length of 10240".to_string()));
27233			}
27234		}
27235		Ok(())
27236	}
27237}
27238
27239
27240// CreditorEnrolment6 ...
27241#[cfg_attr(feature = "derive_debug", derive(Debug))]
27242#[cfg_attr(feature = "derive_default", derive(Default))]
27243#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27244#[cfg_attr(feature = "derive_clone", derive(Clone))]
27245#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27246pub struct CreditorEnrolment6 {
27247	#[cfg_attr( feature = "derive_serde", serde(rename = "Enrlmnt", skip_serializing_if = "Option::is_none") )]
27248	pub enrlmnt: Option<CreditorServiceEnrolment1>,
27249	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrTradgNm", skip_serializing_if = "Option::is_none") )]
27250	pub cdtr_tradg_nm: Option<String>,
27251	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
27252	pub cdtr: RTPPartyIdentification2,
27253	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
27254	pub ultmt_cdtr: Option<RTPPartyIdentification2>,
27255	#[cfg_attr( feature = "derive_serde", serde(rename = "MrchntCtgyCd", skip_serializing_if = "Option::is_none") )]
27256	pub mrchnt_ctgy_cd: Option<String>,
27257	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrLogo", skip_serializing_if = "Option::is_none") )]
27258	pub cdtr_logo: Option<String>,
27259}
27260
27261impl CreditorEnrolment6 {
27262	pub fn validate(&self) -> Result<(), ValidationError> {
27263		if let Some(ref val) = self.enrlmnt { val.validate()? }
27264		if let Some(ref val) = self.cdtr_tradg_nm {
27265			if val.chars().count() < 1 {
27266				return Err(ValidationError::new(1001, "cdtr_tradg_nm is shorter than the minimum length of 1".to_string()));
27267			}
27268			if val.chars().count() > 140 {
27269				return Err(ValidationError::new(1002, "cdtr_tradg_nm exceeds the maximum length of 140".to_string()));
27270			}
27271		}
27272		self.cdtr.validate()?;
27273		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
27274		if let Some(ref val) = self.mrchnt_ctgy_cd {
27275			let pattern = Regex::new("[0-9]{4,4}").unwrap();
27276			if !pattern.is_match(val) {
27277				return Err(ValidationError::new(1005, "mrchnt_ctgy_cd does not match the required pattern".to_string()));
27278			}
27279		}
27280		if let Some(ref val) = self.cdtr_logo {
27281			if val.chars().count() < 1 {
27282				return Err(ValidationError::new(1001, "cdtr_logo is shorter than the minimum length of 1".to_string()));
27283			}
27284			if val.chars().count() > 10240 {
27285				return Err(ValidationError::new(1002, "cdtr_logo exceeds the maximum length of 10240".to_string()));
27286			}
27287		}
27288		Ok(())
27289	}
27290}
27291
27292
27293// CreditorEnrolmentAmendment5 ...
27294#[cfg_attr(feature = "derive_debug", derive(Debug))]
27295#[cfg_attr(feature = "derive_default", derive(Default))]
27296#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27297#[cfg_attr(feature = "derive_clone", derive(Clone))]
27298#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27299pub struct CreditorEnrolmentAmendment5 {
27300	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizInstr", skip_serializing_if = "Option::is_none") )]
27301	pub orgnl_biz_instr: Option<OriginalBusinessInstruction1>,
27302	#[cfg_attr( feature = "derive_serde", serde(rename = "AmdmntRsn", skip_serializing_if = "Option::is_none") )]
27303	pub amdmnt_rsn: Option<CreditorEnrolmentAmendmentReason3>,
27304	#[cfg_attr( feature = "derive_serde", serde(rename = "Amdmnt") )]
27305	pub amdmnt: CreditorEnrolmentAmendment6,
27306	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEnrlmnt") )]
27307	pub orgnl_enrlmnt: OriginalEnrolment3Choice,
27308	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
27309	pub splmtry_data: Option<Vec<SupplementaryData1>>,
27310}
27311
27312impl CreditorEnrolmentAmendment5 {
27313	pub fn validate(&self) -> Result<(), ValidationError> {
27314		if let Some(ref val) = self.orgnl_biz_instr { val.validate()? }
27315		if let Some(ref val) = self.amdmnt_rsn { val.validate()? }
27316		self.amdmnt.validate()?;
27317		self.orgnl_enrlmnt.validate()?;
27318		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
27319		Ok(())
27320	}
27321}
27322
27323
27324// CreditorEnrolmentAmendment6 ...
27325#[cfg_attr(feature = "derive_debug", derive(Debug))]
27326#[cfg_attr(feature = "derive_default", derive(Default))]
27327#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27328#[cfg_attr(feature = "derive_clone", derive(Clone))]
27329#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27330pub struct CreditorEnrolmentAmendment6 {
27331	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrEnrlmnt", skip_serializing_if = "Option::is_none") )]
27332	pub cdtr_enrlmnt: Option<CreditorEnrolment6>,
27333	#[cfg_attr( feature = "derive_serde", serde(rename = "ActvtnData", skip_serializing_if = "Option::is_none") )]
27334	pub actvtn_data: Option<CreditorInvoice5>,
27335}
27336
27337impl CreditorEnrolmentAmendment6 {
27338	pub fn validate(&self) -> Result<(), ValidationError> {
27339		if let Some(ref val) = self.cdtr_enrlmnt { val.validate()? }
27340		if let Some(ref val) = self.actvtn_data { val.validate()? }
27341		Ok(())
27342	}
27343}
27344
27345
27346// CreditorEnrolmentAmendmentReason1Choice ...
27347#[cfg_attr(feature = "derive_debug", derive(Debug))]
27348#[cfg_attr(feature = "derive_default", derive(Default))]
27349#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27350#[cfg_attr(feature = "derive_clone", derive(Clone))]
27351#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27352pub struct CreditorEnrolmentAmendmentReason1Choice {
27353	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
27354	pub cd: Option<String>,
27355	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
27356	pub prtry: Option<String>,
27357}
27358
27359impl CreditorEnrolmentAmendmentReason1Choice {
27360	pub fn validate(&self) -> Result<(), ValidationError> {
27361		if let Some(ref val) = self.cd {
27362			if val.chars().count() < 1 {
27363				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
27364			}
27365			if val.chars().count() > 4 {
27366				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
27367			}
27368		}
27369		if let Some(ref val) = self.prtry {
27370			if val.chars().count() < 1 {
27371				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
27372			}
27373			if val.chars().count() > 35 {
27374				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
27375			}
27376		}
27377		Ok(())
27378	}
27379}
27380
27381
27382// CreditorEnrolmentAmendmentReason3 ...
27383#[cfg_attr(feature = "derive_debug", derive(Debug))]
27384#[cfg_attr(feature = "derive_default", derive(Default))]
27385#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27386#[cfg_attr(feature = "derive_clone", derive(Clone))]
27387#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27388pub struct CreditorEnrolmentAmendmentReason3 {
27389	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
27390	pub orgtr: Option<RTPPartyIdentification2>,
27391	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
27392	pub rsn: CreditorEnrolmentAmendmentReason1Choice,
27393	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
27394	pub addtl_inf: Option<Vec<String>>,
27395}
27396
27397impl CreditorEnrolmentAmendmentReason3 {
27398	pub fn validate(&self) -> Result<(), ValidationError> {
27399		if let Some(ref val) = self.orgtr { val.validate()? }
27400		self.rsn.validate()?;
27401		if let Some(ref vec) = self.addtl_inf {
27402			for item in vec {
27403				if item.chars().count() < 1 {
27404					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
27405				}
27406				if item.chars().count() > 105 {
27407					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
27408				}
27409			}
27410		}
27411		Ok(())
27412	}
27413}
27414
27415
27416// CreditorEnrolmentCancellation3 ...
27417#[cfg_attr(feature = "derive_debug", derive(Debug))]
27418#[cfg_attr(feature = "derive_default", derive(Default))]
27419#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27420#[cfg_attr(feature = "derive_clone", derive(Clone))]
27421#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27422pub struct CreditorEnrolmentCancellation3 {
27423	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizInstr", skip_serializing_if = "Option::is_none") )]
27424	pub orgnl_biz_instr: Option<OriginalBusinessInstruction1>,
27425	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlRsn", skip_serializing_if = "Option::is_none") )]
27426	pub cxl_rsn: Option<CreditorEnrolmentCancellationReason3>,
27427	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEnrlmnt") )]
27428	pub orgnl_enrlmnt: OriginalEnrolment3Choice,
27429	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
27430	pub splmtry_data: Option<Vec<SupplementaryData1>>,
27431}
27432
27433impl CreditorEnrolmentCancellation3 {
27434	pub fn validate(&self) -> Result<(), ValidationError> {
27435		if let Some(ref val) = self.orgnl_biz_instr { val.validate()? }
27436		if let Some(ref val) = self.cxl_rsn { val.validate()? }
27437		self.orgnl_enrlmnt.validate()?;
27438		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
27439		Ok(())
27440	}
27441}
27442
27443
27444// CreditorEnrolmentCancellationReason1Choice ...
27445#[cfg_attr(feature = "derive_debug", derive(Debug))]
27446#[cfg_attr(feature = "derive_default", derive(Default))]
27447#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27448#[cfg_attr(feature = "derive_clone", derive(Clone))]
27449#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27450pub struct CreditorEnrolmentCancellationReason1Choice {
27451	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
27452	pub cd: Option<String>,
27453	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
27454	pub prtry: Option<String>,
27455}
27456
27457impl CreditorEnrolmentCancellationReason1Choice {
27458	pub fn validate(&self) -> Result<(), ValidationError> {
27459		if let Some(ref val) = self.cd {
27460			if val.chars().count() < 1 {
27461				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
27462			}
27463			if val.chars().count() > 4 {
27464				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
27465			}
27466		}
27467		if let Some(ref val) = self.prtry {
27468			if val.chars().count() < 1 {
27469				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
27470			}
27471			if val.chars().count() > 35 {
27472				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
27473			}
27474		}
27475		Ok(())
27476	}
27477}
27478
27479
27480// CreditorEnrolmentCancellationReason3 ...
27481#[cfg_attr(feature = "derive_debug", derive(Debug))]
27482#[cfg_attr(feature = "derive_default", derive(Default))]
27483#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27484#[cfg_attr(feature = "derive_clone", derive(Clone))]
27485#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27486pub struct CreditorEnrolmentCancellationReason3 {
27487	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
27488	pub orgtr: Option<RTPPartyIdentification2>,
27489	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
27490	pub rsn: CreditorEnrolmentCancellationReason1Choice,
27491	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
27492	pub addtl_inf: Option<Vec<String>>,
27493}
27494
27495impl CreditorEnrolmentCancellationReason3 {
27496	pub fn validate(&self) -> Result<(), ValidationError> {
27497		if let Some(ref val) = self.orgtr { val.validate()? }
27498		self.rsn.validate()?;
27499		if let Some(ref vec) = self.addtl_inf {
27500			for item in vec {
27501				if item.chars().count() < 1 {
27502					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
27503				}
27504				if item.chars().count() > 105 {
27505					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
27506				}
27507			}
27508		}
27509		Ok(())
27510	}
27511}
27512
27513
27514// CreditorEnrolmentStatusReason2Choice ...
27515#[cfg_attr(feature = "derive_debug", derive(Debug))]
27516#[cfg_attr(feature = "derive_default", derive(Default))]
27517#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27518#[cfg_attr(feature = "derive_clone", derive(Clone))]
27519#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27520pub struct CreditorEnrolmentStatusReason2Choice {
27521	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
27522	pub cd: Option<String>,
27523	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
27524	pub prtry: Option<String>,
27525}
27526
27527impl CreditorEnrolmentStatusReason2Choice {
27528	pub fn validate(&self) -> Result<(), ValidationError> {
27529		if let Some(ref val) = self.cd {
27530			if val.chars().count() < 1 {
27531				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
27532			}
27533			if val.chars().count() > 4 {
27534				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
27535			}
27536		}
27537		if let Some(ref val) = self.prtry {
27538			if val.chars().count() < 1 {
27539				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
27540			}
27541			if val.chars().count() > 35 {
27542				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
27543			}
27544		}
27545		Ok(())
27546	}
27547}
27548
27549
27550// CreditorEnrolmentStatusReason3 ...
27551#[cfg_attr(feature = "derive_debug", derive(Debug))]
27552#[cfg_attr(feature = "derive_default", derive(Default))]
27553#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27554#[cfg_attr(feature = "derive_clone", derive(Clone))]
27555#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27556pub struct CreditorEnrolmentStatusReason3 {
27557	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
27558	pub orgtr: Option<RTPPartyIdentification2>,
27559	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
27560	pub rsn: CreditorEnrolmentStatusReason2Choice,
27561	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
27562	pub addtl_inf: Option<Vec<String>>,
27563}
27564
27565impl CreditorEnrolmentStatusReason3 {
27566	pub fn validate(&self) -> Result<(), ValidationError> {
27567		if let Some(ref val) = self.orgtr { val.validate()? }
27568		self.rsn.validate()?;
27569		if let Some(ref vec) = self.addtl_inf {
27570			for item in vec {
27571				if item.chars().count() < 1 {
27572					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
27573				}
27574				if item.chars().count() > 105 {
27575					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
27576				}
27577			}
27578		}
27579		Ok(())
27580	}
27581}
27582
27583
27584// CreditorInvoice5 ...
27585#[cfg_attr(feature = "derive_debug", derive(Debug))]
27586#[cfg_attr(feature = "derive_default", derive(Default))]
27587#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27588#[cfg_attr(feature = "derive_clone", derive(Clone))]
27589#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27590pub struct CreditorInvoice5 {
27591	#[cfg_attr( feature = "derive_serde", serde(rename = "LtdPresntmntInd", skip_serializing_if = "Option::is_none") )]
27592	pub ltd_presntmnt_ind: Option<bool>,
27593	#[cfg_attr( feature = "derive_serde", serde(rename = "CstmrIdTp", skip_serializing_if = "Option::is_none") )]
27594	pub cstmr_id_tp: Option<CustomerTypeRequest2>,
27595	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctFrmtTp", skip_serializing_if = "Option::is_none") )]
27596	pub ctrct_frmt_tp: Option<Vec<DocumentFormat2Choice>>,
27597	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctRefTp", skip_serializing_if = "Option::is_none") )]
27598	pub ctrct_ref_tp: Option<Vec<DocumentType1Choice>>,
27599	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrInstr", skip_serializing_if = "Option::is_none") )]
27600	pub cdtr_instr: Option<String>,
27601	#[cfg_attr( feature = "derive_serde", serde(rename = "ActvtnReqDlvryPty", skip_serializing_if = "Option::is_none") )]
27602	pub actvtn_req_dlvry_pty: Option<RTPPartyIdentification2>,
27603}
27604
27605impl CreditorInvoice5 {
27606	pub fn validate(&self) -> Result<(), ValidationError> {
27607		if let Some(ref val) = self.cstmr_id_tp { val.validate()? }
27608		if let Some(ref vec) = self.ctrct_frmt_tp { for item in vec { item.validate()? } }
27609		if let Some(ref vec) = self.ctrct_ref_tp { for item in vec { item.validate()? } }
27610		if let Some(ref val) = self.cdtr_instr {
27611			if val.chars().count() < 1 {
27612				return Err(ValidationError::new(1001, "cdtr_instr is shorter than the minimum length of 1".to_string()));
27613			}
27614			if val.chars().count() > 500 {
27615				return Err(ValidationError::new(1002, "cdtr_instr exceeds the maximum length of 500".to_string()));
27616			}
27617		}
27618		if let Some(ref val) = self.actvtn_req_dlvry_pty { val.validate()? }
27619		Ok(())
27620	}
27621}
27622
27623
27624// CreditorInvoice6 ...
27625#[cfg_attr(feature = "derive_debug", derive(Debug))]
27626#[cfg_attr(feature = "derive_default", derive(Default))]
27627#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27628#[cfg_attr(feature = "derive_clone", derive(Clone))]
27629#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27630pub struct CreditorInvoice6 {
27631	#[cfg_attr( feature = "derive_serde", serde(rename = "LtdPresntmntInd") )]
27632	pub ltd_presntmnt_ind: bool,
27633	#[cfg_attr( feature = "derive_serde", serde(rename = "CstmrIdTp", skip_serializing_if = "Option::is_none") )]
27634	pub cstmr_id_tp: Option<CustomerTypeRequest2>,
27635	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctFrmtTp", skip_serializing_if = "Option::is_none") )]
27636	pub ctrct_frmt_tp: Option<Vec<DocumentFormat2Choice>>,
27637	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctRefTp", skip_serializing_if = "Option::is_none") )]
27638	pub ctrct_ref_tp: Option<Vec<DocumentType1Choice>>,
27639	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrInstr", skip_serializing_if = "Option::is_none") )]
27640	pub cdtr_instr: Option<String>,
27641	#[cfg_attr( feature = "derive_serde", serde(rename = "ActvtnReqDlvryPty") )]
27642	pub actvtn_req_dlvry_pty: RTPPartyIdentification2,
27643}
27644
27645impl CreditorInvoice6 {
27646	pub fn validate(&self) -> Result<(), ValidationError> {
27647		if let Some(ref val) = self.cstmr_id_tp { val.validate()? }
27648		if let Some(ref vec) = self.ctrct_frmt_tp { for item in vec { item.validate()? } }
27649		if let Some(ref vec) = self.ctrct_ref_tp { for item in vec { item.validate()? } }
27650		if let Some(ref val) = self.cdtr_instr {
27651			if val.chars().count() < 1 {
27652				return Err(ValidationError::new(1001, "cdtr_instr is shorter than the minimum length of 1".to_string()));
27653			}
27654			if val.chars().count() > 500 {
27655				return Err(ValidationError::new(1002, "cdtr_instr exceeds the maximum length of 500".to_string()));
27656			}
27657		}
27658		self.actvtn_req_dlvry_pty.validate()?;
27659		Ok(())
27660	}
27661}
27662
27663
27664// CreditorReferenceInformation2 ...
27665#[cfg_attr(feature = "derive_debug", derive(Debug))]
27666#[cfg_attr(feature = "derive_default", derive(Default))]
27667#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27668#[cfg_attr(feature = "derive_clone", derive(Clone))]
27669#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27670pub struct CreditorReferenceInformation2 {
27671	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
27672	pub tp: Option<CreditorReferenceType2>,
27673	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref", skip_serializing_if = "Option::is_none") )]
27674	pub ref_attr: Option<String>,
27675}
27676
27677impl CreditorReferenceInformation2 {
27678	pub fn validate(&self) -> Result<(), ValidationError> {
27679		if let Some(ref val) = self.tp { val.validate()? }
27680		if let Some(ref val) = self.ref_attr {
27681			if val.chars().count() < 1 {
27682				return Err(ValidationError::new(1001, "ref_attr is shorter than the minimum length of 1".to_string()));
27683			}
27684			if val.chars().count() > 35 {
27685				return Err(ValidationError::new(1002, "ref_attr exceeds the maximum length of 35".to_string()));
27686			}
27687		}
27688		Ok(())
27689	}
27690}
27691
27692
27693// CreditorReferenceInformation3 ...
27694#[cfg_attr(feature = "derive_debug", derive(Debug))]
27695#[cfg_attr(feature = "derive_default", derive(Default))]
27696#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27697#[cfg_attr(feature = "derive_clone", derive(Clone))]
27698#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27699pub struct CreditorReferenceInformation3 {
27700	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
27701	pub tp: Option<CreditorReferenceType3>,
27702	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref", skip_serializing_if = "Option::is_none") )]
27703	pub ref_attr: Option<String>,
27704}
27705
27706impl CreditorReferenceInformation3 {
27707	pub fn validate(&self) -> Result<(), ValidationError> {
27708		if let Some(ref val) = self.tp { val.validate()? }
27709		if let Some(ref val) = self.ref_attr {
27710			if val.chars().count() < 1 {
27711				return Err(ValidationError::new(1001, "ref_attr is shorter than the minimum length of 1".to_string()));
27712			}
27713			if val.chars().count() > 35 {
27714				return Err(ValidationError::new(1002, "ref_attr exceeds the maximum length of 35".to_string()));
27715			}
27716		}
27717		Ok(())
27718	}
27719}
27720
27721
27722// CreditorReferenceType1Choice ...
27723#[cfg_attr(feature = "derive_debug", derive(Debug))]
27724#[cfg_attr(feature = "derive_default", derive(Default))]
27725#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27726#[cfg_attr(feature = "derive_clone", derive(Clone))]
27727#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27728pub struct CreditorReferenceType1Choice {
27729	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
27730	pub cd: Option<DocumentType3Code>,
27731	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
27732	pub prtry: Option<String>,
27733}
27734
27735impl CreditorReferenceType1Choice {
27736	pub fn validate(&self) -> Result<(), ValidationError> {
27737		if let Some(ref val) = self.cd { val.validate()? }
27738		if let Some(ref val) = self.prtry {
27739			if val.chars().count() < 1 {
27740				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
27741			}
27742			if val.chars().count() > 35 {
27743				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
27744			}
27745		}
27746		Ok(())
27747	}
27748}
27749
27750
27751// CreditorReferenceType2 ...
27752#[cfg_attr(feature = "derive_debug", derive(Debug))]
27753#[cfg_attr(feature = "derive_default", derive(Default))]
27754#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27755#[cfg_attr(feature = "derive_clone", derive(Clone))]
27756#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27757pub struct CreditorReferenceType2 {
27758	#[cfg_attr( feature = "derive_serde", serde(rename = "CdOrPrtry") )]
27759	pub cd_or_prtry: CreditorReferenceType1Choice,
27760	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
27761	pub issr: Option<String>,
27762}
27763
27764impl CreditorReferenceType2 {
27765	pub fn validate(&self) -> Result<(), ValidationError> {
27766		self.cd_or_prtry.validate()?;
27767		if let Some(ref val) = self.issr {
27768			if val.chars().count() < 1 {
27769				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
27770			}
27771			if val.chars().count() > 35 {
27772				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
27773			}
27774		}
27775		Ok(())
27776	}
27777}
27778
27779
27780// CreditorReferenceType2Choice ...
27781#[cfg_attr(feature = "derive_debug", derive(Debug))]
27782#[cfg_attr(feature = "derive_default", derive(Default))]
27783#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27784#[cfg_attr(feature = "derive_clone", derive(Clone))]
27785#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27786pub struct CreditorReferenceType2Choice {
27787	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
27788	pub cd: Option<String>,
27789	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
27790	pub prtry: Option<String>,
27791}
27792
27793impl CreditorReferenceType2Choice {
27794	pub fn validate(&self) -> Result<(), ValidationError> {
27795		if let Some(ref val) = self.cd {
27796			if val.chars().count() < 1 {
27797				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
27798			}
27799			if val.chars().count() > 4 {
27800				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
27801			}
27802		}
27803		if let Some(ref val) = self.prtry {
27804			if val.chars().count() < 1 {
27805				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
27806			}
27807			if val.chars().count() > 35 {
27808				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
27809			}
27810		}
27811		Ok(())
27812	}
27813}
27814
27815
27816// CreditorReferenceType3 ...
27817#[cfg_attr(feature = "derive_debug", derive(Debug))]
27818#[cfg_attr(feature = "derive_default", derive(Default))]
27819#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27820#[cfg_attr(feature = "derive_clone", derive(Clone))]
27821#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27822pub struct CreditorReferenceType3 {
27823	#[cfg_attr( feature = "derive_serde", serde(rename = "CdOrPrtry") )]
27824	pub cd_or_prtry: CreditorReferenceType2Choice,
27825	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
27826	pub issr: Option<String>,
27827}
27828
27829impl CreditorReferenceType3 {
27830	pub fn validate(&self) -> Result<(), ValidationError> {
27831		self.cd_or_prtry.validate()?;
27832		if let Some(ref val) = self.issr {
27833			if val.chars().count() < 1 {
27834				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
27835			}
27836			if val.chars().count() > 35 {
27837				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
27838			}
27839		}
27840		Ok(())
27841	}
27842}
27843
27844
27845// CreditorServiceEnrolment1 ...
27846#[cfg_attr(feature = "derive_debug", derive(Debug))]
27847#[cfg_attr(feature = "derive_default", derive(Default))]
27848#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27849#[cfg_attr(feature = "derive_clone", derive(Clone))]
27850#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27851pub struct CreditorServiceEnrolment1 {
27852	#[cfg_attr( feature = "derive_serde", serde(rename = "EnrlmntStartDt", skip_serializing_if = "Option::is_none") )]
27853	pub enrlmnt_start_dt: Option<DateAndDateTime2Choice>,
27854	#[cfg_attr( feature = "derive_serde", serde(rename = "EnrlmntEndDt", skip_serializing_if = "Option::is_none") )]
27855	pub enrlmnt_end_dt: Option<DateAndDateTime2Choice>,
27856	#[cfg_attr( feature = "derive_serde", serde(rename = "Vsblty", skip_serializing_if = "Option::is_none") )]
27857	pub vsblty: Option<Visibilty1>,
27858	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcActvtnAllwd") )]
27859	pub svc_actvtn_allwd: bool,
27860	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcDescLk", skip_serializing_if = "Option::is_none") )]
27861	pub svc_desc_lk: Option<String>,
27862	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrSvcActvtnLk", skip_serializing_if = "Option::is_none") )]
27863	pub cdtr_svc_actvtn_lk: Option<String>,
27864}
27865
27866impl CreditorServiceEnrolment1 {
27867	pub fn validate(&self) -> Result<(), ValidationError> {
27868		if let Some(ref val) = self.enrlmnt_start_dt { val.validate()? }
27869		if let Some(ref val) = self.enrlmnt_end_dt { val.validate()? }
27870		if let Some(ref val) = self.vsblty { val.validate()? }
27871		if let Some(ref val) = self.svc_desc_lk {
27872			if val.chars().count() < 1 {
27873				return Err(ValidationError::new(1001, "svc_desc_lk is shorter than the minimum length of 1".to_string()));
27874			}
27875			if val.chars().count() > 2048 {
27876				return Err(ValidationError::new(1002, "svc_desc_lk exceeds the maximum length of 2048".to_string()));
27877			}
27878		}
27879		if let Some(ref val) = self.cdtr_svc_actvtn_lk {
27880			if val.chars().count() < 1 {
27881				return Err(ValidationError::new(1001, "cdtr_svc_actvtn_lk is shorter than the minimum length of 1".to_string()));
27882			}
27883			if val.chars().count() > 2048 {
27884				return Err(ValidationError::new(1002, "cdtr_svc_actvtn_lk exceeds the maximum length of 2048".to_string()));
27885			}
27886		}
27887		Ok(())
27888	}
27889}
27890
27891
27892// CurrencyAndAmount ...
27893#[cfg_attr(feature = "derive_debug", derive(Debug))]
27894#[cfg_attr(feature = "derive_default", derive(Default))]
27895#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27896#[cfg_attr(feature = "derive_clone", derive(Clone))]
27897#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27898pub struct CurrencyAndAmount {
27899	#[cfg_attr( feature = "derive_serde", serde(rename = "@Ccy") )]
27900	pub ccy: String,
27901	#[cfg_attr( feature = "derive_serde", serde(rename = "$value") )]
27902	pub value: f64,
27903}
27904
27905impl CurrencyAndAmount {
27906	pub fn validate(&self) -> Result<(), ValidationError> {
27907		Ok(())
27908	}
27909}
27910
27911
27912// CurrencyCodeAndName1 ...
27913#[cfg_attr(feature = "derive_debug", derive(Debug))]
27914#[cfg_attr(feature = "derive_default", derive(Default))]
27915#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27916#[cfg_attr(feature = "derive_clone", derive(Clone))]
27917#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27918pub struct CurrencyCodeAndName1 {
27919	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
27920	pub cd: String,
27921	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
27922	pub nm: String,
27923}
27924
27925impl CurrencyCodeAndName1 {
27926	pub fn validate(&self) -> Result<(), ValidationError> {
27927		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
27928		if !pattern.is_match(&self.cd) {
27929			return Err(ValidationError::new(1005, "cd does not match the required pattern".to_string()));
27930		}
27931		if self.nm.chars().count() < 1 {
27932			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
27933		}
27934		if self.nm.chars().count() > 70 {
27935			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 70".to_string()));
27936		}
27937		Ok(())
27938	}
27939}
27940
27941
27942// CurrencyControlGroupStatus3 ...
27943#[cfg_attr(feature = "derive_debug", derive(Debug))]
27944#[cfg_attr(feature = "derive_default", derive(Default))]
27945#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27946#[cfg_attr(feature = "derive_clone", derive(Clone))]
27947#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27948pub struct CurrencyControlGroupStatus3 {
27949	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlRefs") )]
27950	pub orgnl_refs: OriginalMessage7,
27951	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPty") )]
27952	pub rptg_pty: TradeParty6,
27953	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnAgt") )]
27954	pub regn_agt: BranchAndFinancialInstitutionIdentification8,
27955	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPrd", skip_serializing_if = "Option::is_none") )]
27956	pub rptg_prd: Option<Period4Choice>,
27957	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
27958	pub sts: Option<StatisticalReportingStatus1Code>,
27959	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsn", skip_serializing_if = "Option::is_none") )]
27960	pub sts_rsn: Option<Vec<ValidationStatusReason3>>,
27961	#[cfg_attr( feature = "derive_serde", serde(rename = "StsDtTm", skip_serializing_if = "Option::is_none") )]
27962	pub sts_dt_tm: Option<String>,
27963}
27964
27965impl CurrencyControlGroupStatus3 {
27966	pub fn validate(&self) -> Result<(), ValidationError> {
27967		self.orgnl_refs.validate()?;
27968		self.rptg_pty.validate()?;
27969		self.regn_agt.validate()?;
27970		if let Some(ref val) = self.rptg_prd { val.validate()? }
27971		if let Some(ref val) = self.sts { val.validate()? }
27972		if let Some(ref vec) = self.sts_rsn { for item in vec { item.validate()? } }
27973		Ok(())
27974	}
27975}
27976
27977
27978// CurrencyControlHeader7 ...
27979#[cfg_attr(feature = "derive_debug", derive(Debug))]
27980#[cfg_attr(feature = "derive_default", derive(Default))]
27981#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
27982#[cfg_attr(feature = "derive_clone", derive(Clone))]
27983#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
27984pub struct CurrencyControlHeader7 {
27985	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
27986	pub msg_id: String,
27987	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
27988	pub cre_dt_tm: String,
27989	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfItms") )]
27990	pub nb_of_itms: String,
27991	#[cfg_attr( feature = "derive_serde", serde(rename = "RcvgPty") )]
27992	pub rcvg_pty: PartyIdentification272,
27993	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnAgt") )]
27994	pub regn_agt: BranchAndFinancialInstitutionIdentification8,
27995}
27996
27997impl CurrencyControlHeader7 {
27998	pub fn validate(&self) -> Result<(), ValidationError> {
27999		if self.msg_id.chars().count() < 1 {
28000			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
28001		}
28002		if self.msg_id.chars().count() > 35 {
28003			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
28004		}
28005		let pattern = Regex::new("[0-9]{1,15}").unwrap();
28006		if !pattern.is_match(&self.nb_of_itms) {
28007			return Err(ValidationError::new(1005, "nb_of_itms does not match the required pattern".to_string()));
28008		}
28009		self.rcvg_pty.validate()?;
28010		self.regn_agt.validate()?;
28011		Ok(())
28012	}
28013}
28014
28015
28016// CurrencyControlHeader8 ...
28017#[cfg_attr(feature = "derive_debug", derive(Debug))]
28018#[cfg_attr(feature = "derive_default", derive(Default))]
28019#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28020#[cfg_attr(feature = "derive_clone", derive(Clone))]
28021#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28022pub struct CurrencyControlHeader8 {
28023	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
28024	pub msg_id: String,
28025	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
28026	pub cre_dt_tm: String,
28027	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfItms") )]
28028	pub nb_of_itms: String,
28029	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty") )]
28030	pub initg_pty: PartyIdentification272,
28031	#[cfg_attr( feature = "derive_serde", serde(rename = "FwdgAgt", skip_serializing_if = "Option::is_none") )]
28032	pub fwdg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
28033}
28034
28035impl CurrencyControlHeader8 {
28036	pub fn validate(&self) -> Result<(), ValidationError> {
28037		if self.msg_id.chars().count() < 1 {
28038			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
28039		}
28040		if self.msg_id.chars().count() > 35 {
28041			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
28042		}
28043		let pattern = Regex::new("[0-9]{1,15}").unwrap();
28044		if !pattern.is_match(&self.nb_of_itms) {
28045			return Err(ValidationError::new(1005, "nb_of_itms does not match the required pattern".to_string()));
28046		}
28047		self.initg_pty.validate()?;
28048		if let Some(ref val) = self.fwdg_agt { val.validate()? }
28049		Ok(())
28050	}
28051}
28052
28053
28054// CurrencyControlHeader9 ...
28055#[cfg_attr(feature = "derive_debug", derive(Debug))]
28056#[cfg_attr(feature = "derive_default", derive(Default))]
28057#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28058#[cfg_attr(feature = "derive_clone", derive(Clone))]
28059#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28060pub struct CurrencyControlHeader9 {
28061	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
28062	pub msg_id: String,
28063	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
28064	pub cre_dt_tm: String,
28065	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfItms") )]
28066	pub nb_of_itms: String,
28067	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty") )]
28068	pub initg_pty: Party50Choice,
28069	#[cfg_attr( feature = "derive_serde", serde(rename = "FwdgAgt", skip_serializing_if = "Option::is_none") )]
28070	pub fwdg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
28071}
28072
28073impl CurrencyControlHeader9 {
28074	pub fn validate(&self) -> Result<(), ValidationError> {
28075		if self.msg_id.chars().count() < 1 {
28076			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
28077		}
28078		if self.msg_id.chars().count() > 35 {
28079			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
28080		}
28081		let pattern = Regex::new("[0-9]{1,15}").unwrap();
28082		if !pattern.is_match(&self.nb_of_itms) {
28083			return Err(ValidationError::new(1005, "nb_of_itms does not match the required pattern".to_string()));
28084		}
28085		self.initg_pty.validate()?;
28086		if let Some(ref val) = self.fwdg_agt { val.validate()? }
28087		Ok(())
28088	}
28089}
28090
28091
28092// CurrencyControlPackageStatus3 ...
28093#[cfg_attr(feature = "derive_debug", derive(Debug))]
28094#[cfg_attr(feature = "derive_default", derive(Default))]
28095#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28096#[cfg_attr(feature = "derive_clone", derive(Clone))]
28097#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28098pub struct CurrencyControlPackageStatus3 {
28099	#[cfg_attr( feature = "derive_serde", serde(rename = "PackgId") )]
28100	pub packg_id: String,
28101	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
28102	pub sts: StatisticalReportingStatus1Code,
28103	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsn", skip_serializing_if = "Option::is_none") )]
28104	pub sts_rsn: Option<Vec<ValidationStatusReason3>>,
28105	#[cfg_attr( feature = "derive_serde", serde(rename = "StsDtTm", skip_serializing_if = "Option::is_none") )]
28106	pub sts_dt_tm: Option<String>,
28107	#[cfg_attr( feature = "derive_serde", serde(rename = "RcrdSts", skip_serializing_if = "Option::is_none") )]
28108	pub rcrd_sts: Option<Vec<CurrencyControlRecordStatus3>>,
28109}
28110
28111impl CurrencyControlPackageStatus3 {
28112	pub fn validate(&self) -> Result<(), ValidationError> {
28113		if self.packg_id.chars().count() < 1 {
28114			return Err(ValidationError::new(1001, "packg_id is shorter than the minimum length of 1".to_string()));
28115		}
28116		if self.packg_id.chars().count() > 35 {
28117			return Err(ValidationError::new(1002, "packg_id exceeds the maximum length of 35".to_string()));
28118		}
28119		self.sts.validate()?;
28120		if let Some(ref vec) = self.sts_rsn { for item in vec { item.validate()? } }
28121		if let Some(ref vec) = self.rcrd_sts { for item in vec { item.validate()? } }
28122		Ok(())
28123	}
28124}
28125
28126
28127// CurrencyControlRecordStatus3 ...
28128#[cfg_attr(feature = "derive_debug", derive(Debug))]
28129#[cfg_attr(feature = "derive_default", derive(Default))]
28130#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28131#[cfg_attr(feature = "derive_clone", derive(Clone))]
28132#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28133pub struct CurrencyControlRecordStatus3 {
28134	#[cfg_attr( feature = "derive_serde", serde(rename = "RcrdId") )]
28135	pub rcrd_id: String,
28136	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
28137	pub sts: StatisticalReportingStatus1Code,
28138	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsn", skip_serializing_if = "Option::is_none") )]
28139	pub sts_rsn: Option<Vec<ValidationStatusReason3>>,
28140	#[cfg_attr( feature = "derive_serde", serde(rename = "StsDtTm", skip_serializing_if = "Option::is_none") )]
28141	pub sts_dt_tm: Option<String>,
28142	#[cfg_attr( feature = "derive_serde", serde(rename = "DocId", skip_serializing_if = "Option::is_none") )]
28143	pub doc_id: Option<DocumentIdentification28>,
28144}
28145
28146impl CurrencyControlRecordStatus3 {
28147	pub fn validate(&self) -> Result<(), ValidationError> {
28148		if self.rcrd_id.chars().count() < 1 {
28149			return Err(ValidationError::new(1001, "rcrd_id is shorter than the minimum length of 1".to_string()));
28150		}
28151		if self.rcrd_id.chars().count() > 35 {
28152			return Err(ValidationError::new(1002, "rcrd_id exceeds the maximum length of 35".to_string()));
28153		}
28154		self.sts.validate()?;
28155		if let Some(ref vec) = self.sts_rsn { for item in vec { item.validate()? } }
28156		if let Some(ref val) = self.doc_id { val.validate()? }
28157		Ok(())
28158	}
28159}
28160
28161
28162// CurrencyCriteriaDefinition1Choice ...
28163#[cfg_attr(feature = "derive_debug", derive(Debug))]
28164#[cfg_attr(feature = "derive_default", derive(Default))]
28165#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28166#[cfg_attr(feature = "derive_clone", derive(Clone))]
28167#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28168pub struct CurrencyCriteriaDefinition1Choice {
28169	#[cfg_attr( feature = "derive_serde", serde(rename = "QryNm", skip_serializing_if = "Option::is_none") )]
28170	pub qry_nm: Option<String>,
28171	#[cfg_attr( feature = "derive_serde", serde(rename = "NewCrit", skip_serializing_if = "Option::is_none") )]
28172	pub new_crit: Option<CurrencyExchangeCriteria2>,
28173}
28174
28175impl CurrencyCriteriaDefinition1Choice {
28176	pub fn validate(&self) -> Result<(), ValidationError> {
28177		if let Some(ref val) = self.qry_nm {
28178			if val.chars().count() < 1 {
28179				return Err(ValidationError::new(1001, "qry_nm is shorter than the minimum length of 1".to_string()));
28180			}
28181			if val.chars().count() > 35 {
28182				return Err(ValidationError::new(1002, "qry_nm exceeds the maximum length of 35".to_string()));
28183			}
28184		}
28185		if let Some(ref val) = self.new_crit { val.validate()? }
28186		Ok(())
28187	}
28188}
28189
28190
28191// CurrencyDesignation1 ...
28192#[cfg_attr(feature = "derive_debug", derive(Debug))]
28193#[cfg_attr(feature = "derive_default", derive(Default))]
28194#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28195#[cfg_attr(feature = "derive_clone", derive(Clone))]
28196#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28197pub struct CurrencyDesignation1 {
28198	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyDsgnt", skip_serializing_if = "Option::is_none") )]
28199	pub ccy_dsgnt: Option<CurrencyDesignation1Code>,
28200	#[cfg_attr( feature = "derive_serde", serde(rename = "Lctn", skip_serializing_if = "Option::is_none") )]
28201	pub lctn: Option<String>,
28202	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
28203	pub addtl_inf: Option<String>,
28204}
28205
28206impl CurrencyDesignation1 {
28207	pub fn validate(&self) -> Result<(), ValidationError> {
28208		if let Some(ref val) = self.ccy_dsgnt { val.validate()? }
28209		if let Some(ref val) = self.lctn {
28210			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
28211			if !pattern.is_match(val) {
28212				return Err(ValidationError::new(1005, "lctn does not match the required pattern".to_string()));
28213			}
28214		}
28215		if let Some(ref val) = self.addtl_inf {
28216			if val.chars().count() < 1 {
28217				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
28218			}
28219			if val.chars().count() > 350 {
28220				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 350".to_string()));
28221			}
28222		}
28223		Ok(())
28224	}
28225}
28226
28227
28228// CurrencyDesignation1Code ...
28229#[cfg_attr(feature = "derive_debug", derive(Debug))]
28230#[cfg_attr(feature = "derive_default", derive(Default))]
28231#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28232#[cfg_attr(feature = "derive_clone", derive(Clone))]
28233#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28234pub enum CurrencyDesignation1Code {
28235	#[cfg_attr(feature = "derive_default", default)]
28236	#[cfg_attr( feature = "derive_serde", serde(rename = "ONSH") )]
28237	CodeONSH,
28238	#[cfg_attr( feature = "derive_serde", serde(rename = "OFFS") )]
28239	CodeOFFS,
28240}
28241
28242impl CurrencyDesignation1Code {
28243	pub fn validate(&self) -> Result<(), ValidationError> {
28244		Ok(())
28245	}
28246}
28247
28248
28249// CurrencyExchange13 ...
28250#[cfg_attr(feature = "derive_debug", derive(Debug))]
28251#[cfg_attr(feature = "derive_default", derive(Default))]
28252#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28253#[cfg_attr(feature = "derive_clone", derive(Clone))]
28254#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28255pub struct CurrencyExchange13 {
28256	#[cfg_attr( feature = "derive_serde", serde(rename = "SrcCcy") )]
28257	pub src_ccy: String,
28258	#[cfg_attr( feature = "derive_serde", serde(rename = "TrgtCcy") )]
28259	pub trgt_ccy: String,
28260	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate") )]
28261	pub xchg_rate: f64,
28262	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitCcy", skip_serializing_if = "Option::is_none") )]
28263	pub unit_ccy: Option<String>,
28264}
28265
28266impl CurrencyExchange13 {
28267	pub fn validate(&self) -> Result<(), ValidationError> {
28268		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28269		if !pattern.is_match(&self.src_ccy) {
28270			return Err(ValidationError::new(1005, "src_ccy does not match the required pattern".to_string()));
28271		}
28272		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28273		if !pattern.is_match(&self.trgt_ccy) {
28274			return Err(ValidationError::new(1005, "trgt_ccy does not match the required pattern".to_string()));
28275		}
28276		if let Some(ref val) = self.unit_ccy {
28277			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28278			if !pattern.is_match(val) {
28279				return Err(ValidationError::new(1005, "unit_ccy does not match the required pattern".to_string()));
28280			}
28281		}
28282		Ok(())
28283	}
28284}
28285
28286
28287// CurrencyExchange20 ...
28288#[cfg_attr(feature = "derive_debug", derive(Debug))]
28289#[cfg_attr(feature = "derive_default", derive(Default))]
28290#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28291#[cfg_attr(feature = "derive_clone", derive(Clone))]
28292#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28293pub struct CurrencyExchange20 {
28294	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate") )]
28295	pub xchg_rate: f64,
28296	#[cfg_attr( feature = "derive_serde", serde(rename = "QtdCcy") )]
28297	pub qtd_ccy: String,
28298	#[cfg_attr( feature = "derive_serde", serde(rename = "QtnDt") )]
28299	pub qtn_dt: String,
28300	#[cfg_attr( feature = "derive_serde", serde(rename = "LwLmt", skip_serializing_if = "Option::is_none") )]
28301	pub lw_lmt: Option<ExchangeRateOrPercentage1Choice>,
28302	#[cfg_attr( feature = "derive_serde", serde(rename = "HghLmt", skip_serializing_if = "Option::is_none") )]
28303	pub hgh_lmt: Option<ExchangeRateOrPercentage1Choice>,
28304}
28305
28306impl CurrencyExchange20 {
28307	pub fn validate(&self) -> Result<(), ValidationError> {
28308		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28309		if !pattern.is_match(&self.qtd_ccy) {
28310			return Err(ValidationError::new(1005, "qtd_ccy does not match the required pattern".to_string()));
28311		}
28312		if let Some(ref val) = self.lw_lmt { val.validate()? }
28313		if let Some(ref val) = self.hgh_lmt { val.validate()? }
28314		Ok(())
28315	}
28316}
28317
28318
28319// CurrencyExchange22 ...
28320#[cfg_attr(feature = "derive_debug", derive(Debug))]
28321#[cfg_attr(feature = "derive_default", derive(Default))]
28322#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28323#[cfg_attr(feature = "derive_clone", derive(Clone))]
28324#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28325pub struct CurrencyExchange22 {
28326	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvrblCrossCcy", skip_serializing_if = "Option::is_none") )]
28327	pub dlvrbl_cross_ccy: Option<String>,
28328	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate", skip_serializing_if = "Option::is_none") )]
28329	pub xchg_rate: Option<f64>,
28330	#[cfg_attr( feature = "derive_serde", serde(rename = "FwdXchgRate", skip_serializing_if = "Option::is_none") )]
28331	pub fwd_xchg_rate: Option<f64>,
28332	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRateBsis", skip_serializing_if = "Option::is_none") )]
28333	pub xchg_rate_bsis: Option<ExchangeRateBasis1Choice>,
28334	#[cfg_attr( feature = "derive_serde", serde(rename = "FxgDt", skip_serializing_if = "Option::is_none") )]
28335	pub fxg_dt: Option<String>,
28336}
28337
28338impl CurrencyExchange22 {
28339	pub fn validate(&self) -> Result<(), ValidationError> {
28340		if let Some(ref val) = self.dlvrbl_cross_ccy {
28341			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28342			if !pattern.is_match(val) {
28343				return Err(ValidationError::new(1005, "dlvrbl_cross_ccy does not match the required pattern".to_string()));
28344			}
28345		}
28346		if let Some(ref val) = self.xchg_rate_bsis { val.validate()? }
28347		Ok(())
28348	}
28349}
28350
28351
28352// CurrencyExchange23 ...
28353#[cfg_attr(feature = "derive_debug", derive(Debug))]
28354#[cfg_attr(feature = "derive_default", derive(Default))]
28355#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28356#[cfg_attr(feature = "derive_clone", derive(Clone))]
28357#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28358pub struct CurrencyExchange23 {
28359	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
28360	pub ccy: String,
28361	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate", skip_serializing_if = "Option::is_none") )]
28362	pub xchg_rate: Option<f64>,
28363	#[cfg_attr( feature = "derive_serde", serde(rename = "FwdXchgRate", skip_serializing_if = "Option::is_none") )]
28364	pub fwd_xchg_rate: Option<f64>,
28365	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRateBsis", skip_serializing_if = "Option::is_none") )]
28366	pub xchg_rate_bsis: Option<ExchangeRateBasis1Choice>,
28367	#[cfg_attr( feature = "derive_serde", serde(rename = "FxgDt", skip_serializing_if = "Option::is_none") )]
28368	pub fxg_dt: Option<String>,
28369}
28370
28371impl CurrencyExchange23 {
28372	pub fn validate(&self) -> Result<(), ValidationError> {
28373		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28374		if !pattern.is_match(&self.ccy) {
28375			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
28376		}
28377		if let Some(ref val) = self.xchg_rate_bsis { val.validate()? }
28378		Ok(())
28379	}
28380}
28381
28382
28383// CurrencyExchange24 ...
28384#[cfg_attr(feature = "derive_debug", derive(Debug))]
28385#[cfg_attr(feature = "derive_default", derive(Default))]
28386#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28387#[cfg_attr(feature = "derive_clone", derive(Clone))]
28388#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28389pub struct CurrencyExchange24 {
28390	#[cfg_attr( feature = "derive_serde", serde(rename = "SrcCcy") )]
28391	pub src_ccy: String,
28392	#[cfg_attr( feature = "derive_serde", serde(rename = "TrgtCcy", skip_serializing_if = "Option::is_none") )]
28393	pub trgt_ccy: Option<String>,
28394	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitCcy", skip_serializing_if = "Option::is_none") )]
28395	pub unit_ccy: Option<String>,
28396	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate") )]
28397	pub xchg_rate: f64,
28398	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctId", skip_serializing_if = "Option::is_none") )]
28399	pub ctrct_id: Option<String>,
28400	#[cfg_attr( feature = "derive_serde", serde(rename = "QtnDt", skip_serializing_if = "Option::is_none") )]
28401	pub qtn_dt: Option<String>,
28402	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRateBase", skip_serializing_if = "Option::is_none") )]
28403	pub xchg_rate_base: Option<f64>,
28404}
28405
28406impl CurrencyExchange24 {
28407	pub fn validate(&self) -> Result<(), ValidationError> {
28408		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28409		if !pattern.is_match(&self.src_ccy) {
28410			return Err(ValidationError::new(1005, "src_ccy does not match the required pattern".to_string()));
28411		}
28412		if let Some(ref val) = self.trgt_ccy {
28413			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28414			if !pattern.is_match(val) {
28415				return Err(ValidationError::new(1005, "trgt_ccy does not match the required pattern".to_string()));
28416			}
28417		}
28418		if let Some(ref val) = self.unit_ccy {
28419			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28420			if !pattern.is_match(val) {
28421				return Err(ValidationError::new(1005, "unit_ccy does not match the required pattern".to_string()));
28422			}
28423		}
28424		if let Some(ref val) = self.ctrct_id {
28425			if val.chars().count() < 1 {
28426				return Err(ValidationError::new(1001, "ctrct_id is shorter than the minimum length of 1".to_string()));
28427			}
28428			if val.chars().count() > 35 {
28429				return Err(ValidationError::new(1002, "ctrct_id exceeds the maximum length of 35".to_string()));
28430			}
28431		}
28432		if let Some(ref val) = self.xchg_rate_base {
28433			if *val < 1.000000 {
28434				return Err(ValidationError::new(1003, "xchg_rate_base is less than the minimum value of 1.000000".to_string()));
28435			}
28436		}
28437		Ok(())
28438	}
28439}
28440
28441
28442// CurrencyExchange6 ...
28443#[cfg_attr(feature = "derive_debug", derive(Debug))]
28444#[cfg_attr(feature = "derive_default", derive(Default))]
28445#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28446#[cfg_attr(feature = "derive_clone", derive(Clone))]
28447#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28448pub struct CurrencyExchange6 {
28449	#[cfg_attr( feature = "derive_serde", serde(rename = "SrcCcy") )]
28450	pub src_ccy: String,
28451	#[cfg_attr( feature = "derive_serde", serde(rename = "TrgtCcy") )]
28452	pub trgt_ccy: String,
28453	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate") )]
28454	pub xchg_rate: f64,
28455	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
28456	pub desc: Option<String>,
28457	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitCcy", skip_serializing_if = "Option::is_none") )]
28458	pub unit_ccy: Option<String>,
28459	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmnts", skip_serializing_if = "Option::is_none") )]
28460	pub cmnts: Option<String>,
28461	#[cfg_attr( feature = "derive_serde", serde(rename = "QtnDt", skip_serializing_if = "Option::is_none") )]
28462	pub qtn_dt: Option<String>,
28463}
28464
28465impl CurrencyExchange6 {
28466	pub fn validate(&self) -> Result<(), ValidationError> {
28467		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28468		if !pattern.is_match(&self.src_ccy) {
28469			return Err(ValidationError::new(1005, "src_ccy does not match the required pattern".to_string()));
28470		}
28471		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28472		if !pattern.is_match(&self.trgt_ccy) {
28473			return Err(ValidationError::new(1005, "trgt_ccy does not match the required pattern".to_string()));
28474		}
28475		if let Some(ref val) = self.desc {
28476			if val.chars().count() < 1 {
28477				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
28478			}
28479			if val.chars().count() > 40 {
28480				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 40".to_string()));
28481			}
28482		}
28483		if let Some(ref val) = self.unit_ccy {
28484			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28485			if !pattern.is_match(val) {
28486				return Err(ValidationError::new(1005, "unit_ccy does not match the required pattern".to_string()));
28487			}
28488		}
28489		if let Some(ref val) = self.cmnts {
28490			if val.chars().count() < 1 {
28491				return Err(ValidationError::new(1001, "cmnts is shorter than the minimum length of 1".to_string()));
28492			}
28493			if val.chars().count() > 70 {
28494				return Err(ValidationError::new(1002, "cmnts exceeds the maximum length of 70".to_string()));
28495			}
28496		}
28497		Ok(())
28498	}
28499}
28500
28501
28502// CurrencyExchangeCriteria2 ...
28503#[cfg_attr(feature = "derive_debug", derive(Debug))]
28504#[cfg_attr(feature = "derive_default", derive(Default))]
28505#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28506#[cfg_attr(feature = "derive_clone", derive(Clone))]
28507#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28508pub struct CurrencyExchangeCriteria2 {
28509	#[cfg_attr( feature = "derive_serde", serde(rename = "NewQryNm", skip_serializing_if = "Option::is_none") )]
28510	pub new_qry_nm: Option<String>,
28511	#[cfg_attr( feature = "derive_serde", serde(rename = "SchCrit") )]
28512	pub sch_crit: Vec<CurrencyExchangeSearchCriteria1>,
28513}
28514
28515impl CurrencyExchangeCriteria2 {
28516	pub fn validate(&self) -> Result<(), ValidationError> {
28517		if let Some(ref val) = self.new_qry_nm {
28518			if val.chars().count() < 1 {
28519				return Err(ValidationError::new(1001, "new_qry_nm is shorter than the minimum length of 1".to_string()));
28520			}
28521			if val.chars().count() > 35 {
28522				return Err(ValidationError::new(1002, "new_qry_nm exceeds the maximum length of 35".to_string()));
28523			}
28524		}
28525		for item in &self.sch_crit { item.validate()? }
28526		Ok(())
28527	}
28528}
28529
28530
28531// CurrencyExchangeReport4 ...
28532#[cfg_attr(feature = "derive_debug", derive(Debug))]
28533#[cfg_attr(feature = "derive_default", derive(Default))]
28534#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28535#[cfg_attr(feature = "derive_clone", derive(Clone))]
28536#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28537pub struct CurrencyExchangeReport4 {
28538	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyRef") )]
28539	pub ccy_ref: CurrencySourceTarget1,
28540	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyXchgOrErr") )]
28541	pub ccy_xchg_or_err: ExchangeRateReportOrError4Choice,
28542}
28543
28544impl CurrencyExchangeReport4 {
28545	pub fn validate(&self) -> Result<(), ValidationError> {
28546		self.ccy_ref.validate()?;
28547		self.ccy_xchg_or_err.validate()?;
28548		Ok(())
28549	}
28550}
28551
28552
28553// CurrencyExchangeSearchCriteria1 ...
28554#[cfg_attr(feature = "derive_debug", derive(Debug))]
28555#[cfg_attr(feature = "derive_default", derive(Default))]
28556#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28557#[cfg_attr(feature = "derive_clone", derive(Clone))]
28558#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28559pub struct CurrencyExchangeSearchCriteria1 {
28560	#[cfg_attr( feature = "derive_serde", serde(rename = "SrcCcy") )]
28561	pub src_ccy: String,
28562	#[cfg_attr( feature = "derive_serde", serde(rename = "TrgtCcy") )]
28563	pub trgt_ccy: String,
28564}
28565
28566impl CurrencyExchangeSearchCriteria1 {
28567	pub fn validate(&self) -> Result<(), ValidationError> {
28568		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28569		if !pattern.is_match(&self.src_ccy) {
28570			return Err(ValidationError::new(1005, "src_ccy does not match the required pattern".to_string()));
28571		}
28572		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28573		if !pattern.is_match(&self.trgt_ccy) {
28574			return Err(ValidationError::new(1005, "trgt_ccy does not match the required pattern".to_string()));
28575		}
28576		Ok(())
28577	}
28578}
28579
28580
28581// CurrencyFactors1 ...
28582#[cfg_attr(feature = "derive_debug", derive(Debug))]
28583#[cfg_attr(feature = "derive_default", derive(Default))]
28584#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28585#[cfg_attr(feature = "derive_clone", derive(Clone))]
28586#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28587pub struct CurrencyFactors1 {
28588	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
28589	pub ccy: String,
28590	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtPosLmt") )]
28591	pub shrt_pos_lmt: f64,
28592	#[cfg_attr( feature = "derive_serde", serde(rename = "MinPayInAmt") )]
28593	pub min_pay_in_amt: f64,
28594	#[cfg_attr( feature = "derive_serde", serde(rename = "VoltlyMrgn") )]
28595	pub voltly_mrgn: f64,
28596	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
28597	pub rate: Option<AgreedRate2>,
28598}
28599
28600impl CurrencyFactors1 {
28601	pub fn validate(&self) -> Result<(), ValidationError> {
28602		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28603		if !pattern.is_match(&self.ccy) {
28604			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
28605		}
28606		if self.shrt_pos_lmt < 0.000000 {
28607			return Err(ValidationError::new(1003, "shrt_pos_lmt is less than the minimum value of 0.000000".to_string()));
28608		}
28609		if self.min_pay_in_amt < 0.000000 {
28610			return Err(ValidationError::new(1003, "min_pay_in_amt is less than the minimum value of 0.000000".to_string()));
28611		}
28612		if let Some(ref val) = self.rate { val.validate()? }
28613		Ok(())
28614	}
28615}
28616
28617
28618// CurrencyQueryDefinition3 ...
28619#[cfg_attr(feature = "derive_debug", derive(Debug))]
28620#[cfg_attr(feature = "derive_default", derive(Default))]
28621#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28622#[cfg_attr(feature = "derive_clone", derive(Clone))]
28623#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28624pub struct CurrencyQueryDefinition3 {
28625	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp", skip_serializing_if = "Option::is_none") )]
28626	pub qry_tp: Option<QueryType2Code>,
28627	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyCrit", skip_serializing_if = "Option::is_none") )]
28628	pub ccy_crit: Option<CurrencyCriteriaDefinition1Choice>,
28629}
28630
28631impl CurrencyQueryDefinition3 {
28632	pub fn validate(&self) -> Result<(), ValidationError> {
28633		if let Some(ref val) = self.qry_tp { val.validate()? }
28634		if let Some(ref val) = self.ccy_crit { val.validate()? }
28635		Ok(())
28636	}
28637}
28638
28639
28640// CurrencyReference3 ...
28641#[cfg_attr(feature = "derive_debug", derive(Debug))]
28642#[cfg_attr(feature = "derive_default", derive(Default))]
28643#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28644#[cfg_attr(feature = "derive_clone", derive(Clone))]
28645#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28646pub struct CurrencyReference3 {
28647	#[cfg_attr( feature = "derive_serde", serde(rename = "TrgtCcy") )]
28648	pub trgt_ccy: String,
28649	#[cfg_attr( feature = "derive_serde", serde(rename = "SrcCcy") )]
28650	pub src_ccy: String,
28651	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRateInf", skip_serializing_if = "Option::is_none") )]
28652	pub xchg_rate_inf: Option<Vec<ExchangeRateInformation1>>,
28653}
28654
28655impl CurrencyReference3 {
28656	pub fn validate(&self) -> Result<(), ValidationError> {
28657		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28658		if !pattern.is_match(&self.trgt_ccy) {
28659			return Err(ValidationError::new(1005, "trgt_ccy does not match the required pattern".to_string()));
28660		}
28661		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28662		if !pattern.is_match(&self.src_ccy) {
28663			return Err(ValidationError::new(1005, "src_ccy does not match the required pattern".to_string()));
28664		}
28665		if let Some(ref vec) = self.xchg_rate_inf { for item in vec { item.validate()? } }
28666		Ok(())
28667	}
28668}
28669
28670
28671// CurrencySourceTarget1 ...
28672#[cfg_attr(feature = "derive_debug", derive(Debug))]
28673#[cfg_attr(feature = "derive_default", derive(Default))]
28674#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28675#[cfg_attr(feature = "derive_clone", derive(Clone))]
28676#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28677pub struct CurrencySourceTarget1 {
28678	#[cfg_attr( feature = "derive_serde", serde(rename = "SrcCcy") )]
28679	pub src_ccy: String,
28680	#[cfg_attr( feature = "derive_serde", serde(rename = "TrgtCcy") )]
28681	pub trgt_ccy: String,
28682}
28683
28684impl CurrencySourceTarget1 {
28685	pub fn validate(&self) -> Result<(), ValidationError> {
28686		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28687		if !pattern.is_match(&self.src_ccy) {
28688			return Err(ValidationError::new(1005, "src_ccy does not match the required pattern".to_string()));
28689		}
28690		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28691		if !pattern.is_match(&self.trgt_ccy) {
28692			return Err(ValidationError::new(1005, "trgt_ccy does not match the required pattern".to_string()));
28693		}
28694		Ok(())
28695	}
28696}
28697
28698
28699// CurrentAndDefaultReservation6 ...
28700#[cfg_attr(feature = "derive_debug", derive(Debug))]
28701#[cfg_attr(feature = "derive_default", derive(Default))]
28702#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28703#[cfg_attr(feature = "derive_clone", derive(Clone))]
28704#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28705pub struct CurrentAndDefaultReservation6 {
28706	#[cfg_attr( feature = "derive_serde", serde(rename = "CurRsvatn", skip_serializing_if = "Option::is_none") )]
28707	pub cur_rsvatn: Option<Vec<ReservationReport8>>,
28708	#[cfg_attr( feature = "derive_serde", serde(rename = "DfltRsvatn", skip_serializing_if = "Option::is_none") )]
28709	pub dflt_rsvatn: Option<Vec<ReservationReport8>>,
28710}
28711
28712impl CurrentAndDefaultReservation6 {
28713	pub fn validate(&self) -> Result<(), ValidationError> {
28714		if let Some(ref vec) = self.cur_rsvatn { for item in vec { item.validate()? } }
28715		if let Some(ref vec) = self.dflt_rsvatn { for item in vec { item.validate()? } }
28716		Ok(())
28717	}
28718}
28719
28720
28721// CurrentOrDefaultReservation4Choice ...
28722#[cfg_attr(feature = "derive_debug", derive(Debug))]
28723#[cfg_attr(feature = "derive_default", derive(Default))]
28724#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28725#[cfg_attr(feature = "derive_clone", derive(Clone))]
28726#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28727pub struct CurrentOrDefaultReservation4Choice {
28728	#[cfg_attr( feature = "derive_serde", serde(rename = "Cur", skip_serializing_if = "Option::is_none") )]
28729	pub cur: Option<ReservationIdentification4>,
28730	#[cfg_attr( feature = "derive_serde", serde(rename = "Dflt", skip_serializing_if = "Option::is_none") )]
28731	pub dflt: Option<ReservationIdentification4>,
28732}
28733
28734impl CurrentOrDefaultReservation4Choice {
28735	pub fn validate(&self) -> Result<(), ValidationError> {
28736		if let Some(ref val) = self.cur { val.validate()? }
28737		if let Some(ref val) = self.dflt { val.validate()? }
28738		Ok(())
28739	}
28740}
28741
28742
28743// CustomBasket4 ...
28744#[cfg_attr(feature = "derive_debug", derive(Debug))]
28745#[cfg_attr(feature = "derive_default", derive(Default))]
28746#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28747#[cfg_attr(feature = "derive_clone", derive(Clone))]
28748#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28749pub struct CustomBasket4 {
28750	#[cfg_attr( feature = "derive_serde", serde(rename = "Strr", skip_serializing_if = "Option::is_none") )]
28751	pub strr: Option<String>,
28752	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
28753	pub id: Option<String>,
28754	#[cfg_attr( feature = "derive_serde", serde(rename = "Cnsttnts", skip_serializing_if = "Option::is_none") )]
28755	pub cnsttnts: Option<Vec<BasketConstituents3>>,
28756}
28757
28758impl CustomBasket4 {
28759	pub fn validate(&self) -> Result<(), ValidationError> {
28760		if let Some(ref val) = self.strr {
28761			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
28762			if !pattern.is_match(val) {
28763				return Err(ValidationError::new(1005, "strr does not match the required pattern".to_string()));
28764			}
28765		}
28766		if let Some(ref val) = self.id {
28767			if val.chars().count() < 1 {
28768				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
28769			}
28770			if val.chars().count() > 52 {
28771				return Err(ValidationError::new(1002, "id exceeds the maximum length of 52".to_string()));
28772			}
28773		}
28774		if let Some(ref vec) = self.cnsttnts { for item in vec { item.validate()? } }
28775		Ok(())
28776	}
28777}
28778
28779
28780// CustomerAccount4 ...
28781#[cfg_attr(feature = "derive_debug", derive(Debug))]
28782#[cfg_attr(feature = "derive_default", derive(Default))]
28783#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28784#[cfg_attr(feature = "derive_clone", derive(Clone))]
28785#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28786pub struct CustomerAccount4 {
28787	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
28788	pub id: Option<AccountIdentification4Choice>,
28789	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
28790	pub nm: Option<String>,
28791	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
28792	pub sts: Option<AccountStatus3Code>,
28793	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
28794	pub tp: Option<CashAccountType2Choice>,
28795	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
28796	pub ccy: String,
28797	#[cfg_attr( feature = "derive_serde", serde(rename = "MnthlyPmtVal", skip_serializing_if = "Option::is_none") )]
28798	pub mnthly_pmt_val: Option<f64>,
28799	#[cfg_attr( feature = "derive_serde", serde(rename = "MnthlyRcvdVal", skip_serializing_if = "Option::is_none") )]
28800	pub mnthly_rcvd_val: Option<f64>,
28801	#[cfg_attr( feature = "derive_serde", serde(rename = "MnthlyTxNb", skip_serializing_if = "Option::is_none") )]
28802	pub mnthly_tx_nb: Option<String>,
28803	#[cfg_attr( feature = "derive_serde", serde(rename = "AvrgBal", skip_serializing_if = "Option::is_none") )]
28804	pub avrg_bal: Option<f64>,
28805	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctPurp", skip_serializing_if = "Option::is_none") )]
28806	pub acct_purp: Option<String>,
28807	#[cfg_attr( feature = "derive_serde", serde(rename = "FlrNtfctnAmt", skip_serializing_if = "Option::is_none") )]
28808	pub flr_ntfctn_amt: Option<f64>,
28809	#[cfg_attr( feature = "derive_serde", serde(rename = "ClngNtfctnAmt", skip_serializing_if = "Option::is_none") )]
28810	pub clng_ntfctn_amt: Option<f64>,
28811	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtFrqcyAndFrmt", skip_serializing_if = "Option::is_none") )]
28812	pub stmt_frqcy_and_frmt: Option<Vec<StatementFrequencyAndForm1>>,
28813	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
28814	pub clsg_dt: Option<String>,
28815	#[cfg_attr( feature = "derive_serde", serde(rename = "Rstrctn", skip_serializing_if = "Option::is_none") )]
28816	pub rstrctn: Option<Vec<Restriction1>>,
28817}
28818
28819impl CustomerAccount4 {
28820	pub fn validate(&self) -> Result<(), ValidationError> {
28821		if let Some(ref val) = self.id { val.validate()? }
28822		if let Some(ref val) = self.nm {
28823			if val.chars().count() < 1 {
28824				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
28825			}
28826			if val.chars().count() > 70 {
28827				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 70".to_string()));
28828			}
28829		}
28830		if let Some(ref val) = self.sts { val.validate()? }
28831		if let Some(ref val) = self.tp { val.validate()? }
28832		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28833		if !pattern.is_match(&self.ccy) {
28834			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
28835		}
28836		if let Some(ref val) = self.mnthly_pmt_val {
28837			if *val < 0.000000 {
28838				return Err(ValidationError::new(1003, "mnthly_pmt_val is less than the minimum value of 0.000000".to_string()));
28839			}
28840		}
28841		if let Some(ref val) = self.mnthly_rcvd_val {
28842			if *val < 0.000000 {
28843				return Err(ValidationError::new(1003, "mnthly_rcvd_val is less than the minimum value of 0.000000".to_string()));
28844			}
28845		}
28846		if let Some(ref val) = self.mnthly_tx_nb {
28847			let pattern = Regex::new("[0-9]{1,5}").unwrap();
28848			if !pattern.is_match(val) {
28849				return Err(ValidationError::new(1005, "mnthly_tx_nb does not match the required pattern".to_string()));
28850			}
28851		}
28852		if let Some(ref val) = self.avrg_bal {
28853			if *val < 0.000000 {
28854				return Err(ValidationError::new(1003, "avrg_bal is less than the minimum value of 0.000000".to_string()));
28855			}
28856		}
28857		if let Some(ref val) = self.acct_purp {
28858			if val.chars().count() < 1 {
28859				return Err(ValidationError::new(1001, "acct_purp is shorter than the minimum length of 1".to_string()));
28860			}
28861			if val.chars().count() > 140 {
28862				return Err(ValidationError::new(1002, "acct_purp exceeds the maximum length of 140".to_string()));
28863			}
28864		}
28865		if let Some(ref val) = self.flr_ntfctn_amt {
28866			if *val < 0.000000 {
28867				return Err(ValidationError::new(1003, "flr_ntfctn_amt is less than the minimum value of 0.000000".to_string()));
28868			}
28869		}
28870		if let Some(ref val) = self.clng_ntfctn_amt {
28871			if *val < 0.000000 {
28872				return Err(ValidationError::new(1003, "clng_ntfctn_amt is less than the minimum value of 0.000000".to_string()));
28873			}
28874		}
28875		if let Some(ref vec) = self.stmt_frqcy_and_frmt { for item in vec { item.validate()? } }
28876		if let Some(ref vec) = self.rstrctn { for item in vec { item.validate()? } }
28877		Ok(())
28878	}
28879}
28880
28881
28882// CustomerAccount5 ...
28883#[cfg_attr(feature = "derive_debug", derive(Debug))]
28884#[cfg_attr(feature = "derive_default", derive(Default))]
28885#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28886#[cfg_attr(feature = "derive_clone", derive(Clone))]
28887#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28888pub struct CustomerAccount5 {
28889	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
28890	pub id: Vec<AccountIdentification4Choice>,
28891	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
28892	pub nm: Option<String>,
28893	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
28894	pub sts: Option<AccountStatus3Code>,
28895	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
28896	pub tp: Option<CashAccountType2Choice>,
28897	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
28898	pub ccy: String,
28899	#[cfg_attr( feature = "derive_serde", serde(rename = "MnthlyPmtVal", skip_serializing_if = "Option::is_none") )]
28900	pub mnthly_pmt_val: Option<f64>,
28901	#[cfg_attr( feature = "derive_serde", serde(rename = "MnthlyRcvdVal", skip_serializing_if = "Option::is_none") )]
28902	pub mnthly_rcvd_val: Option<f64>,
28903	#[cfg_attr( feature = "derive_serde", serde(rename = "MnthlyTxNb", skip_serializing_if = "Option::is_none") )]
28904	pub mnthly_tx_nb: Option<String>,
28905	#[cfg_attr( feature = "derive_serde", serde(rename = "AvrgBal", skip_serializing_if = "Option::is_none") )]
28906	pub avrg_bal: Option<f64>,
28907	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctPurp", skip_serializing_if = "Option::is_none") )]
28908	pub acct_purp: Option<String>,
28909	#[cfg_attr( feature = "derive_serde", serde(rename = "FlrNtfctnAmt", skip_serializing_if = "Option::is_none") )]
28910	pub flr_ntfctn_amt: Option<f64>,
28911	#[cfg_attr( feature = "derive_serde", serde(rename = "ClngNtfctnAmt", skip_serializing_if = "Option::is_none") )]
28912	pub clng_ntfctn_amt: Option<f64>,
28913	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtFrqcyAndFrmt", skip_serializing_if = "Option::is_none") )]
28914	pub stmt_frqcy_and_frmt: Option<Vec<StatementFrequencyAndForm1>>,
28915	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
28916	pub clsg_dt: Option<String>,
28917	#[cfg_attr( feature = "derive_serde", serde(rename = "Rstrctn", skip_serializing_if = "Option::is_none") )]
28918	pub rstrctn: Option<Vec<Restriction1>>,
28919}
28920
28921impl CustomerAccount5 {
28922	pub fn validate(&self) -> Result<(), ValidationError> {
28923		for item in &self.id { item.validate()? }
28924		if let Some(ref val) = self.nm {
28925			if val.chars().count() < 1 {
28926				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
28927			}
28928			if val.chars().count() > 70 {
28929				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 70".to_string()));
28930			}
28931		}
28932		if let Some(ref val) = self.sts { val.validate()? }
28933		if let Some(ref val) = self.tp { val.validate()? }
28934		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
28935		if !pattern.is_match(&self.ccy) {
28936			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
28937		}
28938		if let Some(ref val) = self.mnthly_pmt_val {
28939			if *val < 0.000000 {
28940				return Err(ValidationError::new(1003, "mnthly_pmt_val is less than the minimum value of 0.000000".to_string()));
28941			}
28942		}
28943		if let Some(ref val) = self.mnthly_rcvd_val {
28944			if *val < 0.000000 {
28945				return Err(ValidationError::new(1003, "mnthly_rcvd_val is less than the minimum value of 0.000000".to_string()));
28946			}
28947		}
28948		if let Some(ref val) = self.mnthly_tx_nb {
28949			let pattern = Regex::new("[0-9]{1,5}").unwrap();
28950			if !pattern.is_match(val) {
28951				return Err(ValidationError::new(1005, "mnthly_tx_nb does not match the required pattern".to_string()));
28952			}
28953		}
28954		if let Some(ref val) = self.avrg_bal {
28955			if *val < 0.000000 {
28956				return Err(ValidationError::new(1003, "avrg_bal is less than the minimum value of 0.000000".to_string()));
28957			}
28958		}
28959		if let Some(ref val) = self.acct_purp {
28960			if val.chars().count() < 1 {
28961				return Err(ValidationError::new(1001, "acct_purp is shorter than the minimum length of 1".to_string()));
28962			}
28963			if val.chars().count() > 140 {
28964				return Err(ValidationError::new(1002, "acct_purp exceeds the maximum length of 140".to_string()));
28965			}
28966		}
28967		if let Some(ref val) = self.flr_ntfctn_amt {
28968			if *val < 0.000000 {
28969				return Err(ValidationError::new(1003, "flr_ntfctn_amt is less than the minimum value of 0.000000".to_string()));
28970			}
28971		}
28972		if let Some(ref val) = self.clng_ntfctn_amt {
28973			if *val < 0.000000 {
28974				return Err(ValidationError::new(1003, "clng_ntfctn_amt is less than the minimum value of 0.000000".to_string()));
28975			}
28976		}
28977		if let Some(ref vec) = self.stmt_frqcy_and_frmt { for item in vec { item.validate()? } }
28978		if let Some(ref vec) = self.rstrctn { for item in vec { item.validate()? } }
28979		Ok(())
28980	}
28981}
28982
28983
28984// CustomerAccountModification1 ...
28985#[cfg_attr(feature = "derive_debug", derive(Debug))]
28986#[cfg_attr(feature = "derive_default", derive(Default))]
28987#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
28988#[cfg_attr(feature = "derive_clone", derive(Clone))]
28989#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
28990pub struct CustomerAccountModification1 {
28991	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
28992	pub id: Vec<AccountIdentification4Choice>,
28993	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
28994	pub nm: Option<NameModification1>,
28995	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
28996	pub sts: Option<AccountStatusModification1>,
28997	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
28998	pub tp: Option<TypeModification1>,
28999	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
29000	pub ccy: String,
29001	#[cfg_attr( feature = "derive_serde", serde(rename = "MnthlyPmtVal", skip_serializing_if = "Option::is_none") )]
29002	pub mnthly_pmt_val: Option<AmountModification1>,
29003	#[cfg_attr( feature = "derive_serde", serde(rename = "MnthlyRcvdVal", skip_serializing_if = "Option::is_none") )]
29004	pub mnthly_rcvd_val: Option<AmountModification1>,
29005	#[cfg_attr( feature = "derive_serde", serde(rename = "MnthlyTxNb", skip_serializing_if = "Option::is_none") )]
29006	pub mnthly_tx_nb: Option<NumberModification1>,
29007	#[cfg_attr( feature = "derive_serde", serde(rename = "AvrgBal", skip_serializing_if = "Option::is_none") )]
29008	pub avrg_bal: Option<AmountModification1>,
29009	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctPurp", skip_serializing_if = "Option::is_none") )]
29010	pub acct_purp: Option<PurposeModification1>,
29011	#[cfg_attr( feature = "derive_serde", serde(rename = "FlrNtfctnAmt", skip_serializing_if = "Option::is_none") )]
29012	pub flr_ntfctn_amt: Option<AmountModification1>,
29013	#[cfg_attr( feature = "derive_serde", serde(rename = "ClngNtfctnAmt", skip_serializing_if = "Option::is_none") )]
29014	pub clng_ntfctn_amt: Option<AmountModification1>,
29015	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtFrqcyAndFrmt", skip_serializing_if = "Option::is_none") )]
29016	pub stmt_frqcy_and_frmt: Option<Vec<StatementFrequencyAndFormModification1>>,
29017	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
29018	pub clsg_dt: Option<DateModification1>,
29019	#[cfg_attr( feature = "derive_serde", serde(rename = "Rstrctn", skip_serializing_if = "Option::is_none") )]
29020	pub rstrctn: Option<Vec<RestrictionModification1>>,
29021}
29022
29023impl CustomerAccountModification1 {
29024	pub fn validate(&self) -> Result<(), ValidationError> {
29025		for item in &self.id { item.validate()? }
29026		if let Some(ref val) = self.nm { val.validate()? }
29027		if let Some(ref val) = self.sts { val.validate()? }
29028		if let Some(ref val) = self.tp { val.validate()? }
29029		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
29030		if !pattern.is_match(&self.ccy) {
29031			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
29032		}
29033		if let Some(ref val) = self.mnthly_pmt_val { val.validate()? }
29034		if let Some(ref val) = self.mnthly_rcvd_val { val.validate()? }
29035		if let Some(ref val) = self.mnthly_tx_nb { val.validate()? }
29036		if let Some(ref val) = self.avrg_bal { val.validate()? }
29037		if let Some(ref val) = self.acct_purp { val.validate()? }
29038		if let Some(ref val) = self.flr_ntfctn_amt { val.validate()? }
29039		if let Some(ref val) = self.clng_ntfctn_amt { val.validate()? }
29040		if let Some(ref vec) = self.stmt_frqcy_and_frmt { for item in vec { item.validate()? } }
29041		if let Some(ref val) = self.clsg_dt { val.validate()? }
29042		if let Some(ref vec) = self.rstrctn { for item in vec { item.validate()? } }
29043		Ok(())
29044	}
29045}
29046
29047
29048// CustomerConductClassification1Choice ...
29049#[cfg_attr(feature = "derive_debug", derive(Debug))]
29050#[cfg_attr(feature = "derive_default", derive(Default))]
29051#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29052#[cfg_attr(feature = "derive_clone", derive(Clone))]
29053#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29054pub struct CustomerConductClassification1Choice {
29055	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
29056	pub cd: Option<ConductClassification1Code>,
29057	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
29058	pub prtry: Option<GenericIdentification47>,
29059}
29060
29061impl CustomerConductClassification1Choice {
29062	pub fn validate(&self) -> Result<(), ValidationError> {
29063		if let Some(ref val) = self.cd { val.validate()? }
29064		if let Some(ref val) = self.prtry { val.validate()? }
29065		Ok(())
29066	}
29067}
29068
29069
29070// CustomerIdentification2 ...
29071#[cfg_attr(feature = "derive_debug", derive(Debug))]
29072#[cfg_attr(feature = "derive_default", derive(Default))]
29073#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29074#[cfg_attr(feature = "derive_clone", derive(Clone))]
29075#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29076pub struct CustomerIdentification2 {
29077	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty") )]
29078	pub pty: PartyIdentification272,
29079	#[cfg_attr( feature = "derive_serde", serde(rename = "AuthrtyReq") )]
29080	pub authrty_req: Vec<AuthorityInvestigation2>,
29081}
29082
29083impl CustomerIdentification2 {
29084	pub fn validate(&self) -> Result<(), ValidationError> {
29085		self.pty.validate()?;
29086		for item in &self.authrty_req { item.validate()? }
29087		Ok(())
29088	}
29089}
29090
29091
29092// CustomerTypeRequest2 ...
29093#[cfg_attr(feature = "derive_debug", derive(Debug))]
29094#[cfg_attr(feature = "derive_default", derive(Default))]
29095#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29096#[cfg_attr(feature = "derive_clone", derive(Clone))]
29097#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29098pub struct CustomerTypeRequest2 {
29099	#[cfg_attr( feature = "derive_serde", serde(rename = "Reqd") )]
29100	pub reqd: bool,
29101	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgTp", skip_serializing_if = "Option::is_none") )]
29102	pub org_tp: Option<OrganisationType2>,
29103	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvtTp", skip_serializing_if = "Option::is_none") )]
29104	pub prvt_tp: Option<PersonType2>,
29105}
29106
29107impl CustomerTypeRequest2 {
29108	pub fn validate(&self) -> Result<(), ValidationError> {
29109		if let Some(ref val) = self.org_tp { val.validate()? }
29110		if let Some(ref val) = self.prvt_tp { val.validate()? }
29111		Ok(())
29112	}
29113}
29114
29115
29116// CutOff1 ...
29117#[cfg_attr(feature = "derive_debug", derive(Debug))]
29118#[cfg_attr(feature = "derive_default", derive(Default))]
29119#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29120#[cfg_attr(feature = "derive_clone", derive(Clone))]
29121#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29122pub struct CutOff1 {
29123	#[cfg_attr( feature = "derive_serde", serde(rename = "CutOffUpdId") )]
29124	pub cut_off_upd_id: String,
29125	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
29126	pub ccy: String,
29127	#[cfg_attr( feature = "derive_serde", serde(rename = "CutOffTm") )]
29128	pub cut_off_tm: String,
29129	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDtOffset") )]
29130	pub val_dt_offset: String,
29131}
29132
29133impl CutOff1 {
29134	pub fn validate(&self) -> Result<(), ValidationError> {
29135		if self.cut_off_upd_id.chars().count() < 1 {
29136			return Err(ValidationError::new(1001, "cut_off_upd_id is shorter than the minimum length of 1".to_string()));
29137		}
29138		if self.cut_off_upd_id.chars().count() > 35 {
29139			return Err(ValidationError::new(1002, "cut_off_upd_id exceeds the maximum length of 35".to_string()));
29140		}
29141		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
29142		if !pattern.is_match(&self.ccy) {
29143			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
29144		}
29145		let pattern = Regex::new("0|-1|-2").unwrap();
29146		if !pattern.is_match(&self.val_dt_offset) {
29147			return Err(ValidationError::new(1005, "val_dt_offset does not match the required pattern".to_string()));
29148		}
29149		Ok(())
29150	}
29151}
29152
29153
29154// CutOffData2 ...
29155#[cfg_attr(feature = "derive_debug", derive(Debug))]
29156#[cfg_attr(feature = "derive_default", derive(Default))]
29157#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29158#[cfg_attr(feature = "derive_clone", derive(Clone))]
29159#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29160pub struct CutOffData2 {
29161	#[cfg_attr( feature = "derive_serde", serde(rename = "PtcptId") )]
29162	pub ptcpt_id: PartyIdentification242Choice,
29163	#[cfg_attr( feature = "derive_serde", serde(rename = "NetgCutOffDtls") )]
29164	pub netg_cut_off_dtls: Vec<NettingCutOff2>,
29165}
29166
29167impl CutOffData2 {
29168	pub fn validate(&self) -> Result<(), ValidationError> {
29169		self.ptcpt_id.validate()?;
29170		for item in &self.netg_cut_off_dtls { item.validate()? }
29171		Ok(())
29172	}
29173}
29174
29175
29176// DataBaseCheck1 ...
29177#[cfg_attr(feature = "derive_debug", derive(Debug))]
29178#[cfg_attr(feature = "derive_default", derive(Default))]
29179#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29180#[cfg_attr(feature = "derive_clone", derive(Clone))]
29181#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29182pub struct DataBaseCheck1 {
29183	#[cfg_attr( feature = "derive_serde", serde(rename = "DBChck") )]
29184	pub db_chck: bool,
29185	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
29186	pub id: String,
29187}
29188
29189impl DataBaseCheck1 {
29190	pub fn validate(&self) -> Result<(), ValidationError> {
29191		if self.id.chars().count() < 1 {
29192			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
29193		}
29194		if self.id.chars().count() > 35 {
29195			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
29196		}
29197		Ok(())
29198	}
29199}
29200
29201
29202// DataFormat2Choice ...
29203#[cfg_attr(feature = "derive_debug", derive(Debug))]
29204#[cfg_attr(feature = "derive_default", derive(Default))]
29205#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29206#[cfg_attr(feature = "derive_clone", derive(Clone))]
29207#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29208pub struct DataFormat2Choice {
29209	#[cfg_attr( feature = "derive_serde", serde(rename = "Strd", skip_serializing_if = "Option::is_none") )]
29210	pub strd: Option<GenericIdentification1>,
29211	#[cfg_attr( feature = "derive_serde", serde(rename = "Ustrd", skip_serializing_if = "Option::is_none") )]
29212	pub ustrd: Option<String>,
29213}
29214
29215impl DataFormat2Choice {
29216	pub fn validate(&self) -> Result<(), ValidationError> {
29217		if let Some(ref val) = self.strd { val.validate()? }
29218		if let Some(ref val) = self.ustrd {
29219			if val.chars().count() < 1 {
29220				return Err(ValidationError::new(1001, "ustrd is shorter than the minimum length of 1".to_string()));
29221			}
29222			if val.chars().count() > 140 {
29223				return Err(ValidationError::new(1002, "ustrd exceeds the maximum length of 140".to_string()));
29224			}
29225		}
29226		Ok(())
29227	}
29228}
29229
29230
29231// DataModification1Code ...
29232#[cfg_attr(feature = "derive_debug", derive(Debug))]
29233#[cfg_attr(feature = "derive_default", derive(Default))]
29234#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29235#[cfg_attr(feature = "derive_clone", derive(Clone))]
29236#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29237pub enum DataModification1Code {
29238	#[cfg_attr(feature = "derive_default", default)]
29239	#[cfg_attr( feature = "derive_serde", serde(rename = "INSE") )]
29240	CodeINSE,
29241	#[cfg_attr( feature = "derive_serde", serde(rename = "UPDT") )]
29242	CodeUPDT,
29243	#[cfg_attr( feature = "derive_serde", serde(rename = "DELT") )]
29244	CodeDELT,
29245}
29246
29247impl DataModification1Code {
29248	pub fn validate(&self) -> Result<(), ValidationError> {
29249		Ok(())
29250	}
29251}
29252
29253
29254// DataModification2Code ...
29255#[cfg_attr(feature = "derive_debug", derive(Debug))]
29256#[cfg_attr(feature = "derive_default", derive(Default))]
29257#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29258#[cfg_attr(feature = "derive_clone", derive(Clone))]
29259#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29260pub enum DataModification2Code {
29261	#[cfg_attr(feature = "derive_default", default)]
29262	#[cfg_attr( feature = "derive_serde", serde(rename = "INSE") )]
29263	CodeINSE,
29264	#[cfg_attr( feature = "derive_serde", serde(rename = "DELT") )]
29265	CodeDELT,
29266}
29267
29268impl DataModification2Code {
29269	pub fn validate(&self) -> Result<(), ValidationError> {
29270		Ok(())
29271	}
29272}
29273
29274
29275// DateAndAmount1 ...
29276#[cfg_attr(feature = "derive_debug", derive(Debug))]
29277#[cfg_attr(feature = "derive_default", derive(Default))]
29278#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29279#[cfg_attr(feature = "derive_clone", derive(Clone))]
29280#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29281pub struct DateAndAmount1 {
29282	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt") )]
29283	pub dt: String,
29284	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
29285	pub amt: ActiveCurrencyAndAmount,
29286}
29287
29288impl DateAndAmount1 {
29289	pub fn validate(&self) -> Result<(), ValidationError> {
29290		self.amt.validate()?;
29291		Ok(())
29292	}
29293}
29294
29295
29296// DateAndDateTime1Choice ...
29297#[cfg_attr(feature = "derive_debug", derive(Debug))]
29298#[cfg_attr(feature = "derive_default", derive(Default))]
29299#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29300#[cfg_attr(feature = "derive_clone", derive(Clone))]
29301#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29302pub struct DateAndDateTime1Choice {
29303	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
29304	pub dt: Option<String>,
29305	#[cfg_attr( feature = "derive_serde", serde(rename = "DtTm", skip_serializing_if = "Option::is_none") )]
29306	pub dt_tm: Option<String>,
29307}
29308
29309impl DateAndDateTime1Choice {
29310	pub fn validate(&self) -> Result<(), ValidationError> {
29311		Ok(())
29312	}
29313}
29314
29315
29316// DateAndDateTime2Choice ...
29317#[cfg_attr(feature = "derive_debug", derive(Debug))]
29318#[cfg_attr(feature = "derive_default", derive(Default))]
29319#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29320#[cfg_attr(feature = "derive_clone", derive(Clone))]
29321#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29322pub struct DateAndDateTime2Choice {
29323	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
29324	pub dt: Option<String>,
29325	#[cfg_attr( feature = "derive_serde", serde(rename = "DtTm", skip_serializing_if = "Option::is_none") )]
29326	pub dt_tm: Option<String>,
29327}
29328
29329impl DateAndDateTime2Choice {
29330	pub fn validate(&self) -> Result<(), ValidationError> {
29331		Ok(())
29332	}
29333}
29334
29335
29336// DateAndDateTimeChoice ...
29337#[cfg_attr(feature = "derive_debug", derive(Debug))]
29338#[cfg_attr(feature = "derive_default", derive(Default))]
29339#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29340#[cfg_attr(feature = "derive_clone", derive(Clone))]
29341#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29342pub struct DateAndDateTimeChoice {
29343	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
29344	pub dt: Option<String>,
29345	#[cfg_attr( feature = "derive_serde", serde(rename = "DtTm", skip_serializing_if = "Option::is_none") )]
29346	pub dt_tm: Option<String>,
29347}
29348
29349impl DateAndDateTimeChoice {
29350	pub fn validate(&self) -> Result<(), ValidationError> {
29351		Ok(())
29352	}
29353}
29354
29355
29356// DateAndDateTimeSearch3Choice ...
29357#[cfg_attr(feature = "derive_debug", derive(Debug))]
29358#[cfg_attr(feature = "derive_default", derive(Default))]
29359#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29360#[cfg_attr(feature = "derive_clone", derive(Clone))]
29361#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29362pub struct DateAndDateTimeSearch3Choice {
29363	#[cfg_attr( feature = "derive_serde", serde(rename = "DtTmSch", skip_serializing_if = "Option::is_none") )]
29364	pub dt_tm_sch: Option<DateTimePeriod1Choice>,
29365	#[cfg_attr( feature = "derive_serde", serde(rename = "DtSch", skip_serializing_if = "Option::is_none") )]
29366	pub dt_sch: Option<DatePeriodSearch1Choice>,
29367}
29368
29369impl DateAndDateTimeSearch3Choice {
29370	pub fn validate(&self) -> Result<(), ValidationError> {
29371		if let Some(ref val) = self.dt_tm_sch { val.validate()? }
29372		if let Some(ref val) = self.dt_sch { val.validate()? }
29373		Ok(())
29374	}
29375}
29376
29377
29378// DateAndDateTimeSearch4Choice ...
29379#[cfg_attr(feature = "derive_debug", derive(Debug))]
29380#[cfg_attr(feature = "derive_default", derive(Default))]
29381#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29382#[cfg_attr(feature = "derive_clone", derive(Clone))]
29383#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29384pub struct DateAndDateTimeSearch4Choice {
29385	#[cfg_attr( feature = "derive_serde", serde(rename = "DtTm", skip_serializing_if = "Option::is_none") )]
29386	pub dt_tm: Option<DateTimeSearch2Choice>,
29387	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
29388	pub dt: Option<DatePeriodSearch1Choice>,
29389}
29390
29391impl DateAndDateTimeSearch4Choice {
29392	pub fn validate(&self) -> Result<(), ValidationError> {
29393		if let Some(ref val) = self.dt_tm { val.validate()? }
29394		if let Some(ref val) = self.dt { val.validate()? }
29395		Ok(())
29396	}
29397}
29398
29399
29400// DateAndDateTimeSearch5Choice ...
29401#[cfg_attr(feature = "derive_debug", derive(Debug))]
29402#[cfg_attr(feature = "derive_default", derive(Default))]
29403#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29404#[cfg_attr(feature = "derive_clone", derive(Clone))]
29405#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29406pub struct DateAndDateTimeSearch5Choice {
29407	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
29408	pub dt: Option<DatePeriodSearch1Choice>,
29409	#[cfg_attr( feature = "derive_serde", serde(rename = "DtTm", skip_serializing_if = "Option::is_none") )]
29410	pub dt_tm: Option<DateTimeSearch2Choice>,
29411}
29412
29413impl DateAndDateTimeSearch5Choice {
29414	pub fn validate(&self) -> Result<(), ValidationError> {
29415		if let Some(ref val) = self.dt { val.validate()? }
29416		if let Some(ref val) = self.dt_tm { val.validate()? }
29417		Ok(())
29418	}
29419}
29420
29421
29422// DateAndPeriod2Choice ...
29423#[cfg_attr(feature = "derive_debug", derive(Debug))]
29424#[cfg_attr(feature = "derive_default", derive(Default))]
29425#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29426#[cfg_attr(feature = "derive_clone", derive(Clone))]
29427#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29428pub struct DateAndPeriod2Choice {
29429	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
29430	pub dt: Option<String>,
29431	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd", skip_serializing_if = "Option::is_none") )]
29432	pub prd: Option<Period2>,
29433	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDt", skip_serializing_if = "Option::is_none") )]
29434	pub fr_dt: Option<String>,
29435	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDt", skip_serializing_if = "Option::is_none") )]
29436	pub to_dt: Option<String>,
29437}
29438
29439impl DateAndPeriod2Choice {
29440	pub fn validate(&self) -> Result<(), ValidationError> {
29441		if let Some(ref val) = self.prd { val.validate()? }
29442		Ok(())
29443	}
29444}
29445
29446
29447// DateAndPlaceOfBirth ...
29448#[cfg_attr(feature = "derive_debug", derive(Debug))]
29449#[cfg_attr(feature = "derive_default", derive(Default))]
29450#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29451#[cfg_attr(feature = "derive_clone", derive(Clone))]
29452#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29453pub struct DateAndPlaceOfBirth {
29454	#[cfg_attr( feature = "derive_serde", serde(rename = "BirthDt") )]
29455	pub birth_dt: String,
29456	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvcOfBirth", skip_serializing_if = "Option::is_none") )]
29457	pub prvc_of_birth: Option<String>,
29458	#[cfg_attr( feature = "derive_serde", serde(rename = "CityOfBirth") )]
29459	pub city_of_birth: String,
29460	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfBirth") )]
29461	pub ctry_of_birth: String,
29462}
29463
29464impl DateAndPlaceOfBirth {
29465	pub fn validate(&self) -> Result<(), ValidationError> {
29466		if let Some(ref val) = self.prvc_of_birth {
29467			if val.chars().count() < 1 {
29468				return Err(ValidationError::new(1001, "prvc_of_birth is shorter than the minimum length of 1".to_string()));
29469			}
29470			if val.chars().count() > 35 {
29471				return Err(ValidationError::new(1002, "prvc_of_birth exceeds the maximum length of 35".to_string()));
29472			}
29473		}
29474		if self.city_of_birth.chars().count() < 1 {
29475			return Err(ValidationError::new(1001, "city_of_birth is shorter than the minimum length of 1".to_string()));
29476		}
29477		if self.city_of_birth.chars().count() > 35 {
29478			return Err(ValidationError::new(1002, "city_of_birth exceeds the maximum length of 35".to_string()));
29479		}
29480		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
29481		if !pattern.is_match(&self.ctry_of_birth) {
29482			return Err(ValidationError::new(1005, "ctry_of_birth does not match the required pattern".to_string()));
29483		}
29484		Ok(())
29485	}
29486}
29487
29488
29489// DateAndPlaceOfBirth1 ...
29490#[cfg_attr(feature = "derive_debug", derive(Debug))]
29491#[cfg_attr(feature = "derive_default", derive(Default))]
29492#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29493#[cfg_attr(feature = "derive_clone", derive(Clone))]
29494#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29495pub struct DateAndPlaceOfBirth1 {
29496	#[cfg_attr( feature = "derive_serde", serde(rename = "BirthDt") )]
29497	pub birth_dt: String,
29498	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvcOfBirth", skip_serializing_if = "Option::is_none") )]
29499	pub prvc_of_birth: Option<String>,
29500	#[cfg_attr( feature = "derive_serde", serde(rename = "CityOfBirth") )]
29501	pub city_of_birth: String,
29502	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfBirth") )]
29503	pub ctry_of_birth: String,
29504}
29505
29506impl DateAndPlaceOfBirth1 {
29507	pub fn validate(&self) -> Result<(), ValidationError> {
29508		if let Some(ref val) = self.prvc_of_birth {
29509			if val.chars().count() < 1 {
29510				return Err(ValidationError::new(1001, "prvc_of_birth is shorter than the minimum length of 1".to_string()));
29511			}
29512			if val.chars().count() > 35 {
29513				return Err(ValidationError::new(1002, "prvc_of_birth exceeds the maximum length of 35".to_string()));
29514			}
29515		}
29516		if self.city_of_birth.chars().count() < 1 {
29517			return Err(ValidationError::new(1001, "city_of_birth is shorter than the minimum length of 1".to_string()));
29518		}
29519		if self.city_of_birth.chars().count() > 35 {
29520			return Err(ValidationError::new(1002, "city_of_birth exceeds the maximum length of 35".to_string()));
29521		}
29522		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
29523		if !pattern.is_match(&self.ctry_of_birth) {
29524			return Err(ValidationError::new(1005, "ctry_of_birth does not match the required pattern".to_string()));
29525		}
29526		Ok(())
29527	}
29528}
29529
29530
29531// DateAndType1 ...
29532#[cfg_attr(feature = "derive_debug", derive(Debug))]
29533#[cfg_attr(feature = "derive_default", derive(Default))]
29534#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29535#[cfg_attr(feature = "derive_clone", derive(Clone))]
29536#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29537pub struct DateAndType1 {
29538	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
29539	pub tp: DateType2Choice,
29540	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt") )]
29541	pub dt: String,
29542}
29543
29544impl DateAndType1 {
29545	pub fn validate(&self) -> Result<(), ValidationError> {
29546		self.tp.validate()?;
29547		Ok(())
29548	}
29549}
29550
29551
29552// DateModification1 ...
29553#[cfg_attr(feature = "derive_debug", derive(Debug))]
29554#[cfg_attr(feature = "derive_default", derive(Default))]
29555#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29556#[cfg_attr(feature = "derive_clone", derive(Clone))]
29557#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29558pub struct DateModification1 {
29559	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
29560	pub mod_cd: Option<Modification1Code>,
29561	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt") )]
29562	pub dt: String,
29563}
29564
29565impl DateModification1 {
29566	pub fn validate(&self) -> Result<(), ValidationError> {
29567		if let Some(ref val) = self.mod_cd { val.validate()? }
29568		Ok(())
29569	}
29570}
29571
29572
29573// DateOrBlankQuery2Choice ...
29574#[cfg_attr(feature = "derive_debug", derive(Debug))]
29575#[cfg_attr(feature = "derive_default", derive(Default))]
29576#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29577#[cfg_attr(feature = "derive_clone", derive(Clone))]
29578#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29579pub struct DateOrBlankQuery2Choice {
29580	#[cfg_attr( feature = "derive_serde", serde(rename = "Rg", skip_serializing_if = "Option::is_none") )]
29581	pub rg: Option<DatePeriod1>,
29582	#[cfg_attr( feature = "derive_serde", serde(rename = "NotRptd", skip_serializing_if = "Option::is_none") )]
29583	pub not_rptd: Option<NotReported1Code>,
29584}
29585
29586impl DateOrBlankQuery2Choice {
29587	pub fn validate(&self) -> Result<(), ValidationError> {
29588		if let Some(ref val) = self.rg { val.validate()? }
29589		if let Some(ref val) = self.not_rptd { val.validate()? }
29590		Ok(())
29591	}
29592}
29593
29594
29595// DateOrDateTimePeriod1Choice ...
29596#[cfg_attr(feature = "derive_debug", derive(Debug))]
29597#[cfg_attr(feature = "derive_default", derive(Default))]
29598#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29599#[cfg_attr(feature = "derive_clone", derive(Clone))]
29600#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29601pub struct DateOrDateTimePeriod1Choice {
29602	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
29603	pub dt: Option<DatePeriod2>,
29604	#[cfg_attr( feature = "derive_serde", serde(rename = "DtTm", skip_serializing_if = "Option::is_none") )]
29605	pub dt_tm: Option<DateTimePeriod1>,
29606}
29607
29608impl DateOrDateTimePeriod1Choice {
29609	pub fn validate(&self) -> Result<(), ValidationError> {
29610		if let Some(ref val) = self.dt { val.validate()? }
29611		if let Some(ref val) = self.dt_tm { val.validate()? }
29612		Ok(())
29613	}
29614}
29615
29616
29617// DateOrDateTimePeriodChoice ...
29618#[cfg_attr(feature = "derive_debug", derive(Debug))]
29619#[cfg_attr(feature = "derive_default", derive(Default))]
29620#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29621#[cfg_attr(feature = "derive_clone", derive(Clone))]
29622#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29623pub struct DateOrDateTimePeriodChoice {
29624	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
29625	pub dt: Option<DatePeriodDetails>,
29626	#[cfg_attr( feature = "derive_serde", serde(rename = "DtTm", skip_serializing_if = "Option::is_none") )]
29627	pub dt_tm: Option<DateTimePeriodDetails>,
29628}
29629
29630impl DateOrDateTimePeriodChoice {
29631	pub fn validate(&self) -> Result<(), ValidationError> {
29632		if let Some(ref val) = self.dt { val.validate()? }
29633		if let Some(ref val) = self.dt_tm { val.validate()? }
29634		Ok(())
29635	}
29636}
29637
29638
29639// DatePeriod1 ...
29640#[cfg_attr(feature = "derive_debug", derive(Debug))]
29641#[cfg_attr(feature = "derive_default", derive(Default))]
29642#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29643#[cfg_attr(feature = "derive_clone", derive(Clone))]
29644#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29645pub struct DatePeriod1 {
29646	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDt", skip_serializing_if = "Option::is_none") )]
29647	pub fr_dt: Option<String>,
29648	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDt") )]
29649	pub to_dt: String,
29650}
29651
29652impl DatePeriod1 {
29653	pub fn validate(&self) -> Result<(), ValidationError> {
29654		Ok(())
29655	}
29656}
29657
29658
29659// DatePeriod2 ...
29660#[cfg_attr(feature = "derive_debug", derive(Debug))]
29661#[cfg_attr(feature = "derive_default", derive(Default))]
29662#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29663#[cfg_attr(feature = "derive_clone", derive(Clone))]
29664#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29665pub struct DatePeriod2 {
29666	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDt") )]
29667	pub fr_dt: String,
29668	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDt") )]
29669	pub to_dt: String,
29670}
29671
29672impl DatePeriod2 {
29673	pub fn validate(&self) -> Result<(), ValidationError> {
29674		Ok(())
29675	}
29676}
29677
29678
29679// DatePeriod2Choice ...
29680#[cfg_attr(feature = "derive_debug", derive(Debug))]
29681#[cfg_attr(feature = "derive_default", derive(Default))]
29682#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29683#[cfg_attr(feature = "derive_clone", derive(Clone))]
29684#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29685pub struct DatePeriod2Choice {
29686	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDt", skip_serializing_if = "Option::is_none") )]
29687	pub fr_dt: Option<String>,
29688	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDt", skip_serializing_if = "Option::is_none") )]
29689	pub to_dt: Option<String>,
29690	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDt", skip_serializing_if = "Option::is_none") )]
29691	pub fr_to_dt: Option<DatePeriod2>,
29692}
29693
29694impl DatePeriod2Choice {
29695	pub fn validate(&self) -> Result<(), ValidationError> {
29696		if let Some(ref val) = self.fr_to_dt { val.validate()? }
29697		Ok(())
29698	}
29699}
29700
29701
29702// DatePeriod3 ...
29703#[cfg_attr(feature = "derive_debug", derive(Debug))]
29704#[cfg_attr(feature = "derive_default", derive(Default))]
29705#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29706#[cfg_attr(feature = "derive_clone", derive(Clone))]
29707#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29708pub struct DatePeriod3 {
29709	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDt") )]
29710	pub fr_dt: String,
29711	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDt", skip_serializing_if = "Option::is_none") )]
29712	pub to_dt: Option<String>,
29713}
29714
29715impl DatePeriod3 {
29716	pub fn validate(&self) -> Result<(), ValidationError> {
29717		Ok(())
29718	}
29719}
29720
29721
29722// DatePeriod3Choice ...
29723#[cfg_attr(feature = "derive_debug", derive(Debug))]
29724#[cfg_attr(feature = "derive_default", derive(Default))]
29725#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29726#[cfg_attr(feature = "derive_clone", derive(Clone))]
29727#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29728pub struct DatePeriod3Choice {
29729	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDt", skip_serializing_if = "Option::is_none") )]
29730	pub fr_dt: Option<String>,
29731	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDt", skip_serializing_if = "Option::is_none") )]
29732	pub to_dt: Option<String>,
29733	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDt", skip_serializing_if = "Option::is_none") )]
29734	pub fr_to_dt: Option<DatePeriod2>,
29735	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
29736	pub dt: Option<String>,
29737}
29738
29739impl DatePeriod3Choice {
29740	pub fn validate(&self) -> Result<(), ValidationError> {
29741		if let Some(ref val) = self.fr_to_dt { val.validate()? }
29742		Ok(())
29743	}
29744}
29745
29746
29747// DatePeriod4 ...
29748#[cfg_attr(feature = "derive_debug", derive(Debug))]
29749#[cfg_attr(feature = "derive_default", derive(Default))]
29750#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29751#[cfg_attr(feature = "derive_clone", derive(Clone))]
29752#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29753pub struct DatePeriod4 {
29754	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDt", skip_serializing_if = "Option::is_none") )]
29755	pub fr_dt: Option<String>,
29756	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDt", skip_serializing_if = "Option::is_none") )]
29757	pub to_dt: Option<String>,
29758}
29759
29760impl DatePeriod4 {
29761	pub fn validate(&self) -> Result<(), ValidationError> {
29762		Ok(())
29763	}
29764}
29765
29766
29767// DatePeriod5 ...
29768#[cfg_attr(feature = "derive_debug", derive(Debug))]
29769#[cfg_attr(feature = "derive_default", derive(Default))]
29770#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29771#[cfg_attr(feature = "derive_clone", derive(Clone))]
29772#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29773pub struct DatePeriod5 {
29774	#[cfg_attr( feature = "derive_serde", serde(rename = "CurValDt") )]
29775	pub cur_val_dt: String,
29776	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdValDt") )]
29777	pub reqd_val_dt: String,
29778}
29779
29780impl DatePeriod5 {
29781	pub fn validate(&self) -> Result<(), ValidationError> {
29782		Ok(())
29783	}
29784}
29785
29786
29787// DatePeriodDetails ...
29788#[cfg_attr(feature = "derive_debug", derive(Debug))]
29789#[cfg_attr(feature = "derive_default", derive(Default))]
29790#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29791#[cfg_attr(feature = "derive_clone", derive(Clone))]
29792#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29793pub struct DatePeriodDetails {
29794	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDt") )]
29795	pub fr_dt: String,
29796	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDt") )]
29797	pub to_dt: String,
29798}
29799
29800impl DatePeriodDetails {
29801	pub fn validate(&self) -> Result<(), ValidationError> {
29802		Ok(())
29803	}
29804}
29805
29806
29807// DatePeriodSearch1Choice ...
29808#[cfg_attr(feature = "derive_debug", derive(Debug))]
29809#[cfg_attr(feature = "derive_default", derive(Default))]
29810#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29811#[cfg_attr(feature = "derive_clone", derive(Clone))]
29812#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29813pub struct DatePeriodSearch1Choice {
29814	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDt", skip_serializing_if = "Option::is_none") )]
29815	pub fr_dt: Option<String>,
29816	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDt", skip_serializing_if = "Option::is_none") )]
29817	pub to_dt: Option<String>,
29818	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDt", skip_serializing_if = "Option::is_none") )]
29819	pub fr_to_dt: Option<DatePeriod2>,
29820	#[cfg_attr( feature = "derive_serde", serde(rename = "EQDt", skip_serializing_if = "Option::is_none") )]
29821	pub eq_dt: Option<String>,
29822	#[cfg_attr( feature = "derive_serde", serde(rename = "NEQDt", skip_serializing_if = "Option::is_none") )]
29823	pub neq_dt: Option<String>,
29824}
29825
29826impl DatePeriodSearch1Choice {
29827	pub fn validate(&self) -> Result<(), ValidationError> {
29828		if let Some(ref val) = self.fr_to_dt { val.validate()? }
29829		Ok(())
29830	}
29831}
29832
29833
29834// DateTimeOrBlankQuery1Choice ...
29835#[cfg_attr(feature = "derive_debug", derive(Debug))]
29836#[cfg_attr(feature = "derive_default", derive(Default))]
29837#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29838#[cfg_attr(feature = "derive_clone", derive(Clone))]
29839#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29840pub struct DateTimeOrBlankQuery1Choice {
29841	#[cfg_attr( feature = "derive_serde", serde(rename = "Rg", skip_serializing_if = "Option::is_none") )]
29842	pub rg: Option<DateTimePeriod1>,
29843	#[cfg_attr( feature = "derive_serde", serde(rename = "NotRptd", skip_serializing_if = "Option::is_none") )]
29844	pub not_rptd: Option<NotReported1Code>,
29845}
29846
29847impl DateTimeOrBlankQuery1Choice {
29848	pub fn validate(&self) -> Result<(), ValidationError> {
29849		if let Some(ref val) = self.rg { val.validate()? }
29850		if let Some(ref val) = self.not_rptd { val.validate()? }
29851		Ok(())
29852	}
29853}
29854
29855
29856// DateTimePeriod1 ...
29857#[cfg_attr(feature = "derive_debug", derive(Debug))]
29858#[cfg_attr(feature = "derive_default", derive(Default))]
29859#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29860#[cfg_attr(feature = "derive_clone", derive(Clone))]
29861#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29862pub struct DateTimePeriod1 {
29863	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDtTm") )]
29864	pub fr_dt_tm: String,
29865	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDtTm") )]
29866	pub to_dt_tm: String,
29867}
29868
29869impl DateTimePeriod1 {
29870	pub fn validate(&self) -> Result<(), ValidationError> {
29871		Ok(())
29872	}
29873}
29874
29875
29876// DateTimePeriod1Choice ...
29877#[cfg_attr(feature = "derive_debug", derive(Debug))]
29878#[cfg_attr(feature = "derive_default", derive(Default))]
29879#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29880#[cfg_attr(feature = "derive_clone", derive(Clone))]
29881#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29882pub struct DateTimePeriod1Choice {
29883	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDtTm", skip_serializing_if = "Option::is_none") )]
29884	pub fr_dt_tm: Option<String>,
29885	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDtTm", skip_serializing_if = "Option::is_none") )]
29886	pub to_dt_tm: Option<String>,
29887	#[cfg_attr( feature = "derive_serde", serde(rename = "DtTmRg", skip_serializing_if = "Option::is_none") )]
29888	pub dt_tm_rg: Option<DateTimePeriod1>,
29889}
29890
29891impl DateTimePeriod1Choice {
29892	pub fn validate(&self) -> Result<(), ValidationError> {
29893		if let Some(ref val) = self.dt_tm_rg { val.validate()? }
29894		Ok(())
29895	}
29896}
29897
29898
29899// DateTimePeriod2 ...
29900#[cfg_attr(feature = "derive_debug", derive(Debug))]
29901#[cfg_attr(feature = "derive_default", derive(Default))]
29902#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29903#[cfg_attr(feature = "derive_clone", derive(Clone))]
29904#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29905pub struct DateTimePeriod2 {
29906	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDtTm") )]
29907	pub fr_dt_tm: String,
29908	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDtTm", skip_serializing_if = "Option::is_none") )]
29909	pub to_dt_tm: Option<String>,
29910}
29911
29912impl DateTimePeriod2 {
29913	pub fn validate(&self) -> Result<(), ValidationError> {
29914		Ok(())
29915	}
29916}
29917
29918
29919// DateTimePeriodDetails ...
29920#[cfg_attr(feature = "derive_debug", derive(Debug))]
29921#[cfg_attr(feature = "derive_default", derive(Default))]
29922#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29923#[cfg_attr(feature = "derive_clone", derive(Clone))]
29924#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29925pub struct DateTimePeriodDetails {
29926	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDtTm") )]
29927	pub fr_dt_tm: String,
29928	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDtTm") )]
29929	pub to_dt_tm: String,
29930}
29931
29932impl DateTimePeriodDetails {
29933	pub fn validate(&self) -> Result<(), ValidationError> {
29934		Ok(())
29935	}
29936}
29937
29938
29939// DateTimeSearch2Choice ...
29940#[cfg_attr(feature = "derive_debug", derive(Debug))]
29941#[cfg_attr(feature = "derive_default", derive(Default))]
29942#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29943#[cfg_attr(feature = "derive_clone", derive(Clone))]
29944#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29945pub struct DateTimeSearch2Choice {
29946	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDtTm", skip_serializing_if = "Option::is_none") )]
29947	pub fr_dt_tm: Option<String>,
29948	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDtTm", skip_serializing_if = "Option::is_none") )]
29949	pub to_dt_tm: Option<String>,
29950	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDtTm", skip_serializing_if = "Option::is_none") )]
29951	pub fr_to_dt_tm: Option<DateTimePeriod1>,
29952	#[cfg_attr( feature = "derive_serde", serde(rename = "EQDtTm", skip_serializing_if = "Option::is_none") )]
29953	pub eq_dt_tm: Option<String>,
29954	#[cfg_attr( feature = "derive_serde", serde(rename = "NEQDtTm", skip_serializing_if = "Option::is_none") )]
29955	pub neq_dt_tm: Option<String>,
29956}
29957
29958impl DateTimeSearch2Choice {
29959	pub fn validate(&self) -> Result<(), ValidationError> {
29960		if let Some(ref val) = self.fr_to_dt_tm { val.validate()? }
29961		Ok(())
29962	}
29963}
29964
29965
29966// DateType2Choice ...
29967#[cfg_attr(feature = "derive_debug", derive(Debug))]
29968#[cfg_attr(feature = "derive_default", derive(Default))]
29969#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
29970#[cfg_attr(feature = "derive_clone", derive(Clone))]
29971#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
29972pub struct DateType2Choice {
29973	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
29974	pub cd: Option<String>,
29975	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
29976	pub prtry: Option<String>,
29977}
29978
29979impl DateType2Choice {
29980	pub fn validate(&self) -> Result<(), ValidationError> {
29981		if let Some(ref val) = self.cd {
29982			if val.chars().count() < 1 {
29983				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
29984			}
29985			if val.chars().count() > 4 {
29986				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
29987			}
29988		}
29989		if let Some(ref val) = self.prtry {
29990			if val.chars().count() < 1 {
29991				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
29992			}
29993			if val.chars().count() > 35 {
29994				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
29995			}
29996		}
29997		Ok(())
29998	}
29999}
30000
30001
30002// DeMinimus1Choice ...
30003#[cfg_attr(feature = "derive_debug", derive(Debug))]
30004#[cfg_attr(feature = "derive_default", derive(Default))]
30005#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30006#[cfg_attr(feature = "derive_clone", derive(Clone))]
30007#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30008pub struct DeMinimus1Choice {
30009	#[cfg_attr( feature = "derive_serde", serde(rename = "DeMnmsAplbl", skip_serializing_if = "Option::is_none") )]
30010	pub de_mnms_aplbl: Option<DeMinimusApplicable1>,
30011	#[cfg_attr( feature = "derive_serde", serde(rename = "DeMnmsNotAplbl", skip_serializing_if = "Option::is_none") )]
30012	pub de_mnms_not_aplbl: Option<DeMinimusNotApplicable1>,
30013}
30014
30015impl DeMinimus1Choice {
30016	pub fn validate(&self) -> Result<(), ValidationError> {
30017		if let Some(ref val) = self.de_mnms_aplbl { val.validate()? }
30018		if let Some(ref val) = self.de_mnms_not_aplbl { val.validate()? }
30019		Ok(())
30020	}
30021}
30022
30023
30024// DeMinimusApplicable1 ...
30025#[cfg_attr(feature = "derive_debug", derive(Debug))]
30026#[cfg_attr(feature = "derive_default", derive(Default))]
30027#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30028#[cfg_attr(feature = "derive_clone", derive(Clone))]
30029#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30030pub struct DeMinimusApplicable1 {
30031	#[cfg_attr( feature = "derive_serde", serde(rename = "NewIssePrmssn") )]
30032	pub new_isse_prmssn: bool,
30033	#[cfg_attr( feature = "derive_serde", serde(rename = "Pctg", skip_serializing_if = "Option::is_none") )]
30034	pub pctg: Option<f64>,
30035}
30036
30037impl DeMinimusApplicable1 {
30038	pub fn validate(&self) -> Result<(), ValidationError> {
30039		Ok(())
30040	}
30041}
30042
30043
30044// DeMinimusNotApplicable1 ...
30045#[cfg_attr(feature = "derive_debug", derive(Debug))]
30046#[cfg_attr(feature = "derive_default", derive(Default))]
30047#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30048#[cfg_attr(feature = "derive_clone", derive(Clone))]
30049#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30050pub struct DeMinimusNotApplicable1 {
30051	#[cfg_attr( feature = "derive_serde", serde(rename = "RstrctdPrsnRsn") )]
30052	pub rstrctd_prsn_rsn: String,
30053}
30054
30055impl DeMinimusNotApplicable1 {
30056	pub fn validate(&self) -> Result<(), ValidationError> {
30057		if self.rstrctd_prsn_rsn.chars().count() < 1 {
30058			return Err(ValidationError::new(1001, "rstrctd_prsn_rsn is shorter than the minimum length of 1".to_string()));
30059		}
30060		if self.rstrctd_prsn_rsn.chars().count() > 350 {
30061			return Err(ValidationError::new(1002, "rstrctd_prsn_rsn exceeds the maximum length of 350".to_string()));
30062		}
30063		Ok(())
30064	}
30065}
30066
30067
30068// DebitAuthorisation2 ...
30069#[cfg_attr(feature = "derive_debug", derive(Debug))]
30070#[cfg_attr(feature = "derive_default", derive(Default))]
30071#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30072#[cfg_attr(feature = "derive_clone", derive(Clone))]
30073#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30074pub struct DebitAuthorisation2 {
30075	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlRsn") )]
30076	pub cxl_rsn: CancellationReason33Choice,
30077	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtToDbt", skip_serializing_if = "Option::is_none") )]
30078	pub amt_to_dbt: Option<ActiveOrHistoricCurrencyAndAmount>,
30079	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDtToDbt", skip_serializing_if = "Option::is_none") )]
30080	pub val_dt_to_dbt: Option<String>,
30081	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlCxlRsnInf", skip_serializing_if = "Option::is_none") )]
30082	pub addtl_cxl_rsn_inf: Option<Vec<String>>,
30083}
30084
30085impl DebitAuthorisation2 {
30086	pub fn validate(&self) -> Result<(), ValidationError> {
30087		self.cxl_rsn.validate()?;
30088		if let Some(ref val) = self.amt_to_dbt { val.validate()? }
30089		if let Some(ref vec) = self.addtl_cxl_rsn_inf {
30090			for item in vec {
30091				if item.chars().count() < 1 {
30092					return Err(ValidationError::new(1001, "addtl_cxl_rsn_inf is shorter than the minimum length of 1".to_string()));
30093				}
30094				if item.chars().count() > 105 {
30095					return Err(ValidationError::new(1002, "addtl_cxl_rsn_inf exceeds the maximum length of 105".to_string()));
30096				}
30097			}
30098		}
30099		Ok(())
30100	}
30101}
30102
30103
30104// DebitAuthorisation3 ...
30105#[cfg_attr(feature = "derive_debug", derive(Debug))]
30106#[cfg_attr(feature = "derive_default", derive(Default))]
30107#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30108#[cfg_attr(feature = "derive_clone", derive(Clone))]
30109#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30110pub struct DebitAuthorisation3 {
30111	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlRsn") )]
30112	pub cxl_rsn: CancellationReason33Choice,
30113	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtToDbt", skip_serializing_if = "Option::is_none") )]
30114	pub amt_to_dbt: Option<ActiveOrHistoricCurrencyAndAmount>,
30115	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
30116	pub acct: Option<CashAccount40>,
30117	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDtToDbt", skip_serializing_if = "Option::is_none") )]
30118	pub val_dt_to_dbt: Option<String>,
30119	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlCxlRsnInf", skip_serializing_if = "Option::is_none") )]
30120	pub addtl_cxl_rsn_inf: Option<Vec<String>>,
30121}
30122
30123impl DebitAuthorisation3 {
30124	pub fn validate(&self) -> Result<(), ValidationError> {
30125		self.cxl_rsn.validate()?;
30126		if let Some(ref val) = self.amt_to_dbt { val.validate()? }
30127		if let Some(ref val) = self.acct { val.validate()? }
30128		if let Some(ref vec) = self.addtl_cxl_rsn_inf {
30129			for item in vec {
30130				if item.chars().count() < 1 {
30131					return Err(ValidationError::new(1001, "addtl_cxl_rsn_inf is shorter than the minimum length of 1".to_string()));
30132				}
30133				if item.chars().count() > 140 {
30134					return Err(ValidationError::new(1002, "addtl_cxl_rsn_inf exceeds the maximum length of 140".to_string()));
30135				}
30136			}
30137		}
30138		Ok(())
30139	}
30140}
30141
30142
30143// DebitAuthorisationConfirmation2 ...
30144#[cfg_attr(feature = "derive_debug", derive(Debug))]
30145#[cfg_attr(feature = "derive_default", derive(Default))]
30146#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30147#[cfg_attr(feature = "derive_clone", derive(Clone))]
30148#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30149pub struct DebitAuthorisationConfirmation2 {
30150	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtAuthstn") )]
30151	pub dbt_authstn: bool,
30152	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtToDbt", skip_serializing_if = "Option::is_none") )]
30153	pub amt_to_dbt: Option<ActiveCurrencyAndAmount>,
30154	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDtToDbt", skip_serializing_if = "Option::is_none") )]
30155	pub val_dt_to_dbt: Option<String>,
30156	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
30157	pub rsn: Option<String>,
30158}
30159
30160impl DebitAuthorisationConfirmation2 {
30161	pub fn validate(&self) -> Result<(), ValidationError> {
30162		if let Some(ref val) = self.amt_to_dbt { val.validate()? }
30163		if let Some(ref val) = self.rsn {
30164			if val.chars().count() < 1 {
30165				return Err(ValidationError::new(1001, "rsn is shorter than the minimum length of 1".to_string()));
30166			}
30167			if val.chars().count() > 140 {
30168				return Err(ValidationError::new(1002, "rsn exceeds the maximum length of 140".to_string()));
30169			}
30170		}
30171		Ok(())
30172	}
30173}
30174
30175
30176// DebitAuthorisationConfirmation3 ...
30177#[cfg_attr(feature = "derive_debug", derive(Debug))]
30178#[cfg_attr(feature = "derive_default", derive(Default))]
30179#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30180#[cfg_attr(feature = "derive_clone", derive(Clone))]
30181#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30182pub struct DebitAuthorisationConfirmation3 {
30183	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtAuthstn") )]
30184	pub dbt_authstn: bool,
30185	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtToDbt", skip_serializing_if = "Option::is_none") )]
30186	pub amt_to_dbt: Option<ActiveCurrencyAndAmount>,
30187	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
30188	pub acct: Option<CashAccount40>,
30189	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDtToDbt", skip_serializing_if = "Option::is_none") )]
30190	pub val_dt_to_dbt: Option<String>,
30191	#[cfg_attr( feature = "derive_serde", serde(rename = "CmonTxId", skip_serializing_if = "Option::is_none") )]
30192	pub cmon_tx_id: Option<String>,
30193	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
30194	pub rsn: Option<String>,
30195}
30196
30197impl DebitAuthorisationConfirmation3 {
30198	pub fn validate(&self) -> Result<(), ValidationError> {
30199		if let Some(ref val) = self.amt_to_dbt { val.validate()? }
30200		if let Some(ref val) = self.acct { val.validate()? }
30201		if let Some(ref val) = self.cmon_tx_id {
30202			if val.chars().count() < 1 {
30203				return Err(ValidationError::new(1001, "cmon_tx_id is shorter than the minimum length of 1".to_string()));
30204			}
30205			if val.chars().count() > 52 {
30206				return Err(ValidationError::new(1002, "cmon_tx_id exceeds the maximum length of 52".to_string()));
30207			}
30208		}
30209		if let Some(ref val) = self.rsn {
30210			if val.chars().count() < 1 {
30211				return Err(ValidationError::new(1001, "rsn is shorter than the minimum length of 1".to_string()));
30212			}
30213			if val.chars().count() > 140 {
30214				return Err(ValidationError::new(1002, "rsn exceeds the maximum length of 140".to_string()));
30215			}
30216		}
30217		Ok(())
30218	}
30219}
30220
30221
30222// Debt5 ...
30223#[cfg_attr(feature = "derive_debug", derive(Debug))]
30224#[cfg_attr(feature = "derive_default", derive(Default))]
30225#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30226#[cfg_attr(feature = "derive_clone", derive(Clone))]
30227#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30228pub struct Debt5 {
30229	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtCcy", skip_serializing_if = "Option::is_none") )]
30230	pub pmt_ccy: Option<String>,
30231	#[cfg_attr( feature = "derive_serde", serde(rename = "FaceAmt", skip_serializing_if = "Option::is_none") )]
30232	pub face_amt: Option<ActiveCurrencyAndAmount>,
30233	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtFrqcy", skip_serializing_if = "Option::is_none") )]
30234	pub pmt_frqcy: Option<Frequency35Choice>,
30235	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFxgDt", skip_serializing_if = "Option::is_none") )]
30236	pub intrst_fxg_dt: Option<String>,
30237	#[cfg_attr( feature = "derive_serde", serde(rename = "DtdDt", skip_serializing_if = "Option::is_none") )]
30238	pub dtd_dt: Option<String>,
30239	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstPmtDt", skip_serializing_if = "Option::is_none") )]
30240	pub frst_pmt_dt: Option<String>,
30241	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
30242	pub mtrty_dt: Option<String>,
30243	#[cfg_attr( feature = "derive_serde", serde(rename = "NxtCpnDt", skip_serializing_if = "Option::is_none") )]
30244	pub nxt_cpn_dt: Option<String>,
30245	#[cfg_attr( feature = "derive_serde", serde(rename = "PutblDt", skip_serializing_if = "Option::is_none") )]
30246	pub putbl_dt: Option<String>,
30247	#[cfg_attr( feature = "derive_serde", serde(rename = "NxtCllblDt", skip_serializing_if = "Option::is_none") )]
30248	pub nxt_cllbl_dt: Option<String>,
30249	#[cfg_attr( feature = "derive_serde", serde(rename = "NxtFctrDt", skip_serializing_if = "Option::is_none") )]
30250	pub nxt_fctr_dt: Option<String>,
30251	#[cfg_attr( feature = "derive_serde", serde(rename = "XprtnDt", skip_serializing_if = "Option::is_none") )]
30252	pub xprtn_dt: Option<String>,
30253	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtDrctnInd", skip_serializing_if = "Option::is_none") )]
30254	pub pmt_drctn_ind: Option<bool>,
30255	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRate", skip_serializing_if = "Option::is_none") )]
30256	pub intrst_rate: Option<f64>,
30257	#[cfg_attr( feature = "derive_serde", serde(rename = "NxtIntrstRate", skip_serializing_if = "Option::is_none") )]
30258	pub nxt_intrst_rate: Option<f64>,
30259	#[cfg_attr( feature = "derive_serde", serde(rename = "OddCpnInd", skip_serializing_if = "Option::is_none") )]
30260	pub odd_cpn_ind: Option<bool>,
30261	#[cfg_attr( feature = "derive_serde", serde(rename = "CllblInd", skip_serializing_if = "Option::is_none") )]
30262	pub cllbl_ind: Option<bool>,
30263	#[cfg_attr( feature = "derive_serde", serde(rename = "CPPrgm", skip_serializing_if = "Option::is_none") )]
30264	pub cp_prgm: Option<f64>,
30265	#[cfg_attr( feature = "derive_serde", serde(rename = "CPRegnTp", skip_serializing_if = "Option::is_none") )]
30266	pub cp_regn_tp: Option<String>,
30267	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstAcrlDt", skip_serializing_if = "Option::is_none") )]
30268	pub intrst_acrl_dt: Option<String>,
30269	#[cfg_attr( feature = "derive_serde", serde(rename = "PutblInd", skip_serializing_if = "Option::is_none") )]
30270	pub putbl_ind: Option<bool>,
30271	#[cfg_attr( feature = "derive_serde", serde(rename = "PreFnddInd", skip_serializing_if = "Option::is_none") )]
30272	pub pre_fndd_ind: Option<bool>,
30273	#[cfg_attr( feature = "derive_serde", serde(rename = "EscrwdInd", skip_serializing_if = "Option::is_none") )]
30274	pub escrwd_ind: Option<bool>,
30275	#[cfg_attr( feature = "derive_serde", serde(rename = "PerptlInd", skip_serializing_if = "Option::is_none") )]
30276	pub perptl_ind: Option<bool>,
30277	#[cfg_attr( feature = "derive_serde", serde(rename = "SubrdntdInd", skip_serializing_if = "Option::is_none") )]
30278	pub subrdntd_ind: Option<bool>,
30279	#[cfg_attr( feature = "derive_serde", serde(rename = "XtndblInd", skip_serializing_if = "Option::is_none") )]
30280	pub xtndbl_ind: Option<bool>,
30281	#[cfg_attr( feature = "derive_serde", serde(rename = "XtndblPrd", skip_serializing_if = "Option::is_none") )]
30282	pub xtndbl_prd: Option<DateTimePeriod1Choice>,
30283	#[cfg_attr( feature = "derive_serde", serde(rename = "VarblRateInd", skip_serializing_if = "Option::is_none") )]
30284	pub varbl_rate_ind: Option<bool>,
30285	#[cfg_attr( feature = "derive_serde", serde(rename = "OverAlltmtAmt", skip_serializing_if = "Option::is_none") )]
30286	pub over_alltmt_amt: Option<ActiveCurrencyAndAmount>,
30287	#[cfg_attr( feature = "derive_serde", serde(rename = "OverAlltmtRate", skip_serializing_if = "Option::is_none") )]
30288	pub over_alltmt_rate: Option<f64>,
30289	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtsblInd", skip_serializing_if = "Option::is_none") )]
30290	pub amtsbl_ind: Option<bool>,
30291	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstClctnMtd", skip_serializing_if = "Option::is_none") )]
30292	pub intrst_clctn_mtd: Option<String>,
30293	#[cfg_attr( feature = "derive_serde", serde(rename = "CptlsdIntrst", skip_serializing_if = "Option::is_none") )]
30294	pub cptlsd_intrst: Option<DistributionPolicy2Choice>,
30295	#[cfg_attr( feature = "derive_serde", serde(rename = "ActlDnmtnAmt", skip_serializing_if = "Option::is_none") )]
30296	pub actl_dnmtn_amt: Option<Vec<ActiveCurrencyAndAmount>>,
30297	#[cfg_attr( feature = "derive_serde", serde(rename = "CurFctr", skip_serializing_if = "Option::is_none") )]
30298	pub cur_fctr: Option<f64>,
30299	#[cfg_attr( feature = "derive_serde", serde(rename = "NxtFctr", skip_serializing_if = "Option::is_none") )]
30300	pub nxt_fctr: Option<f64>,
30301	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsFctr", skip_serializing_if = "Option::is_none") )]
30302	pub prvs_fctr: Option<f64>,
30303	#[cfg_attr( feature = "derive_serde", serde(rename = "Pcs", skip_serializing_if = "Option::is_none") )]
30304	pub pcs: Option<f64>,
30305	#[cfg_attr( feature = "derive_serde", serde(rename = "PlsMax", skip_serializing_if = "Option::is_none") )]
30306	pub pls_max: Option<f64>,
30307	#[cfg_attr( feature = "derive_serde", serde(rename = "PlsPerMln", skip_serializing_if = "Option::is_none") )]
30308	pub pls_per_mln: Option<f64>,
30309	#[cfg_attr( feature = "derive_serde", serde(rename = "PlsPerLot", skip_serializing_if = "Option::is_none") )]
30310	pub pls_per_lot: Option<f64>,
30311	#[cfg_attr( feature = "derive_serde", serde(rename = "PlsPerTrad", skip_serializing_if = "Option::is_none") )]
30312	pub pls_per_trad: Option<f64>,
30313	#[cfg_attr( feature = "derive_serde", serde(rename = "CstPrePmtPnltyInd", skip_serializing_if = "Option::is_none") )]
30314	pub cst_pre_pmt_pnlty_ind: Option<bool>,
30315	#[cfg_attr( feature = "derive_serde", serde(rename = "LotId", skip_serializing_if = "Option::is_none") )]
30316	pub lot_id: Option<String>,
30317	#[cfg_attr( feature = "derive_serde", serde(rename = "CstPrePmtYld", skip_serializing_if = "Option::is_none") )]
30318	pub cst_pre_pmt_yld: Option<f64>,
30319	#[cfg_attr( feature = "derive_serde", serde(rename = "WghtdAvrgCpn", skip_serializing_if = "Option::is_none") )]
30320	pub wghtd_avrg_cpn: Option<f64>,
30321	#[cfg_attr( feature = "derive_serde", serde(rename = "WghtdAvrgLife", skip_serializing_if = "Option::is_none") )]
30322	pub wghtd_avrg_life: Option<f64>,
30323	#[cfg_attr( feature = "derive_serde", serde(rename = "WghtdAvrgLn", skip_serializing_if = "Option::is_none") )]
30324	pub wghtd_avrg_ln: Option<f64>,
30325	#[cfg_attr( feature = "derive_serde", serde(rename = "WghtdAvrgMtrty", skip_serializing_if = "Option::is_none") )]
30326	pub wghtd_avrg_mtrty: Option<f64>,
30327	#[cfg_attr( feature = "derive_serde", serde(rename = "InsrdInd", skip_serializing_if = "Option::is_none") )]
30328	pub insrd_ind: Option<bool>,
30329	#[cfg_attr( feature = "derive_serde", serde(rename = "BkQlfdInd", skip_serializing_if = "Option::is_none") )]
30330	pub bk_qlfd_ind: Option<bool>,
30331	#[cfg_attr( feature = "derive_serde", serde(rename = "YldClctn", skip_serializing_if = "Option::is_none") )]
30332	pub yld_clctn: Option<Vec<YieldCalculation6>>,
30333	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstTp", skip_serializing_if = "Option::is_none") )]
30334	pub intrst_tp: Option<InterestType3Code>,
30335	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrmStrTp", skip_serializing_if = "Option::is_none") )]
30336	pub instrm_str_tp: Option<InstrumentSubStructureType2Choice>,
30337	#[cfg_attr( feature = "derive_serde", serde(rename = "GblTp", skip_serializing_if = "Option::is_none") )]
30338	pub gbl_tp: Option<GlobalNote2Choice>,
30339	#[cfg_attr( feature = "derive_serde", serde(rename = "PotntlEuroSysElgblty", skip_serializing_if = "Option::is_none") )]
30340	pub potntl_euro_sys_elgblty: Option<bool>,
30341	#[cfg_attr( feature = "derive_serde", serde(rename = "Geogcs", skip_serializing_if = "Option::is_none") )]
30342	pub geogcs: Option<String>,
30343	#[cfg_attr( feature = "derive_serde", serde(rename = "YldRg", skip_serializing_if = "Option::is_none") )]
30344	pub yld_rg: Option<AmountOrPercentageRange1>,
30345	#[cfg_attr( feature = "derive_serde", serde(rename = "CpnRg", skip_serializing_if = "Option::is_none") )]
30346	pub cpn_rg: Option<AmountOrPercentageRange1>,
30347	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
30348	pub purp: Option<String>,
30349	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrntvMinTaxInd", skip_serializing_if = "Option::is_none") )]
30350	pub altrntv_min_tax_ind: Option<bool>,
30351	#[cfg_attr( feature = "derive_serde", serde(rename = "AutoRinvstmt", skip_serializing_if = "Option::is_none") )]
30352	pub auto_rinvstmt: Option<f64>,
30353	#[cfg_attr( feature = "derive_serde", serde(rename = "Hrcut", skip_serializing_if = "Option::is_none") )]
30354	pub hrcut: Option<f64>,
30355	#[cfg_attr( feature = "derive_serde", serde(rename = "TxConds", skip_serializing_if = "Option::is_none") )]
30356	pub tx_conds: Option<TradeTransactionCondition7Choice>,
30357	#[cfg_attr( feature = "derive_serde", serde(rename = "LookBck", skip_serializing_if = "Option::is_none") )]
30358	pub look_bck: Option<f64>,
30359	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxSbstitn", skip_serializing_if = "Option::is_none") )]
30360	pub max_sbstitn: Option<f64>,
30361	#[cfg_attr( feature = "derive_serde", serde(rename = "MinIncrmt", skip_serializing_if = "Option::is_none") )]
30362	pub min_incrmt: Option<FinancialInstrumentQuantity1Choice>,
30363	#[cfg_attr( feature = "derive_serde", serde(rename = "MinQty", skip_serializing_if = "Option::is_none") )]
30364	pub min_qty: Option<FinancialInstrumentQuantity1Choice>,
30365	#[cfg_attr( feature = "derive_serde", serde(rename = "Pdctn", skip_serializing_if = "Option::is_none") )]
30366	pub pdctn: Option<String>,
30367	#[cfg_attr( feature = "derive_serde", serde(rename = "RstrctdInd", skip_serializing_if = "Option::is_none") )]
30368	pub rstrctd_ind: Option<bool>,
30369	#[cfg_attr( feature = "derive_serde", serde(rename = "PricFrqcy", skip_serializing_if = "Option::is_none") )]
30370	pub pric_frqcy: Option<Frequency35Choice>,
30371	#[cfg_attr( feature = "derive_serde", serde(rename = "Sctr", skip_serializing_if = "Option::is_none") )]
30372	pub sctr: Option<String>,
30373	#[cfg_attr( feature = "derive_serde", serde(rename = "SbstitnFrqcy", skip_serializing_if = "Option::is_none") )]
30374	pub sbstitn_frqcy: Option<Frequency35Choice>,
30375	#[cfg_attr( feature = "derive_serde", serde(rename = "SbstitnLft", skip_serializing_if = "Option::is_none") )]
30376	pub sbstitn_lft: Option<f64>,
30377	#[cfg_attr( feature = "derive_serde", serde(rename = "WhlPoolInd", skip_serializing_if = "Option::is_none") )]
30378	pub whl_pool_ind: Option<bool>,
30379	#[cfg_attr( feature = "derive_serde", serde(rename = "PricSrc", skip_serializing_if = "Option::is_none") )]
30380	pub pric_src: Option<String>,
30381	#[cfg_attr( feature = "derive_serde", serde(rename = "PricRg", skip_serializing_if = "Option::is_none") )]
30382	pub pric_rg: Option<AmountOrPercentageRange1>,
30383}
30384
30385impl Debt5 {
30386	pub fn validate(&self) -> Result<(), ValidationError> {
30387		if let Some(ref val) = self.pmt_ccy {
30388			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
30389			if !pattern.is_match(val) {
30390				return Err(ValidationError::new(1005, "pmt_ccy does not match the required pattern".to_string()));
30391			}
30392		}
30393		if let Some(ref val) = self.face_amt { val.validate()? }
30394		if let Some(ref val) = self.pmt_frqcy { val.validate()? }
30395		if let Some(ref val) = self.cp_regn_tp {
30396			if val.chars().count() < 1 {
30397				return Err(ValidationError::new(1001, "cp_regn_tp is shorter than the minimum length of 1".to_string()));
30398			}
30399			if val.chars().count() > 350 {
30400				return Err(ValidationError::new(1002, "cp_regn_tp exceeds the maximum length of 350".to_string()));
30401			}
30402		}
30403		if let Some(ref val) = self.xtndbl_prd { val.validate()? }
30404		if let Some(ref val) = self.over_alltmt_amt { val.validate()? }
30405		if let Some(ref val) = self.intrst_clctn_mtd {
30406			if val.chars().count() < 1 {
30407				return Err(ValidationError::new(1001, "intrst_clctn_mtd is shorter than the minimum length of 1".to_string()));
30408			}
30409			if val.chars().count() > 70 {
30410				return Err(ValidationError::new(1002, "intrst_clctn_mtd exceeds the maximum length of 70".to_string()));
30411			}
30412		}
30413		if let Some(ref val) = self.cptlsd_intrst { val.validate()? }
30414		if let Some(ref vec) = self.actl_dnmtn_amt { for item in vec { item.validate()? } }
30415		if let Some(ref val) = self.lot_id {
30416			if val.chars().count() < 1 {
30417				return Err(ValidationError::new(1001, "lot_id is shorter than the minimum length of 1".to_string()));
30418			}
30419			if val.chars().count() > 35 {
30420				return Err(ValidationError::new(1002, "lot_id exceeds the maximum length of 35".to_string()));
30421			}
30422		}
30423		if let Some(ref vec) = self.yld_clctn { for item in vec { item.validate()? } }
30424		if let Some(ref val) = self.intrst_tp { val.validate()? }
30425		if let Some(ref val) = self.instrm_str_tp { val.validate()? }
30426		if let Some(ref val) = self.gbl_tp { val.validate()? }
30427		if let Some(ref val) = self.geogcs {
30428			if val.chars().count() < 1 {
30429				return Err(ValidationError::new(1001, "geogcs is shorter than the minimum length of 1".to_string()));
30430			}
30431			if val.chars().count() > 35 {
30432				return Err(ValidationError::new(1002, "geogcs exceeds the maximum length of 35".to_string()));
30433			}
30434		}
30435		if let Some(ref val) = self.yld_rg { val.validate()? }
30436		if let Some(ref val) = self.cpn_rg { val.validate()? }
30437		if let Some(ref val) = self.purp {
30438			if val.chars().count() < 1 {
30439				return Err(ValidationError::new(1001, "purp is shorter than the minimum length of 1".to_string()));
30440			}
30441			if val.chars().count() > 256 {
30442				return Err(ValidationError::new(1002, "purp exceeds the maximum length of 256".to_string()));
30443			}
30444		}
30445		if let Some(ref val) = self.tx_conds { val.validate()? }
30446		if let Some(ref val) = self.min_incrmt { val.validate()? }
30447		if let Some(ref val) = self.min_qty { val.validate()? }
30448		if let Some(ref val) = self.pdctn {
30449			if val.chars().count() < 1 {
30450				return Err(ValidationError::new(1001, "pdctn is shorter than the minimum length of 1".to_string()));
30451			}
30452			if val.chars().count() > 35 {
30453				return Err(ValidationError::new(1002, "pdctn exceeds the maximum length of 35".to_string()));
30454			}
30455		}
30456		if let Some(ref val) = self.pric_frqcy { val.validate()? }
30457		if let Some(ref val) = self.sctr {
30458			if val.chars().count() < 1 {
30459				return Err(ValidationError::new(1001, "sctr is shorter than the minimum length of 1".to_string()));
30460			}
30461			if val.chars().count() > 35 {
30462				return Err(ValidationError::new(1002, "sctr exceeds the maximum length of 35".to_string()));
30463			}
30464		}
30465		if let Some(ref val) = self.sbstitn_frqcy { val.validate()? }
30466		if let Some(ref val) = self.pric_src {
30467			if val.chars().count() < 1 {
30468				return Err(ValidationError::new(1001, "pric_src is shorter than the minimum length of 1".to_string()));
30469			}
30470			if val.chars().count() > 35 {
30471				return Err(ValidationError::new(1002, "pric_src exceeds the maximum length of 35".to_string()));
30472			}
30473		}
30474		if let Some(ref val) = self.pric_rg { val.validate()? }
30475		Ok(())
30476	}
30477}
30478
30479
30480// DebtInstrument2 ...
30481#[cfg_attr(feature = "derive_debug", derive(Debug))]
30482#[cfg_attr(feature = "derive_default", derive(Default))]
30483#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30484#[cfg_attr(feature = "derive_clone", derive(Clone))]
30485#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30486pub struct DebtInstrument2 {
30487	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlIssdNmnlAmt") )]
30488	pub ttl_issd_nmnl_amt: ActiveOrHistoricCurrencyAndAmount,
30489	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
30490	pub mtrty_dt: Option<String>,
30491	#[cfg_attr( feature = "derive_serde", serde(rename = "NmnlValPerUnit") )]
30492	pub nmnl_val_per_unit: ActiveOrHistoricCurrencyAndAmount,
30493	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRate") )]
30494	pub intrst_rate: InterestRate6Choice,
30495	#[cfg_attr( feature = "derive_serde", serde(rename = "DebtSnrty", skip_serializing_if = "Option::is_none") )]
30496	pub debt_snrty: Option<DebtInstrumentSeniorityType1Code>,
30497}
30498
30499impl DebtInstrument2 {
30500	pub fn validate(&self) -> Result<(), ValidationError> {
30501		self.ttl_issd_nmnl_amt.validate()?;
30502		self.nmnl_val_per_unit.validate()?;
30503		self.intrst_rate.validate()?;
30504		if let Some(ref val) = self.debt_snrty { val.validate()? }
30505		Ok(())
30506	}
30507}
30508
30509
30510// DebtInstrument4 ...
30511#[cfg_attr(feature = "derive_debug", derive(Debug))]
30512#[cfg_attr(feature = "derive_default", derive(Default))]
30513#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30514#[cfg_attr(feature = "derive_clone", derive(Clone))]
30515#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30516pub struct DebtInstrument4 {
30517	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt") )]
30518	pub mtrty_dt: String,
30519}
30520
30521impl DebtInstrument4 {
30522	pub fn validate(&self) -> Result<(), ValidationError> {
30523		Ok(())
30524	}
30525}
30526
30527
30528// DebtInstrument5 ...
30529#[cfg_attr(feature = "derive_debug", derive(Debug))]
30530#[cfg_attr(feature = "derive_default", derive(Default))]
30531#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30532#[cfg_attr(feature = "derive_clone", derive(Clone))]
30533#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30534pub struct DebtInstrument5 {
30535	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
30536	pub tp: BondType1Code,
30537	#[cfg_attr( feature = "derive_serde", serde(rename = "IssncDt") )]
30538	pub issnc_dt: String,
30539}
30540
30541impl DebtInstrument5 {
30542	pub fn validate(&self) -> Result<(), ValidationError> {
30543		self.tp.validate()?;
30544		Ok(())
30545	}
30546}
30547
30548
30549// DebtInstrumentSeniorityType1Code ...
30550#[cfg_attr(feature = "derive_debug", derive(Debug))]
30551#[cfg_attr(feature = "derive_default", derive(Default))]
30552#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30553#[cfg_attr(feature = "derive_clone", derive(Clone))]
30554#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30555pub enum DebtInstrumentSeniorityType1Code {
30556	#[cfg_attr(feature = "derive_default", default)]
30557	#[cfg_attr( feature = "derive_serde", serde(rename = "SBOD") )]
30558	CodeSBOD,
30559	#[cfg_attr( feature = "derive_serde", serde(rename = "SNDB") )]
30560	CodeSNDB,
30561	#[cfg_attr( feature = "derive_serde", serde(rename = "MZZD") )]
30562	CodeMZZD,
30563	#[cfg_attr( feature = "derive_serde", serde(rename = "JUND") )]
30564	CodeJUND,
30565}
30566
30567impl DebtInstrumentSeniorityType1Code {
30568	pub fn validate(&self) -> Result<(), ValidationError> {
30569		Ok(())
30570	}
30571}
30572
30573
30574// DebtInstrumentSeniorityType2Code ...
30575#[cfg_attr(feature = "derive_debug", derive(Debug))]
30576#[cfg_attr(feature = "derive_default", derive(Default))]
30577#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30578#[cfg_attr(feature = "derive_clone", derive(Clone))]
30579#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30580pub enum DebtInstrumentSeniorityType2Code {
30581	#[cfg_attr(feature = "derive_default", default)]
30582	#[cfg_attr( feature = "derive_serde", serde(rename = "SBOD") )]
30583	CodeSBOD,
30584	#[cfg_attr( feature = "derive_serde", serde(rename = "SNDB") )]
30585	CodeSNDB,
30586	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
30587	CodeOTHR,
30588}
30589
30590impl DebtInstrumentSeniorityType2Code {
30591	pub fn validate(&self) -> Result<(), ValidationError> {
30592		Ok(())
30593	}
30594}
30595
30596
30597// DebtorActivation5 ...
30598#[cfg_attr(feature = "derive_debug", derive(Debug))]
30599#[cfg_attr(feature = "derive_default", derive(Default))]
30600#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30601#[cfg_attr(feature = "derive_clone", derive(Clone))]
30602#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30603pub struct DebtorActivation5 {
30604	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrActvtnId", skip_serializing_if = "Option::is_none") )]
30605	pub dbtr_actvtn_id: Option<String>,
30606	#[cfg_attr( feature = "derive_serde", serde(rename = "DispNm", skip_serializing_if = "Option::is_none") )]
30607	pub disp_nm: Option<String>,
30608	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
30609	pub ultmt_dbtr: Option<RTPPartyIdentification2>,
30610	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr") )]
30611	pub dbtr: RTPPartyIdentification2,
30612	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrSolPrvdr") )]
30613	pub dbtr_sol_prvdr: RTPPartyIdentification2,
30614	#[cfg_attr( feature = "derive_serde", serde(rename = "CstmrId", skip_serializing_if = "Option::is_none") )]
30615	pub cstmr_id: Option<Vec<Party53Choice>>,
30616	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctFrmtTp", skip_serializing_if = "Option::is_none") )]
30617	pub ctrct_frmt_tp: Option<Vec<DocumentFormat2Choice>>,
30618	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctRef", skip_serializing_if = "Option::is_none") )]
30619	pub ctrct_ref: Option<Vec<ContractReference1>>,
30620	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
30621	pub cdtr: RTPPartyIdentification2,
30622	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
30623	pub ultmt_cdtr: Option<RTPPartyIdentification2>,
30624	#[cfg_attr( feature = "derive_serde", serde(rename = "ActvtnReqDlvryPty", skip_serializing_if = "Option::is_none") )]
30625	pub actvtn_req_dlvry_pty: Option<RTPPartyIdentification2>,
30626	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
30627	pub start_dt: Option<DateAndDateTime2Choice>,
30628	#[cfg_attr( feature = "derive_serde", serde(rename = "EndDt", skip_serializing_if = "Option::is_none") )]
30629	pub end_dt: Option<DateAndDateTime2Choice>,
30630	#[cfg_attr( feature = "derive_serde", serde(rename = "DdctdActvtnCd", skip_serializing_if = "Option::is_none") )]
30631	pub ddctd_actvtn_cd: Option<String>,
30632}
30633
30634impl DebtorActivation5 {
30635	pub fn validate(&self) -> Result<(), ValidationError> {
30636		if let Some(ref val) = self.dbtr_actvtn_id {
30637			if val.chars().count() < 1 {
30638				return Err(ValidationError::new(1001, "dbtr_actvtn_id is shorter than the minimum length of 1".to_string()));
30639			}
30640			if val.chars().count() > 35 {
30641				return Err(ValidationError::new(1002, "dbtr_actvtn_id exceeds the maximum length of 35".to_string()));
30642			}
30643		}
30644		if let Some(ref val) = self.disp_nm {
30645			if val.chars().count() < 1 {
30646				return Err(ValidationError::new(1001, "disp_nm is shorter than the minimum length of 1".to_string()));
30647			}
30648			if val.chars().count() > 140 {
30649				return Err(ValidationError::new(1002, "disp_nm exceeds the maximum length of 140".to_string()));
30650			}
30651		}
30652		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
30653		self.dbtr.validate()?;
30654		self.dbtr_sol_prvdr.validate()?;
30655		if let Some(ref vec) = self.cstmr_id { for item in vec { item.validate()? } }
30656		if let Some(ref vec) = self.ctrct_frmt_tp { for item in vec { item.validate()? } }
30657		if let Some(ref vec) = self.ctrct_ref { for item in vec { item.validate()? } }
30658		self.cdtr.validate()?;
30659		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
30660		if let Some(ref val) = self.actvtn_req_dlvry_pty { val.validate()? }
30661		if let Some(ref val) = self.start_dt { val.validate()? }
30662		if let Some(ref val) = self.end_dt { val.validate()? }
30663		if let Some(ref val) = self.ddctd_actvtn_cd {
30664			if val.chars().count() < 1 {
30665				return Err(ValidationError::new(1001, "ddctd_actvtn_cd is shorter than the minimum length of 1".to_string()));
30666			}
30667			if val.chars().count() > 35 {
30668				return Err(ValidationError::new(1002, "ddctd_actvtn_cd exceeds the maximum length of 35".to_string()));
30669			}
30670		}
30671		Ok(())
30672	}
30673}
30674
30675
30676// DebtorActivation6 ...
30677#[cfg_attr(feature = "derive_debug", derive(Debug))]
30678#[cfg_attr(feature = "derive_default", derive(Default))]
30679#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30680#[cfg_attr(feature = "derive_clone", derive(Clone))]
30681#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30682pub struct DebtorActivation6 {
30683	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrActvtnId", skip_serializing_if = "Option::is_none") )]
30684	pub dbtr_actvtn_id: Option<String>,
30685	#[cfg_attr( feature = "derive_serde", serde(rename = "DispNm", skip_serializing_if = "Option::is_none") )]
30686	pub disp_nm: Option<String>,
30687	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
30688	pub ultmt_dbtr: Option<RTPPartyIdentification2>,
30689	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
30690	pub dbtr: Option<RTPPartyIdentification2>,
30691	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrSolPrvdr", skip_serializing_if = "Option::is_none") )]
30692	pub dbtr_sol_prvdr: Option<RTPPartyIdentification2>,
30693	#[cfg_attr( feature = "derive_serde", serde(rename = "CstmrId", skip_serializing_if = "Option::is_none") )]
30694	pub cstmr_id: Option<Vec<Party53Choice>>,
30695	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctFrmtTp", skip_serializing_if = "Option::is_none") )]
30696	pub ctrct_frmt_tp: Option<Vec<DocumentFormat2Choice>>,
30697	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctRef", skip_serializing_if = "Option::is_none") )]
30698	pub ctrct_ref: Option<Vec<ContractReference1>>,
30699	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
30700	pub cdtr: Option<RTPPartyIdentification2>,
30701	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
30702	pub ultmt_cdtr: Option<RTPPartyIdentification2>,
30703	#[cfg_attr( feature = "derive_serde", serde(rename = "ActvtnReqDlvryPty", skip_serializing_if = "Option::is_none") )]
30704	pub actvtn_req_dlvry_pty: Option<RTPPartyIdentification2>,
30705	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
30706	pub start_dt: Option<DateAndDateTime2Choice>,
30707	#[cfg_attr( feature = "derive_serde", serde(rename = "EndDt", skip_serializing_if = "Option::is_none") )]
30708	pub end_dt: Option<DateAndDateTime2Choice>,
30709	#[cfg_attr( feature = "derive_serde", serde(rename = "DdctdActvtnCd", skip_serializing_if = "Option::is_none") )]
30710	pub ddctd_actvtn_cd: Option<String>,
30711}
30712
30713impl DebtorActivation6 {
30714	pub fn validate(&self) -> Result<(), ValidationError> {
30715		if let Some(ref val) = self.dbtr_actvtn_id {
30716			if val.chars().count() < 1 {
30717				return Err(ValidationError::new(1001, "dbtr_actvtn_id is shorter than the minimum length of 1".to_string()));
30718			}
30719			if val.chars().count() > 35 {
30720				return Err(ValidationError::new(1002, "dbtr_actvtn_id exceeds the maximum length of 35".to_string()));
30721			}
30722		}
30723		if let Some(ref val) = self.disp_nm {
30724			if val.chars().count() < 1 {
30725				return Err(ValidationError::new(1001, "disp_nm is shorter than the minimum length of 1".to_string()));
30726			}
30727			if val.chars().count() > 140 {
30728				return Err(ValidationError::new(1002, "disp_nm exceeds the maximum length of 140".to_string()));
30729			}
30730		}
30731		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
30732		if let Some(ref val) = self.dbtr { val.validate()? }
30733		if let Some(ref val) = self.dbtr_sol_prvdr { val.validate()? }
30734		if let Some(ref vec) = self.cstmr_id { for item in vec { item.validate()? } }
30735		if let Some(ref vec) = self.ctrct_frmt_tp { for item in vec { item.validate()? } }
30736		if let Some(ref vec) = self.ctrct_ref { for item in vec { item.validate()? } }
30737		if let Some(ref val) = self.cdtr { val.validate()? }
30738		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
30739		if let Some(ref val) = self.actvtn_req_dlvry_pty { val.validate()? }
30740		if let Some(ref val) = self.start_dt { val.validate()? }
30741		if let Some(ref val) = self.end_dt { val.validate()? }
30742		if let Some(ref val) = self.ddctd_actvtn_cd {
30743			if val.chars().count() < 1 {
30744				return Err(ValidationError::new(1001, "ddctd_actvtn_cd is shorter than the minimum length of 1".to_string()));
30745			}
30746			if val.chars().count() > 35 {
30747				return Err(ValidationError::new(1002, "ddctd_actvtn_cd exceeds the maximum length of 35".to_string()));
30748			}
30749		}
30750		Ok(())
30751	}
30752}
30753
30754
30755// DebtorActivationAmendment5 ...
30756#[cfg_attr(feature = "derive_debug", derive(Debug))]
30757#[cfg_attr(feature = "derive_default", derive(Default))]
30758#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30759#[cfg_attr(feature = "derive_clone", derive(Clone))]
30760#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30761pub struct DebtorActivationAmendment5 {
30762	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizInstr", skip_serializing_if = "Option::is_none") )]
30763	pub orgnl_biz_instr: Option<OriginalBusinessInstruction1>,
30764	#[cfg_attr( feature = "derive_serde", serde(rename = "AmdmntRsn", skip_serializing_if = "Option::is_none") )]
30765	pub amdmnt_rsn: Option<DebtorActivationAmendmentReason3>,
30766	#[cfg_attr( feature = "derive_serde", serde(rename = "Amdmnt") )]
30767	pub amdmnt: DebtorActivationAmendment6,
30768	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlActvtn") )]
30769	pub orgnl_actvtn: OriginalActivation3Choice,
30770	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
30771	pub splmtry_data: Option<Vec<SupplementaryData1>>,
30772}
30773
30774impl DebtorActivationAmendment5 {
30775	pub fn validate(&self) -> Result<(), ValidationError> {
30776		if let Some(ref val) = self.orgnl_biz_instr { val.validate()? }
30777		if let Some(ref val) = self.amdmnt_rsn { val.validate()? }
30778		self.amdmnt.validate()?;
30779		self.orgnl_actvtn.validate()?;
30780		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
30781		Ok(())
30782	}
30783}
30784
30785
30786// DebtorActivationAmendment6 ...
30787#[cfg_attr(feature = "derive_debug", derive(Debug))]
30788#[cfg_attr(feature = "derive_default", derive(Default))]
30789#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30790#[cfg_attr(feature = "derive_clone", derive(Clone))]
30791#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30792pub struct DebtorActivationAmendment6 {
30793	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrActvtn", skip_serializing_if = "Option::is_none") )]
30794	pub dbtr_actvtn: Option<DebtorActivation6>,
30795	#[cfg_attr( feature = "derive_serde", serde(rename = "ElctrncInvcData", skip_serializing_if = "Option::is_none") )]
30796	pub elctrnc_invc_data: Option<ElectronicInvoice1>,
30797}
30798
30799impl DebtorActivationAmendment6 {
30800	pub fn validate(&self) -> Result<(), ValidationError> {
30801		if let Some(ref val) = self.dbtr_actvtn { val.validate()? }
30802		if let Some(ref val) = self.elctrnc_invc_data { val.validate()? }
30803		Ok(())
30804	}
30805}
30806
30807
30808// DebtorActivationAmendmentReason1Choice ...
30809#[cfg_attr(feature = "derive_debug", derive(Debug))]
30810#[cfg_attr(feature = "derive_default", derive(Default))]
30811#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30812#[cfg_attr(feature = "derive_clone", derive(Clone))]
30813#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30814pub struct DebtorActivationAmendmentReason1Choice {
30815	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
30816	pub cd: Option<String>,
30817	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
30818	pub prtry: Option<String>,
30819}
30820
30821impl DebtorActivationAmendmentReason1Choice {
30822	pub fn validate(&self) -> Result<(), ValidationError> {
30823		if let Some(ref val) = self.cd {
30824			if val.chars().count() < 1 {
30825				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
30826			}
30827			if val.chars().count() > 4 {
30828				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
30829			}
30830		}
30831		if let Some(ref val) = self.prtry {
30832			if val.chars().count() < 1 {
30833				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
30834			}
30835			if val.chars().count() > 35 {
30836				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
30837			}
30838		}
30839		Ok(())
30840	}
30841}
30842
30843
30844// DebtorActivationAmendmentReason3 ...
30845#[cfg_attr(feature = "derive_debug", derive(Debug))]
30846#[cfg_attr(feature = "derive_default", derive(Default))]
30847#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30848#[cfg_attr(feature = "derive_clone", derive(Clone))]
30849#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30850pub struct DebtorActivationAmendmentReason3 {
30851	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
30852	pub orgtr: Option<RTPPartyIdentification2>,
30853	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
30854	pub rsn: DebtorActivationAmendmentReason1Choice,
30855	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
30856	pub addtl_inf: Option<Vec<String>>,
30857}
30858
30859impl DebtorActivationAmendmentReason3 {
30860	pub fn validate(&self) -> Result<(), ValidationError> {
30861		if let Some(ref val) = self.orgtr { val.validate()? }
30862		self.rsn.validate()?;
30863		if let Some(ref vec) = self.addtl_inf {
30864			for item in vec {
30865				if item.chars().count() < 1 {
30866					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
30867				}
30868				if item.chars().count() > 105 {
30869					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
30870				}
30871			}
30872		}
30873		Ok(())
30874	}
30875}
30876
30877
30878// DebtorActivationCancellation3 ...
30879#[cfg_attr(feature = "derive_debug", derive(Debug))]
30880#[cfg_attr(feature = "derive_default", derive(Default))]
30881#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30882#[cfg_attr(feature = "derive_clone", derive(Clone))]
30883#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30884pub struct DebtorActivationCancellation3 {
30885	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizInstr", skip_serializing_if = "Option::is_none") )]
30886	pub orgnl_biz_instr: Option<OriginalBusinessInstruction1>,
30887	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlRsn", skip_serializing_if = "Option::is_none") )]
30888	pub cxl_rsn: Option<DebtorActivationCancellationReason3>,
30889	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlActvtn") )]
30890	pub orgnl_actvtn: OriginalActivation3Choice,
30891	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
30892	pub splmtry_data: Option<Vec<SupplementaryData1>>,
30893}
30894
30895impl DebtorActivationCancellation3 {
30896	pub fn validate(&self) -> Result<(), ValidationError> {
30897		if let Some(ref val) = self.orgnl_biz_instr { val.validate()? }
30898		if let Some(ref val) = self.cxl_rsn { val.validate()? }
30899		self.orgnl_actvtn.validate()?;
30900		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
30901		Ok(())
30902	}
30903}
30904
30905
30906// DebtorActivationCancellationReason1Choice ...
30907#[cfg_attr(feature = "derive_debug", derive(Debug))]
30908#[cfg_attr(feature = "derive_default", derive(Default))]
30909#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30910#[cfg_attr(feature = "derive_clone", derive(Clone))]
30911#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30912pub struct DebtorActivationCancellationReason1Choice {
30913	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
30914	pub cd: Option<String>,
30915	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
30916	pub prtry: Option<String>,
30917}
30918
30919impl DebtorActivationCancellationReason1Choice {
30920	pub fn validate(&self) -> Result<(), ValidationError> {
30921		if let Some(ref val) = self.cd {
30922			if val.chars().count() < 1 {
30923				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
30924			}
30925			if val.chars().count() > 4 {
30926				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
30927			}
30928		}
30929		if let Some(ref val) = self.prtry {
30930			if val.chars().count() < 1 {
30931				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
30932			}
30933			if val.chars().count() > 35 {
30934				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
30935			}
30936		}
30937		Ok(())
30938	}
30939}
30940
30941
30942// DebtorActivationCancellationReason3 ...
30943#[cfg_attr(feature = "derive_debug", derive(Debug))]
30944#[cfg_attr(feature = "derive_default", derive(Default))]
30945#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30946#[cfg_attr(feature = "derive_clone", derive(Clone))]
30947#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30948pub struct DebtorActivationCancellationReason3 {
30949	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
30950	pub orgtr: Option<RTPPartyIdentification2>,
30951	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
30952	pub rsn: DebtorActivationCancellationReason1Choice,
30953	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
30954	pub addtl_inf: Option<Vec<String>>,
30955}
30956
30957impl DebtorActivationCancellationReason3 {
30958	pub fn validate(&self) -> Result<(), ValidationError> {
30959		if let Some(ref val) = self.orgtr { val.validate()? }
30960		self.rsn.validate()?;
30961		if let Some(ref vec) = self.addtl_inf {
30962			for item in vec {
30963				if item.chars().count() < 1 {
30964					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
30965				}
30966				if item.chars().count() > 105 {
30967					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
30968				}
30969			}
30970		}
30971		Ok(())
30972	}
30973}
30974
30975
30976// DebtorActivationStatusReason1Choice ...
30977#[cfg_attr(feature = "derive_debug", derive(Debug))]
30978#[cfg_attr(feature = "derive_default", derive(Default))]
30979#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
30980#[cfg_attr(feature = "derive_clone", derive(Clone))]
30981#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
30982pub struct DebtorActivationStatusReason1Choice {
30983	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
30984	pub cd: Option<String>,
30985	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
30986	pub prtry: Option<String>,
30987}
30988
30989impl DebtorActivationStatusReason1Choice {
30990	pub fn validate(&self) -> Result<(), ValidationError> {
30991		if let Some(ref val) = self.cd {
30992			if val.chars().count() < 1 {
30993				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
30994			}
30995			if val.chars().count() > 4 {
30996				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
30997			}
30998		}
30999		if let Some(ref val) = self.prtry {
31000			if val.chars().count() < 1 {
31001				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
31002			}
31003			if val.chars().count() > 35 {
31004				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
31005			}
31006		}
31007		Ok(())
31008	}
31009}
31010
31011
31012// DebtorActivationStatusReason3 ...
31013#[cfg_attr(feature = "derive_debug", derive(Debug))]
31014#[cfg_attr(feature = "derive_default", derive(Default))]
31015#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31016#[cfg_attr(feature = "derive_clone", derive(Clone))]
31017#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31018pub struct DebtorActivationStatusReason3 {
31019	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
31020	pub orgtr: Option<RTPPartyIdentification2>,
31021	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
31022	pub rsn: DebtorActivationStatusReason1Choice,
31023	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
31024	pub addtl_inf: Option<Vec<String>>,
31025}
31026
31027impl DebtorActivationStatusReason3 {
31028	pub fn validate(&self) -> Result<(), ValidationError> {
31029		if let Some(ref val) = self.orgtr { val.validate()? }
31030		self.rsn.validate()?;
31031		if let Some(ref vec) = self.addtl_inf {
31032			for item in vec {
31033				if item.chars().count() < 1 {
31034					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
31035				}
31036				if item.chars().count() > 105 {
31037					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
31038				}
31039			}
31040		}
31041		Ok(())
31042	}
31043}
31044
31045
31046// DefaultFundRequirement1 ...
31047#[cfg_attr(feature = "derive_debug", derive(Debug))]
31048#[cfg_attr(feature = "derive_default", derive(Default))]
31049#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31050#[cfg_attr(feature = "derive_clone", derive(Clone))]
31051#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31052pub struct DefaultFundRequirement1 {
31053	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrMmbId") )]
31054	pub clr_mmb_id: GenericIdentification165,
31055	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcId", skip_serializing_if = "Option::is_none") )]
31056	pub svc_id: Option<String>,
31057	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
31058	pub amt: ActiveCurrencyAndAmount,
31059}
31060
31061impl DefaultFundRequirement1 {
31062	pub fn validate(&self) -> Result<(), ValidationError> {
31063		self.clr_mmb_id.validate()?;
31064		if let Some(ref val) = self.svc_id {
31065			if val.chars().count() < 1 {
31066				return Err(ValidationError::new(1001, "svc_id is shorter than the minimum length of 1".to_string()));
31067			}
31068			if val.chars().count() > 35 {
31069				return Err(ValidationError::new(1002, "svc_id exceeds the maximum length of 35".to_string()));
31070			}
31071		}
31072		self.amt.validate()?;
31073		Ok(())
31074	}
31075}
31076
31077
31078// DefinedAttributes1Choice ...
31079#[cfg_attr(feature = "derive_debug", derive(Debug))]
31080#[cfg_attr(feature = "derive_default", derive(Default))]
31081#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31082#[cfg_attr(feature = "derive_clone", derive(Clone))]
31083#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31084pub struct DefinedAttributes1Choice {
31085	#[cfg_attr( feature = "derive_serde", serde(rename = "QtyDfndAttrbts", skip_serializing_if = "Option::is_none") )]
31086	pub qty_dfnd_attrbts: Option<FinancialInstrumentAttributes89>,
31087	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDfndAttrbts", skip_serializing_if = "Option::is_none") )]
31088	pub val_dfnd_attrbts: Option<FinancialInstrumentAttributes90>,
31089}
31090
31091impl DefinedAttributes1Choice {
31092	pub fn validate(&self) -> Result<(), ValidationError> {
31093		if let Some(ref val) = self.qty_dfnd_attrbts { val.validate()? }
31094		if let Some(ref val) = self.val_dfnd_attrbts { val.validate()? }
31095		Ok(())
31096	}
31097}
31098
31099
31100// DeliveryInterconnectionPoint1Choice ...
31101#[cfg_attr(feature = "derive_debug", derive(Debug))]
31102#[cfg_attr(feature = "derive_default", derive(Default))]
31103#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31104#[cfg_attr(feature = "derive_clone", derive(Clone))]
31105#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31106pub struct DeliveryInterconnectionPoint1Choice {
31107	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
31108	pub cd: Option<String>,
31109	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
31110	pub prtry: Option<String>,
31111}
31112
31113impl DeliveryInterconnectionPoint1Choice {
31114	pub fn validate(&self) -> Result<(), ValidationError> {
31115		if let Some(ref val) = self.cd {
31116			let pattern = Regex::new("[A-Z0-9\\-]{16}").unwrap();
31117			if !pattern.is_match(val) {
31118				return Err(ValidationError::new(1005, "cd does not match the required pattern".to_string()));
31119			}
31120		}
31121		if let Some(ref val) = self.prtry {
31122			if val.chars().count() < 1 {
31123				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
31124			}
31125			if val.chars().count() > 52 {
31126				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 52".to_string()));
31127			}
31128		}
31129		Ok(())
31130	}
31131}
31132
31133
31134// DeniedReason11 ...
31135#[cfg_attr(feature = "derive_debug", derive(Debug))]
31136#[cfg_attr(feature = "derive_default", derive(Default))]
31137#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31138#[cfg_attr(feature = "derive_clone", derive(Clone))]
31139#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31140pub struct DeniedReason11 {
31141	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
31142	pub cd: DeniedReason16Choice,
31143	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
31144	pub addtl_rsn_inf: Option<String>,
31145}
31146
31147impl DeniedReason11 {
31148	pub fn validate(&self) -> Result<(), ValidationError> {
31149		self.cd.validate()?;
31150		if let Some(ref val) = self.addtl_rsn_inf {
31151			if val.chars().count() < 1 {
31152				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
31153			}
31154			if val.chars().count() > 210 {
31155				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
31156			}
31157		}
31158		Ok(())
31159	}
31160}
31161
31162
31163// DeniedReason16Choice ...
31164#[cfg_attr(feature = "derive_debug", derive(Debug))]
31165#[cfg_attr(feature = "derive_default", derive(Default))]
31166#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31167#[cfg_attr(feature = "derive_clone", derive(Clone))]
31168#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31169pub struct DeniedReason16Choice {
31170	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
31171	pub cd: Option<DeniedReason4Code>,
31172	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
31173	pub prtry: Option<GenericIdentification30>,
31174}
31175
31176impl DeniedReason16Choice {
31177	pub fn validate(&self) -> Result<(), ValidationError> {
31178		if let Some(ref val) = self.cd { val.validate()? }
31179		if let Some(ref val) = self.prtry { val.validate()? }
31180		Ok(())
31181	}
31182}
31183
31184
31185// DeniedReason4Code ...
31186#[cfg_attr(feature = "derive_debug", derive(Debug))]
31187#[cfg_attr(feature = "derive_default", derive(Default))]
31188#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31189#[cfg_attr(feature = "derive_clone", derive(Clone))]
31190#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31191pub enum DeniedReason4Code {
31192	#[cfg_attr(feature = "derive_default", default)]
31193	#[cfg_attr( feature = "derive_serde", serde(rename = "ADEA") )]
31194	CodeADEA,
31195	#[cfg_attr( feature = "derive_serde", serde(rename = "DCAN") )]
31196	CodeDCAN,
31197	#[cfg_attr( feature = "derive_serde", serde(rename = "DPRG") )]
31198	CodeDPRG,
31199	#[cfg_attr( feature = "derive_serde", serde(rename = "DREP") )]
31200	CodeDREP,
31201	#[cfg_attr( feature = "derive_serde", serde(rename = "DSET") )]
31202	CodeDSET,
31203	#[cfg_attr( feature = "derive_serde", serde(rename = "LATE") )]
31204	CodeLATE,
31205	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
31206	CodeOTHR,
31207	#[cfg_attr( feature = "derive_serde", serde(rename = "CDRG") )]
31208	CodeCDRG,
31209	#[cfg_attr( feature = "derive_serde", serde(rename = "CDCY") )]
31210	CodeCDCY,
31211	#[cfg_attr( feature = "derive_serde", serde(rename = "CDRE") )]
31212	CodeCDRE,
31213}
31214
31215impl DeniedReason4Code {
31216	pub fn validate(&self) -> Result<(), ValidationError> {
31217		Ok(())
31218	}
31219}
31220
31221
31222// DeniedStatus16Choice ...
31223#[cfg_attr(feature = "derive_debug", derive(Debug))]
31224#[cfg_attr(feature = "derive_default", derive(Default))]
31225#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31226#[cfg_attr(feature = "derive_clone", derive(Clone))]
31227#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31228pub struct DeniedStatus16Choice {
31229	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
31230	pub no_spcfd_rsn: Option<NoReasonCode>,
31231	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
31232	pub rsn: Option<Vec<DeniedReason11>>,
31233}
31234
31235impl DeniedStatus16Choice {
31236	pub fn validate(&self) -> Result<(), ValidationError> {
31237		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
31238		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
31239		Ok(())
31240	}
31241}
31242
31243
31244// Deposit1 ...
31245#[cfg_attr(feature = "derive_debug", derive(Debug))]
31246#[cfg_attr(feature = "derive_default", derive(Default))]
31247#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31248#[cfg_attr(feature = "derive_clone", derive(Clone))]
31249#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31250pub struct Deposit1 {
31251	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt") )]
31252	pub mtrty_dt: String,
31253	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
31254	pub val: ActiveCurrencyAndAmount,
31255	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId") )]
31256	pub ctr_pty_id: String,
31257}
31258
31259impl Deposit1 {
31260	pub fn validate(&self) -> Result<(), ValidationError> {
31261		self.val.validate()?;
31262		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
31263		if !pattern.is_match(&self.ctr_pty_id) {
31264			return Err(ValidationError::new(1005, "ctr_pty_id does not match the required pattern".to_string()));
31265		}
31266		Ok(())
31267	}
31268}
31269
31270
31271// DepositType1Code ...
31272#[cfg_attr(feature = "derive_debug", derive(Debug))]
31273#[cfg_attr(feature = "derive_default", derive(Default))]
31274#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31275#[cfg_attr(feature = "derive_clone", derive(Clone))]
31276#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31277pub enum DepositType1Code {
31278	#[cfg_attr(feature = "derive_default", default)]
31279	#[cfg_attr( feature = "derive_serde", serde(rename = "FITE") )]
31280	CodeFITE,
31281	#[cfg_attr( feature = "derive_serde", serde(rename = "CALL") )]
31282	CodeCALL,
31283}
31284
31285impl DepositType1Code {
31286	pub fn validate(&self) -> Result<(), ValidationError> {
31287		Ok(())
31288	}
31289}
31290
31291
31292// Derivative3 ...
31293#[cfg_attr(feature = "derive_debug", derive(Debug))]
31294#[cfg_attr(feature = "derive_default", derive(Default))]
31295#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31296#[cfg_attr(feature = "derive_clone", derive(Clone))]
31297#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31298pub struct Derivative3 {
31299	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivClssfctn") )]
31300	pub deriv_clssfctn: DerivativeClassification1,
31301	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivUndrlygLeg") )]
31302	pub deriv_undrlyg_leg: Vec<DerivativeUnderlyingLeg1>,
31303	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnAttrbts", skip_serializing_if = "Option::is_none") )]
31304	pub optn_attrbts: Option<Option14>,
31305}
31306
31307impl Derivative3 {
31308	pub fn validate(&self) -> Result<(), ValidationError> {
31309		self.deriv_clssfctn.validate()?;
31310		for item in &self.deriv_undrlyg_leg { item.validate()? }
31311		if let Some(ref val) = self.optn_attrbts { val.validate()? }
31312		Ok(())
31313	}
31314}
31315
31316
31317// Derivative3Choice ...
31318#[cfg_attr(feature = "derive_debug", derive(Debug))]
31319#[cfg_attr(feature = "derive_default", derive(Default))]
31320#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31321#[cfg_attr(feature = "derive_clone", derive(Clone))]
31322#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31323pub struct Derivative3Choice {
31324	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmmdty", skip_serializing_if = "Option::is_none") )]
31325	pub cmmdty: Option<CommodityDerivative4>,
31326	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRate", skip_serializing_if = "Option::is_none") )]
31327	pub intrst_rate: Option<InterestRateDerivative5>,
31328	#[cfg_attr( feature = "derive_serde", serde(rename = "FX", skip_serializing_if = "Option::is_none") )]
31329	pub fx: Option<ForeignExchangeDerivative2>,
31330	#[cfg_attr( feature = "derive_serde", serde(rename = "Eqty", skip_serializing_if = "Option::is_none") )]
31331	pub eqty: Option<EquityDerivative2>,
31332	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctForDiff", skip_serializing_if = "Option::is_none") )]
31333	pub ctrct_for_diff: Option<ContractForDifference2>,
31334	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdt", skip_serializing_if = "Option::is_none") )]
31335	pub cdt: Option<CreditDefaultSwapsDerivative4Choice>,
31336	#[cfg_attr( feature = "derive_serde", serde(rename = "EmssnAllwnc", skip_serializing_if = "Option::is_none") )]
31337	pub emssn_allwnc: Option<EmissionAllowanceProductType1Code>,
31338}
31339
31340impl Derivative3Choice {
31341	pub fn validate(&self) -> Result<(), ValidationError> {
31342		if let Some(ref val) = self.cmmdty { val.validate()? }
31343		if let Some(ref val) = self.intrst_rate { val.validate()? }
31344		if let Some(ref val) = self.fx { val.validate()? }
31345		if let Some(ref val) = self.eqty { val.validate()? }
31346		if let Some(ref val) = self.ctrct_for_diff { val.validate()? }
31347		if let Some(ref val) = self.cdt { val.validate()? }
31348		if let Some(ref val) = self.emssn_allwnc { val.validate()? }
31349		Ok(())
31350	}
31351}
31352
31353
31354// Derivative4 ...
31355#[cfg_attr(feature = "derive_debug", derive(Debug))]
31356#[cfg_attr(feature = "derive_default", derive(Default))]
31357#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31358#[cfg_attr(feature = "derive_clone", derive(Clone))]
31359#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31360pub struct Derivative4 {
31361	#[cfg_attr( feature = "derive_serde", serde(rename = "Futr", skip_serializing_if = "Option::is_none") )]
31362	pub futr: Option<Future4>,
31363	#[cfg_attr( feature = "derive_serde", serde(rename = "Optn", skip_serializing_if = "Option::is_none") )]
31364	pub optn: Option<Option15>,
31365}
31366
31367impl Derivative4 {
31368	pub fn validate(&self) -> Result<(), ValidationError> {
31369		if let Some(ref val) = self.futr { val.validate()? }
31370		if let Some(ref val) = self.optn { val.validate()? }
31371		Ok(())
31372	}
31373}
31374
31375
31376// DerivativeClassification1 ...
31377#[cfg_attr(feature = "derive_debug", derive(Debug))]
31378#[cfg_attr(feature = "derive_default", derive(Default))]
31379#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31380#[cfg_attr(feature = "derive_clone", derive(Clone))]
31381#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31382pub struct DerivativeClassification1 {
31383	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstClss") )]
31384	pub asst_clss: String,
31385	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct", skip_serializing_if = "Option::is_none") )]
31386	pub base_pdct: Option<String>,
31387	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
31388	pub sub_pdct: Option<String>,
31389	#[cfg_attr( feature = "derive_serde", serde(rename = "SubCmmdty", skip_serializing_if = "Option::is_none") )]
31390	pub sub_cmmdty: Option<String>,
31391	#[cfg_attr( feature = "derive_serde", serde(rename = "TxTp", skip_serializing_if = "Option::is_none") )]
31392	pub tx_tp: Option<String>,
31393}
31394
31395impl DerivativeClassification1 {
31396	pub fn validate(&self) -> Result<(), ValidationError> {
31397		if self.asst_clss.chars().count() < 1 {
31398			return Err(ValidationError::new(1001, "asst_clss is shorter than the minimum length of 1".to_string()));
31399		}
31400		if self.asst_clss.chars().count() > 35 {
31401			return Err(ValidationError::new(1002, "asst_clss exceeds the maximum length of 35".to_string()));
31402		}
31403		if let Some(ref val) = self.base_pdct {
31404			if val.chars().count() < 1 {
31405				return Err(ValidationError::new(1001, "base_pdct is shorter than the minimum length of 1".to_string()));
31406			}
31407			if val.chars().count() > 35 {
31408				return Err(ValidationError::new(1002, "base_pdct exceeds the maximum length of 35".to_string()));
31409			}
31410		}
31411		if let Some(ref val) = self.sub_pdct {
31412			if val.chars().count() < 1 {
31413				return Err(ValidationError::new(1001, "sub_pdct is shorter than the minimum length of 1".to_string()));
31414			}
31415			if val.chars().count() > 35 {
31416				return Err(ValidationError::new(1002, "sub_pdct exceeds the maximum length of 35".to_string()));
31417			}
31418		}
31419		if let Some(ref val) = self.sub_cmmdty {
31420			if val.chars().count() < 1 {
31421				return Err(ValidationError::new(1001, "sub_cmmdty is shorter than the minimum length of 1".to_string()));
31422			}
31423			if val.chars().count() > 35 {
31424				return Err(ValidationError::new(1002, "sub_cmmdty exceeds the maximum length of 35".to_string()));
31425			}
31426		}
31427		if let Some(ref val) = self.tx_tp {
31428			if val.chars().count() < 1 {
31429				return Err(ValidationError::new(1001, "tx_tp is shorter than the minimum length of 1".to_string()));
31430			}
31431			if val.chars().count() > 35 {
31432				return Err(ValidationError::new(1002, "tx_tp exceeds the maximum length of 35".to_string()));
31433			}
31434		}
31435		Ok(())
31436	}
31437}
31438
31439
31440// DerivativeCommodity2 ...
31441#[cfg_attr(feature = "derive_debug", derive(Debug))]
31442#[cfg_attr(feature = "derive_default", derive(Default))]
31443#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31444#[cfg_attr(feature = "derive_clone", derive(Clone))]
31445#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31446pub struct DerivativeCommodity2 {
31447	#[cfg_attr( feature = "derive_serde", serde(rename = "Pdct") )]
31448	pub pdct: AssetClassCommodity3Choice,
31449	#[cfg_attr( feature = "derive_serde", serde(rename = "TxTp", skip_serializing_if = "Option::is_none") )]
31450	pub tx_tp: Option<AssetClassTransactionType1Code>,
31451	#[cfg_attr( feature = "derive_serde", serde(rename = "FnlPricTp", skip_serializing_if = "Option::is_none") )]
31452	pub fnl_pric_tp: Option<AssetPriceType1Code>,
31453}
31454
31455impl DerivativeCommodity2 {
31456	pub fn validate(&self) -> Result<(), ValidationError> {
31457		self.pdct.validate()?;
31458		if let Some(ref val) = self.tx_tp { val.validate()? }
31459		if let Some(ref val) = self.fnl_pric_tp { val.validate()? }
31460		Ok(())
31461	}
31462}
31463
31464
31465// DerivativeEvent6 ...
31466#[cfg_attr(feature = "derive_debug", derive(Debug))]
31467#[cfg_attr(feature = "derive_default", derive(Default))]
31468#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31469#[cfg_attr(feature = "derive_clone", derive(Clone))]
31470#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31471pub struct DerivativeEvent6 {
31472	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
31473	pub tp: Option<DerivativeEventType3Code>,
31474	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
31475	pub id: Option<EventIdentifier1Choice>,
31476	#[cfg_attr( feature = "derive_serde", serde(rename = "TmStmp", skip_serializing_if = "Option::is_none") )]
31477	pub tm_stmp: Option<DateAndDateTime2Choice>,
31478	#[cfg_attr( feature = "derive_serde", serde(rename = "AmdmntInd", skip_serializing_if = "Option::is_none") )]
31479	pub amdmnt_ind: Option<bool>,
31480}
31481
31482impl DerivativeEvent6 {
31483	pub fn validate(&self) -> Result<(), ValidationError> {
31484		if let Some(ref val) = self.tp { val.validate()? }
31485		if let Some(ref val) = self.id { val.validate()? }
31486		if let Some(ref val) = self.tm_stmp { val.validate()? }
31487		Ok(())
31488	}
31489}
31490
31491
31492// DerivativeEventType3Code ...
31493#[cfg_attr(feature = "derive_debug", derive(Debug))]
31494#[cfg_attr(feature = "derive_default", derive(Default))]
31495#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31496#[cfg_attr(feature = "derive_clone", derive(Clone))]
31497#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31498pub enum DerivativeEventType3Code {
31499	#[cfg_attr(feature = "derive_default", default)]
31500	#[cfg_attr( feature = "derive_serde", serde(rename = "ALOC") )]
31501	CodeALOC,
31502	#[cfg_attr( feature = "derive_serde", serde(rename = "CLRG") )]
31503	CodeCLRG,
31504	#[cfg_attr( feature = "derive_serde", serde(rename = "CLAL") )]
31505	CodeCLAL,
31506	#[cfg_attr( feature = "derive_serde", serde(rename = "COMP") )]
31507	CodeCOMP,
31508	#[cfg_attr( feature = "derive_serde", serde(rename = "CORP") )]
31509	CodeCORP,
31510	#[cfg_attr( feature = "derive_serde", serde(rename = "CREV") )]
31511	CodeCREV,
31512	#[cfg_attr( feature = "derive_serde", serde(rename = "ETRM") )]
31513	CodeETRM,
31514	#[cfg_attr( feature = "derive_serde", serde(rename = "EXER") )]
31515	CodeEXER,
31516	#[cfg_attr( feature = "derive_serde", serde(rename = "INCP") )]
31517	CodeINCP,
31518	#[cfg_attr( feature = "derive_serde", serde(rename = "NOVA") )]
31519	CodeNOVA,
31520	#[cfg_attr( feature = "derive_serde", serde(rename = "PTNG") )]
31521	CodePTNG,
31522	#[cfg_attr( feature = "derive_serde", serde(rename = "TRAD") )]
31523	CodeTRAD,
31524	#[cfg_attr( feature = "derive_serde", serde(rename = "UPDT") )]
31525	CodeUPDT,
31526}
31527
31528impl DerivativeEventType3Code {
31529	pub fn validate(&self) -> Result<(), ValidationError> {
31530		Ok(())
31531	}
31532}
31533
31534
31535// DerivativeForeignExchange2 ...
31536#[cfg_attr(feature = "derive_debug", derive(Debug))]
31537#[cfg_attr(feature = "derive_default", derive(Default))]
31538#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31539#[cfg_attr(feature = "derive_clone", derive(Clone))]
31540#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31541pub struct DerivativeForeignExchange2 {
31542	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrNtnlCcy") )]
31543	pub othr_ntnl_ccy: String,
31544}
31545
31546impl DerivativeForeignExchange2 {
31547	pub fn validate(&self) -> Result<(), ValidationError> {
31548		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
31549		if !pattern.is_match(&self.othr_ntnl_ccy) {
31550			return Err(ValidationError::new(1005, "othr_ntnl_ccy does not match the required pattern".to_string()));
31551		}
31552		Ok(())
31553	}
31554}
31555
31556
31557// DerivativeForeignExchange3 ...
31558#[cfg_attr(feature = "derive_debug", derive(Debug))]
31559#[cfg_attr(feature = "derive_default", derive(Default))]
31560#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31561#[cfg_attr(feature = "derive_clone", derive(Clone))]
31562#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31563pub struct DerivativeForeignExchange3 {
31564	#[cfg_attr( feature = "derive_serde", serde(rename = "FxTp", skip_serializing_if = "Option::is_none") )]
31565	pub fx_tp: Option<AssetFXSubProductType1Code>,
31566	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrNtnlCcy", skip_serializing_if = "Option::is_none") )]
31567	pub othr_ntnl_ccy: Option<String>,
31568}
31569
31570impl DerivativeForeignExchange3 {
31571	pub fn validate(&self) -> Result<(), ValidationError> {
31572		if let Some(ref val) = self.fx_tp { val.validate()? }
31573		if let Some(ref val) = self.othr_ntnl_ccy {
31574			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
31575			if !pattern.is_match(val) {
31576				return Err(ValidationError::new(1005, "othr_ntnl_ccy does not match the required pattern".to_string()));
31577			}
31578		}
31579		Ok(())
31580	}
31581}
31582
31583
31584// DerivativeInstrument5 ...
31585#[cfg_attr(feature = "derive_debug", derive(Debug))]
31586#[cfg_attr(feature = "derive_default", derive(Default))]
31587#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31588#[cfg_attr(feature = "derive_clone", derive(Clone))]
31589#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31590pub struct DerivativeInstrument5 {
31591	#[cfg_attr( feature = "derive_serde", serde(rename = "XpryDt", skip_serializing_if = "Option::is_none") )]
31592	pub xpry_dt: Option<String>,
31593	#[cfg_attr( feature = "derive_serde", serde(rename = "PricMltplr", skip_serializing_if = "Option::is_none") )]
31594	pub pric_mltplr: Option<f64>,
31595	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygInstrm", skip_serializing_if = "Option::is_none") )]
31596	pub undrlyg_instrm: Option<FinancialInstrumentIdentification5Choice>,
31597	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnTp", skip_serializing_if = "Option::is_none") )]
31598	pub optn_tp: Option<OptionType2Code>,
31599	#[cfg_attr( feature = "derive_serde", serde(rename = "StrkPric", skip_serializing_if = "Option::is_none") )]
31600	pub strk_pric: Option<SecuritiesTransactionPrice4Choice>,
31601	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnExrcStyle", skip_serializing_if = "Option::is_none") )]
31602	pub optn_exrc_style: Option<OptionStyle7Code>,
31603	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryTp", skip_serializing_if = "Option::is_none") )]
31604	pub dlvry_tp: Option<PhysicalTransferType4Code>,
31605	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstClssSpcfcAttrbts", skip_serializing_if = "Option::is_none") )]
31606	pub asst_clss_spcfc_attrbts: Option<AssetClass2>,
31607}
31608
31609impl DerivativeInstrument5 {
31610	pub fn validate(&self) -> Result<(), ValidationError> {
31611		if let Some(ref val) = self.pric_mltplr {
31612			if *val < 0.000000 {
31613				return Err(ValidationError::new(1003, "pric_mltplr is less than the minimum value of 0.000000".to_string()));
31614			}
31615		}
31616		if let Some(ref val) = self.undrlyg_instrm { val.validate()? }
31617		if let Some(ref val) = self.optn_tp { val.validate()? }
31618		if let Some(ref val) = self.strk_pric { val.validate()? }
31619		if let Some(ref val) = self.optn_exrc_style { val.validate()? }
31620		if let Some(ref val) = self.dlvry_tp { val.validate()? }
31621		if let Some(ref val) = self.asst_clss_spcfc_attrbts { val.validate()? }
31622		Ok(())
31623	}
31624}
31625
31626
31627// DerivativeInstrument6 ...
31628#[cfg_attr(feature = "derive_debug", derive(Debug))]
31629#[cfg_attr(feature = "derive_default", derive(Default))]
31630#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31631#[cfg_attr(feature = "derive_clone", derive(Clone))]
31632#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31633pub struct DerivativeInstrument6 {
31634	#[cfg_attr( feature = "derive_serde", serde(rename = "XpryDt", skip_serializing_if = "Option::is_none") )]
31635	pub xpry_dt: Option<String>,
31636	#[cfg_attr( feature = "derive_serde", serde(rename = "PricMltplr") )]
31637	pub pric_mltplr: f64,
31638	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygInstrm") )]
31639	pub undrlyg_instrm: UnderlyingIdentification2Choice,
31640	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnTp", skip_serializing_if = "Option::is_none") )]
31641	pub optn_tp: Option<OptionType2Code>,
31642	#[cfg_attr( feature = "derive_serde", serde(rename = "StrkPric", skip_serializing_if = "Option::is_none") )]
31643	pub strk_pric: Option<SecuritiesTransactionPrice4Choice>,
31644	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnExrcStyle", skip_serializing_if = "Option::is_none") )]
31645	pub optn_exrc_style: Option<OptionStyle7Code>,
31646	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryTp") )]
31647	pub dlvry_tp: PhysicalTransferType4Code,
31648	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstClssSpcfcAttrbts", skip_serializing_if = "Option::is_none") )]
31649	pub asst_clss_spcfc_attrbts: Option<AssetClassAttributes1Choice>,
31650}
31651
31652impl DerivativeInstrument6 {
31653	pub fn validate(&self) -> Result<(), ValidationError> {
31654		if self.pric_mltplr < 0.000000 {
31655			return Err(ValidationError::new(1003, "pric_mltplr is less than the minimum value of 0.000000".to_string()));
31656		}
31657		self.undrlyg_instrm.validate()?;
31658		if let Some(ref val) = self.optn_tp { val.validate()? }
31659		if let Some(ref val) = self.strk_pric { val.validate()? }
31660		if let Some(ref val) = self.optn_exrc_style { val.validate()? }
31661		self.dlvry_tp.validate()?;
31662		if let Some(ref val) = self.asst_clss_spcfc_attrbts { val.validate()? }
31663		Ok(())
31664	}
31665}
31666
31667
31668// DerivativeInterest2 ...
31669#[cfg_attr(feature = "derive_debug", derive(Debug))]
31670#[cfg_attr(feature = "derive_default", derive(Default))]
31671#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31672#[cfg_attr(feature = "derive_clone", derive(Clone))]
31673#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31674pub struct DerivativeInterest2 {
31675	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrNtnlCcy") )]
31676	pub othr_ntnl_ccy: String,
31677}
31678
31679impl DerivativeInterest2 {
31680	pub fn validate(&self) -> Result<(), ValidationError> {
31681		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
31682		if !pattern.is_match(&self.othr_ntnl_ccy) {
31683			return Err(ValidationError::new(1005, "othr_ntnl_ccy does not match the required pattern".to_string()));
31684		}
31685		Ok(())
31686	}
31687}
31688
31689
31690// DerivativeInterest3 ...
31691#[cfg_attr(feature = "derive_debug", derive(Debug))]
31692#[cfg_attr(feature = "derive_default", derive(Default))]
31693#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31694#[cfg_attr(feature = "derive_clone", derive(Clone))]
31695#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31696pub struct DerivativeInterest3 {
31697	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRate") )]
31698	pub intrst_rate: FloatingInterestRate8,
31699	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstLegIntrstRate", skip_serializing_if = "Option::is_none") )]
31700	pub frst_leg_intrst_rate: Option<InterestRate8Choice>,
31701	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrNtnlCcy", skip_serializing_if = "Option::is_none") )]
31702	pub othr_ntnl_ccy: Option<String>,
31703	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrLegIntrstRate", skip_serializing_if = "Option::is_none") )]
31704	pub othr_leg_intrst_rate: Option<InterestRate8Choice>,
31705}
31706
31707impl DerivativeInterest3 {
31708	pub fn validate(&self) -> Result<(), ValidationError> {
31709		self.intrst_rate.validate()?;
31710		if let Some(ref val) = self.frst_leg_intrst_rate { val.validate()? }
31711		if let Some(ref val) = self.othr_ntnl_ccy {
31712			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
31713			if !pattern.is_match(val) {
31714				return Err(ValidationError::new(1005, "othr_ntnl_ccy does not match the required pattern".to_string()));
31715			}
31716		}
31717		if let Some(ref val) = self.othr_leg_intrst_rate { val.validate()? }
31718		Ok(())
31719	}
31720}
31721
31722
31723// DerivativePartyIdentification1Choice ...
31724#[cfg_attr(feature = "derive_debug", derive(Debug))]
31725#[cfg_attr(feature = "derive_default", derive(Default))]
31726#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31727#[cfg_attr(feature = "derive_clone", derive(Clone))]
31728#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31729pub struct DerivativePartyIdentification1Choice {
31730	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
31731	pub ctry: Option<String>,
31732	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrySubDvsn", skip_serializing_if = "Option::is_none") )]
31733	pub ctry_sub_dvsn: Option<String>,
31734	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
31735	pub lei: Option<String>,
31736}
31737
31738impl DerivativePartyIdentification1Choice {
31739	pub fn validate(&self) -> Result<(), ValidationError> {
31740		if let Some(ref val) = self.ctry {
31741			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
31742			if !pattern.is_match(val) {
31743				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
31744			}
31745		}
31746		if let Some(ref val) = self.ctry_sub_dvsn {
31747			let pattern = Regex::new("[A-Z]{2,2}\\-[0-9A-Z]{1,3}").unwrap();
31748			if !pattern.is_match(val) {
31749				return Err(ValidationError::new(1005, "ctry_sub_dvsn does not match the required pattern".to_string()));
31750			}
31751		}
31752		if let Some(ref val) = self.lei {
31753			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
31754			if !pattern.is_match(val) {
31755				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
31756			}
31757		}
31758		Ok(())
31759	}
31760}
31761
31762
31763// DerivativeUnderlyingLeg1 ...
31764#[cfg_attr(feature = "derive_debug", derive(Debug))]
31765#[cfg_attr(feature = "derive_default", derive(Default))]
31766#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31767#[cfg_attr(feature = "derive_clone", derive(Clone))]
31768#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31769pub struct DerivativeUnderlyingLeg1 {
31770	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctAttrbts") )]
31771	pub ctrct_attrbts: FinancialInstrumentAttributes88,
31772	#[cfg_attr( feature = "derive_serde", serde(rename = "DfndAttrbts", skip_serializing_if = "Option::is_none") )]
31773	pub dfnd_attrbts: Option<DefinedAttributes1Choice>,
31774}
31775
31776impl DerivativeUnderlyingLeg1 {
31777	pub fn validate(&self) -> Result<(), ValidationError> {
31778		self.ctrct_attrbts.validate()?;
31779		if let Some(ref val) = self.dfnd_attrbts { val.validate()? }
31780		Ok(())
31781	}
31782}
31783
31784
31785// DetailedAbnormalValuesStatistics4Choice ...
31786#[cfg_attr(feature = "derive_debug", derive(Debug))]
31787#[cfg_attr(feature = "derive_default", derive(Default))]
31788#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31789#[cfg_attr(feature = "derive_clone", derive(Clone))]
31790#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31791pub struct DetailedAbnormalValuesStatistics4Choice {
31792	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
31793	pub data_set_actn: Option<ReportPeriodActivity1Code>,
31794	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
31795	pub rpt: Option<DetailedTransactionStatistics28>,
31796}
31797
31798impl DetailedAbnormalValuesStatistics4Choice {
31799	pub fn validate(&self) -> Result<(), ValidationError> {
31800		if let Some(ref val) = self.data_set_actn { val.validate()? }
31801		if let Some(ref val) = self.rpt { val.validate()? }
31802		Ok(())
31803	}
31804}
31805
31806
31807// DetailedMissingMarginInformationStatistics4Choice ...
31808#[cfg_attr(feature = "derive_debug", derive(Debug))]
31809#[cfg_attr(feature = "derive_default", derive(Default))]
31810#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31811#[cfg_attr(feature = "derive_clone", derive(Clone))]
31812#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31813pub struct DetailedMissingMarginInformationStatistics4Choice {
31814	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
31815	pub data_set_actn: Option<ReportPeriodActivity1Code>,
31816	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
31817	pub rpt: Option<DetailedTransactionStatistics26>,
31818}
31819
31820impl DetailedMissingMarginInformationStatistics4Choice {
31821	pub fn validate(&self) -> Result<(), ValidationError> {
31822		if let Some(ref val) = self.data_set_actn { val.validate()? }
31823		if let Some(ref val) = self.rpt { val.validate()? }
31824		Ok(())
31825	}
31826}
31827
31828
31829// DetailedMissingValuationsStatistics4Choice ...
31830#[cfg_attr(feature = "derive_debug", derive(Debug))]
31831#[cfg_attr(feature = "derive_default", derive(Default))]
31832#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31833#[cfg_attr(feature = "derive_clone", derive(Clone))]
31834#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31835pub struct DetailedMissingValuationsStatistics4Choice {
31836	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
31837	pub data_set_actn: Option<ReportPeriodActivity1Code>,
31838	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
31839	pub rpt: Option<DetailedTransactionStatistics27>,
31840}
31841
31842impl DetailedMissingValuationsStatistics4Choice {
31843	pub fn validate(&self) -> Result<(), ValidationError> {
31844		if let Some(ref val) = self.data_set_actn { val.validate()? }
31845		if let Some(ref val) = self.rpt { val.validate()? }
31846		Ok(())
31847	}
31848}
31849
31850
31851// DetailedReportStatistics5 ...
31852#[cfg_attr(feature = "derive_debug", derive(Debug))]
31853#[cfg_attr(feature = "derive_default", derive(Default))]
31854#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31855#[cfg_attr(feature = "derive_clone", derive(Clone))]
31856#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31857pub struct DetailedReportStatistics5 {
31858	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfRpts") )]
31859	pub ttl_nb_of_rpts: String,
31860	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfRptsAccptd") )]
31861	pub ttl_nb_of_rpts_accptd: String,
31862	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfRptsRjctd") )]
31863	pub ttl_nb_of_rpts_rjctd: String,
31864	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfRptsRjctdPerErr", skip_serializing_if = "Option::is_none") )]
31865	pub nb_of_rpts_rjctd_per_err: Option<Vec<NumberOfTransactionsPerValidationRule5>>,
31866}
31867
31868impl DetailedReportStatistics5 {
31869	pub fn validate(&self) -> Result<(), ValidationError> {
31870		let pattern = Regex::new("[0-9]{1,15}").unwrap();
31871		if !pattern.is_match(&self.ttl_nb_of_rpts) {
31872			return Err(ValidationError::new(1005, "ttl_nb_of_rpts does not match the required pattern".to_string()));
31873		}
31874		let pattern = Regex::new("[0-9]{1,15}").unwrap();
31875		if !pattern.is_match(&self.ttl_nb_of_rpts_accptd) {
31876			return Err(ValidationError::new(1005, "ttl_nb_of_rpts_accptd does not match the required pattern".to_string()));
31877		}
31878		let pattern = Regex::new("[0-9]{1,15}").unwrap();
31879		if !pattern.is_match(&self.ttl_nb_of_rpts_rjctd) {
31880			return Err(ValidationError::new(1005, "ttl_nb_of_rpts_rjctd does not match the required pattern".to_string()));
31881		}
31882		if let Some(ref vec) = self.nb_of_rpts_rjctd_per_err { for item in vec { item.validate()? } }
31883		Ok(())
31884	}
31885}
31886
31887
31888// DetailedReportStatistics7 ...
31889#[cfg_attr(feature = "derive_debug", derive(Debug))]
31890#[cfg_attr(feature = "derive_default", derive(Default))]
31891#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31892#[cfg_attr(feature = "derive_clone", derive(Clone))]
31893#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31894pub struct DetailedReportStatistics7 {
31895	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfRpts") )]
31896	pub ttl_nb_of_rpts: f64,
31897	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfRptsAccptd") )]
31898	pub ttl_nb_of_rpts_accptd: f64,
31899	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfRptsRjctd") )]
31900	pub ttl_nb_of_rpts_rjctd: f64,
31901	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfRptsRjctdPerErr", skip_serializing_if = "Option::is_none") )]
31902	pub nb_of_rpts_rjctd_per_err: Option<Vec<NumberOfTransactionsPerValidationRule6>>,
31903}
31904
31905impl DetailedReportStatistics7 {
31906	pub fn validate(&self) -> Result<(), ValidationError> {
31907		if self.ttl_nb_of_rpts < 0.000000 {
31908			return Err(ValidationError::new(1003, "ttl_nb_of_rpts is less than the minimum value of 0.000000".to_string()));
31909		}
31910		if self.ttl_nb_of_rpts_accptd < 0.000000 {
31911			return Err(ValidationError::new(1003, "ttl_nb_of_rpts_accptd is less than the minimum value of 0.000000".to_string()));
31912		}
31913		if self.ttl_nb_of_rpts_rjctd < 0.000000 {
31914			return Err(ValidationError::new(1003, "ttl_nb_of_rpts_rjctd is less than the minimum value of 0.000000".to_string()));
31915		}
31916		if let Some(ref vec) = self.nb_of_rpts_rjctd_per_err { for item in vec { item.validate()? } }
31917		Ok(())
31918	}
31919}
31920
31921
31922// DetailedStatisticsPerCounterparty17 ...
31923#[cfg_attr(feature = "derive_debug", derive(Debug))]
31924#[cfg_attr(feature = "derive_default", derive(Default))]
31925#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31926#[cfg_attr(feature = "derive_clone", derive(Clone))]
31927#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31928pub struct DetailedStatisticsPerCounterparty17 {
31929	#[cfg_attr( feature = "derive_serde", serde(rename = "RefDt") )]
31930	pub ref_dt: String,
31931	#[cfg_attr( feature = "derive_serde", serde(rename = "MssngValtn") )]
31932	pub mssng_valtn: DetailedMissingValuationsStatistics4Choice,
31933	#[cfg_attr( feature = "derive_serde", serde(rename = "MssngMrgnInf") )]
31934	pub mssng_mrgn_inf: DetailedMissingMarginInformationStatistics4Choice,
31935	#[cfg_attr( feature = "derive_serde", serde(rename = "AbnrmlVals") )]
31936	pub abnrml_vals: DetailedAbnormalValuesStatistics4Choice,
31937}
31938
31939impl DetailedStatisticsPerCounterparty17 {
31940	pub fn validate(&self) -> Result<(), ValidationError> {
31941		self.mssng_valtn.validate()?;
31942		self.mssng_mrgn_inf.validate()?;
31943		self.abnrml_vals.validate()?;
31944		Ok(())
31945	}
31946}
31947
31948
31949// DetailedStatisticsPerCounterparty19 ...
31950#[cfg_attr(feature = "derive_debug", derive(Debug))]
31951#[cfg_attr(feature = "derive_default", derive(Default))]
31952#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
31953#[cfg_attr(feature = "derive_clone", derive(Clone))]
31954#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
31955pub struct DetailedStatisticsPerCounterparty19 {
31956	#[cfg_attr( feature = "derive_serde", serde(rename = "RefDt") )]
31957	pub ref_dt: String,
31958	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfRpts") )]
31959	pub ttl_nb_of_rpts: f64,
31960	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfRptsAccptd") )]
31961	pub ttl_nb_of_rpts_accptd: f64,
31962	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfRptsRjctd") )]
31963	pub ttl_nb_of_rpts_rjctd: f64,
31964	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfTxs") )]
31965	pub ttl_nb_of_txs: f64,
31966	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfTxsAccptd") )]
31967	pub ttl_nb_of_txs_accptd: f64,
31968	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfTxsRjctd") )]
31969	pub ttl_nb_of_txs_rjctd: f64,
31970	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlCrrctdRjctns", skip_serializing_if = "Option::is_none") )]
31971	pub ttl_crrctd_rjctns: Option<f64>,
31972	#[cfg_attr( feature = "derive_serde", serde(rename = "RjctnSttstcs") )]
31973	pub rjctn_sttstcs: Vec<RejectionStatistics9>,
31974}
31975
31976impl DetailedStatisticsPerCounterparty19 {
31977	pub fn validate(&self) -> Result<(), ValidationError> {
31978		if self.ttl_nb_of_rpts < 0.000000 {
31979			return Err(ValidationError::new(1003, "ttl_nb_of_rpts is less than the minimum value of 0.000000".to_string()));
31980		}
31981		if self.ttl_nb_of_rpts_accptd < 0.000000 {
31982			return Err(ValidationError::new(1003, "ttl_nb_of_rpts_accptd is less than the minimum value of 0.000000".to_string()));
31983		}
31984		if self.ttl_nb_of_rpts_rjctd < 0.000000 {
31985			return Err(ValidationError::new(1003, "ttl_nb_of_rpts_rjctd is less than the minimum value of 0.000000".to_string()));
31986		}
31987		if self.ttl_nb_of_txs < 0.000000 {
31988			return Err(ValidationError::new(1003, "ttl_nb_of_txs is less than the minimum value of 0.000000".to_string()));
31989		}
31990		if self.ttl_nb_of_txs_accptd < 0.000000 {
31991			return Err(ValidationError::new(1003, "ttl_nb_of_txs_accptd is less than the minimum value of 0.000000".to_string()));
31992		}
31993		if self.ttl_nb_of_txs_rjctd < 0.000000 {
31994			return Err(ValidationError::new(1003, "ttl_nb_of_txs_rjctd is less than the minimum value of 0.000000".to_string()));
31995		}
31996		if let Some(ref val) = self.ttl_crrctd_rjctns {
31997			if *val < 0.000000 {
31998				return Err(ValidationError::new(1003, "ttl_crrctd_rjctns is less than the minimum value of 0.000000".to_string()));
31999			}
32000		}
32001		for item in &self.rjctn_sttstcs { item.validate()? }
32002		Ok(())
32003	}
32004}
32005
32006
32007// DetailedTransactionStatistics13 ...
32008#[cfg_attr(feature = "derive_debug", derive(Debug))]
32009#[cfg_attr(feature = "derive_default", derive(Default))]
32010#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32011#[cfg_attr(feature = "derive_clone", derive(Clone))]
32012#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32013pub struct DetailedTransactionStatistics13 {
32014	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfTxs") )]
32015	pub ttl_nb_of_txs: String,
32016	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfTxsAccptd") )]
32017	pub ttl_nb_of_txs_accptd: String,
32018	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfTxsRjctd") )]
32019	pub ttl_nb_of_txs_rjctd: String,
32020	#[cfg_attr( feature = "derive_serde", serde(rename = "TxsRjctnsRsn", skip_serializing_if = "Option::is_none") )]
32021	pub txs_rjctns_rsn: Option<Vec<RejectionReason53>>,
32022}
32023
32024impl DetailedTransactionStatistics13 {
32025	pub fn validate(&self) -> Result<(), ValidationError> {
32026		let pattern = Regex::new("[0-9]{1,15}").unwrap();
32027		if !pattern.is_match(&self.ttl_nb_of_txs) {
32028			return Err(ValidationError::new(1005, "ttl_nb_of_txs does not match the required pattern".to_string()));
32029		}
32030		let pattern = Regex::new("[0-9]{1,15}").unwrap();
32031		if !pattern.is_match(&self.ttl_nb_of_txs_accptd) {
32032			return Err(ValidationError::new(1005, "ttl_nb_of_txs_accptd does not match the required pattern".to_string()));
32033		}
32034		let pattern = Regex::new("[0-9]{1,15}").unwrap();
32035		if !pattern.is_match(&self.ttl_nb_of_txs_rjctd) {
32036			return Err(ValidationError::new(1005, "ttl_nb_of_txs_rjctd does not match the required pattern".to_string()));
32037		}
32038		if let Some(ref vec) = self.txs_rjctns_rsn { for item in vec { item.validate()? } }
32039		Ok(())
32040	}
32041}
32042
32043
32044// DetailedTransactionStatistics26 ...
32045#[cfg_attr(feature = "derive_debug", derive(Debug))]
32046#[cfg_attr(feature = "derive_default", derive(Default))]
32047#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32048#[cfg_attr(feature = "derive_clone", derive(Clone))]
32049#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32050pub struct DetailedTransactionStatistics26 {
32051	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfOutsdngDerivs") )]
32052	pub nb_of_outsdng_derivs: f64,
32053	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfOutsdngDerivsWthNoMrgnInf") )]
32054	pub nb_of_outsdng_derivs_wth_no_mrgn_inf: f64,
32055	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfOutsdngDerivsWthOutdtdMrgnInf") )]
32056	pub nb_of_outsdng_derivs_wth_outdtd_mrgn_inf: f64,
32057	#[cfg_attr( feature = "derive_serde", serde(rename = "Wrnngs") )]
32058	pub wrnngs: Vec<MissingMarginData2>,
32059}
32060
32061impl DetailedTransactionStatistics26 {
32062	pub fn validate(&self) -> Result<(), ValidationError> {
32063		for item in &self.wrnngs { item.validate()? }
32064		Ok(())
32065	}
32066}
32067
32068
32069// DetailedTransactionStatistics27 ...
32070#[cfg_attr(feature = "derive_debug", derive(Debug))]
32071#[cfg_attr(feature = "derive_default", derive(Default))]
32072#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32073#[cfg_attr(feature = "derive_clone", derive(Clone))]
32074#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32075pub struct DetailedTransactionStatistics27 {
32076	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfOutsdngDerivs") )]
32077	pub nb_of_outsdng_derivs: f64,
32078	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfOutsdngDerivsWthNoValtn") )]
32079	pub nb_of_outsdng_derivs_wth_no_valtn: f64,
32080	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfOutsdngDerivsWthOutdtdValtn") )]
32081	pub nb_of_outsdng_derivs_wth_outdtd_valtn: f64,
32082	#[cfg_attr( feature = "derive_serde", serde(rename = "Wrnngs") )]
32083	pub wrnngs: Vec<MissingValuationsData2>,
32084}
32085
32086impl DetailedTransactionStatistics27 {
32087	pub fn validate(&self) -> Result<(), ValidationError> {
32088		for item in &self.wrnngs { item.validate()? }
32089		Ok(())
32090	}
32091}
32092
32093
32094// DetailedTransactionStatistics28 ...
32095#[cfg_attr(feature = "derive_debug", derive(Debug))]
32096#[cfg_attr(feature = "derive_default", derive(Default))]
32097#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32098#[cfg_attr(feature = "derive_clone", derive(Clone))]
32099#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32100pub struct DetailedTransactionStatistics28 {
32101	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfDerivsRptd") )]
32102	pub nb_of_derivs_rptd: f64,
32103	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfDerivsRptdWthOtlrs") )]
32104	pub nb_of_derivs_rptd_wth_otlrs: f64,
32105	#[cfg_attr( feature = "derive_serde", serde(rename = "Wrnngs") )]
32106	pub wrnngs: Vec<AbnormalValuesData4>,
32107}
32108
32109impl DetailedTransactionStatistics28 {
32110	pub fn validate(&self) -> Result<(), ValidationError> {
32111		for item in &self.wrnngs { item.validate()? }
32112		Ok(())
32113	}
32114}
32115
32116
32117// DetailedTransactionStatistics2Choice ...
32118#[cfg_attr(feature = "derive_debug", derive(Debug))]
32119#[cfg_attr(feature = "derive_default", derive(Default))]
32120#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32121#[cfg_attr(feature = "derive_clone", derive(Clone))]
32122#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32123pub struct DetailedTransactionStatistics2Choice {
32124	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
32125	pub data_set_actn: Option<ReportPeriodActivity1Code>,
32126	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldSttstcs", skip_serializing_if = "Option::is_none") )]
32127	pub dtld_sttstcs: Option<DetailedTransactionStatistics13>,
32128}
32129
32130impl DetailedTransactionStatistics2Choice {
32131	pub fn validate(&self) -> Result<(), ValidationError> {
32132		if let Some(ref val) = self.data_set_actn { val.validate()? }
32133		if let Some(ref val) = self.dtld_sttstcs { val.validate()? }
32134		Ok(())
32135	}
32136}
32137
32138
32139// DetailedTransactionStatistics30 ...
32140#[cfg_attr(feature = "derive_debug", derive(Debug))]
32141#[cfg_attr(feature = "derive_default", derive(Default))]
32142#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32143#[cfg_attr(feature = "derive_clone", derive(Clone))]
32144#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32145pub struct DetailedTransactionStatistics30 {
32146	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfTxs") )]
32147	pub ttl_nb_of_txs: f64,
32148	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfTxsAccptd") )]
32149	pub ttl_nb_of_txs_accptd: f64,
32150	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfTxsRjctd") )]
32151	pub ttl_nb_of_txs_rjctd: f64,
32152	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlCrrctdRjctns", skip_serializing_if = "Option::is_none") )]
32153	pub ttl_crrctd_rjctns: Option<f64>,
32154	#[cfg_attr( feature = "derive_serde", serde(rename = "TxsRjctnsRsn", skip_serializing_if = "Option::is_none") )]
32155	pub txs_rjctns_rsn: Option<Vec<RejectionReason71>>,
32156}
32157
32158impl DetailedTransactionStatistics30 {
32159	pub fn validate(&self) -> Result<(), ValidationError> {
32160		if self.ttl_nb_of_txs < 0.000000 {
32161			return Err(ValidationError::new(1003, "ttl_nb_of_txs is less than the minimum value of 0.000000".to_string()));
32162		}
32163		if self.ttl_nb_of_txs_accptd < 0.000000 {
32164			return Err(ValidationError::new(1003, "ttl_nb_of_txs_accptd is less than the minimum value of 0.000000".to_string()));
32165		}
32166		if self.ttl_nb_of_txs_rjctd < 0.000000 {
32167			return Err(ValidationError::new(1003, "ttl_nb_of_txs_rjctd is less than the minimum value of 0.000000".to_string()));
32168		}
32169		if let Some(ref val) = self.ttl_crrctd_rjctns {
32170			if *val < 0.000000 {
32171				return Err(ValidationError::new(1003, "ttl_crrctd_rjctns is less than the minimum value of 0.000000".to_string()));
32172			}
32173		}
32174		if let Some(ref vec) = self.txs_rjctns_rsn { for item in vec { item.validate()? } }
32175		Ok(())
32176	}
32177}
32178
32179
32180// DetailedTransactionStatistics7Choice ...
32181#[cfg_attr(feature = "derive_debug", derive(Debug))]
32182#[cfg_attr(feature = "derive_default", derive(Default))]
32183#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32184#[cfg_attr(feature = "derive_clone", derive(Clone))]
32185#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32186pub struct DetailedTransactionStatistics7Choice {
32187	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
32188	pub data_set_actn: Option<ReportPeriodActivity1Code>,
32189	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldSttstcs", skip_serializing_if = "Option::is_none") )]
32190	pub dtld_sttstcs: Option<DetailedTransactionStatistics30>,
32191}
32192
32193impl DetailedTransactionStatistics7Choice {
32194	pub fn validate(&self) -> Result<(), ValidationError> {
32195		if let Some(ref val) = self.data_set_actn { val.validate()? }
32196		if let Some(ref val) = self.dtld_sttstcs { val.validate()? }
32197		Ok(())
32198	}
32199}
32200
32201
32202// DigitalTokenAmount2 ...
32203#[cfg_attr(feature = "derive_debug", derive(Debug))]
32204#[cfg_attr(feature = "derive_default", derive(Default))]
32205#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32206#[cfg_attr(feature = "derive_clone", derive(Clone))]
32207#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32208pub struct DigitalTokenAmount2 {
32209	#[cfg_attr( feature = "derive_serde", serde(rename = "Idr") )]
32210	pub idr: String,
32211	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit", skip_serializing_if = "Option::is_none") )]
32212	pub unit: Option<f64>,
32213	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
32214	pub desc: Option<String>,
32215}
32216
32217impl DigitalTokenAmount2 {
32218	pub fn validate(&self) -> Result<(), ValidationError> {
32219		let pattern = Regex::new("[1-9B-DF-HJ-NP-XZ][0-9B-DF-HJ-NP-XZ]{8,8}").unwrap();
32220		if !pattern.is_match(&self.idr) {
32221			return Err(ValidationError::new(1005, "idr does not match the required pattern".to_string()));
32222		}
32223		if let Some(ref val) = self.desc {
32224			if val.chars().count() > 30 {
32225				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 30".to_string()));
32226			}
32227		}
32228		Ok(())
32229	}
32230}
32231
32232
32233// DirectDebitInstructionDetails3 ...
32234#[cfg_attr(feature = "derive_debug", derive(Debug))]
32235#[cfg_attr(feature = "derive_default", derive(Default))]
32236#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32237#[cfg_attr(feature = "derive_clone", derive(Clone))]
32238#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32239pub struct DirectDebitInstructionDetails3 {
32240	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtId") )]
32241	pub mndt_id: String,
32242	#[cfg_attr( feature = "derive_serde", serde(rename = "AutomtdDrctDbtInstrInd", skip_serializing_if = "Option::is_none") )]
32243	pub automtd_drct_dbt_instr_ind: Option<bool>,
32244	#[cfg_attr( feature = "derive_serde", serde(rename = "DrctDbtTrfblInd", skip_serializing_if = "Option::is_none") )]
32245	pub drct_dbt_trfbl_ind: Option<bool>,
32246	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
32247	pub cdtr: PartyIdentification272,
32248	#[cfg_attr( feature = "derive_serde", serde(rename = "LastColltnCcyAmt", skip_serializing_if = "Option::is_none") )]
32249	pub last_colltn_ccy_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
32250	#[cfg_attr( feature = "derive_serde", serde(rename = "LastColltnDt", skip_serializing_if = "Option::is_none") )]
32251	pub last_colltn_dt: Option<String>,
32252	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrDtls", skip_serializing_if = "Option::is_none") )]
32253	pub othr_dtls: Option<Vec<TransferInstruction1>>,
32254}
32255
32256impl DirectDebitInstructionDetails3 {
32257	pub fn validate(&self) -> Result<(), ValidationError> {
32258		if self.mndt_id.chars().count() < 1 {
32259			return Err(ValidationError::new(1001, "mndt_id is shorter than the minimum length of 1".to_string()));
32260		}
32261		if self.mndt_id.chars().count() > 35 {
32262			return Err(ValidationError::new(1002, "mndt_id exceeds the maximum length of 35".to_string()));
32263		}
32264		self.cdtr.validate()?;
32265		if let Some(ref val) = self.last_colltn_ccy_amt { val.validate()? }
32266		if let Some(ref vec) = self.othr_dtls { for item in vec { item.validate()? } }
32267		Ok(())
32268	}
32269}
32270
32271
32272// DirectDebitMandate7 ...
32273#[cfg_attr(feature = "derive_debug", derive(Debug))]
32274#[cfg_attr(feature = "derive_default", derive(Default))]
32275#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32276#[cfg_attr(feature = "derive_clone", derive(Clone))]
32277#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32278pub struct DirectDebitMandate7 {
32279	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct") )]
32280	pub dbtr_acct: AccountIdentificationAndName5,
32281	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
32282	pub dbtr: Option<PartyIdentification125Choice>,
32283	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrTaxIdNb", skip_serializing_if = "Option::is_none") )]
32284	pub dbtr_tax_id_nb: Option<String>,
32285	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrNtlRegnNb", skip_serializing_if = "Option::is_none") )]
32286	pub dbtr_ntl_regn_nb: Option<String>,
32287	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
32288	pub cdtr: Option<PartyIdentification125Choice>,
32289	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt") )]
32290	pub dbtr_agt: FinancialInstitutionIdentification11Choice,
32291	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtBrnch", skip_serializing_if = "Option::is_none") )]
32292	pub dbtr_agt_brnch: Option<BranchData4>,
32293	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
32294	pub cdtr_agt: Option<FinancialInstitutionIdentification11Choice>,
32295	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtBrnch", skip_serializing_if = "Option::is_none") )]
32296	pub cdtr_agt_brnch: Option<BranchData4>,
32297	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnId", skip_serializing_if = "Option::is_none") )]
32298	pub regn_id: Option<String>,
32299	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtId", skip_serializing_if = "Option::is_none") )]
32300	pub mndt_id: Option<String>,
32301}
32302
32303impl DirectDebitMandate7 {
32304	pub fn validate(&self) -> Result<(), ValidationError> {
32305		self.dbtr_acct.validate()?;
32306		if let Some(ref val) = self.dbtr { val.validate()? }
32307		if let Some(ref val) = self.dbtr_tax_id_nb {
32308			if val.chars().count() < 1 {
32309				return Err(ValidationError::new(1001, "dbtr_tax_id_nb is shorter than the minimum length of 1".to_string()));
32310			}
32311			if val.chars().count() > 35 {
32312				return Err(ValidationError::new(1002, "dbtr_tax_id_nb exceeds the maximum length of 35".to_string()));
32313			}
32314		}
32315		if let Some(ref val) = self.dbtr_ntl_regn_nb {
32316			if val.chars().count() < 1 {
32317				return Err(ValidationError::new(1001, "dbtr_ntl_regn_nb is shorter than the minimum length of 1".to_string()));
32318			}
32319			if val.chars().count() > 35 {
32320				return Err(ValidationError::new(1002, "dbtr_ntl_regn_nb exceeds the maximum length of 35".to_string()));
32321			}
32322		}
32323		if let Some(ref val) = self.cdtr { val.validate()? }
32324		self.dbtr_agt.validate()?;
32325		if let Some(ref val) = self.dbtr_agt_brnch { val.validate()? }
32326		if let Some(ref val) = self.cdtr_agt { val.validate()? }
32327		if let Some(ref val) = self.cdtr_agt_brnch { val.validate()? }
32328		if let Some(ref val) = self.regn_id {
32329			if val.chars().count() < 1 {
32330				return Err(ValidationError::new(1001, "regn_id is shorter than the minimum length of 1".to_string()));
32331			}
32332			if val.chars().count() > 35 {
32333				return Err(ValidationError::new(1002, "regn_id exceeds the maximum length of 35".to_string()));
32334			}
32335		}
32336		if let Some(ref val) = self.mndt_id {
32337			if val.chars().count() < 1 {
32338				return Err(ValidationError::new(1001, "mndt_id is shorter than the minimum length of 1".to_string()));
32339			}
32340			if val.chars().count() > 35 {
32341				return Err(ValidationError::new(1002, "mndt_id exceeds the maximum length of 35".to_string()));
32342			}
32343		}
32344		Ok(())
32345	}
32346}
32347
32348
32349// DirectDebitTransaction12 ...
32350#[cfg_attr(feature = "derive_debug", derive(Debug))]
32351#[cfg_attr(feature = "derive_default", derive(Default))]
32352#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32353#[cfg_attr(feature = "derive_clone", derive(Clone))]
32354#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32355pub struct DirectDebitTransaction12 {
32356	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtRltdInf", skip_serializing_if = "Option::is_none") )]
32357	pub mndt_rltd_inf: Option<MandateRelatedInformation16>,
32358	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrSchmeId", skip_serializing_if = "Option::is_none") )]
32359	pub cdtr_schme_id: Option<PartyIdentification272>,
32360	#[cfg_attr( feature = "derive_serde", serde(rename = "PreNtfctnId", skip_serializing_if = "Option::is_none") )]
32361	pub pre_ntfctn_id: Option<String>,
32362	#[cfg_attr( feature = "derive_serde", serde(rename = "PreNtfctnDt", skip_serializing_if = "Option::is_none") )]
32363	pub pre_ntfctn_dt: Option<String>,
32364}
32365
32366impl DirectDebitTransaction12 {
32367	pub fn validate(&self) -> Result<(), ValidationError> {
32368		if let Some(ref val) = self.mndt_rltd_inf { val.validate()? }
32369		if let Some(ref val) = self.cdtr_schme_id { val.validate()? }
32370		if let Some(ref val) = self.pre_ntfctn_id {
32371			if val.chars().count() < 1 {
32372				return Err(ValidationError::new(1001, "pre_ntfctn_id is shorter than the minimum length of 1".to_string()));
32373			}
32374			if val.chars().count() > 35 {
32375				return Err(ValidationError::new(1002, "pre_ntfctn_id exceeds the maximum length of 35".to_string()));
32376			}
32377		}
32378		Ok(())
32379	}
32380}
32381
32382
32383// DirectDebitTransactionInformation31 ...
32384#[cfg_attr(feature = "derive_debug", derive(Debug))]
32385#[cfg_attr(feature = "derive_default", derive(Default))]
32386#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32387#[cfg_attr(feature = "derive_clone", derive(Clone))]
32388#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32389pub struct DirectDebitTransactionInformation31 {
32390	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtId") )]
32391	pub pmt_id: PaymentIdentification13,
32392	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
32393	pub pmt_tp_inf: Option<PaymentTypeInformation27>,
32394	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmt") )]
32395	pub intr_bk_sttlm_amt: ActiveCurrencyAndAmount,
32396	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
32397	pub intr_bk_sttlm_dt: Option<String>,
32398	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmPrty", skip_serializing_if = "Option::is_none") )]
32399	pub sttlm_prty: Option<Priority3Code>,
32400	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmTmIndctn", skip_serializing_if = "Option::is_none") )]
32401	pub sttlm_tm_indctn: Option<SettlementDateTimeIndication1>,
32402	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAmt", skip_serializing_if = "Option::is_none") )]
32403	pub instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
32404	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate", skip_serializing_if = "Option::is_none") )]
32405	pub xchg_rate: Option<f64>,
32406	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr") )]
32407	pub chrg_br: ChargeBearerType1Code,
32408	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsInf", skip_serializing_if = "Option::is_none") )]
32409	pub chrgs_inf: Option<Vec<Charges16>>,
32410	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdColltnDt", skip_serializing_if = "Option::is_none") )]
32411	pub reqd_colltn_dt: Option<String>,
32412	#[cfg_attr( feature = "derive_serde", serde(rename = "DrctDbtTx", skip_serializing_if = "Option::is_none") )]
32413	pub drct_dbt_tx: Option<DirectDebitTransaction12>,
32414	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
32415	pub cdtr: PartyIdentification272,
32416	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
32417	pub cdtr_acct: Option<CashAccount40>,
32418	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt") )]
32419	pub cdtr_agt: BranchAndFinancialInstitutionIdentification8,
32420	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
32421	pub cdtr_agt_acct: Option<CashAccount40>,
32422	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
32423	pub ultmt_cdtr: Option<PartyIdentification272>,
32424	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty", skip_serializing_if = "Option::is_none") )]
32425	pub initg_pty: Option<PartyIdentification272>,
32426	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
32427	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
32428	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
32429	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
32430	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1", skip_serializing_if = "Option::is_none") )]
32431	pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
32432	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1Acct", skip_serializing_if = "Option::is_none") )]
32433	pub intrmy_agt1_acct: Option<CashAccount40>,
32434	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2", skip_serializing_if = "Option::is_none") )]
32435	pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
32436	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2Acct", skip_serializing_if = "Option::is_none") )]
32437	pub intrmy_agt2_acct: Option<CashAccount40>,
32438	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3", skip_serializing_if = "Option::is_none") )]
32439	pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
32440	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3Acct", skip_serializing_if = "Option::is_none") )]
32441	pub intrmy_agt3_acct: Option<CashAccount40>,
32442	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr") )]
32443	pub dbtr: PartyIdentification272,
32444	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct") )]
32445	pub dbtr_acct: CashAccount40,
32446	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt") )]
32447	pub dbtr_agt: BranchAndFinancialInstitutionIdentification8,
32448	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
32449	pub dbtr_agt_acct: Option<CashAccount40>,
32450	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
32451	pub ultmt_dbtr: Option<PartyIdentification272>,
32452	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
32453	pub purp: Option<Purpose2Choice>,
32454	#[cfg_attr( feature = "derive_serde", serde(rename = "RgltryRptg", skip_serializing_if = "Option::is_none") )]
32455	pub rgltry_rptg: Option<Vec<RegulatoryReporting3>>,
32456	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdRmtInf", skip_serializing_if = "Option::is_none") )]
32457	pub rltd_rmt_inf: Option<Vec<RemittanceLocation8>>,
32458	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
32459	pub rmt_inf: Option<RemittanceInformation22>,
32460	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
32461	pub splmtry_data: Option<Vec<SupplementaryData1>>,
32462}
32463
32464impl DirectDebitTransactionInformation31 {
32465	pub fn validate(&self) -> Result<(), ValidationError> {
32466		self.pmt_id.validate()?;
32467		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
32468		self.intr_bk_sttlm_amt.validate()?;
32469		if let Some(ref val) = self.sttlm_prty { val.validate()? }
32470		if let Some(ref val) = self.sttlm_tm_indctn { val.validate()? }
32471		if let Some(ref val) = self.instd_amt { val.validate()? }
32472		self.chrg_br.validate()?;
32473		if let Some(ref vec) = self.chrgs_inf { for item in vec { item.validate()? } }
32474		if let Some(ref val) = self.drct_dbt_tx { val.validate()? }
32475		self.cdtr.validate()?;
32476		if let Some(ref val) = self.cdtr_acct { val.validate()? }
32477		self.cdtr_agt.validate()?;
32478		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
32479		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
32480		if let Some(ref val) = self.initg_pty { val.validate()? }
32481		if let Some(ref val) = self.instg_agt { val.validate()? }
32482		if let Some(ref val) = self.instd_agt { val.validate()? }
32483		if let Some(ref val) = self.intrmy_agt1 { val.validate()? }
32484		if let Some(ref val) = self.intrmy_agt1_acct { val.validate()? }
32485		if let Some(ref val) = self.intrmy_agt2 { val.validate()? }
32486		if let Some(ref val) = self.intrmy_agt2_acct { val.validate()? }
32487		if let Some(ref val) = self.intrmy_agt3 { val.validate()? }
32488		if let Some(ref val) = self.intrmy_agt3_acct { val.validate()? }
32489		self.dbtr.validate()?;
32490		self.dbtr_acct.validate()?;
32491		self.dbtr_agt.validate()?;
32492		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
32493		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
32494		if let Some(ref val) = self.purp { val.validate()? }
32495		if let Some(ref vec) = self.rgltry_rptg { for item in vec { item.validate()? } }
32496		if let Some(ref vec) = self.rltd_rmt_inf { for item in vec { item.validate()? } }
32497		if let Some(ref val) = self.rmt_inf { val.validate()? }
32498		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
32499		Ok(())
32500	}
32501}
32502
32503
32504// DirectDebitTransactionInformation32 ...
32505#[cfg_attr(feature = "derive_debug", derive(Debug))]
32506#[cfg_attr(feature = "derive_default", derive(Default))]
32507#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32508#[cfg_attr(feature = "derive_clone", derive(Clone))]
32509#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32510pub struct DirectDebitTransactionInformation32 {
32511	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtId") )]
32512	pub pmt_id: PaymentIdentification6,
32513	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
32514	pub pmt_tp_inf: Option<PaymentTypeInformation29>,
32515	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAmt") )]
32516	pub instd_amt: ActiveOrHistoricCurrencyAndAmount,
32517	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr", skip_serializing_if = "Option::is_none") )]
32518	pub chrg_br: Option<ChargeBearerType1Code>,
32519	#[cfg_attr( feature = "derive_serde", serde(rename = "DrctDbtTx", skip_serializing_if = "Option::is_none") )]
32520	pub drct_dbt_tx: Option<DirectDebitTransaction12>,
32521	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
32522	pub ultmt_cdtr: Option<PartyIdentification272>,
32523	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt") )]
32524	pub dbtr_agt: BranchAndFinancialInstitutionIdentification8,
32525	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
32526	pub dbtr_agt_acct: Option<CashAccount40>,
32527	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr") )]
32528	pub dbtr: PartyIdentification272,
32529	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct") )]
32530	pub dbtr_acct: CashAccount40,
32531	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
32532	pub ultmt_dbtr: Option<PartyIdentification272>,
32533	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForCdtrAgt", skip_serializing_if = "Option::is_none") )]
32534	pub instr_for_cdtr_agt: Option<String>,
32535	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
32536	pub purp: Option<Purpose2Choice>,
32537	#[cfg_attr( feature = "derive_serde", serde(rename = "RgltryRptg", skip_serializing_if = "Option::is_none") )]
32538	pub rgltry_rptg: Option<Vec<RegulatoryReporting3>>,
32539	#[cfg_attr( feature = "derive_serde", serde(rename = "Tax", skip_serializing_if = "Option::is_none") )]
32540	pub tax: Option<TaxData1>,
32541	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdRmtInf", skip_serializing_if = "Option::is_none") )]
32542	pub rltd_rmt_inf: Option<Vec<RemittanceLocation8>>,
32543	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
32544	pub rmt_inf: Option<RemittanceInformation22>,
32545	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
32546	pub splmtry_data: Option<Vec<SupplementaryData1>>,
32547}
32548
32549impl DirectDebitTransactionInformation32 {
32550	pub fn validate(&self) -> Result<(), ValidationError> {
32551		self.pmt_id.validate()?;
32552		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
32553		self.instd_amt.validate()?;
32554		if let Some(ref val) = self.chrg_br { val.validate()? }
32555		if let Some(ref val) = self.drct_dbt_tx { val.validate()? }
32556		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
32557		self.dbtr_agt.validate()?;
32558		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
32559		self.dbtr.validate()?;
32560		self.dbtr_acct.validate()?;
32561		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
32562		if let Some(ref val) = self.instr_for_cdtr_agt {
32563			if val.chars().count() < 1 {
32564				return Err(ValidationError::new(1001, "instr_for_cdtr_agt is shorter than the minimum length of 1".to_string()));
32565			}
32566			if val.chars().count() > 140 {
32567				return Err(ValidationError::new(1002, "instr_for_cdtr_agt exceeds the maximum length of 140".to_string()));
32568			}
32569		}
32570		if let Some(ref val) = self.purp { val.validate()? }
32571		if let Some(ref vec) = self.rgltry_rptg { for item in vec { item.validate()? } }
32572		if let Some(ref val) = self.tax { val.validate()? }
32573		if let Some(ref vec) = self.rltd_rmt_inf { for item in vec { item.validate()? } }
32574		if let Some(ref val) = self.rmt_inf { val.validate()? }
32575		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
32576		Ok(())
32577	}
32578}
32579
32580
32581// DirectDebitTransactionInformation33 ...
32582#[cfg_attr(feature = "derive_debug", derive(Debug))]
32583#[cfg_attr(feature = "derive_default", derive(Default))]
32584#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32585#[cfg_attr(feature = "derive_clone", derive(Clone))]
32586#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32587pub struct DirectDebitTransactionInformation33 {
32588	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtId") )]
32589	pub pmt_id: PaymentIdentification13,
32590	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
32591	pub pmt_tp_inf: Option<PaymentTypeInformation28>,
32592	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmt") )]
32593	pub intr_bk_sttlm_amt: ActiveCurrencyAndAmount,
32594	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
32595	pub intr_bk_sttlm_dt: Option<String>,
32596	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmPrty", skip_serializing_if = "Option::is_none") )]
32597	pub sttlm_prty: Option<Priority3Code>,
32598	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmTmIndctn", skip_serializing_if = "Option::is_none") )]
32599	pub sttlm_tm_indctn: Option<SettlementDateTimeIndication1>,
32600	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmTmReq", skip_serializing_if = "Option::is_none") )]
32601	pub sttlm_tm_req: Option<SettlementTimeRequest2>,
32602	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
32603	pub ultmt_dbtr: Option<BranchAndFinancialInstitutionIdentification8>,
32604	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr") )]
32605	pub dbtr: BranchAndFinancialInstitutionIdentification8,
32606	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
32607	pub dbtr_acct: Option<CashAccount40>,
32608	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
32609	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
32610	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
32611	pub dbtr_agt_acct: Option<CashAccount40>,
32612	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForDbtrAgt", skip_serializing_if = "Option::is_none") )]
32613	pub instr_for_dbtr_agt: Option<String>,
32614	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
32615	pub purp: Option<Purpose2Choice>,
32616	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
32617	pub rmt_inf: Option<RemittanceInformation2>,
32618}
32619
32620impl DirectDebitTransactionInformation33 {
32621	pub fn validate(&self) -> Result<(), ValidationError> {
32622		self.pmt_id.validate()?;
32623		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
32624		self.intr_bk_sttlm_amt.validate()?;
32625		if let Some(ref val) = self.sttlm_prty { val.validate()? }
32626		if let Some(ref val) = self.sttlm_tm_indctn { val.validate()? }
32627		if let Some(ref val) = self.sttlm_tm_req { val.validate()? }
32628		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
32629		self.dbtr.validate()?;
32630		if let Some(ref val) = self.dbtr_acct { val.validate()? }
32631		if let Some(ref val) = self.dbtr_agt { val.validate()? }
32632		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
32633		if let Some(ref val) = self.instr_for_dbtr_agt {
32634			if val.chars().count() < 1 {
32635				return Err(ValidationError::new(1001, "instr_for_dbtr_agt is shorter than the minimum length of 1".to_string()));
32636			}
32637			if val.chars().count() > 210 {
32638				return Err(ValidationError::new(1002, "instr_for_dbtr_agt exceeds the maximum length of 210".to_string()));
32639			}
32640		}
32641		if let Some(ref val) = self.purp { val.validate()? }
32642		if let Some(ref val) = self.rmt_inf { val.validate()? }
32643		Ok(())
32644	}
32645}
32646
32647
32648// Direction2 ...
32649#[cfg_attr(feature = "derive_debug", derive(Debug))]
32650#[cfg_attr(feature = "derive_default", derive(Default))]
32651#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32652#[cfg_attr(feature = "derive_clone", derive(Clone))]
32653#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32654pub struct Direction2 {
32655	#[cfg_attr( feature = "derive_serde", serde(rename = "DrctnOfTheFrstLeg") )]
32656	pub drctn_of_the_frst_leg: OptionParty3Code,
32657	#[cfg_attr( feature = "derive_serde", serde(rename = "DrctnOfTheScndLeg", skip_serializing_if = "Option::is_none") )]
32658	pub drctn_of_the_scnd_leg: Option<OptionParty3Code>,
32659}
32660
32661impl Direction2 {
32662	pub fn validate(&self) -> Result<(), ValidationError> {
32663		self.drctn_of_the_frst_leg.validate()?;
32664		if let Some(ref val) = self.drctn_of_the_scnd_leg { val.validate()? }
32665		Ok(())
32666	}
32667}
32668
32669
32670// Direction4Choice ...
32671#[cfg_attr(feature = "derive_debug", derive(Debug))]
32672#[cfg_attr(feature = "derive_default", derive(Default))]
32673#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32674#[cfg_attr(feature = "derive_clone", derive(Clone))]
32675#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32676pub struct Direction4Choice {
32677	#[cfg_attr( feature = "derive_serde", serde(rename = "Drctn", skip_serializing_if = "Option::is_none") )]
32678	pub drctn: Option<Direction2>,
32679	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtySd", skip_serializing_if = "Option::is_none") )]
32680	pub ctr_pty_sd: Option<OptionParty1Code>,
32681}
32682
32683impl Direction4Choice {
32684	pub fn validate(&self) -> Result<(), ValidationError> {
32685		if let Some(ref val) = self.drctn { val.validate()? }
32686		if let Some(ref val) = self.ctr_pty_sd { val.validate()? }
32687		Ok(())
32688	}
32689}
32690
32691
32692// DisabledReason2Code ...
32693#[cfg_attr(feature = "derive_debug", derive(Debug))]
32694#[cfg_attr(feature = "derive_default", derive(Default))]
32695#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32696#[cfg_attr(feature = "derive_clone", derive(Clone))]
32697#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32698pub enum DisabledReason2Code {
32699	#[cfg_attr(feature = "derive_default", default)]
32700	#[cfg_attr( feature = "derive_serde", serde(rename = "CLOS") )]
32701	CodeCLOS,
32702	#[cfg_attr( feature = "derive_serde", serde(rename = "BKRP") )]
32703	CodeBKRP,
32704	#[cfg_attr( feature = "derive_serde", serde(rename = "CMMT") )]
32705	CodeCMMT,
32706	#[cfg_attr( feature = "derive_serde", serde(rename = "CNFS") )]
32707	CodeCNFS,
32708	#[cfg_attr( feature = "derive_serde", serde(rename = "MORT") )]
32709	CodeMORT,
32710	#[cfg_attr( feature = "derive_serde", serde(rename = "PCOM") )]
32711	CodePCOM,
32712	#[cfg_attr( feature = "derive_serde", serde(rename = "PLDG") )]
32713	CodePLDG,
32714	#[cfg_attr( feature = "derive_serde", serde(rename = "TRPE") )]
32715	CodeTRPE,
32716	#[cfg_attr( feature = "derive_serde", serde(rename = "SANC") )]
32717	CodeSANC,
32718	#[cfg_attr( feature = "derive_serde", serde(rename = "TRAN") )]
32719	CodeTRAN,
32720	#[cfg_attr( feature = "derive_serde", serde(rename = "REJT") )]
32721	CodeREJT,
32722}
32723
32724impl DisabledReason2Code {
32725	pub fn validate(&self) -> Result<(), ValidationError> {
32726		Ok(())
32727	}
32728}
32729
32730
32731// DisabledStatusReason1 ...
32732#[cfg_attr(feature = "derive_debug", derive(Debug))]
32733#[cfg_attr(feature = "derive_default", derive(Default))]
32734#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32735#[cfg_attr(feature = "derive_clone", derive(Clone))]
32736#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32737pub struct DisabledStatusReason1 {
32738	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
32739	pub cd: DisabledStatusReason2Choice,
32740	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
32741	pub addtl_inf: Option<String>,
32742}
32743
32744impl DisabledStatusReason1 {
32745	pub fn validate(&self) -> Result<(), ValidationError> {
32746		self.cd.validate()?;
32747		if let Some(ref val) = self.addtl_inf {
32748			if val.chars().count() < 1 {
32749				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
32750			}
32751			if val.chars().count() > 350 {
32752				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 350".to_string()));
32753			}
32754		}
32755		Ok(())
32756	}
32757}
32758
32759
32760// DisabledStatusReason1Choice ...
32761#[cfg_attr(feature = "derive_debug", derive(Debug))]
32762#[cfg_attr(feature = "derive_default", derive(Default))]
32763#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32764#[cfg_attr(feature = "derive_clone", derive(Clone))]
32765#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32766pub struct DisabledStatusReason1Choice {
32767	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
32768	pub no_spcfd_rsn: Option<NoReasonCode>,
32769	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
32770	pub rsn: Option<Vec<DisabledStatusReason1>>,
32771}
32772
32773impl DisabledStatusReason1Choice {
32774	pub fn validate(&self) -> Result<(), ValidationError> {
32775		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
32776		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
32777		Ok(())
32778	}
32779}
32780
32781
32782// DisabledStatusReason2Choice ...
32783#[cfg_attr(feature = "derive_debug", derive(Debug))]
32784#[cfg_attr(feature = "derive_default", derive(Default))]
32785#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32786#[cfg_attr(feature = "derive_clone", derive(Clone))]
32787#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32788pub struct DisabledStatusReason2Choice {
32789	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
32790	pub cd: Option<DisabledReason2Code>,
32791	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
32792	pub prtry: Option<GenericIdentification36>,
32793}
32794
32795impl DisabledStatusReason2Choice {
32796	pub fn validate(&self) -> Result<(), ValidationError> {
32797		if let Some(ref val) = self.cd { val.validate()? }
32798		if let Some(ref val) = self.prtry { val.validate()? }
32799		Ok(())
32800	}
32801}
32802
32803
32804// DiscountAmountAndType1 ...
32805#[cfg_attr(feature = "derive_debug", derive(Debug))]
32806#[cfg_attr(feature = "derive_default", derive(Default))]
32807#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32808#[cfg_attr(feature = "derive_clone", derive(Clone))]
32809#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32810pub struct DiscountAmountAndType1 {
32811	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
32812	pub tp: Option<DiscountAmountType1Choice>,
32813	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
32814	pub amt: ActiveOrHistoricCurrencyAndAmount,
32815}
32816
32817impl DiscountAmountAndType1 {
32818	pub fn validate(&self) -> Result<(), ValidationError> {
32819		if let Some(ref val) = self.tp { val.validate()? }
32820		self.amt.validate()?;
32821		Ok(())
32822	}
32823}
32824
32825
32826// DiscountAmountType1Choice ...
32827#[cfg_attr(feature = "derive_debug", derive(Debug))]
32828#[cfg_attr(feature = "derive_default", derive(Default))]
32829#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32830#[cfg_attr(feature = "derive_clone", derive(Clone))]
32831#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32832pub struct DiscountAmountType1Choice {
32833	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
32834	pub cd: Option<String>,
32835	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
32836	pub prtry: Option<String>,
32837}
32838
32839impl DiscountAmountType1Choice {
32840	pub fn validate(&self) -> Result<(), ValidationError> {
32841		if let Some(ref val) = self.cd {
32842			if val.chars().count() < 1 {
32843				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
32844			}
32845			if val.chars().count() > 4 {
32846				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
32847			}
32848		}
32849		if let Some(ref val) = self.prtry {
32850			if val.chars().count() < 1 {
32851				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
32852			}
32853			if val.chars().count() > 35 {
32854				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
32855			}
32856		}
32857		Ok(())
32858	}
32859}
32860
32861
32862// DisplayCapabilities1 ...
32863#[cfg_attr(feature = "derive_debug", derive(Debug))]
32864#[cfg_attr(feature = "derive_default", derive(Default))]
32865#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32866#[cfg_attr(feature = "derive_clone", derive(Clone))]
32867#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32868pub struct DisplayCapabilities1 {
32869	#[cfg_attr( feature = "derive_serde", serde(rename = "DispTp") )]
32870	pub disp_tp: UserInterface2Code,
32871	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfLines") )]
32872	pub nb_of_lines: String,
32873	#[cfg_attr( feature = "derive_serde", serde(rename = "LineWidth") )]
32874	pub line_width: String,
32875}
32876
32877impl DisplayCapabilities1 {
32878	pub fn validate(&self) -> Result<(), ValidationError> {
32879		self.disp_tp.validate()?;
32880		let pattern = Regex::new("[0-9]{1,3}").unwrap();
32881		if !pattern.is_match(&self.nb_of_lines) {
32882			return Err(ValidationError::new(1005, "nb_of_lines does not match the required pattern".to_string()));
32883		}
32884		let pattern = Regex::new("[0-9]{1,3}").unwrap();
32885		if !pattern.is_match(&self.line_width) {
32886			return Err(ValidationError::new(1005, "line_width does not match the required pattern".to_string()));
32887		}
32888		Ok(())
32889	}
32890}
32891
32892
32893// DisseminationData1 ...
32894#[cfg_attr(feature = "derive_debug", derive(Debug))]
32895#[cfg_attr(feature = "derive_default", derive(Default))]
32896#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32897#[cfg_attr(feature = "derive_clone", derive(Clone))]
32898#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32899pub struct DisseminationData1 {
32900	#[cfg_attr( feature = "derive_serde", serde(rename = "DssmntnIdr") )]
32901	pub dssmntn_idr: String,
32902	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlDssmntnIdr", skip_serializing_if = "Option::is_none") )]
32903	pub orgnl_dssmntn_idr: Option<String>,
32904	#[cfg_attr( feature = "derive_serde", serde(rename = "TmStmp") )]
32905	pub tm_stmp: String,
32906}
32907
32908impl DisseminationData1 {
32909	pub fn validate(&self) -> Result<(), ValidationError> {
32910		if self.dssmntn_idr.chars().count() < 1 {
32911			return Err(ValidationError::new(1001, "dssmntn_idr is shorter than the minimum length of 1".to_string()));
32912		}
32913		if self.dssmntn_idr.chars().count() > 52 {
32914			return Err(ValidationError::new(1002, "dssmntn_idr exceeds the maximum length of 52".to_string()));
32915		}
32916		if let Some(ref val) = self.orgnl_dssmntn_idr {
32917			if val.chars().count() < 1 {
32918				return Err(ValidationError::new(1001, "orgnl_dssmntn_idr is shorter than the minimum length of 1".to_string()));
32919			}
32920			if val.chars().count() > 52 {
32921				return Err(ValidationError::new(1002, "orgnl_dssmntn_idr exceeds the maximum length of 52".to_string()));
32922			}
32923		}
32924		Ok(())
32925	}
32926}
32927
32928
32929// DistributionPolicy1Code ...
32930#[cfg_attr(feature = "derive_debug", derive(Debug))]
32931#[cfg_attr(feature = "derive_default", derive(Default))]
32932#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32933#[cfg_attr(feature = "derive_clone", derive(Clone))]
32934#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32935pub enum DistributionPolicy1Code {
32936	#[cfg_attr(feature = "derive_default", default)]
32937	#[cfg_attr( feature = "derive_serde", serde(rename = "DIST") )]
32938	CodeDIST,
32939	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCU") )]
32940	CodeACCU,
32941}
32942
32943impl DistributionPolicy1Code {
32944	pub fn validate(&self) -> Result<(), ValidationError> {
32945		Ok(())
32946	}
32947}
32948
32949
32950// DistributionPolicy2Choice ...
32951#[cfg_attr(feature = "derive_debug", derive(Debug))]
32952#[cfg_attr(feature = "derive_default", derive(Default))]
32953#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32954#[cfg_attr(feature = "derive_clone", derive(Clone))]
32955#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32956pub struct DistributionPolicy2Choice {
32957	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
32958	pub cd: Option<DistributionPolicy1Code>,
32959	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
32960	pub prtry: Option<GenericIdentification30>,
32961}
32962
32963impl DistributionPolicy2Choice {
32964	pub fn validate(&self) -> Result<(), ValidationError> {
32965		if let Some(ref val) = self.cd { val.validate()? }
32966		if let Some(ref val) = self.prtry { val.validate()? }
32967		Ok(())
32968	}
32969}
32970
32971
32972// DistributionStrategy1 ...
32973#[cfg_attr(feature = "derive_debug", derive(Debug))]
32974#[cfg_attr(feature = "derive_default", derive(Default))]
32975#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
32976#[cfg_attr(feature = "derive_clone", derive(Clone))]
32977#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
32978pub struct DistributionStrategy1 {
32979	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnOnly", skip_serializing_if = "Option::is_none") )]
32980	pub exctn_only: Option<DistributionStrategy1Choice>,
32981	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnWthApprprtnssTstOrNonAdvsdSvcs", skip_serializing_if = "Option::is_none") )]
32982	pub exctn_wth_apprprtnss_tst_or_non_advsd_svcs: Option<DistributionStrategy1Choice>,
32983	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtAdvc", skip_serializing_if = "Option::is_none") )]
32984	pub invstmt_advc: Option<DistributionStrategy1Choice>,
32985	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtflMgmt", skip_serializing_if = "Option::is_none") )]
32986	pub prtfl_mgmt: Option<DistributionStrategy1Choice>,
32987	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
32988	pub othr: Option<OtherDistributionStrategy1>,
32989}
32990
32991impl DistributionStrategy1 {
32992	pub fn validate(&self) -> Result<(), ValidationError> {
32993		if let Some(ref val) = self.exctn_only { val.validate()? }
32994		if let Some(ref val) = self.exctn_wth_apprprtnss_tst_or_non_advsd_svcs { val.validate()? }
32995		if let Some(ref val) = self.invstmt_advc { val.validate()? }
32996		if let Some(ref val) = self.prtfl_mgmt { val.validate()? }
32997		if let Some(ref val) = self.othr { val.validate()? }
32998		Ok(())
32999	}
33000}
33001
33002
33003// DistributionStrategy1Choice ...
33004#[cfg_attr(feature = "derive_debug", derive(Debug))]
33005#[cfg_attr(feature = "derive_default", derive(Default))]
33006#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33007#[cfg_attr(feature = "derive_clone", derive(Clone))]
33008#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33009pub struct DistributionStrategy1Choice {
33010	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
33011	pub cd: Option<InvestorType3Code>,
33012	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
33013	pub prtry: Option<GenericIdentification47>,
33014}
33015
33016impl DistributionStrategy1Choice {
33017	pub fn validate(&self) -> Result<(), ValidationError> {
33018		if let Some(ref val) = self.cd { val.validate()? }
33019		if let Some(ref val) = self.prtry { val.validate()? }
33020		Ok(())
33021	}
33022}
33023
33024
33025// DividendPolicy1Code ...
33026#[cfg_attr(feature = "derive_debug", derive(Debug))]
33027#[cfg_attr(feature = "derive_default", derive(Default))]
33028#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33029#[cfg_attr(feature = "derive_clone", derive(Clone))]
33030#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33031pub enum DividendPolicy1Code {
33032	#[cfg_attr(feature = "derive_default", default)]
33033	#[cfg_attr( feature = "derive_serde", serde(rename = "CASH") )]
33034	CodeCASH,
33035	#[cfg_attr( feature = "derive_serde", serde(rename = "UNIT") )]
33036	CodeUNIT,
33037	#[cfg_attr( feature = "derive_serde", serde(rename = "BOTH") )]
33038	CodeBOTH,
33039}
33040
33041impl DividendPolicy1Code {
33042	pub fn validate(&self) -> Result<(), ValidationError> {
33043		Ok(())
33044	}
33045}
33046
33047
33048// Document12 ...
33049#[cfg_attr(feature = "derive_debug", derive(Debug))]
33050#[cfg_attr(feature = "derive_default", derive(Default))]
33051#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33052#[cfg_attr(feature = "derive_clone", derive(Clone))]
33053#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33054pub struct Document12 {
33055	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
33056	pub tp: DocumentType1Choice,
33057	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
33058	pub id: String,
33059	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseDt") )]
33060	pub isse_dt: DateAndDateTime2Choice,
33061	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
33062	pub nm: Option<String>,
33063	#[cfg_attr( feature = "derive_serde", serde(rename = "LangCd", skip_serializing_if = "Option::is_none") )]
33064	pub lang_cd: Option<String>,
33065	#[cfg_attr( feature = "derive_serde", serde(rename = "Frmt") )]
33066	pub frmt: DocumentFormat1Choice,
33067	#[cfg_attr( feature = "derive_serde", serde(rename = "FileNm", skip_serializing_if = "Option::is_none") )]
33068	pub file_nm: Option<String>,
33069	#[cfg_attr( feature = "derive_serde", serde(rename = "DgtlSgntr", skip_serializing_if = "Option::is_none") )]
33070	pub dgtl_sgntr: Option<PartyAndSignature3>,
33071	#[cfg_attr( feature = "derive_serde", serde(rename = "Nclsr") )]
33072	pub nclsr: String,
33073}
33074
33075impl Document12 {
33076	pub fn validate(&self) -> Result<(), ValidationError> {
33077		self.tp.validate()?;
33078		if self.id.chars().count() < 1 {
33079			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
33080		}
33081		if self.id.chars().count() > 35 {
33082			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
33083		}
33084		self.isse_dt.validate()?;
33085		if let Some(ref val) = self.nm {
33086			if val.chars().count() < 1 {
33087				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
33088			}
33089			if val.chars().count() > 140 {
33090				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
33091			}
33092		}
33093		self.frmt.validate()?;
33094		if let Some(ref val) = self.file_nm {
33095			if val.chars().count() < 1 {
33096				return Err(ValidationError::new(1001, "file_nm is shorter than the minimum length of 1".to_string()));
33097			}
33098			if val.chars().count() > 140 {
33099				return Err(ValidationError::new(1002, "file_nm exceeds the maximum length of 140".to_string()));
33100			}
33101		}
33102		if let Some(ref val) = self.dgtl_sgntr { val.validate()? }
33103		if self.nclsr.chars().count() < 1 {
33104			return Err(ValidationError::new(1001, "nclsr is shorter than the minimum length of 1".to_string()));
33105		}
33106		if self.nclsr.chars().count() > 10485760 {
33107			return Err(ValidationError::new(1002, "nclsr exceeds the maximum length of 10485760".to_string()));
33108		}
33109		Ok(())
33110	}
33111}
33112
33113
33114// Document15 ...
33115#[cfg_attr(feature = "derive_debug", derive(Debug))]
33116#[cfg_attr(feature = "derive_default", derive(Default))]
33117#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33118#[cfg_attr(feature = "derive_clone", derive(Clone))]
33119#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33120pub struct Document15 {
33121	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
33122	pub tp: DocumentType1Choice,
33123	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
33124	pub id: String,
33125	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseDt") )]
33126	pub isse_dt: DateAndDateTime2Choice,
33127	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
33128	pub nm: Option<String>,
33129	#[cfg_attr( feature = "derive_serde", serde(rename = "LangCd", skip_serializing_if = "Option::is_none") )]
33130	pub lang_cd: Option<String>,
33131	#[cfg_attr( feature = "derive_serde", serde(rename = "Frmt") )]
33132	pub frmt: DocumentFormat1Choice,
33133	#[cfg_attr( feature = "derive_serde", serde(rename = "FileNm", skip_serializing_if = "Option::is_none") )]
33134	pub file_nm: Option<String>,
33135	#[cfg_attr( feature = "derive_serde", serde(rename = "DgtlSgntr", skip_serializing_if = "Option::is_none") )]
33136	pub dgtl_sgntr: Option<PartyAndSignature4>,
33137	#[cfg_attr( feature = "derive_serde", serde(rename = "Nclsr") )]
33138	pub nclsr: String,
33139}
33140
33141impl Document15 {
33142	pub fn validate(&self) -> Result<(), ValidationError> {
33143		self.tp.validate()?;
33144		if self.id.chars().count() < 1 {
33145			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
33146		}
33147		if self.id.chars().count() > 35 {
33148			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
33149		}
33150		self.isse_dt.validate()?;
33151		if let Some(ref val) = self.nm {
33152			if val.chars().count() < 1 {
33153				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
33154			}
33155			if val.chars().count() > 140 {
33156				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
33157			}
33158		}
33159		self.frmt.validate()?;
33160		if let Some(ref val) = self.file_nm {
33161			if val.chars().count() < 1 {
33162				return Err(ValidationError::new(1001, "file_nm is shorter than the minimum length of 1".to_string()));
33163			}
33164			if val.chars().count() > 140 {
33165				return Err(ValidationError::new(1002, "file_nm exceeds the maximum length of 140".to_string()));
33166			}
33167		}
33168		if let Some(ref val) = self.dgtl_sgntr { val.validate()? }
33169		if self.nclsr.chars().count() < 1 {
33170			return Err(ValidationError::new(1001, "nclsr is shorter than the minimum length of 1".to_string()));
33171		}
33172		if self.nclsr.chars().count() > 10485760 {
33173			return Err(ValidationError::new(1002, "nclsr exceeds the maximum length of 10485760".to_string()));
33174		}
33175		Ok(())
33176	}
33177}
33178
33179
33180// DocumentAdjustment1 ...
33181#[cfg_attr(feature = "derive_debug", derive(Debug))]
33182#[cfg_attr(feature = "derive_default", derive(Default))]
33183#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33184#[cfg_attr(feature = "derive_clone", derive(Clone))]
33185#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33186pub struct DocumentAdjustment1 {
33187	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
33188	pub amt: ActiveOrHistoricCurrencyAndAmount,
33189	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
33190	pub cdt_dbt_ind: Option<CreditDebitCode>,
33191	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
33192	pub rsn: Option<String>,
33193	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
33194	pub addtl_inf: Option<String>,
33195}
33196
33197impl DocumentAdjustment1 {
33198	pub fn validate(&self) -> Result<(), ValidationError> {
33199		self.amt.validate()?;
33200		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
33201		if let Some(ref val) = self.rsn {
33202			if val.chars().count() < 1 {
33203				return Err(ValidationError::new(1001, "rsn is shorter than the minimum length of 1".to_string()));
33204			}
33205			if val.chars().count() > 4 {
33206				return Err(ValidationError::new(1002, "rsn exceeds the maximum length of 4".to_string()));
33207			}
33208		}
33209		if let Some(ref val) = self.addtl_inf {
33210			if val.chars().count() < 1 {
33211				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
33212			}
33213			if val.chars().count() > 140 {
33214				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
33215			}
33216		}
33217		Ok(())
33218	}
33219}
33220
33221
33222// DocumentAmendment1 ...
33223#[cfg_attr(feature = "derive_debug", derive(Debug))]
33224#[cfg_attr(feature = "derive_default", derive(Default))]
33225#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33226#[cfg_attr(feature = "derive_clone", derive(Clone))]
33227#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33228pub struct DocumentAmendment1 {
33229	#[cfg_attr( feature = "derive_serde", serde(rename = "CrrctnId") )]
33230	pub crrctn_id: f64,
33231	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlDocId", skip_serializing_if = "Option::is_none") )]
33232	pub orgnl_doc_id: Option<String>,
33233}
33234
33235impl DocumentAmendment1 {
33236	pub fn validate(&self) -> Result<(), ValidationError> {
33237		if let Some(ref val) = self.orgnl_doc_id {
33238			if val.chars().count() < 1 {
33239				return Err(ValidationError::new(1001, "orgnl_doc_id is shorter than the minimum length of 1".to_string()));
33240			}
33241			if val.chars().count() > 35 {
33242				return Err(ValidationError::new(1002, "orgnl_doc_id exceeds the maximum length of 35".to_string()));
33243			}
33244		}
33245		Ok(())
33246	}
33247}
33248
33249
33250// DocumentAmount1 ...
33251#[cfg_attr(feature = "derive_debug", derive(Debug))]
33252#[cfg_attr(feature = "derive_default", derive(Default))]
33253#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33254#[cfg_attr(feature = "derive_clone", derive(Clone))]
33255#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33256pub struct DocumentAmount1 {
33257	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
33258	pub tp: DocumentAmountType1Choice,
33259	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
33260	pub amt: ActiveOrHistoricCurrencyAndAmount,
33261}
33262
33263impl DocumentAmount1 {
33264	pub fn validate(&self) -> Result<(), ValidationError> {
33265		self.tp.validate()?;
33266		self.amt.validate()?;
33267		Ok(())
33268	}
33269}
33270
33271
33272// DocumentAmountType1Choice ...
33273#[cfg_attr(feature = "derive_debug", derive(Debug))]
33274#[cfg_attr(feature = "derive_default", derive(Default))]
33275#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33276#[cfg_attr(feature = "derive_clone", derive(Clone))]
33277#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33278pub struct DocumentAmountType1Choice {
33279	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
33280	pub cd: Option<String>,
33281	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
33282	pub prtry: Option<String>,
33283}
33284
33285impl DocumentAmountType1Choice {
33286	pub fn validate(&self) -> Result<(), ValidationError> {
33287		if let Some(ref val) = self.cd {
33288			if val.chars().count() < 1 {
33289				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
33290			}
33291			if val.chars().count() > 4 {
33292				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
33293			}
33294		}
33295		if let Some(ref val) = self.prtry {
33296			if val.chars().count() < 1 {
33297				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
33298			}
33299			if val.chars().count() > 35 {
33300				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
33301			}
33302		}
33303		Ok(())
33304	}
33305}
33306
33307
33308// DocumentEntryAmendment1 ...
33309#[cfg_attr(feature = "derive_debug", derive(Debug))]
33310#[cfg_attr(feature = "derive_default", derive(Default))]
33311#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33312#[cfg_attr(feature = "derive_clone", derive(Clone))]
33313#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33314pub struct DocumentEntryAmendment1 {
33315	#[cfg_attr( feature = "derive_serde", serde(rename = "CrrctgNtryNb") )]
33316	pub crrctg_ntry_nb: f64,
33317	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlDoc") )]
33318	pub orgnl_doc: DocumentIdentification28,
33319}
33320
33321impl DocumentEntryAmendment1 {
33322	pub fn validate(&self) -> Result<(), ValidationError> {
33323		self.orgnl_doc.validate()?;
33324		Ok(())
33325	}
33326}
33327
33328
33329// DocumentFormat1Choice ...
33330#[cfg_attr(feature = "derive_debug", derive(Debug))]
33331#[cfg_attr(feature = "derive_default", derive(Default))]
33332#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33333#[cfg_attr(feature = "derive_clone", derive(Clone))]
33334#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33335pub struct DocumentFormat1Choice {
33336	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
33337	pub cd: Option<String>,
33338	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
33339	pub prtry: Option<GenericIdentification1>,
33340}
33341
33342impl DocumentFormat1Choice {
33343	pub fn validate(&self) -> Result<(), ValidationError> {
33344		if let Some(ref val) = self.cd {
33345			if val.chars().count() < 1 {
33346				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
33347			}
33348			if val.chars().count() > 4 {
33349				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
33350			}
33351		}
33352		if let Some(ref val) = self.prtry { val.validate()? }
33353		Ok(())
33354	}
33355}
33356
33357
33358// DocumentFormat2Choice ...
33359#[cfg_attr(feature = "derive_debug", derive(Debug))]
33360#[cfg_attr(feature = "derive_default", derive(Default))]
33361#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33362#[cfg_attr(feature = "derive_clone", derive(Clone))]
33363#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33364pub struct DocumentFormat2Choice {
33365	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
33366	pub cd: Option<String>,
33367	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
33368	pub prtry: Option<GenericIdentification1>,
33369}
33370
33371impl DocumentFormat2Choice {
33372	pub fn validate(&self) -> Result<(), ValidationError> {
33373		if let Some(ref val) = self.cd {
33374			if val.chars().count() < 1 {
33375				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
33376			}
33377			if val.chars().count() > 4 {
33378				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
33379			}
33380		}
33381		if let Some(ref val) = self.prtry { val.validate()? }
33382		Ok(())
33383	}
33384}
33385
33386
33387// DocumentGeneralInformation2 ...
33388#[cfg_attr(feature = "derive_debug", derive(Debug))]
33389#[cfg_attr(feature = "derive_default", derive(Default))]
33390#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33391#[cfg_attr(feature = "derive_clone", derive(Clone))]
33392#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33393pub struct DocumentGeneralInformation2 {
33394	#[cfg_attr( feature = "derive_serde", serde(rename = "DocTp") )]
33395	pub doc_tp: String,
33396	#[cfg_attr( feature = "derive_serde", serde(rename = "DocNb") )]
33397	pub doc_nb: String,
33398	#[cfg_attr( feature = "derive_serde", serde(rename = "SndrRcvrSeqId", skip_serializing_if = "Option::is_none") )]
33399	pub sndr_rcvr_seq_id: Option<String>,
33400	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseDt", skip_serializing_if = "Option::is_none") )]
33401	pub isse_dt: Option<String>,
33402	#[cfg_attr( feature = "derive_serde", serde(rename = "URL", skip_serializing_if = "Option::is_none") )]
33403	pub url: Option<String>,
33404	#[cfg_attr( feature = "derive_serde", serde(rename = "AttchdBinryFile", skip_serializing_if = "Option::is_none") )]
33405	pub attchd_binry_file: Option<Vec<BinaryFile1>>,
33406}
33407
33408impl DocumentGeneralInformation2 {
33409	pub fn validate(&self) -> Result<(), ValidationError> {
33410		if self.doc_tp.chars().count() < 1 {
33411			return Err(ValidationError::new(1001, "doc_tp is shorter than the minimum length of 1".to_string()));
33412		}
33413		if self.doc_tp.chars().count() > 4 {
33414			return Err(ValidationError::new(1002, "doc_tp exceeds the maximum length of 4".to_string()));
33415		}
33416		if self.doc_nb.chars().count() < 1 {
33417			return Err(ValidationError::new(1001, "doc_nb is shorter than the minimum length of 1".to_string()));
33418		}
33419		if self.doc_nb.chars().count() > 35 {
33420			return Err(ValidationError::new(1002, "doc_nb exceeds the maximum length of 35".to_string()));
33421		}
33422		if let Some(ref val) = self.sndr_rcvr_seq_id {
33423			if val.chars().count() < 1 {
33424				return Err(ValidationError::new(1001, "sndr_rcvr_seq_id is shorter than the minimum length of 1".to_string()));
33425			}
33426			if val.chars().count() > 140 {
33427				return Err(ValidationError::new(1002, "sndr_rcvr_seq_id exceeds the maximum length of 140".to_string()));
33428			}
33429		}
33430		if let Some(ref val) = self.url {
33431			if val.chars().count() < 1 {
33432				return Err(ValidationError::new(1001, "url is shorter than the minimum length of 1".to_string()));
33433			}
33434			if val.chars().count() > 256 {
33435				return Err(ValidationError::new(1002, "url exceeds the maximum length of 256".to_string()));
33436			}
33437		}
33438		if let Some(ref vec) = self.attchd_binry_file { for item in vec { item.validate()? } }
33439		Ok(())
33440	}
33441}
33442
33443
33444// DocumentGeneralInformation5 ...
33445#[cfg_attr(feature = "derive_debug", derive(Debug))]
33446#[cfg_attr(feature = "derive_default", derive(Default))]
33447#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33448#[cfg_attr(feature = "derive_clone", derive(Clone))]
33449#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33450pub struct DocumentGeneralInformation5 {
33451	#[cfg_attr( feature = "derive_serde", serde(rename = "DocTp") )]
33452	pub doc_tp: String,
33453	#[cfg_attr( feature = "derive_serde", serde(rename = "DocNb") )]
33454	pub doc_nb: String,
33455	#[cfg_attr( feature = "derive_serde", serde(rename = "DocNm", skip_serializing_if = "Option::is_none") )]
33456	pub doc_nm: Option<String>,
33457	#[cfg_attr( feature = "derive_serde", serde(rename = "SndrRcvrSeqId", skip_serializing_if = "Option::is_none") )]
33458	pub sndr_rcvr_seq_id: Option<String>,
33459	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseDt", skip_serializing_if = "Option::is_none") )]
33460	pub isse_dt: Option<String>,
33461	#[cfg_attr( feature = "derive_serde", serde(rename = "URL", skip_serializing_if = "Option::is_none") )]
33462	pub url: Option<String>,
33463	#[cfg_attr( feature = "derive_serde", serde(rename = "LkFileHash", skip_serializing_if = "Option::is_none") )]
33464	pub lk_file_hash: Option<SignatureEnvelopeReference>,
33465	#[cfg_attr( feature = "derive_serde", serde(rename = "AttchdBinryFile") )]
33466	pub attchd_binry_file: BinaryFile1,
33467}
33468
33469impl DocumentGeneralInformation5 {
33470	pub fn validate(&self) -> Result<(), ValidationError> {
33471		if self.doc_tp.chars().count() < 1 {
33472			return Err(ValidationError::new(1001, "doc_tp is shorter than the minimum length of 1".to_string()));
33473		}
33474		if self.doc_tp.chars().count() > 4 {
33475			return Err(ValidationError::new(1002, "doc_tp exceeds the maximum length of 4".to_string()));
33476		}
33477		if self.doc_nb.chars().count() < 1 {
33478			return Err(ValidationError::new(1001, "doc_nb is shorter than the minimum length of 1".to_string()));
33479		}
33480		if self.doc_nb.chars().count() > 35 {
33481			return Err(ValidationError::new(1002, "doc_nb exceeds the maximum length of 35".to_string()));
33482		}
33483		if let Some(ref val) = self.doc_nm {
33484			if val.chars().count() < 1 {
33485				return Err(ValidationError::new(1001, "doc_nm is shorter than the minimum length of 1".to_string()));
33486			}
33487			if val.chars().count() > 140 {
33488				return Err(ValidationError::new(1002, "doc_nm exceeds the maximum length of 140".to_string()));
33489			}
33490		}
33491		if let Some(ref val) = self.sndr_rcvr_seq_id {
33492			if val.chars().count() < 1 {
33493				return Err(ValidationError::new(1001, "sndr_rcvr_seq_id is shorter than the minimum length of 1".to_string()));
33494			}
33495			if val.chars().count() > 140 {
33496				return Err(ValidationError::new(1002, "sndr_rcvr_seq_id exceeds the maximum length of 140".to_string()));
33497			}
33498		}
33499		if let Some(ref val) = self.url {
33500			if val.chars().count() < 1 {
33501				return Err(ValidationError::new(1001, "url is shorter than the minimum length of 1".to_string()));
33502			}
33503			if val.chars().count() > 256 {
33504				return Err(ValidationError::new(1002, "url exceeds the maximum length of 256".to_string()));
33505			}
33506		}
33507		if let Some(ref val) = self.lk_file_hash { val.validate()? }
33508		self.attchd_binry_file.validate()?;
33509		Ok(())
33510	}
33511}
33512
33513
33514// DocumentIdentification22 ...
33515#[cfg_attr(feature = "derive_debug", derive(Debug))]
33516#[cfg_attr(feature = "derive_default", derive(Default))]
33517#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33518#[cfg_attr(feature = "derive_clone", derive(Clone))]
33519#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33520pub struct DocumentIdentification22 {
33521	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
33522	pub id: String,
33523	#[cfg_attr( feature = "derive_serde", serde(rename = "DtOfIsse", skip_serializing_if = "Option::is_none") )]
33524	pub dt_of_isse: Option<String>,
33525}
33526
33527impl DocumentIdentification22 {
33528	pub fn validate(&self) -> Result<(), ValidationError> {
33529		if self.id.chars().count() < 1 {
33530			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
33531		}
33532		if self.id.chars().count() > 35 {
33533			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
33534		}
33535		Ok(())
33536	}
33537}
33538
33539
33540// DocumentIdentification28 ...
33541#[cfg_attr(feature = "derive_debug", derive(Debug))]
33542#[cfg_attr(feature = "derive_default", derive(Default))]
33543#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33544#[cfg_attr(feature = "derive_clone", derive(Clone))]
33545#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33546pub struct DocumentIdentification28 {
33547	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
33548	pub id: Option<String>,
33549	#[cfg_attr( feature = "derive_serde", serde(rename = "DtOfIsse") )]
33550	pub dt_of_isse: String,
33551}
33552
33553impl DocumentIdentification28 {
33554	pub fn validate(&self) -> Result<(), ValidationError> {
33555		if let Some(ref val) = self.id {
33556			if val.chars().count() < 1 {
33557				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
33558			}
33559			if val.chars().count() > 35 {
33560				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
33561			}
33562		}
33563		Ok(())
33564	}
33565}
33566
33567
33568// DocumentIdentification29 ...
33569#[cfg_attr(feature = "derive_debug", derive(Debug))]
33570#[cfg_attr(feature = "derive_default", derive(Default))]
33571#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33572#[cfg_attr(feature = "derive_clone", derive(Clone))]
33573#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33574pub struct DocumentIdentification29 {
33575	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
33576	pub id: String,
33577	#[cfg_attr( feature = "derive_serde", serde(rename = "DtOfIsse") )]
33578	pub dt_of_isse: String,
33579}
33580
33581impl DocumentIdentification29 {
33582	pub fn validate(&self) -> Result<(), ValidationError> {
33583		if self.id.chars().count() < 1 {
33584			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
33585		}
33586		if self.id.chars().count() > 35 {
33587			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
33588		}
33589		Ok(())
33590	}
33591}
33592
33593
33594// DocumentIdentification35 ...
33595#[cfg_attr(feature = "derive_debug", derive(Debug))]
33596#[cfg_attr(feature = "derive_default", derive(Default))]
33597#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33598#[cfg_attr(feature = "derive_clone", derive(Clone))]
33599#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33600pub struct DocumentIdentification35 {
33601	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
33602	pub id: Option<String>,
33603	#[cfg_attr( feature = "derive_serde", serde(rename = "DtOfIsse", skip_serializing_if = "Option::is_none") )]
33604	pub dt_of_isse: Option<String>,
33605}
33606
33607impl DocumentIdentification35 {
33608	pub fn validate(&self) -> Result<(), ValidationError> {
33609		if let Some(ref val) = self.id {
33610			if val.chars().count() < 1 {
33611				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
33612			}
33613			if val.chars().count() > 35 {
33614				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
33615			}
33616		}
33617		Ok(())
33618	}
33619}
33620
33621
33622// DocumentIdentification51 ...
33623#[cfg_attr(feature = "derive_debug", derive(Debug))]
33624#[cfg_attr(feature = "derive_default", derive(Default))]
33625#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33626#[cfg_attr(feature = "derive_clone", derive(Clone))]
33627#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33628pub struct DocumentIdentification51 {
33629	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
33630	pub id: String,
33631	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
33632	pub cre_dt_tm: Option<DateAndDateTime2Choice>,
33633	#[cfg_attr( feature = "derive_serde", serde(rename = "CpyDplct", skip_serializing_if = "Option::is_none") )]
33634	pub cpy_dplct: Option<CopyDuplicate1Code>,
33635	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgOrgtr", skip_serializing_if = "Option::is_none") )]
33636	pub msg_orgtr: Option<PartyIdentification136>,
33637	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgRcpt", skip_serializing_if = "Option::is_none") )]
33638	pub msg_rcpt: Option<PartyIdentification136>,
33639}
33640
33641impl DocumentIdentification51 {
33642	pub fn validate(&self) -> Result<(), ValidationError> {
33643		if self.id.chars().count() < 1 {
33644			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
33645		}
33646		if self.id.chars().count() > 35 {
33647			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
33648		}
33649		if let Some(ref val) = self.cre_dt_tm { val.validate()? }
33650		if let Some(ref val) = self.cpy_dplct { val.validate()? }
33651		if let Some(ref val) = self.msg_orgtr { val.validate()? }
33652		if let Some(ref val) = self.msg_rcpt { val.validate()? }
33653		Ok(())
33654	}
33655}
33656
33657
33658// DocumentLineIdentification1 ...
33659#[cfg_attr(feature = "derive_debug", derive(Debug))]
33660#[cfg_attr(feature = "derive_default", derive(Default))]
33661#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33662#[cfg_attr(feature = "derive_clone", derive(Clone))]
33663#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33664pub struct DocumentLineIdentification1 {
33665	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
33666	pub tp: Option<DocumentLineType1>,
33667	#[cfg_attr( feature = "derive_serde", serde(rename = "Nb", skip_serializing_if = "Option::is_none") )]
33668	pub nb: Option<String>,
33669	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdDt", skip_serializing_if = "Option::is_none") )]
33670	pub rltd_dt: Option<String>,
33671}
33672
33673impl DocumentLineIdentification1 {
33674	pub fn validate(&self) -> Result<(), ValidationError> {
33675		if let Some(ref val) = self.tp { val.validate()? }
33676		if let Some(ref val) = self.nb {
33677			if val.chars().count() < 1 {
33678				return Err(ValidationError::new(1001, "nb is shorter than the minimum length of 1".to_string()));
33679			}
33680			if val.chars().count() > 35 {
33681				return Err(ValidationError::new(1002, "nb exceeds the maximum length of 35".to_string()));
33682			}
33683		}
33684		Ok(())
33685	}
33686}
33687
33688
33689// DocumentLineInformation1 ...
33690#[cfg_attr(feature = "derive_debug", derive(Debug))]
33691#[cfg_attr(feature = "derive_default", derive(Default))]
33692#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33693#[cfg_attr(feature = "derive_clone", derive(Clone))]
33694#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33695pub struct DocumentLineInformation1 {
33696	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
33697	pub id: Vec<DocumentLineIdentification1>,
33698	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
33699	pub desc: Option<String>,
33700	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
33701	pub amt: Option<RemittanceAmount3>,
33702}
33703
33704impl DocumentLineInformation1 {
33705	pub fn validate(&self) -> Result<(), ValidationError> {
33706		for item in &self.id { item.validate()? }
33707		if let Some(ref val) = self.desc {
33708			if val.chars().count() < 1 {
33709				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
33710			}
33711			if val.chars().count() > 2048 {
33712				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 2048".to_string()));
33713			}
33714		}
33715		if let Some(ref val) = self.amt { val.validate()? }
33716		Ok(())
33717	}
33718}
33719
33720
33721// DocumentLineInformation2 ...
33722#[cfg_attr(feature = "derive_debug", derive(Debug))]
33723#[cfg_attr(feature = "derive_default", derive(Default))]
33724#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33725#[cfg_attr(feature = "derive_clone", derive(Clone))]
33726#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33727pub struct DocumentLineInformation2 {
33728	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
33729	pub id: Vec<DocumentLineIdentification1>,
33730	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
33731	pub desc: Option<String>,
33732	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
33733	pub amt: Option<RemittanceAmount4>,
33734}
33735
33736impl DocumentLineInformation2 {
33737	pub fn validate(&self) -> Result<(), ValidationError> {
33738		for item in &self.id { item.validate()? }
33739		if let Some(ref val) = self.desc {
33740			if val.chars().count() < 1 {
33741				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
33742			}
33743			if val.chars().count() > 2048 {
33744				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 2048".to_string()));
33745			}
33746		}
33747		if let Some(ref val) = self.amt { val.validate()? }
33748		Ok(())
33749	}
33750}
33751
33752
33753// DocumentLineType1 ...
33754#[cfg_attr(feature = "derive_debug", derive(Debug))]
33755#[cfg_attr(feature = "derive_default", derive(Default))]
33756#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33757#[cfg_attr(feature = "derive_clone", derive(Clone))]
33758#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33759pub struct DocumentLineType1 {
33760	#[cfg_attr( feature = "derive_serde", serde(rename = "CdOrPrtry") )]
33761	pub cd_or_prtry: DocumentLineType1Choice,
33762	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
33763	pub issr: Option<String>,
33764}
33765
33766impl DocumentLineType1 {
33767	pub fn validate(&self) -> Result<(), ValidationError> {
33768		self.cd_or_prtry.validate()?;
33769		if let Some(ref val) = self.issr {
33770			if val.chars().count() < 1 {
33771				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
33772			}
33773			if val.chars().count() > 35 {
33774				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
33775			}
33776		}
33777		Ok(())
33778	}
33779}
33780
33781
33782// DocumentLineType1Choice ...
33783#[cfg_attr(feature = "derive_debug", derive(Debug))]
33784#[cfg_attr(feature = "derive_default", derive(Default))]
33785#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33786#[cfg_attr(feature = "derive_clone", derive(Clone))]
33787#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33788pub struct DocumentLineType1Choice {
33789	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
33790	pub cd: Option<String>,
33791	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
33792	pub prtry: Option<String>,
33793}
33794
33795impl DocumentLineType1Choice {
33796	pub fn validate(&self) -> Result<(), ValidationError> {
33797		if let Some(ref val) = self.cd {
33798			if val.chars().count() < 1 {
33799				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
33800			}
33801			if val.chars().count() > 4 {
33802				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
33803			}
33804		}
33805		if let Some(ref val) = self.prtry {
33806			if val.chars().count() < 1 {
33807				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
33808			}
33809			if val.chars().count() > 35 {
33810				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
33811			}
33812		}
33813		Ok(())
33814	}
33815}
33816
33817
33818// DocumentNumber5Choice ...
33819#[cfg_attr(feature = "derive_debug", derive(Debug))]
33820#[cfg_attr(feature = "derive_default", derive(Default))]
33821#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33822#[cfg_attr(feature = "derive_clone", derive(Clone))]
33823#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33824pub struct DocumentNumber5Choice {
33825	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtNb", skip_serializing_if = "Option::is_none") )]
33826	pub shrt_nb: Option<String>,
33827	#[cfg_attr( feature = "derive_serde", serde(rename = "LngNb", skip_serializing_if = "Option::is_none") )]
33828	pub lng_nb: Option<String>,
33829	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryNb", skip_serializing_if = "Option::is_none") )]
33830	pub prtry_nb: Option<GenericIdentification36>,
33831}
33832
33833impl DocumentNumber5Choice {
33834	pub fn validate(&self) -> Result<(), ValidationError> {
33835		if let Some(ref val) = self.shrt_nb {
33836			let pattern = Regex::new("[0-9]{3}").unwrap();
33837			if !pattern.is_match(val) {
33838				return Err(ValidationError::new(1005, "shrt_nb does not match the required pattern".to_string()));
33839			}
33840		}
33841		if let Some(ref val) = self.lng_nb {
33842			let pattern = Regex::new("[a-z]{4}\\.[0-9]{3}\\.[0-9]{3}\\.[0-9]{2}").unwrap();
33843			if !pattern.is_match(val) {
33844				return Err(ValidationError::new(1005, "lng_nb does not match the required pattern".to_string()));
33845			}
33846		}
33847		if let Some(ref val) = self.prtry_nb { val.validate()? }
33848		Ok(())
33849	}
33850}
33851
33852
33853// DocumentToSend4 ...
33854#[cfg_attr(feature = "derive_debug", derive(Debug))]
33855#[cfg_attr(feature = "derive_default", derive(Default))]
33856#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33857#[cfg_attr(feature = "derive_clone", derive(Clone))]
33858#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33859pub struct DocumentToSend4 {
33860	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
33861	pub tp: String,
33862	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcpt") )]
33863	pub rcpt: PartyIdentification125Choice,
33864	#[cfg_attr( feature = "derive_serde", serde(rename = "MtdOfTrnsmssn") )]
33865	pub mtd_of_trnsmssn: CommunicationMethod3Choice,
33866}
33867
33868impl DocumentToSend4 {
33869	pub fn validate(&self) -> Result<(), ValidationError> {
33870		if self.tp.chars().count() < 1 {
33871			return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
33872		}
33873		if self.tp.chars().count() > 140 {
33874			return Err(ValidationError::new(1002, "tp exceeds the maximum length of 140".to_string()));
33875		}
33876		self.rcpt.validate()?;
33877		self.mtd_of_trnsmssn.validate()?;
33878		Ok(())
33879	}
33880}
33881
33882
33883// DocumentType1 ...
33884#[cfg_attr(feature = "derive_debug", derive(Debug))]
33885#[cfg_attr(feature = "derive_default", derive(Default))]
33886#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33887#[cfg_attr(feature = "derive_clone", derive(Clone))]
33888#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33889pub struct DocumentType1 {
33890	#[cfg_attr( feature = "derive_serde", serde(rename = "CdOrPrtry") )]
33891	pub cd_or_prtry: DocumentType2Choice,
33892	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
33893	pub issr: Option<String>,
33894}
33895
33896impl DocumentType1 {
33897	pub fn validate(&self) -> Result<(), ValidationError> {
33898		self.cd_or_prtry.validate()?;
33899		if let Some(ref val) = self.issr {
33900			if val.chars().count() < 1 {
33901				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
33902			}
33903			if val.chars().count() > 35 {
33904				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
33905			}
33906		}
33907		Ok(())
33908	}
33909}
33910
33911
33912// DocumentType1Choice ...
33913#[cfg_attr(feature = "derive_debug", derive(Debug))]
33914#[cfg_attr(feature = "derive_default", derive(Default))]
33915#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33916#[cfg_attr(feature = "derive_clone", derive(Clone))]
33917#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33918pub struct DocumentType1Choice {
33919	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
33920	pub cd: Option<String>,
33921	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
33922	pub prtry: Option<GenericIdentification1>,
33923}
33924
33925impl DocumentType1Choice {
33926	pub fn validate(&self) -> Result<(), ValidationError> {
33927		if let Some(ref val) = self.cd {
33928			if val.chars().count() < 1 {
33929				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
33930			}
33931			if val.chars().count() > 4 {
33932				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
33933			}
33934		}
33935		if let Some(ref val) = self.prtry { val.validate()? }
33936		Ok(())
33937	}
33938}
33939
33940
33941// DocumentType2Choice ...
33942#[cfg_attr(feature = "derive_debug", derive(Debug))]
33943#[cfg_attr(feature = "derive_default", derive(Default))]
33944#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33945#[cfg_attr(feature = "derive_clone", derive(Clone))]
33946#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33947pub struct DocumentType2Choice {
33948	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
33949	pub cd: Option<String>,
33950	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
33951	pub prtry: Option<String>,
33952}
33953
33954impl DocumentType2Choice {
33955	pub fn validate(&self) -> Result<(), ValidationError> {
33956		if let Some(ref val) = self.cd {
33957			if val.chars().count() < 1 {
33958				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
33959			}
33960			if val.chars().count() > 4 {
33961				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
33962			}
33963		}
33964		if let Some(ref val) = self.prtry {
33965			if val.chars().count() < 1 {
33966				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
33967			}
33968			if val.chars().count() > 35 {
33969				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
33970			}
33971		}
33972		Ok(())
33973	}
33974}
33975
33976
33977// DocumentType3Code ...
33978#[cfg_attr(feature = "derive_debug", derive(Debug))]
33979#[cfg_attr(feature = "derive_default", derive(Default))]
33980#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
33981#[cfg_attr(feature = "derive_clone", derive(Clone))]
33982#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
33983pub enum DocumentType3Code {
33984	#[cfg_attr(feature = "derive_default", default)]
33985	#[cfg_attr( feature = "derive_serde", serde(rename = "RADM") )]
33986	CodeRADM,
33987	#[cfg_attr( feature = "derive_serde", serde(rename = "RPIN") )]
33988	CodeRPIN,
33989	#[cfg_attr( feature = "derive_serde", serde(rename = "FXDR") )]
33990	CodeFXDR,
33991	#[cfg_attr( feature = "derive_serde", serde(rename = "DISP") )]
33992	CodeDISP,
33993	#[cfg_attr( feature = "derive_serde", serde(rename = "PUOR") )]
33994	CodePUOR,
33995	#[cfg_attr( feature = "derive_serde", serde(rename = "SCOR") )]
33996	CodeSCOR,
33997}
33998
33999impl DocumentType3Code {
34000	pub fn validate(&self) -> Result<(), ValidationError> {
34001		Ok(())
34002	}
34003}
34004
34005
34006// DocumentType6Code ...
34007#[cfg_attr(feature = "derive_debug", derive(Debug))]
34008#[cfg_attr(feature = "derive_default", derive(Default))]
34009#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34010#[cfg_attr(feature = "derive_clone", derive(Clone))]
34011#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34012pub enum DocumentType6Code {
34013	#[cfg_attr(feature = "derive_default", default)]
34014	#[cfg_attr( feature = "derive_serde", serde(rename = "MSIN") )]
34015	CodeMSIN,
34016	#[cfg_attr( feature = "derive_serde", serde(rename = "CNFA") )]
34017	CodeCNFA,
34018	#[cfg_attr( feature = "derive_serde", serde(rename = "DNFA") )]
34019	CodeDNFA,
34020	#[cfg_attr( feature = "derive_serde", serde(rename = "CINV") )]
34021	CodeCINV,
34022	#[cfg_attr( feature = "derive_serde", serde(rename = "CREN") )]
34023	CodeCREN,
34024	#[cfg_attr( feature = "derive_serde", serde(rename = "DEBN") )]
34025	CodeDEBN,
34026	#[cfg_attr( feature = "derive_serde", serde(rename = "HIRI") )]
34027	CodeHIRI,
34028	#[cfg_attr( feature = "derive_serde", serde(rename = "SBIN") )]
34029	CodeSBIN,
34030	#[cfg_attr( feature = "derive_serde", serde(rename = "CMCN") )]
34031	CodeCMCN,
34032	#[cfg_attr( feature = "derive_serde", serde(rename = "SOAC") )]
34033	CodeSOAC,
34034	#[cfg_attr( feature = "derive_serde", serde(rename = "DISP") )]
34035	CodeDISP,
34036	#[cfg_attr( feature = "derive_serde", serde(rename = "BOLD") )]
34037	CodeBOLD,
34038	#[cfg_attr( feature = "derive_serde", serde(rename = "VCHR") )]
34039	CodeVCHR,
34040	#[cfg_attr( feature = "derive_serde", serde(rename = "AROI") )]
34041	CodeAROI,
34042	#[cfg_attr( feature = "derive_serde", serde(rename = "TSUT") )]
34043	CodeTSUT,
34044	#[cfg_attr( feature = "derive_serde", serde(rename = "PUOR") )]
34045	CodePUOR,
34046}
34047
34048impl DocumentType6Code {
34049	pub fn validate(&self) -> Result<(), ValidationError> {
34050		Ok(())
34051	}
34052}
34053
34054
34055// DueDate1 ...
34056#[cfg_attr(feature = "derive_debug", derive(Debug))]
34057#[cfg_attr(feature = "derive_default", derive(Default))]
34058#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34059#[cfg_attr(feature = "derive_clone", derive(Clone))]
34060#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34061pub struct DueDate1 {
34062	#[cfg_attr( feature = "derive_serde", serde(rename = "DueDt", skip_serializing_if = "Option::is_none") )]
34063	pub due_dt: Option<String>,
34064	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
34065	pub addtl_inf: Option<String>,
34066}
34067
34068impl DueDate1 {
34069	pub fn validate(&self) -> Result<(), ValidationError> {
34070		if let Some(ref val) = self.addtl_inf {
34071			if val.chars().count() < 1 {
34072				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
34073			}
34074			if val.chars().count() > 140 {
34075				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
34076			}
34077		}
34078		Ok(())
34079	}
34080}
34081
34082
34083// DurationType1Code ...
34084#[cfg_attr(feature = "derive_debug", derive(Debug))]
34085#[cfg_attr(feature = "derive_default", derive(Default))]
34086#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34087#[cfg_attr(feature = "derive_clone", derive(Clone))]
34088#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34089pub enum DurationType1Code {
34090	#[cfg_attr(feature = "derive_default", default)]
34091	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
34092	CodeYEAR,
34093	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
34094	CodeWEEK,
34095	#[cfg_attr( feature = "derive_serde", serde(rename = "SEAS") )]
34096	CodeSEAS,
34097	#[cfg_attr( feature = "derive_serde", serde(rename = "QURT") )]
34098	CodeQURT,
34099	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
34100	CodeMNTH,
34101	#[cfg_attr( feature = "derive_serde", serde(rename = "MNUT") )]
34102	CodeMNUT,
34103	#[cfg_attr( feature = "derive_serde", serde(rename = "HOUR") )]
34104	CodeHOUR,
34105	#[cfg_attr( feature = "derive_serde", serde(rename = "DASD") )]
34106	CodeDASD,
34107	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
34108	CodeOTHR,
34109}
34110
34111impl DurationType1Code {
34112	pub fn validate(&self) -> Result<(), ValidationError> {
34113		Ok(())
34114	}
34115}
34116
34117
34118// EMTDataReportingVFMUKType1Code ...
34119#[cfg_attr(feature = "derive_debug", derive(Debug))]
34120#[cfg_attr(feature = "derive_default", derive(Default))]
34121#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34122#[cfg_attr(feature = "derive_clone", derive(Clone))]
34123#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34124pub enum EMTDataReportingVFMUKType1Code {
34125	#[cfg_attr(feature = "derive_default", default)]
34126	#[cfg_attr( feature = "derive_serde", serde(rename = "YSCO") )]
34127	CodeYSCO,
34128}
34129
34130impl EMTDataReportingVFMUKType1Code {
34131	pub fn validate(&self) -> Result<(), ValidationError> {
34132		Ok(())
34133	}
34134}
34135
34136
34137// EUCapitalGain2Code ...
34138#[cfg_attr(feature = "derive_debug", derive(Debug))]
34139#[cfg_attr(feature = "derive_default", derive(Default))]
34140#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34141#[cfg_attr(feature = "derive_clone", derive(Clone))]
34142#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34143pub enum EUCapitalGain2Code {
34144	#[cfg_attr(feature = "derive_default", default)]
34145	#[cfg_attr( feature = "derive_serde", serde(rename = "EUSI") )]
34146	CodeEUSI,
34147	#[cfg_attr( feature = "derive_serde", serde(rename = "EUSO") )]
34148	CodeEUSO,
34149	#[cfg_attr( feature = "derive_serde", serde(rename = "UKWN") )]
34150	CodeUKWN,
34151}
34152
34153impl EUCapitalGain2Code {
34154	pub fn validate(&self) -> Result<(), ValidationError> {
34155		Ok(())
34156	}
34157}
34158
34159
34160// EUDividendStatus1Code ...
34161#[cfg_attr(feature = "derive_debug", derive(Debug))]
34162#[cfg_attr(feature = "derive_default", derive(Default))]
34163#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34164#[cfg_attr(feature = "derive_clone", derive(Clone))]
34165#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34166pub enum EUDividendStatus1Code {
34167	#[cfg_attr(feature = "derive_default", default)]
34168	#[cfg_attr( feature = "derive_serde", serde(rename = "DIVI") )]
34169	CodeDIVI,
34170	#[cfg_attr( feature = "derive_serde", serde(rename = "DIVO") )]
34171	CodeDIVO,
34172	#[cfg_attr( feature = "derive_serde", serde(rename = "UKWN") )]
34173	CodeUKWN,
34174}
34175
34176impl EUDividendStatus1Code {
34177	pub fn validate(&self) -> Result<(), ValidationError> {
34178		Ok(())
34179	}
34180}
34181
34182
34183// EUSavingsDirective1Code ...
34184#[cfg_attr(feature = "derive_debug", derive(Debug))]
34185#[cfg_attr(feature = "derive_default", derive(Default))]
34186#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34187#[cfg_attr(feature = "derive_clone", derive(Clone))]
34188#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34189pub enum EUSavingsDirective1Code {
34190	#[cfg_attr(feature = "derive_default", default)]
34191	#[cfg_attr( feature = "derive_serde", serde(rename = "EUSI") )]
34192	CodeEUSI,
34193	#[cfg_attr( feature = "derive_serde", serde(rename = "EUSO") )]
34194	CodeEUSO,
34195	#[cfg_attr( feature = "derive_serde", serde(rename = "VARI") )]
34196	CodeVARI,
34197}
34198
34199impl EUSavingsDirective1Code {
34200	pub fn validate(&self) -> Result<(), ValidationError> {
34201		Ok(())
34202	}
34203}
34204
34205
34206// EarlyPayment1 ...
34207#[cfg_attr(feature = "derive_debug", derive(Debug))]
34208#[cfg_attr(feature = "derive_default", derive(Default))]
34209#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34210#[cfg_attr(feature = "derive_clone", derive(Clone))]
34211#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34212pub struct EarlyPayment1 {
34213	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlyPmtDt") )]
34214	pub early_pmt_dt: String,
34215	#[cfg_attr( feature = "derive_serde", serde(rename = "DscntPct") )]
34216	pub dscnt_pct: f64,
34217	#[cfg_attr( feature = "derive_serde", serde(rename = "DscntAmt") )]
34218	pub dscnt_amt: CurrencyAndAmount,
34219	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlyPmtTaxSpcfctn", skip_serializing_if = "Option::is_none") )]
34220	pub early_pmt_tax_spcfctn: Option<Vec<EarlyPaymentsVAT1>>,
34221	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlyPmtTaxTtl", skip_serializing_if = "Option::is_none") )]
34222	pub early_pmt_tax_ttl: Option<CurrencyAndAmount>,
34223	#[cfg_attr( feature = "derive_serde", serde(rename = "DuePyblAmtWthEarlyPmt", skip_serializing_if = "Option::is_none") )]
34224	pub due_pybl_amt_wth_early_pmt: Option<CurrencyAndAmount>,
34225}
34226
34227impl EarlyPayment1 {
34228	pub fn validate(&self) -> Result<(), ValidationError> {
34229		self.dscnt_amt.validate()?;
34230		if let Some(ref vec) = self.early_pmt_tax_spcfctn { for item in vec { item.validate()? } }
34231		if let Some(ref val) = self.early_pmt_tax_ttl { val.validate()? }
34232		if let Some(ref val) = self.due_pybl_amt_wth_early_pmt { val.validate()? }
34233		Ok(())
34234	}
34235}
34236
34237
34238// EarlyPaymentsVAT1 ...
34239#[cfg_attr(feature = "derive_debug", derive(Debug))]
34240#[cfg_attr(feature = "derive_default", derive(Default))]
34241#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34242#[cfg_attr(feature = "derive_clone", derive(Clone))]
34243#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34244pub struct EarlyPaymentsVAT1 {
34245	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRate") )]
34246	pub tax_rate: f64,
34247	#[cfg_attr( feature = "derive_serde", serde(rename = "DscntTaxTp") )]
34248	pub dscnt_tax_tp: String,
34249	#[cfg_attr( feature = "derive_serde", serde(rename = "DscntTaxAmt") )]
34250	pub dscnt_tax_amt: CurrencyAndAmount,
34251}
34252
34253impl EarlyPaymentsVAT1 {
34254	pub fn validate(&self) -> Result<(), ValidationError> {
34255		if self.dscnt_tax_tp.chars().count() < 1 {
34256			return Err(ValidationError::new(1001, "dscnt_tax_tp is shorter than the minimum length of 1".to_string()));
34257		}
34258		if self.dscnt_tax_tp.chars().count() > 4 {
34259			return Err(ValidationError::new(1002, "dscnt_tax_tp exceeds the maximum length of 4".to_string()));
34260		}
34261		self.dscnt_tax_amt.validate()?;
34262		Ok(())
34263	}
34264}
34265
34266
34267// EffectiveDate1 ...
34268#[cfg_attr(feature = "derive_debug", derive(Debug))]
34269#[cfg_attr(feature = "derive_default", derive(Default))]
34270#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34271#[cfg_attr(feature = "derive_clone", derive(Clone))]
34272#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34273pub struct EffectiveDate1 {
34274	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvDt") )]
34275	pub fctv_dt: String,
34276	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvDtParam", skip_serializing_if = "Option::is_none") )]
34277	pub fctv_dt_param: Option<String>,
34278}
34279
34280impl EffectiveDate1 {
34281	pub fn validate(&self) -> Result<(), ValidationError> {
34282		if let Some(ref val) = self.fctv_dt_param {
34283			if val.chars().count() < 1 {
34284				return Err(ValidationError::new(1001, "fctv_dt_param is shorter than the minimum length of 1".to_string()));
34285			}
34286			if val.chars().count() > 4 {
34287				return Err(ValidationError::new(1002, "fctv_dt_param exceeds the maximum length of 4".to_string()));
34288			}
34289		}
34290		Ok(())
34291	}
34292}
34293
34294
34295// ElectronicInvoice1 ...
34296#[cfg_attr(feature = "derive_debug", derive(Debug))]
34297#[cfg_attr(feature = "derive_default", derive(Default))]
34298#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34299#[cfg_attr(feature = "derive_clone", derive(Clone))]
34300#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34301pub struct ElectronicInvoice1 {
34302	#[cfg_attr( feature = "derive_serde", serde(rename = "PresntmntTp") )]
34303	pub presntmnt_tp: PresentmentType1Code,
34304}
34305
34306impl ElectronicInvoice1 {
34307	pub fn validate(&self) -> Result<(), ValidationError> {
34308		self.presntmnt_tp.validate()?;
34309		Ok(())
34310	}
34311}
34312
34313
34314// Eligible1Code ...
34315#[cfg_attr(feature = "derive_debug", derive(Debug))]
34316#[cfg_attr(feature = "derive_default", derive(Default))]
34317#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34318#[cfg_attr(feature = "derive_clone", derive(Clone))]
34319#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34320pub enum Eligible1Code {
34321	#[cfg_attr(feature = "derive_default", default)]
34322	#[cfg_attr( feature = "derive_serde", serde(rename = "ELIG") )]
34323	CodeELIG,
34324	#[cfg_attr( feature = "derive_serde", serde(rename = "NELI") )]
34325	CodeNELI,
34326}
34327
34328impl Eligible1Code {
34329	pub fn validate(&self) -> Result<(), ValidationError> {
34330		Ok(())
34331	}
34332}
34333
34334
34335// EmbeddedType1Code ...
34336#[cfg_attr(feature = "derive_debug", derive(Debug))]
34337#[cfg_attr(feature = "derive_default", derive(Default))]
34338#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34339#[cfg_attr(feature = "derive_clone", derive(Clone))]
34340#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34341pub enum EmbeddedType1Code {
34342	#[cfg_attr(feature = "derive_default", default)]
34343	#[cfg_attr( feature = "derive_serde", serde(rename = "CANC") )]
34344	CodeCANC,
34345	#[cfg_attr( feature = "derive_serde", serde(rename = "EXTD") )]
34346	CodeEXTD,
34347	#[cfg_attr( feature = "derive_serde", serde(rename = "OPET") )]
34348	CodeOPET,
34349	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
34350	CodeOTHR,
34351	#[cfg_attr( feature = "derive_serde", serde(rename = "MDET") )]
34352	CodeMDET,
34353}
34354
34355impl EmbeddedType1Code {
34356	pub fn validate(&self) -> Result<(), ValidationError> {
34357		Ok(())
34358	}
34359}
34360
34361
34362// EmissionAllowanceProductType1Code ...
34363#[cfg_attr(feature = "derive_debug", derive(Debug))]
34364#[cfg_attr(feature = "derive_default", derive(Default))]
34365#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34366#[cfg_attr(feature = "derive_clone", derive(Clone))]
34367#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34368pub enum EmissionAllowanceProductType1Code {
34369	#[cfg_attr(feature = "derive_default", default)]
34370	#[cfg_attr( feature = "derive_serde", serde(rename = "EUAA") )]
34371	CodeEUAA,
34372	#[cfg_attr( feature = "derive_serde", serde(rename = "EUAE") )]
34373	CodeEUAE,
34374	#[cfg_attr( feature = "derive_serde", serde(rename = "ERUE") )]
34375	CodeERUE,
34376	#[cfg_attr( feature = "derive_serde", serde(rename = "CERE") )]
34377	CodeCERE,
34378	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
34379	CodeOTHR,
34380}
34381
34382impl EmissionAllowanceProductType1Code {
34383	pub fn validate(&self) -> Result<(), ValidationError> {
34384		Ok(())
34385	}
34386}
34387
34388
34389// EnabledStatusReason1 ...
34390#[cfg_attr(feature = "derive_debug", derive(Debug))]
34391#[cfg_attr(feature = "derive_default", derive(Default))]
34392#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34393#[cfg_attr(feature = "derive_clone", derive(Clone))]
34394#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34395pub struct EnabledStatusReason1 {
34396	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
34397	pub cd: EnabledStatusReason2Choice,
34398	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
34399	pub addtl_inf: Option<String>,
34400}
34401
34402impl EnabledStatusReason1 {
34403	pub fn validate(&self) -> Result<(), ValidationError> {
34404		self.cd.validate()?;
34405		if let Some(ref val) = self.addtl_inf {
34406			if val.chars().count() < 1 {
34407				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
34408			}
34409			if val.chars().count() > 350 {
34410				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 350".to_string()));
34411			}
34412		}
34413		Ok(())
34414	}
34415}
34416
34417
34418// EnabledStatusReason1Choice ...
34419#[cfg_attr(feature = "derive_debug", derive(Debug))]
34420#[cfg_attr(feature = "derive_default", derive(Default))]
34421#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34422#[cfg_attr(feature = "derive_clone", derive(Clone))]
34423#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34424pub struct EnabledStatusReason1Choice {
34425	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
34426	pub no_spcfd_rsn: Option<NoReasonCode>,
34427	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
34428	pub rsn: Option<Vec<EnabledStatusReason1>>,
34429}
34430
34431impl EnabledStatusReason1Choice {
34432	pub fn validate(&self) -> Result<(), ValidationError> {
34433		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
34434		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
34435		Ok(())
34436	}
34437}
34438
34439
34440// EnabledStatusReason1Code ...
34441#[cfg_attr(feature = "derive_debug", derive(Debug))]
34442#[cfg_attr(feature = "derive_default", derive(Default))]
34443#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34444#[cfg_attr(feature = "derive_clone", derive(Clone))]
34445#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34446pub enum EnabledStatusReason1Code {
34447	#[cfg_attr(feature = "derive_default", default)]
34448	#[cfg_attr( feature = "derive_serde", serde(rename = "MODI") )]
34449	CodeMODI,
34450}
34451
34452impl EnabledStatusReason1Code {
34453	pub fn validate(&self) -> Result<(), ValidationError> {
34454		Ok(())
34455	}
34456}
34457
34458
34459// EnabledStatusReason2Choice ...
34460#[cfg_attr(feature = "derive_debug", derive(Debug))]
34461#[cfg_attr(feature = "derive_default", derive(Default))]
34462#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34463#[cfg_attr(feature = "derive_clone", derive(Clone))]
34464#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34465pub struct EnabledStatusReason2Choice {
34466	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
34467	pub cd: Option<EnabledStatusReason1Code>,
34468	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
34469	pub prtry: Option<GenericIdentification36>,
34470}
34471
34472impl EnabledStatusReason2Choice {
34473	pub fn validate(&self) -> Result<(), ValidationError> {
34474		if let Some(ref val) = self.cd { val.validate()? }
34475		if let Some(ref val) = self.prtry { val.validate()? }
34476		Ok(())
34477	}
34478}
34479
34480
34481// EndOfDayRequirement1 ...
34482#[cfg_attr(feature = "derive_debug", derive(Debug))]
34483#[cfg_attr(feature = "derive_default", derive(Default))]
34484#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34485#[cfg_attr(feature = "derive_clone", derive(Clone))]
34486#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34487pub struct EndOfDayRequirement1 {
34488	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlMrgnRqrmnt", skip_serializing_if = "Option::is_none") )]
34489	pub initl_mrgn_rqrmnt: Option<ActiveCurrencyAndAmount>,
34490	#[cfg_attr( feature = "derive_serde", serde(rename = "VartnMrgnRqrmnt", skip_serializing_if = "Option::is_none") )]
34491	pub vartn_mrgn_rqrmnt: Option<AmountAndDirection102>,
34492}
34493
34494impl EndOfDayRequirement1 {
34495	pub fn validate(&self) -> Result<(), ValidationError> {
34496		if let Some(ref val) = self.initl_mrgn_rqrmnt { val.validate()? }
34497		if let Some(ref val) = self.vartn_mrgn_rqrmnt { val.validate()? }
34498		Ok(())
34499	}
34500}
34501
34502
34503// EndOfDayRequirement2 ...
34504#[cfg_attr(feature = "derive_debug", derive(Debug))]
34505#[cfg_attr(feature = "derive_default", derive(Default))]
34506#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34507#[cfg_attr(feature = "derive_clone", derive(Clone))]
34508#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34509pub struct EndOfDayRequirement2 {
34510	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlMrgnRqrmnts") )]
34511	pub initl_mrgn_rqrmnts: InitialMarginRequirement1,
34512	#[cfg_attr( feature = "derive_serde", serde(rename = "VartnMrgnRqrmnts") )]
34513	pub vartn_mrgn_rqrmnts: AmountAndDirection102,
34514	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnAcctId") )]
34515	pub mrgn_acct_id: GenericIdentification165,
34516}
34517
34518impl EndOfDayRequirement2 {
34519	pub fn validate(&self) -> Result<(), ValidationError> {
34520		self.initl_mrgn_rqrmnts.validate()?;
34521		self.vartn_mrgn_rqrmnts.validate()?;
34522		self.mrgn_acct_id.validate()?;
34523		Ok(())
34524	}
34525}
34526
34527
34528// EndPoint1Choice ...
34529#[cfg_attr(feature = "derive_debug", derive(Debug))]
34530#[cfg_attr(feature = "derive_default", derive(Default))]
34531#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34532#[cfg_attr(feature = "derive_clone", derive(Clone))]
34533#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34534pub struct EndPoint1Choice {
34535	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfPmts", skip_serializing_if = "Option::is_none") )]
34536	pub nb_of_pmts: Option<String>,
34537	#[cfg_attr( feature = "derive_serde", serde(rename = "LastPmtDt", skip_serializing_if = "Option::is_none") )]
34538	pub last_pmt_dt: Option<String>,
34539}
34540
34541impl EndPoint1Choice {
34542	pub fn validate(&self) -> Result<(), ValidationError> {
34543		if let Some(ref val) = self.nb_of_pmts {
34544			if val.chars().count() < 1 {
34545				return Err(ValidationError::new(1001, "nb_of_pmts is shorter than the minimum length of 1".to_string()));
34546			}
34547			if val.chars().count() > 35 {
34548				return Err(ValidationError::new(1002, "nb_of_pmts exceeds the maximum length of 35".to_string()));
34549			}
34550		}
34551		Ok(())
34552	}
34553}
34554
34555
34556// EnergyCommodityCoal1 ...
34557#[cfg_attr(feature = "derive_debug", derive(Debug))]
34558#[cfg_attr(feature = "derive_default", derive(Default))]
34559#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34560#[cfg_attr(feature = "derive_clone", derive(Clone))]
34561#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34562pub struct EnergyCommodityCoal1 {
34563	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34564	pub base_pdct: AssetClassProductType2Code,
34565	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
34566	pub sub_pdct: AssetClassSubProductType24Code,
34567}
34568
34569impl EnergyCommodityCoal1 {
34570	pub fn validate(&self) -> Result<(), ValidationError> {
34571		self.base_pdct.validate()?;
34572		self.sub_pdct.validate()?;
34573		Ok(())
34574	}
34575}
34576
34577
34578// EnergyCommodityCoal2 ...
34579#[cfg_attr(feature = "derive_debug", derive(Debug))]
34580#[cfg_attr(feature = "derive_default", derive(Default))]
34581#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34582#[cfg_attr(feature = "derive_clone", derive(Clone))]
34583#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34584pub struct EnergyCommodityCoal2 {
34585	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34586	pub base_pdct: AssetClassProductType2Code,
34587	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
34588	pub sub_pdct: Option<AssetClassSubProductType24Code>,
34589}
34590
34591impl EnergyCommodityCoal2 {
34592	pub fn validate(&self) -> Result<(), ValidationError> {
34593		self.base_pdct.validate()?;
34594		if let Some(ref val) = self.sub_pdct { val.validate()? }
34595		Ok(())
34596	}
34597}
34598
34599
34600// EnergyCommodityDistillates1 ...
34601#[cfg_attr(feature = "derive_debug", derive(Debug))]
34602#[cfg_attr(feature = "derive_default", derive(Default))]
34603#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34604#[cfg_attr(feature = "derive_clone", derive(Clone))]
34605#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34606pub struct EnergyCommodityDistillates1 {
34607	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34608	pub base_pdct: AssetClassProductType2Code,
34609	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
34610	pub sub_pdct: AssetClassSubProductType25Code,
34611}
34612
34613impl EnergyCommodityDistillates1 {
34614	pub fn validate(&self) -> Result<(), ValidationError> {
34615		self.base_pdct.validate()?;
34616		self.sub_pdct.validate()?;
34617		Ok(())
34618	}
34619}
34620
34621
34622// EnergyCommodityDistillates2 ...
34623#[cfg_attr(feature = "derive_debug", derive(Debug))]
34624#[cfg_attr(feature = "derive_default", derive(Default))]
34625#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34626#[cfg_attr(feature = "derive_clone", derive(Clone))]
34627#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34628pub struct EnergyCommodityDistillates2 {
34629	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34630	pub base_pdct: AssetClassProductType2Code,
34631	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
34632	pub sub_pdct: Option<AssetClassSubProductType25Code>,
34633}
34634
34635impl EnergyCommodityDistillates2 {
34636	pub fn validate(&self) -> Result<(), ValidationError> {
34637		self.base_pdct.validate()?;
34638		if let Some(ref val) = self.sub_pdct { val.validate()? }
34639		Ok(())
34640	}
34641}
34642
34643
34644// EnergyCommodityElectricity1 ...
34645#[cfg_attr(feature = "derive_debug", derive(Debug))]
34646#[cfg_attr(feature = "derive_default", derive(Default))]
34647#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34648#[cfg_attr(feature = "derive_clone", derive(Clone))]
34649#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34650pub struct EnergyCommodityElectricity1 {
34651	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34652	pub base_pdct: AssetClassProductType2Code,
34653	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
34654	pub sub_pdct: AssetClassSubProductType6Code,
34655	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct") )]
34656	pub addtl_sub_pdct: AssetClassDetailedSubProductType5Code,
34657}
34658
34659impl EnergyCommodityElectricity1 {
34660	pub fn validate(&self) -> Result<(), ValidationError> {
34661		self.base_pdct.validate()?;
34662		self.sub_pdct.validate()?;
34663		self.addtl_sub_pdct.validate()?;
34664		Ok(())
34665	}
34666}
34667
34668
34669// EnergyCommodityElectricity2 ...
34670#[cfg_attr(feature = "derive_debug", derive(Debug))]
34671#[cfg_attr(feature = "derive_default", derive(Default))]
34672#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34673#[cfg_attr(feature = "derive_clone", derive(Clone))]
34674#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34675pub struct EnergyCommodityElectricity2 {
34676	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34677	pub base_pdct: AssetClassProductType2Code,
34678	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
34679	pub sub_pdct: Option<AssetClassSubProductType6Code>,
34680	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
34681	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType5Code>,
34682}
34683
34684impl EnergyCommodityElectricity2 {
34685	pub fn validate(&self) -> Result<(), ValidationError> {
34686		self.base_pdct.validate()?;
34687		if let Some(ref val) = self.sub_pdct { val.validate()? }
34688		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
34689		Ok(())
34690	}
34691}
34692
34693
34694// EnergyCommodityInterEnergy1 ...
34695#[cfg_attr(feature = "derive_debug", derive(Debug))]
34696#[cfg_attr(feature = "derive_default", derive(Default))]
34697#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34698#[cfg_attr(feature = "derive_clone", derive(Clone))]
34699#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34700pub struct EnergyCommodityInterEnergy1 {
34701	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34702	pub base_pdct: AssetClassProductType2Code,
34703	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
34704	pub sub_pdct: AssetClassSubProductType26Code,
34705}
34706
34707impl EnergyCommodityInterEnergy1 {
34708	pub fn validate(&self) -> Result<(), ValidationError> {
34709		self.base_pdct.validate()?;
34710		self.sub_pdct.validate()?;
34711		Ok(())
34712	}
34713}
34714
34715
34716// EnergyCommodityInterEnergy2 ...
34717#[cfg_attr(feature = "derive_debug", derive(Debug))]
34718#[cfg_attr(feature = "derive_default", derive(Default))]
34719#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34720#[cfg_attr(feature = "derive_clone", derive(Clone))]
34721#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34722pub struct EnergyCommodityInterEnergy2 {
34723	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34724	pub base_pdct: AssetClassProductType2Code,
34725	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
34726	pub sub_pdct: Option<AssetClassSubProductType26Code>,
34727}
34728
34729impl EnergyCommodityInterEnergy2 {
34730	pub fn validate(&self) -> Result<(), ValidationError> {
34731		self.base_pdct.validate()?;
34732		if let Some(ref val) = self.sub_pdct { val.validate()? }
34733		Ok(())
34734	}
34735}
34736
34737
34738// EnergyCommodityLightEnd1 ...
34739#[cfg_attr(feature = "derive_debug", derive(Debug))]
34740#[cfg_attr(feature = "derive_default", derive(Default))]
34741#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34742#[cfg_attr(feature = "derive_clone", derive(Clone))]
34743#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34744pub struct EnergyCommodityLightEnd1 {
34745	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34746	pub base_pdct: AssetClassProductType2Code,
34747	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
34748	pub sub_pdct: AssetClassSubProductType27Code,
34749}
34750
34751impl EnergyCommodityLightEnd1 {
34752	pub fn validate(&self) -> Result<(), ValidationError> {
34753		self.base_pdct.validate()?;
34754		self.sub_pdct.validate()?;
34755		Ok(())
34756	}
34757}
34758
34759
34760// EnergyCommodityLightEnd2 ...
34761#[cfg_attr(feature = "derive_debug", derive(Debug))]
34762#[cfg_attr(feature = "derive_default", derive(Default))]
34763#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34764#[cfg_attr(feature = "derive_clone", derive(Clone))]
34765#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34766pub struct EnergyCommodityLightEnd2 {
34767	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34768	pub base_pdct: AssetClassProductType2Code,
34769	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
34770	pub sub_pdct: Option<AssetClassSubProductType27Code>,
34771}
34772
34773impl EnergyCommodityLightEnd2 {
34774	pub fn validate(&self) -> Result<(), ValidationError> {
34775		self.base_pdct.validate()?;
34776		if let Some(ref val) = self.sub_pdct { val.validate()? }
34777		Ok(())
34778	}
34779}
34780
34781
34782// EnergyCommodityNaturalGas1 ...
34783#[cfg_attr(feature = "derive_debug", derive(Debug))]
34784#[cfg_attr(feature = "derive_default", derive(Default))]
34785#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34786#[cfg_attr(feature = "derive_clone", derive(Clone))]
34787#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34788pub struct EnergyCommodityNaturalGas1 {
34789	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34790	pub base_pdct: AssetClassProductType2Code,
34791	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
34792	pub sub_pdct: AssetClassSubProductType7Code,
34793	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
34794	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType6Code>,
34795}
34796
34797impl EnergyCommodityNaturalGas1 {
34798	pub fn validate(&self) -> Result<(), ValidationError> {
34799		self.base_pdct.validate()?;
34800		self.sub_pdct.validate()?;
34801		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
34802		Ok(())
34803	}
34804}
34805
34806
34807// EnergyCommodityNaturalGas2 ...
34808#[cfg_attr(feature = "derive_debug", derive(Debug))]
34809#[cfg_attr(feature = "derive_default", derive(Default))]
34810#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34811#[cfg_attr(feature = "derive_clone", derive(Clone))]
34812#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34813pub struct EnergyCommodityNaturalGas2 {
34814	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34815	pub base_pdct: AssetClassProductType2Code,
34816	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
34817	pub sub_pdct: AssetClassSubProductType7Code,
34818	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct") )]
34819	pub addtl_sub_pdct: AssetClassDetailedSubProductType31Code,
34820}
34821
34822impl EnergyCommodityNaturalGas2 {
34823	pub fn validate(&self) -> Result<(), ValidationError> {
34824		self.base_pdct.validate()?;
34825		self.sub_pdct.validate()?;
34826		self.addtl_sub_pdct.validate()?;
34827		Ok(())
34828	}
34829}
34830
34831
34832// EnergyCommodityNaturalGas3 ...
34833#[cfg_attr(feature = "derive_debug", derive(Debug))]
34834#[cfg_attr(feature = "derive_default", derive(Default))]
34835#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34836#[cfg_attr(feature = "derive_clone", derive(Clone))]
34837#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34838pub struct EnergyCommodityNaturalGas3 {
34839	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34840	pub base_pdct: AssetClassProductType2Code,
34841	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
34842	pub sub_pdct: Option<AssetClassSubProductType7Code>,
34843	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
34844	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType31Code>,
34845}
34846
34847impl EnergyCommodityNaturalGas3 {
34848	pub fn validate(&self) -> Result<(), ValidationError> {
34849		self.base_pdct.validate()?;
34850		if let Some(ref val) = self.sub_pdct { val.validate()? }
34851		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
34852		Ok(())
34853	}
34854}
34855
34856
34857// EnergyCommodityOil1 ...
34858#[cfg_attr(feature = "derive_debug", derive(Debug))]
34859#[cfg_attr(feature = "derive_default", derive(Default))]
34860#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34861#[cfg_attr(feature = "derive_clone", derive(Clone))]
34862#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34863pub struct EnergyCommodityOil1 {
34864	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34865	pub base_pdct: AssetClassProductType2Code,
34866	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
34867	pub sub_pdct: AssetClassSubProductType8Code,
34868	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
34869	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType7Code>,
34870}
34871
34872impl EnergyCommodityOil1 {
34873	pub fn validate(&self) -> Result<(), ValidationError> {
34874		self.base_pdct.validate()?;
34875		self.sub_pdct.validate()?;
34876		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
34877		Ok(())
34878	}
34879}
34880
34881
34882// EnergyCommodityOil2 ...
34883#[cfg_attr(feature = "derive_debug", derive(Debug))]
34884#[cfg_attr(feature = "derive_default", derive(Default))]
34885#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34886#[cfg_attr(feature = "derive_clone", derive(Clone))]
34887#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34888pub struct EnergyCommodityOil2 {
34889	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34890	pub base_pdct: AssetClassProductType2Code,
34891	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
34892	pub sub_pdct: AssetClassSubProductType8Code,
34893	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct") )]
34894	pub addtl_sub_pdct: AssetClassDetailedSubProductType32Code,
34895}
34896
34897impl EnergyCommodityOil2 {
34898	pub fn validate(&self) -> Result<(), ValidationError> {
34899		self.base_pdct.validate()?;
34900		self.sub_pdct.validate()?;
34901		self.addtl_sub_pdct.validate()?;
34902		Ok(())
34903	}
34904}
34905
34906
34907// EnergyCommodityOil3 ...
34908#[cfg_attr(feature = "derive_debug", derive(Debug))]
34909#[cfg_attr(feature = "derive_default", derive(Default))]
34910#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34911#[cfg_attr(feature = "derive_clone", derive(Clone))]
34912#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34913pub struct EnergyCommodityOil3 {
34914	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34915	pub base_pdct: AssetClassProductType2Code,
34916	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
34917	pub sub_pdct: Option<AssetClassSubProductType8Code>,
34918	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
34919	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType32Code>,
34920}
34921
34922impl EnergyCommodityOil3 {
34923	pub fn validate(&self) -> Result<(), ValidationError> {
34924		self.base_pdct.validate()?;
34925		if let Some(ref val) = self.sub_pdct { val.validate()? }
34926		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
34927		Ok(())
34928	}
34929}
34930
34931
34932// EnergyCommodityOther1 ...
34933#[cfg_attr(feature = "derive_debug", derive(Debug))]
34934#[cfg_attr(feature = "derive_default", derive(Default))]
34935#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34936#[cfg_attr(feature = "derive_clone", derive(Clone))]
34937#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34938pub struct EnergyCommodityOther1 {
34939	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34940	pub base_pdct: AssetClassProductType2Code,
34941	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
34942	pub sub_pdct: AssetClassSubProductType49Code,
34943}
34944
34945impl EnergyCommodityOther1 {
34946	pub fn validate(&self) -> Result<(), ValidationError> {
34947		self.base_pdct.validate()?;
34948		self.sub_pdct.validate()?;
34949		Ok(())
34950	}
34951}
34952
34953
34954// EnergyCommodityOther2 ...
34955#[cfg_attr(feature = "derive_debug", derive(Debug))]
34956#[cfg_attr(feature = "derive_default", derive(Default))]
34957#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34958#[cfg_attr(feature = "derive_clone", derive(Clone))]
34959#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34960pub struct EnergyCommodityOther2 {
34961	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34962	pub base_pdct: AssetClassProductType2Code,
34963	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
34964	pub sub_pdct: Option<AssetClassSubProductType49Code>,
34965}
34966
34967impl EnergyCommodityOther2 {
34968	pub fn validate(&self) -> Result<(), ValidationError> {
34969		self.base_pdct.validate()?;
34970		if let Some(ref val) = self.sub_pdct { val.validate()? }
34971		Ok(())
34972	}
34973}
34974
34975
34976// EnergyCommodityRenewableEnergy1 ...
34977#[cfg_attr(feature = "derive_debug", derive(Debug))]
34978#[cfg_attr(feature = "derive_default", derive(Default))]
34979#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
34980#[cfg_attr(feature = "derive_clone", derive(Clone))]
34981#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
34982pub struct EnergyCommodityRenewableEnergy1 {
34983	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
34984	pub base_pdct: AssetClassProductType2Code,
34985	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
34986	pub sub_pdct: AssetClassSubProductType28Code,
34987}
34988
34989impl EnergyCommodityRenewableEnergy1 {
34990	pub fn validate(&self) -> Result<(), ValidationError> {
34991		self.base_pdct.validate()?;
34992		self.sub_pdct.validate()?;
34993		Ok(())
34994	}
34995}
34996
34997
34998// EnergyCommodityRenewableEnergy2 ...
34999#[cfg_attr(feature = "derive_debug", derive(Debug))]
35000#[cfg_attr(feature = "derive_default", derive(Default))]
35001#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35002#[cfg_attr(feature = "derive_clone", derive(Clone))]
35003#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35004pub struct EnergyCommodityRenewableEnergy2 {
35005	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
35006	pub base_pdct: AssetClassProductType2Code,
35007	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
35008	pub sub_pdct: Option<AssetClassSubProductType28Code>,
35009}
35010
35011impl EnergyCommodityRenewableEnergy2 {
35012	pub fn validate(&self) -> Result<(), ValidationError> {
35013		self.base_pdct.validate()?;
35014		if let Some(ref val) = self.sub_pdct { val.validate()? }
35015		Ok(())
35016	}
35017}
35018
35019
35020// EnergyDeliveryAttribute10 ...
35021#[cfg_attr(feature = "derive_debug", derive(Debug))]
35022#[cfg_attr(feature = "derive_default", derive(Default))]
35023#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35024#[cfg_attr(feature = "derive_clone", derive(Clone))]
35025#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35026pub struct EnergyDeliveryAttribute10 {
35027	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryIntrvl", skip_serializing_if = "Option::is_none") )]
35028	pub dlvry_intrvl: Option<Vec<TimePeriodDetails1>>,
35029	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryDt", skip_serializing_if = "Option::is_none") )]
35030	pub dlvry_dt: Option<DatePeriod1>,
35031	#[cfg_attr( feature = "derive_serde", serde(rename = "Drtn", skip_serializing_if = "Option::is_none") )]
35032	pub drtn: Option<DurationType1Code>,
35033	#[cfg_attr( feature = "derive_serde", serde(rename = "WkDay", skip_serializing_if = "Option::is_none") )]
35034	pub wk_day: Option<Vec<WeekDay3Code>>,
35035	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryCpcty", skip_serializing_if = "Option::is_none") )]
35036	pub dlvry_cpcty: Option<Quantity47Choice>,
35037	#[cfg_attr( feature = "derive_serde", serde(rename = "QtyUnit", skip_serializing_if = "Option::is_none") )]
35038	pub qty_unit: Option<EnergyQuantityUnit2Choice>,
35039	#[cfg_attr( feature = "derive_serde", serde(rename = "PricTmIntrvlQty", skip_serializing_if = "Option::is_none") )]
35040	pub pric_tm_intrvl_qty: Option<AmountAndDirection106>,
35041}
35042
35043impl EnergyDeliveryAttribute10 {
35044	pub fn validate(&self) -> Result<(), ValidationError> {
35045		if let Some(ref vec) = self.dlvry_intrvl { for item in vec { item.validate()? } }
35046		if let Some(ref val) = self.dlvry_dt { val.validate()? }
35047		if let Some(ref val) = self.drtn { val.validate()? }
35048		if let Some(ref vec) = self.wk_day { for item in vec { item.validate()? } }
35049		if let Some(ref val) = self.dlvry_cpcty { val.validate()? }
35050		if let Some(ref val) = self.qty_unit { val.validate()? }
35051		if let Some(ref val) = self.pric_tm_intrvl_qty { val.validate()? }
35052		Ok(())
35053	}
35054}
35055
35056
35057// EnergyLoadType1Code ...
35058#[cfg_attr(feature = "derive_debug", derive(Debug))]
35059#[cfg_attr(feature = "derive_default", derive(Default))]
35060#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35061#[cfg_attr(feature = "derive_clone", derive(Clone))]
35062#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35063pub enum EnergyLoadType1Code {
35064	#[cfg_attr(feature = "derive_default", default)]
35065	#[cfg_attr( feature = "derive_serde", serde(rename = "BSLD") )]
35066	CodeBSLD,
35067	#[cfg_attr( feature = "derive_serde", serde(rename = "GASD") )]
35068	CodeGASD,
35069	#[cfg_attr( feature = "derive_serde", serde(rename = "HABH") )]
35070	CodeHABH,
35071	#[cfg_attr( feature = "derive_serde", serde(rename = "OFFP") )]
35072	CodeOFFP,
35073	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
35074	CodeOTHR,
35075	#[cfg_attr( feature = "derive_serde", serde(rename = "PKLD") )]
35076	CodePKLD,
35077	#[cfg_attr( feature = "derive_serde", serde(rename = "SHPD") )]
35078	CodeSHPD,
35079}
35080
35081impl EnergyLoadType1Code {
35082	pub fn validate(&self) -> Result<(), ValidationError> {
35083		Ok(())
35084	}
35085}
35086
35087
35088// EnergyQuantityUnit2Choice ...
35089#[cfg_attr(feature = "derive_debug", derive(Debug))]
35090#[cfg_attr(feature = "derive_default", derive(Default))]
35091#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35092#[cfg_attr(feature = "derive_clone", derive(Clone))]
35093#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35094pub struct EnergyQuantityUnit2Choice {
35095	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
35096	pub cd: Option<EnergyQuantityUnit2Code>,
35097	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
35098	pub prtry: Option<String>,
35099}
35100
35101impl EnergyQuantityUnit2Choice {
35102	pub fn validate(&self) -> Result<(), ValidationError> {
35103		if let Some(ref val) = self.cd { val.validate()? }
35104		if let Some(ref val) = self.prtry {
35105			if val.chars().count() < 1 {
35106				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
35107			}
35108			if val.chars().count() > 52 {
35109				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 52".to_string()));
35110			}
35111		}
35112		Ok(())
35113	}
35114}
35115
35116
35117// EnergyQuantityUnit2Code ...
35118#[cfg_attr(feature = "derive_debug", derive(Debug))]
35119#[cfg_attr(feature = "derive_default", derive(Default))]
35120#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35121#[cfg_attr(feature = "derive_clone", derive(Clone))]
35122#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35123pub enum EnergyQuantityUnit2Code {
35124	#[cfg_attr(feature = "derive_default", default)]
35125	#[cfg_attr( feature = "derive_serde", serde(rename = "BTUD") )]
35126	CodeBTUD,
35127	#[cfg_attr( feature = "derive_serde", serde(rename = "CMPD") )]
35128	CodeCMPD,
35129	#[cfg_attr( feature = "derive_serde", serde(rename = "GJDD") )]
35130	CodeGJDD,
35131	#[cfg_attr( feature = "derive_serde", serde(rename = "GWAT") )]
35132	CodeGWAT,
35133	#[cfg_attr( feature = "derive_serde", serde(rename = "GWHD") )]
35134	CodeGWHD,
35135	#[cfg_attr( feature = "derive_serde", serde(rename = "GWHH") )]
35136	CodeGWHH,
35137	#[cfg_attr( feature = "derive_serde", serde(rename = "HMJD") )]
35138	CodeHMJD,
35139	#[cfg_attr( feature = "derive_serde", serde(rename = "KTMD") )]
35140	CodeKTMD,
35141	#[cfg_attr( feature = "derive_serde", serde(rename = "KWAT") )]
35142	CodeKWAT,
35143	#[cfg_attr( feature = "derive_serde", serde(rename = "KWHD") )]
35144	CodeKWHD,
35145	#[cfg_attr( feature = "derive_serde", serde(rename = "KWHH") )]
35146	CodeKWHH,
35147	#[cfg_attr( feature = "derive_serde", serde(rename = "MCMD") )]
35148	CodeMCMD,
35149	#[cfg_attr( feature = "derive_serde", serde(rename = "MJDD") )]
35150	CodeMJDD,
35151	#[cfg_attr( feature = "derive_serde", serde(rename = "MBTD") )]
35152	CodeMBTD,
35153	#[cfg_attr( feature = "derive_serde", serde(rename = "MMJD") )]
35154	CodeMMJD,
35155	#[cfg_attr( feature = "derive_serde", serde(rename = "MTMD") )]
35156	CodeMTMD,
35157	#[cfg_attr( feature = "derive_serde", serde(rename = "MWAT") )]
35158	CodeMWAT,
35159	#[cfg_attr( feature = "derive_serde", serde(rename = "MWHD") )]
35160	CodeMWHD,
35161	#[cfg_attr( feature = "derive_serde", serde(rename = "MWHH") )]
35162	CodeMWHH,
35163	#[cfg_attr( feature = "derive_serde", serde(rename = "THMD") )]
35164	CodeTHMD,
35165}
35166
35167impl EnergyQuantityUnit2Code {
35168	pub fn validate(&self) -> Result<(), ValidationError> {
35169		Ok(())
35170	}
35171}
35172
35173
35174// EnergySpecificAttribute9 ...
35175#[cfg_attr(feature = "derive_debug", derive(Debug))]
35176#[cfg_attr(feature = "derive_default", derive(Default))]
35177#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35178#[cfg_attr(feature = "derive_clone", derive(Clone))]
35179#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35180pub struct EnergySpecificAttribute9 {
35181	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryPtOrZone", skip_serializing_if = "Option::is_none") )]
35182	pub dlvry_pt_or_zone: Option<Vec<DeliveryInterconnectionPoint1Choice>>,
35183	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrCnnctnPt", skip_serializing_if = "Option::is_none") )]
35184	pub intr_cnnctn_pt: Option<DeliveryInterconnectionPoint1Choice>,
35185	#[cfg_attr( feature = "derive_serde", serde(rename = "LdTp", skip_serializing_if = "Option::is_none") )]
35186	pub ld_tp: Option<EnergyLoadType1Code>,
35187	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryAttr", skip_serializing_if = "Option::is_none") )]
35188	pub dlvry_attr: Option<Vec<EnergyDeliveryAttribute10>>,
35189}
35190
35191impl EnergySpecificAttribute9 {
35192	pub fn validate(&self) -> Result<(), ValidationError> {
35193		if let Some(ref vec) = self.dlvry_pt_or_zone { for item in vec { item.validate()? } }
35194		if let Some(ref val) = self.intr_cnnctn_pt { val.validate()? }
35195		if let Some(ref val) = self.ld_tp { val.validate()? }
35196		if let Some(ref vec) = self.dlvry_attr { for item in vec { item.validate()? } }
35197		Ok(())
35198	}
35199}
35200
35201
35202// EnrolmentHeader3 ...
35203#[cfg_attr(feature = "derive_debug", derive(Debug))]
35204#[cfg_attr(feature = "derive_default", derive(Default))]
35205#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35206#[cfg_attr(feature = "derive_clone", derive(Clone))]
35207#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35208pub struct EnrolmentHeader3 {
35209	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
35210	pub msg_id: String,
35211	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
35212	pub cre_dt_tm: String,
35213	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgOrgtr", skip_serializing_if = "Option::is_none") )]
35214	pub msg_orgtr: Option<RTPPartyIdentification2>,
35215	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgRcpt", skip_serializing_if = "Option::is_none") )]
35216	pub msg_rcpt: Option<RTPPartyIdentification2>,
35217	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty") )]
35218	pub initg_pty: RTPPartyIdentification2,
35219}
35220
35221impl EnrolmentHeader3 {
35222	pub fn validate(&self) -> Result<(), ValidationError> {
35223		if self.msg_id.chars().count() < 1 {
35224			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
35225		}
35226		if self.msg_id.chars().count() > 35 {
35227			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
35228		}
35229		if let Some(ref val) = self.msg_orgtr { val.validate()? }
35230		if let Some(ref val) = self.msg_rcpt { val.validate()? }
35231		self.initg_pty.validate()?;
35232		Ok(())
35233	}
35234}
35235
35236
35237// EnrolmentStatus3 ...
35238#[cfg_attr(feature = "derive_debug", derive(Debug))]
35239#[cfg_attr(feature = "derive_default", derive(Default))]
35240#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35241#[cfg_attr(feature = "derive_clone", derive(Clone))]
35242#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35243pub struct EnrolmentStatus3 {
35244	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizInstr", skip_serializing_if = "Option::is_none") )]
35245	pub orgnl_biz_instr: Option<OriginalBusinessInstruction1>,
35246	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
35247	pub sts: ServiceStatus1Choice,
35248	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsn", skip_serializing_if = "Option::is_none") )]
35249	pub sts_rsn: Option<CreditorEnrolmentStatusReason3>,
35250	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEnrlmntRef", skip_serializing_if = "Option::is_none") )]
35251	pub orgnl_enrlmnt_ref: Option<OriginalEnrolment3Choice>,
35252	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvEnrlmntDt", skip_serializing_if = "Option::is_none") )]
35253	pub fctv_enrlmnt_dt: Option<DateAndDateTime2Choice>,
35254	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
35255	pub splmtry_data: Option<Vec<SupplementaryData1>>,
35256}
35257
35258impl EnrolmentStatus3 {
35259	pub fn validate(&self) -> Result<(), ValidationError> {
35260		if let Some(ref val) = self.orgnl_biz_instr { val.validate()? }
35261		self.sts.validate()?;
35262		if let Some(ref val) = self.sts_rsn { val.validate()? }
35263		if let Some(ref val) = self.orgnl_enrlmnt_ref { val.validate()? }
35264		if let Some(ref val) = self.fctv_enrlmnt_dt { val.validate()? }
35265		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
35266		Ok(())
35267	}
35268}
35269
35270
35271// Entry2Code ...
35272#[cfg_attr(feature = "derive_debug", derive(Debug))]
35273#[cfg_attr(feature = "derive_default", derive(Default))]
35274#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35275#[cfg_attr(feature = "derive_clone", derive(Clone))]
35276#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35277pub enum Entry2Code {
35278	#[cfg_attr(feature = "derive_default", default)]
35279	#[cfg_attr( feature = "derive_serde", serde(rename = "TRIA") )]
35280	CodeTRIA,
35281	#[cfg_attr( feature = "derive_serde", serde(rename = "OFFI") )]
35282	CodeOFFI,
35283	#[cfg_attr( feature = "derive_serde", serde(rename = "REQU") )]
35284	CodeREQU,
35285}
35286
35287impl Entry2Code {
35288	pub fn validate(&self) -> Result<(), ValidationError> {
35289		Ok(())
35290	}
35291}
35292
35293
35294// EntryDetails13 ...
35295#[cfg_attr(feature = "derive_debug", derive(Debug))]
35296#[cfg_attr(feature = "derive_default", derive(Default))]
35297#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35298#[cfg_attr(feature = "derive_clone", derive(Clone))]
35299#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35300pub struct EntryDetails13 {
35301	#[cfg_attr( feature = "derive_serde", serde(rename = "Btch", skip_serializing_if = "Option::is_none") )]
35302	pub btch: Option<BatchInformation2>,
35303	#[cfg_attr( feature = "derive_serde", serde(rename = "TxDtls", skip_serializing_if = "Option::is_none") )]
35304	pub tx_dtls: Option<Vec<EntryTransaction14>>,
35305}
35306
35307impl EntryDetails13 {
35308	pub fn validate(&self) -> Result<(), ValidationError> {
35309		if let Some(ref val) = self.btch { val.validate()? }
35310		if let Some(ref vec) = self.tx_dtls { for item in vec { item.validate()? } }
35311		Ok(())
35312	}
35313}
35314
35315
35316// EntryStatus1Choice ...
35317#[cfg_attr(feature = "derive_debug", derive(Debug))]
35318#[cfg_attr(feature = "derive_default", derive(Default))]
35319#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35320#[cfg_attr(feature = "derive_clone", derive(Clone))]
35321#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35322pub struct EntryStatus1Choice {
35323	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
35324	pub cd: Option<String>,
35325	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
35326	pub prtry: Option<String>,
35327}
35328
35329impl EntryStatus1Choice {
35330	pub fn validate(&self) -> Result<(), ValidationError> {
35331		if let Some(ref val) = self.cd {
35332			if val.chars().count() < 1 {
35333				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
35334			}
35335			if val.chars().count() > 4 {
35336				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
35337			}
35338		}
35339		if let Some(ref val) = self.prtry {
35340			if val.chars().count() < 1 {
35341				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
35342			}
35343			if val.chars().count() > 35 {
35344				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
35345			}
35346		}
35347		Ok(())
35348	}
35349}
35350
35351
35352// EntryStatus1Code ...
35353#[cfg_attr(feature = "derive_debug", derive(Debug))]
35354#[cfg_attr(feature = "derive_default", derive(Default))]
35355#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35356#[cfg_attr(feature = "derive_clone", derive(Clone))]
35357#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35358pub enum EntryStatus1Code {
35359	#[cfg_attr(feature = "derive_default", default)]
35360	#[cfg_attr( feature = "derive_serde", serde(rename = "BOOK") )]
35361	CodeBOOK,
35362	#[cfg_attr( feature = "derive_serde", serde(rename = "PDNG") )]
35363	CodePDNG,
35364	#[cfg_attr( feature = "derive_serde", serde(rename = "FUTR") )]
35365	CodeFUTR,
35366}
35367
35368impl EntryStatus1Code {
35369	pub fn validate(&self) -> Result<(), ValidationError> {
35370		Ok(())
35371	}
35372}
35373
35374
35375// EntryTransaction14 ...
35376#[cfg_attr(feature = "derive_debug", derive(Debug))]
35377#[cfg_attr(feature = "derive_default", derive(Default))]
35378#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35379#[cfg_attr(feature = "derive_clone", derive(Clone))]
35380#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35381pub struct EntryTransaction14 {
35382	#[cfg_attr( feature = "derive_serde", serde(rename = "Refs", skip_serializing_if = "Option::is_none") )]
35383	pub refs: Option<TransactionReferences6>,
35384	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
35385	pub amt: Option<ActiveOrHistoricCurrencyAndAmount>,
35386	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
35387	pub cdt_dbt_ind: Option<CreditDebitCode>,
35388	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtDtls", skip_serializing_if = "Option::is_none") )]
35389	pub amt_dtls: Option<AmountAndCurrencyExchange4>,
35390	#[cfg_attr( feature = "derive_serde", serde(rename = "Avlbty", skip_serializing_if = "Option::is_none") )]
35391	pub avlbty: Option<Vec<CashAvailability1>>,
35392	#[cfg_attr( feature = "derive_serde", serde(rename = "BkTxCd", skip_serializing_if = "Option::is_none") )]
35393	pub bk_tx_cd: Option<BankTransactionCodeStructure4>,
35394	#[cfg_attr( feature = "derive_serde", serde(rename = "Chrgs", skip_serializing_if = "Option::is_none") )]
35395	pub chrgs: Option<Charges15>,
35396	#[cfg_attr( feature = "derive_serde", serde(rename = "Intrst", skip_serializing_if = "Option::is_none") )]
35397	pub intrst: Option<TransactionInterest4>,
35398	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdPties", skip_serializing_if = "Option::is_none") )]
35399	pub rltd_pties: Option<TransactionParties12>,
35400	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdAgts", skip_serializing_if = "Option::is_none") )]
35401	pub rltd_agts: Option<TransactionAgents6>,
35402	#[cfg_attr( feature = "derive_serde", serde(rename = "LclInstrm", skip_serializing_if = "Option::is_none") )]
35403	pub lcl_instrm: Option<LocalInstrument2Choice>,
35404	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
35405	pub pmt_tp_inf: Option<PaymentTypeInformation27>,
35406	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
35407	pub purp: Option<Purpose2Choice>,
35408	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdRmtInf", skip_serializing_if = "Option::is_none") )]
35409	pub rltd_rmt_inf: Option<Vec<RemittanceLocation8>>,
35410	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
35411	pub rmt_inf: Option<RemittanceInformation22>,
35412	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdDts", skip_serializing_if = "Option::is_none") )]
35413	pub rltd_dts: Option<TransactionDates3>,
35414	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdPric", skip_serializing_if = "Option::is_none") )]
35415	pub rltd_pric: Option<TransactionPrice4Choice>,
35416	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdQties", skip_serializing_if = "Option::is_none") )]
35417	pub rltd_qties: Option<Vec<TransactionQuantities3Choice>>,
35418	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId", skip_serializing_if = "Option::is_none") )]
35419	pub fin_instrm_id: Option<SecurityIdentification19>,
35420	#[cfg_attr( feature = "derive_serde", serde(rename = "Tax", skip_serializing_if = "Option::is_none") )]
35421	pub tax: Option<TaxData1>,
35422	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrInf", skip_serializing_if = "Option::is_none") )]
35423	pub rtr_inf: Option<PaymentReturnReason8>,
35424	#[cfg_attr( feature = "derive_serde", serde(rename = "CorpActn", skip_serializing_if = "Option::is_none") )]
35425	pub corp_actn: Option<CorporateAction9>,
35426	#[cfg_attr( feature = "derive_serde", serde(rename = "SfkpgAcct", skip_serializing_if = "Option::is_none") )]
35427	pub sfkpg_acct: Option<SecuritiesAccount19>,
35428	#[cfg_attr( feature = "derive_serde", serde(rename = "CshDpst", skip_serializing_if = "Option::is_none") )]
35429	pub csh_dpst: Option<Vec<CashDeposit1>>,
35430	#[cfg_attr( feature = "derive_serde", serde(rename = "CardTx", skip_serializing_if = "Option::is_none") )]
35431	pub card_tx: Option<CardTransaction18>,
35432	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlTxInf", skip_serializing_if = "Option::is_none") )]
35433	pub addtl_tx_inf: Option<String>,
35434	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
35435	pub splmtry_data: Option<Vec<SupplementaryData1>>,
35436}
35437
35438impl EntryTransaction14 {
35439	pub fn validate(&self) -> Result<(), ValidationError> {
35440		if let Some(ref val) = self.refs { val.validate()? }
35441		if let Some(ref val) = self.amt { val.validate()? }
35442		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
35443		if let Some(ref val) = self.amt_dtls { val.validate()? }
35444		if let Some(ref vec) = self.avlbty { for item in vec { item.validate()? } }
35445		if let Some(ref val) = self.bk_tx_cd { val.validate()? }
35446		if let Some(ref val) = self.chrgs { val.validate()? }
35447		if let Some(ref val) = self.intrst { val.validate()? }
35448		if let Some(ref val) = self.rltd_pties { val.validate()? }
35449		if let Some(ref val) = self.rltd_agts { val.validate()? }
35450		if let Some(ref val) = self.lcl_instrm { val.validate()? }
35451		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
35452		if let Some(ref val) = self.purp { val.validate()? }
35453		if let Some(ref vec) = self.rltd_rmt_inf { for item in vec { item.validate()? } }
35454		if let Some(ref val) = self.rmt_inf { val.validate()? }
35455		if let Some(ref val) = self.rltd_dts { val.validate()? }
35456		if let Some(ref val) = self.rltd_pric { val.validate()? }
35457		if let Some(ref vec) = self.rltd_qties { for item in vec { item.validate()? } }
35458		if let Some(ref val) = self.fin_instrm_id { val.validate()? }
35459		if let Some(ref val) = self.tax { val.validate()? }
35460		if let Some(ref val) = self.rtr_inf { val.validate()? }
35461		if let Some(ref val) = self.corp_actn { val.validate()? }
35462		if let Some(ref val) = self.sfkpg_acct { val.validate()? }
35463		if let Some(ref vec) = self.csh_dpst { for item in vec { item.validate()? } }
35464		if let Some(ref val) = self.card_tx { val.validate()? }
35465		if let Some(ref val) = self.addtl_tx_inf {
35466			if val.chars().count() < 1 {
35467				return Err(ValidationError::new(1001, "addtl_tx_inf is shorter than the minimum length of 1".to_string()));
35468			}
35469			if val.chars().count() > 500 {
35470				return Err(ValidationError::new(1002, "addtl_tx_inf exceeds the maximum length of 500".to_string()));
35471			}
35472		}
35473		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
35474		Ok(())
35475	}
35476}
35477
35478
35479// EnvironmentCommodityOther1 ...
35480#[cfg_attr(feature = "derive_debug", derive(Debug))]
35481#[cfg_attr(feature = "derive_default", derive(Default))]
35482#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35483#[cfg_attr(feature = "derive_clone", derive(Clone))]
35484#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35485pub struct EnvironmentCommodityOther1 {
35486	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
35487	pub base_pdct: AssetClassProductType3Code,
35488	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
35489	pub sub_pdct: AssetClassSubProductType49Code,
35490}
35491
35492impl EnvironmentCommodityOther1 {
35493	pub fn validate(&self) -> Result<(), ValidationError> {
35494		self.base_pdct.validate()?;
35495		self.sub_pdct.validate()?;
35496		Ok(())
35497	}
35498}
35499
35500
35501// EnvironmentCommodityOther2 ...
35502#[cfg_attr(feature = "derive_debug", derive(Debug))]
35503#[cfg_attr(feature = "derive_default", derive(Default))]
35504#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35505#[cfg_attr(feature = "derive_clone", derive(Clone))]
35506#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35507pub struct EnvironmentCommodityOther2 {
35508	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
35509	pub base_pdct: AssetClassProductType3Code,
35510	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
35511	pub sub_pdct: Option<AssetClassSubProductType49Code>,
35512}
35513
35514impl EnvironmentCommodityOther2 {
35515	pub fn validate(&self) -> Result<(), ValidationError> {
35516		self.base_pdct.validate()?;
35517		if let Some(ref val) = self.sub_pdct { val.validate()? }
35518		Ok(())
35519	}
35520}
35521
35522
35523// EnvironmentalCommodityCarbonRelated1 ...
35524#[cfg_attr(feature = "derive_debug", derive(Debug))]
35525#[cfg_attr(feature = "derive_default", derive(Default))]
35526#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35527#[cfg_attr(feature = "derive_clone", derive(Clone))]
35528#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35529pub struct EnvironmentalCommodityCarbonRelated1 {
35530	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
35531	pub base_pdct: AssetClassProductType3Code,
35532	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
35533	pub sub_pdct: AssetClassSubProductType29Code,
35534}
35535
35536impl EnvironmentalCommodityCarbonRelated1 {
35537	pub fn validate(&self) -> Result<(), ValidationError> {
35538		self.base_pdct.validate()?;
35539		self.sub_pdct.validate()?;
35540		Ok(())
35541	}
35542}
35543
35544
35545// EnvironmentalCommodityCarbonRelated2 ...
35546#[cfg_attr(feature = "derive_debug", derive(Debug))]
35547#[cfg_attr(feature = "derive_default", derive(Default))]
35548#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35549#[cfg_attr(feature = "derive_clone", derive(Clone))]
35550#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35551pub struct EnvironmentalCommodityCarbonRelated2 {
35552	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
35553	pub base_pdct: AssetClassProductType3Code,
35554	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
35555	pub sub_pdct: Option<AssetClassSubProductType29Code>,
35556}
35557
35558impl EnvironmentalCommodityCarbonRelated2 {
35559	pub fn validate(&self) -> Result<(), ValidationError> {
35560		self.base_pdct.validate()?;
35561		if let Some(ref val) = self.sub_pdct { val.validate()? }
35562		Ok(())
35563	}
35564}
35565
35566
35567// EnvironmentalCommodityEmission1 ...
35568#[cfg_attr(feature = "derive_debug", derive(Debug))]
35569#[cfg_attr(feature = "derive_default", derive(Default))]
35570#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35571#[cfg_attr(feature = "derive_clone", derive(Clone))]
35572#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35573pub struct EnvironmentalCommodityEmission1 {
35574	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
35575	pub base_pdct: AssetClassProductType3Code,
35576	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
35577	pub sub_pdct: AssetClassSubProductType10Code,
35578	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
35579	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType8Code>,
35580}
35581
35582impl EnvironmentalCommodityEmission1 {
35583	pub fn validate(&self) -> Result<(), ValidationError> {
35584		self.base_pdct.validate()?;
35585		self.sub_pdct.validate()?;
35586		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
35587		Ok(())
35588	}
35589}
35590
35591
35592// EnvironmentalCommodityEmission2 ...
35593#[cfg_attr(feature = "derive_debug", derive(Debug))]
35594#[cfg_attr(feature = "derive_default", derive(Default))]
35595#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35596#[cfg_attr(feature = "derive_clone", derive(Clone))]
35597#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35598pub struct EnvironmentalCommodityEmission2 {
35599	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
35600	pub base_pdct: AssetClassProductType3Code,
35601	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
35602	pub sub_pdct: AssetClassSubProductType10Code,
35603	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct") )]
35604	pub addtl_sub_pdct: AssetClassDetailedSubProductType8Code,
35605}
35606
35607impl EnvironmentalCommodityEmission2 {
35608	pub fn validate(&self) -> Result<(), ValidationError> {
35609		self.base_pdct.validate()?;
35610		self.sub_pdct.validate()?;
35611		self.addtl_sub_pdct.validate()?;
35612		Ok(())
35613	}
35614}
35615
35616
35617// EnvironmentalCommodityEmission3 ...
35618#[cfg_attr(feature = "derive_debug", derive(Debug))]
35619#[cfg_attr(feature = "derive_default", derive(Default))]
35620#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35621#[cfg_attr(feature = "derive_clone", derive(Clone))]
35622#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35623pub struct EnvironmentalCommodityEmission3 {
35624	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
35625	pub base_pdct: AssetClassProductType3Code,
35626	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
35627	pub sub_pdct: Option<AssetClassSubProductType10Code>,
35628	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
35629	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType8Code>,
35630}
35631
35632impl EnvironmentalCommodityEmission3 {
35633	pub fn validate(&self) -> Result<(), ValidationError> {
35634		self.base_pdct.validate()?;
35635		if let Some(ref val) = self.sub_pdct { val.validate()? }
35636		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
35637		Ok(())
35638	}
35639}
35640
35641
35642// EnvironmentalCommodityWeather1 ...
35643#[cfg_attr(feature = "derive_debug", derive(Debug))]
35644#[cfg_attr(feature = "derive_default", derive(Default))]
35645#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35646#[cfg_attr(feature = "derive_clone", derive(Clone))]
35647#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35648pub struct EnvironmentalCommodityWeather1 {
35649	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
35650	pub base_pdct: AssetClassProductType3Code,
35651	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
35652	pub sub_pdct: AssetClassSubProductType30Code,
35653}
35654
35655impl EnvironmentalCommodityWeather1 {
35656	pub fn validate(&self) -> Result<(), ValidationError> {
35657		self.base_pdct.validate()?;
35658		self.sub_pdct.validate()?;
35659		Ok(())
35660	}
35661}
35662
35663
35664// EnvironmentalCommodityWeather2 ...
35665#[cfg_attr(feature = "derive_debug", derive(Debug))]
35666#[cfg_attr(feature = "derive_default", derive(Default))]
35667#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35668#[cfg_attr(feature = "derive_clone", derive(Clone))]
35669#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35670pub struct EnvironmentalCommodityWeather2 {
35671	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
35672	pub base_pdct: AssetClassProductType3Code,
35673	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
35674	pub sub_pdct: Option<AssetClassSubProductType30Code>,
35675}
35676
35677impl EnvironmentalCommodityWeather2 {
35678	pub fn validate(&self) -> Result<(), ValidationError> {
35679		self.base_pdct.validate()?;
35680		if let Some(ref val) = self.sub_pdct { val.validate()? }
35681		Ok(())
35682	}
35683}
35684
35685
35686// Equity3 ...
35687#[cfg_attr(feature = "derive_debug", derive(Debug))]
35688#[cfg_attr(feature = "derive_default", derive(Default))]
35689#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35690#[cfg_attr(feature = "derive_clone", derive(Clone))]
35691#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35692pub struct Equity3 {
35693	#[cfg_attr( feature = "derive_serde", serde(rename = "PrefToIncm") )]
35694	pub pref_to_incm: PreferenceToIncome5Choice,
35695	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
35696	pub mtrty_dt: Option<String>,
35697	#[cfg_attr( feature = "derive_serde", serde(rename = "NonPdAmt", skip_serializing_if = "Option::is_none") )]
35698	pub non_pd_amt: Option<ActiveCurrencyAndAmount>,
35699	#[cfg_attr( feature = "derive_serde", serde(rename = "ParVal", skip_serializing_if = "Option::is_none") )]
35700	pub par_val: Option<ActiveCurrencyAndAmount>,
35701	#[cfg_attr( feature = "derive_serde", serde(rename = "VtngRghtsPerShr", skip_serializing_if = "Option::is_none") )]
35702	pub vtng_rghts_per_shr: Option<f64>,
35703}
35704
35705impl Equity3 {
35706	pub fn validate(&self) -> Result<(), ValidationError> {
35707		self.pref_to_incm.validate()?;
35708		if let Some(ref val) = self.non_pd_amt { val.validate()? }
35709		if let Some(ref val) = self.par_val { val.validate()? }
35710		Ok(())
35711	}
35712}
35713
35714
35715// EquityDerivative2 ...
35716#[cfg_attr(feature = "derive_debug", derive(Debug))]
35717#[cfg_attr(feature = "derive_default", derive(Default))]
35718#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35719#[cfg_attr(feature = "derive_clone", derive(Clone))]
35720#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35721pub struct EquityDerivative2 {
35722	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygTp") )]
35723	pub undrlyg_tp: EquityDerivative3Choice,
35724	#[cfg_attr( feature = "derive_serde", serde(rename = "Param", skip_serializing_if = "Option::is_none") )]
35725	pub param: Option<EquityReturnParameter1Code>,
35726}
35727
35728impl EquityDerivative2 {
35729	pub fn validate(&self) -> Result<(), ValidationError> {
35730		self.undrlyg_tp.validate()?;
35731		if let Some(ref val) = self.param { val.validate()? }
35732		Ok(())
35733	}
35734}
35735
35736
35737// EquityDerivative3Choice ...
35738#[cfg_attr(feature = "derive_debug", derive(Debug))]
35739#[cfg_attr(feature = "derive_default", derive(Default))]
35740#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35741#[cfg_attr(feature = "derive_clone", derive(Clone))]
35742#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35743pub struct EquityDerivative3Choice {
35744	#[cfg_attr( feature = "derive_serde", serde(rename = "Bskt", skip_serializing_if = "Option::is_none") )]
35745	pub bskt: Option<UnderlyingEquityType3Code>,
35746	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
35747	pub indx: Option<UnderlyingEquityType4Code>,
35748	#[cfg_attr( feature = "derive_serde", serde(rename = "SnglNm", skip_serializing_if = "Option::is_none") )]
35749	pub sngl_nm: Option<UnderlyingEquityType5Code>,
35750	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
35751	pub othr: Option<UnderlyingEquityType6Code>,
35752}
35753
35754impl EquityDerivative3Choice {
35755	pub fn validate(&self) -> Result<(), ValidationError> {
35756		if let Some(ref val) = self.bskt { val.validate()? }
35757		if let Some(ref val) = self.indx { val.validate()? }
35758		if let Some(ref val) = self.sngl_nm { val.validate()? }
35759		if let Some(ref val) = self.othr { val.validate()? }
35760		Ok(())
35761	}
35762}
35763
35764
35765// EquityInstrumentReportingClassification1Code ...
35766#[cfg_attr(feature = "derive_debug", derive(Debug))]
35767#[cfg_attr(feature = "derive_default", derive(Default))]
35768#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35769#[cfg_attr(feature = "derive_clone", derive(Clone))]
35770#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35771pub enum EquityInstrumentReportingClassification1Code {
35772	#[cfg_attr(feature = "derive_default", default)]
35773	#[cfg_attr( feature = "derive_serde", serde(rename = "SHRS") )]
35774	CodeSHRS,
35775	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
35776	CodeOTHR,
35777	#[cfg_attr( feature = "derive_serde", serde(rename = "ETFS") )]
35778	CodeETFS,
35779	#[cfg_attr( feature = "derive_serde", serde(rename = "DPRS") )]
35780	CodeDPRS,
35781	#[cfg_attr( feature = "derive_serde", serde(rename = "CRFT") )]
35782	CodeCRFT,
35783}
35784
35785impl EquityInstrumentReportingClassification1Code {
35786	pub fn validate(&self) -> Result<(), ValidationError> {
35787		Ok(())
35788	}
35789}
35790
35791
35792// EquityReturnParameter1Code ...
35793#[cfg_attr(feature = "derive_debug", derive(Debug))]
35794#[cfg_attr(feature = "derive_default", derive(Default))]
35795#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35796#[cfg_attr(feature = "derive_clone", derive(Clone))]
35797#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35798pub enum EquityReturnParameter1Code {
35799	#[cfg_attr(feature = "derive_default", default)]
35800	#[cfg_attr( feature = "derive_serde", serde(rename = "PRDV") )]
35801	CodePRDV,
35802	#[cfg_attr( feature = "derive_serde", serde(rename = "PRVA") )]
35803	CodePRVA,
35804	#[cfg_attr( feature = "derive_serde", serde(rename = "PRVO") )]
35805	CodePRVO,
35806	#[cfg_attr( feature = "derive_serde", serde(rename = "PRBP") )]
35807	CodePRBP,
35808}
35809
35810impl EquityReturnParameter1Code {
35811	pub fn validate(&self) -> Result<(), ValidationError> {
35812		Ok(())
35813	}
35814}
35815
35816
35817// EquivalentAmount2 ...
35818#[cfg_attr(feature = "derive_debug", derive(Debug))]
35819#[cfg_attr(feature = "derive_default", derive(Default))]
35820#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35821#[cfg_attr(feature = "derive_clone", derive(Clone))]
35822#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35823pub struct EquivalentAmount2 {
35824	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
35825	pub amt: ActiveOrHistoricCurrencyAndAmount,
35826	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyOfTrf") )]
35827	pub ccy_of_trf: String,
35828}
35829
35830impl EquivalentAmount2 {
35831	pub fn validate(&self) -> Result<(), ValidationError> {
35832		self.amt.validate()?;
35833		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
35834		if !pattern.is_match(&self.ccy_of_trf) {
35835			return Err(ValidationError::new(1005, "ccy_of_trf does not match the required pattern".to_string()));
35836		}
35837		Ok(())
35838	}
35839}
35840
35841
35842// ErrorHandling1Choice ...
35843#[cfg_attr(feature = "derive_debug", derive(Debug))]
35844#[cfg_attr(feature = "derive_default", derive(Default))]
35845#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35846#[cfg_attr(feature = "derive_clone", derive(Clone))]
35847#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35848pub struct ErrorHandling1Choice {
35849	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
35850	pub cd: Option<ErrorHandling1Code>,
35851	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
35852	pub prtry: Option<String>,
35853}
35854
35855impl ErrorHandling1Choice {
35856	pub fn validate(&self) -> Result<(), ValidationError> {
35857		if let Some(ref val) = self.cd { val.validate()? }
35858		if let Some(ref val) = self.prtry {
35859			if val.chars().count() < 1 {
35860				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
35861			}
35862			if val.chars().count() > 4 {
35863				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 4".to_string()));
35864			}
35865			let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
35866			if !pattern.is_match(val) {
35867				return Err(ValidationError::new(1005, "prtry does not match the required pattern".to_string()));
35868			}
35869		}
35870		Ok(())
35871	}
35872}
35873
35874
35875// ErrorHandling1Code ...
35876#[cfg_attr(feature = "derive_debug", derive(Debug))]
35877#[cfg_attr(feature = "derive_default", derive(Default))]
35878#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35879#[cfg_attr(feature = "derive_clone", derive(Clone))]
35880#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35881pub enum ErrorHandling1Code {
35882	#[cfg_attr(feature = "derive_default", default)]
35883	#[cfg_attr( feature = "derive_serde", serde(rename = "X020") )]
35884	CodeX020,
35885	#[cfg_attr( feature = "derive_serde", serde(rename = "X030") )]
35886	CodeX030,
35887	#[cfg_attr( feature = "derive_serde", serde(rename = "X050") )]
35888	CodeX050,
35889}
35890
35891impl ErrorHandling1Code {
35892	pub fn validate(&self) -> Result<(), ValidationError> {
35893		Ok(())
35894	}
35895}
35896
35897
35898// ErrorHandling2Choice ...
35899#[cfg_attr(feature = "derive_debug", derive(Debug))]
35900#[cfg_attr(feature = "derive_default", derive(Default))]
35901#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35902#[cfg_attr(feature = "derive_clone", derive(Clone))]
35903#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35904pub struct ErrorHandling2Choice {
35905	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
35906	pub cd: Option<ErrorHandling1Code>,
35907	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
35908	pub prtry: Option<String>,
35909}
35910
35911impl ErrorHandling2Choice {
35912	pub fn validate(&self) -> Result<(), ValidationError> {
35913		if let Some(ref val) = self.cd { val.validate()? }
35914		if let Some(ref val) = self.prtry {
35915			if val.chars().count() < 1 {
35916				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
35917			}
35918			if val.chars().count() > 35 {
35919				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
35920			}
35921		}
35922		Ok(())
35923	}
35924}
35925
35926
35927// ErrorHandling3 ...
35928#[cfg_attr(feature = "derive_debug", derive(Debug))]
35929#[cfg_attr(feature = "derive_default", derive(Default))]
35930#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35931#[cfg_attr(feature = "derive_clone", derive(Clone))]
35932#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35933pub struct ErrorHandling3 {
35934	#[cfg_attr( feature = "derive_serde", serde(rename = "Err") )]
35935	pub err: ErrorHandling1Choice,
35936	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
35937	pub desc: Option<String>,
35938}
35939
35940impl ErrorHandling3 {
35941	pub fn validate(&self) -> Result<(), ValidationError> {
35942		self.err.validate()?;
35943		if let Some(ref val) = self.desc {
35944			if val.chars().count() < 1 {
35945				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
35946			}
35947			if val.chars().count() > 140 {
35948				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 140".to_string()));
35949			}
35950		}
35951		Ok(())
35952	}
35953}
35954
35955
35956// ErrorHandling3Choice ...
35957#[cfg_attr(feature = "derive_debug", derive(Debug))]
35958#[cfg_attr(feature = "derive_default", derive(Default))]
35959#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35960#[cfg_attr(feature = "derive_clone", derive(Clone))]
35961#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35962pub struct ErrorHandling3Choice {
35963	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
35964	pub cd: Option<String>,
35965	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
35966	pub prtry: Option<String>,
35967}
35968
35969impl ErrorHandling3Choice {
35970	pub fn validate(&self) -> Result<(), ValidationError> {
35971		if let Some(ref val) = self.cd {
35972			if val.chars().count() < 1 {
35973				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
35974			}
35975			if val.chars().count() > 4 {
35976				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
35977			}
35978		}
35979		if let Some(ref val) = self.prtry {
35980			if val.chars().count() < 1 {
35981				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
35982			}
35983			if val.chars().count() > 35 {
35984				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
35985			}
35986		}
35987		Ok(())
35988	}
35989}
35990
35991
35992// ErrorHandling4 ...
35993#[cfg_attr(feature = "derive_debug", derive(Debug))]
35994#[cfg_attr(feature = "derive_default", derive(Default))]
35995#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
35996#[cfg_attr(feature = "derive_clone", derive(Clone))]
35997#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
35998pub struct ErrorHandling4 {
35999	#[cfg_attr( feature = "derive_serde", serde(rename = "Err") )]
36000	pub err: ErrorHandling2Choice,
36001	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
36002	pub desc: Option<String>,
36003}
36004
36005impl ErrorHandling4 {
36006	pub fn validate(&self) -> Result<(), ValidationError> {
36007		self.err.validate()?;
36008		if let Some(ref val) = self.desc {
36009			if val.chars().count() < 1 {
36010				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
36011			}
36012			if val.chars().count() > 140 {
36013				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 140".to_string()));
36014			}
36015		}
36016		Ok(())
36017	}
36018}
36019
36020
36021// ErrorHandling5 ...
36022#[cfg_attr(feature = "derive_debug", derive(Debug))]
36023#[cfg_attr(feature = "derive_default", derive(Default))]
36024#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36025#[cfg_attr(feature = "derive_clone", derive(Clone))]
36026#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36027pub struct ErrorHandling5 {
36028	#[cfg_attr( feature = "derive_serde", serde(rename = "Err") )]
36029	pub err: ErrorHandling3Choice,
36030	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
36031	pub desc: Option<String>,
36032}
36033
36034impl ErrorHandling5 {
36035	pub fn validate(&self) -> Result<(), ValidationError> {
36036		self.err.validate()?;
36037		if let Some(ref val) = self.desc {
36038			if val.chars().count() < 1 {
36039				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
36040			}
36041			if val.chars().count() > 140 {
36042				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 140".to_string()));
36043			}
36044		}
36045		Ok(())
36046	}
36047}
36048
36049
36050// EstimatedFundCashForecast5 ...
36051#[cfg_attr(feature = "derive_debug", derive(Debug))]
36052#[cfg_attr(feature = "derive_default", derive(Default))]
36053#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36054#[cfg_attr(feature = "derive_clone", derive(Clone))]
36055#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36056pub struct EstimatedFundCashForecast5 {
36057	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
36058	pub id: String,
36059	#[cfg_attr( feature = "derive_serde", serde(rename = "TradDtTm") )]
36060	pub trad_dt_tm: DateAndDateTimeChoice,
36061	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTradDtTm", skip_serializing_if = "Option::is_none") )]
36062	pub prvs_trad_dt_tm: Option<DateAndDateTimeChoice>,
36063	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmDtls") )]
36064	pub fin_instrm_dtls: FinancialInstrument9,
36065	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdTtlNAV", skip_serializing_if = "Option::is_none") )]
36066	pub estmtd_ttl_nav: Option<Vec<ActiveOrHistoricCurrencyAndAmount>>,
36067	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlNAV", skip_serializing_if = "Option::is_none") )]
36068	pub prvs_ttl_nav: Option<Vec<ActiveOrHistoricCurrencyAndAmount>>,
36069	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
36070	pub estmtd_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
36071	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
36072	pub prvs_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
36073	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdTtlNAVChngRate", skip_serializing_if = "Option::is_none") )]
36074	pub estmtd_ttl_nav_chng_rate: Option<f64>,
36075	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtCcy", skip_serializing_if = "Option::is_none") )]
36076	pub invstmt_ccy: Option<Vec<String>>,
36077	#[cfg_attr( feature = "derive_serde", serde(rename = "CcySts", skip_serializing_if = "Option::is_none") )]
36078	pub ccy_sts: Option<CurrencyDesignation1>,
36079	#[cfg_attr( feature = "derive_serde", serde(rename = "XcptnlNetCshFlowInd") )]
36080	pub xcptnl_net_csh_flow_ind: bool,
36081	#[cfg_attr( feature = "derive_serde", serde(rename = "Pric", skip_serializing_if = "Option::is_none") )]
36082	pub pric: Option<UnitPrice19>,
36083	#[cfg_attr( feature = "derive_serde", serde(rename = "FXRate", skip_serializing_if = "Option::is_none") )]
36084	pub fx_rate: Option<ForeignExchangeTerms19>,
36085	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdPctgOfShrClssTtlNAV", skip_serializing_if = "Option::is_none") )]
36086	pub estmtd_pctg_of_shr_clss_ttl_nav: Option<f64>,
36087	#[cfg_attr( feature = "derive_serde", serde(rename = "BrkdwnByPty", skip_serializing_if = "Option::is_none") )]
36088	pub brkdwn_by_pty: Option<Vec<BreakdownByParty3>>,
36089	#[cfg_attr( feature = "derive_serde", serde(rename = "BrkdwnByCtry", skip_serializing_if = "Option::is_none") )]
36090	pub brkdwn_by_ctry: Option<Vec<BreakdownByCountry2>>,
36091	#[cfg_attr( feature = "derive_serde", serde(rename = "BrkdwnByCcy", skip_serializing_if = "Option::is_none") )]
36092	pub brkdwn_by_ccy: Option<Vec<BreakdownByCurrency2>>,
36093	#[cfg_attr( feature = "derive_serde", serde(rename = "BrkdwnByUsrDfndParam", skip_serializing_if = "Option::is_none") )]
36094	pub brkdwn_by_usr_dfnd_param: Option<Vec<BreakdownByUserDefinedParameter3>>,
36095	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdNetCshFcstDtls", skip_serializing_if = "Option::is_none") )]
36096	pub estmtd_net_csh_fcst_dtls: Option<Vec<NetCashForecast4>>,
36097}
36098
36099impl EstimatedFundCashForecast5 {
36100	pub fn validate(&self) -> Result<(), ValidationError> {
36101		if self.id.chars().count() < 1 {
36102			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
36103		}
36104		if self.id.chars().count() > 35 {
36105			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
36106		}
36107		self.trad_dt_tm.validate()?;
36108		if let Some(ref val) = self.prvs_trad_dt_tm { val.validate()? }
36109		self.fin_instrm_dtls.validate()?;
36110		if let Some(ref vec) = self.estmtd_ttl_nav { for item in vec { item.validate()? } }
36111		if let Some(ref vec) = self.prvs_ttl_nav { for item in vec { item.validate()? } }
36112		if let Some(ref val) = self.estmtd_ttl_units_nb { val.validate()? }
36113		if let Some(ref val) = self.prvs_ttl_units_nb { val.validate()? }
36114		if let Some(ref vec) = self.invstmt_ccy {
36115			for item in vec {
36116				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
36117				if !pattern.is_match(&item) {
36118					return Err(ValidationError::new(1005, "invstmt_ccy does not match the required pattern".to_string()));
36119				}
36120			}
36121		}
36122		if let Some(ref val) = self.ccy_sts { val.validate()? }
36123		if let Some(ref val) = self.pric { val.validate()? }
36124		if let Some(ref val) = self.fx_rate { val.validate()? }
36125		if let Some(ref vec) = self.brkdwn_by_pty { for item in vec { item.validate()? } }
36126		if let Some(ref vec) = self.brkdwn_by_ctry { for item in vec { item.validate()? } }
36127		if let Some(ref vec) = self.brkdwn_by_ccy { for item in vec { item.validate()? } }
36128		if let Some(ref vec) = self.brkdwn_by_usr_dfnd_param { for item in vec { item.validate()? } }
36129		if let Some(ref vec) = self.estmtd_net_csh_fcst_dtls { for item in vec { item.validate()? } }
36130		Ok(())
36131	}
36132}
36133
36134
36135// EstimatedFundCashForecast6 ...
36136#[cfg_attr(feature = "derive_debug", derive(Debug))]
36137#[cfg_attr(feature = "derive_default", derive(Default))]
36138#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36139#[cfg_attr(feature = "derive_clone", derive(Clone))]
36140#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36141pub struct EstimatedFundCashForecast6 {
36142	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
36143	pub id: String,
36144	#[cfg_attr( feature = "derive_serde", serde(rename = "TradDtTm") )]
36145	pub trad_dt_tm: DateAndDateTimeChoice,
36146	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTradDtTm", skip_serializing_if = "Option::is_none") )]
36147	pub prvs_trad_dt_tm: Option<DateAndDateTimeChoice>,
36148	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmDtls") )]
36149	pub fin_instrm_dtls: FinancialInstrument9,
36150	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdTtlNAV", skip_serializing_if = "Option::is_none") )]
36151	pub estmtd_ttl_nav: Option<Vec<ActiveOrHistoricCurrencyAndAmount>>,
36152	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlNAV", skip_serializing_if = "Option::is_none") )]
36153	pub prvs_ttl_nav: Option<Vec<ActiveOrHistoricCurrencyAndAmount>>,
36154	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
36155	pub estmtd_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
36156	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
36157	pub prvs_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
36158	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdTtlNAVChngRate", skip_serializing_if = "Option::is_none") )]
36159	pub estmtd_ttl_nav_chng_rate: Option<f64>,
36160	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtCcy", skip_serializing_if = "Option::is_none") )]
36161	pub invstmt_ccy: Option<Vec<String>>,
36162	#[cfg_attr( feature = "derive_serde", serde(rename = "CcySts", skip_serializing_if = "Option::is_none") )]
36163	pub ccy_sts: Option<CurrencyDesignation1>,
36164	#[cfg_attr( feature = "derive_serde", serde(rename = "XcptnlNetCshFlowInd") )]
36165	pub xcptnl_net_csh_flow_ind: bool,
36166	#[cfg_attr( feature = "derive_serde", serde(rename = "Pric", skip_serializing_if = "Option::is_none") )]
36167	pub pric: Option<UnitPrice19>,
36168	#[cfg_attr( feature = "derive_serde", serde(rename = "FXRate", skip_serializing_if = "Option::is_none") )]
36169	pub fx_rate: Option<ForeignExchangeTerms19>,
36170	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdPctgOfShrClssTtlNAV", skip_serializing_if = "Option::is_none") )]
36171	pub estmtd_pctg_of_shr_clss_ttl_nav: Option<f64>,
36172	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdCshInFcstDtls", skip_serializing_if = "Option::is_none") )]
36173	pub estmtd_csh_in_fcst_dtls: Option<Vec<CashInForecast6>>,
36174	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdCshOutFcstDtls", skip_serializing_if = "Option::is_none") )]
36175	pub estmtd_csh_out_fcst_dtls: Option<Vec<CashOutForecast6>>,
36176	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdNetCshFcstDtls", skip_serializing_if = "Option::is_none") )]
36177	pub estmtd_net_csh_fcst_dtls: Option<Vec<NetCashForecast4>>,
36178}
36179
36180impl EstimatedFundCashForecast6 {
36181	pub fn validate(&self) -> Result<(), ValidationError> {
36182		if self.id.chars().count() < 1 {
36183			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
36184		}
36185		if self.id.chars().count() > 35 {
36186			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
36187		}
36188		self.trad_dt_tm.validate()?;
36189		if let Some(ref val) = self.prvs_trad_dt_tm { val.validate()? }
36190		self.fin_instrm_dtls.validate()?;
36191		if let Some(ref vec) = self.estmtd_ttl_nav { for item in vec { item.validate()? } }
36192		if let Some(ref vec) = self.prvs_ttl_nav { for item in vec { item.validate()? } }
36193		if let Some(ref val) = self.estmtd_ttl_units_nb { val.validate()? }
36194		if let Some(ref val) = self.prvs_ttl_units_nb { val.validate()? }
36195		if let Some(ref vec) = self.invstmt_ccy {
36196			for item in vec {
36197				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
36198				if !pattern.is_match(&item) {
36199					return Err(ValidationError::new(1005, "invstmt_ccy does not match the required pattern".to_string()));
36200				}
36201			}
36202		}
36203		if let Some(ref val) = self.ccy_sts { val.validate()? }
36204		if let Some(ref val) = self.pric { val.validate()? }
36205		if let Some(ref val) = self.fx_rate { val.validate()? }
36206		if let Some(ref vec) = self.estmtd_csh_in_fcst_dtls { for item in vec { item.validate()? } }
36207		if let Some(ref vec) = self.estmtd_csh_out_fcst_dtls { for item in vec { item.validate()? } }
36208		if let Some(ref vec) = self.estmtd_net_csh_fcst_dtls { for item in vec { item.validate()? } }
36209		Ok(())
36210	}
36211}
36212
36213
36214// Event1 ...
36215#[cfg_attr(feature = "derive_debug", derive(Debug))]
36216#[cfg_attr(feature = "derive_default", derive(Default))]
36217#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36218#[cfg_attr(feature = "derive_clone", derive(Clone))]
36219#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36220pub struct Event1 {
36221	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtCd") )]
36222	pub evt_cd: String,
36223	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtParam", skip_serializing_if = "Option::is_none") )]
36224	pub evt_param: Option<Vec<String>>,
36225	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDesc", skip_serializing_if = "Option::is_none") )]
36226	pub evt_desc: Option<String>,
36227	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtTm", skip_serializing_if = "Option::is_none") )]
36228	pub evt_tm: Option<String>,
36229}
36230
36231impl Event1 {
36232	pub fn validate(&self) -> Result<(), ValidationError> {
36233		if self.evt_cd.chars().count() < 1 {
36234			return Err(ValidationError::new(1001, "evt_cd is shorter than the minimum length of 1".to_string()));
36235		}
36236		if self.evt_cd.chars().count() > 4 {
36237			return Err(ValidationError::new(1002, "evt_cd exceeds the maximum length of 4".to_string()));
36238		}
36239		let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
36240		if !pattern.is_match(&self.evt_cd) {
36241			return Err(ValidationError::new(1005, "evt_cd does not match the required pattern".to_string()));
36242		}
36243		if let Some(ref vec) = self.evt_param {
36244			for item in vec {
36245				if item.chars().count() < 1 {
36246					return Err(ValidationError::new(1001, "evt_param is shorter than the minimum length of 1".to_string()));
36247				}
36248				if item.chars().count() > 35 {
36249					return Err(ValidationError::new(1002, "evt_param exceeds the maximum length of 35".to_string()));
36250				}
36251			}
36252		}
36253		if let Some(ref val) = self.evt_desc {
36254			if val.chars().count() < 1 {
36255				return Err(ValidationError::new(1001, "evt_desc is shorter than the minimum length of 1".to_string()));
36256			}
36257			if val.chars().count() > 350 {
36258				return Err(ValidationError::new(1002, "evt_desc exceeds the maximum length of 350".to_string()));
36259			}
36260		}
36261		Ok(())
36262	}
36263}
36264
36265
36266// Event2 ...
36267#[cfg_attr(feature = "derive_debug", derive(Debug))]
36268#[cfg_attr(feature = "derive_default", derive(Default))]
36269#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36270#[cfg_attr(feature = "derive_clone", derive(Clone))]
36271#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36272pub struct Event2 {
36273	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtCd") )]
36274	pub evt_cd: String,
36275	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtParam", skip_serializing_if = "Option::is_none") )]
36276	pub evt_param: Option<Vec<String>>,
36277	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDesc", skip_serializing_if = "Option::is_none") )]
36278	pub evt_desc: Option<String>,
36279	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtTm", skip_serializing_if = "Option::is_none") )]
36280	pub evt_tm: Option<String>,
36281}
36282
36283impl Event2 {
36284	pub fn validate(&self) -> Result<(), ValidationError> {
36285		if self.evt_cd.chars().count() < 1 {
36286			return Err(ValidationError::new(1001, "evt_cd is shorter than the minimum length of 1".to_string()));
36287		}
36288		if self.evt_cd.chars().count() > 4 {
36289			return Err(ValidationError::new(1002, "evt_cd exceeds the maximum length of 4".to_string()));
36290		}
36291		let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
36292		if !pattern.is_match(&self.evt_cd) {
36293			return Err(ValidationError::new(1005, "evt_cd does not match the required pattern".to_string()));
36294		}
36295		if let Some(ref vec) = self.evt_param {
36296			for item in vec {
36297				if item.chars().count() < 1 {
36298					return Err(ValidationError::new(1001, "evt_param is shorter than the minimum length of 1".to_string()));
36299				}
36300				if item.chars().count() > 35 {
36301					return Err(ValidationError::new(1002, "evt_param exceeds the maximum length of 35".to_string()));
36302				}
36303			}
36304		}
36305		if let Some(ref val) = self.evt_desc {
36306			if val.chars().count() < 1 {
36307				return Err(ValidationError::new(1001, "evt_desc is shorter than the minimum length of 1".to_string()));
36308			}
36309			if val.chars().count() > 1000 {
36310				return Err(ValidationError::new(1002, "evt_desc exceeds the maximum length of 1000".to_string()));
36311			}
36312		}
36313		Ok(())
36314	}
36315}
36316
36317
36318// EventFrequency10Code ...
36319#[cfg_attr(feature = "derive_debug", derive(Debug))]
36320#[cfg_attr(feature = "derive_default", derive(Default))]
36321#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36322#[cfg_attr(feature = "derive_clone", derive(Clone))]
36323#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36324pub enum EventFrequency10Code {
36325	#[cfg_attr(feature = "derive_default", default)]
36326	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
36327	CodeDAIL,
36328	#[cfg_attr( feature = "derive_serde", serde(rename = "ADHO") )]
36329	CodeADHO,
36330}
36331
36332impl EventFrequency10Code {
36333	pub fn validate(&self) -> Result<(), ValidationError> {
36334		Ok(())
36335	}
36336}
36337
36338
36339// EventFrequency1Code ...
36340#[cfg_attr(feature = "derive_debug", derive(Debug))]
36341#[cfg_attr(feature = "derive_default", derive(Default))]
36342#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36343#[cfg_attr(feature = "derive_clone", derive(Clone))]
36344#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36345pub enum EventFrequency1Code {
36346	#[cfg_attr(feature = "derive_default", default)]
36347	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
36348	CodeYEAR,
36349	#[cfg_attr( feature = "derive_serde", serde(rename = "SEMI") )]
36350	CodeSEMI,
36351	#[cfg_attr( feature = "derive_serde", serde(rename = "QUTR") )]
36352	CodeQUTR,
36353	#[cfg_attr( feature = "derive_serde", serde(rename = "TOMN") )]
36354	CodeTOMN,
36355	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
36356	CodeMNTH,
36357	#[cfg_attr( feature = "derive_serde", serde(rename = "TWMN") )]
36358	CodeTWMN,
36359	#[cfg_attr( feature = "derive_serde", serde(rename = "TOWK") )]
36360	CodeTOWK,
36361	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
36362	CodeWEEK,
36363	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
36364	CodeDAIL,
36365	#[cfg_attr( feature = "derive_serde", serde(rename = "ADHO") )]
36366	CodeADHO,
36367	#[cfg_attr( feature = "derive_serde", serde(rename = "INDA") )]
36368	CodeINDA,
36369	#[cfg_attr( feature = "derive_serde", serde(rename = "OVNG") )]
36370	CodeOVNG,
36371	#[cfg_attr( feature = "derive_serde", serde(rename = "ONDE") )]
36372	CodeONDE,
36373}
36374
36375impl EventFrequency1Code {
36376	pub fn validate(&self) -> Result<(), ValidationError> {
36377		Ok(())
36378	}
36379}
36380
36381
36382// EventFrequency5Code ...
36383#[cfg_attr(feature = "derive_debug", derive(Debug))]
36384#[cfg_attr(feature = "derive_default", derive(Default))]
36385#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36386#[cfg_attr(feature = "derive_clone", derive(Clone))]
36387#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36388pub enum EventFrequency5Code {
36389	#[cfg_attr(feature = "derive_default", default)]
36390	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
36391	CodeYEAR,
36392	#[cfg_attr( feature = "derive_serde", serde(rename = "SEMI") )]
36393	CodeSEMI,
36394	#[cfg_attr( feature = "derive_serde", serde(rename = "QUTR") )]
36395	CodeQUTR,
36396	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
36397	CodeMNTH,
36398	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
36399	CodeWEEK,
36400	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
36401	CodeDAIL,
36402	#[cfg_attr( feature = "derive_serde", serde(rename = "CLOS") )]
36403	CodeCLOS,
36404	#[cfg_attr( feature = "derive_serde", serde(rename = "TOMN") )]
36405	CodeTOMN,
36406	#[cfg_attr( feature = "derive_serde", serde(rename = "TOWK") )]
36407	CodeTOWK,
36408	#[cfg_attr( feature = "derive_serde", serde(rename = "TWMN") )]
36409	CodeTWMN,
36410}
36411
36412impl EventFrequency5Code {
36413	pub fn validate(&self) -> Result<(), ValidationError> {
36414		Ok(())
36415	}
36416}
36417
36418
36419// EventFrequency7Code ...
36420#[cfg_attr(feature = "derive_debug", derive(Debug))]
36421#[cfg_attr(feature = "derive_default", derive(Default))]
36422#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36423#[cfg_attr(feature = "derive_clone", derive(Clone))]
36424#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36425pub enum EventFrequency7Code {
36426	#[cfg_attr(feature = "derive_default", default)]
36427	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
36428	CodeYEAR,
36429	#[cfg_attr( feature = "derive_serde", serde(rename = "ADHO") )]
36430	CodeADHO,
36431	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
36432	CodeMNTH,
36433	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
36434	CodeDAIL,
36435	#[cfg_attr( feature = "derive_serde", serde(rename = "INDA") )]
36436	CodeINDA,
36437	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
36438	CodeWEEK,
36439	#[cfg_attr( feature = "derive_serde", serde(rename = "SEMI") )]
36440	CodeSEMI,
36441	#[cfg_attr( feature = "derive_serde", serde(rename = "QUTR") )]
36442	CodeQUTR,
36443	#[cfg_attr( feature = "derive_serde", serde(rename = "TOMN") )]
36444	CodeTOMN,
36445	#[cfg_attr( feature = "derive_serde", serde(rename = "TOWK") )]
36446	CodeTOWK,
36447	#[cfg_attr( feature = "derive_serde", serde(rename = "TWMN") )]
36448	CodeTWMN,
36449	#[cfg_attr( feature = "derive_serde", serde(rename = "OVNG") )]
36450	CodeOVNG,
36451	#[cfg_attr( feature = "derive_serde", serde(rename = "ONDE") )]
36452	CodeONDE,
36453}
36454
36455impl EventFrequency7Code {
36456	pub fn validate(&self) -> Result<(), ValidationError> {
36457		Ok(())
36458	}
36459}
36460
36461
36462// EventFrequency8Code ...
36463#[cfg_attr(feature = "derive_debug", derive(Debug))]
36464#[cfg_attr(feature = "derive_default", derive(Default))]
36465#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36466#[cfg_attr(feature = "derive_clone", derive(Clone))]
36467#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36468pub enum EventFrequency8Code {
36469	#[cfg_attr(feature = "derive_default", default)]
36470	#[cfg_attr( feature = "derive_serde", serde(rename = "ADHO") )]
36471	CodeADHO,
36472	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
36473	CodeYEAR,
36474	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
36475	CodeDAIL,
36476	#[cfg_attr( feature = "derive_serde", serde(rename = "FOMN") )]
36477	CodeFOMN,
36478	#[cfg_attr( feature = "derive_serde", serde(rename = "TOMN") )]
36479	CodeTOMN,
36480	#[cfg_attr( feature = "derive_serde", serde(rename = "TOWK") )]
36481	CodeTOWK,
36482	#[cfg_attr( feature = "derive_serde", serde(rename = "TYEA") )]
36483	CodeTYEA,
36484	#[cfg_attr( feature = "derive_serde", serde(rename = "INDA") )]
36485	CodeINDA,
36486	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
36487	CodeMNTH,
36488	#[cfg_attr( feature = "derive_serde", serde(rename = "ONDE") )]
36489	CodeONDE,
36490	#[cfg_attr( feature = "derive_serde", serde(rename = "OVNG") )]
36491	CodeOVNG,
36492	#[cfg_attr( feature = "derive_serde", serde(rename = "QUTR") )]
36493	CodeQUTR,
36494	#[cfg_attr( feature = "derive_serde", serde(rename = "SEMI") )]
36495	CodeSEMI,
36496	#[cfg_attr( feature = "derive_serde", serde(rename = "TWMN") )]
36497	CodeTWMN,
36498	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
36499	CodeWEEK,
36500}
36501
36502impl EventFrequency8Code {
36503	pub fn validate(&self) -> Result<(), ValidationError> {
36504		Ok(())
36505	}
36506}
36507
36508
36509// EventFrequency9Code ...
36510#[cfg_attr(feature = "derive_debug", derive(Debug))]
36511#[cfg_attr(feature = "derive_default", derive(Default))]
36512#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36513#[cfg_attr(feature = "derive_clone", derive(Clone))]
36514#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36515pub enum EventFrequency9Code {
36516	#[cfg_attr(feature = "derive_default", default)]
36517	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
36518	CodeYEAR,
36519	#[cfg_attr( feature = "derive_serde", serde(rename = "SEMI") )]
36520	CodeSEMI,
36521	#[cfg_attr( feature = "derive_serde", serde(rename = "QUTR") )]
36522	CodeQUTR,
36523	#[cfg_attr( feature = "derive_serde", serde(rename = "TOMN") )]
36524	CodeTOMN,
36525	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
36526	CodeMNTH,
36527	#[cfg_attr( feature = "derive_serde", serde(rename = "TWMN") )]
36528	CodeTWMN,
36529	#[cfg_attr( feature = "derive_serde", serde(rename = "TOWK") )]
36530	CodeTOWK,
36531	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
36532	CodeWEEK,
36533	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
36534	CodeDAIL,
36535	#[cfg_attr( feature = "derive_serde", serde(rename = "ADHO") )]
36536	CodeADHO,
36537	#[cfg_attr( feature = "derive_serde", serde(rename = "INDA") )]
36538	CodeINDA,
36539	#[cfg_attr( feature = "derive_serde", serde(rename = "OVNG") )]
36540	CodeOVNG,
36541	#[cfg_attr( feature = "derive_serde", serde(rename = "ONDE") )]
36542	CodeONDE,
36543	#[cfg_attr( feature = "derive_serde", serde(rename = "NONE") )]
36544	CodeNONE,
36545}
36546
36547impl EventFrequency9Code {
36548	pub fn validate(&self) -> Result<(), ValidationError> {
36549		Ok(())
36550	}
36551}
36552
36553
36554// EventIdentifier1Choice ...
36555#[cfg_attr(feature = "derive_debug", derive(Debug))]
36556#[cfg_attr(feature = "derive_default", derive(Default))]
36557#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36558#[cfg_attr(feature = "derive_clone", derive(Clone))]
36559#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36560pub struct EventIdentifier1Choice {
36561	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtIdr", skip_serializing_if = "Option::is_none") )]
36562	pub evt_idr: Option<String>,
36563	#[cfg_attr( feature = "derive_serde", serde(rename = "PstTradRskRdctnIdr", skip_serializing_if = "Option::is_none") )]
36564	pub pst_trad_rsk_rdctn_idr: Option<PostTradeRiskReductionIdentifier1>,
36565}
36566
36567impl EventIdentifier1Choice {
36568	pub fn validate(&self) -> Result<(), ValidationError> {
36569		if let Some(ref val) = self.evt_idr {
36570			let pattern = Regex::new("[A-Z0-9]{18}[0-9]{2}[A-Z0-9]{0,32}").unwrap();
36571			if !pattern.is_match(val) {
36572				return Err(ValidationError::new(1005, "evt_idr does not match the required pattern".to_string()));
36573			}
36574		}
36575		if let Some(ref val) = self.pst_trad_rsk_rdctn_idr { val.validate()? }
36576		Ok(())
36577	}
36578}
36579
36580
36581// EventType1Choice ...
36582#[cfg_attr(feature = "derive_debug", derive(Debug))]
36583#[cfg_attr(feature = "derive_default", derive(Default))]
36584#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36585#[cfg_attr(feature = "derive_clone", derive(Clone))]
36586#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36587pub struct EventType1Choice {
36588	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
36589	pub cd: Option<String>,
36590	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
36591	pub prtry: Option<String>,
36592}
36593
36594impl EventType1Choice {
36595	pub fn validate(&self) -> Result<(), ValidationError> {
36596		if let Some(ref val) = self.cd {
36597			if val.chars().count() < 1 {
36598				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
36599			}
36600			if val.chars().count() > 4 {
36601				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
36602			}
36603		}
36604		if let Some(ref val) = self.prtry {
36605			if val.chars().count() < 1 {
36606				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
36607			}
36608			if val.chars().count() > 35 {
36609				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
36610			}
36611		}
36612		Ok(())
36613	}
36614}
36615
36616
36617// ExPostCostCalculationBasis1Choice ...
36618#[cfg_attr(feature = "derive_debug", derive(Debug))]
36619#[cfg_attr(feature = "derive_default", derive(Default))]
36620#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36621#[cfg_attr(feature = "derive_clone", derive(Clone))]
36622#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36623pub struct ExPostCostCalculationBasis1Choice {
36624	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
36625	pub cd: Option<ExPostCostCalculationBasis1Code>,
36626	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
36627	pub prtry: Option<GenericIdentification47>,
36628}
36629
36630impl ExPostCostCalculationBasis1Choice {
36631	pub fn validate(&self) -> Result<(), ValidationError> {
36632		if let Some(ref val) = self.cd { val.validate()? }
36633		if let Some(ref val) = self.prtry { val.validate()? }
36634		Ok(())
36635	}
36636}
36637
36638
36639// ExPostCostCalculationBasis1Code ...
36640#[cfg_attr(feature = "derive_debug", derive(Debug))]
36641#[cfg_attr(feature = "derive_default", derive(Default))]
36642#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36643#[cfg_attr(feature = "derive_clone", derive(Clone))]
36644#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36645pub enum ExPostCostCalculationBasis1Code {
36646	#[cfg_attr(feature = "derive_default", default)]
36647	#[cfg_attr( feature = "derive_serde", serde(rename = "FIXB") )]
36648	CodeFIXB,
36649	#[cfg_attr( feature = "derive_serde", serde(rename = "ROLL") )]
36650	CodeROLL,
36651}
36652
36653impl ExPostCostCalculationBasis1Code {
36654	pub fn validate(&self) -> Result<(), ValidationError> {
36655		Ok(())
36656	}
36657}
36658
36659
36660// ExchangeRate1 ...
36661#[cfg_attr(feature = "derive_debug", derive(Debug))]
36662#[cfg_attr(feature = "derive_default", derive(Default))]
36663#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36664#[cfg_attr(feature = "derive_clone", derive(Clone))]
36665#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36666pub struct ExchangeRate1 {
36667	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitCcy", skip_serializing_if = "Option::is_none") )]
36668	pub unit_ccy: Option<String>,
36669	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate", skip_serializing_if = "Option::is_none") )]
36670	pub xchg_rate: Option<f64>,
36671	#[cfg_attr( feature = "derive_serde", serde(rename = "RateTp", skip_serializing_if = "Option::is_none") )]
36672	pub rate_tp: Option<ExchangeRateType1Code>,
36673	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctId", skip_serializing_if = "Option::is_none") )]
36674	pub ctrct_id: Option<String>,
36675}
36676
36677impl ExchangeRate1 {
36678	pub fn validate(&self) -> Result<(), ValidationError> {
36679		if let Some(ref val) = self.unit_ccy {
36680			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
36681			if !pattern.is_match(val) {
36682				return Err(ValidationError::new(1005, "unit_ccy does not match the required pattern".to_string()));
36683			}
36684		}
36685		if let Some(ref val) = self.rate_tp { val.validate()? }
36686		if let Some(ref val) = self.ctrct_id {
36687			if val.chars().count() < 1 {
36688				return Err(ValidationError::new(1001, "ctrct_id is shorter than the minimum length of 1".to_string()));
36689			}
36690			if val.chars().count() > 35 {
36691				return Err(ValidationError::new(1002, "ctrct_id exceeds the maximum length of 35".to_string()));
36692			}
36693		}
36694		Ok(())
36695	}
36696}
36697
36698
36699// ExchangeRateBasis1 ...
36700#[cfg_attr(feature = "derive_debug", derive(Debug))]
36701#[cfg_attr(feature = "derive_default", derive(Default))]
36702#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36703#[cfg_attr(feature = "derive_clone", derive(Clone))]
36704#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36705pub struct ExchangeRateBasis1 {
36706	#[cfg_attr( feature = "derive_serde", serde(rename = "BaseCcy") )]
36707	pub base_ccy: String,
36708	#[cfg_attr( feature = "derive_serde", serde(rename = "QtdCcy") )]
36709	pub qtd_ccy: String,
36710}
36711
36712impl ExchangeRateBasis1 {
36713	pub fn validate(&self) -> Result<(), ValidationError> {
36714		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
36715		if !pattern.is_match(&self.base_ccy) {
36716			return Err(ValidationError::new(1005, "base_ccy does not match the required pattern".to_string()));
36717		}
36718		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
36719		if !pattern.is_match(&self.qtd_ccy) {
36720			return Err(ValidationError::new(1005, "qtd_ccy does not match the required pattern".to_string()));
36721		}
36722		Ok(())
36723	}
36724}
36725
36726
36727// ExchangeRateBasis1Choice ...
36728#[cfg_attr(feature = "derive_debug", derive(Debug))]
36729#[cfg_attr(feature = "derive_default", derive(Default))]
36730#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36731#[cfg_attr(feature = "derive_clone", derive(Clone))]
36732#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36733pub struct ExchangeRateBasis1Choice {
36734	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyPair", skip_serializing_if = "Option::is_none") )]
36735	pub ccy_pair: Option<ExchangeRateBasis1>,
36736	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
36737	pub prtry: Option<String>,
36738}
36739
36740impl ExchangeRateBasis1Choice {
36741	pub fn validate(&self) -> Result<(), ValidationError> {
36742		if let Some(ref val) = self.ccy_pair { val.validate()? }
36743		if let Some(ref val) = self.prtry {
36744			if val.chars().count() < 1 {
36745				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
36746			}
36747			if val.chars().count() > 52 {
36748				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 52".to_string()));
36749			}
36750		}
36751		Ok(())
36752	}
36753}
36754
36755
36756// ExchangeRateInformation1 ...
36757#[cfg_attr(feature = "derive_debug", derive(Debug))]
36758#[cfg_attr(feature = "derive_default", derive(Default))]
36759#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36760#[cfg_attr(feature = "derive_clone", derive(Clone))]
36761#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36762pub struct ExchangeRateInformation1 {
36763	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate", skip_serializing_if = "Option::is_none") )]
36764	pub xchg_rate: Option<f64>,
36765	#[cfg_attr( feature = "derive_serde", serde(rename = "RateTp", skip_serializing_if = "Option::is_none") )]
36766	pub rate_tp: Option<ExchangeRateType1Code>,
36767	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctId", skip_serializing_if = "Option::is_none") )]
36768	pub ctrct_id: Option<String>,
36769}
36770
36771impl ExchangeRateInformation1 {
36772	pub fn validate(&self) -> Result<(), ValidationError> {
36773		if let Some(ref val) = self.rate_tp { val.validate()? }
36774		if let Some(ref val) = self.ctrct_id {
36775			if val.chars().count() < 1 {
36776				return Err(ValidationError::new(1001, "ctrct_id is shorter than the minimum length of 1".to_string()));
36777			}
36778			if val.chars().count() > 35 {
36779				return Err(ValidationError::new(1002, "ctrct_id exceeds the maximum length of 35".to_string()));
36780			}
36781		}
36782		Ok(())
36783	}
36784}
36785
36786
36787// ExchangeRateOrPercentage1Choice ...
36788#[cfg_attr(feature = "derive_debug", derive(Debug))]
36789#[cfg_attr(feature = "derive_default", derive(Default))]
36790#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36791#[cfg_attr(feature = "derive_clone", derive(Clone))]
36792#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36793pub struct ExchangeRateOrPercentage1Choice {
36794	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
36795	pub rate: Option<f64>,
36796	#[cfg_attr( feature = "derive_serde", serde(rename = "Pctg", skip_serializing_if = "Option::is_none") )]
36797	pub pctg: Option<f64>,
36798}
36799
36800impl ExchangeRateOrPercentage1Choice {
36801	pub fn validate(&self) -> Result<(), ValidationError> {
36802		Ok(())
36803	}
36804}
36805
36806
36807// ExchangeRateReportOrError3Choice ...
36808#[cfg_attr(feature = "derive_debug", derive(Debug))]
36809#[cfg_attr(feature = "derive_default", derive(Default))]
36810#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36811#[cfg_attr(feature = "derive_clone", derive(Clone))]
36812#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36813pub struct ExchangeRateReportOrError3Choice {
36814	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyXchgRpt", skip_serializing_if = "Option::is_none") )]
36815	pub ccy_xchg_rpt: Option<Vec<CurrencyExchangeReport4>>,
36816	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
36817	pub oprl_err: Option<Vec<ErrorHandling3>>,
36818}
36819
36820impl ExchangeRateReportOrError3Choice {
36821	pub fn validate(&self) -> Result<(), ValidationError> {
36822		if let Some(ref vec) = self.ccy_xchg_rpt { for item in vec { item.validate()? } }
36823		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
36824		Ok(())
36825	}
36826}
36827
36828
36829// ExchangeRateReportOrError4Choice ...
36830#[cfg_attr(feature = "derive_debug", derive(Debug))]
36831#[cfg_attr(feature = "derive_default", derive(Default))]
36832#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36833#[cfg_attr(feature = "derive_clone", derive(Clone))]
36834#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36835pub struct ExchangeRateReportOrError4Choice {
36836	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
36837	pub biz_err: Option<Vec<ErrorHandling3>>,
36838	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyXchg", skip_serializing_if = "Option::is_none") )]
36839	pub ccy_xchg: Option<CurrencyExchange20>,
36840}
36841
36842impl ExchangeRateReportOrError4Choice {
36843	pub fn validate(&self) -> Result<(), ValidationError> {
36844		if let Some(ref vec) = self.biz_err { for item in vec { item.validate()? } }
36845		if let Some(ref val) = self.ccy_xchg { val.validate()? }
36846		Ok(())
36847	}
36848}
36849
36850
36851// ExchangeRateType1Code ...
36852#[cfg_attr(feature = "derive_debug", derive(Debug))]
36853#[cfg_attr(feature = "derive_default", derive(Default))]
36854#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36855#[cfg_attr(feature = "derive_clone", derive(Clone))]
36856#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36857pub enum ExchangeRateType1Code {
36858	#[cfg_attr(feature = "derive_default", default)]
36859	#[cfg_attr( feature = "derive_serde", serde(rename = "SPOT") )]
36860	CodeSPOT,
36861	#[cfg_attr( feature = "derive_serde", serde(rename = "SALE") )]
36862	CodeSALE,
36863	#[cfg_attr( feature = "derive_serde", serde(rename = "AGRD") )]
36864	CodeAGRD,
36865}
36866
36867impl ExchangeRateType1Code {
36868	pub fn validate(&self) -> Result<(), ValidationError> {
36869		Ok(())
36870	}
36871}
36872
36873
36874// ExecutingParty1Choice ...
36875#[cfg_attr(feature = "derive_debug", derive(Debug))]
36876#[cfg_attr(feature = "derive_default", derive(Default))]
36877#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36878#[cfg_attr(feature = "derive_clone", derive(Clone))]
36879#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36880pub struct ExecutingParty1Choice {
36881	#[cfg_attr( feature = "derive_serde", serde(rename = "Prsn", skip_serializing_if = "Option::is_none") )]
36882	pub prsn: Option<PersonIdentification12>,
36883	#[cfg_attr( feature = "derive_serde", serde(rename = "Algo", skip_serializing_if = "Option::is_none") )]
36884	pub algo: Option<String>,
36885	#[cfg_attr( feature = "derive_serde", serde(rename = "Clnt", skip_serializing_if = "Option::is_none") )]
36886	pub clnt: Option<NoReasonCode>,
36887}
36888
36889impl ExecutingParty1Choice {
36890	pub fn validate(&self) -> Result<(), ValidationError> {
36891		if let Some(ref val) = self.prsn { val.validate()? }
36892		if let Some(ref val) = self.algo {
36893			if val.chars().count() < 1 {
36894				return Err(ValidationError::new(1001, "algo is shorter than the minimum length of 1".to_string()));
36895			}
36896			if val.chars().count() > 50 {
36897				return Err(ValidationError::new(1002, "algo exceeds the maximum length of 50".to_string()));
36898			}
36899		}
36900		if let Some(ref val) = self.clnt { val.validate()? }
36901		Ok(())
36902	}
36903}
36904
36905
36906// ExecutingParty2Choice ...
36907#[cfg_attr(feature = "derive_debug", derive(Debug))]
36908#[cfg_attr(feature = "derive_default", derive(Default))]
36909#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36910#[cfg_attr(feature = "derive_clone", derive(Clone))]
36911#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36912pub struct ExecutingParty2Choice {
36913	#[cfg_attr( feature = "derive_serde", serde(rename = "Prsn", skip_serializing_if = "Option::is_none") )]
36914	pub prsn: Option<GenericPersonIdentification1>,
36915	#[cfg_attr( feature = "derive_serde", serde(rename = "Algo", skip_serializing_if = "Option::is_none") )]
36916	pub algo: Option<String>,
36917	#[cfg_attr( feature = "derive_serde", serde(rename = "Clnt", skip_serializing_if = "Option::is_none") )]
36918	pub clnt: Option<NoReasonCode>,
36919}
36920
36921impl ExecutingParty2Choice {
36922	pub fn validate(&self) -> Result<(), ValidationError> {
36923		if let Some(ref val) = self.prsn { val.validate()? }
36924		if let Some(ref val) = self.algo {
36925			if val.chars().count() < 1 {
36926				return Err(ValidationError::new(1001, "algo is shorter than the minimum length of 1".to_string()));
36927			}
36928			if val.chars().count() > 50 {
36929				return Err(ValidationError::new(1002, "algo exceeds the maximum length of 50".to_string()));
36930			}
36931		}
36932		if let Some(ref val) = self.clnt { val.validate()? }
36933		Ok(())
36934	}
36935}
36936
36937
36938// ExecutionType1Choice ...
36939#[cfg_attr(feature = "derive_debug", derive(Debug))]
36940#[cfg_attr(feature = "derive_default", derive(Default))]
36941#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36942#[cfg_attr(feature = "derive_clone", derive(Clone))]
36943#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36944pub struct ExecutionType1Choice {
36945	#[cfg_attr( feature = "derive_serde", serde(rename = "Tm", skip_serializing_if = "Option::is_none") )]
36946	pub tm: Option<String>,
36947	#[cfg_attr( feature = "derive_serde", serde(rename = "Evt", skip_serializing_if = "Option::is_none") )]
36948	pub evt: Option<EventType1Choice>,
36949}
36950
36951impl ExecutionType1Choice {
36952	pub fn validate(&self) -> Result<(), ValidationError> {
36953		if let Some(ref val) = self.evt { val.validate()? }
36954		Ok(())
36955	}
36956}
36957
36958
36959// ExerciseDate1Choice ...
36960#[cfg_attr(feature = "derive_debug", derive(Debug))]
36961#[cfg_attr(feature = "derive_default", derive(Default))]
36962#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36963#[cfg_attr(feature = "derive_clone", derive(Clone))]
36964#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36965pub struct ExerciseDate1Choice {
36966	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstExrcDt", skip_serializing_if = "Option::is_none") )]
36967	pub frst_exrc_dt: Option<String>,
36968	#[cfg_attr( feature = "derive_serde", serde(rename = "PdgDtAplbl", skip_serializing_if = "Option::is_none") )]
36969	pub pdg_dt_aplbl: Option<PriceStatus2Code>,
36970}
36971
36972impl ExerciseDate1Choice {
36973	pub fn validate(&self) -> Result<(), ValidationError> {
36974		if let Some(ref val) = self.pdg_dt_aplbl { val.validate()? }
36975		Ok(())
36976	}
36977}
36978
36979
36980// ExoticOptionStyle1Code ...
36981#[cfg_attr(feature = "derive_debug", derive(Debug))]
36982#[cfg_attr(feature = "derive_default", derive(Default))]
36983#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
36984#[cfg_attr(feature = "derive_clone", derive(Clone))]
36985#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
36986pub enum ExoticOptionStyle1Code {
36987	#[cfg_attr(feature = "derive_default", default)]
36988	#[cfg_attr( feature = "derive_serde", serde(rename = "BINA") )]
36989	CodeBINA,
36990	#[cfg_attr( feature = "derive_serde", serde(rename = "DIGI") )]
36991	CodeDIGI,
36992	#[cfg_attr( feature = "derive_serde", serde(rename = "NOTO") )]
36993	CodeNOTO,
36994	#[cfg_attr( feature = "derive_serde", serde(rename = "VANI") )]
36995	CodeVANI,
36996}
36997
36998impl ExoticOptionStyle1Code {
36999	pub fn validate(&self) -> Result<(), ValidationError> {
37000		Ok(())
37001	}
37002}
37003
37004
37005// ExposureMetrics4 ...
37006#[cfg_attr(feature = "derive_debug", derive(Debug))]
37007#[cfg_attr(feature = "derive_default", derive(Default))]
37008#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37009#[cfg_attr(feature = "derive_clone", derive(Clone))]
37010#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37011pub struct ExposureMetrics4 {
37012	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplAmt", skip_serializing_if = "Option::is_none") )]
37013	pub prncpl_amt: Option<PrincipalAmount3>,
37014	#[cfg_attr( feature = "derive_serde", serde(rename = "LnVal", skip_serializing_if = "Option::is_none") )]
37015	pub ln_val: Option<ActiveOrHistoricCurrencyAndAmount>,
37016	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal", skip_serializing_if = "Option::is_none") )]
37017	pub mkt_val: Option<AmountAndDirection53>,
37018	#[cfg_attr( feature = "derive_serde", serde(rename = "OutsdngMrgnLnAmt", skip_serializing_if = "Option::is_none") )]
37019	pub outsdng_mrgn_ln_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
37020	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtMktValAmt", skip_serializing_if = "Option::is_none") )]
37021	pub shrt_mkt_val_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
37022	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnLn", skip_serializing_if = "Option::is_none") )]
37023	pub mrgn_ln: Option<ActiveOrHistoricCurrencyAndAmount>,
37024	#[cfg_attr( feature = "derive_serde", serde(rename = "CshCollAmt", skip_serializing_if = "Option::is_none") )]
37025	pub csh_coll_amt: Option<AmountAndDirection53>,
37026	#[cfg_attr( feature = "derive_serde", serde(rename = "CollMktVal", skip_serializing_if = "Option::is_none") )]
37027	pub coll_mkt_val: Option<AmountAndDirection53>,
37028}
37029
37030impl ExposureMetrics4 {
37031	pub fn validate(&self) -> Result<(), ValidationError> {
37032		if let Some(ref val) = self.prncpl_amt { val.validate()? }
37033		if let Some(ref val) = self.ln_val { val.validate()? }
37034		if let Some(ref val) = self.mkt_val { val.validate()? }
37035		if let Some(ref val) = self.outsdng_mrgn_ln_amt { val.validate()? }
37036		if let Some(ref val) = self.shrt_mkt_val_amt { val.validate()? }
37037		if let Some(ref val) = self.mrgn_ln { val.validate()? }
37038		if let Some(ref val) = self.csh_coll_amt { val.validate()? }
37039		if let Some(ref val) = self.coll_mkt_val { val.validate()? }
37040		Ok(())
37041	}
37042}
37043
37044
37045// ExposureMetrics5 ...
37046#[cfg_attr(feature = "derive_debug", derive(Debug))]
37047#[cfg_attr(feature = "derive_default", derive(Default))]
37048#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37049#[cfg_attr(feature = "derive_clone", derive(Clone))]
37050#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37051pub struct ExposureMetrics5 {
37052	#[cfg_attr( feature = "derive_serde", serde(rename = "CshCollAmt", skip_serializing_if = "Option::is_none") )]
37053	pub csh_coll_amt: Option<AmountAndDirection53>,
37054	#[cfg_attr( feature = "derive_serde", serde(rename = "CollMktVal", skip_serializing_if = "Option::is_none") )]
37055	pub coll_mkt_val: Option<AmountAndDirection53>,
37056}
37057
37058impl ExposureMetrics5 {
37059	pub fn validate(&self) -> Result<(), ValidationError> {
37060		if let Some(ref val) = self.csh_coll_amt { val.validate()? }
37061		if let Some(ref val) = self.coll_mkt_val { val.validate()? }
37062		Ok(())
37063	}
37064}
37065
37066
37067// ExposureMetrics6 ...
37068#[cfg_attr(feature = "derive_debug", derive(Debug))]
37069#[cfg_attr(feature = "derive_default", derive(Default))]
37070#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37071#[cfg_attr(feature = "derive_clone", derive(Clone))]
37072#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37073pub struct ExposureMetrics6 {
37074	#[cfg_attr( feature = "derive_serde", serde(rename = "PstdMrgnOrColl", skip_serializing_if = "Option::is_none") )]
37075	pub pstd_mrgn_or_coll: Option<PostedMarginOrCollateral4>,
37076}
37077
37078impl ExposureMetrics6 {
37079	pub fn validate(&self) -> Result<(), ValidationError> {
37080		if let Some(ref val) = self.pstd_mrgn_or_coll { val.validate()? }
37081		Ok(())
37082	}
37083}
37084
37085
37086// ExposureType10Code ...
37087#[cfg_attr(feature = "derive_debug", derive(Debug))]
37088#[cfg_attr(feature = "derive_default", derive(Default))]
37089#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37090#[cfg_attr(feature = "derive_clone", derive(Clone))]
37091#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37092pub enum ExposureType10Code {
37093	#[cfg_attr(feature = "derive_default", default)]
37094	#[cfg_attr( feature = "derive_serde", serde(rename = "SBSC") )]
37095	CodeSBSC,
37096	#[cfg_attr( feature = "derive_serde", serde(rename = "MGLD") )]
37097	CodeMGLD,
37098	#[cfg_attr( feature = "derive_serde", serde(rename = "SLEB") )]
37099	CodeSLEB,
37100	#[cfg_attr( feature = "derive_serde", serde(rename = "REPO") )]
37101	CodeREPO,
37102}
37103
37104impl ExposureType10Code {
37105	pub fn validate(&self) -> Result<(), ValidationError> {
37106		Ok(())
37107	}
37108}
37109
37110
37111// ExtendedParty13 ...
37112#[cfg_attr(feature = "derive_debug", derive(Debug))]
37113#[cfg_attr(feature = "derive_default", derive(Default))]
37114#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37115#[cfg_attr(feature = "derive_clone", derive(Clone))]
37116#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37117pub struct ExtendedParty13 {
37118	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyRole") )]
37119	pub pty_role: GenericIdentification36,
37120	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPtyDtls") )]
37121	pub othr_pty_dtls: ContactAttributes5,
37122}
37123
37124impl ExtendedParty13 {
37125	pub fn validate(&self) -> Result<(), ValidationError> {
37126		self.pty_role.validate()?;
37127		self.othr_pty_dtls.validate()?;
37128		Ok(())
37129	}
37130}
37131
37132
37133// ExtendedParty14 ...
37134#[cfg_attr(feature = "derive_debug", derive(Debug))]
37135#[cfg_attr(feature = "derive_default", derive(Default))]
37136#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37137#[cfg_attr(feature = "derive_clone", derive(Clone))]
37138#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37139pub struct ExtendedParty14 {
37140	#[cfg_attr( feature = "derive_serde", serde(rename = "XtndedPtyRole") )]
37141	pub xtnded_pty_role: String,
37142	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPtyDtls") )]
37143	pub othr_pty_dtls: InvestmentAccountOwnershipInformation16,
37144}
37145
37146impl ExtendedParty14 {
37147	pub fn validate(&self) -> Result<(), ValidationError> {
37148		if self.xtnded_pty_role.chars().count() < 1 {
37149			return Err(ValidationError::new(1001, "xtnded_pty_role is shorter than the minimum length of 1".to_string()));
37150		}
37151		if self.xtnded_pty_role.chars().count() > 350 {
37152			return Err(ValidationError::new(1002, "xtnded_pty_role exceeds the maximum length of 350".to_string()));
37153		}
37154		self.othr_pty_dtls.validate()?;
37155		Ok(())
37156	}
37157}
37158
37159
37160// ExtendedParty15 ...
37161#[cfg_attr(feature = "derive_debug", derive(Debug))]
37162#[cfg_attr(feature = "derive_default", derive(Default))]
37163#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37164#[cfg_attr(feature = "derive_clone", derive(Clone))]
37165#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37166pub struct ExtendedParty15 {
37167	#[cfg_attr( feature = "derive_serde", serde(rename = "XtndedPtyRole") )]
37168	pub xtnded_pty_role: String,
37169	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPtyDtls") )]
37170	pub othr_pty_dtls: InvestmentAccountOwnershipInformation17,
37171}
37172
37173impl ExtendedParty15 {
37174	pub fn validate(&self) -> Result<(), ValidationError> {
37175		if self.xtnded_pty_role.chars().count() < 1 {
37176			return Err(ValidationError::new(1001, "xtnded_pty_role is shorter than the minimum length of 1".to_string()));
37177		}
37178		if self.xtnded_pty_role.chars().count() > 350 {
37179			return Err(ValidationError::new(1002, "xtnded_pty_role exceeds the maximum length of 350".to_string()));
37180		}
37181		self.othr_pty_dtls.validate()?;
37182		Ok(())
37183	}
37184}
37185
37186
37187// Extension1 ...
37188#[cfg_attr(feature = "derive_debug", derive(Debug))]
37189#[cfg_attr(feature = "derive_default", derive(Default))]
37190#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37191#[cfg_attr(feature = "derive_clone", derive(Clone))]
37192#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37193pub struct Extension1 {
37194	#[cfg_attr( feature = "derive_serde", serde(rename = "PlcAndNm") )]
37195	pub plc_and_nm: String,
37196	#[cfg_attr( feature = "derive_serde", serde(rename = "Txt") )]
37197	pub txt: String,
37198}
37199
37200impl Extension1 {
37201	pub fn validate(&self) -> Result<(), ValidationError> {
37202		if self.plc_and_nm.chars().count() < 1 {
37203			return Err(ValidationError::new(1001, "plc_and_nm is shorter than the minimum length of 1".to_string()));
37204		}
37205		if self.plc_and_nm.chars().count() > 350 {
37206			return Err(ValidationError::new(1002, "plc_and_nm exceeds the maximum length of 350".to_string()));
37207		}
37208		if self.txt.chars().count() < 1 {
37209			return Err(ValidationError::new(1001, "txt is shorter than the minimum length of 1".to_string()));
37210		}
37211		if self.txt.chars().count() > 350 {
37212			return Err(ValidationError::new(1002, "txt exceeds the maximum length of 350".to_string()));
37213		}
37214		Ok(())
37215	}
37216}
37217
37218
37219// FATCAForm1Choice ...
37220#[cfg_attr(feature = "derive_debug", derive(Debug))]
37221#[cfg_attr(feature = "derive_default", derive(Default))]
37222#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37223#[cfg_attr(feature = "derive_clone", derive(Clone))]
37224#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37225pub struct FATCAForm1Choice {
37226	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
37227	pub cd: Option<FATCAFormType1Code>,
37228	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
37229	pub prtry: Option<GenericIdentification47>,
37230}
37231
37232impl FATCAForm1Choice {
37233	pub fn validate(&self) -> Result<(), ValidationError> {
37234		if let Some(ref val) = self.cd { val.validate()? }
37235		if let Some(ref val) = self.prtry { val.validate()? }
37236		Ok(())
37237	}
37238}
37239
37240
37241// FATCAFormType1Code ...
37242#[cfg_attr(feature = "derive_debug", derive(Debug))]
37243#[cfg_attr(feature = "derive_default", derive(Default))]
37244#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37245#[cfg_attr(feature = "derive_clone", derive(Clone))]
37246#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37247pub enum FATCAFormType1Code {
37248	#[cfg_attr(feature = "derive_default", default)]
37249	#[cfg_attr( feature = "derive_serde", serde(rename = "CER5") )]
37250	CodeCER5,
37251	#[cfg_attr( feature = "derive_serde", serde(rename = "CER7") )]
37252	CodeCER7,
37253	#[cfg_attr( feature = "derive_serde", serde(rename = "CER1") )]
37254	CodeCER1,
37255	#[cfg_attr( feature = "derive_serde", serde(rename = "CER2") )]
37256	CodeCER2,
37257	#[cfg_attr( feature = "derive_serde", serde(rename = "CER3") )]
37258	CodeCER3,
37259	#[cfg_attr( feature = "derive_serde", serde(rename = "CER4") )]
37260	CodeCER4,
37261	#[cfg_attr( feature = "derive_serde", serde(rename = "CER6") )]
37262	CodeCER6,
37263}
37264
37265impl FATCAFormType1Code {
37266	pub fn validate(&self) -> Result<(), ValidationError> {
37267		Ok(())
37268	}
37269}
37270
37271
37272// FATCASource1Choice ...
37273#[cfg_attr(feature = "derive_debug", derive(Debug))]
37274#[cfg_attr(feature = "derive_default", derive(Default))]
37275#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37276#[cfg_attr(feature = "derive_clone", derive(Clone))]
37277#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37278pub struct FATCASource1Choice {
37279	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
37280	pub cd: Option<FATCASourceStatus1Code>,
37281	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
37282	pub prtry: Option<GenericIdentification47>,
37283}
37284
37285impl FATCASource1Choice {
37286	pub fn validate(&self) -> Result<(), ValidationError> {
37287		if let Some(ref val) = self.cd { val.validate()? }
37288		if let Some(ref val) = self.prtry { val.validate()? }
37289		Ok(())
37290	}
37291}
37292
37293
37294// FATCASourceStatus1Code ...
37295#[cfg_attr(feature = "derive_debug", derive(Debug))]
37296#[cfg_attr(feature = "derive_default", derive(Default))]
37297#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37298#[cfg_attr(feature = "derive_clone", derive(Clone))]
37299#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37300pub enum FATCASourceStatus1Code {
37301	#[cfg_attr(feature = "derive_default", default)]
37302	#[cfg_attr( feature = "derive_serde", serde(rename = "CALC") )]
37303	CodeCALC,
37304	#[cfg_attr( feature = "derive_serde", serde(rename = "DECL") )]
37305	CodeDECL,
37306}
37307
37308impl FATCASourceStatus1Code {
37309	pub fn validate(&self) -> Result<(), ValidationError> {
37310		Ok(())
37311	}
37312}
37313
37314
37315// FATCAStatus1Code ...
37316#[cfg_attr(feature = "derive_debug", derive(Debug))]
37317#[cfg_attr(feature = "derive_default", derive(Default))]
37318#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37319#[cfg_attr(feature = "derive_clone", derive(Clone))]
37320#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37321pub enum FATCAStatus1Code {
37322	#[cfg_attr(feature = "derive_default", default)]
37323	#[cfg_attr( feature = "derive_serde", serde(rename = "F101") )]
37324	CodeF101,
37325	#[cfg_attr( feature = "derive_serde", serde(rename = "F102") )]
37326	CodeF102,
37327	#[cfg_attr( feature = "derive_serde", serde(rename = "F103") )]
37328	CodeF103,
37329	#[cfg_attr( feature = "derive_serde", serde(rename = "F104") )]
37330	CodeF104,
37331	#[cfg_attr( feature = "derive_serde", serde(rename = "F105") )]
37332	CodeF105,
37333	#[cfg_attr( feature = "derive_serde", serde(rename = "F201") )]
37334	CodeF201,
37335	#[cfg_attr( feature = "derive_serde", serde(rename = "F202") )]
37336	CodeF202,
37337	#[cfg_attr( feature = "derive_serde", serde(rename = "F203") )]
37338	CodeF203,
37339	#[cfg_attr( feature = "derive_serde", serde(rename = "F204") )]
37340	CodeF204,
37341	#[cfg_attr( feature = "derive_serde", serde(rename = "F205") )]
37342	CodeF205,
37343	#[cfg_attr( feature = "derive_serde", serde(rename = "F206") )]
37344	CodeF206,
37345}
37346
37347impl FATCAStatus1Code {
37348	pub fn validate(&self) -> Result<(), ValidationError> {
37349		Ok(())
37350	}
37351}
37352
37353
37354// FATCAStatus2 ...
37355#[cfg_attr(feature = "derive_debug", derive(Debug))]
37356#[cfg_attr(feature = "derive_default", derive(Default))]
37357#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37358#[cfg_attr(feature = "derive_clone", derive(Clone))]
37359#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37360pub struct FATCAStatus2 {
37361	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
37362	pub tp: FATCAStatus2Choice,
37363	#[cfg_attr( feature = "derive_serde", serde(rename = "Src", skip_serializing_if = "Option::is_none") )]
37364	pub src: Option<FATCASource1Choice>,
37365}
37366
37367impl FATCAStatus2 {
37368	pub fn validate(&self) -> Result<(), ValidationError> {
37369		self.tp.validate()?;
37370		if let Some(ref val) = self.src { val.validate()? }
37371		Ok(())
37372	}
37373}
37374
37375
37376// FATCAStatus2Choice ...
37377#[cfg_attr(feature = "derive_debug", derive(Debug))]
37378#[cfg_attr(feature = "derive_default", derive(Default))]
37379#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37380#[cfg_attr(feature = "derive_clone", derive(Clone))]
37381#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37382pub struct FATCAStatus2Choice {
37383	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
37384	pub cd: Option<FATCAStatus1Code>,
37385	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
37386	pub prtry: Option<GenericIdentification47>,
37387}
37388
37389impl FATCAStatus2Choice {
37390	pub fn validate(&self) -> Result<(), ValidationError> {
37391		if let Some(ref val) = self.cd { val.validate()? }
37392		if let Some(ref val) = self.prtry { val.validate()? }
37393		Ok(())
37394	}
37395}
37396
37397
37398// FailingReason3Code ...
37399#[cfg_attr(feature = "derive_debug", derive(Debug))]
37400#[cfg_attr(feature = "derive_default", derive(Default))]
37401#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37402#[cfg_attr(feature = "derive_clone", derive(Clone))]
37403#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37404pub enum FailingReason3Code {
37405	#[cfg_attr(feature = "derive_default", default)]
37406	#[cfg_attr( feature = "derive_serde", serde(rename = "AWMO") )]
37407	CodeAWMO,
37408	#[cfg_attr( feature = "derive_serde", serde(rename = "BYIY") )]
37409	CodeBYIY,
37410	#[cfg_attr( feature = "derive_serde", serde(rename = "CLAT") )]
37411	CodeCLAT,
37412	#[cfg_attr( feature = "derive_serde", serde(rename = "ADEA") )]
37413	CodeADEA,
37414	#[cfg_attr( feature = "derive_serde", serde(rename = "CANR") )]
37415	CodeCANR,
37416	#[cfg_attr( feature = "derive_serde", serde(rename = "CAIS") )]
37417	CodeCAIS,
37418	#[cfg_attr( feature = "derive_serde", serde(rename = "OBJT") )]
37419	CodeOBJT,
37420	#[cfg_attr( feature = "derive_serde", serde(rename = "AWSH") )]
37421	CodeAWSH,
37422	#[cfg_attr( feature = "derive_serde", serde(rename = "PHSE") )]
37423	CodePHSE,
37424	#[cfg_attr( feature = "derive_serde", serde(rename = "STCD") )]
37425	CodeSTCD,
37426	#[cfg_attr( feature = "derive_serde", serde(rename = "DOCY") )]
37427	CodeDOCY,
37428	#[cfg_attr( feature = "derive_serde", serde(rename = "MLAT") )]
37429	CodeMLAT,
37430	#[cfg_attr( feature = "derive_serde", serde(rename = "DOCC") )]
37431	CodeDOCC,
37432	#[cfg_attr( feature = "derive_serde", serde(rename = "BLOC") )]
37433	CodeBLOC,
37434	#[cfg_attr( feature = "derive_serde", serde(rename = "CHAS") )]
37435	CodeCHAS,
37436	#[cfg_attr( feature = "derive_serde", serde(rename = "NEWI") )]
37437	CodeNEWI,
37438	#[cfg_attr( feature = "derive_serde", serde(rename = "CLAC") )]
37439	CodeCLAC,
37440	#[cfg_attr( feature = "derive_serde", serde(rename = "MUNO") )]
37441	CodeMUNO,
37442	#[cfg_attr( feature = "derive_serde", serde(rename = "GLOB") )]
37443	CodeGLOB,
37444	#[cfg_attr( feature = "derive_serde", serde(rename = "PREA") )]
37445	CodePREA,
37446	#[cfg_attr( feature = "derive_serde", serde(rename = "PART") )]
37447	CodePART,
37448	#[cfg_attr( feature = "derive_serde", serde(rename = "NOFX") )]
37449	CodeNOFX,
37450	#[cfg_attr( feature = "derive_serde", serde(rename = "CMON") )]
37451	CodeCMON,
37452	#[cfg_attr( feature = "derive_serde", serde(rename = "YCOL") )]
37453	CodeYCOL,
37454	#[cfg_attr( feature = "derive_serde", serde(rename = "COLL") )]
37455	CodeCOLL,
37456	#[cfg_attr( feature = "derive_serde", serde(rename = "DEPO") )]
37457	CodeDEPO,
37458	#[cfg_attr( feature = "derive_serde", serde(rename = "FLIM") )]
37459	CodeFLIM,
37460	#[cfg_attr( feature = "derive_serde", serde(rename = "INCA") )]
37461	CodeINCA,
37462	#[cfg_attr( feature = "derive_serde", serde(rename = "LINK") )]
37463	CodeLINK,
37464	#[cfg_attr( feature = "derive_serde", serde(rename = "LACK") )]
37465	CodeLACK,
37466	#[cfg_attr( feature = "derive_serde", serde(rename = "LALO") )]
37467	CodeLALO,
37468	#[cfg_attr( feature = "derive_serde", serde(rename = "MONY") )]
37469	CodeMONY,
37470	#[cfg_attr( feature = "derive_serde", serde(rename = "NCON") )]
37471	CodeNCON,
37472	#[cfg_attr( feature = "derive_serde", serde(rename = "REFS") )]
37473	CodeREFS,
37474	#[cfg_attr( feature = "derive_serde", serde(rename = "SDUT") )]
37475	CodeSDUT,
37476	#[cfg_attr( feature = "derive_serde", serde(rename = "BATC") )]
37477	CodeBATC,
37478	#[cfg_attr( feature = "derive_serde", serde(rename = "CYCL") )]
37479	CodeCYCL,
37480	#[cfg_attr( feature = "derive_serde", serde(rename = "SBLO") )]
37481	CodeSBLO,
37482	#[cfg_attr( feature = "derive_serde", serde(rename = "CPEC") )]
37483	CodeCPEC,
37484	#[cfg_attr( feature = "derive_serde", serde(rename = "MINO") )]
37485	CodeMINO,
37486	#[cfg_attr( feature = "derive_serde", serde(rename = "IAAD") )]
37487	CodeIAAD,
37488	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
37489	CodeOTHR,
37490	#[cfg_attr( feature = "derive_serde", serde(rename = "PHCK") )]
37491	CodePHCK,
37492	#[cfg_attr( feature = "derive_serde", serde(rename = "BENO") )]
37493	CodeBENO,
37494	#[cfg_attr( feature = "derive_serde", serde(rename = "BOTH") )]
37495	CodeBOTH,
37496	#[cfg_attr( feature = "derive_serde", serde(rename = "CLHT") )]
37497	CodeCLHT,
37498	#[cfg_attr( feature = "derive_serde", serde(rename = "DENO") )]
37499	CodeDENO,
37500	#[cfg_attr( feature = "derive_serde", serde(rename = "DISA") )]
37501	CodeDISA,
37502	#[cfg_attr( feature = "derive_serde", serde(rename = "DKNY") )]
37503	CodeDKNY,
37504	#[cfg_attr( feature = "derive_serde", serde(rename = "FROZ") )]
37505	CodeFROZ,
37506	#[cfg_attr( feature = "derive_serde", serde(rename = "LAAW") )]
37507	CodeLAAW,
37508	#[cfg_attr( feature = "derive_serde", serde(rename = "LATE") )]
37509	CodeLATE,
37510	#[cfg_attr( feature = "derive_serde", serde(rename = "LIQU") )]
37511	CodeLIQU,
37512	#[cfg_attr( feature = "derive_serde", serde(rename = "PRCY") )]
37513	CodePRCY,
37514	#[cfg_attr( feature = "derive_serde", serde(rename = "REGT") )]
37515	CodeREGT,
37516	#[cfg_attr( feature = "derive_serde", serde(rename = "SETS") )]
37517	CodeSETS,
37518	#[cfg_attr( feature = "derive_serde", serde(rename = "CERT") )]
37519	CodeCERT,
37520	#[cfg_attr( feature = "derive_serde", serde(rename = "PRSY") )]
37521	CodePRSY,
37522	#[cfg_attr( feature = "derive_serde", serde(rename = "INBC") )]
37523	CodeINBC,
37524}
37525
37526impl FailingReason3Code {
37527	pub fn validate(&self) -> Result<(), ValidationError> {
37528		Ok(())
37529	}
37530}
37531
37532
37533// FailingReason7 ...
37534#[cfg_attr(feature = "derive_debug", derive(Debug))]
37535#[cfg_attr(feature = "derive_default", derive(Default))]
37536#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37537#[cfg_attr(feature = "derive_clone", derive(Clone))]
37538#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37539pub struct FailingReason7 {
37540	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
37541	pub cd: FailingReason7Choice,
37542	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
37543	pub addtl_rsn_inf: Option<String>,
37544}
37545
37546impl FailingReason7 {
37547	pub fn validate(&self) -> Result<(), ValidationError> {
37548		self.cd.validate()?;
37549		if let Some(ref val) = self.addtl_rsn_inf {
37550			if val.chars().count() < 1 {
37551				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
37552			}
37553			if val.chars().count() > 210 {
37554				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
37555			}
37556		}
37557		Ok(())
37558	}
37559}
37560
37561
37562// FailingReason7Choice ...
37563#[cfg_attr(feature = "derive_debug", derive(Debug))]
37564#[cfg_attr(feature = "derive_default", derive(Default))]
37565#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37566#[cfg_attr(feature = "derive_clone", derive(Clone))]
37567#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37568pub struct FailingReason7Choice {
37569	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
37570	pub cd: Option<FailingReason3Code>,
37571	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
37572	pub prtry: Option<GenericIdentification30>,
37573}
37574
37575impl FailingReason7Choice {
37576	pub fn validate(&self) -> Result<(), ValidationError> {
37577		if let Some(ref val) = self.cd { val.validate()? }
37578		if let Some(ref val) = self.prtry { val.validate()? }
37579		Ok(())
37580	}
37581}
37582
37583
37584// FailingStatus9Choice ...
37585#[cfg_attr(feature = "derive_debug", derive(Debug))]
37586#[cfg_attr(feature = "derive_default", derive(Default))]
37587#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37588#[cfg_attr(feature = "derive_clone", derive(Clone))]
37589#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37590pub struct FailingStatus9Choice {
37591	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
37592	pub no_spcfd_rsn: Option<NoReasonCode>,
37593	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
37594	pub rsn: Option<Vec<FailingReason7>>,
37595}
37596
37597impl FailingStatus9Choice {
37598	pub fn validate(&self) -> Result<(), ValidationError> {
37599		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
37600		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
37601		Ok(())
37602	}
37603}
37604
37605
37606// FertilizerCommodityAmmonia1 ...
37607#[cfg_attr(feature = "derive_debug", derive(Debug))]
37608#[cfg_attr(feature = "derive_default", derive(Default))]
37609#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37610#[cfg_attr(feature = "derive_clone", derive(Clone))]
37611#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37612pub struct FertilizerCommodityAmmonia1 {
37613	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
37614	pub base_pdct: AssetClassProductType5Code,
37615	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
37616	pub sub_pdct: AssetClassSubProductType39Code,
37617}
37618
37619impl FertilizerCommodityAmmonia1 {
37620	pub fn validate(&self) -> Result<(), ValidationError> {
37621		self.base_pdct.validate()?;
37622		self.sub_pdct.validate()?;
37623		Ok(())
37624	}
37625}
37626
37627
37628// FertilizerCommodityAmmonia2 ...
37629#[cfg_attr(feature = "derive_debug", derive(Debug))]
37630#[cfg_attr(feature = "derive_default", derive(Default))]
37631#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37632#[cfg_attr(feature = "derive_clone", derive(Clone))]
37633#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37634pub struct FertilizerCommodityAmmonia2 {
37635	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
37636	pub base_pdct: AssetClassProductType5Code,
37637	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
37638	pub sub_pdct: Option<AssetClassSubProductType39Code>,
37639}
37640
37641impl FertilizerCommodityAmmonia2 {
37642	pub fn validate(&self) -> Result<(), ValidationError> {
37643		self.base_pdct.validate()?;
37644		if let Some(ref val) = self.sub_pdct { val.validate()? }
37645		Ok(())
37646	}
37647}
37648
37649
37650// FertilizerCommodityDiammoniumPhosphate1 ...
37651#[cfg_attr(feature = "derive_debug", derive(Debug))]
37652#[cfg_attr(feature = "derive_default", derive(Default))]
37653#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37654#[cfg_attr(feature = "derive_clone", derive(Clone))]
37655#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37656pub struct FertilizerCommodityDiammoniumPhosphate1 {
37657	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
37658	pub base_pdct: AssetClassProductType5Code,
37659	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
37660	pub sub_pdct: AssetClassSubProductType40Code,
37661}
37662
37663impl FertilizerCommodityDiammoniumPhosphate1 {
37664	pub fn validate(&self) -> Result<(), ValidationError> {
37665		self.base_pdct.validate()?;
37666		self.sub_pdct.validate()?;
37667		Ok(())
37668	}
37669}
37670
37671
37672// FertilizerCommodityDiammoniumPhosphate2 ...
37673#[cfg_attr(feature = "derive_debug", derive(Debug))]
37674#[cfg_attr(feature = "derive_default", derive(Default))]
37675#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37676#[cfg_attr(feature = "derive_clone", derive(Clone))]
37677#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37678pub struct FertilizerCommodityDiammoniumPhosphate2 {
37679	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
37680	pub base_pdct: AssetClassProductType5Code,
37681	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
37682	pub sub_pdct: Option<AssetClassSubProductType40Code>,
37683}
37684
37685impl FertilizerCommodityDiammoniumPhosphate2 {
37686	pub fn validate(&self) -> Result<(), ValidationError> {
37687		self.base_pdct.validate()?;
37688		if let Some(ref val) = self.sub_pdct { val.validate()? }
37689		Ok(())
37690	}
37691}
37692
37693
37694// FertilizerCommodityOther1 ...
37695#[cfg_attr(feature = "derive_debug", derive(Debug))]
37696#[cfg_attr(feature = "derive_default", derive(Default))]
37697#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37698#[cfg_attr(feature = "derive_clone", derive(Clone))]
37699#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37700pub struct FertilizerCommodityOther1 {
37701	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
37702	pub base_pdct: AssetClassProductType5Code,
37703	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
37704	pub sub_pdct: AssetClassSubProductType49Code,
37705}
37706
37707impl FertilizerCommodityOther1 {
37708	pub fn validate(&self) -> Result<(), ValidationError> {
37709		self.base_pdct.validate()?;
37710		self.sub_pdct.validate()?;
37711		Ok(())
37712	}
37713}
37714
37715
37716// FertilizerCommodityOther2 ...
37717#[cfg_attr(feature = "derive_debug", derive(Debug))]
37718#[cfg_attr(feature = "derive_default", derive(Default))]
37719#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37720#[cfg_attr(feature = "derive_clone", derive(Clone))]
37721#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37722pub struct FertilizerCommodityOther2 {
37723	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
37724	pub base_pdct: AssetClassProductType5Code,
37725	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
37726	pub sub_pdct: Option<AssetClassSubProductType49Code>,
37727}
37728
37729impl FertilizerCommodityOther2 {
37730	pub fn validate(&self) -> Result<(), ValidationError> {
37731		self.base_pdct.validate()?;
37732		if let Some(ref val) = self.sub_pdct { val.validate()? }
37733		Ok(())
37734	}
37735}
37736
37737
37738// FertilizerCommodityPotash1 ...
37739#[cfg_attr(feature = "derive_debug", derive(Debug))]
37740#[cfg_attr(feature = "derive_default", derive(Default))]
37741#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37742#[cfg_attr(feature = "derive_clone", derive(Clone))]
37743#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37744pub struct FertilizerCommodityPotash1 {
37745	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
37746	pub base_pdct: AssetClassProductType5Code,
37747	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
37748	pub sub_pdct: AssetClassSubProductType41Code,
37749}
37750
37751impl FertilizerCommodityPotash1 {
37752	pub fn validate(&self) -> Result<(), ValidationError> {
37753		self.base_pdct.validate()?;
37754		self.sub_pdct.validate()?;
37755		Ok(())
37756	}
37757}
37758
37759
37760// FertilizerCommodityPotash2 ...
37761#[cfg_attr(feature = "derive_debug", derive(Debug))]
37762#[cfg_attr(feature = "derive_default", derive(Default))]
37763#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37764#[cfg_attr(feature = "derive_clone", derive(Clone))]
37765#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37766pub struct FertilizerCommodityPotash2 {
37767	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
37768	pub base_pdct: AssetClassProductType5Code,
37769	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
37770	pub sub_pdct: Option<AssetClassSubProductType41Code>,
37771}
37772
37773impl FertilizerCommodityPotash2 {
37774	pub fn validate(&self) -> Result<(), ValidationError> {
37775		self.base_pdct.validate()?;
37776		if let Some(ref val) = self.sub_pdct { val.validate()? }
37777		Ok(())
37778	}
37779}
37780
37781
37782// FertilizerCommoditySulphur1 ...
37783#[cfg_attr(feature = "derive_debug", derive(Debug))]
37784#[cfg_attr(feature = "derive_default", derive(Default))]
37785#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37786#[cfg_attr(feature = "derive_clone", derive(Clone))]
37787#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37788pub struct FertilizerCommoditySulphur1 {
37789	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
37790	pub base_pdct: AssetClassProductType5Code,
37791	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
37792	pub sub_pdct: AssetClassSubProductType42Code,
37793}
37794
37795impl FertilizerCommoditySulphur1 {
37796	pub fn validate(&self) -> Result<(), ValidationError> {
37797		self.base_pdct.validate()?;
37798		self.sub_pdct.validate()?;
37799		Ok(())
37800	}
37801}
37802
37803
37804// FertilizerCommoditySulphur2 ...
37805#[cfg_attr(feature = "derive_debug", derive(Debug))]
37806#[cfg_attr(feature = "derive_default", derive(Default))]
37807#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37808#[cfg_attr(feature = "derive_clone", derive(Clone))]
37809#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37810pub struct FertilizerCommoditySulphur2 {
37811	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
37812	pub base_pdct: AssetClassProductType5Code,
37813	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
37814	pub sub_pdct: Option<AssetClassSubProductType42Code>,
37815}
37816
37817impl FertilizerCommoditySulphur2 {
37818	pub fn validate(&self) -> Result<(), ValidationError> {
37819		self.base_pdct.validate()?;
37820		if let Some(ref val) = self.sub_pdct { val.validate()? }
37821		Ok(())
37822	}
37823}
37824
37825
37826// FertilizerCommodityUrea1 ...
37827#[cfg_attr(feature = "derive_debug", derive(Debug))]
37828#[cfg_attr(feature = "derive_default", derive(Default))]
37829#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37830#[cfg_attr(feature = "derive_clone", derive(Clone))]
37831#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37832pub struct FertilizerCommodityUrea1 {
37833	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
37834	pub base_pdct: AssetClassProductType5Code,
37835	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
37836	pub sub_pdct: AssetClassSubProductType43Code,
37837}
37838
37839impl FertilizerCommodityUrea1 {
37840	pub fn validate(&self) -> Result<(), ValidationError> {
37841		self.base_pdct.validate()?;
37842		self.sub_pdct.validate()?;
37843		Ok(())
37844	}
37845}
37846
37847
37848// FertilizerCommodityUrea2 ...
37849#[cfg_attr(feature = "derive_debug", derive(Debug))]
37850#[cfg_attr(feature = "derive_default", derive(Default))]
37851#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37852#[cfg_attr(feature = "derive_clone", derive(Clone))]
37853#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37854pub struct FertilizerCommodityUrea2 {
37855	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
37856	pub base_pdct: AssetClassProductType5Code,
37857	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
37858	pub sub_pdct: Option<AssetClassSubProductType43Code>,
37859}
37860
37861impl FertilizerCommodityUrea2 {
37862	pub fn validate(&self) -> Result<(), ValidationError> {
37863		self.base_pdct.validate()?;
37864		if let Some(ref val) = self.sub_pdct { val.validate()? }
37865		Ok(())
37866	}
37867}
37868
37869
37870// FertilizerCommodityUreaAndAmmoniumNitrate1 ...
37871#[cfg_attr(feature = "derive_debug", derive(Debug))]
37872#[cfg_attr(feature = "derive_default", derive(Default))]
37873#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37874#[cfg_attr(feature = "derive_clone", derive(Clone))]
37875#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37876pub struct FertilizerCommodityUreaAndAmmoniumNitrate1 {
37877	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
37878	pub base_pdct: AssetClassProductType5Code,
37879	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
37880	pub sub_pdct: AssetClassSubProductType44Code,
37881}
37882
37883impl FertilizerCommodityUreaAndAmmoniumNitrate1 {
37884	pub fn validate(&self) -> Result<(), ValidationError> {
37885		self.base_pdct.validate()?;
37886		self.sub_pdct.validate()?;
37887		Ok(())
37888	}
37889}
37890
37891
37892// FertilizerCommodityUreaAndAmmoniumNitrate2 ...
37893#[cfg_attr(feature = "derive_debug", derive(Debug))]
37894#[cfg_attr(feature = "derive_default", derive(Default))]
37895#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37896#[cfg_attr(feature = "derive_clone", derive(Clone))]
37897#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37898pub struct FertilizerCommodityUreaAndAmmoniumNitrate2 {
37899	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
37900	pub base_pdct: AssetClassProductType5Code,
37901	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
37902	pub sub_pdct: Option<AssetClassSubProductType44Code>,
37903}
37904
37905impl FertilizerCommodityUreaAndAmmoniumNitrate2 {
37906	pub fn validate(&self) -> Result<(), ValidationError> {
37907		self.base_pdct.validate()?;
37908		if let Some(ref val) = self.sub_pdct { val.validate()? }
37909		Ok(())
37910	}
37911}
37912
37913
37914// FileData1 ...
37915#[cfg_attr(feature = "derive_debug", derive(Debug))]
37916#[cfg_attr(feature = "derive_default", derive(Default))]
37917#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37918#[cfg_attr(feature = "derive_clone", derive(Clone))]
37919#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37920pub struct FileData1 {
37921	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
37922	pub tp: Option<DocumentType1Choice>,
37923	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
37924	pub id: String,
37925	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseDt", skip_serializing_if = "Option::is_none") )]
37926	pub isse_dt: Option<DateAndDateTime2Choice>,
37927	#[cfg_attr( feature = "derive_serde", serde(rename = "Frmt", skip_serializing_if = "Option::is_none") )]
37928	pub frmt: Option<DocumentFormat1Choice>,
37929	#[cfg_attr( feature = "derive_serde", serde(rename = "FileNm", skip_serializing_if = "Option::is_none") )]
37930	pub file_nm: Option<String>,
37931	#[cfg_attr( feature = "derive_serde", serde(rename = "NtwkRef", skip_serializing_if = "Option::is_none") )]
37932	pub ntwk_ref: Option<String>,
37933	#[cfg_attr( feature = "derive_serde", serde(rename = "FileLctnElctrncAdr", skip_serializing_if = "Option::is_none") )]
37934	pub file_lctn_elctrnc_adr: Option<String>,
37935}
37936
37937impl FileData1 {
37938	pub fn validate(&self) -> Result<(), ValidationError> {
37939		if let Some(ref val) = self.tp { val.validate()? }
37940		if self.id.chars().count() < 1 {
37941			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
37942		}
37943		if self.id.chars().count() > 35 {
37944			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
37945		}
37946		if let Some(ref val) = self.isse_dt { val.validate()? }
37947		if let Some(ref val) = self.frmt { val.validate()? }
37948		if let Some(ref val) = self.file_nm {
37949			if val.chars().count() < 1 {
37950				return Err(ValidationError::new(1001, "file_nm is shorter than the minimum length of 1".to_string()));
37951			}
37952			if val.chars().count() > 140 {
37953				return Err(ValidationError::new(1002, "file_nm exceeds the maximum length of 140".to_string()));
37954			}
37955		}
37956		if let Some(ref val) = self.ntwk_ref {
37957			if val.chars().count() < 1 {
37958				return Err(ValidationError::new(1001, "ntwk_ref is shorter than the minimum length of 1".to_string()));
37959			}
37960			if val.chars().count() > 140 {
37961				return Err(ValidationError::new(1002, "ntwk_ref exceeds the maximum length of 140".to_string()));
37962			}
37963		}
37964		if let Some(ref val) = self.file_lctn_elctrnc_adr {
37965			if val.chars().count() < 1 {
37966				return Err(ValidationError::new(1001, "file_lctn_elctrnc_adr is shorter than the minimum length of 1".to_string()));
37967			}
37968			if val.chars().count() > 2048 {
37969				return Err(ValidationError::new(1002, "file_lctn_elctrnc_adr exceeds the maximum length of 2048".to_string()));
37970			}
37971		}
37972		Ok(())
37973	}
37974}
37975
37976
37977// FinalStatus1Code ...
37978#[cfg_attr(feature = "derive_debug", derive(Debug))]
37979#[cfg_attr(feature = "derive_default", derive(Default))]
37980#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
37981#[cfg_attr(feature = "derive_clone", derive(Clone))]
37982#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
37983pub enum FinalStatus1Code {
37984	#[cfg_attr(feature = "derive_default", default)]
37985	#[cfg_attr( feature = "derive_serde", serde(rename = "STLD") )]
37986	CodeSTLD,
37987	#[cfg_attr( feature = "derive_serde", serde(rename = "RJTD") )]
37988	CodeRJTD,
37989	#[cfg_attr( feature = "derive_serde", serde(rename = "CAND") )]
37990	CodeCAND,
37991	#[cfg_attr( feature = "derive_serde", serde(rename = "FNLD") )]
37992	CodeFNLD,
37993}
37994
37995impl FinalStatus1Code {
37996	pub fn validate(&self) -> Result<(), ValidationError> {
37997		Ok(())
37998	}
37999}
38000
38001
38002// FinalStatusCode ...
38003#[cfg_attr(feature = "derive_debug", derive(Debug))]
38004#[cfg_attr(feature = "derive_default", derive(Default))]
38005#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38006#[cfg_attr(feature = "derive_clone", derive(Clone))]
38007#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38008pub enum FinalStatusCode {
38009	#[cfg_attr(feature = "derive_default", default)]
38010	#[cfg_attr( feature = "derive_serde", serde(rename = "STLD") )]
38011	CodeSTLD,
38012	#[cfg_attr( feature = "derive_serde", serde(rename = "RJTD") )]
38013	CodeRJTD,
38014	#[cfg_attr( feature = "derive_serde", serde(rename = "CAND") )]
38015	CodeCAND,
38016	#[cfg_attr( feature = "derive_serde", serde(rename = "FNLD") )]
38017	CodeFNLD,
38018}
38019
38020impl FinalStatusCode {
38021	pub fn validate(&self) -> Result<(), ValidationError> {
38022		Ok(())
38023	}
38024}
38025
38026
38027// FinancialIdentificationSchemeName1Choice ...
38028#[cfg_attr(feature = "derive_debug", derive(Debug))]
38029#[cfg_attr(feature = "derive_default", derive(Default))]
38030#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38031#[cfg_attr(feature = "derive_clone", derive(Clone))]
38032#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38033pub struct FinancialIdentificationSchemeName1Choice {
38034	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
38035	pub cd: Option<String>,
38036	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
38037	pub prtry: Option<String>,
38038}
38039
38040impl FinancialIdentificationSchemeName1Choice {
38041	pub fn validate(&self) -> Result<(), ValidationError> {
38042		if let Some(ref val) = self.cd {
38043			if val.chars().count() < 1 {
38044				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
38045			}
38046			if val.chars().count() > 4 {
38047				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
38048			}
38049		}
38050		if let Some(ref val) = self.prtry {
38051			if val.chars().count() < 1 {
38052				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
38053			}
38054			if val.chars().count() > 35 {
38055				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
38056			}
38057		}
38058		Ok(())
38059	}
38060}
38061
38062
38063// FinancialInstitutionIdentification11Choice ...
38064#[cfg_attr(feature = "derive_debug", derive(Debug))]
38065#[cfg_attr(feature = "derive_default", derive(Default))]
38066#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38067#[cfg_attr(feature = "derive_clone", derive(Clone))]
38068#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38069pub struct FinancialInstitutionIdentification11Choice {
38070	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none") )]
38071	pub nm_and_adr: Option<NameAndAddress5>,
38072	#[cfg_attr( feature = "derive_serde", serde(rename = "BICFI", skip_serializing_if = "Option::is_none") )]
38073	pub bicfi: Option<String>,
38074	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysMmbId", skip_serializing_if = "Option::is_none") )]
38075	pub clr_sys_mmb_id: Option<ClearingSystemMemberIdentification4Choice>,
38076	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryId", skip_serializing_if = "Option::is_none") )]
38077	pub prtry_id: Option<SimpleIdentificationInformation4>,
38078}
38079
38080impl FinancialInstitutionIdentification11Choice {
38081	pub fn validate(&self) -> Result<(), ValidationError> {
38082		if let Some(ref val) = self.nm_and_adr { val.validate()? }
38083		if let Some(ref val) = self.bicfi {
38084			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
38085			if !pattern.is_match(val) {
38086				return Err(ValidationError::new(1005, "bicfi does not match the required pattern".to_string()));
38087			}
38088		}
38089		if let Some(ref val) = self.clr_sys_mmb_id { val.validate()? }
38090		if let Some(ref val) = self.prtry_id { val.validate()? }
38091		Ok(())
38092	}
38093}
38094
38095
38096// FinancialInstitutionIdentification18 ...
38097#[cfg_attr(feature = "derive_debug", derive(Debug))]
38098#[cfg_attr(feature = "derive_default", derive(Default))]
38099#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38100#[cfg_attr(feature = "derive_clone", derive(Clone))]
38101#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38102pub struct FinancialInstitutionIdentification18 {
38103	#[cfg_attr( feature = "derive_serde", serde(rename = "BICFI", skip_serializing_if = "Option::is_none") )]
38104	pub bicfi: Option<String>,
38105	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysMmbId", skip_serializing_if = "Option::is_none") )]
38106	pub clr_sys_mmb_id: Option<ClearingSystemMemberIdentification2>,
38107	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
38108	pub lei: Option<String>,
38109	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
38110	pub nm: Option<String>,
38111	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
38112	pub pstl_adr: Option<PostalAddress24>,
38113	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
38114	pub othr: Option<GenericFinancialIdentification1>,
38115}
38116
38117impl FinancialInstitutionIdentification18 {
38118	pub fn validate(&self) -> Result<(), ValidationError> {
38119		if let Some(ref val) = self.bicfi {
38120			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
38121			if !pattern.is_match(val) {
38122				return Err(ValidationError::new(1005, "bicfi does not match the required pattern".to_string()));
38123			}
38124		}
38125		if let Some(ref val) = self.clr_sys_mmb_id { val.validate()? }
38126		if let Some(ref val) = self.lei {
38127			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
38128			if !pattern.is_match(val) {
38129				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
38130			}
38131		}
38132		if let Some(ref val) = self.nm {
38133			if val.chars().count() < 1 {
38134				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
38135			}
38136			if val.chars().count() > 140 {
38137				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
38138			}
38139		}
38140		if let Some(ref val) = self.pstl_adr { val.validate()? }
38141		if let Some(ref val) = self.othr { val.validate()? }
38142		Ok(())
38143	}
38144}
38145
38146
38147// FinancialInstitutionIdentification19 ...
38148#[cfg_attr(feature = "derive_debug", derive(Debug))]
38149#[cfg_attr(feature = "derive_default", derive(Default))]
38150#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38151#[cfg_attr(feature = "derive_clone", derive(Clone))]
38152#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38153pub struct FinancialInstitutionIdentification19 {
38154	#[cfg_attr( feature = "derive_serde", serde(rename = "BICFI", skip_serializing_if = "Option::is_none") )]
38155	pub bicfi: Option<String>,
38156	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysMmbId", skip_serializing_if = "Option::is_none") )]
38157	pub clr_sys_mmb_id: Option<ClearingSystemMemberIdentification2>,
38158	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
38159	pub lei: Option<String>,
38160	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
38161	pub othr: Option<GenericFinancialIdentification1>,
38162}
38163
38164impl FinancialInstitutionIdentification19 {
38165	pub fn validate(&self) -> Result<(), ValidationError> {
38166		if let Some(ref val) = self.bicfi {
38167			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
38168			if !pattern.is_match(val) {
38169				return Err(ValidationError::new(1005, "bicfi does not match the required pattern".to_string()));
38170			}
38171		}
38172		if let Some(ref val) = self.clr_sys_mmb_id { val.validate()? }
38173		if let Some(ref val) = self.lei {
38174			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
38175			if !pattern.is_match(val) {
38176				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
38177			}
38178		}
38179		if let Some(ref val) = self.othr { val.validate()? }
38180		Ok(())
38181	}
38182}
38183
38184
38185// FinancialInstitutionIdentification23 ...
38186#[cfg_attr(feature = "derive_debug", derive(Debug))]
38187#[cfg_attr(feature = "derive_default", derive(Default))]
38188#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38189#[cfg_attr(feature = "derive_clone", derive(Clone))]
38190#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38191pub struct FinancialInstitutionIdentification23 {
38192	#[cfg_attr( feature = "derive_serde", serde(rename = "BICFI", skip_serializing_if = "Option::is_none") )]
38193	pub bicfi: Option<String>,
38194	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysMmbId", skip_serializing_if = "Option::is_none") )]
38195	pub clr_sys_mmb_id: Option<ClearingSystemMemberIdentification2>,
38196	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
38197	pub lei: Option<String>,
38198	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
38199	pub nm: Option<String>,
38200	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
38201	pub pstl_adr: Option<PostalAddress27>,
38202	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
38203	pub othr: Option<GenericFinancialIdentification1>,
38204}
38205
38206impl FinancialInstitutionIdentification23 {
38207	pub fn validate(&self) -> Result<(), ValidationError> {
38208		if let Some(ref val) = self.bicfi {
38209			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
38210			if !pattern.is_match(val) {
38211				return Err(ValidationError::new(1005, "bicfi does not match the required pattern".to_string()));
38212			}
38213		}
38214		if let Some(ref val) = self.clr_sys_mmb_id { val.validate()? }
38215		if let Some(ref val) = self.lei {
38216			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
38217			if !pattern.is_match(val) {
38218				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
38219			}
38220		}
38221		if let Some(ref val) = self.nm {
38222			if val.chars().count() < 1 {
38223				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
38224			}
38225			if val.chars().count() > 140 {
38226				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
38227			}
38228		}
38229		if let Some(ref val) = self.pstl_adr { val.validate()? }
38230		if let Some(ref val) = self.othr { val.validate()? }
38231		Ok(())
38232	}
38233}
38234
38235
38236// FinancialInstitutionSector1 ...
38237#[cfg_attr(feature = "derive_debug", derive(Debug))]
38238#[cfg_attr(feature = "derive_default", derive(Default))]
38239#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38240#[cfg_attr(feature = "derive_clone", derive(Clone))]
38241#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38242pub struct FinancialInstitutionSector1 {
38243	#[cfg_attr( feature = "derive_serde", serde(rename = "Sctr") )]
38244	pub sctr: Vec<FinancialPartyClassification2Choice>,
38245	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrThrshld", skip_serializing_if = "Option::is_none") )]
38246	pub clr_thrshld: Option<bool>,
38247}
38248
38249impl FinancialInstitutionSector1 {
38250	pub fn validate(&self) -> Result<(), ValidationError> {
38251		for item in &self.sctr { item.validate()? }
38252		Ok(())
38253	}
38254}
38255
38256
38257// FinancialInstrument104 ...
38258#[cfg_attr(feature = "derive_debug", derive(Debug))]
38259#[cfg_attr(feature = "derive_default", derive(Default))]
38260#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38261#[cfg_attr(feature = "derive_clone", derive(Clone))]
38262#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38263pub struct FinancialInstrument104 {
38264	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
38265	pub id: String,
38266	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr") )]
38267	pub issr: String,
38268}
38269
38270impl FinancialInstrument104 {
38271	pub fn validate(&self) -> Result<(), ValidationError> {
38272		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
38273		if !pattern.is_match(&self.id) {
38274			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
38275		}
38276		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
38277		if !pattern.is_match(&self.issr) {
38278			return Err(ValidationError::new(1005, "issr does not match the required pattern".to_string()));
38279		}
38280		Ok(())
38281	}
38282}
38283
38284
38285// FinancialInstrument46Choice ...
38286#[cfg_attr(feature = "derive_debug", derive(Debug))]
38287#[cfg_attr(feature = "derive_default", derive(Default))]
38288#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38289#[cfg_attr(feature = "derive_clone", derive(Clone))]
38290#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38291pub struct FinancialInstrument46Choice {
38292	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
38293	pub isin: Option<String>,
38294	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
38295	pub indx: Option<BenchmarkCurveName2Code>,
38296}
38297
38298impl FinancialInstrument46Choice {
38299	pub fn validate(&self) -> Result<(), ValidationError> {
38300		if let Some(ref val) = self.isin {
38301			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
38302			if !pattern.is_match(val) {
38303				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
38304			}
38305		}
38306		if let Some(ref val) = self.indx { val.validate()? }
38307		Ok(())
38308	}
38309}
38310
38311
38312// FinancialInstrument48Choice ...
38313#[cfg_attr(feature = "derive_debug", derive(Debug))]
38314#[cfg_attr(feature = "derive_default", derive(Default))]
38315#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38316#[cfg_attr(feature = "derive_clone", derive(Clone))]
38317#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38318pub struct FinancialInstrument48Choice {
38319	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
38320	pub isin: Option<String>,
38321	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
38322	pub lei: Option<String>,
38323	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
38324	pub indx: Option<FinancialInstrument58>,
38325}
38326
38327impl FinancialInstrument48Choice {
38328	pub fn validate(&self) -> Result<(), ValidationError> {
38329		if let Some(ref val) = self.isin {
38330			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
38331			if !pattern.is_match(val) {
38332				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
38333			}
38334		}
38335		if let Some(ref val) = self.lei {
38336			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
38337			if !pattern.is_match(val) {
38338				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
38339			}
38340		}
38341		if let Some(ref val) = self.indx { val.validate()? }
38342		Ok(())
38343	}
38344}
38345
38346
38347// FinancialInstrument53 ...
38348#[cfg_attr(feature = "derive_debug", derive(Debug))]
38349#[cfg_attr(feature = "derive_default", derive(Default))]
38350#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38351#[cfg_attr(feature = "derive_clone", derive(Clone))]
38352#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38353pub struct FinancialInstrument53 {
38354	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
38355	pub isin: Option<Vec<String>>,
38356	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
38357	pub lei: Option<Vec<String>>,
38358}
38359
38360impl FinancialInstrument53 {
38361	pub fn validate(&self) -> Result<(), ValidationError> {
38362		if let Some(ref vec) = self.isin {
38363			for item in vec {
38364				let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
38365				if !pattern.is_match(&item) {
38366					return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
38367				}
38368			}
38369		}
38370		if let Some(ref vec) = self.lei {
38371			for item in vec {
38372				let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
38373				if !pattern.is_match(&item) {
38374					return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
38375				}
38376			}
38377		}
38378		Ok(())
38379	}
38380}
38381
38382
38383// FinancialInstrument55 ...
38384#[cfg_attr(feature = "derive_debug", derive(Debug))]
38385#[cfg_attr(feature = "derive_default", derive(Default))]
38386#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38387#[cfg_attr(feature = "derive_clone", derive(Clone))]
38388#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38389pub struct FinancialInstrument55 {
38390	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
38391	pub id: SecurityIdentification25Choice,
38392	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
38393	pub nm: Option<String>,
38394	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtNm", skip_serializing_if = "Option::is_none") )]
38395	pub shrt_nm: Option<String>,
38396	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryId", skip_serializing_if = "Option::is_none") )]
38397	pub splmtry_id: Option<String>,
38398	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssTp", skip_serializing_if = "Option::is_none") )]
38399	pub clss_tp: Option<String>,
38400	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesForm", skip_serializing_if = "Option::is_none") )]
38401	pub scties_form: Option<FormOfSecurity1Code>,
38402	#[cfg_attr( feature = "derive_serde", serde(rename = "DstrbtnPlcy", skip_serializing_if = "Option::is_none") )]
38403	pub dstrbtn_plcy: Option<DistributionPolicy1Code>,
38404	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctGrp", skip_serializing_if = "Option::is_none") )]
38405	pub pdct_grp: Option<String>,
38406}
38407
38408impl FinancialInstrument55 {
38409	pub fn validate(&self) -> Result<(), ValidationError> {
38410		self.id.validate()?;
38411		if let Some(ref val) = self.nm {
38412			if val.chars().count() < 1 {
38413				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
38414			}
38415			if val.chars().count() > 350 {
38416				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
38417			}
38418		}
38419		if let Some(ref val) = self.shrt_nm {
38420			if val.chars().count() < 1 {
38421				return Err(ValidationError::new(1001, "shrt_nm is shorter than the minimum length of 1".to_string()));
38422			}
38423			if val.chars().count() > 35 {
38424				return Err(ValidationError::new(1002, "shrt_nm exceeds the maximum length of 35".to_string()));
38425			}
38426		}
38427		if let Some(ref val) = self.splmtry_id {
38428			if val.chars().count() < 1 {
38429				return Err(ValidationError::new(1001, "splmtry_id is shorter than the minimum length of 1".to_string()));
38430			}
38431			if val.chars().count() > 35 {
38432				return Err(ValidationError::new(1002, "splmtry_id exceeds the maximum length of 35".to_string()));
38433			}
38434		}
38435		if let Some(ref val) = self.clss_tp {
38436			if val.chars().count() < 1 {
38437				return Err(ValidationError::new(1001, "clss_tp is shorter than the minimum length of 1".to_string()));
38438			}
38439			if val.chars().count() > 35 {
38440				return Err(ValidationError::new(1002, "clss_tp exceeds the maximum length of 35".to_string()));
38441			}
38442		}
38443		if let Some(ref val) = self.scties_form { val.validate()? }
38444		if let Some(ref val) = self.dstrbtn_plcy { val.validate()? }
38445		if let Some(ref val) = self.pdct_grp {
38446			if val.chars().count() < 1 {
38447				return Err(ValidationError::new(1001, "pdct_grp is shorter than the minimum length of 1".to_string()));
38448			}
38449			if val.chars().count() > 140 {
38450				return Err(ValidationError::new(1002, "pdct_grp exceeds the maximum length of 140".to_string()));
38451			}
38452		}
38453		Ok(())
38454	}
38455}
38456
38457
38458// FinancialInstrument58 ...
38459#[cfg_attr(feature = "derive_debug", derive(Debug))]
38460#[cfg_attr(feature = "derive_default", derive(Default))]
38461#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38462#[cfg_attr(feature = "derive_clone", derive(Clone))]
38463#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38464pub struct FinancialInstrument58 {
38465	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
38466	pub isin: Option<String>,
38467	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
38468	pub nm: FloatingInterestRate8,
38469}
38470
38471impl FinancialInstrument58 {
38472	pub fn validate(&self) -> Result<(), ValidationError> {
38473		if let Some(ref val) = self.isin {
38474			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
38475			if !pattern.is_match(val) {
38476				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
38477			}
38478		}
38479		self.nm.validate()?;
38480		Ok(())
38481	}
38482}
38483
38484
38485// FinancialInstrument59 ...
38486#[cfg_attr(feature = "derive_debug", derive(Debug))]
38487#[cfg_attr(feature = "derive_default", derive(Default))]
38488#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38489#[cfg_attr(feature = "derive_clone", derive(Clone))]
38490#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38491pub struct FinancialInstrument59 {
38492	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
38493	pub id: String,
38494	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr") )]
38495	pub issr: String,
38496	#[cfg_attr( feature = "derive_serde", serde(rename = "Sctr", skip_serializing_if = "Option::is_none") )]
38497	pub sctr: Option<String>,
38498}
38499
38500impl FinancialInstrument59 {
38501	pub fn validate(&self) -> Result<(), ValidationError> {
38502		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
38503		if !pattern.is_match(&self.id) {
38504			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
38505		}
38506		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
38507		if !pattern.is_match(&self.issr) {
38508			return Err(ValidationError::new(1005, "issr does not match the required pattern".to_string()));
38509		}
38510		Ok(())
38511	}
38512}
38513
38514
38515// FinancialInstrument71 ...
38516#[cfg_attr(feature = "derive_debug", derive(Debug))]
38517#[cfg_attr(feature = "derive_default", derive(Default))]
38518#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38519#[cfg_attr(feature = "derive_clone", derive(Clone))]
38520#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38521pub struct FinancialInstrument71 {
38522	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
38523	pub id: SecurityIdentification19,
38524	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtNm", skip_serializing_if = "Option::is_none") )]
38525	pub shrt_nm: Option<String>,
38526	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
38527	pub nm: Option<String>,
38528	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryId", skip_serializing_if = "Option::is_none") )]
38529	pub splmtry_id: Option<String>,
38530	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssTp", skip_serializing_if = "Option::is_none") )]
38531	pub clss_tp: Option<String>,
38532	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesForm", skip_serializing_if = "Option::is_none") )]
38533	pub scties_form: Option<FormOfSecurity1Code>,
38534	#[cfg_attr( feature = "derive_serde", serde(rename = "DstrbtnPlcy", skip_serializing_if = "Option::is_none") )]
38535	pub dstrbtn_plcy: Option<DistributionPolicy1Code>,
38536	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctGrp", skip_serializing_if = "Option::is_none") )]
38537	pub pdct_grp: Option<String>,
38538}
38539
38540impl FinancialInstrument71 {
38541	pub fn validate(&self) -> Result<(), ValidationError> {
38542		self.id.validate()?;
38543		if let Some(ref val) = self.shrt_nm {
38544			if val.chars().count() < 1 {
38545				return Err(ValidationError::new(1001, "shrt_nm is shorter than the minimum length of 1".to_string()));
38546			}
38547			if val.chars().count() > 35 {
38548				return Err(ValidationError::new(1002, "shrt_nm exceeds the maximum length of 35".to_string()));
38549			}
38550		}
38551		if let Some(ref val) = self.nm {
38552			if val.chars().count() < 1 {
38553				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
38554			}
38555			if val.chars().count() > 350 {
38556				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
38557			}
38558		}
38559		if let Some(ref val) = self.splmtry_id {
38560			if val.chars().count() < 1 {
38561				return Err(ValidationError::new(1001, "splmtry_id is shorter than the minimum length of 1".to_string()));
38562			}
38563			if val.chars().count() > 35 {
38564				return Err(ValidationError::new(1002, "splmtry_id exceeds the maximum length of 35".to_string()));
38565			}
38566		}
38567		if let Some(ref val) = self.clss_tp {
38568			if val.chars().count() < 1 {
38569				return Err(ValidationError::new(1001, "clss_tp is shorter than the minimum length of 1".to_string()));
38570			}
38571			if val.chars().count() > 35 {
38572				return Err(ValidationError::new(1002, "clss_tp exceeds the maximum length of 35".to_string()));
38573			}
38574		}
38575		if let Some(ref val) = self.scties_form { val.validate()? }
38576		if let Some(ref val) = self.dstrbtn_plcy { val.validate()? }
38577		if let Some(ref val) = self.pdct_grp {
38578			if val.chars().count() < 1 {
38579				return Err(ValidationError::new(1001, "pdct_grp is shorter than the minimum length of 1".to_string()));
38580			}
38581			if val.chars().count() > 140 {
38582				return Err(ValidationError::new(1002, "pdct_grp exceeds the maximum length of 140".to_string()));
38583			}
38584		}
38585		Ok(())
38586	}
38587}
38588
38589
38590// FinancialInstrument8 ...
38591#[cfg_attr(feature = "derive_debug", derive(Debug))]
38592#[cfg_attr(feature = "derive_default", derive(Default))]
38593#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38594#[cfg_attr(feature = "derive_clone", derive(Clone))]
38595#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38596pub struct FinancialInstrument8 {
38597	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
38598	pub id: Vec<SecurityIdentification3Choice>,
38599	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
38600	pub nm: Option<String>,
38601	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryId", skip_serializing_if = "Option::is_none") )]
38602	pub splmtry_id: Option<String>,
38603	#[cfg_attr( feature = "derive_serde", serde(rename = "DnmtnCcy", skip_serializing_if = "Option::is_none") )]
38604	pub dnmtn_ccy: Option<String>,
38605	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssTp", skip_serializing_if = "Option::is_none") )]
38606	pub clss_tp: Option<String>,
38607	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesForm", skip_serializing_if = "Option::is_none") )]
38608	pub scties_form: Option<FormOfSecurity1Code>,
38609	#[cfg_attr( feature = "derive_serde", serde(rename = "DstrbtnPlcy", skip_serializing_if = "Option::is_none") )]
38610	pub dstrbtn_plcy: Option<DistributionPolicy1Code>,
38611	#[cfg_attr( feature = "derive_serde", serde(rename = "DualFndInd") )]
38612	pub dual_fnd_ind: bool,
38613}
38614
38615impl FinancialInstrument8 {
38616	pub fn validate(&self) -> Result<(), ValidationError> {
38617		for item in &self.id { item.validate()? }
38618		if let Some(ref val) = self.nm {
38619			if val.chars().count() < 1 {
38620				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
38621			}
38622			if val.chars().count() > 350 {
38623				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
38624			}
38625		}
38626		if let Some(ref val) = self.splmtry_id {
38627			if val.chars().count() < 1 {
38628				return Err(ValidationError::new(1001, "splmtry_id is shorter than the minimum length of 1".to_string()));
38629			}
38630			if val.chars().count() > 35 {
38631				return Err(ValidationError::new(1002, "splmtry_id exceeds the maximum length of 35".to_string()));
38632			}
38633		}
38634		if let Some(ref val) = self.dnmtn_ccy {
38635			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
38636			if !pattern.is_match(val) {
38637				return Err(ValidationError::new(1005, "dnmtn_ccy does not match the required pattern".to_string()));
38638			}
38639		}
38640		if let Some(ref val) = self.clss_tp {
38641			if val.chars().count() < 1 {
38642				return Err(ValidationError::new(1001, "clss_tp is shorter than the minimum length of 1".to_string()));
38643			}
38644			if val.chars().count() > 35 {
38645				return Err(ValidationError::new(1002, "clss_tp exceeds the maximum length of 35".to_string()));
38646			}
38647		}
38648		if let Some(ref val) = self.scties_form { val.validate()? }
38649		if let Some(ref val) = self.dstrbtn_plcy { val.validate()? }
38650		Ok(())
38651	}
38652}
38653
38654
38655// FinancialInstrument87 ...
38656#[cfg_attr(feature = "derive_debug", derive(Debug))]
38657#[cfg_attr(feature = "derive_default", derive(Default))]
38658#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38659#[cfg_attr(feature = "derive_clone", derive(Clone))]
38660#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38661pub struct FinancialInstrument87 {
38662	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
38663	pub id: SecurityIdentification25Choice,
38664	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
38665	pub nm: Option<String>,
38666	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtNm", skip_serializing_if = "Option::is_none") )]
38667	pub shrt_nm: Option<String>,
38668	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryId", skip_serializing_if = "Option::is_none") )]
38669	pub splmtry_id: Option<String>,
38670	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssTp", skip_serializing_if = "Option::is_none") )]
38671	pub clss_tp: Option<String>,
38672	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesForm", skip_serializing_if = "Option::is_none") )]
38673	pub scties_form: Option<FormOfSecurity1Code>,
38674	#[cfg_attr( feature = "derive_serde", serde(rename = "DstrbtnPlcy", skip_serializing_if = "Option::is_none") )]
38675	pub dstrbtn_plcy: Option<DistributionPolicy1Code>,
38676	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctGrp", skip_serializing_if = "Option::is_none") )]
38677	pub pdct_grp: Option<String>,
38678	#[cfg_attr( feature = "derive_serde", serde(rename = "BlckdHldgDtls", skip_serializing_if = "Option::is_none") )]
38679	pub blckd_hldg_dtls: Option<BlockedHoldingDetails2>,
38680	#[cfg_attr( feature = "derive_serde", serde(rename = "Pldgg", skip_serializing_if = "Option::is_none") )]
38681	pub pldgg: Option<Eligible1Code>,
38682	#[cfg_attr( feature = "derive_serde", serde(rename = "Coll", skip_serializing_if = "Option::is_none") )]
38683	pub coll: Option<Collateral1Code>,
38684	#[cfg_attr( feature = "derive_serde", serde(rename = "ThrdPtyRghts", skip_serializing_if = "Option::is_none") )]
38685	pub thrd_pty_rghts: Option<ThirdPartyRights2>,
38686	#[cfg_attr( feature = "derive_serde", serde(rename = "FndOwnrsh", skip_serializing_if = "Option::is_none") )]
38687	pub fnd_ownrsh: Option<FundOwnership1Code>,
38688	#[cfg_attr( feature = "derive_serde", serde(rename = "FndIntntn", skip_serializing_if = "Option::is_none") )]
38689	pub fnd_intntn: Option<FundIntention1Code>,
38690	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlSts", skip_serializing_if = "Option::is_none") )]
38691	pub oprl_sts: Option<OperationalStatus1Code>,
38692}
38693
38694impl FinancialInstrument87 {
38695	pub fn validate(&self) -> Result<(), ValidationError> {
38696		self.id.validate()?;
38697		if let Some(ref val) = self.nm {
38698			if val.chars().count() < 1 {
38699				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
38700			}
38701			if val.chars().count() > 350 {
38702				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
38703			}
38704		}
38705		if let Some(ref val) = self.shrt_nm {
38706			if val.chars().count() < 1 {
38707				return Err(ValidationError::new(1001, "shrt_nm is shorter than the minimum length of 1".to_string()));
38708			}
38709			if val.chars().count() > 35 {
38710				return Err(ValidationError::new(1002, "shrt_nm exceeds the maximum length of 35".to_string()));
38711			}
38712		}
38713		if let Some(ref val) = self.splmtry_id {
38714			if val.chars().count() < 1 {
38715				return Err(ValidationError::new(1001, "splmtry_id is shorter than the minimum length of 1".to_string()));
38716			}
38717			if val.chars().count() > 35 {
38718				return Err(ValidationError::new(1002, "splmtry_id exceeds the maximum length of 35".to_string()));
38719			}
38720		}
38721		if let Some(ref val) = self.clss_tp {
38722			if val.chars().count() < 1 {
38723				return Err(ValidationError::new(1001, "clss_tp is shorter than the minimum length of 1".to_string()));
38724			}
38725			if val.chars().count() > 35 {
38726				return Err(ValidationError::new(1002, "clss_tp exceeds the maximum length of 35".to_string()));
38727			}
38728		}
38729		if let Some(ref val) = self.scties_form { val.validate()? }
38730		if let Some(ref val) = self.dstrbtn_plcy { val.validate()? }
38731		if let Some(ref val) = self.pdct_grp {
38732			if val.chars().count() < 1 {
38733				return Err(ValidationError::new(1001, "pdct_grp is shorter than the minimum length of 1".to_string()));
38734			}
38735			if val.chars().count() > 140 {
38736				return Err(ValidationError::new(1002, "pdct_grp exceeds the maximum length of 140".to_string()));
38737			}
38738		}
38739		if let Some(ref val) = self.blckd_hldg_dtls { val.validate()? }
38740		if let Some(ref val) = self.pldgg { val.validate()? }
38741		if let Some(ref val) = self.coll { val.validate()? }
38742		if let Some(ref val) = self.thrd_pty_rghts { val.validate()? }
38743		if let Some(ref val) = self.fnd_ownrsh { val.validate()? }
38744		if let Some(ref val) = self.fnd_intntn { val.validate()? }
38745		if let Some(ref val) = self.oprl_sts { val.validate()? }
38746		Ok(())
38747	}
38748}
38749
38750
38751// FinancialInstrument9 ...
38752#[cfg_attr(feature = "derive_debug", derive(Debug))]
38753#[cfg_attr(feature = "derive_default", derive(Default))]
38754#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38755#[cfg_attr(feature = "derive_clone", derive(Clone))]
38756#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38757pub struct FinancialInstrument9 {
38758	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
38759	pub id: SecurityIdentification3Choice,
38760	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
38761	pub nm: Option<String>,
38762	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryId", skip_serializing_if = "Option::is_none") )]
38763	pub splmtry_id: Option<String>,
38764	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdNAVCcy", skip_serializing_if = "Option::is_none") )]
38765	pub reqd_nav_ccy: Option<String>,
38766	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssTp", skip_serializing_if = "Option::is_none") )]
38767	pub clss_tp: Option<String>,
38768	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesForm", skip_serializing_if = "Option::is_none") )]
38769	pub scties_form: Option<FormOfSecurity1Code>,
38770	#[cfg_attr( feature = "derive_serde", serde(rename = "DstrbtnPlcy", skip_serializing_if = "Option::is_none") )]
38771	pub dstrbtn_plcy: Option<DistributionPolicy1Code>,
38772	#[cfg_attr( feature = "derive_serde", serde(rename = "DualFndInd") )]
38773	pub dual_fnd_ind: bool,
38774}
38775
38776impl FinancialInstrument9 {
38777	pub fn validate(&self) -> Result<(), ValidationError> {
38778		self.id.validate()?;
38779		if let Some(ref val) = self.nm {
38780			if val.chars().count() < 1 {
38781				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
38782			}
38783			if val.chars().count() > 350 {
38784				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
38785			}
38786		}
38787		if let Some(ref val) = self.splmtry_id {
38788			if val.chars().count() < 1 {
38789				return Err(ValidationError::new(1001, "splmtry_id is shorter than the minimum length of 1".to_string()));
38790			}
38791			if val.chars().count() > 35 {
38792				return Err(ValidationError::new(1002, "splmtry_id exceeds the maximum length of 35".to_string()));
38793			}
38794		}
38795		if let Some(ref val) = self.reqd_nav_ccy {
38796			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
38797			if !pattern.is_match(val) {
38798				return Err(ValidationError::new(1005, "reqd_nav_ccy does not match the required pattern".to_string()));
38799			}
38800		}
38801		if let Some(ref val) = self.clss_tp {
38802			if val.chars().count() < 1 {
38803				return Err(ValidationError::new(1001, "clss_tp is shorter than the minimum length of 1".to_string()));
38804			}
38805			if val.chars().count() > 35 {
38806				return Err(ValidationError::new(1002, "clss_tp exceeds the maximum length of 35".to_string()));
38807			}
38808		}
38809		if let Some(ref val) = self.scties_form { val.validate()? }
38810		if let Some(ref val) = self.dstrbtn_plcy { val.validate()? }
38811		Ok(())
38812	}
38813}
38814
38815
38816// FinancialInstrument96 ...
38817#[cfg_attr(feature = "derive_debug", derive(Debug))]
38818#[cfg_attr(feature = "derive_default", derive(Default))]
38819#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38820#[cfg_attr(feature = "derive_clone", derive(Clone))]
38821#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38822pub struct FinancialInstrument96 {
38823	#[cfg_attr( feature = "derive_serde", serde(rename = "PhysBrScties", skip_serializing_if = "Option::is_none") )]
38824	pub phys_br_scties: Option<bool>,
38825	#[cfg_attr( feature = "derive_serde", serde(rename = "DmtrlsdBrScties", skip_serializing_if = "Option::is_none") )]
38826	pub dmtrlsd_br_scties: Option<bool>,
38827	#[cfg_attr( feature = "derive_serde", serde(rename = "PhysRegdScties", skip_serializing_if = "Option::is_none") )]
38828	pub phys_regd_scties: Option<bool>,
38829	#[cfg_attr( feature = "derive_serde", serde(rename = "DmtrlsdRegdScties", skip_serializing_if = "Option::is_none") )]
38830	pub dmtrlsd_regd_scties: Option<bool>,
38831	#[cfg_attr( feature = "derive_serde", serde(rename = "DstrbtnPlcy", skip_serializing_if = "Option::is_none") )]
38832	pub dstrbtn_plcy: Option<DistributionPolicy1Code>,
38833	#[cfg_attr( feature = "derive_serde", serde(rename = "DvddPlcy", skip_serializing_if = "Option::is_none") )]
38834	pub dvdd_plcy: Option<DividendPolicy1Code>,
38835	#[cfg_attr( feature = "derive_serde", serde(rename = "DvddFrqcy", skip_serializing_if = "Option::is_none") )]
38836	pub dvdd_frqcy: Option<EventFrequency5Code>,
38837	#[cfg_attr( feature = "derive_serde", serde(rename = "RinvstmtFrqcy", skip_serializing_if = "Option::is_none") )]
38838	pub rinvstmt_frqcy: Option<EventFrequency5Code>,
38839	#[cfg_attr( feature = "derive_serde", serde(rename = "FrntEndLd", skip_serializing_if = "Option::is_none") )]
38840	pub frnt_end_ld: Option<bool>,
38841	#[cfg_attr( feature = "derive_serde", serde(rename = "BckEndLd", skip_serializing_if = "Option::is_none") )]
38842	pub bck_end_ld: Option<bool>,
38843	#[cfg_attr( feature = "derive_serde", serde(rename = "SwtchFee", skip_serializing_if = "Option::is_none") )]
38844	pub swtch_fee: Option<bool>,
38845	#[cfg_attr( feature = "derive_serde", serde(rename = "EUSvgsDrctv", skip_serializing_if = "Option::is_none") )]
38846	pub eu_svgs_drctv: Option<EUSavingsDirective1Code>,
38847	#[cfg_attr( feature = "derive_serde", serde(rename = "LnchDt", skip_serializing_if = "Option::is_none") )]
38848	pub lnch_dt: Option<String>,
38849	#[cfg_attr( feature = "derive_serde", serde(rename = "FndEndDt", skip_serializing_if = "Option::is_none") )]
38850	pub fnd_end_dt: Option<String>,
38851	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
38852	pub termntn_dt: Option<String>,
38853	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlOfferEndDt", skip_serializing_if = "Option::is_none") )]
38854	pub initl_offer_end_dt: Option<String>,
38855	#[cfg_attr( feature = "derive_serde", serde(rename = "SspnsnStartDt", skip_serializing_if = "Option::is_none") )]
38856	pub sspnsn_start_dt: Option<String>,
38857	#[cfg_attr( feature = "derive_serde", serde(rename = "SspnsnEndDt", skip_serializing_if = "Option::is_none") )]
38858	pub sspnsn_end_dt: Option<String>,
38859	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
38860	pub mtrty_dt: Option<String>,
38861	#[cfg_attr( feature = "derive_serde", serde(rename = "MayBeTermntdEarly", skip_serializing_if = "Option::is_none") )]
38862	pub may_be_termntd_early: Option<TargetMarket1Code>,
38863	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsdEndFnd", skip_serializing_if = "Option::is_none") )]
38864	pub clsd_end_fnd: Option<bool>,
38865	#[cfg_attr( feature = "derive_serde", serde(rename = "Equlstn", skip_serializing_if = "Option::is_none") )]
38866	pub equlstn: Option<bool>,
38867	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxEffcntPdctElgbl", skip_serializing_if = "Option::is_none") )]
38868	pub tax_effcnt_pdct_elgbl: Option<bool>,
38869	#[cfg_attr( feature = "derive_serde", serde(rename = "Authrsd", skip_serializing_if = "Option::is_none") )]
38870	pub authrsd: Option<bool>,
38871	#[cfg_attr( feature = "derive_serde", serde(rename = "RDRCmplnt", skip_serializing_if = "Option::is_none") )]
38872	pub rdr_cmplnt: Option<bool>,
38873	#[cfg_attr( feature = "derive_serde", serde(rename = "MgmtFeeSrc", skip_serializing_if = "Option::is_none") )]
38874	pub mgmt_fee_src: Option<AnnualChargePaymentType1Code>,
38875	#[cfg_attr( feature = "derive_serde", serde(rename = "PrfrmncFee", skip_serializing_if = "Option::is_none") )]
38876	pub prfrmnc_fee: Option<bool>,
38877	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
38878	pub addtl_inf: Option<Vec<AdditionalInformation15>>,
38879}
38880
38881impl FinancialInstrument96 {
38882	pub fn validate(&self) -> Result<(), ValidationError> {
38883		if let Some(ref val) = self.dstrbtn_plcy { val.validate()? }
38884		if let Some(ref val) = self.dvdd_plcy { val.validate()? }
38885		if let Some(ref val) = self.dvdd_frqcy { val.validate()? }
38886		if let Some(ref val) = self.rinvstmt_frqcy { val.validate()? }
38887		if let Some(ref val) = self.eu_svgs_drctv { val.validate()? }
38888		if let Some(ref val) = self.may_be_termntd_early { val.validate()? }
38889		if let Some(ref val) = self.mgmt_fee_src { val.validate()? }
38890		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
38891		Ok(())
38892	}
38893}
38894
38895
38896// FinancialInstrument97 ...
38897#[cfg_attr(feature = "derive_debug", derive(Debug))]
38898#[cfg_attr(feature = "derive_default", derive(Default))]
38899#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38900#[cfg_attr(feature = "derive_clone", derive(Clone))]
38901#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38902pub struct FinancialInstrument97 {
38903	#[cfg_attr( feature = "derive_serde", serde(rename = "Eqty", skip_serializing_if = "Option::is_none") )]
38904	pub eqty: Option<Equity3>,
38905	#[cfg_attr( feature = "derive_serde", serde(rename = "Warrt", skip_serializing_if = "Option::is_none") )]
38906	pub warrt: Option<Warrant4>,
38907	#[cfg_attr( feature = "derive_serde", serde(rename = "Debt", skip_serializing_if = "Option::is_none") )]
38908	pub debt: Option<Debt5>,
38909	#[cfg_attr( feature = "derive_serde", serde(rename = "Deriv", skip_serializing_if = "Option::is_none") )]
38910	pub deriv: Option<Derivative4>,
38911}
38912
38913impl FinancialInstrument97 {
38914	pub fn validate(&self) -> Result<(), ValidationError> {
38915		if let Some(ref val) = self.eqty { val.validate()? }
38916		if let Some(ref val) = self.warrt { val.validate()? }
38917		if let Some(ref val) = self.debt { val.validate()? }
38918		if let Some(ref val) = self.deriv { val.validate()? }
38919		Ok(())
38920	}
38921}
38922
38923
38924// FinancialInstrument99Choice ...
38925#[cfg_attr(feature = "derive_debug", derive(Debug))]
38926#[cfg_attr(feature = "derive_default", derive(Default))]
38927#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38928#[cfg_attr(feature = "derive_clone", derive(Clone))]
38929#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38930pub struct FinancialInstrument99Choice {
38931	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
38932	pub id: Option<String>,
38933	#[cfg_attr( feature = "derive_serde", serde(rename = "StrtgyInstrms", skip_serializing_if = "Option::is_none") )]
38934	pub strtgy_instrms: Option<Vec<String>>,
38935}
38936
38937impl FinancialInstrument99Choice {
38938	pub fn validate(&self) -> Result<(), ValidationError> {
38939		if let Some(ref val) = self.id {
38940			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
38941			if !pattern.is_match(val) {
38942				return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
38943			}
38944		}
38945		if let Some(ref vec) = self.strtgy_instrms {
38946			for item in vec {
38947				let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
38948				if !pattern.is_match(&item) {
38949					return Err(ValidationError::new(1005, "strtgy_instrms does not match the required pattern".to_string()));
38950				}
38951			}
38952		}
38953		Ok(())
38954	}
38955}
38956
38957
38958// FinancialInstrumentAttributes5Choice ...
38959#[cfg_attr(feature = "derive_debug", derive(Debug))]
38960#[cfg_attr(feature = "derive_default", derive(Default))]
38961#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38962#[cfg_attr(feature = "derive_clone", derive(Clone))]
38963#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38964pub struct FinancialInstrumentAttributes5Choice {
38965	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
38966	pub id: Option<String>,
38967	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrnId", skip_serializing_if = "Option::is_none") )]
38968	pub altrn_id: Option<SecurityIdentification19>,
38969	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
38970	pub othr: Option<SecurityInstrumentDescription22>,
38971}
38972
38973impl FinancialInstrumentAttributes5Choice {
38974	pub fn validate(&self) -> Result<(), ValidationError> {
38975		if let Some(ref val) = self.id {
38976			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
38977			if !pattern.is_match(val) {
38978				return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
38979			}
38980		}
38981		if let Some(ref val) = self.altrn_id { val.validate()? }
38982		if let Some(ref val) = self.othr { val.validate()? }
38983		Ok(())
38984	}
38985}
38986
38987
38988// FinancialInstrumentAttributes88 ...
38989#[cfg_attr(feature = "derive_debug", derive(Debug))]
38990#[cfg_attr(feature = "derive_default", derive(Default))]
38991#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
38992#[cfg_attr(feature = "derive_clone", derive(Clone))]
38993#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
38994pub struct FinancialInstrumentAttributes88 {
38995	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctTerm", skip_serializing_if = "Option::is_none") )]
38996	pub ctrct_term: Option<InterestRateContractTerm1>,
38997	#[cfg_attr( feature = "derive_serde", serde(rename = "Stdstn", skip_serializing_if = "Option::is_none") )]
38998	pub stdstn: Option<Vec<Standardisation1Code>>,
38999	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtFrqcy") )]
39000	pub pmt_frqcy: Frequency11Code,
39001}
39002
39003impl FinancialInstrumentAttributes88 {
39004	pub fn validate(&self) -> Result<(), ValidationError> {
39005		if let Some(ref val) = self.ctrct_term { val.validate()? }
39006		if let Some(ref vec) = self.stdstn { for item in vec { item.validate()? } }
39007		self.pmt_frqcy.validate()?;
39008		Ok(())
39009	}
39010}
39011
39012
39013// FinancialInstrumentAttributes89 ...
39014#[cfg_attr(feature = "derive_debug", derive(Debug))]
39015#[cfg_attr(feature = "derive_default", derive(Default))]
39016#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39017#[cfg_attr(feature = "derive_clone", derive(Clone))]
39018#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39019pub struct FinancialInstrumentAttributes89 {
39020	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctSz") )]
39021	pub ctrct_sz: ContractSize1,
39022	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryTp") )]
39023	pub dlvry_tp: PhysicalTransferType4Code,
39024	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygId") )]
39025	pub undrlyg_id: GenericIdentification165,
39026	#[cfg_attr( feature = "derive_serde", serde(rename = "PricCcy") )]
39027	pub pric_ccy: String,
39028}
39029
39030impl FinancialInstrumentAttributes89 {
39031	pub fn validate(&self) -> Result<(), ValidationError> {
39032		self.ctrct_sz.validate()?;
39033		self.dlvry_tp.validate()?;
39034		self.undrlyg_id.validate()?;
39035		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
39036		if !pattern.is_match(&self.pric_ccy) {
39037			return Err(ValidationError::new(1005, "pric_ccy does not match the required pattern".to_string()));
39038		}
39039		Ok(())
39040	}
39041}
39042
39043
39044// FinancialInstrumentAttributes90 ...
39045#[cfg_attr(feature = "derive_debug", derive(Debug))]
39046#[cfg_attr(feature = "derive_default", derive(Default))]
39047#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39048#[cfg_attr(feature = "derive_clone", derive(Clone))]
39049#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39050pub struct FinancialInstrumentAttributes90 {
39051	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntnl", skip_serializing_if = "Option::is_none") )]
39052	pub ntnl: Option<ActiveCurrencyAndAmount>,
39053	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitVal") )]
39054	pub unit_val: ActiveCurrencyAndAmount,
39055	#[cfg_attr( feature = "derive_serde", serde(rename = "IndxId") )]
39056	pub indx_id: GenericIdentification168,
39057	#[cfg_attr( feature = "derive_serde", serde(rename = "IndxUnit") )]
39058	pub indx_unit: String,
39059	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRateTerms", skip_serializing_if = "Option::is_none") )]
39060	pub intrst_rate_terms: Option<InterestComputationMethod2Code>,
39061}
39062
39063impl FinancialInstrumentAttributes90 {
39064	pub fn validate(&self) -> Result<(), ValidationError> {
39065		if let Some(ref val) = self.ntnl { val.validate()? }
39066		self.unit_val.validate()?;
39067		self.indx_id.validate()?;
39068		if self.indx_unit.chars().count() < 1 {
39069			return Err(ValidationError::new(1001, "indx_unit is shorter than the minimum length of 1".to_string()));
39070		}
39071		if self.indx_unit.chars().count() > 35 {
39072			return Err(ValidationError::new(1002, "indx_unit exceeds the maximum length of 35".to_string()));
39073		}
39074		if let Some(ref val) = self.intrst_rate_terms { val.validate()? }
39075		Ok(())
39076	}
39077}
39078
39079
39080// FinancialInstrumentContractType1Code ...
39081#[cfg_attr(feature = "derive_debug", derive(Debug))]
39082#[cfg_attr(feature = "derive_default", derive(Default))]
39083#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39084#[cfg_attr(feature = "derive_clone", derive(Clone))]
39085#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39086pub enum FinancialInstrumentContractType1Code {
39087	#[cfg_attr(feature = "derive_default", default)]
39088	#[cfg_attr( feature = "derive_serde", serde(rename = "CFDS") )]
39089	CodeCFDS,
39090	#[cfg_attr( feature = "derive_serde", serde(rename = "FORW") )]
39091	CodeFORW,
39092	#[cfg_attr( feature = "derive_serde", serde(rename = "FRAS") )]
39093	CodeFRAS,
39094	#[cfg_attr( feature = "derive_serde", serde(rename = "FUTR") )]
39095	CodeFUTR,
39096	#[cfg_attr( feature = "derive_serde", serde(rename = "OPTN") )]
39097	CodeOPTN,
39098	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
39099	CodeOTHR,
39100	#[cfg_attr( feature = "derive_serde", serde(rename = "SPDB") )]
39101	CodeSPDB,
39102	#[cfg_attr( feature = "derive_serde", serde(rename = "SWAP") )]
39103	CodeSWAP,
39104	#[cfg_attr( feature = "derive_serde", serde(rename = "SWPT") )]
39105	CodeSWPT,
39106	#[cfg_attr( feature = "derive_serde", serde(rename = "FONS") )]
39107	CodeFONS,
39108	#[cfg_attr( feature = "derive_serde", serde(rename = "PSWP") )]
39109	CodePSWP,
39110	#[cfg_attr( feature = "derive_serde", serde(rename = "FFAS") )]
39111	CodeFFAS,
39112	#[cfg_attr( feature = "derive_serde", serde(rename = "FWOS") )]
39113	CodeFWOS,
39114}
39115
39116impl FinancialInstrumentContractType1Code {
39117	pub fn validate(&self) -> Result<(), ValidationError> {
39118		Ok(())
39119	}
39120}
39121
39122
39123// FinancialInstrumentContractType2Code ...
39124#[cfg_attr(feature = "derive_debug", derive(Debug))]
39125#[cfg_attr(feature = "derive_default", derive(Default))]
39126#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39127#[cfg_attr(feature = "derive_clone", derive(Clone))]
39128#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39129pub enum FinancialInstrumentContractType2Code {
39130	#[cfg_attr(feature = "derive_default", default)]
39131	#[cfg_attr( feature = "derive_serde", serde(rename = "CFDS") )]
39132	CodeCFDS,
39133	#[cfg_attr( feature = "derive_serde", serde(rename = "FRAS") )]
39134	CodeFRAS,
39135	#[cfg_attr( feature = "derive_serde", serde(rename = "FUTR") )]
39136	CodeFUTR,
39137	#[cfg_attr( feature = "derive_serde", serde(rename = "FORW") )]
39138	CodeFORW,
39139	#[cfg_attr( feature = "derive_serde", serde(rename = "OPTN") )]
39140	CodeOPTN,
39141	#[cfg_attr( feature = "derive_serde", serde(rename = "SPDB") )]
39142	CodeSPDB,
39143	#[cfg_attr( feature = "derive_serde", serde(rename = "SWAP") )]
39144	CodeSWAP,
39145	#[cfg_attr( feature = "derive_serde", serde(rename = "SWPT") )]
39146	CodeSWPT,
39147	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
39148	CodeOTHR,
39149}
39150
39151impl FinancialInstrumentContractType2Code {
39152	pub fn validate(&self) -> Result<(), ValidationError> {
39153		Ok(())
39154	}
39155}
39156
39157
39158// FinancialInstrumentForm2 ...
39159#[cfg_attr(feature = "derive_debug", derive(Debug))]
39160#[cfg_attr(feature = "derive_default", derive(Default))]
39161#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39162#[cfg_attr(feature = "derive_clone", derive(Clone))]
39163#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39164pub struct FinancialInstrumentForm2 {
39165	#[cfg_attr( feature = "derive_serde", serde(rename = "BookgApprnc", skip_serializing_if = "Option::is_none") )]
39166	pub bookg_apprnc: Option<Appearance3Choice>,
39167	#[cfg_attr( feature = "derive_serde", serde(rename = "LglForm", skip_serializing_if = "Option::is_none") )]
39168	pub lgl_form: Option<FormOfSecurity8Choice>,
39169}
39170
39171impl FinancialInstrumentForm2 {
39172	pub fn validate(&self) -> Result<(), ValidationError> {
39173		if let Some(ref val) = self.bookg_apprnc { val.validate()? }
39174		if let Some(ref val) = self.lgl_form { val.validate()? }
39175		Ok(())
39176	}
39177}
39178
39179
39180// FinancialInstrumentIdentification5Choice ...
39181#[cfg_attr(feature = "derive_debug", derive(Debug))]
39182#[cfg_attr(feature = "derive_default", derive(Default))]
39183#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39184#[cfg_attr(feature = "derive_clone", derive(Clone))]
39185#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39186pub struct FinancialInstrumentIdentification5Choice {
39187	#[cfg_attr( feature = "derive_serde", serde(rename = "Sngl", skip_serializing_if = "Option::is_none") )]
39188	pub sngl: Option<FinancialInstrument48Choice>,
39189	#[cfg_attr( feature = "derive_serde", serde(rename = "Bskt", skip_serializing_if = "Option::is_none") )]
39190	pub bskt: Option<FinancialInstrument53>,
39191}
39192
39193impl FinancialInstrumentIdentification5Choice {
39194	pub fn validate(&self) -> Result<(), ValidationError> {
39195		if let Some(ref val) = self.sngl { val.validate()? }
39196		if let Some(ref val) = self.bskt { val.validate()? }
39197		Ok(())
39198	}
39199}
39200
39201
39202// FinancialInstrumentIdentification6Choice ...
39203#[cfg_attr(feature = "derive_debug", derive(Debug))]
39204#[cfg_attr(feature = "derive_default", derive(Default))]
39205#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39206#[cfg_attr(feature = "derive_clone", derive(Clone))]
39207#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39208pub struct FinancialInstrumentIdentification6Choice {
39209	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
39210	pub isin: Option<String>,
39211	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
39212	pub indx: Option<FinancialInstrument58>,
39213}
39214
39215impl FinancialInstrumentIdentification6Choice {
39216	pub fn validate(&self) -> Result<(), ValidationError> {
39217		if let Some(ref val) = self.isin {
39218			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
39219			if !pattern.is_match(val) {
39220				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
39221			}
39222		}
39223		if let Some(ref val) = self.indx { val.validate()? }
39224		Ok(())
39225	}
39226}
39227
39228
39229// FinancialInstrumentIdentification7Choice ...
39230#[cfg_attr(feature = "derive_debug", derive(Debug))]
39231#[cfg_attr(feature = "derive_default", derive(Default))]
39232#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39233#[cfg_attr(feature = "derive_clone", derive(Clone))]
39234#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39235pub struct FinancialInstrumentIdentification7Choice {
39236	#[cfg_attr( feature = "derive_serde", serde(rename = "Sngl", skip_serializing_if = "Option::is_none") )]
39237	pub sngl: Option<FinancialInstrumentIdentification6Choice>,
39238	#[cfg_attr( feature = "derive_serde", serde(rename = "Bskt", skip_serializing_if = "Option::is_none") )]
39239	pub bskt: Option<BasketDescription3>,
39240}
39241
39242impl FinancialInstrumentIdentification7Choice {
39243	pub fn validate(&self) -> Result<(), ValidationError> {
39244		if let Some(ref val) = self.sngl { val.validate()? }
39245		if let Some(ref val) = self.bskt { val.validate()? }
39246		Ok(())
39247	}
39248}
39249
39250
39251// FinancialInstrumentIdentificationValidity3 ...
39252#[cfg_attr(feature = "derive_debug", derive(Debug))]
39253#[cfg_attr(feature = "derive_default", derive(Default))]
39254#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39255#[cfg_attr(feature = "derive_clone", derive(Clone))]
39256#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39257pub struct FinancialInstrumentIdentificationValidity3 {
39258	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId", skip_serializing_if = "Option::is_none") )]
39259	pub fin_instrm_id: Option<SecurityIdentification39>,
39260	#[cfg_attr( feature = "derive_serde", serde(rename = "ISINVldFr", skip_serializing_if = "Option::is_none") )]
39261	pub isin_vld_fr: Option<String>,
39262}
39263
39264impl FinancialInstrumentIdentificationValidity3 {
39265	pub fn validate(&self) -> Result<(), ValidationError> {
39266		if let Some(ref val) = self.fin_instrm_id { val.validate()? }
39267		Ok(())
39268	}
39269}
39270
39271
39272// FinancialInstrumentName2 ...
39273#[cfg_attr(feature = "derive_debug", derive(Debug))]
39274#[cfg_attr(feature = "derive_default", derive(Default))]
39275#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39276#[cfg_attr(feature = "derive_clone", derive(Clone))]
39277#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39278pub struct FinancialInstrumentName2 {
39279	#[cfg_attr( feature = "derive_serde", serde(rename = "ISOShrtNm", skip_serializing_if = "Option::is_none") )]
39280	pub iso_shrt_nm: Option<String>,
39281	#[cfg_attr( feature = "derive_serde", serde(rename = "ISOLngNm", skip_serializing_if = "Option::is_none") )]
39282	pub iso_lng_nm: Option<String>,
39283	#[cfg_attr( feature = "derive_serde", serde(rename = "VldFr", skip_serializing_if = "Option::is_none") )]
39284	pub vld_fr: Option<DateAndDateTime2Choice>,
39285}
39286
39287impl FinancialInstrumentName2 {
39288	pub fn validate(&self) -> Result<(), ValidationError> {
39289		if let Some(ref val) = self.iso_shrt_nm {
39290			if val.chars().count() < 1 {
39291				return Err(ValidationError::new(1001, "iso_shrt_nm is shorter than the minimum length of 1".to_string()));
39292			}
39293			if val.chars().count() > 35 {
39294				return Err(ValidationError::new(1002, "iso_shrt_nm exceeds the maximum length of 35".to_string()));
39295			}
39296		}
39297		if let Some(ref val) = self.iso_lng_nm {
39298			if val.chars().count() < 1 {
39299				return Err(ValidationError::new(1001, "iso_lng_nm is shorter than the minimum length of 1".to_string()));
39300			}
39301			if val.chars().count() > 350 {
39302				return Err(ValidationError::new(1002, "iso_lng_nm exceeds the maximum length of 350".to_string()));
39303			}
39304		}
39305		if let Some(ref val) = self.vld_fr { val.validate()? }
39306		Ok(())
39307	}
39308}
39309
39310
39311// FinancialInstrumentProductType1Code ...
39312#[cfg_attr(feature = "derive_debug", derive(Debug))]
39313#[cfg_attr(feature = "derive_default", derive(Default))]
39314#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39315#[cfg_attr(feature = "derive_clone", derive(Clone))]
39316#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39317pub enum FinancialInstrumentProductType1Code {
39318	#[cfg_attr(feature = "derive_default", default)]
39319	#[cfg_attr( feature = "derive_serde", serde(rename = "CEOD") )]
39320	CodeCEOD,
39321	#[cfg_attr( feature = "derive_serde", serde(rename = "COPR") )]
39322	CodeCOPR,
39323	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
39324	CodeOTHR,
39325	#[cfg_attr( feature = "derive_serde", serde(rename = "ABCP") )]
39326	CodeABCP,
39327	#[cfg_attr( feature = "derive_serde", serde(rename = "FRNT") )]
39328	CodeFRNT,
39329	#[cfg_attr( feature = "derive_serde", serde(rename = "CACM") )]
39330	CodeCACM,
39331	#[cfg_attr( feature = "derive_serde", serde(rename = "DPST") )]
39332	CodeDPST,
39333}
39334
39335impl FinancialInstrumentProductType1Code {
39336	pub fn validate(&self) -> Result<(), ValidationError> {
39337		Ok(())
39338	}
39339}
39340
39341
39342// FinancialInstrumentQuantity1 ...
39343#[cfg_attr(feature = "derive_debug", derive(Debug))]
39344#[cfg_attr(feature = "derive_default", derive(Default))]
39345#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39346#[cfg_attr(feature = "derive_clone", derive(Clone))]
39347#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39348pub struct FinancialInstrumentQuantity1 {
39349	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit") )]
39350	pub unit: f64,
39351}
39352
39353impl FinancialInstrumentQuantity1 {
39354	pub fn validate(&self) -> Result<(), ValidationError> {
39355		Ok(())
39356	}
39357}
39358
39359
39360// FinancialInstrumentQuantity1Choice ...
39361#[cfg_attr(feature = "derive_debug", derive(Debug))]
39362#[cfg_attr(feature = "derive_default", derive(Default))]
39363#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39364#[cfg_attr(feature = "derive_clone", derive(Clone))]
39365#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39366pub struct FinancialInstrumentQuantity1Choice {
39367	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit", skip_serializing_if = "Option::is_none") )]
39368	pub unit: Option<f64>,
39369	#[cfg_attr( feature = "derive_serde", serde(rename = "FaceAmt", skip_serializing_if = "Option::is_none") )]
39370	pub face_amt: Option<f64>,
39371	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtsdVal", skip_serializing_if = "Option::is_none") )]
39372	pub amtsd_val: Option<f64>,
39373}
39374
39375impl FinancialInstrumentQuantity1Choice {
39376	pub fn validate(&self) -> Result<(), ValidationError> {
39377		if let Some(ref val) = self.face_amt {
39378			if *val < 0.000000 {
39379				return Err(ValidationError::new(1003, "face_amt is less than the minimum value of 0.000000".to_string()));
39380			}
39381		}
39382		if let Some(ref val) = self.amtsd_val {
39383			if *val < 0.000000 {
39384				return Err(ValidationError::new(1003, "amtsd_val is less than the minimum value of 0.000000".to_string()));
39385			}
39386		}
39387		Ok(())
39388	}
39389}
39390
39391
39392// FinancialInstrumentQuantity25Choice ...
39393#[cfg_attr(feature = "derive_debug", derive(Debug))]
39394#[cfg_attr(feature = "derive_default", derive(Default))]
39395#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39396#[cfg_attr(feature = "derive_clone", derive(Clone))]
39397#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39398pub struct FinancialInstrumentQuantity25Choice {
39399	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit", skip_serializing_if = "Option::is_none") )]
39400	pub unit: Option<f64>,
39401	#[cfg_attr( feature = "derive_serde", serde(rename = "NmnlVal", skip_serializing_if = "Option::is_none") )]
39402	pub nmnl_val: Option<ActiveOrHistoricCurrencyAndAmount>,
39403	#[cfg_attr( feature = "derive_serde", serde(rename = "MntryVal", skip_serializing_if = "Option::is_none") )]
39404	pub mntry_val: Option<ActiveOrHistoricCurrencyAndAmount>,
39405}
39406
39407impl FinancialInstrumentQuantity25Choice {
39408	pub fn validate(&self) -> Result<(), ValidationError> {
39409		if let Some(ref val) = self.nmnl_val { val.validate()? }
39410		if let Some(ref val) = self.mntry_val { val.validate()? }
39411		Ok(())
39412	}
39413}
39414
39415
39416// FinancialInstrumentQuantity32Choice ...
39417#[cfg_attr(feature = "derive_debug", derive(Debug))]
39418#[cfg_attr(feature = "derive_default", derive(Default))]
39419#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39420#[cfg_attr(feature = "derive_clone", derive(Clone))]
39421#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39422pub struct FinancialInstrumentQuantity32Choice {
39423	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit", skip_serializing_if = "Option::is_none") )]
39424	pub unit: Option<f64>,
39425	#[cfg_attr( feature = "derive_serde", serde(rename = "NmnlVal", skip_serializing_if = "Option::is_none") )]
39426	pub nmnl_val: Option<ActiveOrHistoricCurrencyAnd19DecimalAmount>,
39427	#[cfg_attr( feature = "derive_serde", serde(rename = "MntryVal", skip_serializing_if = "Option::is_none") )]
39428	pub mntry_val: Option<ActiveOrHistoricCurrencyAnd19DecimalAmount>,
39429}
39430
39431impl FinancialInstrumentQuantity32Choice {
39432	pub fn validate(&self) -> Result<(), ValidationError> {
39433		if let Some(ref val) = self.nmnl_val { val.validate()? }
39434		if let Some(ref val) = self.mntry_val { val.validate()? }
39435		Ok(())
39436	}
39437}
39438
39439
39440// FinancialPartyClassification1 ...
39441#[cfg_attr(feature = "derive_debug", derive(Debug))]
39442#[cfg_attr(feature = "derive_default", derive(Default))]
39443#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39444#[cfg_attr(feature = "derive_clone", derive(Clone))]
39445#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39446pub struct FinancialPartyClassification1 {
39447	#[cfg_attr( feature = "derive_serde", serde(rename = "Clssfctn") )]
39448	pub clssfctn: Vec<FinancialPartySectorType2Code>,
39449	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtFndClssfctn", skip_serializing_if = "Option::is_none") )]
39450	pub invstmt_fnd_clssfctn: Option<FundType2Code>,
39451}
39452
39453impl FinancialPartyClassification1 {
39454	pub fn validate(&self) -> Result<(), ValidationError> {
39455		for item in &self.clssfctn { item.validate()? }
39456		if let Some(ref val) = self.invstmt_fnd_clssfctn { val.validate()? }
39457		Ok(())
39458	}
39459}
39460
39461
39462// FinancialPartyClassification2 ...
39463#[cfg_attr(feature = "derive_debug", derive(Debug))]
39464#[cfg_attr(feature = "derive_default", derive(Default))]
39465#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39466#[cfg_attr(feature = "derive_clone", derive(Clone))]
39467#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39468pub struct FinancialPartyClassification2 {
39469	#[cfg_attr( feature = "derive_serde", serde(rename = "Clssfctn") )]
39470	pub clssfctn: Vec<String>,
39471	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtFndClssfctn", skip_serializing_if = "Option::is_none") )]
39472	pub invstmt_fnd_clssfctn: Option<FundType2Code>,
39473}
39474
39475impl FinancialPartyClassification2 {
39476	pub fn validate(&self) -> Result<(), ValidationError> {
39477		for item in &self.clssfctn {
39478			let pattern = Regex::new("[A-U]{1,1}").unwrap();
39479			if !pattern.is_match(&item) {
39480				return Err(ValidationError::new(1005, "clssfctn does not match the required pattern".to_string()));
39481			}
39482		}
39483		if let Some(ref val) = self.invstmt_fnd_clssfctn { val.validate()? }
39484		Ok(())
39485	}
39486}
39487
39488
39489// FinancialPartyClassification2Choice ...
39490#[cfg_attr(feature = "derive_debug", derive(Debug))]
39491#[cfg_attr(feature = "derive_default", derive(Default))]
39492#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39493#[cfg_attr(feature = "derive_clone", derive(Clone))]
39494#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39495pub struct FinancialPartyClassification2Choice {
39496	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
39497	pub cd: Option<FinancialPartySectorType3Code>,
39498	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
39499	pub prtry: Option<GenericIdentification175>,
39500}
39501
39502impl FinancialPartyClassification2Choice {
39503	pub fn validate(&self) -> Result<(), ValidationError> {
39504		if let Some(ref val) = self.cd { val.validate()? }
39505		if let Some(ref val) = self.prtry { val.validate()? }
39506		Ok(())
39507	}
39508}
39509
39510
39511// FinancialPartySectorType2Code ...
39512#[cfg_attr(feature = "derive_debug", derive(Debug))]
39513#[cfg_attr(feature = "derive_default", derive(Default))]
39514#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39515#[cfg_attr(feature = "derive_clone", derive(Clone))]
39516#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39517pub enum FinancialPartySectorType2Code {
39518	#[cfg_attr(feature = "derive_default", default)]
39519	#[cfg_attr( feature = "derive_serde", serde(rename = "AIFD") )]
39520	CodeAIFD,
39521	#[cfg_attr( feature = "derive_serde", serde(rename = "CSDS") )]
39522	CodeCSDS,
39523	#[cfg_attr( feature = "derive_serde", serde(rename = "CCPS") )]
39524	CodeCCPS,
39525	#[cfg_attr( feature = "derive_serde", serde(rename = "CDTI") )]
39526	CodeCDTI,
39527	#[cfg_attr( feature = "derive_serde", serde(rename = "INUN") )]
39528	CodeINUN,
39529	#[cfg_attr( feature = "derive_serde", serde(rename = "ORPI") )]
39530	CodeORPI,
39531	#[cfg_attr( feature = "derive_serde", serde(rename = "INVF") )]
39532	CodeINVF,
39533	#[cfg_attr( feature = "derive_serde", serde(rename = "REIN") )]
39534	CodeREIN,
39535	#[cfg_attr( feature = "derive_serde", serde(rename = "UCIT") )]
39536	CodeUCIT,
39537}
39538
39539impl FinancialPartySectorType2Code {
39540	pub fn validate(&self) -> Result<(), ValidationError> {
39541		Ok(())
39542	}
39543}
39544
39545
39546// FinancialPartySectorType3Code ...
39547#[cfg_attr(feature = "derive_debug", derive(Debug))]
39548#[cfg_attr(feature = "derive_default", derive(Default))]
39549#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39550#[cfg_attr(feature = "derive_clone", derive(Clone))]
39551#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39552pub enum FinancialPartySectorType3Code {
39553	#[cfg_attr(feature = "derive_default", default)]
39554	#[cfg_attr( feature = "derive_serde", serde(rename = "AIFD") )]
39555	CodeAIFD,
39556	#[cfg_attr( feature = "derive_serde", serde(rename = "CSDS") )]
39557	CodeCSDS,
39558	#[cfg_attr( feature = "derive_serde", serde(rename = "CCPS") )]
39559	CodeCCPS,
39560	#[cfg_attr( feature = "derive_serde", serde(rename = "CDTI") )]
39561	CodeCDTI,
39562	#[cfg_attr( feature = "derive_serde", serde(rename = "INUN") )]
39563	CodeINUN,
39564	#[cfg_attr( feature = "derive_serde", serde(rename = "ORPI") )]
39565	CodeORPI,
39566	#[cfg_attr( feature = "derive_serde", serde(rename = "INVF") )]
39567	CodeINVF,
39568	#[cfg_attr( feature = "derive_serde", serde(rename = "REIN") )]
39569	CodeREIN,
39570	#[cfg_attr( feature = "derive_serde", serde(rename = "UCIT") )]
39571	CodeUCIT,
39572	#[cfg_attr( feature = "derive_serde", serde(rename = "ASSU") )]
39573	CodeASSU,
39574	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
39575	CodeOTHR,
39576}
39577
39578impl FinancialPartySectorType3Code {
39579	pub fn validate(&self) -> Result<(), ValidationError> {
39580		Ok(())
39581	}
39582}
39583
39584
39585// FiscalYear1Choice ...
39586#[cfg_attr(feature = "derive_debug", derive(Debug))]
39587#[cfg_attr(feature = "derive_default", derive(Default))]
39588#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39589#[cfg_attr(feature = "derive_clone", derive(Clone))]
39590#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39591pub struct FiscalYear1Choice {
39592	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
39593	pub start_dt: Option<String>,
39594	#[cfg_attr( feature = "derive_serde", serde(rename = "EndDt", skip_serializing_if = "Option::is_none") )]
39595	pub end_dt: Option<String>,
39596}
39597
39598impl FiscalYear1Choice {
39599	pub fn validate(&self) -> Result<(), ValidationError> {
39600		Ok(())
39601	}
39602}
39603
39604
39605// FixedAmountOrUnlimited1Choice ...
39606#[cfg_attr(feature = "derive_debug", derive(Debug))]
39607#[cfg_attr(feature = "derive_default", derive(Default))]
39608#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39609#[cfg_attr(feature = "derive_clone", derive(Clone))]
39610#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39611pub struct FixedAmountOrUnlimited1Choice {
39612	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
39613	pub amt: Option<ActiveCurrencyAndAmount>,
39614	#[cfg_attr( feature = "derive_serde", serde(rename = "NotLtd", skip_serializing_if = "Option::is_none") )]
39615	pub not_ltd: Option<String>,
39616}
39617
39618impl FixedAmountOrUnlimited1Choice {
39619	pub fn validate(&self) -> Result<(), ValidationError> {
39620		if let Some(ref val) = self.amt { val.validate()? }
39621		if let Some(ref val) = self.not_ltd {
39622			if val.chars().count() < 9 {
39623				return Err(ValidationError::new(1001, "not_ltd is shorter than the minimum length of 9".to_string()));
39624			}
39625			if val.chars().count() > 9 {
39626				return Err(ValidationError::new(1002, "not_ltd exceeds the maximum length of 9".to_string()));
39627			}
39628			let pattern = Regex::new("UNLIMITED").unwrap();
39629			if !pattern.is_match(val) {
39630				return Err(ValidationError::new(1005, "not_ltd does not match the required pattern".to_string()));
39631			}
39632		}
39633		Ok(())
39634	}
39635}
39636
39637
39638// FixedOpenTermContract2 ...
39639#[cfg_attr(feature = "derive_debug", derive(Debug))]
39640#[cfg_attr(feature = "derive_default", derive(Default))]
39641#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39642#[cfg_attr(feature = "derive_clone", derive(Clone))]
39643#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39644pub struct FixedOpenTermContract2 {
39645	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
39646	pub mtrty_dt: Option<String>,
39647	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnOptn", skip_serializing_if = "Option::is_none") )]
39648	pub termntn_optn: Option<RepoTerminationOption2Code>,
39649}
39650
39651impl FixedOpenTermContract2 {
39652	pub fn validate(&self) -> Result<(), ValidationError> {
39653		if let Some(ref val) = self.termntn_optn { val.validate()? }
39654		Ok(())
39655	}
39656}
39657
39658
39659// FixedRate10 ...
39660#[cfg_attr(feature = "derive_debug", derive(Debug))]
39661#[cfg_attr(feature = "derive_default", derive(Default))]
39662#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39663#[cfg_attr(feature = "derive_clone", derive(Clone))]
39664#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39665pub struct FixedRate10 {
39666	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
39667	pub rate: Option<SecuritiesTransactionPrice14Choice>,
39668	#[cfg_attr( feature = "derive_serde", serde(rename = "DayCnt", skip_serializing_if = "Option::is_none") )]
39669	pub day_cnt: Option<InterestComputationMethodFormat7>,
39670	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtFrqcy", skip_serializing_if = "Option::is_none") )]
39671	pub pmt_frqcy: Option<InterestRateFrequency3Choice>,
39672}
39673
39674impl FixedRate10 {
39675	pub fn validate(&self) -> Result<(), ValidationError> {
39676		if let Some(ref val) = self.rate { val.validate()? }
39677		if let Some(ref val) = self.day_cnt { val.validate()? }
39678		if let Some(ref val) = self.pmt_frqcy { val.validate()? }
39679		Ok(())
39680	}
39681}
39682
39683
39684// FixedRate11 ...
39685#[cfg_attr(feature = "derive_debug", derive(Debug))]
39686#[cfg_attr(feature = "derive_default", derive(Default))]
39687#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39688#[cfg_attr(feature = "derive_clone", derive(Clone))]
39689#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39690pub struct FixedRate11 {
39691	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
39692	pub rate: Option<f64>,
39693	#[cfg_attr( feature = "derive_serde", serde(rename = "DayCntBsis", skip_serializing_if = "Option::is_none") )]
39694	pub day_cnt_bsis: Option<InterestComputationMethodFormat6Choice>,
39695}
39696
39697impl FixedRate11 {
39698	pub fn validate(&self) -> Result<(), ValidationError> {
39699		if let Some(ref val) = self.day_cnt_bsis { val.validate()? }
39700		Ok(())
39701	}
39702}
39703
39704
39705// FloatingInterestRate22 ...
39706#[cfg_attr(feature = "derive_debug", derive(Debug))]
39707#[cfg_attr(feature = "derive_default", derive(Default))]
39708#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39709#[cfg_attr(feature = "derive_clone", derive(Clone))]
39710#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39711pub struct FloatingInterestRate22 {
39712	#[cfg_attr( feature = "derive_serde", serde(rename = "RefRate", skip_serializing_if = "Option::is_none") )]
39713	pub ref_rate: Option<BenchmarkCurveName10Choice>,
39714	#[cfg_attr( feature = "derive_serde", serde(rename = "Term", skip_serializing_if = "Option::is_none") )]
39715	pub term: Option<InterestRateContractTerm2>,
39716	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtFrqcy", skip_serializing_if = "Option::is_none") )]
39717	pub pmt_frqcy: Option<InterestRateContractTerm2>,
39718	#[cfg_attr( feature = "derive_serde", serde(rename = "RstFrqcy", skip_serializing_if = "Option::is_none") )]
39719	pub rst_frqcy: Option<InterestRateContractTerm2>,
39720	#[cfg_attr( feature = "derive_serde", serde(rename = "Sprd", skip_serializing_if = "Option::is_none") )]
39721	pub sprd: Option<SecuritiesTransactionPrice18Choice>,
39722	#[cfg_attr( feature = "derive_serde", serde(rename = "RateAdjstmnt", skip_serializing_if = "Option::is_none") )]
39723	pub rate_adjstmnt: Option<Vec<RateAdjustment1>>,
39724	#[cfg_attr( feature = "derive_serde", serde(rename = "DayCntBsis", skip_serializing_if = "Option::is_none") )]
39725	pub day_cnt_bsis: Option<InterestComputationMethodFormat6Choice>,
39726}
39727
39728impl FloatingInterestRate22 {
39729	pub fn validate(&self) -> Result<(), ValidationError> {
39730		if let Some(ref val) = self.ref_rate { val.validate()? }
39731		if let Some(ref val) = self.term { val.validate()? }
39732		if let Some(ref val) = self.pmt_frqcy { val.validate()? }
39733		if let Some(ref val) = self.rst_frqcy { val.validate()? }
39734		if let Some(ref val) = self.sprd { val.validate()? }
39735		if let Some(ref vec) = self.rate_adjstmnt { for item in vec { item.validate()? } }
39736		if let Some(ref val) = self.day_cnt_bsis { val.validate()? }
39737		Ok(())
39738	}
39739}
39740
39741
39742// FloatingInterestRate4 ...
39743#[cfg_attr(feature = "derive_debug", derive(Debug))]
39744#[cfg_attr(feature = "derive_default", derive(Default))]
39745#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39746#[cfg_attr(feature = "derive_clone", derive(Clone))]
39747#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39748pub struct FloatingInterestRate4 {
39749	#[cfg_attr( feature = "derive_serde", serde(rename = "RefRate") )]
39750	pub ref_rate: BenchmarkCurveName4Choice,
39751	#[cfg_attr( feature = "derive_serde", serde(rename = "Term") )]
39752	pub term: InterestRateContractTerm1,
39753	#[cfg_attr( feature = "derive_serde", serde(rename = "BsisPtSprd") )]
39754	pub bsis_pt_sprd: f64,
39755}
39756
39757impl FloatingInterestRate4 {
39758	pub fn validate(&self) -> Result<(), ValidationError> {
39759		self.ref_rate.validate()?;
39760		self.term.validate()?;
39761		Ok(())
39762	}
39763}
39764
39765
39766// FloatingInterestRate6 ...
39767#[cfg_attr(feature = "derive_debug", derive(Debug))]
39768#[cfg_attr(feature = "derive_default", derive(Default))]
39769#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39770#[cfg_attr(feature = "derive_clone", derive(Clone))]
39771#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39772pub struct FloatingInterestRate6 {
39773	#[cfg_attr( feature = "derive_serde", serde(rename = "RefRate") )]
39774	pub ref_rate: BenchmarkCurveName6Choice,
39775	#[cfg_attr( feature = "derive_serde", serde(rename = "Term") )]
39776	pub term: InterestRateContractTerm2,
39777	#[cfg_attr( feature = "derive_serde", serde(rename = "BsisPtSprd") )]
39778	pub bsis_pt_sprd: f64,
39779}
39780
39781impl FloatingInterestRate6 {
39782	pub fn validate(&self) -> Result<(), ValidationError> {
39783		self.ref_rate.validate()?;
39784		self.term.validate()?;
39785		Ok(())
39786	}
39787}
39788
39789
39790// FloatingInterestRate8 ...
39791#[cfg_attr(feature = "derive_debug", derive(Debug))]
39792#[cfg_attr(feature = "derive_default", derive(Default))]
39793#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39794#[cfg_attr(feature = "derive_clone", derive(Clone))]
39795#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39796pub struct FloatingInterestRate8 {
39797	#[cfg_attr( feature = "derive_serde", serde(rename = "RefRate") )]
39798	pub ref_rate: BenchmarkCurveName5Choice,
39799	#[cfg_attr( feature = "derive_serde", serde(rename = "Term", skip_serializing_if = "Option::is_none") )]
39800	pub term: Option<InterestRateContractTerm2>,
39801}
39802
39803impl FloatingInterestRate8 {
39804	pub fn validate(&self) -> Result<(), ValidationError> {
39805		self.ref_rate.validate()?;
39806		if let Some(ref val) = self.term { val.validate()? }
39807		Ok(())
39808	}
39809}
39810
39811
39812// FloatingRate13 ...
39813#[cfg_attr(feature = "derive_debug", derive(Debug))]
39814#[cfg_attr(feature = "derive_default", derive(Default))]
39815#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39816#[cfg_attr(feature = "derive_clone", derive(Clone))]
39817#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39818pub struct FloatingRate13 {
39819	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
39820	pub id: Option<String>,
39821	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
39822	pub nm: Option<String>,
39823	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
39824	pub rate: Option<FloatingRateIdentification8Choice>,
39825	#[cfg_attr( feature = "derive_serde", serde(rename = "RefPrd", skip_serializing_if = "Option::is_none") )]
39826	pub ref_prd: Option<InterestRateContractTerm4>,
39827	#[cfg_attr( feature = "derive_serde", serde(rename = "Sprd", skip_serializing_if = "Option::is_none") )]
39828	pub sprd: Option<SecuritiesTransactionPrice20Choice>,
39829	#[cfg_attr( feature = "derive_serde", serde(rename = "DayCnt", skip_serializing_if = "Option::is_none") )]
39830	pub day_cnt: Option<InterestComputationMethodFormat7>,
39831	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtFrqcy", skip_serializing_if = "Option::is_none") )]
39832	pub pmt_frqcy: Option<InterestRateFrequency3Choice>,
39833	#[cfg_attr( feature = "derive_serde", serde(rename = "RstFrqcy", skip_serializing_if = "Option::is_none") )]
39834	pub rst_frqcy: Option<InterestRateFrequency3Choice>,
39835	#[cfg_attr( feature = "derive_serde", serde(rename = "NxtFltgRst", skip_serializing_if = "Option::is_none") )]
39836	pub nxt_fltg_rst: Option<ResetDateAndValue1>,
39837	#[cfg_attr( feature = "derive_serde", serde(rename = "LastFltgRst", skip_serializing_if = "Option::is_none") )]
39838	pub last_fltg_rst: Option<ResetDateAndValue1>,
39839}
39840
39841impl FloatingRate13 {
39842	pub fn validate(&self) -> Result<(), ValidationError> {
39843		if let Some(ref val) = self.id {
39844			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
39845			if !pattern.is_match(val) {
39846				return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
39847			}
39848		}
39849		if let Some(ref val) = self.nm {
39850			if val.chars().count() < 1 {
39851				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
39852			}
39853			if val.chars().count() > 350 {
39854				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
39855			}
39856		}
39857		if let Some(ref val) = self.rate { val.validate()? }
39858		if let Some(ref val) = self.ref_prd { val.validate()? }
39859		if let Some(ref val) = self.sprd { val.validate()? }
39860		if let Some(ref val) = self.day_cnt { val.validate()? }
39861		if let Some(ref val) = self.pmt_frqcy { val.validate()? }
39862		if let Some(ref val) = self.rst_frqcy { val.validate()? }
39863		if let Some(ref val) = self.nxt_fltg_rst { val.validate()? }
39864		if let Some(ref val) = self.last_fltg_rst { val.validate()? }
39865		Ok(())
39866	}
39867}
39868
39869
39870// FloatingRateIdentification8Choice ...
39871#[cfg_attr(feature = "derive_debug", derive(Debug))]
39872#[cfg_attr(feature = "derive_default", derive(Default))]
39873#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39874#[cfg_attr(feature = "derive_clone", derive(Clone))]
39875#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39876pub struct FloatingRateIdentification8Choice {
39877	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
39878	pub cd: Option<String>,
39879	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
39880	pub prtry: Option<String>,
39881}
39882
39883impl FloatingRateIdentification8Choice {
39884	pub fn validate(&self) -> Result<(), ValidationError> {
39885		if let Some(ref val) = self.cd {
39886			if val.chars().count() < 1 {
39887				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
39888			}
39889			if val.chars().count() > 4 {
39890				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
39891			}
39892		}
39893		if let Some(ref val) = self.prtry {
39894			if val.chars().count() < 1 {
39895				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
39896			}
39897			if val.chars().count() > 350 {
39898				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 350".to_string()));
39899			}
39900		}
39901		Ok(())
39902	}
39903}
39904
39905
39906// FloatingRateNote2 ...
39907#[cfg_attr(feature = "derive_debug", derive(Debug))]
39908#[cfg_attr(feature = "derive_default", derive(Default))]
39909#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39910#[cfg_attr(feature = "derive_clone", derive(Clone))]
39911#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39912pub struct FloatingRateNote2 {
39913	#[cfg_attr( feature = "derive_serde", serde(rename = "RefRateIndx") )]
39914	pub ref_rate_indx: String,
39915	#[cfg_attr( feature = "derive_serde", serde(rename = "BsisPtSprd") )]
39916	pub bsis_pt_sprd: f64,
39917}
39918
39919impl FloatingRateNote2 {
39920	pub fn validate(&self) -> Result<(), ValidationError> {
39921		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
39922		if !pattern.is_match(&self.ref_rate_indx) {
39923			return Err(ValidationError::new(1005, "ref_rate_indx does not match the required pattern".to_string()));
39924		}
39925		Ok(())
39926	}
39927}
39928
39929
39930// FloorLimitType1Code ...
39931#[cfg_attr(feature = "derive_debug", derive(Debug))]
39932#[cfg_attr(feature = "derive_default", derive(Default))]
39933#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39934#[cfg_attr(feature = "derive_clone", derive(Clone))]
39935#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39936pub enum FloorLimitType1Code {
39937	#[cfg_attr(feature = "derive_default", default)]
39938	#[cfg_attr( feature = "derive_serde", serde(rename = "CRED") )]
39939	CodeCRED,
39940	#[cfg_attr( feature = "derive_serde", serde(rename = "DEBT") )]
39941	CodeDEBT,
39942	#[cfg_attr( feature = "derive_serde", serde(rename = "BOTH") )]
39943	CodeBOTH,
39944}
39945
39946impl FloorLimitType1Code {
39947	pub fn validate(&self) -> Result<(), ValidationError> {
39948		Ok(())
39949	}
39950}
39951
39952
39953// FlowDirectionType1Code ...
39954#[cfg_attr(feature = "derive_debug", derive(Debug))]
39955#[cfg_attr(feature = "derive_default", derive(Default))]
39956#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39957#[cfg_attr(feature = "derive_clone", derive(Clone))]
39958#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39959pub enum FlowDirectionType1Code {
39960	#[cfg_attr(feature = "derive_default", default)]
39961	#[cfg_attr( feature = "derive_serde", serde(rename = "INCG") )]
39962	CodeINCG,
39963	#[cfg_attr( feature = "derive_serde", serde(rename = "OUTG") )]
39964	CodeOUTG,
39965}
39966
39967impl FlowDirectionType1Code {
39968	pub fn validate(&self) -> Result<(), ValidationError> {
39969		Ok(())
39970	}
39971}
39972
39973
39974// Flows1 ...
39975#[cfg_attr(feature = "derive_debug", derive(Debug))]
39976#[cfg_attr(feature = "derive_default", derive(Default))]
39977#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
39978#[cfg_attr(feature = "derive_clone", derive(Clone))]
39979#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
39980pub struct Flows1 {
39981	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtBkFlows") )]
39982	pub pmt_bk_flows: AmountAndDirection102,
39983	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtFlows") )]
39984	pub invstmt_flows: AmountAndDirection102,
39985}
39986
39987impl Flows1 {
39988	pub fn validate(&self) -> Result<(), ValidationError> {
39989		self.pmt_bk_flows.validate()?;
39990		self.invstmt_flows.validate()?;
39991		Ok(())
39992	}
39993}
39994
39995
39996// ForeignExchange1 ...
39997#[cfg_attr(feature = "derive_debug", derive(Debug))]
39998#[cfg_attr(feature = "derive_default", derive(Default))]
39999#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40000#[cfg_attr(feature = "derive_clone", derive(Clone))]
40001#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40002pub struct ForeignExchange1 {
40003	#[cfg_attr( feature = "derive_serde", serde(rename = "FrgnCcy") )]
40004	pub frgn_ccy: String,
40005	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgSpotRate") )]
40006	pub xchg_spot_rate: f64,
40007	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgFwdPt") )]
40008	pub xchg_fwd_pt: f64,
40009}
40010
40011impl ForeignExchange1 {
40012	pub fn validate(&self) -> Result<(), ValidationError> {
40013		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
40014		if !pattern.is_match(&self.frgn_ccy) {
40015			return Err(ValidationError::new(1005, "frgn_ccy does not match the required pattern".to_string()));
40016		}
40017		Ok(())
40018	}
40019}
40020
40021
40022// ForeignExchangeDerivative2 ...
40023#[cfg_attr(feature = "derive_debug", derive(Debug))]
40024#[cfg_attr(feature = "derive_default", derive(Default))]
40025#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40026#[cfg_attr(feature = "derive_clone", derive(Clone))]
40027#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40028pub struct ForeignExchangeDerivative2 {
40029	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctSubTp") )]
40030	pub ctrct_sub_tp: AssetClassSubProductType19Code,
40031}
40032
40033impl ForeignExchangeDerivative2 {
40034	pub fn validate(&self) -> Result<(), ValidationError> {
40035		self.ctrct_sub_tp.validate()?;
40036		Ok(())
40037	}
40038}
40039
40040
40041// ForeignExchangeSwap3Choice ...
40042#[cfg_attr(feature = "derive_debug", derive(Debug))]
40043#[cfg_attr(feature = "derive_default", derive(Default))]
40044#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40045#[cfg_attr(feature = "derive_clone", derive(Clone))]
40046#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40047pub struct ForeignExchangeSwap3Choice {
40048	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
40049	pub data_set_actn: Option<ReportPeriodActivity3Code>,
40050	#[cfg_attr( feature = "derive_serde", serde(rename = "Tx", skip_serializing_if = "Option::is_none") )]
40051	pub tx: Option<Vec<ForeignExchangeSwapTransaction3>>,
40052}
40053
40054impl ForeignExchangeSwap3Choice {
40055	pub fn validate(&self) -> Result<(), ValidationError> {
40056		if let Some(ref val) = self.data_set_actn { val.validate()? }
40057		if let Some(ref vec) = self.tx { for item in vec { item.validate()? } }
40058		Ok(())
40059	}
40060}
40061
40062
40063// ForeignExchangeSwapTransaction3 ...
40064#[cfg_attr(feature = "derive_debug", derive(Debug))]
40065#[cfg_attr(feature = "derive_default", derive(Default))]
40066#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40067#[cfg_attr(feature = "derive_clone", derive(Clone))]
40068#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40069pub struct ForeignExchangeSwapTransaction3 {
40070	#[cfg_attr( feature = "derive_serde", serde(rename = "RptdTxSts") )]
40071	pub rptd_tx_sts: TransactionOperationType1Code,
40072	#[cfg_attr( feature = "derive_serde", serde(rename = "NvtnSts", skip_serializing_if = "Option::is_none") )]
40073	pub nvtn_sts: Option<NovationStatus1Code>,
40074	#[cfg_attr( feature = "derive_serde", serde(rename = "BrnchId", skip_serializing_if = "Option::is_none") )]
40075	pub brnch_id: Option<String>,
40076	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTxIdr", skip_serializing_if = "Option::is_none") )]
40077	pub unq_tx_idr: Option<String>,
40078	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryTxId") )]
40079	pub prtry_tx_id: String,
40080	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdPrtryTxId", skip_serializing_if = "Option::is_none") )]
40081	pub rltd_prtry_tx_id: Option<String>,
40082	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyPrtryTxId", skip_serializing_if = "Option::is_none") )]
40083	pub ctr_pty_prtry_tx_id: Option<String>,
40084	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId") )]
40085	pub ctr_pty_id: CounterpartyIdentification3Choice,
40086	#[cfg_attr( feature = "derive_serde", serde(rename = "TradDt") )]
40087	pub trad_dt: DateAndDateTimeChoice,
40088	#[cfg_attr( feature = "derive_serde", serde(rename = "SpotValDt") )]
40089	pub spot_val_dt: String,
40090	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt") )]
40091	pub mtrty_dt: String,
40092	#[cfg_attr( feature = "derive_serde", serde(rename = "TxTp") )]
40093	pub tx_tp: SecuritiesTransactionType15Code,
40094	#[cfg_attr( feature = "derive_serde", serde(rename = "TxNmnlAmt") )]
40095	pub tx_nmnl_amt: ActiveCurrencyAndAmount,
40096	#[cfg_attr( feature = "derive_serde", serde(rename = "FX") )]
40097	pub fx: ForeignExchange1,
40098	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
40099	pub splmtry_data: Option<Vec<SupplementaryData1>>,
40100}
40101
40102impl ForeignExchangeSwapTransaction3 {
40103	pub fn validate(&self) -> Result<(), ValidationError> {
40104		self.rptd_tx_sts.validate()?;
40105		if let Some(ref val) = self.nvtn_sts { val.validate()? }
40106		if let Some(ref val) = self.brnch_id {
40107			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
40108			if !pattern.is_match(val) {
40109				return Err(ValidationError::new(1005, "brnch_id does not match the required pattern".to_string()));
40110			}
40111		}
40112		if let Some(ref val) = self.unq_tx_idr {
40113			if val.chars().count() < 1 {
40114				return Err(ValidationError::new(1001, "unq_tx_idr is shorter than the minimum length of 1".to_string()));
40115			}
40116			if val.chars().count() > 105 {
40117				return Err(ValidationError::new(1002, "unq_tx_idr exceeds the maximum length of 105".to_string()));
40118			}
40119		}
40120		if self.prtry_tx_id.chars().count() < 1 {
40121			return Err(ValidationError::new(1001, "prtry_tx_id is shorter than the minimum length of 1".to_string()));
40122		}
40123		if self.prtry_tx_id.chars().count() > 105 {
40124			return Err(ValidationError::new(1002, "prtry_tx_id exceeds the maximum length of 105".to_string()));
40125		}
40126		if let Some(ref val) = self.rltd_prtry_tx_id {
40127			if val.chars().count() < 1 {
40128				return Err(ValidationError::new(1001, "rltd_prtry_tx_id is shorter than the minimum length of 1".to_string()));
40129			}
40130			if val.chars().count() > 105 {
40131				return Err(ValidationError::new(1002, "rltd_prtry_tx_id exceeds the maximum length of 105".to_string()));
40132			}
40133		}
40134		if let Some(ref val) = self.ctr_pty_prtry_tx_id {
40135			if val.chars().count() < 1 {
40136				return Err(ValidationError::new(1001, "ctr_pty_prtry_tx_id is shorter than the minimum length of 1".to_string()));
40137			}
40138			if val.chars().count() > 105 {
40139				return Err(ValidationError::new(1002, "ctr_pty_prtry_tx_id exceeds the maximum length of 105".to_string()));
40140			}
40141		}
40142		self.ctr_pty_id.validate()?;
40143		self.trad_dt.validate()?;
40144		self.tx_tp.validate()?;
40145		self.tx_nmnl_amt.validate()?;
40146		self.fx.validate()?;
40147		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
40148		Ok(())
40149	}
40150}
40151
40152
40153// ForeignExchangeTerms19 ...
40154#[cfg_attr(feature = "derive_debug", derive(Debug))]
40155#[cfg_attr(feature = "derive_default", derive(Default))]
40156#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40157#[cfg_attr(feature = "derive_clone", derive(Clone))]
40158#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40159pub struct ForeignExchangeTerms19 {
40160	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitCcy") )]
40161	pub unit_ccy: String,
40162	#[cfg_attr( feature = "derive_serde", serde(rename = "QtdCcy") )]
40163	pub qtd_ccy: String,
40164	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate") )]
40165	pub xchg_rate: f64,
40166}
40167
40168impl ForeignExchangeTerms19 {
40169	pub fn validate(&self) -> Result<(), ValidationError> {
40170		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
40171		if !pattern.is_match(&self.unit_ccy) {
40172			return Err(ValidationError::new(1005, "unit_ccy does not match the required pattern".to_string()));
40173		}
40174		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
40175		if !pattern.is_match(&self.qtd_ccy) {
40176			return Err(ValidationError::new(1005, "qtd_ccy does not match the required pattern".to_string()));
40177		}
40178		Ok(())
40179	}
40180}
40181
40182
40183// FormOfSecurity1Code ...
40184#[cfg_attr(feature = "derive_debug", derive(Debug))]
40185#[cfg_attr(feature = "derive_default", derive(Default))]
40186#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40187#[cfg_attr(feature = "derive_clone", derive(Clone))]
40188#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40189pub enum FormOfSecurity1Code {
40190	#[cfg_attr(feature = "derive_default", default)]
40191	#[cfg_attr( feature = "derive_serde", serde(rename = "BEAR") )]
40192	CodeBEAR,
40193	#[cfg_attr( feature = "derive_serde", serde(rename = "REGD") )]
40194	CodeREGD,
40195}
40196
40197impl FormOfSecurity1Code {
40198	pub fn validate(&self) -> Result<(), ValidationError> {
40199		Ok(())
40200	}
40201}
40202
40203
40204// FormOfSecurity8Choice ...
40205#[cfg_attr(feature = "derive_debug", derive(Debug))]
40206#[cfg_attr(feature = "derive_default", derive(Default))]
40207#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40208#[cfg_attr(feature = "derive_clone", derive(Clone))]
40209#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40210pub struct FormOfSecurity8Choice {
40211	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
40212	pub cd: Option<FormOfSecurity1Code>,
40213	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
40214	pub prtry: Option<GenericIdentification30>,
40215}
40216
40217impl FormOfSecurity8Choice {
40218	pub fn validate(&self) -> Result<(), ValidationError> {
40219		if let Some(ref val) = self.cd { val.validate()? }
40220		if let Some(ref val) = self.prtry { val.validate()? }
40221		Ok(())
40222	}
40223}
40224
40225
40226// Forms1 ...
40227#[cfg_attr(feature = "derive_debug", derive(Debug))]
40228#[cfg_attr(feature = "derive_default", derive(Default))]
40229#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40230#[cfg_attr(feature = "derive_clone", derive(Clone))]
40231#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40232pub struct Forms1 {
40233	#[cfg_attr( feature = "derive_serde", serde(rename = "ApplForm") )]
40234	pub appl_form: bool,
40235	#[cfg_attr( feature = "derive_serde", serde(rename = "SgntrTp") )]
40236	pub sgntr_tp: SignatureType1Code,
40237}
40238
40239impl Forms1 {
40240	pub fn validate(&self) -> Result<(), ValidationError> {
40241		self.sgntr_tp.validate()?;
40242		Ok(())
40243	}
40244}
40245
40246
40247// FreightCommodityContainerShip1 ...
40248#[cfg_attr(feature = "derive_debug", derive(Debug))]
40249#[cfg_attr(feature = "derive_default", derive(Default))]
40250#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40251#[cfg_attr(feature = "derive_clone", derive(Clone))]
40252#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40253pub struct FreightCommodityContainerShip1 {
40254	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
40255	pub base_pdct: AssetClassProductType4Code,
40256	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
40257	pub sub_pdct: AssetClassSubProductType46Code,
40258}
40259
40260impl FreightCommodityContainerShip1 {
40261	pub fn validate(&self) -> Result<(), ValidationError> {
40262		self.base_pdct.validate()?;
40263		self.sub_pdct.validate()?;
40264		Ok(())
40265	}
40266}
40267
40268
40269// FreightCommodityContainerShip2 ...
40270#[cfg_attr(feature = "derive_debug", derive(Debug))]
40271#[cfg_attr(feature = "derive_default", derive(Default))]
40272#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40273#[cfg_attr(feature = "derive_clone", derive(Clone))]
40274#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40275pub struct FreightCommodityContainerShip2 {
40276	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
40277	pub base_pdct: AssetClassProductType4Code,
40278	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
40279	pub sub_pdct: Option<AssetClassSubProductType46Code>,
40280}
40281
40282impl FreightCommodityContainerShip2 {
40283	pub fn validate(&self) -> Result<(), ValidationError> {
40284		self.base_pdct.validate()?;
40285		if let Some(ref val) = self.sub_pdct { val.validate()? }
40286		Ok(())
40287	}
40288}
40289
40290
40291// FreightCommodityDry1 ...
40292#[cfg_attr(feature = "derive_debug", derive(Debug))]
40293#[cfg_attr(feature = "derive_default", derive(Default))]
40294#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40295#[cfg_attr(feature = "derive_clone", derive(Clone))]
40296#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40297pub struct FreightCommodityDry1 {
40298	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
40299	pub base_pdct: AssetClassProductType4Code,
40300	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
40301	pub sub_pdct: AssetClassSubProductType31Code,
40302	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
40303	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType14Code>,
40304}
40305
40306impl FreightCommodityDry1 {
40307	pub fn validate(&self) -> Result<(), ValidationError> {
40308		self.base_pdct.validate()?;
40309		self.sub_pdct.validate()?;
40310		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
40311		Ok(())
40312	}
40313}
40314
40315
40316// FreightCommodityDry2 ...
40317#[cfg_attr(feature = "derive_debug", derive(Debug))]
40318#[cfg_attr(feature = "derive_default", derive(Default))]
40319#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40320#[cfg_attr(feature = "derive_clone", derive(Clone))]
40321#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40322pub struct FreightCommodityDry2 {
40323	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
40324	pub base_pdct: AssetClassProductType4Code,
40325	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
40326	pub sub_pdct: AssetClassSubProductType31Code,
40327	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct") )]
40328	pub addtl_sub_pdct: AssetClassDetailedSubProductType33Code,
40329}
40330
40331impl FreightCommodityDry2 {
40332	pub fn validate(&self) -> Result<(), ValidationError> {
40333		self.base_pdct.validate()?;
40334		self.sub_pdct.validate()?;
40335		self.addtl_sub_pdct.validate()?;
40336		Ok(())
40337	}
40338}
40339
40340
40341// FreightCommodityDry3 ...
40342#[cfg_attr(feature = "derive_debug", derive(Debug))]
40343#[cfg_attr(feature = "derive_default", derive(Default))]
40344#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40345#[cfg_attr(feature = "derive_clone", derive(Clone))]
40346#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40347pub struct FreightCommodityDry3 {
40348	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
40349	pub base_pdct: AssetClassProductType4Code,
40350	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
40351	pub sub_pdct: Option<AssetClassSubProductType31Code>,
40352	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
40353	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType33Code>,
40354}
40355
40356impl FreightCommodityDry3 {
40357	pub fn validate(&self) -> Result<(), ValidationError> {
40358		self.base_pdct.validate()?;
40359		if let Some(ref val) = self.sub_pdct { val.validate()? }
40360		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
40361		Ok(())
40362	}
40363}
40364
40365
40366// FreightCommodityOther1 ...
40367#[cfg_attr(feature = "derive_debug", derive(Debug))]
40368#[cfg_attr(feature = "derive_default", derive(Default))]
40369#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40370#[cfg_attr(feature = "derive_clone", derive(Clone))]
40371#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40372pub struct FreightCommodityOther1 {
40373	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
40374	pub base_pdct: AssetClassProductType4Code,
40375	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
40376	pub sub_pdct: AssetClassSubProductType49Code,
40377}
40378
40379impl FreightCommodityOther1 {
40380	pub fn validate(&self) -> Result<(), ValidationError> {
40381		self.base_pdct.validate()?;
40382		self.sub_pdct.validate()?;
40383		Ok(())
40384	}
40385}
40386
40387
40388// FreightCommodityOther2 ...
40389#[cfg_attr(feature = "derive_debug", derive(Debug))]
40390#[cfg_attr(feature = "derive_default", derive(Default))]
40391#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40392#[cfg_attr(feature = "derive_clone", derive(Clone))]
40393#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40394pub struct FreightCommodityOther2 {
40395	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
40396	pub base_pdct: AssetClassProductType4Code,
40397	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
40398	pub sub_pdct: Option<AssetClassSubProductType49Code>,
40399}
40400
40401impl FreightCommodityOther2 {
40402	pub fn validate(&self) -> Result<(), ValidationError> {
40403		self.base_pdct.validate()?;
40404		if let Some(ref val) = self.sub_pdct { val.validate()? }
40405		Ok(())
40406	}
40407}
40408
40409
40410// FreightCommodityWet1 ...
40411#[cfg_attr(feature = "derive_debug", derive(Debug))]
40412#[cfg_attr(feature = "derive_default", derive(Default))]
40413#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40414#[cfg_attr(feature = "derive_clone", derive(Clone))]
40415#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40416pub struct FreightCommodityWet1 {
40417	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
40418	pub base_pdct: AssetClassProductType4Code,
40419	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
40420	pub sub_pdct: AssetClassSubProductType32Code,
40421	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
40422	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType12Code>,
40423}
40424
40425impl FreightCommodityWet1 {
40426	pub fn validate(&self) -> Result<(), ValidationError> {
40427		self.base_pdct.validate()?;
40428		self.sub_pdct.validate()?;
40429		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
40430		Ok(())
40431	}
40432}
40433
40434
40435// FreightCommodityWet2 ...
40436#[cfg_attr(feature = "derive_debug", derive(Debug))]
40437#[cfg_attr(feature = "derive_default", derive(Default))]
40438#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40439#[cfg_attr(feature = "derive_clone", derive(Clone))]
40440#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40441pub struct FreightCommodityWet2 {
40442	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
40443	pub base_pdct: AssetClassProductType4Code,
40444	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
40445	pub sub_pdct: AssetClassSubProductType32Code,
40446	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct") )]
40447	pub addtl_sub_pdct: AssetClassDetailedSubProductType34Code,
40448}
40449
40450impl FreightCommodityWet2 {
40451	pub fn validate(&self) -> Result<(), ValidationError> {
40452		self.base_pdct.validate()?;
40453		self.sub_pdct.validate()?;
40454		self.addtl_sub_pdct.validate()?;
40455		Ok(())
40456	}
40457}
40458
40459
40460// FreightCommodityWet3 ...
40461#[cfg_attr(feature = "derive_debug", derive(Debug))]
40462#[cfg_attr(feature = "derive_default", derive(Default))]
40463#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40464#[cfg_attr(feature = "derive_clone", derive(Clone))]
40465#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40466pub struct FreightCommodityWet3 {
40467	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
40468	pub base_pdct: AssetClassProductType4Code,
40469	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
40470	pub sub_pdct: Option<AssetClassSubProductType32Code>,
40471	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
40472	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType34Code>,
40473}
40474
40475impl FreightCommodityWet3 {
40476	pub fn validate(&self) -> Result<(), ValidationError> {
40477		self.base_pdct.validate()?;
40478		if let Some(ref val) = self.sub_pdct { val.validate()? }
40479		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
40480		Ok(())
40481	}
40482}
40483
40484
40485// Frequency1 ...
40486#[cfg_attr(feature = "derive_debug", derive(Debug))]
40487#[cfg_attr(feature = "derive_default", derive(Default))]
40488#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40489#[cfg_attr(feature = "derive_clone", derive(Clone))]
40490#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40491pub struct Frequency1 {
40492	#[cfg_attr( feature = "derive_serde", serde(rename = "Seq", skip_serializing_if = "Option::is_none") )]
40493	pub seq: Option<String>,
40494	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt") )]
40495	pub start_dt: String,
40496	#[cfg_attr( feature = "derive_serde", serde(rename = "EndPtChc") )]
40497	pub end_pt_chc: EndPoint1Choice,
40498	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdFrqcyPttrn", skip_serializing_if = "Option::is_none") )]
40499	pub reqd_frqcy_pttrn: Option<Frequency37Choice>,
40500	#[cfg_attr( feature = "derive_serde", serde(rename = "NonWorkgDayAdjstmnt", skip_serializing_if = "Option::is_none") )]
40501	pub non_workg_day_adjstmnt: Option<BusinessDayConvention1Code>,
40502}
40503
40504impl Frequency1 {
40505	pub fn validate(&self) -> Result<(), ValidationError> {
40506		if let Some(ref val) = self.seq {
40507			let pattern = Regex::new("[0-9]{1,3}").unwrap();
40508			if !pattern.is_match(val) {
40509				return Err(ValidationError::new(1005, "seq does not match the required pattern".to_string()));
40510			}
40511		}
40512		self.end_pt_chc.validate()?;
40513		if let Some(ref val) = self.reqd_frqcy_pttrn { val.validate()? }
40514		if let Some(ref val) = self.non_workg_day_adjstmnt { val.validate()? }
40515		Ok(())
40516	}
40517}
40518
40519
40520// Frequency10Code ...
40521#[cfg_attr(feature = "derive_debug", derive(Debug))]
40522#[cfg_attr(feature = "derive_default", derive(Default))]
40523#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40524#[cfg_attr(feature = "derive_clone", derive(Clone))]
40525#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40526pub enum Frequency10Code {
40527	#[cfg_attr(feature = "derive_default", default)]
40528	#[cfg_attr( feature = "derive_serde", serde(rename = "NEVR") )]
40529	CodeNEVR,
40530	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
40531	CodeYEAR,
40532	#[cfg_attr( feature = "derive_serde", serde(rename = "RATE") )]
40533	CodeRATE,
40534	#[cfg_attr( feature = "derive_serde", serde(rename = "MIAN") )]
40535	CodeMIAN,
40536	#[cfg_attr( feature = "derive_serde", serde(rename = "QURT") )]
40537	CodeQURT,
40538}
40539
40540impl Frequency10Code {
40541	pub fn validate(&self) -> Result<(), ValidationError> {
40542		Ok(())
40543	}
40544}
40545
40546
40547// Frequency11Code ...
40548#[cfg_attr(feature = "derive_debug", derive(Debug))]
40549#[cfg_attr(feature = "derive_default", derive(Default))]
40550#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40551#[cfg_attr(feature = "derive_clone", derive(Clone))]
40552#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40553pub enum Frequency11Code {
40554	#[cfg_attr(feature = "derive_default", default)]
40555	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
40556	CodeYEAR,
40557	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
40558	CodeDAIL,
40559	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
40560	CodeMNTH,
40561	#[cfg_attr( feature = "derive_serde", serde(rename = "EXPI") )]
40562	CodeEXPI,
40563	#[cfg_attr( feature = "derive_serde", serde(rename = "OVNG") )]
40564	CodeOVNG,
40565	#[cfg_attr( feature = "derive_serde", serde(rename = "QURT") )]
40566	CodeQURT,
40567	#[cfg_attr( feature = "derive_serde", serde(rename = "MIAN") )]
40568	CodeMIAN,
40569	#[cfg_attr( feature = "derive_serde", serde(rename = "UPFR") )]
40570	CodeUPFR,
40571	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
40572	CodeWEEK,
40573	#[cfg_attr( feature = "derive_serde", serde(rename = "CRED") )]
40574	CodeCRED,
40575}
40576
40577impl Frequency11Code {
40578	pub fn validate(&self) -> Result<(), ValidationError> {
40579		Ok(())
40580	}
40581}
40582
40583
40584// Frequency13Code ...
40585#[cfg_attr(feature = "derive_debug", derive(Debug))]
40586#[cfg_attr(feature = "derive_default", derive(Default))]
40587#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40588#[cfg_attr(feature = "derive_clone", derive(Clone))]
40589#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40590pub enum Frequency13Code {
40591	#[cfg_attr(feature = "derive_default", default)]
40592	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
40593	CodeDAIL,
40594	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
40595	CodeWEEK,
40596	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
40597	CodeMNTH,
40598	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
40599	CodeYEAR,
40600	#[cfg_attr( feature = "derive_serde", serde(rename = "ADHO") )]
40601	CodeADHO,
40602	#[cfg_attr( feature = "derive_serde", serde(rename = "EXPI") )]
40603	CodeEXPI,
40604	#[cfg_attr( feature = "derive_serde", serde(rename = "MIAN") )]
40605	CodeMIAN,
40606	#[cfg_attr( feature = "derive_serde", serde(rename = "QURT") )]
40607	CodeQURT,
40608}
40609
40610impl Frequency13Code {
40611	pub fn validate(&self) -> Result<(), ValidationError> {
40612		Ok(())
40613	}
40614}
40615
40616
40617// Frequency14Code ...
40618#[cfg_attr(feature = "derive_debug", derive(Debug))]
40619#[cfg_attr(feature = "derive_default", derive(Default))]
40620#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40621#[cfg_attr(feature = "derive_clone", derive(Clone))]
40622#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40623pub enum Frequency14Code {
40624	#[cfg_attr(feature = "derive_default", default)]
40625	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
40626	CodeDAIL,
40627	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
40628	CodeWEEK,
40629	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
40630	CodeMNTH,
40631	#[cfg_attr( feature = "derive_serde", serde(rename = "ADHO") )]
40632	CodeADHO,
40633}
40634
40635impl Frequency14Code {
40636	pub fn validate(&self) -> Result<(), ValidationError> {
40637		Ok(())
40638	}
40639}
40640
40641
40642// Frequency19Code ...
40643#[cfg_attr(feature = "derive_debug", derive(Debug))]
40644#[cfg_attr(feature = "derive_default", derive(Default))]
40645#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40646#[cfg_attr(feature = "derive_clone", derive(Clone))]
40647#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40648pub enum Frequency19Code {
40649	#[cfg_attr(feature = "derive_default", default)]
40650	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
40651	CodeDAIL,
40652	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
40653	CodeWEEK,
40654	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
40655	CodeMNTH,
40656	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
40657	CodeYEAR,
40658	#[cfg_attr( feature = "derive_serde", serde(rename = "ADHO") )]
40659	CodeADHO,
40660	#[cfg_attr( feature = "derive_serde", serde(rename = "EXPI") )]
40661	CodeEXPI,
40662	#[cfg_attr( feature = "derive_serde", serde(rename = "MIAN") )]
40663	CodeMIAN,
40664	#[cfg_attr( feature = "derive_serde", serde(rename = "QURT") )]
40665	CodeQURT,
40666	#[cfg_attr( feature = "derive_serde", serde(rename = "HOUL") )]
40667	CodeHOUL,
40668	#[cfg_attr( feature = "derive_serde", serde(rename = "ODMD") )]
40669	CodeODMD,
40670}
40671
40672impl Frequency19Code {
40673	pub fn validate(&self) -> Result<(), ValidationError> {
40674		Ok(())
40675	}
40676}
40677
40678
40679// Frequency20Choice ...
40680#[cfg_attr(feature = "derive_debug", derive(Debug))]
40681#[cfg_attr(feature = "derive_default", derive(Default))]
40682#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40683#[cfg_attr(feature = "derive_clone", derive(Clone))]
40684#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40685pub struct Frequency20Choice {
40686	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
40687	pub cd: Option<EventFrequency8Code>,
40688	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
40689	pub prtry: Option<GenericIdentification47>,
40690}
40691
40692impl Frequency20Choice {
40693	pub fn validate(&self) -> Result<(), ValidationError> {
40694		if let Some(ref val) = self.cd { val.validate()? }
40695		if let Some(ref val) = self.prtry { val.validate()? }
40696		Ok(())
40697	}
40698}
40699
40700
40701// Frequency22Choice ...
40702#[cfg_attr(feature = "derive_debug", derive(Debug))]
40703#[cfg_attr(feature = "derive_default", derive(Default))]
40704#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40705#[cfg_attr(feature = "derive_clone", derive(Clone))]
40706#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40707pub struct Frequency22Choice {
40708	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
40709	pub cd: Option<EventFrequency7Code>,
40710	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
40711	pub prtry: Option<GenericIdentification30>,
40712}
40713
40714impl Frequency22Choice {
40715	pub fn validate(&self) -> Result<(), ValidationError> {
40716		if let Some(ref val) = self.cd { val.validate()? }
40717		if let Some(ref val) = self.prtry { val.validate()? }
40718		Ok(())
40719	}
40720}
40721
40722
40723// Frequency2Code ...
40724#[cfg_attr(feature = "derive_debug", derive(Debug))]
40725#[cfg_attr(feature = "derive_default", derive(Default))]
40726#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40727#[cfg_attr(feature = "derive_clone", derive(Clone))]
40728#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40729pub enum Frequency2Code {
40730	#[cfg_attr(feature = "derive_default", default)]
40731	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
40732	CodeYEAR,
40733	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
40734	CodeMNTH,
40735	#[cfg_attr( feature = "derive_serde", serde(rename = "QURT") )]
40736	CodeQURT,
40737	#[cfg_attr( feature = "derive_serde", serde(rename = "MIAN") )]
40738	CodeMIAN,
40739	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
40740	CodeWEEK,
40741	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
40742	CodeDAIL,
40743	#[cfg_attr( feature = "derive_serde", serde(rename = "ADHO") )]
40744	CodeADHO,
40745	#[cfg_attr( feature = "derive_serde", serde(rename = "INDA") )]
40746	CodeINDA,
40747	#[cfg_attr( feature = "derive_serde", serde(rename = "OVNG") )]
40748	CodeOVNG,
40749}
40750
40751impl Frequency2Code {
40752	pub fn validate(&self) -> Result<(), ValidationError> {
40753		Ok(())
40754	}
40755}
40756
40757
40758// Frequency35Choice ...
40759#[cfg_attr(feature = "derive_debug", derive(Debug))]
40760#[cfg_attr(feature = "derive_default", derive(Default))]
40761#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40762#[cfg_attr(feature = "derive_clone", derive(Clone))]
40763#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40764pub struct Frequency35Choice {
40765	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
40766	pub cd: Option<Frequency5Code>,
40767	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
40768	pub prtry: Option<GenericIdentification30>,
40769}
40770
40771impl Frequency35Choice {
40772	pub fn validate(&self) -> Result<(), ValidationError> {
40773		if let Some(ref val) = self.cd { val.validate()? }
40774		if let Some(ref val) = self.prtry { val.validate()? }
40775		Ok(())
40776	}
40777}
40778
40779
40780// Frequency36Choice ...
40781#[cfg_attr(feature = "derive_debug", derive(Debug))]
40782#[cfg_attr(feature = "derive_default", derive(Default))]
40783#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40784#[cfg_attr(feature = "derive_clone", derive(Clone))]
40785#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40786pub struct Frequency36Choice {
40787	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
40788	pub tp: Option<Frequency6Code>,
40789	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd", skip_serializing_if = "Option::is_none") )]
40790	pub prd: Option<FrequencyPeriod1>,
40791	#[cfg_attr( feature = "derive_serde", serde(rename = "PtInTm", skip_serializing_if = "Option::is_none") )]
40792	pub pt_in_tm: Option<FrequencyAndMoment1>,
40793}
40794
40795impl Frequency36Choice {
40796	pub fn validate(&self) -> Result<(), ValidationError> {
40797		if let Some(ref val) = self.tp { val.validate()? }
40798		if let Some(ref val) = self.prd { val.validate()? }
40799		if let Some(ref val) = self.pt_in_tm { val.validate()? }
40800		Ok(())
40801	}
40802}
40803
40804
40805// Frequency37Choice ...
40806#[cfg_attr(feature = "derive_debug", derive(Debug))]
40807#[cfg_attr(feature = "derive_default", derive(Default))]
40808#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40809#[cfg_attr(feature = "derive_clone", derive(Clone))]
40810#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40811pub struct Frequency37Choice {
40812	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
40813	pub cd: Option<Frequency10Code>,
40814	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
40815	pub prtry: Option<String>,
40816}
40817
40818impl Frequency37Choice {
40819	pub fn validate(&self) -> Result<(), ValidationError> {
40820		if let Some(ref val) = self.cd { val.validate()? }
40821		if let Some(ref val) = self.prtry {
40822			if val.chars().count() < 1 {
40823				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
40824			}
40825			if val.chars().count() > 35 {
40826				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
40827			}
40828		}
40829		Ok(())
40830	}
40831}
40832
40833
40834// Frequency5Code ...
40835#[cfg_attr(feature = "derive_debug", derive(Debug))]
40836#[cfg_attr(feature = "derive_default", derive(Default))]
40837#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40838#[cfg_attr(feature = "derive_clone", derive(Clone))]
40839#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40840pub enum Frequency5Code {
40841	#[cfg_attr(feature = "derive_default", default)]
40842	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
40843	CodeYEAR,
40844	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
40845	CodeMNTH,
40846	#[cfg_attr( feature = "derive_serde", serde(rename = "QURT") )]
40847	CodeQURT,
40848	#[cfg_attr( feature = "derive_serde", serde(rename = "MIAN") )]
40849	CodeMIAN,
40850	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
40851	CodeWEEK,
40852	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
40853	CodeDAIL,
40854	#[cfg_attr( feature = "derive_serde", serde(rename = "ADHO") )]
40855	CodeADHO,
40856	#[cfg_attr( feature = "derive_serde", serde(rename = "INDA") )]
40857	CodeINDA,
40858	#[cfg_attr( feature = "derive_serde", serde(rename = "OVNG") )]
40859	CodeOVNG,
40860	#[cfg_attr( feature = "derive_serde", serde(rename = "TEND") )]
40861	CodeTEND,
40862}
40863
40864impl Frequency5Code {
40865	pub fn validate(&self) -> Result<(), ValidationError> {
40866		Ok(())
40867	}
40868}
40869
40870
40871// Frequency6Code ...
40872#[cfg_attr(feature = "derive_debug", derive(Debug))]
40873#[cfg_attr(feature = "derive_default", derive(Default))]
40874#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40875#[cfg_attr(feature = "derive_clone", derive(Clone))]
40876#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40877pub enum Frequency6Code {
40878	#[cfg_attr(feature = "derive_default", default)]
40879	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
40880	CodeYEAR,
40881	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
40882	CodeMNTH,
40883	#[cfg_attr( feature = "derive_serde", serde(rename = "QURT") )]
40884	CodeQURT,
40885	#[cfg_attr( feature = "derive_serde", serde(rename = "MIAN") )]
40886	CodeMIAN,
40887	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
40888	CodeWEEK,
40889	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
40890	CodeDAIL,
40891	#[cfg_attr( feature = "derive_serde", serde(rename = "ADHO") )]
40892	CodeADHO,
40893	#[cfg_attr( feature = "derive_serde", serde(rename = "INDA") )]
40894	CodeINDA,
40895	#[cfg_attr( feature = "derive_serde", serde(rename = "FRTN") )]
40896	CodeFRTN,
40897}
40898
40899impl Frequency6Code {
40900	pub fn validate(&self) -> Result<(), ValidationError> {
40901		Ok(())
40902	}
40903}
40904
40905
40906// Frequency7Code ...
40907#[cfg_attr(feature = "derive_debug", derive(Debug))]
40908#[cfg_attr(feature = "derive_default", derive(Default))]
40909#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40910#[cfg_attr(feature = "derive_clone", derive(Clone))]
40911#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40912pub enum Frequency7Code {
40913	#[cfg_attr(feature = "derive_default", default)]
40914	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
40915	CodeYEAR,
40916	#[cfg_attr( feature = "derive_serde", serde(rename = "DAIL") )]
40917	CodeDAIL,
40918	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
40919	CodeMNTH,
40920	#[cfg_attr( feature = "derive_serde", serde(rename = "QURT") )]
40921	CodeQURT,
40922	#[cfg_attr( feature = "derive_serde", serde(rename = "MIAN") )]
40923	CodeMIAN,
40924	#[cfg_attr( feature = "derive_serde", serde(rename = "TEND") )]
40925	CodeTEND,
40926	#[cfg_attr( feature = "derive_serde", serde(rename = "MOVE") )]
40927	CodeMOVE,
40928	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
40929	CodeWEEK,
40930	#[cfg_attr( feature = "derive_serde", serde(rename = "INDA") )]
40931	CodeINDA,
40932}
40933
40934impl Frequency7Code {
40935	pub fn validate(&self) -> Result<(), ValidationError> {
40936		Ok(())
40937	}
40938}
40939
40940
40941// FrequencyAndMoment1 ...
40942#[cfg_attr(feature = "derive_debug", derive(Debug))]
40943#[cfg_attr(feature = "derive_default", derive(Default))]
40944#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40945#[cfg_attr(feature = "derive_clone", derive(Clone))]
40946#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40947pub struct FrequencyAndMoment1 {
40948	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
40949	pub tp: Frequency6Code,
40950	#[cfg_attr( feature = "derive_serde", serde(rename = "PtInTm") )]
40951	pub pt_in_tm: String,
40952}
40953
40954impl FrequencyAndMoment1 {
40955	pub fn validate(&self) -> Result<(), ValidationError> {
40956		self.tp.validate()?;
40957		let pattern = Regex::new("[0-9]{2}").unwrap();
40958		if !pattern.is_match(&self.pt_in_tm) {
40959			return Err(ValidationError::new(1005, "pt_in_tm does not match the required pattern".to_string()));
40960		}
40961		Ok(())
40962	}
40963}
40964
40965
40966// FrequencyPeriod1 ...
40967#[cfg_attr(feature = "derive_debug", derive(Debug))]
40968#[cfg_attr(feature = "derive_default", derive(Default))]
40969#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40970#[cfg_attr(feature = "derive_clone", derive(Clone))]
40971#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40972pub struct FrequencyPeriod1 {
40973	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
40974	pub tp: Frequency6Code,
40975	#[cfg_attr( feature = "derive_serde", serde(rename = "CntPerPrd") )]
40976	pub cnt_per_prd: f64,
40977}
40978
40979impl FrequencyPeriod1 {
40980	pub fn validate(&self) -> Result<(), ValidationError> {
40981		self.tp.validate()?;
40982		Ok(())
40983	}
40984}
40985
40986
40987// FromToAmountRange1 ...
40988#[cfg_attr(feature = "derive_debug", derive(Debug))]
40989#[cfg_attr(feature = "derive_default", derive(Default))]
40990#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
40991#[cfg_attr(feature = "derive_clone", derive(Clone))]
40992#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
40993pub struct FromToAmountRange1 {
40994	#[cfg_attr( feature = "derive_serde", serde(rename = "FrAmt") )]
40995	pub fr_amt: AmountRangeBoundary1,
40996	#[cfg_attr( feature = "derive_serde", serde(rename = "ToAmt") )]
40997	pub to_amt: AmountRangeBoundary1,
40998}
40999
41000impl FromToAmountRange1 {
41001	pub fn validate(&self) -> Result<(), ValidationError> {
41002		self.fr_amt.validate()?;
41003		self.to_amt.validate()?;
41004		Ok(())
41005	}
41006}
41007
41008
41009// FromToPercentageRange1 ...
41010#[cfg_attr(feature = "derive_debug", derive(Debug))]
41011#[cfg_attr(feature = "derive_default", derive(Default))]
41012#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41013#[cfg_attr(feature = "derive_clone", derive(Clone))]
41014#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41015pub struct FromToPercentageRange1 {
41016	#[cfg_attr( feature = "derive_serde", serde(rename = "Fr") )]
41017	pub fr: PercentageRangeBoundary1,
41018	#[cfg_attr( feature = "derive_serde", serde(rename = "To") )]
41019	pub to: PercentageRangeBoundary1,
41020}
41021
41022impl FromToPercentageRange1 {
41023	pub fn validate(&self) -> Result<(), ValidationError> {
41024		self.fr.validate()?;
41025		self.to.validate()?;
41026		Ok(())
41027	}
41028}
41029
41030
41031// FromToQuantityRange2 ...
41032#[cfg_attr(feature = "derive_debug", derive(Debug))]
41033#[cfg_attr(feature = "derive_default", derive(Default))]
41034#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41035#[cfg_attr(feature = "derive_clone", derive(Clone))]
41036#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41037pub struct FromToQuantityRange2 {
41038	#[cfg_attr( feature = "derive_serde", serde(rename = "FrQty") )]
41039	pub fr_qty: f64,
41040	#[cfg_attr( feature = "derive_serde", serde(rename = "ToQty") )]
41041	pub to_qty: f64,
41042}
41043
41044impl FromToQuantityRange2 {
41045	pub fn validate(&self) -> Result<(), ValidationError> {
41046		Ok(())
41047	}
41048}
41049
41050
41051// FullLegalNameModification1 ...
41052#[cfg_attr(feature = "derive_debug", derive(Debug))]
41053#[cfg_attr(feature = "derive_default", derive(Default))]
41054#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41055#[cfg_attr(feature = "derive_clone", derive(Clone))]
41056#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41057pub struct FullLegalNameModification1 {
41058	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
41059	pub mod_cd: Option<Modification1Code>,
41060	#[cfg_attr( feature = "derive_serde", serde(rename = "FullLglNm") )]
41061	pub full_lgl_nm: String,
41062}
41063
41064impl FullLegalNameModification1 {
41065	pub fn validate(&self) -> Result<(), ValidationError> {
41066		if let Some(ref val) = self.mod_cd { val.validate()? }
41067		if self.full_lgl_nm.chars().count() < 1 {
41068			return Err(ValidationError::new(1001, "full_lgl_nm is shorter than the minimum length of 1".to_string()));
41069		}
41070		if self.full_lgl_nm.chars().count() > 350 {
41071			return Err(ValidationError::new(1002, "full_lgl_nm exceeds the maximum length of 350".to_string()));
41072		}
41073		Ok(())
41074	}
41075}
41076
41077
41078// Fund1 ...
41079#[cfg_attr(feature = "derive_debug", derive(Debug))]
41080#[cfg_attr(feature = "derive_default", derive(Default))]
41081#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41082#[cfg_attr(feature = "derive_clone", derive(Clone))]
41083#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41084pub struct Fund1 {
41085	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
41086	pub nm: Option<String>,
41087	#[cfg_attr( feature = "derive_serde", serde(rename = "LglNttyIdr", skip_serializing_if = "Option::is_none") )]
41088	pub lgl_ntty_idr: Option<String>,
41089	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
41090	pub id: Option<OtherIdentification4>,
41091	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
41092	pub ccy: Option<String>,
41093	#[cfg_attr( feature = "derive_serde", serde(rename = "TradDtTm", skip_serializing_if = "Option::is_none") )]
41094	pub trad_dt_tm: Option<DateAndDateTimeChoice>,
41095	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTradDtTm", skip_serializing_if = "Option::is_none") )]
41096	pub prvs_trad_dt_tm: Option<DateAndDateTimeChoice>,
41097	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdTtlNAV", skip_serializing_if = "Option::is_none") )]
41098	pub estmtd_ttl_nav: Option<ActiveOrHistoricCurrencyAndAmount>,
41099	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlNAV", skip_serializing_if = "Option::is_none") )]
41100	pub prvs_ttl_nav: Option<ActiveOrHistoricCurrencyAndAmount>,
41101	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
41102	pub estmtd_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
41103	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
41104	pub prvs_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
41105	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdPctgOfFndTtlNAV", skip_serializing_if = "Option::is_none") )]
41106	pub estmtd_pctg_of_fnd_ttl_nav: Option<f64>,
41107	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdCshInFcstDtls", skip_serializing_if = "Option::is_none") )]
41108	pub estmtd_csh_in_fcst_dtls: Option<Vec<CashInOutForecast7>>,
41109	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdCshOutFcstDtls", skip_serializing_if = "Option::is_none") )]
41110	pub estmtd_csh_out_fcst_dtls: Option<Vec<CashInOutForecast7>>,
41111	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdNetCshFcstDtls", skip_serializing_if = "Option::is_none") )]
41112	pub estmtd_net_csh_fcst_dtls: Option<Vec<NetCashForecast5>>,
41113}
41114
41115impl Fund1 {
41116	pub fn validate(&self) -> Result<(), ValidationError> {
41117		if let Some(ref val) = self.nm {
41118			if val.chars().count() < 1 {
41119				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
41120			}
41121			if val.chars().count() > 350 {
41122				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
41123			}
41124		}
41125		if let Some(ref val) = self.lgl_ntty_idr {
41126			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
41127			if !pattern.is_match(val) {
41128				return Err(ValidationError::new(1005, "lgl_ntty_idr does not match the required pattern".to_string()));
41129			}
41130		}
41131		if let Some(ref val) = self.id { val.validate()? }
41132		if let Some(ref val) = self.ccy {
41133			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
41134			if !pattern.is_match(val) {
41135				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
41136			}
41137		}
41138		if let Some(ref val) = self.trad_dt_tm { val.validate()? }
41139		if let Some(ref val) = self.prvs_trad_dt_tm { val.validate()? }
41140		if let Some(ref val) = self.estmtd_ttl_nav { val.validate()? }
41141		if let Some(ref val) = self.prvs_ttl_nav { val.validate()? }
41142		if let Some(ref val) = self.estmtd_ttl_units_nb { val.validate()? }
41143		if let Some(ref val) = self.prvs_ttl_units_nb { val.validate()? }
41144		if let Some(ref vec) = self.estmtd_csh_in_fcst_dtls { for item in vec { item.validate()? } }
41145		if let Some(ref vec) = self.estmtd_csh_out_fcst_dtls { for item in vec { item.validate()? } }
41146		if let Some(ref vec) = self.estmtd_net_csh_fcst_dtls { for item in vec { item.validate()? } }
41147		Ok(())
41148	}
41149}
41150
41151
41152// Fund2 ...
41153#[cfg_attr(feature = "derive_debug", derive(Debug))]
41154#[cfg_attr(feature = "derive_default", derive(Default))]
41155#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41156#[cfg_attr(feature = "derive_clone", derive(Clone))]
41157#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41158pub struct Fund2 {
41159	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
41160	pub nm: Option<String>,
41161	#[cfg_attr( feature = "derive_serde", serde(rename = "LglNttyIdr", skip_serializing_if = "Option::is_none") )]
41162	pub lgl_ntty_idr: Option<String>,
41163	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
41164	pub id: Option<OtherIdentification4>,
41165	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
41166	pub ccy: Option<String>,
41167	#[cfg_attr( feature = "derive_serde", serde(rename = "TradDtTm", skip_serializing_if = "Option::is_none") )]
41168	pub trad_dt_tm: Option<DateAndDateTimeChoice>,
41169	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTradDtTm", skip_serializing_if = "Option::is_none") )]
41170	pub prvs_trad_dt_tm: Option<DateAndDateTimeChoice>,
41171	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNAV", skip_serializing_if = "Option::is_none") )]
41172	pub ttl_nav: Option<ActiveOrHistoricCurrencyAndAmount>,
41173	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlNAV", skip_serializing_if = "Option::is_none") )]
41174	pub prvs_ttl_nav: Option<ActiveOrHistoricCurrencyAndAmount>,
41175	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlUnitsNb", skip_serializing_if = "Option::is_none") )]
41176	pub ttl_units_nb: Option<FinancialInstrumentQuantity1>,
41177	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
41178	pub prvs_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
41179	#[cfg_attr( feature = "derive_serde", serde(rename = "PctgOfFndTtlNAV", skip_serializing_if = "Option::is_none") )]
41180	pub pctg_of_fnd_ttl_nav: Option<f64>,
41181	#[cfg_attr( feature = "derive_serde", serde(rename = "CshInFcstDtls", skip_serializing_if = "Option::is_none") )]
41182	pub csh_in_fcst_dtls: Option<Vec<CashInOutForecast7>>,
41183	#[cfg_attr( feature = "derive_serde", serde(rename = "CshOutFcstDtls", skip_serializing_if = "Option::is_none") )]
41184	pub csh_out_fcst_dtls: Option<Vec<CashInOutForecast7>>,
41185	#[cfg_attr( feature = "derive_serde", serde(rename = "NetCshFcstDtls", skip_serializing_if = "Option::is_none") )]
41186	pub net_csh_fcst_dtls: Option<Vec<NetCashForecast5>>,
41187}
41188
41189impl Fund2 {
41190	pub fn validate(&self) -> Result<(), ValidationError> {
41191		if let Some(ref val) = self.nm {
41192			if val.chars().count() < 1 {
41193				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
41194			}
41195			if val.chars().count() > 350 {
41196				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
41197			}
41198		}
41199		if let Some(ref val) = self.lgl_ntty_idr {
41200			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
41201			if !pattern.is_match(val) {
41202				return Err(ValidationError::new(1005, "lgl_ntty_idr does not match the required pattern".to_string()));
41203			}
41204		}
41205		if let Some(ref val) = self.id { val.validate()? }
41206		if let Some(ref val) = self.ccy {
41207			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
41208			if !pattern.is_match(val) {
41209				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
41210			}
41211		}
41212		if let Some(ref val) = self.trad_dt_tm { val.validate()? }
41213		if let Some(ref val) = self.prvs_trad_dt_tm { val.validate()? }
41214		if let Some(ref val) = self.ttl_nav { val.validate()? }
41215		if let Some(ref val) = self.prvs_ttl_nav { val.validate()? }
41216		if let Some(ref val) = self.ttl_units_nb { val.validate()? }
41217		if let Some(ref val) = self.prvs_ttl_units_nb { val.validate()? }
41218		if let Some(ref vec) = self.csh_in_fcst_dtls { for item in vec { item.validate()? } }
41219		if let Some(ref vec) = self.csh_out_fcst_dtls { for item in vec { item.validate()? } }
41220		if let Some(ref vec) = self.net_csh_fcst_dtls { for item in vec { item.validate()? } }
41221		Ok(())
41222	}
41223}
41224
41225
41226// Fund3 ...
41227#[cfg_attr(feature = "derive_debug", derive(Debug))]
41228#[cfg_attr(feature = "derive_default", derive(Default))]
41229#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41230#[cfg_attr(feature = "derive_clone", derive(Clone))]
41231#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41232pub struct Fund3 {
41233	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
41234	pub nm: Option<String>,
41235	#[cfg_attr( feature = "derive_serde", serde(rename = "LglNttyIdr", skip_serializing_if = "Option::is_none") )]
41236	pub lgl_ntty_idr: Option<String>,
41237	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
41238	pub id: Option<OtherIdentification4>,
41239	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
41240	pub ccy: Option<String>,
41241	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdTtlNAV", skip_serializing_if = "Option::is_none") )]
41242	pub estmtd_ttl_nav: Option<ActiveOrHistoricCurrencyAndAmount>,
41243	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlNAV", skip_serializing_if = "Option::is_none") )]
41244	pub prvs_ttl_nav: Option<ActiveOrHistoricCurrencyAndAmount>,
41245	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
41246	pub estmtd_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
41247	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
41248	pub prvs_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
41249	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdPctgOfFndTtlNAV", skip_serializing_if = "Option::is_none") )]
41250	pub estmtd_pctg_of_fnd_ttl_nav: Option<f64>,
41251}
41252
41253impl Fund3 {
41254	pub fn validate(&self) -> Result<(), ValidationError> {
41255		if let Some(ref val) = self.nm {
41256			if val.chars().count() < 1 {
41257				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
41258			}
41259			if val.chars().count() > 350 {
41260				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
41261			}
41262		}
41263		if let Some(ref val) = self.lgl_ntty_idr {
41264			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
41265			if !pattern.is_match(val) {
41266				return Err(ValidationError::new(1005, "lgl_ntty_idr does not match the required pattern".to_string()));
41267			}
41268		}
41269		if let Some(ref val) = self.id { val.validate()? }
41270		if let Some(ref val) = self.ccy {
41271			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
41272			if !pattern.is_match(val) {
41273				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
41274			}
41275		}
41276		if let Some(ref val) = self.estmtd_ttl_nav { val.validate()? }
41277		if let Some(ref val) = self.prvs_ttl_nav { val.validate()? }
41278		if let Some(ref val) = self.estmtd_ttl_units_nb { val.validate()? }
41279		if let Some(ref val) = self.prvs_ttl_units_nb { val.validate()? }
41280		Ok(())
41281	}
41282}
41283
41284
41285// Fund4 ...
41286#[cfg_attr(feature = "derive_debug", derive(Debug))]
41287#[cfg_attr(feature = "derive_default", derive(Default))]
41288#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41289#[cfg_attr(feature = "derive_clone", derive(Clone))]
41290#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41291pub struct Fund4 {
41292	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
41293	pub nm: Option<String>,
41294	#[cfg_attr( feature = "derive_serde", serde(rename = "LglNttyIdr", skip_serializing_if = "Option::is_none") )]
41295	pub lgl_ntty_idr: Option<String>,
41296	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
41297	pub id: Option<OtherIdentification4>,
41298	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
41299	pub ccy: Option<String>,
41300	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNAV", skip_serializing_if = "Option::is_none") )]
41301	pub ttl_nav: Option<ActiveOrHistoricCurrencyAndAmount>,
41302	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlNAV", skip_serializing_if = "Option::is_none") )]
41303	pub prvs_ttl_nav: Option<ActiveOrHistoricCurrencyAndAmount>,
41304	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlUnitsNb", skip_serializing_if = "Option::is_none") )]
41305	pub ttl_units_nb: Option<FinancialInstrumentQuantity1>,
41306	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
41307	pub prvs_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
41308	#[cfg_attr( feature = "derive_serde", serde(rename = "PctgOfFndTtlNAV", skip_serializing_if = "Option::is_none") )]
41309	pub pctg_of_fnd_ttl_nav: Option<f64>,
41310}
41311
41312impl Fund4 {
41313	pub fn validate(&self) -> Result<(), ValidationError> {
41314		if let Some(ref val) = self.nm {
41315			if val.chars().count() < 1 {
41316				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
41317			}
41318			if val.chars().count() > 350 {
41319				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
41320			}
41321		}
41322		if let Some(ref val) = self.lgl_ntty_idr {
41323			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
41324			if !pattern.is_match(val) {
41325				return Err(ValidationError::new(1005, "lgl_ntty_idr does not match the required pattern".to_string()));
41326			}
41327		}
41328		if let Some(ref val) = self.id { val.validate()? }
41329		if let Some(ref val) = self.ccy {
41330			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
41331			if !pattern.is_match(val) {
41332				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
41333			}
41334		}
41335		if let Some(ref val) = self.ttl_nav { val.validate()? }
41336		if let Some(ref val) = self.prvs_ttl_nav { val.validate()? }
41337		if let Some(ref val) = self.ttl_units_nb { val.validate()? }
41338		if let Some(ref val) = self.prvs_ttl_units_nb { val.validate()? }
41339		Ok(())
41340	}
41341}
41342
41343
41344// FundBalance1 ...
41345#[cfg_attr(feature = "derive_debug", derive(Debug))]
41346#[cfg_attr(feature = "derive_default", derive(Default))]
41347#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41348#[cfg_attr(feature = "derive_clone", derive(Clone))]
41349#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41350pub struct FundBalance1 {
41351	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlUnitsFrUnitOrdrs", skip_serializing_if = "Option::is_none") )]
41352	pub ttl_units_fr_unit_ordrs: Option<FinancialInstrumentQuantity1>,
41353	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlUnitsFrCshOrdrs", skip_serializing_if = "Option::is_none") )]
41354	pub ttl_units_fr_csh_ordrs: Option<FinancialInstrumentQuantity1>,
41355	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlCshFrUnitOrdrs", skip_serializing_if = "Option::is_none") )]
41356	pub ttl_csh_fr_unit_ordrs: Option<ActiveOrHistoricCurrencyAndAmount>,
41357	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlCshFrCshOrdrs", skip_serializing_if = "Option::is_none") )]
41358	pub ttl_csh_fr_csh_ordrs: Option<ActiveOrHistoricCurrencyAndAmount>,
41359}
41360
41361impl FundBalance1 {
41362	pub fn validate(&self) -> Result<(), ValidationError> {
41363		if let Some(ref val) = self.ttl_units_fr_unit_ordrs { val.validate()? }
41364		if let Some(ref val) = self.ttl_units_fr_csh_ordrs { val.validate()? }
41365		if let Some(ref val) = self.ttl_csh_fr_unit_ordrs { val.validate()? }
41366		if let Some(ref val) = self.ttl_csh_fr_csh_ordrs { val.validate()? }
41367		Ok(())
41368	}
41369}
41370
41371
41372// FundCashAccount4Code ...
41373#[cfg_attr(feature = "derive_debug", derive(Debug))]
41374#[cfg_attr(feature = "derive_default", derive(Default))]
41375#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41376#[cfg_attr(feature = "derive_clone", derive(Clone))]
41377#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41378pub enum FundCashAccount4Code {
41379	#[cfg_attr(feature = "derive_default", default)]
41380	#[cfg_attr( feature = "derive_serde", serde(rename = "HEDG") )]
41381	CodeHEDG,
41382	#[cfg_attr( feature = "derive_serde", serde(rename = "CPFO") )]
41383	CodeCPFO,
41384	#[cfg_attr( feature = "derive_serde", serde(rename = "CPFS") )]
41385	CodeCPFS,
41386	#[cfg_attr( feature = "derive_serde", serde(rename = "SRSA") )]
41387	CodeSRSA,
41388	#[cfg_attr( feature = "derive_serde", serde(rename = "CSDO") )]
41389	CodeCSDO,
41390	#[cfg_attr( feature = "derive_serde", serde(rename = "TOFF") )]
41391	CodeTOFF,
41392	#[cfg_attr( feature = "derive_serde", serde(rename = "ICSA") )]
41393	CodeICSA,
41394	#[cfg_attr( feature = "derive_serde", serde(rename = "CSDM") )]
41395	CodeCSDM,
41396	#[cfg_attr( feature = "derive_serde", serde(rename = "CSDP") )]
41397	CodeCSDP,
41398	#[cfg_attr( feature = "derive_serde", serde(rename = "PPEN") )]
41399	CodePPEN,
41400	#[cfg_attr( feature = "derive_serde", serde(rename = "CPEN") )]
41401	CodeCPEN,
41402}
41403
41404impl FundCashAccount4Code {
41405	pub fn validate(&self) -> Result<(), ValidationError> {
41406		Ok(())
41407	}
41408}
41409
41410
41411// FundCashForecast6 ...
41412#[cfg_attr(feature = "derive_debug", derive(Debug))]
41413#[cfg_attr(feature = "derive_default", derive(Default))]
41414#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41415#[cfg_attr(feature = "derive_clone", derive(Clone))]
41416#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41417pub struct FundCashForecast6 {
41418	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
41419	pub id: String,
41420	#[cfg_attr( feature = "derive_serde", serde(rename = "TradDtTm") )]
41421	pub trad_dt_tm: DateAndDateTimeChoice,
41422	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTradDtTm", skip_serializing_if = "Option::is_none") )]
41423	pub prvs_trad_dt_tm: Option<DateAndDateTimeChoice>,
41424	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmDtls") )]
41425	pub fin_instrm_dtls: FinancialInstrument9,
41426	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNAV", skip_serializing_if = "Option::is_none") )]
41427	pub ttl_nav: Option<Vec<ActiveOrHistoricCurrencyAndAmount>>,
41428	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlNAV", skip_serializing_if = "Option::is_none") )]
41429	pub prvs_ttl_nav: Option<Vec<ActiveOrHistoricCurrencyAndAmount>>,
41430	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlUnitsNb", skip_serializing_if = "Option::is_none") )]
41431	pub ttl_units_nb: Option<FinancialInstrumentQuantity1>,
41432	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
41433	pub prvs_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
41434	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNAVChngRate", skip_serializing_if = "Option::is_none") )]
41435	pub ttl_nav_chng_rate: Option<f64>,
41436	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtCcy", skip_serializing_if = "Option::is_none") )]
41437	pub invstmt_ccy: Option<Vec<String>>,
41438	#[cfg_attr( feature = "derive_serde", serde(rename = "CcySts", skip_serializing_if = "Option::is_none") )]
41439	pub ccy_sts: Option<CurrencyDesignation1>,
41440	#[cfg_attr( feature = "derive_serde", serde(rename = "XcptnlNetCshFlowInd") )]
41441	pub xcptnl_net_csh_flow_ind: bool,
41442	#[cfg_attr( feature = "derive_serde", serde(rename = "Pric", skip_serializing_if = "Option::is_none") )]
41443	pub pric: Option<UnitPrice19>,
41444	#[cfg_attr( feature = "derive_serde", serde(rename = "FXRate", skip_serializing_if = "Option::is_none") )]
41445	pub fx_rate: Option<ForeignExchangeTerms19>,
41446	#[cfg_attr( feature = "derive_serde", serde(rename = "PctgOfShrClssTtlNAV", skip_serializing_if = "Option::is_none") )]
41447	pub pctg_of_shr_clss_ttl_nav: Option<f64>,
41448	#[cfg_attr( feature = "derive_serde", serde(rename = "BrkdwnByPty", skip_serializing_if = "Option::is_none") )]
41449	pub brkdwn_by_pty: Option<Vec<BreakdownByParty3>>,
41450	#[cfg_attr( feature = "derive_serde", serde(rename = "BrkdwnByCtry", skip_serializing_if = "Option::is_none") )]
41451	pub brkdwn_by_ctry: Option<Vec<BreakdownByCountry2>>,
41452	#[cfg_attr( feature = "derive_serde", serde(rename = "BrkdwnByCcy", skip_serializing_if = "Option::is_none") )]
41453	pub brkdwn_by_ccy: Option<Vec<BreakdownByCurrency2>>,
41454	#[cfg_attr( feature = "derive_serde", serde(rename = "BrkdwnByUsrDfndParam", skip_serializing_if = "Option::is_none") )]
41455	pub brkdwn_by_usr_dfnd_param: Option<Vec<BreakdownByUserDefinedParameter3>>,
41456	#[cfg_attr( feature = "derive_serde", serde(rename = "NetCshFcstDtls", skip_serializing_if = "Option::is_none") )]
41457	pub net_csh_fcst_dtls: Option<Vec<NetCashForecast4>>,
41458}
41459
41460impl FundCashForecast6 {
41461	pub fn validate(&self) -> Result<(), ValidationError> {
41462		if self.id.chars().count() < 1 {
41463			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
41464		}
41465		if self.id.chars().count() > 35 {
41466			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
41467		}
41468		self.trad_dt_tm.validate()?;
41469		if let Some(ref val) = self.prvs_trad_dt_tm { val.validate()? }
41470		self.fin_instrm_dtls.validate()?;
41471		if let Some(ref vec) = self.ttl_nav { for item in vec { item.validate()? } }
41472		if let Some(ref vec) = self.prvs_ttl_nav { for item in vec { item.validate()? } }
41473		if let Some(ref val) = self.ttl_units_nb { val.validate()? }
41474		if let Some(ref val) = self.prvs_ttl_units_nb { val.validate()? }
41475		if let Some(ref vec) = self.invstmt_ccy {
41476			for item in vec {
41477				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
41478				if !pattern.is_match(&item) {
41479					return Err(ValidationError::new(1005, "invstmt_ccy does not match the required pattern".to_string()));
41480				}
41481			}
41482		}
41483		if let Some(ref val) = self.ccy_sts { val.validate()? }
41484		if let Some(ref val) = self.pric { val.validate()? }
41485		if let Some(ref val) = self.fx_rate { val.validate()? }
41486		if let Some(ref vec) = self.brkdwn_by_pty { for item in vec { item.validate()? } }
41487		if let Some(ref vec) = self.brkdwn_by_ctry { for item in vec { item.validate()? } }
41488		if let Some(ref vec) = self.brkdwn_by_ccy { for item in vec { item.validate()? } }
41489		if let Some(ref vec) = self.brkdwn_by_usr_dfnd_param { for item in vec { item.validate()? } }
41490		if let Some(ref vec) = self.net_csh_fcst_dtls { for item in vec { item.validate()? } }
41491		Ok(())
41492	}
41493}
41494
41495
41496// FundCashForecast7 ...
41497#[cfg_attr(feature = "derive_debug", derive(Debug))]
41498#[cfg_attr(feature = "derive_default", derive(Default))]
41499#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41500#[cfg_attr(feature = "derive_clone", derive(Clone))]
41501#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41502pub struct FundCashForecast7 {
41503	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
41504	pub id: String,
41505	#[cfg_attr( feature = "derive_serde", serde(rename = "TradDtTm") )]
41506	pub trad_dt_tm: DateAndDateTimeChoice,
41507	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTradDtTm", skip_serializing_if = "Option::is_none") )]
41508	pub prvs_trad_dt_tm: Option<DateAndDateTimeChoice>,
41509	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmDtls") )]
41510	pub fin_instrm_dtls: FinancialInstrument9,
41511	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNAV", skip_serializing_if = "Option::is_none") )]
41512	pub ttl_nav: Option<Vec<ActiveOrHistoricCurrencyAndAmount>>,
41513	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlNAV", skip_serializing_if = "Option::is_none") )]
41514	pub prvs_ttl_nav: Option<Vec<ActiveOrHistoricCurrencyAndAmount>>,
41515	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlUnitsNb", skip_serializing_if = "Option::is_none") )]
41516	pub ttl_units_nb: Option<FinancialInstrumentQuantity1>,
41517	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsTtlUnitsNb", skip_serializing_if = "Option::is_none") )]
41518	pub prvs_ttl_units_nb: Option<FinancialInstrumentQuantity1>,
41519	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNAVChngRate", skip_serializing_if = "Option::is_none") )]
41520	pub ttl_nav_chng_rate: Option<f64>,
41521	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtCcy", skip_serializing_if = "Option::is_none") )]
41522	pub invstmt_ccy: Option<Vec<String>>,
41523	#[cfg_attr( feature = "derive_serde", serde(rename = "CcySts", skip_serializing_if = "Option::is_none") )]
41524	pub ccy_sts: Option<CurrencyDesignation1>,
41525	#[cfg_attr( feature = "derive_serde", serde(rename = "XcptnlNetCshFlowInd") )]
41526	pub xcptnl_net_csh_flow_ind: bool,
41527	#[cfg_attr( feature = "derive_serde", serde(rename = "Pric", skip_serializing_if = "Option::is_none") )]
41528	pub pric: Option<UnitPrice19>,
41529	#[cfg_attr( feature = "derive_serde", serde(rename = "FXRate", skip_serializing_if = "Option::is_none") )]
41530	pub fx_rate: Option<ForeignExchangeTerms19>,
41531	#[cfg_attr( feature = "derive_serde", serde(rename = "PctgOfShrClssTtlNAV", skip_serializing_if = "Option::is_none") )]
41532	pub pctg_of_shr_clss_ttl_nav: Option<f64>,
41533	#[cfg_attr( feature = "derive_serde", serde(rename = "CshInFcstDtls", skip_serializing_if = "Option::is_none") )]
41534	pub csh_in_fcst_dtls: Option<Vec<CashInForecast6>>,
41535	#[cfg_attr( feature = "derive_serde", serde(rename = "CshOutFcstDtls", skip_serializing_if = "Option::is_none") )]
41536	pub csh_out_fcst_dtls: Option<Vec<CashOutForecast6>>,
41537	#[cfg_attr( feature = "derive_serde", serde(rename = "NetCshFcstDtls", skip_serializing_if = "Option::is_none") )]
41538	pub net_csh_fcst_dtls: Option<Vec<NetCashForecast4>>,
41539}
41540
41541impl FundCashForecast7 {
41542	pub fn validate(&self) -> Result<(), ValidationError> {
41543		if self.id.chars().count() < 1 {
41544			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
41545		}
41546		if self.id.chars().count() > 35 {
41547			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
41548		}
41549		self.trad_dt_tm.validate()?;
41550		if let Some(ref val) = self.prvs_trad_dt_tm { val.validate()? }
41551		self.fin_instrm_dtls.validate()?;
41552		if let Some(ref vec) = self.ttl_nav { for item in vec { item.validate()? } }
41553		if let Some(ref vec) = self.prvs_ttl_nav { for item in vec { item.validate()? } }
41554		if let Some(ref val) = self.ttl_units_nb { val.validate()? }
41555		if let Some(ref val) = self.prvs_ttl_units_nb { val.validate()? }
41556		if let Some(ref vec) = self.invstmt_ccy {
41557			for item in vec {
41558				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
41559				if !pattern.is_match(&item) {
41560					return Err(ValidationError::new(1005, "invstmt_ccy does not match the required pattern".to_string()));
41561				}
41562			}
41563		}
41564		if let Some(ref val) = self.ccy_sts { val.validate()? }
41565		if let Some(ref val) = self.pric { val.validate()? }
41566		if let Some(ref val) = self.fx_rate { val.validate()? }
41567		if let Some(ref vec) = self.csh_in_fcst_dtls { for item in vec { item.validate()? } }
41568		if let Some(ref vec) = self.csh_out_fcst_dtls { for item in vec { item.validate()? } }
41569		if let Some(ref vec) = self.net_csh_fcst_dtls { for item in vec { item.validate()? } }
41570		Ok(())
41571	}
41572}
41573
41574
41575// FundCashInBreakdown3 ...
41576#[cfg_attr(feature = "derive_debug", derive(Debug))]
41577#[cfg_attr(feature = "derive_default", derive(Default))]
41578#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41579#[cfg_attr(feature = "derive_clone", derive(Clone))]
41580#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41581pub struct FundCashInBreakdown3 {
41582	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
41583	pub amt: Option<ActiveOrHistoricCurrencyAndAmount>,
41584	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitsNb", skip_serializing_if = "Option::is_none") )]
41585	pub units_nb: Option<FinancialInstrumentQuantity1>,
41586	#[cfg_attr( feature = "derive_serde", serde(rename = "NewAmtInd", skip_serializing_if = "Option::is_none") )]
41587	pub new_amt_ind: Option<bool>,
41588	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtFndTxInTp") )]
41589	pub invstmt_fnd_tx_in_tp: InvestmentFundTransactionInType1Choice,
41590	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlOrdrQtyTp") )]
41591	pub orgnl_ordr_qty_tp: QuantityType1Choice,
41592	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgDtls", skip_serializing_if = "Option::is_none") )]
41593	pub chrg_dtls: Option<Vec<Charge26>>,
41594	#[cfg_attr( feature = "derive_serde", serde(rename = "ComssnDtls", skip_serializing_if = "Option::is_none") )]
41595	pub comssn_dtls: Option<Vec<Commission21>>,
41596	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcy", skip_serializing_if = "Option::is_none") )]
41597	pub sttlm_ccy: Option<String>,
41598}
41599
41600impl FundCashInBreakdown3 {
41601	pub fn validate(&self) -> Result<(), ValidationError> {
41602		if let Some(ref val) = self.amt { val.validate()? }
41603		if let Some(ref val) = self.units_nb { val.validate()? }
41604		self.invstmt_fnd_tx_in_tp.validate()?;
41605		self.orgnl_ordr_qty_tp.validate()?;
41606		if let Some(ref vec) = self.chrg_dtls { for item in vec { item.validate()? } }
41607		if let Some(ref vec) = self.comssn_dtls { for item in vec { item.validate()? } }
41608		if let Some(ref val) = self.sttlm_ccy {
41609			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
41610			if !pattern.is_match(val) {
41611				return Err(ValidationError::new(1005, "sttlm_ccy does not match the required pattern".to_string()));
41612			}
41613		}
41614		Ok(())
41615	}
41616}
41617
41618
41619// FundCashOutBreakdown3 ...
41620#[cfg_attr(feature = "derive_debug", derive(Debug))]
41621#[cfg_attr(feature = "derive_default", derive(Default))]
41622#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41623#[cfg_attr(feature = "derive_clone", derive(Clone))]
41624#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41625pub struct FundCashOutBreakdown3 {
41626	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
41627	pub amt: Option<ActiveOrHistoricCurrencyAndAmount>,
41628	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitsNb", skip_serializing_if = "Option::is_none") )]
41629	pub units_nb: Option<FinancialInstrumentQuantity1>,
41630	#[cfg_attr( feature = "derive_serde", serde(rename = "NewAmtInd", skip_serializing_if = "Option::is_none") )]
41631	pub new_amt_ind: Option<bool>,
41632	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtFndTxOutTp") )]
41633	pub invstmt_fnd_tx_out_tp: InvestmentFundTransactionOutType1Choice,
41634	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlOrdrQtyTp") )]
41635	pub orgnl_ordr_qty_tp: QuantityType1Choice,
41636	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgDtls", skip_serializing_if = "Option::is_none") )]
41637	pub chrg_dtls: Option<Vec<Charge26>>,
41638	#[cfg_attr( feature = "derive_serde", serde(rename = "ComssnDtls", skip_serializing_if = "Option::is_none") )]
41639	pub comssn_dtls: Option<Vec<Commission21>>,
41640	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcy", skip_serializing_if = "Option::is_none") )]
41641	pub sttlm_ccy: Option<String>,
41642}
41643
41644impl FundCashOutBreakdown3 {
41645	pub fn validate(&self) -> Result<(), ValidationError> {
41646		if let Some(ref val) = self.amt { val.validate()? }
41647		if let Some(ref val) = self.units_nb { val.validate()? }
41648		self.invstmt_fnd_tx_out_tp.validate()?;
41649		self.orgnl_ordr_qty_tp.validate()?;
41650		if let Some(ref vec) = self.chrg_dtls { for item in vec { item.validate()? } }
41651		if let Some(ref vec) = self.comssn_dtls { for item in vec { item.validate()? } }
41652		if let Some(ref val) = self.sttlm_ccy {
41653			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
41654			if !pattern.is_match(val) {
41655				return Err(ValidationError::new(1005, "sttlm_ccy does not match the required pattern".to_string()));
41656			}
41657		}
41658		Ok(())
41659	}
41660}
41661
41662
41663// FundConfirmedCashForecastReport3 ...
41664#[cfg_attr(feature = "derive_debug", derive(Debug))]
41665#[cfg_attr(feature = "derive_default", derive(Default))]
41666#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41667#[cfg_attr(feature = "derive_clone", derive(Clone))]
41668#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41669pub struct FundConfirmedCashForecastReport3 {
41670	#[cfg_attr( feature = "derive_serde", serde(rename = "FndOrSubFndDtls", skip_serializing_if = "Option::is_none") )]
41671	pub fnd_or_sub_fnd_dtls: Option<Vec<Fund2>>,
41672	#[cfg_attr( feature = "derive_serde", serde(rename = "FndCshFcstDtls", skip_serializing_if = "Option::is_none") )]
41673	pub fnd_csh_fcst_dtls: Option<Vec<FundCashForecast7>>,
41674	#[cfg_attr( feature = "derive_serde", serde(rename = "CnsltdNetCshFcst", skip_serializing_if = "Option::is_none") )]
41675	pub cnsltd_net_csh_fcst: Option<NetCashForecast3>,
41676	#[cfg_attr( feature = "derive_serde", serde(rename = "Xtnsn", skip_serializing_if = "Option::is_none") )]
41677	pub xtnsn: Option<Vec<Extension1>>,
41678}
41679
41680impl FundConfirmedCashForecastReport3 {
41681	pub fn validate(&self) -> Result<(), ValidationError> {
41682		if let Some(ref vec) = self.fnd_or_sub_fnd_dtls { for item in vec { item.validate()? } }
41683		if let Some(ref vec) = self.fnd_csh_fcst_dtls { for item in vec { item.validate()? } }
41684		if let Some(ref val) = self.cnsltd_net_csh_fcst { val.validate()? }
41685		if let Some(ref vec) = self.xtnsn { for item in vec { item.validate()? } }
41686		Ok(())
41687	}
41688}
41689
41690
41691// FundDetailedConfirmedCashForecastReport3 ...
41692#[cfg_attr(feature = "derive_debug", derive(Debug))]
41693#[cfg_attr(feature = "derive_default", derive(Default))]
41694#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41695#[cfg_attr(feature = "derive_clone", derive(Clone))]
41696#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41697pub struct FundDetailedConfirmedCashForecastReport3 {
41698	#[cfg_attr( feature = "derive_serde", serde(rename = "FndOrSubFndDtls", skip_serializing_if = "Option::is_none") )]
41699	pub fnd_or_sub_fnd_dtls: Option<Fund4>,
41700	#[cfg_attr( feature = "derive_serde", serde(rename = "FndCshFcstDtls") )]
41701	pub fnd_csh_fcst_dtls: Vec<FundCashForecast6>,
41702	#[cfg_attr( feature = "derive_serde", serde(rename = "CnsltdNetCshFcst", skip_serializing_if = "Option::is_none") )]
41703	pub cnsltd_net_csh_fcst: Option<NetCashForecast3>,
41704	#[cfg_attr( feature = "derive_serde", serde(rename = "Xtnsn", skip_serializing_if = "Option::is_none") )]
41705	pub xtnsn: Option<Vec<Extension1>>,
41706}
41707
41708impl FundDetailedConfirmedCashForecastReport3 {
41709	pub fn validate(&self) -> Result<(), ValidationError> {
41710		if let Some(ref val) = self.fnd_or_sub_fnd_dtls { val.validate()? }
41711		for item in &self.fnd_csh_fcst_dtls { item.validate()? }
41712		if let Some(ref val) = self.cnsltd_net_csh_fcst { val.validate()? }
41713		if let Some(ref vec) = self.xtnsn { for item in vec { item.validate()? } }
41714		Ok(())
41715	}
41716}
41717
41718
41719// FundIntention1Code ...
41720#[cfg_attr(feature = "derive_debug", derive(Debug))]
41721#[cfg_attr(feature = "derive_default", derive(Default))]
41722#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41723#[cfg_attr(feature = "derive_clone", derive(Clone))]
41724#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41725pub enum FundIntention1Code {
41726	#[cfg_attr(feature = "derive_default", default)]
41727	#[cfg_attr( feature = "derive_serde", serde(rename = "YQUA") )]
41728	CodeYQUA,
41729	#[cfg_attr( feature = "derive_serde", serde(rename = "NQUA") )]
41730	CodeNQUA,
41731}
41732
41733impl FundIntention1Code {
41734	pub fn validate(&self) -> Result<(), ValidationError> {
41735		Ok(())
41736	}
41737}
41738
41739
41740// FundOrderType10Code ...
41741#[cfg_attr(feature = "derive_debug", derive(Debug))]
41742#[cfg_attr(feature = "derive_default", derive(Default))]
41743#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41744#[cfg_attr(feature = "derive_clone", derive(Clone))]
41745#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41746pub enum FundOrderType10Code {
41747	#[cfg_attr(feature = "derive_default", default)]
41748	#[cfg_attr( feature = "derive_serde", serde(rename = "SUBS") )]
41749	CodeSUBS,
41750	#[cfg_attr( feature = "derive_serde", serde(rename = "RDIV") )]
41751	CodeRDIV,
41752	#[cfg_attr( feature = "derive_serde", serde(rename = "REDM") )]
41753	CodeREDM,
41754	#[cfg_attr( feature = "derive_serde", serde(rename = "RGSV") )]
41755	CodeRGSV,
41756	#[cfg_attr( feature = "derive_serde", serde(rename = "WIDP") )]
41757	CodeWIDP,
41758}
41759
41760impl FundOrderType10Code {
41761	pub fn validate(&self) -> Result<(), ValidationError> {
41762		Ok(())
41763	}
41764}
41765
41766
41767// FundOrderType5Choice ...
41768#[cfg_attr(feature = "derive_debug", derive(Debug))]
41769#[cfg_attr(feature = "derive_default", derive(Default))]
41770#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41771#[cfg_attr(feature = "derive_clone", derive(Clone))]
41772#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41773pub struct FundOrderType5Choice {
41774	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
41775	pub cd: Option<FundOrderType10Code>,
41776	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
41777	pub prtry: Option<GenericIdentification36>,
41778}
41779
41780impl FundOrderType5Choice {
41781	pub fn validate(&self) -> Result<(), ValidationError> {
41782		if let Some(ref val) = self.cd { val.validate()? }
41783		if let Some(ref val) = self.prtry { val.validate()? }
41784		Ok(())
41785	}
41786}
41787
41788
41789// FundOwnership1Code ...
41790#[cfg_attr(feature = "derive_debug", derive(Debug))]
41791#[cfg_attr(feature = "derive_default", derive(Default))]
41792#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41793#[cfg_attr(feature = "derive_clone", derive(Clone))]
41794#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41795pub enum FundOwnership1Code {
41796	#[cfg_attr(feature = "derive_default", default)]
41797	#[cfg_attr( feature = "derive_serde", serde(rename = "YALL") )]
41798	CodeYALL,
41799	#[cfg_attr( feature = "derive_serde", serde(rename = "NALL") )]
41800	CodeNALL,
41801}
41802
41803impl FundOwnership1Code {
41804	pub fn validate(&self) -> Result<(), ValidationError> {
41805		Ok(())
41806	}
41807}
41808
41809
41810// FundParameters4Choice ...
41811#[cfg_attr(feature = "derive_debug", derive(Debug))]
41812#[cfg_attr(feature = "derive_default", derive(Default))]
41813#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41814#[cfg_attr(feature = "derive_clone", derive(Clone))]
41815#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41816pub struct FundParameters4Choice {
41817	#[cfg_attr( feature = "derive_serde", serde(rename = "NoCrit", skip_serializing_if = "Option::is_none") )]
41818	pub no_crit: Option<NoCriteria1Code>,
41819	#[cfg_attr( feature = "derive_serde", serde(rename = "Params", skip_serializing_if = "Option::is_none") )]
41820	pub params: Option<FundParameters5>,
41821}
41822
41823impl FundParameters4Choice {
41824	pub fn validate(&self) -> Result<(), ValidationError> {
41825		if let Some(ref val) = self.no_crit { val.validate()? }
41826		if let Some(ref val) = self.params { val.validate()? }
41827		Ok(())
41828	}
41829}
41830
41831
41832// FundParameters5 ...
41833#[cfg_attr(feature = "derive_debug", derive(Debug))]
41834#[cfg_attr(feature = "derive_default", derive(Default))]
41835#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41836#[cfg_attr(feature = "derive_clone", derive(Clone))]
41837#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41838pub struct FundParameters5 {
41839	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmDtls", skip_serializing_if = "Option::is_none") )]
41840	pub fin_instrm_dtls: Option<Vec<FinancialInstrument71>>,
41841	#[cfg_attr( feature = "derive_serde", serde(rename = "FndMgmtCpny", skip_serializing_if = "Option::is_none") )]
41842	pub fnd_mgmt_cpny: Option<Vec<PartyIdentification139>>,
41843	#[cfg_attr( feature = "derive_serde", serde(rename = "DtFr", skip_serializing_if = "Option::is_none") )]
41844	pub dt_fr: Option<String>,
41845	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfDmcl", skip_serializing_if = "Option::is_none") )]
41846	pub ctry_of_dmcl: Option<String>,
41847	#[cfg_attr( feature = "derive_serde", serde(rename = "RegdDstrbtnCtry", skip_serializing_if = "Option::is_none") )]
41848	pub regd_dstrbtn_ctry: Option<Vec<String>>,
41849}
41850
41851impl FundParameters5 {
41852	pub fn validate(&self) -> Result<(), ValidationError> {
41853		if let Some(ref vec) = self.fin_instrm_dtls { for item in vec { item.validate()? } }
41854		if let Some(ref vec) = self.fnd_mgmt_cpny { for item in vec { item.validate()? } }
41855		if let Some(ref val) = self.ctry_of_dmcl {
41856			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
41857			if !pattern.is_match(val) {
41858				return Err(ValidationError::new(1005, "ctry_of_dmcl does not match the required pattern".to_string()));
41859			}
41860		}
41861		if let Some(ref vec) = self.regd_dstrbtn_ctry {
41862			for item in vec {
41863				let pattern = Regex::new("[A-Z]{2,2}").unwrap();
41864				if !pattern.is_match(&item) {
41865					return Err(ValidationError::new(1005, "regd_dstrbtn_ctry does not match the required pattern".to_string()));
41866				}
41867			}
41868		}
41869		Ok(())
41870	}
41871}
41872
41873
41874// FundParties1 ...
41875#[cfg_attr(feature = "derive_debug", derive(Debug))]
41876#[cfg_attr(feature = "derive_default", derive(Default))]
41877#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41878#[cfg_attr(feature = "derive_clone", derive(Clone))]
41879#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41880pub struct FundParties1 {
41881	#[cfg_attr( feature = "derive_serde", serde(rename = "Guarntr", skip_serializing_if = "Option::is_none") )]
41882	pub guarntr: Option<ContactAttributes5>,
41883	#[cfg_attr( feature = "derive_serde", serde(rename = "Audtr", skip_serializing_if = "Option::is_none") )]
41884	pub audtr: Option<ContactAttributes5>,
41885	#[cfg_attr( feature = "derive_serde", serde(rename = "Trstee", skip_serializing_if = "Option::is_none") )]
41886	pub trstee: Option<ContactAttributes5>,
41887	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPty", skip_serializing_if = "Option::is_none") )]
41888	pub othr_pty: Option<Vec<ExtendedParty13>>,
41889}
41890
41891impl FundParties1 {
41892	pub fn validate(&self) -> Result<(), ValidationError> {
41893		if let Some(ref val) = self.guarntr { val.validate()? }
41894		if let Some(ref val) = self.audtr { val.validate()? }
41895		if let Some(ref val) = self.trstee { val.validate()? }
41896		if let Some(ref vec) = self.othr_pty { for item in vec { item.validate()? } }
41897		Ok(())
41898	}
41899}
41900
41901
41902// FundPaymentType1Choice ...
41903#[cfg_attr(feature = "derive_debug", derive(Debug))]
41904#[cfg_attr(feature = "derive_default", derive(Default))]
41905#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41906#[cfg_attr(feature = "derive_clone", derive(Clone))]
41907#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41908pub struct FundPaymentType1Choice {
41909	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
41910	pub cd: Option<FundPaymentType1Code>,
41911	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
41912	pub prtry: Option<GenericIdentification36>,
41913}
41914
41915impl FundPaymentType1Choice {
41916	pub fn validate(&self) -> Result<(), ValidationError> {
41917		if let Some(ref val) = self.cd { val.validate()? }
41918		if let Some(ref val) = self.prtry { val.validate()? }
41919		Ok(())
41920	}
41921}
41922
41923
41924// FundPaymentType1Code ...
41925#[cfg_attr(feature = "derive_debug", derive(Debug))]
41926#[cfg_attr(feature = "derive_default", derive(Default))]
41927#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41928#[cfg_attr(feature = "derive_clone", derive(Clone))]
41929#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41930pub enum FundPaymentType1Code {
41931	#[cfg_attr(feature = "derive_default", default)]
41932	#[cfg_attr( feature = "derive_serde", serde(rename = "DRAF") )]
41933	CodeDRAF,
41934	#[cfg_attr( feature = "derive_serde", serde(rename = "CACC") )]
41935	CodeCACC,
41936	#[cfg_attr( feature = "derive_serde", serde(rename = "CHEQ") )]
41937	CodeCHEQ,
41938	#[cfg_attr( feature = "derive_serde", serde(rename = "CRDT") )]
41939	CodeCRDT,
41940	#[cfg_attr( feature = "derive_serde", serde(rename = "DDEB") )]
41941	CodeDDEB,
41942	#[cfg_attr( feature = "derive_serde", serde(rename = "CARD") )]
41943	CodeCARD,
41944}
41945
41946impl FundPaymentType1Code {
41947	pub fn validate(&self) -> Result<(), ValidationError> {
41948		Ok(())
41949	}
41950}
41951
41952
41953// FundReferenceDataReport5 ...
41954#[cfg_attr(feature = "derive_debug", derive(Debug))]
41955#[cfg_attr(feature = "derive_default", derive(Default))]
41956#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
41957#[cfg_attr(feature = "derive_clone", derive(Clone))]
41958#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
41959pub struct FundReferenceDataReport5 {
41960	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
41961	pub id: Option<String>,
41962	#[cfg_attr( feature = "derive_serde", serde(rename = "Vrsn", skip_serializing_if = "Option::is_none") )]
41963	pub vrsn: Option<MarketPracticeVersion1>,
41964	#[cfg_attr( feature = "derive_serde", serde(rename = "AuthrsdPrxy", skip_serializing_if = "Option::is_none") )]
41965	pub authrsd_prxy: Option<ContactAttributes6>,
41966	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlRefDt") )]
41967	pub gnl_ref_dt: String,
41968	#[cfg_attr( feature = "derive_serde", serde(rename = "TrgtMktInd", skip_serializing_if = "Option::is_none") )]
41969	pub trgt_mkt_ind: Option<bool>,
41970	#[cfg_attr( feature = "derive_serde", serde(rename = "ExAnteInd", skip_serializing_if = "Option::is_none") )]
41971	pub ex_ante_ind: Option<bool>,
41972	#[cfg_attr( feature = "derive_serde", serde(rename = "ExPstInd", skip_serializing_if = "Option::is_none") )]
41973	pub ex_pst_ind: Option<bool>,
41974	#[cfg_attr( feature = "derive_serde", serde(rename = "SctyId") )]
41975	pub scty_id: SecurityIdentification47,
41976	#[cfg_attr( feature = "derive_serde", serde(rename = "FndPties", skip_serializing_if = "Option::is_none") )]
41977	pub fnd_pties: Option<FundParties1>,
41978	#[cfg_attr( feature = "derive_serde", serde(rename = "MainFndOrdrDsk", skip_serializing_if = "Option::is_none") )]
41979	pub main_fnd_ordr_dsk: Option<OrderDesk1>,
41980	#[cfg_attr( feature = "derive_serde", serde(rename = "FndMgmtCpny", skip_serializing_if = "Option::is_none") )]
41981	pub fnd_mgmt_cpny: Option<ContactAttributes5>,
41982	#[cfg_attr( feature = "derive_serde", serde(rename = "FndDtls", skip_serializing_if = "Option::is_none") )]
41983	pub fnd_dtls: Option<FinancialInstrument96>,
41984	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnDealgChrtcs", skip_serializing_if = "Option::is_none") )]
41985	pub valtn_dealg_chrtcs: Option<ValuationDealingProcessingCharacteristics3>,
41986	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtRstrctns", skip_serializing_if = "Option::is_none") )]
41987	pub invstmt_rstrctns: Option<InvestmentRestrictions3>,
41988	#[cfg_attr( feature = "derive_serde", serde(rename = "SbcptPrcgChrtcs", skip_serializing_if = "Option::is_none") )]
41989	pub sbcpt_prcg_chrtcs: Option<ProcessingCharacteristics11>,
41990	#[cfg_attr( feature = "derive_serde", serde(rename = "RedPrcgChrtcs", skip_serializing_if = "Option::is_none") )]
41991	pub red_prcg_chrtcs: Option<ProcessingCharacteristics12>,
41992	#[cfg_attr( feature = "derive_serde", serde(rename = "SwtchPrcgChrtcs", skip_serializing_if = "Option::is_none") )]
41993	pub swtch_prcg_chrtcs: Option<ProcessingCharacteristics9>,
41994	#[cfg_attr( feature = "derive_serde", serde(rename = "PlanChrtcs", skip_serializing_if = "Option::is_none") )]
41995	pub plan_chrtcs: Option<Vec<InvestmentPlanCharacteristics1>>,
41996	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInstrm", skip_serializing_if = "Option::is_none") )]
41997	pub pmt_instrm: Option<Vec<PaymentInstrument16>>,
41998	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSttlmDtls", skip_serializing_if = "Option::is_none") )]
41999	pub csh_sttlm_dtls: Option<Vec<CashAccount205>>,
42000	#[cfg_attr( feature = "derive_serde", serde(rename = "LclMktAnx", skip_serializing_if = "Option::is_none") )]
42001	pub lcl_mkt_anx: Option<Vec<LocalMarketAnnex6>>,
42002	#[cfg_attr( feature = "derive_serde", serde(rename = "TrgtMkt", skip_serializing_if = "Option::is_none") )]
42003	pub trgt_mkt: Option<TargetMarket4>,
42004	#[cfg_attr( feature = "derive_serde", serde(rename = "DstrbtnStrtgy", skip_serializing_if = "Option::is_none") )]
42005	pub dstrbtn_strtgy: Option<DistributionStrategy1>,
42006	#[cfg_attr( feature = "derive_serde", serde(rename = "CostsAndChrgs", skip_serializing_if = "Option::is_none") )]
42007	pub costs_and_chrgs: Option<Vec<CostsAndCharges2>>,
42008	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInfUKMkt", skip_serializing_if = "Option::is_none") )]
42009	pub addtl_inf_uk_mkt: Option<AdditionalProductInformation3>,
42010	#[cfg_attr( feature = "derive_serde", serde(rename = "ValForMny", skip_serializing_if = "Option::is_none") )]
42011	pub val_for_mny: Option<ValueForMoney1>,
42012	#[cfg_attr( feature = "derive_serde", serde(rename = "Xtnsn", skip_serializing_if = "Option::is_none") )]
42013	pub xtnsn: Option<Vec<Extension1>>,
42014}
42015
42016impl FundReferenceDataReport5 {
42017	pub fn validate(&self) -> Result<(), ValidationError> {
42018		if let Some(ref val) = self.id {
42019			if val.chars().count() < 1 {
42020				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
42021			}
42022			if val.chars().count() > 35 {
42023				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
42024			}
42025		}
42026		if let Some(ref val) = self.vrsn { val.validate()? }
42027		if let Some(ref val) = self.authrsd_prxy { val.validate()? }
42028		self.scty_id.validate()?;
42029		if let Some(ref val) = self.fnd_pties { val.validate()? }
42030		if let Some(ref val) = self.main_fnd_ordr_dsk { val.validate()? }
42031		if let Some(ref val) = self.fnd_mgmt_cpny { val.validate()? }
42032		if let Some(ref val) = self.fnd_dtls { val.validate()? }
42033		if let Some(ref val) = self.valtn_dealg_chrtcs { val.validate()? }
42034		if let Some(ref val) = self.invstmt_rstrctns { val.validate()? }
42035		if let Some(ref val) = self.sbcpt_prcg_chrtcs { val.validate()? }
42036		if let Some(ref val) = self.red_prcg_chrtcs { val.validate()? }
42037		if let Some(ref val) = self.swtch_prcg_chrtcs { val.validate()? }
42038		if let Some(ref vec) = self.plan_chrtcs { for item in vec { item.validate()? } }
42039		if let Some(ref vec) = self.pmt_instrm { for item in vec { item.validate()? } }
42040		if let Some(ref vec) = self.csh_sttlm_dtls { for item in vec { item.validate()? } }
42041		if let Some(ref vec) = self.lcl_mkt_anx { for item in vec { item.validate()? } }
42042		if let Some(ref val) = self.trgt_mkt { val.validate()? }
42043		if let Some(ref val) = self.dstrbtn_strtgy { val.validate()? }
42044		if let Some(ref vec) = self.costs_and_chrgs { for item in vec { item.validate()? } }
42045		if let Some(ref val) = self.addtl_inf_uk_mkt { val.validate()? }
42046		if let Some(ref val) = self.val_for_mny { val.validate()? }
42047		if let Some(ref vec) = self.xtnsn { for item in vec { item.validate()? } }
42048		Ok(())
42049	}
42050}
42051
42052
42053// FundType2Code ...
42054#[cfg_attr(feature = "derive_debug", derive(Debug))]
42055#[cfg_attr(feature = "derive_default", derive(Default))]
42056#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42057#[cfg_attr(feature = "derive_clone", derive(Clone))]
42058#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42059pub enum FundType2Code {
42060	#[cfg_attr(feature = "derive_default", default)]
42061	#[cfg_attr( feature = "derive_serde", serde(rename = "ETFT") )]
42062	CodeETFT,
42063	#[cfg_attr( feature = "derive_serde", serde(rename = "MMFT") )]
42064	CodeMMFT,
42065	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
42066	CodeOTHR,
42067	#[cfg_attr( feature = "derive_serde", serde(rename = "REIT") )]
42068	CodeREIT,
42069}
42070
42071impl FundType2Code {
42072	pub fn validate(&self) -> Result<(), ValidationError> {
42073		Ok(())
42074	}
42075}
42076
42077
42078// FundingSource3 ...
42079#[cfg_attr(feature = "derive_debug", derive(Debug))]
42080#[cfg_attr(feature = "derive_default", derive(Default))]
42081#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42082#[cfg_attr(feature = "derive_clone", derive(Clone))]
42083#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42084pub struct FundingSource3 {
42085	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
42086	pub tp: FundingSourceType1Code,
42087	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal") )]
42088	pub mkt_val: AmountAndDirection53,
42089}
42090
42091impl FundingSource3 {
42092	pub fn validate(&self) -> Result<(), ValidationError> {
42093		self.tp.validate()?;
42094		self.mkt_val.validate()?;
42095		Ok(())
42096	}
42097}
42098
42099
42100// FundingSourceType1Code ...
42101#[cfg_attr(feature = "derive_debug", derive(Debug))]
42102#[cfg_attr(feature = "derive_default", derive(Default))]
42103#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42104#[cfg_attr(feature = "derive_clone", derive(Clone))]
42105#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42106pub enum FundingSourceType1Code {
42107	#[cfg_attr(feature = "derive_default", default)]
42108	#[cfg_attr( feature = "derive_serde", serde(rename = "SECL") )]
42109	CodeSECL,
42110	#[cfg_attr( feature = "derive_serde", serde(rename = "FREE") )]
42111	CodeFREE,
42112	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
42113	CodeOTHR,
42114	#[cfg_attr( feature = "derive_serde", serde(rename = "BSHS") )]
42115	CodeBSHS,
42116	#[cfg_attr( feature = "derive_serde", serde(rename = "CSHS") )]
42117	CodeCSHS,
42118	#[cfg_attr( feature = "derive_serde", serde(rename = "REPO") )]
42119	CodeREPO,
42120	#[cfg_attr( feature = "derive_serde", serde(rename = "UBOR") )]
42121	CodeUBOR,
42122}
42123
42124impl FundingSourceType1Code {
42125	pub fn validate(&self) -> Result<(), ValidationError> {
42126		Ok(())
42127	}
42128}
42129
42130
42131// Future4 ...
42132#[cfg_attr(feature = "derive_debug", derive(Debug))]
42133#[cfg_attr(feature = "derive_default", derive(Default))]
42134#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42135#[cfg_attr(feature = "derive_clone", derive(Clone))]
42136#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42137pub struct Future4 {
42138	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctSz", skip_serializing_if = "Option::is_none") )]
42139	pub ctrct_sz: Option<f64>,
42140	#[cfg_attr( feature = "derive_serde", serde(rename = "ExrcPric", skip_serializing_if = "Option::is_none") )]
42141	pub exrc_pric: Option<Price8>,
42142	#[cfg_attr( feature = "derive_serde", serde(rename = "FutrDt", skip_serializing_if = "Option::is_none") )]
42143	pub futr_dt: Option<String>,
42144	#[cfg_attr( feature = "derive_serde", serde(rename = "MinSz", skip_serializing_if = "Option::is_none") )]
42145	pub min_sz: Option<ActiveCurrencyAndAmount>,
42146	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitOfMeasr", skip_serializing_if = "Option::is_none") )]
42147	pub unit_of_measr: Option<UnitOfMeasure7Choice>,
42148	#[cfg_attr( feature = "derive_serde", serde(rename = "TmUnit", skip_serializing_if = "Option::is_none") )]
42149	pub tm_unit: Option<TimeUnit3Choice>,
42150	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlUndrlygAttrbts", skip_serializing_if = "Option::is_none") )]
42151	pub addtl_undrlyg_attrbts: Option<Vec<UnderlyingAttributes4>>,
42152}
42153
42154impl Future4 {
42155	pub fn validate(&self) -> Result<(), ValidationError> {
42156		if let Some(ref val) = self.exrc_pric { val.validate()? }
42157		if let Some(ref val) = self.min_sz { val.validate()? }
42158		if let Some(ref val) = self.unit_of_measr { val.validate()? }
42159		if let Some(ref val) = self.tm_unit { val.validate()? }
42160		if let Some(ref vec) = self.addtl_undrlyg_attrbts { for item in vec { item.validate()? } }
42161		Ok(())
42162	}
42163}
42164
42165
42166// GDPRData1 ...
42167#[cfg_attr(feature = "derive_debug", derive(Debug))]
42168#[cfg_attr(feature = "derive_default", derive(Default))]
42169#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42170#[cfg_attr(feature = "derive_clone", derive(Clone))]
42171#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42172pub struct GDPRData1 {
42173	#[cfg_attr( feature = "derive_serde", serde(rename = "CnsntTp") )]
42174	pub cnsnt_tp: GDPRDataConsent1Choice,
42175	#[cfg_attr( feature = "derive_serde", serde(rename = "CnsntInd") )]
42176	pub cnsnt_ind: bool,
42177	#[cfg_attr( feature = "derive_serde", serde(rename = "CnsntDt") )]
42178	pub cnsnt_dt: String,
42179}
42180
42181impl GDPRData1 {
42182	pub fn validate(&self) -> Result<(), ValidationError> {
42183		self.cnsnt_tp.validate()?;
42184		Ok(())
42185	}
42186}
42187
42188
42189// GDPRDataConsent1Choice ...
42190#[cfg_attr(feature = "derive_debug", derive(Debug))]
42191#[cfg_attr(feature = "derive_default", derive(Default))]
42192#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42193#[cfg_attr(feature = "derive_clone", derive(Clone))]
42194#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42195pub struct GDPRDataConsent1Choice {
42196	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
42197	pub cd: Option<GDPRDataConsent1Code>,
42198	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
42199	pub prtry: Option<GenericIdentification47>,
42200}
42201
42202impl GDPRDataConsent1Choice {
42203	pub fn validate(&self) -> Result<(), ValidationError> {
42204		if let Some(ref val) = self.cd { val.validate()? }
42205		if let Some(ref val) = self.prtry { val.validate()? }
42206		Ok(())
42207	}
42208}
42209
42210
42211// GDPRDataConsent1Code ...
42212#[cfg_attr(feature = "derive_debug", derive(Debug))]
42213#[cfg_attr(feature = "derive_default", derive(Default))]
42214#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42215#[cfg_attr(feature = "derive_clone", derive(Clone))]
42216#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42217pub enum GDPRDataConsent1Code {
42218	#[cfg_attr(feature = "derive_default", default)]
42219	#[cfg_attr( feature = "derive_serde", serde(rename = "DP00") )]
42220	CodeDP00,
42221	#[cfg_attr( feature = "derive_serde", serde(rename = "DP03") )]
42222	CodeDP03,
42223	#[cfg_attr( feature = "derive_serde", serde(rename = "DP01") )]
42224	CodeDP01,
42225	#[cfg_attr( feature = "derive_serde", serde(rename = "DP02") )]
42226	CodeDP02,
42227}
42228
42229impl GDPRDataConsent1Code {
42230	pub fn validate(&self) -> Result<(), ValidationError> {
42231		Ok(())
42232	}
42233}
42234
42235
42236// Garnishment3 ...
42237#[cfg_attr(feature = "derive_debug", derive(Debug))]
42238#[cfg_attr(feature = "derive_default", derive(Default))]
42239#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42240#[cfg_attr(feature = "derive_clone", derive(Clone))]
42241#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42242pub struct Garnishment3 {
42243	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
42244	pub tp: GarnishmentType1,
42245	#[cfg_attr( feature = "derive_serde", serde(rename = "Grnshee", skip_serializing_if = "Option::is_none") )]
42246	pub grnshee: Option<PartyIdentification135>,
42247	#[cfg_attr( feature = "derive_serde", serde(rename = "GrnshmtAdmstr", skip_serializing_if = "Option::is_none") )]
42248	pub grnshmt_admstr: Option<PartyIdentification135>,
42249	#[cfg_attr( feature = "derive_serde", serde(rename = "RefNb", skip_serializing_if = "Option::is_none") )]
42250	pub ref_nb: Option<String>,
42251	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
42252	pub dt: Option<String>,
42253	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtdAmt", skip_serializing_if = "Option::is_none") )]
42254	pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
42255	#[cfg_attr( feature = "derive_serde", serde(rename = "FmlyMdclInsrncInd", skip_serializing_if = "Option::is_none") )]
42256	pub fmly_mdcl_insrnc_ind: Option<bool>,
42257	#[cfg_attr( feature = "derive_serde", serde(rename = "MplyeeTermntnInd", skip_serializing_if = "Option::is_none") )]
42258	pub mplyee_termntn_ind: Option<bool>,
42259}
42260
42261impl Garnishment3 {
42262	pub fn validate(&self) -> Result<(), ValidationError> {
42263		self.tp.validate()?;
42264		if let Some(ref val) = self.grnshee { val.validate()? }
42265		if let Some(ref val) = self.grnshmt_admstr { val.validate()? }
42266		if let Some(ref val) = self.ref_nb {
42267			if val.chars().count() < 1 {
42268				return Err(ValidationError::new(1001, "ref_nb is shorter than the minimum length of 1".to_string()));
42269			}
42270			if val.chars().count() > 140 {
42271				return Err(ValidationError::new(1002, "ref_nb exceeds the maximum length of 140".to_string()));
42272			}
42273		}
42274		if let Some(ref val) = self.rmtd_amt { val.validate()? }
42275		Ok(())
42276	}
42277}
42278
42279
42280// Garnishment4 ...
42281#[cfg_attr(feature = "derive_debug", derive(Debug))]
42282#[cfg_attr(feature = "derive_default", derive(Default))]
42283#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42284#[cfg_attr(feature = "derive_clone", derive(Clone))]
42285#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42286pub struct Garnishment4 {
42287	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
42288	pub tp: GarnishmentType1,
42289	#[cfg_attr( feature = "derive_serde", serde(rename = "Grnshee", skip_serializing_if = "Option::is_none") )]
42290	pub grnshee: Option<PartyIdentification272>,
42291	#[cfg_attr( feature = "derive_serde", serde(rename = "GrnshmtAdmstr", skip_serializing_if = "Option::is_none") )]
42292	pub grnshmt_admstr: Option<PartyIdentification272>,
42293	#[cfg_attr( feature = "derive_serde", serde(rename = "RefNb", skip_serializing_if = "Option::is_none") )]
42294	pub ref_nb: Option<String>,
42295	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
42296	pub dt: Option<String>,
42297	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtdAmt", skip_serializing_if = "Option::is_none") )]
42298	pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
42299	#[cfg_attr( feature = "derive_serde", serde(rename = "FmlyMdclInsrncInd", skip_serializing_if = "Option::is_none") )]
42300	pub fmly_mdcl_insrnc_ind: Option<bool>,
42301	#[cfg_attr( feature = "derive_serde", serde(rename = "MplyeeTermntnInd", skip_serializing_if = "Option::is_none") )]
42302	pub mplyee_termntn_ind: Option<bool>,
42303}
42304
42305impl Garnishment4 {
42306	pub fn validate(&self) -> Result<(), ValidationError> {
42307		self.tp.validate()?;
42308		if let Some(ref val) = self.grnshee { val.validate()? }
42309		if let Some(ref val) = self.grnshmt_admstr { val.validate()? }
42310		if let Some(ref val) = self.ref_nb {
42311			if val.chars().count() < 1 {
42312				return Err(ValidationError::new(1001, "ref_nb is shorter than the minimum length of 1".to_string()));
42313			}
42314			if val.chars().count() > 140 {
42315				return Err(ValidationError::new(1002, "ref_nb exceeds the maximum length of 140".to_string()));
42316			}
42317		}
42318		if let Some(ref val) = self.rmtd_amt { val.validate()? }
42319		Ok(())
42320	}
42321}
42322
42323
42324// GarnishmentType1 ...
42325#[cfg_attr(feature = "derive_debug", derive(Debug))]
42326#[cfg_attr(feature = "derive_default", derive(Default))]
42327#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42328#[cfg_attr(feature = "derive_clone", derive(Clone))]
42329#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42330pub struct GarnishmentType1 {
42331	#[cfg_attr( feature = "derive_serde", serde(rename = "CdOrPrtry") )]
42332	pub cd_or_prtry: GarnishmentType1Choice,
42333	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
42334	pub issr: Option<String>,
42335}
42336
42337impl GarnishmentType1 {
42338	pub fn validate(&self) -> Result<(), ValidationError> {
42339		self.cd_or_prtry.validate()?;
42340		if let Some(ref val) = self.issr {
42341			if val.chars().count() < 1 {
42342				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
42343			}
42344			if val.chars().count() > 35 {
42345				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
42346			}
42347		}
42348		Ok(())
42349	}
42350}
42351
42352
42353// GarnishmentType1Choice ...
42354#[cfg_attr(feature = "derive_debug", derive(Debug))]
42355#[cfg_attr(feature = "derive_default", derive(Default))]
42356#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42357#[cfg_attr(feature = "derive_clone", derive(Clone))]
42358#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42359pub struct GarnishmentType1Choice {
42360	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
42361	pub cd: Option<String>,
42362	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
42363	pub prtry: Option<String>,
42364}
42365
42366impl GarnishmentType1Choice {
42367	pub fn validate(&self) -> Result<(), ValidationError> {
42368		if let Some(ref val) = self.cd {
42369			if val.chars().count() < 1 {
42370				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
42371			}
42372			if val.chars().count() > 4 {
42373				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
42374			}
42375		}
42376		if let Some(ref val) = self.prtry {
42377			if val.chars().count() < 1 {
42378				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
42379			}
42380			if val.chars().count() > 35 {
42381				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
42382			}
42383		}
42384		Ok(())
42385	}
42386}
42387
42388
42389// Gender1Code ...
42390#[cfg_attr(feature = "derive_debug", derive(Debug))]
42391#[cfg_attr(feature = "derive_default", derive(Default))]
42392#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42393#[cfg_attr(feature = "derive_clone", derive(Clone))]
42394#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42395pub enum Gender1Code {
42396	#[cfg_attr(feature = "derive_default", default)]
42397	#[cfg_attr( feature = "derive_serde", serde(rename = "FEMA") )]
42398	CodeFEMA,
42399	#[cfg_attr( feature = "derive_serde", serde(rename = "MALE") )]
42400	CodeMALE,
42401}
42402
42403impl Gender1Code {
42404	pub fn validate(&self) -> Result<(), ValidationError> {
42405		Ok(())
42406	}
42407}
42408
42409
42410// GenderCode ...
42411#[cfg_attr(feature = "derive_debug", derive(Debug))]
42412#[cfg_attr(feature = "derive_default", derive(Default))]
42413#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42414#[cfg_attr(feature = "derive_clone", derive(Clone))]
42415#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42416pub enum GenderCode {
42417	#[cfg_attr(feature = "derive_default", default)]
42418	#[cfg_attr( feature = "derive_serde", serde(rename = "MALE") )]
42419	CodeMALE,
42420	#[cfg_attr( feature = "derive_serde", serde(rename = "FEMA") )]
42421	CodeFEMA,
42422}
42423
42424impl GenderCode {
42425	pub fn validate(&self) -> Result<(), ValidationError> {
42426		Ok(())
42427	}
42428}
42429
42430
42431// GeneralBusinessInformation1 ...
42432#[cfg_attr(feature = "derive_debug", derive(Debug))]
42433#[cfg_attr(feature = "derive_default", derive(Default))]
42434#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42435#[cfg_attr(feature = "derive_clone", derive(Clone))]
42436#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42437pub struct GeneralBusinessInformation1 {
42438	#[cfg_attr( feature = "derive_serde", serde(rename = "Qlfr", skip_serializing_if = "Option::is_none") )]
42439	pub qlfr: Option<InformationQualifierType1>,
42440	#[cfg_attr( feature = "derive_serde", serde(rename = "Sbjt", skip_serializing_if = "Option::is_none") )]
42441	pub sbjt: Option<String>,
42442	#[cfg_attr( feature = "derive_serde", serde(rename = "SbjtDtls", skip_serializing_if = "Option::is_none") )]
42443	pub sbjt_dtls: Option<String>,
42444}
42445
42446impl GeneralBusinessInformation1 {
42447	pub fn validate(&self) -> Result<(), ValidationError> {
42448		if let Some(ref val) = self.qlfr { val.validate()? }
42449		if let Some(ref val) = self.sbjt {
42450			if val.chars().count() < 1 {
42451				return Err(ValidationError::new(1001, "sbjt is shorter than the minimum length of 1".to_string()));
42452			}
42453			if val.chars().count() > 35 {
42454				return Err(ValidationError::new(1002, "sbjt exceeds the maximum length of 35".to_string()));
42455			}
42456		}
42457		if let Some(ref val) = self.sbjt_dtls {
42458			if val.chars().count() < 1 {
42459				return Err(ValidationError::new(1001, "sbjt_dtls is shorter than the minimum length of 1".to_string()));
42460			}
42461			if val.chars().count() > 350 {
42462				return Err(ValidationError::new(1002, "sbjt_dtls exceeds the maximum length of 350".to_string()));
42463			}
42464		}
42465		Ok(())
42466	}
42467}
42468
42469
42470// GeneralBusinessInformationCriteriaDefinition1Choice ...
42471#[cfg_attr(feature = "derive_debug", derive(Debug))]
42472#[cfg_attr(feature = "derive_default", derive(Default))]
42473#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42474#[cfg_attr(feature = "derive_clone", derive(Clone))]
42475#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42476pub struct GeneralBusinessInformationCriteriaDefinition1Choice {
42477	#[cfg_attr( feature = "derive_serde", serde(rename = "QryNm", skip_serializing_if = "Option::is_none") )]
42478	pub qry_nm: Option<String>,
42479	#[cfg_attr( feature = "derive_serde", serde(rename = "NewCrit", skip_serializing_if = "Option::is_none") )]
42480	pub new_crit: Option<BusinessInformationCriteria1>,
42481}
42482
42483impl GeneralBusinessInformationCriteriaDefinition1Choice {
42484	pub fn validate(&self) -> Result<(), ValidationError> {
42485		if let Some(ref val) = self.qry_nm {
42486			if val.chars().count() < 1 {
42487				return Err(ValidationError::new(1001, "qry_nm is shorter than the minimum length of 1".to_string()));
42488			}
42489			if val.chars().count() > 35 {
42490				return Err(ValidationError::new(1002, "qry_nm exceeds the maximum length of 35".to_string()));
42491			}
42492		}
42493		if let Some(ref val) = self.new_crit { val.validate()? }
42494		Ok(())
42495	}
42496}
42497
42498
42499// GeneralBusinessInformationReturnCriteria1 ...
42500#[cfg_attr(feature = "derive_debug", derive(Debug))]
42501#[cfg_attr(feature = "derive_default", derive(Default))]
42502#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42503#[cfg_attr(feature = "derive_clone", derive(Clone))]
42504#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42505pub struct GeneralBusinessInformationReturnCriteria1 {
42506	#[cfg_attr( feature = "derive_serde", serde(rename = "QlfrInd", skip_serializing_if = "Option::is_none") )]
42507	pub qlfr_ind: Option<bool>,
42508	#[cfg_attr( feature = "derive_serde", serde(rename = "SbjtInd", skip_serializing_if = "Option::is_none") )]
42509	pub sbjt_ind: Option<bool>,
42510	#[cfg_attr( feature = "derive_serde", serde(rename = "SbjtDtlsInd", skip_serializing_if = "Option::is_none") )]
42511	pub sbjt_dtls_ind: Option<bool>,
42512}
42513
42514impl GeneralBusinessInformationReturnCriteria1 {
42515	pub fn validate(&self) -> Result<(), ValidationError> {
42516		Ok(())
42517	}
42518}
42519
42520
42521// GeneralBusinessInformationSearchCriteria1 ...
42522#[cfg_attr(feature = "derive_debug", derive(Debug))]
42523#[cfg_attr(feature = "derive_default", derive(Default))]
42524#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42525#[cfg_attr(feature = "derive_clone", derive(Clone))]
42526#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42527pub struct GeneralBusinessInformationSearchCriteria1 {
42528	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref", skip_serializing_if = "Option::is_none") )]
42529	pub ref_attr: Option<Vec<String>>,
42530	#[cfg_attr( feature = "derive_serde", serde(rename = "Sbjt", skip_serializing_if = "Option::is_none") )]
42531	pub sbjt: Option<Vec<CharacterSearch1Choice>>,
42532	#[cfg_attr( feature = "derive_serde", serde(rename = "Qlfr", skip_serializing_if = "Option::is_none") )]
42533	pub qlfr: Option<Vec<InformationQualifierType1>>,
42534}
42535
42536impl GeneralBusinessInformationSearchCriteria1 {
42537	pub fn validate(&self) -> Result<(), ValidationError> {
42538		if let Some(ref vec) = self.ref_attr {
42539			for item in vec {
42540				if item.chars().count() < 1 {
42541					return Err(ValidationError::new(1001, "ref_attr is shorter than the minimum length of 1".to_string()));
42542				}
42543				if item.chars().count() > 35 {
42544					return Err(ValidationError::new(1002, "ref_attr exceeds the maximum length of 35".to_string()));
42545				}
42546			}
42547		}
42548		if let Some(ref vec) = self.sbjt { for item in vec { item.validate()? } }
42549		if let Some(ref vec) = self.qlfr { for item in vec { item.validate()? } }
42550		Ok(())
42551	}
42552}
42553
42554
42555// GeneralBusinessOrError7Choice ...
42556#[cfg_attr(feature = "derive_debug", derive(Debug))]
42557#[cfg_attr(feature = "derive_default", derive(Default))]
42558#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42559#[cfg_attr(feature = "derive_clone", derive(Clone))]
42560#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42561pub struct GeneralBusinessOrError7Choice {
42562	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
42563	pub oprl_err: Option<Vec<ErrorHandling5>>,
42564	#[cfg_attr( feature = "derive_serde", serde(rename = "BizRpt", skip_serializing_if = "Option::is_none") )]
42565	pub biz_rpt: Option<Vec<GeneralBusinessReport6>>,
42566}
42567
42568impl GeneralBusinessOrError7Choice {
42569	pub fn validate(&self) -> Result<(), ValidationError> {
42570		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
42571		if let Some(ref vec) = self.biz_rpt { for item in vec { item.validate()? } }
42572		Ok(())
42573	}
42574}
42575
42576
42577// GeneralBusinessOrError8Choice ...
42578#[cfg_attr(feature = "derive_debug", derive(Debug))]
42579#[cfg_attr(feature = "derive_default", derive(Default))]
42580#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42581#[cfg_attr(feature = "derive_clone", derive(Clone))]
42582#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42583pub struct GeneralBusinessOrError8Choice {
42584	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
42585	pub biz_err: Option<Vec<ErrorHandling5>>,
42586	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlBiz", skip_serializing_if = "Option::is_none") )]
42587	pub gnl_biz: Option<GeneralBusinessInformation1>,
42588}
42589
42590impl GeneralBusinessOrError8Choice {
42591	pub fn validate(&self) -> Result<(), ValidationError> {
42592		if let Some(ref vec) = self.biz_err { for item in vec { item.validate()? } }
42593		if let Some(ref val) = self.gnl_biz { val.validate()? }
42594		Ok(())
42595	}
42596}
42597
42598
42599// GeneralBusinessReport6 ...
42600#[cfg_attr(feature = "derive_debug", derive(Debug))]
42601#[cfg_attr(feature = "derive_default", derive(Default))]
42602#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42603#[cfg_attr(feature = "derive_clone", derive(Clone))]
42604#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42605pub struct GeneralBusinessReport6 {
42606	#[cfg_attr( feature = "derive_serde", serde(rename = "BizInfRef") )]
42607	pub biz_inf_ref: String,
42608	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlBizOrErr") )]
42609	pub gnl_biz_or_err: GeneralBusinessOrError8Choice,
42610}
42611
42612impl GeneralBusinessReport6 {
42613	pub fn validate(&self) -> Result<(), ValidationError> {
42614		if self.biz_inf_ref.chars().count() < 1 {
42615			return Err(ValidationError::new(1001, "biz_inf_ref is shorter than the minimum length of 1".to_string()));
42616		}
42617		if self.biz_inf_ref.chars().count() > 35 {
42618			return Err(ValidationError::new(1002, "biz_inf_ref exceeds the maximum length of 35".to_string()));
42619		}
42620		self.gnl_biz_or_err.validate()?;
42621		Ok(())
42622	}
42623}
42624
42625
42626// GeneralCollateral2 ...
42627#[cfg_attr(feature = "derive_debug", derive(Debug))]
42628#[cfg_attr(feature = "derive_default", derive(Default))]
42629#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42630#[cfg_attr(feature = "derive_clone", derive(Clone))]
42631#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42632pub struct GeneralCollateral2 {
42633	#[cfg_attr( feature = "derive_serde", serde(rename = "ElgblFinInstrmId") )]
42634	pub elgbl_fin_instrm_id: Vec<String>,
42635}
42636
42637impl GeneralCollateral2 {
42638	pub fn validate(&self) -> Result<(), ValidationError> {
42639		for item in &self.elgbl_fin_instrm_id {
42640			if item.chars().count() < 1 {
42641				return Err(ValidationError::new(1001, "elgbl_fin_instrm_id is shorter than the minimum length of 1".to_string()));
42642			}
42643			if item.chars().count() > 35 {
42644				return Err(ValidationError::new(1002, "elgbl_fin_instrm_id exceeds the maximum length of 35".to_string()));
42645			}
42646		}
42647		Ok(())
42648	}
42649}
42650
42651
42652// GeneralCollateral3 ...
42653#[cfg_attr(feature = "derive_debug", derive(Debug))]
42654#[cfg_attr(feature = "derive_default", derive(Default))]
42655#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42656#[cfg_attr(feature = "derive_clone", derive(Clone))]
42657#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42658pub struct GeneralCollateral3 {
42659	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId", skip_serializing_if = "Option::is_none") )]
42660	pub fin_instrm_id: Option<Vec<FinancialInstrument59>>,
42661	#[cfg_attr( feature = "derive_serde", serde(rename = "ElgblFinInstrmId", skip_serializing_if = "Option::is_none") )]
42662	pub elgbl_fin_instrm_id: Option<Vec<String>>,
42663}
42664
42665impl GeneralCollateral3 {
42666	pub fn validate(&self) -> Result<(), ValidationError> {
42667		if let Some(ref vec) = self.fin_instrm_id { for item in vec { item.validate()? } }
42668		if let Some(ref vec) = self.elgbl_fin_instrm_id {
42669			for item in vec {
42670				let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
42671				if !pattern.is_match(&item) {
42672					return Err(ValidationError::new(1005, "elgbl_fin_instrm_id does not match the required pattern".to_string()));
42673				}
42674			}
42675		}
42676		Ok(())
42677	}
42678}
42679
42680
42681// GeneralCollateral4 ...
42682#[cfg_attr(feature = "derive_debug", derive(Debug))]
42683#[cfg_attr(feature = "derive_default", derive(Default))]
42684#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42685#[cfg_attr(feature = "derive_clone", derive(Clone))]
42686#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42687pub struct GeneralCollateral4 {
42688	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId", skip_serializing_if = "Option::is_none") )]
42689	pub fin_instrm_id: Option<Vec<FinancialInstrument104>>,
42690	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal") )]
42691	pub mkt_val: ActiveCurrencyAnd24Amount,
42692}
42693
42694impl GeneralCollateral4 {
42695	pub fn validate(&self) -> Result<(), ValidationError> {
42696		if let Some(ref vec) = self.fin_instrm_id { for item in vec { item.validate()? } }
42697		self.mkt_val.validate()?;
42698		Ok(())
42699	}
42700}
42701
42702
42703// GenericAccountIdentification1 ...
42704#[cfg_attr(feature = "derive_debug", derive(Debug))]
42705#[cfg_attr(feature = "derive_default", derive(Default))]
42706#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42707#[cfg_attr(feature = "derive_clone", derive(Clone))]
42708#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42709pub struct GenericAccountIdentification1 {
42710	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
42711	pub id: String,
42712	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
42713	pub schme_nm: Option<AccountSchemeName1Choice>,
42714	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
42715	pub issr: Option<String>,
42716}
42717
42718impl GenericAccountIdentification1 {
42719	pub fn validate(&self) -> Result<(), ValidationError> {
42720		if self.id.chars().count() < 1 {
42721			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
42722		}
42723		if self.id.chars().count() > 34 {
42724			return Err(ValidationError::new(1002, "id exceeds the maximum length of 34".to_string()));
42725		}
42726		if let Some(ref val) = self.schme_nm { val.validate()? }
42727		if let Some(ref val) = self.issr {
42728			if val.chars().count() < 1 {
42729				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
42730			}
42731			if val.chars().count() > 35 {
42732				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
42733			}
42734		}
42735		Ok(())
42736	}
42737}
42738
42739
42740// GenericFinancialIdentification1 ...
42741#[cfg_attr(feature = "derive_debug", derive(Debug))]
42742#[cfg_attr(feature = "derive_default", derive(Default))]
42743#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42744#[cfg_attr(feature = "derive_clone", derive(Clone))]
42745#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42746pub struct GenericFinancialIdentification1 {
42747	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
42748	pub id: String,
42749	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
42750	pub schme_nm: Option<FinancialIdentificationSchemeName1Choice>,
42751	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
42752	pub issr: Option<String>,
42753}
42754
42755impl GenericFinancialIdentification1 {
42756	pub fn validate(&self) -> Result<(), ValidationError> {
42757		if self.id.chars().count() < 1 {
42758			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
42759		}
42760		if self.id.chars().count() > 35 {
42761			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
42762		}
42763		if let Some(ref val) = self.schme_nm { val.validate()? }
42764		if let Some(ref val) = self.issr {
42765			if val.chars().count() < 1 {
42766				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
42767			}
42768			if val.chars().count() > 35 {
42769				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
42770			}
42771		}
42772		Ok(())
42773	}
42774}
42775
42776
42777// GenericIdentification1 ...
42778#[cfg_attr(feature = "derive_debug", derive(Debug))]
42779#[cfg_attr(feature = "derive_default", derive(Default))]
42780#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42781#[cfg_attr(feature = "derive_clone", derive(Clone))]
42782#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42783pub struct GenericIdentification1 {
42784	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
42785	pub id: String,
42786	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
42787	pub schme_nm: Option<String>,
42788	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
42789	pub issr: Option<String>,
42790}
42791
42792impl GenericIdentification1 {
42793	pub fn validate(&self) -> Result<(), ValidationError> {
42794		if self.id.chars().count() < 1 {
42795			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
42796		}
42797		if self.id.chars().count() > 35 {
42798			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
42799		}
42800		if let Some(ref val) = self.schme_nm {
42801			if val.chars().count() < 1 {
42802				return Err(ValidationError::new(1001, "schme_nm is shorter than the minimum length of 1".to_string()));
42803			}
42804			if val.chars().count() > 35 {
42805				return Err(ValidationError::new(1002, "schme_nm exceeds the maximum length of 35".to_string()));
42806			}
42807		}
42808		if let Some(ref val) = self.issr {
42809			if val.chars().count() < 1 {
42810				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
42811			}
42812			if val.chars().count() > 35 {
42813				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
42814			}
42815		}
42816		Ok(())
42817	}
42818}
42819
42820
42821// GenericIdentification13 ...
42822#[cfg_attr(feature = "derive_debug", derive(Debug))]
42823#[cfg_attr(feature = "derive_default", derive(Default))]
42824#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42825#[cfg_attr(feature = "derive_clone", derive(Clone))]
42826#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42827pub struct GenericIdentification13 {
42828	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
42829	pub id: String,
42830	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
42831	pub schme_nm: Option<String>,
42832	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr") )]
42833	pub issr: String,
42834}
42835
42836impl GenericIdentification13 {
42837	pub fn validate(&self) -> Result<(), ValidationError> {
42838		if self.id.chars().count() < 1 {
42839			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
42840		}
42841		if self.id.chars().count() > 4 {
42842			return Err(ValidationError::new(1002, "id exceeds the maximum length of 4".to_string()));
42843		}
42844		let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
42845		if !pattern.is_match(&self.id) {
42846			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
42847		}
42848		if let Some(ref val) = self.schme_nm {
42849			if val.chars().count() < 1 {
42850				return Err(ValidationError::new(1001, "schme_nm is shorter than the minimum length of 1".to_string()));
42851			}
42852			if val.chars().count() > 35 {
42853				return Err(ValidationError::new(1002, "schme_nm exceeds the maximum length of 35".to_string()));
42854			}
42855		}
42856		if self.issr.chars().count() < 1 {
42857			return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
42858		}
42859		if self.issr.chars().count() > 35 {
42860			return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
42861		}
42862		Ok(())
42863	}
42864}
42865
42866
42867// GenericIdentification165 ...
42868#[cfg_attr(feature = "derive_debug", derive(Debug))]
42869#[cfg_attr(feature = "derive_default", derive(Default))]
42870#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42871#[cfg_attr(feature = "derive_clone", derive(Clone))]
42872#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42873pub struct GenericIdentification165 {
42874	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
42875	pub id: String,
42876	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
42877	pub desc: Option<String>,
42878	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
42879	pub issr: Option<String>,
42880	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
42881	pub schme_nm: Option<SchemeIdentificationType1Code>,
42882}
42883
42884impl GenericIdentification165 {
42885	pub fn validate(&self) -> Result<(), ValidationError> {
42886		if self.id.chars().count() < 1 {
42887			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
42888		}
42889		if self.id.chars().count() > 256 {
42890			return Err(ValidationError::new(1002, "id exceeds the maximum length of 256".to_string()));
42891		}
42892		if let Some(ref val) = self.desc {
42893			if val.chars().count() < 1 {
42894				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
42895			}
42896			if val.chars().count() > 140 {
42897				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 140".to_string()));
42898			}
42899		}
42900		if let Some(ref val) = self.issr {
42901			if val.chars().count() < 1 {
42902				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
42903			}
42904			if val.chars().count() > 35 {
42905				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
42906			}
42907		}
42908		if let Some(ref val) = self.schme_nm { val.validate()? }
42909		Ok(())
42910	}
42911}
42912
42913
42914// GenericIdentification168 ...
42915#[cfg_attr(feature = "derive_debug", derive(Debug))]
42916#[cfg_attr(feature = "derive_default", derive(Default))]
42917#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42918#[cfg_attr(feature = "derive_clone", derive(Clone))]
42919#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42920pub struct GenericIdentification168 {
42921	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
42922	pub id: String,
42923	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
42924	pub desc: Option<String>,
42925	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
42926	pub issr: Option<String>,
42927	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
42928	pub schme_nm: Option<String>,
42929}
42930
42931impl GenericIdentification168 {
42932	pub fn validate(&self) -> Result<(), ValidationError> {
42933		if self.id.chars().count() < 1 {
42934			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
42935		}
42936		if self.id.chars().count() > 256 {
42937			return Err(ValidationError::new(1002, "id exceeds the maximum length of 256".to_string()));
42938		}
42939		if let Some(ref val) = self.desc {
42940			if val.chars().count() < 1 {
42941				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
42942			}
42943			if val.chars().count() > 140 {
42944				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 140".to_string()));
42945			}
42946		}
42947		if let Some(ref val) = self.issr {
42948			if val.chars().count() < 1 {
42949				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
42950			}
42951			if val.chars().count() > 35 {
42952				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
42953			}
42954		}
42955		if let Some(ref val) = self.schme_nm {
42956			if val.chars().count() < 1 {
42957				return Err(ValidationError::new(1001, "schme_nm is shorter than the minimum length of 1".to_string()));
42958			}
42959			if val.chars().count() > 35 {
42960				return Err(ValidationError::new(1002, "schme_nm exceeds the maximum length of 35".to_string()));
42961			}
42962		}
42963		Ok(())
42964	}
42965}
42966
42967
42968// GenericIdentification175 ...
42969#[cfg_attr(feature = "derive_debug", derive(Debug))]
42970#[cfg_attr(feature = "derive_default", derive(Default))]
42971#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
42972#[cfg_attr(feature = "derive_clone", derive(Clone))]
42973#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
42974pub struct GenericIdentification175 {
42975	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
42976	pub id: String,
42977	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
42978	pub schme_nm: Option<String>,
42979	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
42980	pub issr: Option<String>,
42981}
42982
42983impl GenericIdentification175 {
42984	pub fn validate(&self) -> Result<(), ValidationError> {
42985		if self.id.chars().count() < 1 {
42986			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
42987		}
42988		if self.id.chars().count() > 72 {
42989			return Err(ValidationError::new(1002, "id exceeds the maximum length of 72".to_string()));
42990		}
42991		if let Some(ref val) = self.schme_nm {
42992			if val.chars().count() < 1 {
42993				return Err(ValidationError::new(1001, "schme_nm is shorter than the minimum length of 1".to_string()));
42994			}
42995			if val.chars().count() > 35 {
42996				return Err(ValidationError::new(1002, "schme_nm exceeds the maximum length of 35".to_string()));
42997			}
42998		}
42999		if let Some(ref val) = self.issr {
43000			if val.chars().count() < 1 {
43001				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43002			}
43003			if val.chars().count() > 35 {
43004				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
43005			}
43006		}
43007		Ok(())
43008	}
43009}
43010
43011
43012// GenericIdentification179 ...
43013#[cfg_attr(feature = "derive_debug", derive(Debug))]
43014#[cfg_attr(feature = "derive_default", derive(Default))]
43015#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43016#[cfg_attr(feature = "derive_clone", derive(Clone))]
43017#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43018pub struct GenericIdentification179 {
43019	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43020	pub id: String,
43021	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
43022	pub issr: Option<String>,
43023}
43024
43025impl GenericIdentification179 {
43026	pub fn validate(&self) -> Result<(), ValidationError> {
43027		if self.id.chars().count() < 1 {
43028			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43029		}
43030		if self.id.chars().count() > 52 {
43031			return Err(ValidationError::new(1002, "id exceeds the maximum length of 52".to_string()));
43032		}
43033		if let Some(ref val) = self.issr {
43034			if val.chars().count() < 1 {
43035				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43036			}
43037			if val.chars().count() > 35 {
43038				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
43039			}
43040		}
43041		Ok(())
43042	}
43043}
43044
43045
43046// GenericIdentification184 ...
43047#[cfg_attr(feature = "derive_debug", derive(Debug))]
43048#[cfg_attr(feature = "derive_default", derive(Default))]
43049#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43050#[cfg_attr(feature = "derive_clone", derive(Clone))]
43051#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43052pub struct GenericIdentification184 {
43053	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43054	pub id: String,
43055	#[cfg_attr( feature = "derive_serde", serde(rename = "Src") )]
43056	pub src: String,
43057}
43058
43059impl GenericIdentification184 {
43060	pub fn validate(&self) -> Result<(), ValidationError> {
43061		if self.id.chars().count() < 1 {
43062			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43063		}
43064		if self.id.chars().count() > 210 {
43065			return Err(ValidationError::new(1002, "id exceeds the maximum length of 210".to_string()));
43066		}
43067		if self.src.chars().count() < 1 {
43068			return Err(ValidationError::new(1001, "src is shorter than the minimum length of 1".to_string()));
43069		}
43070		if self.src.chars().count() > 100 {
43071			return Err(ValidationError::new(1002, "src exceeds the maximum length of 100".to_string()));
43072		}
43073		Ok(())
43074	}
43075}
43076
43077
43078// GenericIdentification185 ...
43079#[cfg_attr(feature = "derive_debug", derive(Debug))]
43080#[cfg_attr(feature = "derive_default", derive(Default))]
43081#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43082#[cfg_attr(feature = "derive_clone", derive(Clone))]
43083#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43084pub struct GenericIdentification185 {
43085	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43086	pub id: String,
43087	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
43088	pub schme_nm: Option<String>,
43089	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
43090	pub issr: Option<String>,
43091}
43092
43093impl GenericIdentification185 {
43094	pub fn validate(&self) -> Result<(), ValidationError> {
43095		if self.id.chars().count() < 1 {
43096			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43097		}
43098		if self.id.chars().count() > 100 {
43099			return Err(ValidationError::new(1002, "id exceeds the maximum length of 100".to_string()));
43100		}
43101		if let Some(ref val) = self.schme_nm {
43102			if val.chars().count() < 1 {
43103				return Err(ValidationError::new(1001, "schme_nm is shorter than the minimum length of 1".to_string()));
43104			}
43105			if val.chars().count() > 35 {
43106				return Err(ValidationError::new(1002, "schme_nm exceeds the maximum length of 35".to_string()));
43107			}
43108		}
43109		if let Some(ref val) = self.issr {
43110			if val.chars().count() < 1 {
43111				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43112			}
43113			if val.chars().count() > 35 {
43114				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
43115			}
43116		}
43117		Ok(())
43118	}
43119}
43120
43121
43122// GenericIdentification3 ...
43123#[cfg_attr(feature = "derive_debug", derive(Debug))]
43124#[cfg_attr(feature = "derive_default", derive(Default))]
43125#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43126#[cfg_attr(feature = "derive_clone", derive(Clone))]
43127#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43128pub struct GenericIdentification3 {
43129	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43130	pub id: String,
43131	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
43132	pub issr: Option<String>,
43133}
43134
43135impl GenericIdentification3 {
43136	pub fn validate(&self) -> Result<(), ValidationError> {
43137		if self.id.chars().count() < 1 {
43138			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43139		}
43140		if self.id.chars().count() > 35 {
43141			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
43142		}
43143		if let Some(ref val) = self.issr {
43144			if val.chars().count() < 1 {
43145				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43146			}
43147			if val.chars().count() > 35 {
43148				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
43149			}
43150		}
43151		Ok(())
43152	}
43153}
43154
43155
43156// GenericIdentification30 ...
43157#[cfg_attr(feature = "derive_debug", derive(Debug))]
43158#[cfg_attr(feature = "derive_default", derive(Default))]
43159#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43160#[cfg_attr(feature = "derive_clone", derive(Clone))]
43161#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43162pub struct GenericIdentification30 {
43163	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43164	pub id: String,
43165	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr") )]
43166	pub issr: String,
43167	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
43168	pub schme_nm: Option<String>,
43169}
43170
43171impl GenericIdentification30 {
43172	pub fn validate(&self) -> Result<(), ValidationError> {
43173		let pattern = Regex::new("[a-zA-Z0-9]{4}").unwrap();
43174		if !pattern.is_match(&self.id) {
43175			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
43176		}
43177		if self.issr.chars().count() < 1 {
43178			return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43179		}
43180		if self.issr.chars().count() > 35 {
43181			return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
43182		}
43183		if let Some(ref val) = self.schme_nm {
43184			if val.chars().count() < 1 {
43185				return Err(ValidationError::new(1001, "schme_nm is shorter than the minimum length of 1".to_string()));
43186			}
43187			if val.chars().count() > 35 {
43188				return Err(ValidationError::new(1002, "schme_nm exceeds the maximum length of 35".to_string()));
43189			}
43190		}
43191		Ok(())
43192	}
43193}
43194
43195
43196// GenericIdentification32 ...
43197#[cfg_attr(feature = "derive_debug", derive(Debug))]
43198#[cfg_attr(feature = "derive_default", derive(Default))]
43199#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43200#[cfg_attr(feature = "derive_clone", derive(Clone))]
43201#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43202pub struct GenericIdentification32 {
43203	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43204	pub id: String,
43205	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
43206	pub tp: Option<PartyType3Code>,
43207	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
43208	pub issr: Option<PartyType4Code>,
43209	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtNm", skip_serializing_if = "Option::is_none") )]
43210	pub shrt_nm: Option<String>,
43211}
43212
43213impl GenericIdentification32 {
43214	pub fn validate(&self) -> Result<(), ValidationError> {
43215		if self.id.chars().count() < 1 {
43216			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43217		}
43218		if self.id.chars().count() > 35 {
43219			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
43220		}
43221		if let Some(ref val) = self.tp { val.validate()? }
43222		if let Some(ref val) = self.issr { val.validate()? }
43223		if let Some(ref val) = self.shrt_nm {
43224			if val.chars().count() < 1 {
43225				return Err(ValidationError::new(1001, "shrt_nm is shorter than the minimum length of 1".to_string()));
43226			}
43227			if val.chars().count() > 35 {
43228				return Err(ValidationError::new(1002, "shrt_nm exceeds the maximum length of 35".to_string()));
43229			}
43230		}
43231		Ok(())
43232	}
43233}
43234
43235
43236// GenericIdentification36 ...
43237#[cfg_attr(feature = "derive_debug", derive(Debug))]
43238#[cfg_attr(feature = "derive_default", derive(Default))]
43239#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43240#[cfg_attr(feature = "derive_clone", derive(Clone))]
43241#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43242pub struct GenericIdentification36 {
43243	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43244	pub id: String,
43245	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr") )]
43246	pub issr: String,
43247	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
43248	pub schme_nm: Option<String>,
43249}
43250
43251impl GenericIdentification36 {
43252	pub fn validate(&self) -> Result<(), ValidationError> {
43253		if self.id.chars().count() < 1 {
43254			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43255		}
43256		if self.id.chars().count() > 35 {
43257			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
43258		}
43259		if self.issr.chars().count() < 1 {
43260			return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43261		}
43262		if self.issr.chars().count() > 35 {
43263			return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
43264		}
43265		if let Some(ref val) = self.schme_nm {
43266			if val.chars().count() < 1 {
43267				return Err(ValidationError::new(1001, "schme_nm is shorter than the minimum length of 1".to_string()));
43268			}
43269			if val.chars().count() > 35 {
43270				return Err(ValidationError::new(1002, "schme_nm exceeds the maximum length of 35".to_string()));
43271			}
43272		}
43273		Ok(())
43274	}
43275}
43276
43277
43278// GenericIdentification37 ...
43279#[cfg_attr(feature = "derive_debug", derive(Debug))]
43280#[cfg_attr(feature = "derive_default", derive(Default))]
43281#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43282#[cfg_attr(feature = "derive_clone", derive(Clone))]
43283#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43284pub struct GenericIdentification37 {
43285	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43286	pub id: String,
43287	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
43288	pub issr: Option<String>,
43289}
43290
43291impl GenericIdentification37 {
43292	pub fn validate(&self) -> Result<(), ValidationError> {
43293		if self.id.chars().count() < 1 {
43294			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43295		}
43296		if self.id.chars().count() > 35 {
43297			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
43298		}
43299		if let Some(ref val) = self.issr {
43300			if val.chars().count() < 1 {
43301				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43302			}
43303			if val.chars().count() > 35 {
43304				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
43305			}
43306		}
43307		Ok(())
43308	}
43309}
43310
43311
43312// GenericIdentification44 ...
43313#[cfg_attr(feature = "derive_debug", derive(Debug))]
43314#[cfg_attr(feature = "derive_default", derive(Default))]
43315#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43316#[cfg_attr(feature = "derive_clone", derive(Clone))]
43317#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43318pub struct GenericIdentification44 {
43319	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43320	pub id: String,
43321	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
43322	pub tp: OtherIdentification1Choice,
43323	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
43324	pub issr: Option<String>,
43325	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseDt", skip_serializing_if = "Option::is_none") )]
43326	pub isse_dt: Option<String>,
43327	#[cfg_attr( feature = "derive_serde", serde(rename = "XpryDt", skip_serializing_if = "Option::is_none") )]
43328	pub xpry_dt: Option<String>,
43329}
43330
43331impl GenericIdentification44 {
43332	pub fn validate(&self) -> Result<(), ValidationError> {
43333		if self.id.chars().count() < 1 {
43334			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43335		}
43336		if self.id.chars().count() > 35 {
43337			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
43338		}
43339		self.tp.validate()?;
43340		if let Some(ref val) = self.issr {
43341			if val.chars().count() < 1 {
43342				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43343			}
43344			if val.chars().count() > 35 {
43345				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
43346			}
43347		}
43348		Ok(())
43349	}
43350}
43351
43352
43353// GenericIdentification47 ...
43354#[cfg_attr(feature = "derive_debug", derive(Debug))]
43355#[cfg_attr(feature = "derive_default", derive(Default))]
43356#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43357#[cfg_attr(feature = "derive_clone", derive(Clone))]
43358#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43359pub struct GenericIdentification47 {
43360	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43361	pub id: String,
43362	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr") )]
43363	pub issr: String,
43364	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
43365	pub schme_nm: Option<String>,
43366}
43367
43368impl GenericIdentification47 {
43369	pub fn validate(&self) -> Result<(), ValidationError> {
43370		let pattern = Regex::new("[a-zA-Z0-9]{4}").unwrap();
43371		if !pattern.is_match(&self.id) {
43372			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
43373		}
43374		if self.issr.chars().count() < 1 {
43375			return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43376		}
43377		if self.issr.chars().count() > 4 {
43378			return Err(ValidationError::new(1002, "issr exceeds the maximum length of 4".to_string()));
43379		}
43380		let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
43381		if !pattern.is_match(&self.issr) {
43382			return Err(ValidationError::new(1005, "issr does not match the required pattern".to_string()));
43383		}
43384		if let Some(ref val) = self.schme_nm {
43385			if val.chars().count() < 1 {
43386				return Err(ValidationError::new(1001, "schme_nm is shorter than the minimum length of 1".to_string()));
43387			}
43388			if val.chars().count() > 4 {
43389				return Err(ValidationError::new(1002, "schme_nm exceeds the maximum length of 4".to_string()));
43390			}
43391			let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
43392			if !pattern.is_match(val) {
43393				return Err(ValidationError::new(1005, "schme_nm does not match the required pattern".to_string()));
43394			}
43395		}
43396		Ok(())
43397	}
43398}
43399
43400
43401// GenericIdentification49 ...
43402#[cfg_attr(feature = "derive_debug", derive(Debug))]
43403#[cfg_attr(feature = "derive_default", derive(Default))]
43404#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43405#[cfg_attr(feature = "derive_clone", derive(Clone))]
43406#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43407pub struct GenericIdentification49 {
43408	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43409	pub id: String,
43410	#[cfg_attr( feature = "derive_serde", serde(rename = "IdTp") )]
43411	pub id_tp: String,
43412}
43413
43414impl GenericIdentification49 {
43415	pub fn validate(&self) -> Result<(), ValidationError> {
43416		if self.id.chars().count() < 1 {
43417			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43418		}
43419		if self.id.chars().count() > 35 {
43420			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
43421		}
43422		if self.id_tp.chars().count() < 1 {
43423			return Err(ValidationError::new(1001, "id_tp is shorter than the minimum length of 1".to_string()));
43424		}
43425		if self.id_tp.chars().count() > 35 {
43426			return Err(ValidationError::new(1002, "id_tp exceeds the maximum length of 35".to_string()));
43427		}
43428		Ok(())
43429	}
43430}
43431
43432
43433// GenericIdentification81 ...
43434#[cfg_attr(feature = "derive_debug", derive(Debug))]
43435#[cfg_attr(feature = "derive_default", derive(Default))]
43436#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43437#[cfg_attr(feature = "derive_clone", derive(Clone))]
43438#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43439pub struct GenericIdentification81 {
43440	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43441	pub id: String,
43442	#[cfg_attr( feature = "derive_serde", serde(rename = "IdTp") )]
43443	pub id_tp: OtherIdentification3Choice,
43444}
43445
43446impl GenericIdentification81 {
43447	pub fn validate(&self) -> Result<(), ValidationError> {
43448		if self.id.chars().count() < 1 {
43449			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43450		}
43451		if self.id.chars().count() > 35 {
43452			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
43453		}
43454		self.id_tp.validate()?;
43455		Ok(())
43456	}
43457}
43458
43459
43460// GenericIdentification82 ...
43461#[cfg_attr(feature = "derive_debug", derive(Debug))]
43462#[cfg_attr(feature = "derive_default", derive(Default))]
43463#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43464#[cfg_attr(feature = "derive_clone", derive(Clone))]
43465#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43466pub struct GenericIdentification82 {
43467	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43468	pub id: String,
43469	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
43470	pub tp: OtherIdentification3Choice,
43471	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
43472	pub issr: Option<String>,
43473	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseDt", skip_serializing_if = "Option::is_none") )]
43474	pub isse_dt: Option<String>,
43475	#[cfg_attr( feature = "derive_serde", serde(rename = "XpryDt", skip_serializing_if = "Option::is_none") )]
43476	pub xpry_dt: Option<String>,
43477	#[cfg_attr( feature = "derive_serde", serde(rename = "Stat", skip_serializing_if = "Option::is_none") )]
43478	pub stat: Option<String>,
43479	#[cfg_attr( feature = "derive_serde", serde(rename = "IssrCtry", skip_serializing_if = "Option::is_none") )]
43480	pub issr_ctry: Option<String>,
43481}
43482
43483impl GenericIdentification82 {
43484	pub fn validate(&self) -> Result<(), ValidationError> {
43485		if self.id.chars().count() < 1 {
43486			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43487		}
43488		if self.id.chars().count() > 35 {
43489			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
43490		}
43491		self.tp.validate()?;
43492		if let Some(ref val) = self.issr {
43493			if val.chars().count() < 1 {
43494				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43495			}
43496			if val.chars().count() > 35 {
43497				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
43498			}
43499		}
43500		if let Some(ref val) = self.stat {
43501			if val.chars().count() < 1 {
43502				return Err(ValidationError::new(1001, "stat is shorter than the minimum length of 1".to_string()));
43503			}
43504			if val.chars().count() > 70 {
43505				return Err(ValidationError::new(1002, "stat exceeds the maximum length of 70".to_string()));
43506			}
43507		}
43508		if let Some(ref val) = self.issr_ctry {
43509			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
43510			if !pattern.is_match(val) {
43511				return Err(ValidationError::new(1005, "issr_ctry does not match the required pattern".to_string()));
43512			}
43513		}
43514		Ok(())
43515	}
43516}
43517
43518
43519// GenericOrganisationIdentification1 ...
43520#[cfg_attr(feature = "derive_debug", derive(Debug))]
43521#[cfg_attr(feature = "derive_default", derive(Default))]
43522#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43523#[cfg_attr(feature = "derive_clone", derive(Clone))]
43524#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43525pub struct GenericOrganisationIdentification1 {
43526	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43527	pub id: String,
43528	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
43529	pub schme_nm: Option<OrganisationIdentificationSchemeName1Choice>,
43530	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
43531	pub issr: Option<String>,
43532}
43533
43534impl GenericOrganisationIdentification1 {
43535	pub fn validate(&self) -> Result<(), ValidationError> {
43536		if self.id.chars().count() < 1 {
43537			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43538		}
43539		if self.id.chars().count() > 35 {
43540			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
43541		}
43542		if let Some(ref val) = self.schme_nm { val.validate()? }
43543		if let Some(ref val) = self.issr {
43544			if val.chars().count() < 1 {
43545				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43546			}
43547			if val.chars().count() > 35 {
43548				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
43549			}
43550		}
43551		Ok(())
43552	}
43553}
43554
43555
43556// GenericOrganisationIdentification3 ...
43557#[cfg_attr(feature = "derive_debug", derive(Debug))]
43558#[cfg_attr(feature = "derive_default", derive(Default))]
43559#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43560#[cfg_attr(feature = "derive_clone", derive(Clone))]
43561#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43562pub struct GenericOrganisationIdentification3 {
43563	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43564	pub id: String,
43565	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
43566	pub schme_nm: Option<OrganisationIdentificationSchemeName1Choice>,
43567	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
43568	pub issr: Option<String>,
43569}
43570
43571impl GenericOrganisationIdentification3 {
43572	pub fn validate(&self) -> Result<(), ValidationError> {
43573		if self.id.chars().count() < 1 {
43574			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43575		}
43576		if self.id.chars().count() > 256 {
43577			return Err(ValidationError::new(1002, "id exceeds the maximum length of 256".to_string()));
43578		}
43579		if let Some(ref val) = self.schme_nm { val.validate()? }
43580		if let Some(ref val) = self.issr {
43581			if val.chars().count() < 1 {
43582				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43583			}
43584			if val.chars().count() > 35 {
43585				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
43586			}
43587		}
43588		Ok(())
43589	}
43590}
43591
43592
43593// GenericOrganisationType1 ...
43594#[cfg_attr(feature = "derive_debug", derive(Debug))]
43595#[cfg_attr(feature = "derive_default", derive(Default))]
43596#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43597#[cfg_attr(feature = "derive_clone", derive(Clone))]
43598#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43599pub struct GenericOrganisationType1 {
43600	#[cfg_attr( feature = "derive_serde", serde(rename = "Reqd") )]
43601	pub reqd: bool,
43602	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm") )]
43603	pub schme_nm: OrganisationIdentificationSchemeName1Choice,
43604}
43605
43606impl GenericOrganisationType1 {
43607	pub fn validate(&self) -> Result<(), ValidationError> {
43608		self.schme_nm.validate()?;
43609		Ok(())
43610	}
43611}
43612
43613
43614// GenericPersonIdentification1 ...
43615#[cfg_attr(feature = "derive_debug", derive(Debug))]
43616#[cfg_attr(feature = "derive_default", derive(Default))]
43617#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43618#[cfg_attr(feature = "derive_clone", derive(Clone))]
43619#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43620pub struct GenericPersonIdentification1 {
43621	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43622	pub id: String,
43623	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
43624	pub schme_nm: Option<PersonIdentificationSchemeName1Choice>,
43625	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
43626	pub issr: Option<String>,
43627}
43628
43629impl GenericPersonIdentification1 {
43630	pub fn validate(&self) -> Result<(), ValidationError> {
43631		if self.id.chars().count() < 1 {
43632			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43633		}
43634		if self.id.chars().count() > 35 {
43635			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
43636		}
43637		if let Some(ref val) = self.schme_nm { val.validate()? }
43638		if let Some(ref val) = self.issr {
43639			if val.chars().count() < 1 {
43640				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43641			}
43642			if val.chars().count() > 35 {
43643				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
43644			}
43645		}
43646		Ok(())
43647	}
43648}
43649
43650
43651// GenericPersonIdentification2 ...
43652#[cfg_attr(feature = "derive_debug", derive(Debug))]
43653#[cfg_attr(feature = "derive_default", derive(Default))]
43654#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43655#[cfg_attr(feature = "derive_clone", derive(Clone))]
43656#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43657pub struct GenericPersonIdentification2 {
43658	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43659	pub id: String,
43660	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
43661	pub schme_nm: Option<PersonIdentificationSchemeName1Choice>,
43662	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
43663	pub issr: Option<String>,
43664}
43665
43666impl GenericPersonIdentification2 {
43667	pub fn validate(&self) -> Result<(), ValidationError> {
43668		if self.id.chars().count() < 1 {
43669			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43670		}
43671		if self.id.chars().count() > 256 {
43672			return Err(ValidationError::new(1002, "id exceeds the maximum length of 256".to_string()));
43673		}
43674		if let Some(ref val) = self.schme_nm { val.validate()? }
43675		if let Some(ref val) = self.issr {
43676			if val.chars().count() < 1 {
43677				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43678			}
43679			if val.chars().count() > 35 {
43680				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
43681			}
43682		}
43683		Ok(())
43684	}
43685}
43686
43687
43688// GenericPersonType1 ...
43689#[cfg_attr(feature = "derive_debug", derive(Debug))]
43690#[cfg_attr(feature = "derive_default", derive(Default))]
43691#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43692#[cfg_attr(feature = "derive_clone", derive(Clone))]
43693#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43694pub struct GenericPersonType1 {
43695	#[cfg_attr( feature = "derive_serde", serde(rename = "Reqd") )]
43696	pub reqd: bool,
43697	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm") )]
43698	pub schme_nm: PersonIdentificationSchemeName1Choice,
43699}
43700
43701impl GenericPersonType1 {
43702	pub fn validate(&self) -> Result<(), ValidationError> {
43703		self.schme_nm.validate()?;
43704		Ok(())
43705	}
43706}
43707
43708
43709// GenericValidationRuleIdentification1 ...
43710#[cfg_attr(feature = "derive_debug", derive(Debug))]
43711#[cfg_attr(feature = "derive_default", derive(Default))]
43712#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43713#[cfg_attr(feature = "derive_clone", derive(Clone))]
43714#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43715pub struct GenericValidationRuleIdentification1 {
43716	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
43717	pub id: String,
43718	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
43719	pub desc: Option<String>,
43720	#[cfg_attr( feature = "derive_serde", serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none") )]
43721	pub schme_nm: Option<ValidationRuleSchemeName1Choice>,
43722	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
43723	pub issr: Option<String>,
43724}
43725
43726impl GenericValidationRuleIdentification1 {
43727	pub fn validate(&self) -> Result<(), ValidationError> {
43728		if self.id.chars().count() < 1 {
43729			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
43730		}
43731		if self.id.chars().count() > 35 {
43732			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
43733		}
43734		if let Some(ref val) = self.desc {
43735			if val.chars().count() < 1 {
43736				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
43737			}
43738			if val.chars().count() > 350 {
43739				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 350".to_string()));
43740			}
43741		}
43742		if let Some(ref val) = self.schme_nm { val.validate()? }
43743		if let Some(ref val) = self.issr {
43744			if val.chars().count() < 1 {
43745				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
43746			}
43747			if val.chars().count() > 35 {
43748				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
43749			}
43750		}
43751		Ok(())
43752	}
43753}
43754
43755
43756// GlobalNote1Code ...
43757#[cfg_attr(feature = "derive_debug", derive(Debug))]
43758#[cfg_attr(feature = "derive_default", derive(Default))]
43759#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43760#[cfg_attr(feature = "derive_clone", derive(Clone))]
43761#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43762pub enum GlobalNote1Code {
43763	#[cfg_attr(feature = "derive_default", default)]
43764	#[cfg_attr( feature = "derive_serde", serde(rename = "NGNO") )]
43765	CodeNGNO,
43766	#[cfg_attr( feature = "derive_serde", serde(rename = "CGNO") )]
43767	CodeCGNO,
43768}
43769
43770impl GlobalNote1Code {
43771	pub fn validate(&self) -> Result<(), ValidationError> {
43772		Ok(())
43773	}
43774}
43775
43776
43777// GlobalNote2Choice ...
43778#[cfg_attr(feature = "derive_debug", derive(Debug))]
43779#[cfg_attr(feature = "derive_default", derive(Default))]
43780#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43781#[cfg_attr(feature = "derive_clone", derive(Clone))]
43782#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43783pub struct GlobalNote2Choice {
43784	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
43785	pub cd: Option<GlobalNote1Code>,
43786	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
43787	pub prtry: Option<GenericIdentification30>,
43788}
43789
43790impl GlobalNote2Choice {
43791	pub fn validate(&self) -> Result<(), ValidationError> {
43792		if let Some(ref val) = self.cd { val.validate()? }
43793		if let Some(ref val) = self.prtry { val.validate()? }
43794		Ok(())
43795	}
43796}
43797
43798
43799// GovernanceProcess1Choice ...
43800#[cfg_attr(feature = "derive_debug", derive(Debug))]
43801#[cfg_attr(feature = "derive_default", derive(Default))]
43802#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43803#[cfg_attr(feature = "derive_clone", derive(Clone))]
43804#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43805pub struct GovernanceProcess1Choice {
43806	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
43807	pub cd: Option<GovernanceProcessType1Code>,
43808	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
43809	pub prtry: Option<GenericIdentification47>,
43810}
43811
43812impl GovernanceProcess1Choice {
43813	pub fn validate(&self) -> Result<(), ValidationError> {
43814		if let Some(ref val) = self.cd { val.validate()? }
43815		if let Some(ref val) = self.prtry { val.validate()? }
43816		Ok(())
43817	}
43818}
43819
43820
43821// GovernanceProcessType1Code ...
43822#[cfg_attr(feature = "derive_debug", derive(Debug))]
43823#[cfg_attr(feature = "derive_default", derive(Default))]
43824#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43825#[cfg_attr(feature = "derive_clone", derive(Clone))]
43826#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43827pub enum GovernanceProcessType1Code {
43828	#[cfg_attr(feature = "derive_default", default)]
43829	#[cfg_attr( feature = "derive_serde", serde(rename = "BMIF") )]
43830	CodeBMIF,
43831	#[cfg_attr( feature = "derive_serde", serde(rename = "NINF") )]
43832	CodeNINF,
43833	#[cfg_attr( feature = "derive_serde", serde(rename = "CMIF") )]
43834	CodeCMIF,
43835	#[cfg_attr( feature = "derive_serde", serde(rename = "AMIF") )]
43836	CodeAMIF,
43837}
43838
43839impl GovernanceProcessType1Code {
43840	pub fn validate(&self) -> Result<(), ValidationError> {
43841		Ok(())
43842	}
43843}
43844
43845
43846// Group5 ...
43847#[cfg_attr(feature = "derive_debug", derive(Debug))]
43848#[cfg_attr(feature = "derive_default", derive(Default))]
43849#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43850#[cfg_attr(feature = "derive_clone", derive(Clone))]
43851#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43852pub struct Group5 {
43853	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
43854	pub mod_cd: Option<Modification1Code>,
43855	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpId") )]
43856	pub grp_id: String,
43857	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty") )]
43858	pub pty: Vec<PartyAndCertificate7>,
43859}
43860
43861impl Group5 {
43862	pub fn validate(&self) -> Result<(), ValidationError> {
43863		if let Some(ref val) = self.mod_cd { val.validate()? }
43864		if self.grp_id.chars().count() < 1 {
43865			return Err(ValidationError::new(1001, "grp_id is shorter than the minimum length of 1".to_string()));
43866		}
43867		if self.grp_id.chars().count() > 4 {
43868			return Err(ValidationError::new(1002, "grp_id exceeds the maximum length of 4".to_string()));
43869		}
43870		let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
43871		if !pattern.is_match(&self.grp_id) {
43872			return Err(ValidationError::new(1005, "grp_id does not match the required pattern".to_string()));
43873		}
43874		for item in &self.pty { item.validate()? }
43875		Ok(())
43876	}
43877}
43878
43879
43880// Group6 ...
43881#[cfg_attr(feature = "derive_debug", derive(Debug))]
43882#[cfg_attr(feature = "derive_default", derive(Default))]
43883#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43884#[cfg_attr(feature = "derive_clone", derive(Clone))]
43885#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43886pub struct Group6 {
43887	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpId") )]
43888	pub grp_id: String,
43889	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty") )]
43890	pub pty: Vec<PartyAndCertificate6>,
43891}
43892
43893impl Group6 {
43894	pub fn validate(&self) -> Result<(), ValidationError> {
43895		if self.grp_id.chars().count() < 1 {
43896			return Err(ValidationError::new(1001, "grp_id is shorter than the minimum length of 1".to_string()));
43897		}
43898		if self.grp_id.chars().count() > 4 {
43899			return Err(ValidationError::new(1002, "grp_id exceeds the maximum length of 4".to_string()));
43900		}
43901		let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
43902		if !pattern.is_match(&self.grp_id) {
43903			return Err(ValidationError::new(1005, "grp_id does not match the required pattern".to_string()));
43904		}
43905		for item in &self.pty { item.validate()? }
43906		Ok(())
43907	}
43908}
43909
43910
43911// GroupCancellationStatus1Code ...
43912#[cfg_attr(feature = "derive_debug", derive(Debug))]
43913#[cfg_attr(feature = "derive_default", derive(Default))]
43914#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43915#[cfg_attr(feature = "derive_clone", derive(Clone))]
43916#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43917pub enum GroupCancellationStatus1Code {
43918	#[cfg_attr(feature = "derive_default", default)]
43919	#[cfg_attr( feature = "derive_serde", serde(rename = "PACR") )]
43920	CodePACR,
43921	#[cfg_attr( feature = "derive_serde", serde(rename = "RJCR") )]
43922	CodeRJCR,
43923	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCR") )]
43924	CodeACCR,
43925	#[cfg_attr( feature = "derive_serde", serde(rename = "PDCR") )]
43926	CodePDCR,
43927}
43928
43929impl GroupCancellationStatus1Code {
43930	pub fn validate(&self) -> Result<(), ValidationError> {
43931		Ok(())
43932	}
43933}
43934
43935
43936// GroupHeader101 ...
43937#[cfg_attr(feature = "derive_debug", derive(Debug))]
43938#[cfg_attr(feature = "derive_default", derive(Default))]
43939#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43940#[cfg_attr(feature = "derive_clone", derive(Clone))]
43941#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43942pub struct GroupHeader101 {
43943	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
43944	pub msg_id: String,
43945	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
43946	pub cre_dt_tm: String,
43947	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
43948	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification6>,
43949	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
43950	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification6>,
43951	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizQry", skip_serializing_if = "Option::is_none") )]
43952	pub orgnl_biz_qry: Option<OriginalBusinessQuery1>,
43953}
43954
43955impl GroupHeader101 {
43956	pub fn validate(&self) -> Result<(), ValidationError> {
43957		if self.msg_id.chars().count() < 1 {
43958			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
43959		}
43960		if self.msg_id.chars().count() > 35 {
43961			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
43962		}
43963		if let Some(ref val) = self.instg_agt { val.validate()? }
43964		if let Some(ref val) = self.instd_agt { val.validate()? }
43965		if let Some(ref val) = self.orgnl_biz_qry { val.validate()? }
43966		Ok(())
43967	}
43968}
43969
43970
43971// GroupHeader103 ...
43972#[cfg_attr(feature = "derive_debug", derive(Debug))]
43973#[cfg_attr(feature = "derive_default", derive(Default))]
43974#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
43975#[cfg_attr(feature = "derive_clone", derive(Clone))]
43976#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
43977pub struct GroupHeader103 {
43978	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
43979	pub msg_id: String,
43980	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
43981	pub cre_dt_tm: String,
43982	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfChqs") )]
43983	pub nb_of_chqs: String,
43984	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
43985	pub ctrl_sum: Option<f64>,
43986}
43987
43988impl GroupHeader103 {
43989	pub fn validate(&self) -> Result<(), ValidationError> {
43990		if self.msg_id.chars().count() < 1 {
43991			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
43992		}
43993		if self.msg_id.chars().count() > 35 {
43994			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
43995		}
43996		let pattern = Regex::new("[0-9]{1,15}").unwrap();
43997		if !pattern.is_match(&self.nb_of_chqs) {
43998			return Err(ValidationError::new(1005, "nb_of_chqs does not match the required pattern".to_string()));
43999		}
44000		Ok(())
44001	}
44002}
44003
44004
44005// GroupHeader104 ...
44006#[cfg_attr(feature = "derive_debug", derive(Debug))]
44007#[cfg_attr(feature = "derive_default", derive(Default))]
44008#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44009#[cfg_attr(feature = "derive_clone", derive(Clone))]
44010#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44011pub struct GroupHeader104 {
44012	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44013	pub msg_id: String,
44014	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44015	pub cre_dt_tm: String,
44016	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfSttlmReqs") )]
44017	pub nb_of_sttlm_reqs: String,
44018	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
44019	pub ctrl_sum: Option<f64>,
44020	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInf", skip_serializing_if = "Option::is_none") )]
44021	pub sttlm_inf: Option<SettlementInstruction14>,
44022}
44023
44024impl GroupHeader104 {
44025	pub fn validate(&self) -> Result<(), ValidationError> {
44026		if self.msg_id.chars().count() < 1 {
44027			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44028		}
44029		if self.msg_id.chars().count() > 35 {
44030			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44031		}
44032		let pattern = Regex::new("[0-9]{1,15}").unwrap();
44033		if !pattern.is_match(&self.nb_of_sttlm_reqs) {
44034			return Err(ValidationError::new(1005, "nb_of_sttlm_reqs does not match the required pattern".to_string()));
44035		}
44036		if let Some(ref val) = self.sttlm_inf { val.validate()? }
44037		Ok(())
44038	}
44039}
44040
44041
44042// GroupHeader109 ...
44043#[cfg_attr(feature = "derive_debug", derive(Debug))]
44044#[cfg_attr(feature = "derive_default", derive(Default))]
44045#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44046#[cfg_attr(feature = "derive_clone", derive(Clone))]
44047#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44048pub struct GroupHeader109 {
44049	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44050	pub msg_id: String,
44051	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44052	pub cre_dt_tm: String,
44053	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
44054	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44055	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
44056	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44057}
44058
44059impl GroupHeader109 {
44060	pub fn validate(&self) -> Result<(), ValidationError> {
44061		if self.msg_id.chars().count() < 1 {
44062			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44063		}
44064		if self.msg_id.chars().count() > 35 {
44065			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44066		}
44067		if let Some(ref val) = self.instg_agt { val.validate()? }
44068		if let Some(ref val) = self.instd_agt { val.validate()? }
44069		Ok(())
44070	}
44071}
44072
44073
44074// GroupHeader110 ...
44075#[cfg_attr(feature = "derive_debug", derive(Debug))]
44076#[cfg_attr(feature = "derive_default", derive(Default))]
44077#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44078#[cfg_attr(feature = "derive_clone", derive(Clone))]
44079#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44080pub struct GroupHeader110 {
44081	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44082	pub msg_id: String,
44083	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44084	pub cre_dt_tm: String,
44085	#[cfg_attr( feature = "derive_serde", serde(rename = "Authstn", skip_serializing_if = "Option::is_none") )]
44086	pub authstn: Option<Vec<Authorisation1Choice>>,
44087	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty", skip_serializing_if = "Option::is_none") )]
44088	pub initg_pty: Option<PartyIdentification272>,
44089	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
44090	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44091	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
44092	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44093}
44094
44095impl GroupHeader110 {
44096	pub fn validate(&self) -> Result<(), ValidationError> {
44097		if self.msg_id.chars().count() < 1 {
44098			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44099		}
44100		if self.msg_id.chars().count() > 35 {
44101			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44102		}
44103		if let Some(ref vec) = self.authstn { for item in vec { item.validate()? } }
44104		if let Some(ref val) = self.initg_pty { val.validate()? }
44105		if let Some(ref val) = self.instg_agt { val.validate()? }
44106		if let Some(ref val) = self.instd_agt { val.validate()? }
44107		Ok(())
44108	}
44109}
44110
44111
44112// GroupHeader111 ...
44113#[cfg_attr(feature = "derive_debug", derive(Debug))]
44114#[cfg_attr(feature = "derive_default", derive(Default))]
44115#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44116#[cfg_attr(feature = "derive_clone", derive(Clone))]
44117#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44118pub struct GroupHeader111 {
44119	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44120	pub msg_id: String,
44121	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44122	pub cre_dt_tm: String,
44123	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty") )]
44124	pub initg_pty: PartyIdentification272,
44125	#[cfg_attr( feature = "derive_serde", serde(rename = "FwdgAgt", skip_serializing_if = "Option::is_none") )]
44126	pub fwdg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44127	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
44128	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44129	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
44130	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44131}
44132
44133impl GroupHeader111 {
44134	pub fn validate(&self) -> Result<(), ValidationError> {
44135		if self.msg_id.chars().count() < 1 {
44136			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44137		}
44138		if self.msg_id.chars().count() > 35 {
44139			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44140		}
44141		self.initg_pty.validate()?;
44142		if let Some(ref val) = self.fwdg_agt { val.validate()? }
44143		if let Some(ref val) = self.dbtr_agt { val.validate()? }
44144		if let Some(ref val) = self.cdtr_agt { val.validate()? }
44145		Ok(())
44146	}
44147}
44148
44149
44150// GroupHeader112 ...
44151#[cfg_attr(feature = "derive_debug", derive(Debug))]
44152#[cfg_attr(feature = "derive_default", derive(Default))]
44153#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44154#[cfg_attr(feature = "derive_clone", derive(Clone))]
44155#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44156pub struct GroupHeader112 {
44157	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44158	pub msg_id: String,
44159	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44160	pub cre_dt_tm: String,
44161	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs") )]
44162	pub nb_of_txs: String,
44163	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
44164	pub ctrl_sum: Option<f64>,
44165	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty") )]
44166	pub initg_pty: PartyIdentification272,
44167	#[cfg_attr( feature = "derive_serde", serde(rename = "FwdgAgt", skip_serializing_if = "Option::is_none") )]
44168	pub fwdg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44169}
44170
44171impl GroupHeader112 {
44172	pub fn validate(&self) -> Result<(), ValidationError> {
44173		if self.msg_id.chars().count() < 1 {
44174			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44175		}
44176		if self.msg_id.chars().count() > 35 {
44177			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44178		}
44179		let pattern = Regex::new("[0-9]{1,15}").unwrap();
44180		if !pattern.is_match(&self.nb_of_txs) {
44181			return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
44182		}
44183		self.initg_pty.validate()?;
44184		if let Some(ref val) = self.fwdg_agt { val.validate()? }
44185		Ok(())
44186	}
44187}
44188
44189
44190// GroupHeader113 ...
44191#[cfg_attr(feature = "derive_debug", derive(Debug))]
44192#[cfg_attr(feature = "derive_default", derive(Default))]
44193#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44194#[cfg_attr(feature = "derive_clone", derive(Clone))]
44195#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44196pub struct GroupHeader113 {
44197	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44198	pub msg_id: String,
44199	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44200	pub cre_dt_tm: String,
44201	#[cfg_attr( feature = "derive_serde", serde(rename = "BtchBookg", skip_serializing_if = "Option::is_none") )]
44202	pub btch_bookg: Option<bool>,
44203	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs") )]
44204	pub nb_of_txs: String,
44205	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
44206	pub ctrl_sum: Option<f64>,
44207	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlIntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
44208	pub ttl_intr_bk_sttlm_amt: Option<ActiveCurrencyAndAmount>,
44209	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
44210	pub intr_bk_sttlm_dt: Option<String>,
44211	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInf") )]
44212	pub sttlm_inf: SettlementInstruction15,
44213	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
44214	pub pmt_tp_inf: Option<PaymentTypeInformation28>,
44215	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
44216	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44217	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
44218	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44219}
44220
44221impl GroupHeader113 {
44222	pub fn validate(&self) -> Result<(), ValidationError> {
44223		if self.msg_id.chars().count() < 1 {
44224			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44225		}
44226		if self.msg_id.chars().count() > 35 {
44227			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44228		}
44229		let pattern = Regex::new("[0-9]{1,15}").unwrap();
44230		if !pattern.is_match(&self.nb_of_txs) {
44231			return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
44232		}
44233		if let Some(ref val) = self.ttl_intr_bk_sttlm_amt { val.validate()? }
44234		self.sttlm_inf.validate()?;
44235		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
44236		if let Some(ref val) = self.instg_agt { val.validate()? }
44237		if let Some(ref val) = self.instd_agt { val.validate()? }
44238		Ok(())
44239	}
44240}
44241
44242
44243// GroupHeader114 ...
44244#[cfg_attr(feature = "derive_debug", derive(Debug))]
44245#[cfg_attr(feature = "derive_default", derive(Default))]
44246#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44247#[cfg_attr(feature = "derive_clone", derive(Clone))]
44248#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44249pub struct GroupHeader114 {
44250	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44251	pub msg_id: String,
44252	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44253	pub cre_dt_tm: String,
44254	#[cfg_attr( feature = "derive_serde", serde(rename = "Authstn", skip_serializing_if = "Option::is_none") )]
44255	pub authstn: Option<Vec<Authorisation1Choice>>,
44256	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs") )]
44257	pub nb_of_txs: String,
44258	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
44259	pub ctrl_sum: Option<f64>,
44260	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty") )]
44261	pub initg_pty: PartyIdentification272,
44262	#[cfg_attr( feature = "derive_serde", serde(rename = "FwdgAgt", skip_serializing_if = "Option::is_none") )]
44263	pub fwdg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44264	#[cfg_attr( feature = "derive_serde", serde(rename = "InitnSrc", skip_serializing_if = "Option::is_none") )]
44265	pub initn_src: Option<PaymentInitiationSource1>,
44266}
44267
44268impl GroupHeader114 {
44269	pub fn validate(&self) -> Result<(), ValidationError> {
44270		if self.msg_id.chars().count() < 1 {
44271			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44272		}
44273		if self.msg_id.chars().count() > 35 {
44274			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44275		}
44276		if let Some(ref vec) = self.authstn { for item in vec { item.validate()? } }
44277		let pattern = Regex::new("[0-9]{1,15}").unwrap();
44278		if !pattern.is_match(&self.nb_of_txs) {
44279			return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
44280		}
44281		self.initg_pty.validate()?;
44282		if let Some(ref val) = self.fwdg_agt { val.validate()? }
44283		if let Some(ref val) = self.initn_src { val.validate()? }
44284		Ok(())
44285	}
44286}
44287
44288
44289// GroupHeader115 ...
44290#[cfg_attr(feature = "derive_debug", derive(Debug))]
44291#[cfg_attr(feature = "derive_default", derive(Default))]
44292#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44293#[cfg_attr(feature = "derive_clone", derive(Clone))]
44294#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44295pub struct GroupHeader115 {
44296	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44297	pub msg_id: String,
44298	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44299	pub cre_dt_tm: String,
44300	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsRqstr", skip_serializing_if = "Option::is_none") )]
44301	pub chrgs_rqstr: Option<BranchAndFinancialInstitutionIdentification8>,
44302	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlChrgs", skip_serializing_if = "Option::is_none") )]
44303	pub ttl_chrgs: Option<TotalCharges7>,
44304	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgt", skip_serializing_if = "Option::is_none") )]
44305	pub chrgs_acct_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44306	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgtAcct", skip_serializing_if = "Option::is_none") )]
44307	pub chrgs_acct_agt_acct: Option<CashAccount40>,
44308}
44309
44310impl GroupHeader115 {
44311	pub fn validate(&self) -> Result<(), ValidationError> {
44312		if self.msg_id.chars().count() < 1 {
44313			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44314		}
44315		if self.msg_id.chars().count() > 35 {
44316			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44317		}
44318		if let Some(ref val) = self.chrgs_rqstr { val.validate()? }
44319		if let Some(ref val) = self.ttl_chrgs { val.validate()? }
44320		if let Some(ref val) = self.chrgs_acct_agt { val.validate()? }
44321		if let Some(ref val) = self.chrgs_acct_agt_acct { val.validate()? }
44322		Ok(())
44323	}
44324}
44325
44326
44327// GroupHeader116 ...
44328#[cfg_attr(feature = "derive_debug", derive(Debug))]
44329#[cfg_attr(feature = "derive_default", derive(Default))]
44330#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44331#[cfg_attr(feature = "derive_clone", derive(Clone))]
44332#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44333pub struct GroupHeader116 {
44334	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44335	pub msg_id: String,
44336	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44337	pub cre_dt_tm: String,
44338	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgRcpt", skip_serializing_if = "Option::is_none") )]
44339	pub msg_rcpt: Option<PartyIdentification272>,
44340	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgPgntn", skip_serializing_if = "Option::is_none") )]
44341	pub msg_pgntn: Option<Pagination1>,
44342	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizQry", skip_serializing_if = "Option::is_none") )]
44343	pub orgnl_biz_qry: Option<OriginalBusinessQuery1>,
44344	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
44345	pub addtl_inf: Option<String>,
44346}
44347
44348impl GroupHeader116 {
44349	pub fn validate(&self) -> Result<(), ValidationError> {
44350		if self.msg_id.chars().count() < 1 {
44351			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44352		}
44353		if self.msg_id.chars().count() > 35 {
44354			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44355		}
44356		if let Some(ref val) = self.msg_rcpt { val.validate()? }
44357		if let Some(ref val) = self.msg_pgntn { val.validate()? }
44358		if let Some(ref val) = self.orgnl_biz_qry { val.validate()? }
44359		if let Some(ref val) = self.addtl_inf {
44360			if val.chars().count() < 1 {
44361				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
44362			}
44363			if val.chars().count() > 500 {
44364				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 500".to_string()));
44365			}
44366		}
44367		Ok(())
44368	}
44369}
44370
44371
44372// GroupHeader117 ...
44373#[cfg_attr(feature = "derive_debug", derive(Debug))]
44374#[cfg_attr(feature = "derive_default", derive(Default))]
44375#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44376#[cfg_attr(feature = "derive_clone", derive(Clone))]
44377#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44378pub struct GroupHeader117 {
44379	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44380	pub msg_id: String,
44381	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44382	pub cre_dt_tm: String,
44383	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgSndr", skip_serializing_if = "Option::is_none") )]
44384	pub msg_sndr: Option<Party50Choice>,
44385}
44386
44387impl GroupHeader117 {
44388	pub fn validate(&self) -> Result<(), ValidationError> {
44389		if self.msg_id.chars().count() < 1 {
44390			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44391		}
44392		if self.msg_id.chars().count() > 35 {
44393			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44394		}
44395		if let Some(ref val) = self.msg_sndr { val.validate()? }
44396		Ok(())
44397	}
44398}
44399
44400
44401// GroupHeader118 ...
44402#[cfg_attr(feature = "derive_debug", derive(Debug))]
44403#[cfg_attr(feature = "derive_default", derive(Default))]
44404#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44405#[cfg_attr(feature = "derive_clone", derive(Clone))]
44406#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44407pub struct GroupHeader118 {
44408	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44409	pub msg_id: String,
44410	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44411	pub cre_dt_tm: String,
44412	#[cfg_attr( feature = "derive_serde", serde(rename = "Authstn", skip_serializing_if = "Option::is_none") )]
44413	pub authstn: Option<Vec<Authorisation1Choice>>,
44414	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs") )]
44415	pub nb_of_txs: String,
44416	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
44417	pub ctrl_sum: Option<f64>,
44418	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty") )]
44419	pub initg_pty: PartyIdentification272,
44420	#[cfg_attr( feature = "derive_serde", serde(rename = "FwdgAgt", skip_serializing_if = "Option::is_none") )]
44421	pub fwdg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44422}
44423
44424impl GroupHeader118 {
44425	pub fn validate(&self) -> Result<(), ValidationError> {
44426		if self.msg_id.chars().count() < 1 {
44427			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44428		}
44429		if self.msg_id.chars().count() > 35 {
44430			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44431		}
44432		if let Some(ref vec) = self.authstn { for item in vec { item.validate()? } }
44433		let pattern = Regex::new("[0-9]{1,15}").unwrap();
44434		if !pattern.is_match(&self.nb_of_txs) {
44435			return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
44436		}
44437		self.initg_pty.validate()?;
44438		if let Some(ref val) = self.fwdg_agt { val.validate()? }
44439		Ok(())
44440	}
44441}
44442
44443
44444// GroupHeader119 ...
44445#[cfg_attr(feature = "derive_debug", derive(Debug))]
44446#[cfg_attr(feature = "derive_default", derive(Default))]
44447#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44448#[cfg_attr(feature = "derive_clone", derive(Clone))]
44449#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44450pub struct GroupHeader119 {
44451	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44452	pub msg_id: String,
44453	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44454	pub cre_dt_tm: String,
44455	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs") )]
44456	pub nb_of_txs: String,
44457	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
44458	pub ctrl_sum: Option<f64>,
44459	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
44460	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44461	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
44462	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44463}
44464
44465impl GroupHeader119 {
44466	pub fn validate(&self) -> Result<(), ValidationError> {
44467		if self.msg_id.chars().count() < 1 {
44468			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44469		}
44470		if self.msg_id.chars().count() > 35 {
44471			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44472		}
44473		let pattern = Regex::new("[0-9]{1,15}").unwrap();
44474		if !pattern.is_match(&self.nb_of_txs) {
44475			return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
44476		}
44477		if let Some(ref val) = self.instg_agt { val.validate()? }
44478		if let Some(ref val) = self.instd_agt { val.validate()? }
44479		Ok(())
44480	}
44481}
44482
44483
44484// GroupHeader120 ...
44485#[cfg_attr(feature = "derive_debug", derive(Debug))]
44486#[cfg_attr(feature = "derive_default", derive(Default))]
44487#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44488#[cfg_attr(feature = "derive_clone", derive(Clone))]
44489#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44490pub struct GroupHeader120 {
44491	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44492	pub msg_id: String,
44493	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44494	pub cre_dt_tm: String,
44495	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
44496	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44497	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
44498	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44499	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizQry", skip_serializing_if = "Option::is_none") )]
44500	pub orgnl_biz_qry: Option<OriginalBusinessQuery1>,
44501}
44502
44503impl GroupHeader120 {
44504	pub fn validate(&self) -> Result<(), ValidationError> {
44505		if self.msg_id.chars().count() < 1 {
44506			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44507		}
44508		if self.msg_id.chars().count() > 35 {
44509			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44510		}
44511		if let Some(ref val) = self.instg_agt { val.validate()? }
44512		if let Some(ref val) = self.instd_agt { val.validate()? }
44513		if let Some(ref val) = self.orgnl_biz_qry { val.validate()? }
44514		Ok(())
44515	}
44516}
44517
44518
44519// GroupHeader121 ...
44520#[cfg_attr(feature = "derive_debug", derive(Debug))]
44521#[cfg_attr(feature = "derive_default", derive(Default))]
44522#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44523#[cfg_attr(feature = "derive_clone", derive(Clone))]
44524#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44525pub struct GroupHeader121 {
44526	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44527	pub msg_id: String,
44528	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44529	pub cre_dt_tm: String,
44530	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgRcpt", skip_serializing_if = "Option::is_none") )]
44531	pub msg_rcpt: Option<Party50Choice>,
44532}
44533
44534impl GroupHeader121 {
44535	pub fn validate(&self) -> Result<(), ValidationError> {
44536		if self.msg_id.chars().count() < 1 {
44537			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44538		}
44539		if self.msg_id.chars().count() > 35 {
44540			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44541		}
44542		if let Some(ref val) = self.msg_rcpt { val.validate()? }
44543		Ok(())
44544	}
44545}
44546
44547
44548// GroupHeader122 ...
44549#[cfg_attr(feature = "derive_debug", derive(Debug))]
44550#[cfg_attr(feature = "derive_default", derive(Default))]
44551#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44552#[cfg_attr(feature = "derive_clone", derive(Clone))]
44553#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44554pub struct GroupHeader122 {
44555	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44556	pub msg_id: String,
44557	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44558	pub cre_dt_tm: String,
44559	#[cfg_attr( feature = "derive_serde", serde(rename = "Authstn", skip_serializing_if = "Option::is_none") )]
44560	pub authstn: Option<Vec<Authorisation1Choice>>,
44561	#[cfg_attr( feature = "derive_serde", serde(rename = "CpyInd", skip_serializing_if = "Option::is_none") )]
44562	pub cpy_ind: Option<CopyDuplicate1Code>,
44563	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty") )]
44564	pub initg_pty: PartyIdentification272,
44565	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgRcpt", skip_serializing_if = "Option::is_none") )]
44566	pub msg_rcpt: Option<PartyIdentification272>,
44567	#[cfg_attr( feature = "derive_serde", serde(rename = "FwdgAgt", skip_serializing_if = "Option::is_none") )]
44568	pub fwdg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44569}
44570
44571impl GroupHeader122 {
44572	pub fn validate(&self) -> Result<(), ValidationError> {
44573		if self.msg_id.chars().count() < 1 {
44574			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44575		}
44576		if self.msg_id.chars().count() > 35 {
44577			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44578		}
44579		if let Some(ref vec) = self.authstn { for item in vec { item.validate()? } }
44580		if let Some(ref val) = self.cpy_ind { val.validate()? }
44581		self.initg_pty.validate()?;
44582		if let Some(ref val) = self.msg_rcpt { val.validate()? }
44583		if let Some(ref val) = self.fwdg_agt { val.validate()? }
44584		Ok(())
44585	}
44586}
44587
44588
44589// GroupHeader123 ...
44590#[cfg_attr(feature = "derive_debug", derive(Debug))]
44591#[cfg_attr(feature = "derive_default", derive(Default))]
44592#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44593#[cfg_attr(feature = "derive_clone", derive(Clone))]
44594#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44595pub struct GroupHeader123 {
44596	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44597	pub msg_id: String,
44598	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44599	pub cre_dt_tm: String,
44600	#[cfg_attr( feature = "derive_serde", serde(rename = "Authstn", skip_serializing_if = "Option::is_none") )]
44601	pub authstn: Option<Vec<Authorisation1Choice>>,
44602	#[cfg_attr( feature = "derive_serde", serde(rename = "BtchBookg", skip_serializing_if = "Option::is_none") )]
44603	pub btch_bookg: Option<bool>,
44604	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs") )]
44605	pub nb_of_txs: String,
44606	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
44607	pub ctrl_sum: Option<f64>,
44608	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpRtr", skip_serializing_if = "Option::is_none") )]
44609	pub grp_rtr: Option<bool>,
44610	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlRtrdIntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
44611	pub ttl_rtrd_intr_bk_sttlm_amt: Option<ActiveCurrencyAndAmount>,
44612	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
44613	pub intr_bk_sttlm_dt: Option<String>,
44614	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInf") )]
44615	pub sttlm_inf: SettlementInstruction15,
44616	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
44617	pub pmt_tp_inf: Option<PaymentTypeInformation28>,
44618	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
44619	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44620	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
44621	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44622}
44623
44624impl GroupHeader123 {
44625	pub fn validate(&self) -> Result<(), ValidationError> {
44626		if self.msg_id.chars().count() < 1 {
44627			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44628		}
44629		if self.msg_id.chars().count() > 35 {
44630			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44631		}
44632		if let Some(ref vec) = self.authstn { for item in vec { item.validate()? } }
44633		let pattern = Regex::new("[0-9]{1,15}").unwrap();
44634		if !pattern.is_match(&self.nb_of_txs) {
44635			return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
44636		}
44637		if let Some(ref val) = self.ttl_rtrd_intr_bk_sttlm_amt { val.validate()? }
44638		self.sttlm_inf.validate()?;
44639		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
44640		if let Some(ref val) = self.instg_agt { val.validate()? }
44641		if let Some(ref val) = self.instd_agt { val.validate()? }
44642		Ok(())
44643	}
44644}
44645
44646
44647// GroupHeader124 ...
44648#[cfg_attr(feature = "derive_debug", derive(Debug))]
44649#[cfg_attr(feature = "derive_default", derive(Default))]
44650#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44651#[cfg_attr(feature = "derive_clone", derive(Clone))]
44652#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44653pub struct GroupHeader124 {
44654	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44655	pub msg_id: String,
44656	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44657	pub cre_dt_tm: String,
44658	#[cfg_attr( feature = "derive_serde", serde(rename = "Authstn", skip_serializing_if = "Option::is_none") )]
44659	pub authstn: Option<Vec<Authorisation1Choice>>,
44660	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs") )]
44661	pub nb_of_txs: String,
44662	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
44663	pub ctrl_sum: Option<f64>,
44664	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpRvsl", skip_serializing_if = "Option::is_none") )]
44665	pub grp_rvsl: Option<bool>,
44666	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty", skip_serializing_if = "Option::is_none") )]
44667	pub initg_pty: Option<PartyIdentification272>,
44668	#[cfg_attr( feature = "derive_serde", serde(rename = "FwdgAgt", skip_serializing_if = "Option::is_none") )]
44669	pub fwdg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44670	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
44671	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44672	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
44673	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44674}
44675
44676impl GroupHeader124 {
44677	pub fn validate(&self) -> Result<(), ValidationError> {
44678		if self.msg_id.chars().count() < 1 {
44679			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44680		}
44681		if self.msg_id.chars().count() > 35 {
44682			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44683		}
44684		if let Some(ref vec) = self.authstn { for item in vec { item.validate()? } }
44685		let pattern = Regex::new("[0-9]{1,15}").unwrap();
44686		if !pattern.is_match(&self.nb_of_txs) {
44687			return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
44688		}
44689		if let Some(ref val) = self.initg_pty { val.validate()? }
44690		if let Some(ref val) = self.fwdg_agt { val.validate()? }
44691		if let Some(ref val) = self.dbtr_agt { val.validate()? }
44692		if let Some(ref val) = self.cdtr_agt { val.validate()? }
44693		Ok(())
44694	}
44695}
44696
44697
44698// GroupHeader125 ...
44699#[cfg_attr(feature = "derive_debug", derive(Debug))]
44700#[cfg_attr(feature = "derive_default", derive(Default))]
44701#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44702#[cfg_attr(feature = "derive_clone", derive(Clone))]
44703#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44704pub struct GroupHeader125 {
44705	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44706	pub msg_id: String,
44707	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44708	pub cre_dt_tm: String,
44709	#[cfg_attr( feature = "derive_serde", serde(rename = "Authstn", skip_serializing_if = "Option::is_none") )]
44710	pub authstn: Option<Vec<Authorisation1Choice>>,
44711	#[cfg_attr( feature = "derive_serde", serde(rename = "BtchBookg", skip_serializing_if = "Option::is_none") )]
44712	pub btch_bookg: Option<bool>,
44713	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs") )]
44714	pub nb_of_txs: String,
44715	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
44716	pub ctrl_sum: Option<f64>,
44717	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlIntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
44718	pub ttl_intr_bk_sttlm_amt: Option<ActiveCurrencyAndAmount>,
44719	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
44720	pub intr_bk_sttlm_dt: Option<String>,
44721	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInf") )]
44722	pub sttlm_inf: SettlementInstruction14,
44723	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
44724	pub pmt_tp_inf: Option<PaymentTypeInformation27>,
44725	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
44726	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44727	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
44728	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44729}
44730
44731impl GroupHeader125 {
44732	pub fn validate(&self) -> Result<(), ValidationError> {
44733		if self.msg_id.chars().count() < 1 {
44734			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44735		}
44736		if self.msg_id.chars().count() > 35 {
44737			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44738		}
44739		if let Some(ref vec) = self.authstn { for item in vec { item.validate()? } }
44740		let pattern = Regex::new("[0-9]{1,15}").unwrap();
44741		if !pattern.is_match(&self.nb_of_txs) {
44742			return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
44743		}
44744		if let Some(ref val) = self.ttl_intr_bk_sttlm_amt { val.validate()? }
44745		self.sttlm_inf.validate()?;
44746		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
44747		if let Some(ref val) = self.instg_agt { val.validate()? }
44748		if let Some(ref val) = self.instd_agt { val.validate()? }
44749		Ok(())
44750	}
44751}
44752
44753
44754// GroupHeader126 ...
44755#[cfg_attr(feature = "derive_debug", derive(Debug))]
44756#[cfg_attr(feature = "derive_default", derive(Default))]
44757#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44758#[cfg_attr(feature = "derive_clone", derive(Clone))]
44759#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44760pub struct GroupHeader126 {
44761	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44762	pub msg_id: String,
44763	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44764	pub cre_dt_tm: String,
44765	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsRqstr", skip_serializing_if = "Option::is_none") )]
44766	pub chrgs_rqstr: Option<BranchAndFinancialInstitutionIdentification8>,
44767	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlChrgs", skip_serializing_if = "Option::is_none") )]
44768	pub ttl_chrgs: Option<TotalCharges7>,
44769	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcct", skip_serializing_if = "Option::is_none") )]
44770	pub chrgs_acct: Option<CashAccount40>,
44771	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctOwnr", skip_serializing_if = "Option::is_none") )]
44772	pub chrgs_acct_ownr: Option<BranchAndFinancialInstitutionIdentification8>,
44773}
44774
44775impl GroupHeader126 {
44776	pub fn validate(&self) -> Result<(), ValidationError> {
44777		if self.msg_id.chars().count() < 1 {
44778			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44779		}
44780		if self.msg_id.chars().count() > 35 {
44781			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44782		}
44783		if let Some(ref val) = self.chrgs_rqstr { val.validate()? }
44784		if let Some(ref val) = self.ttl_chrgs { val.validate()? }
44785		if let Some(ref val) = self.chrgs_acct { val.validate()? }
44786		if let Some(ref val) = self.chrgs_acct_ownr { val.validate()? }
44787		Ok(())
44788	}
44789}
44790
44791
44792// GroupHeader127 ...
44793#[cfg_attr(feature = "derive_debug", derive(Debug))]
44794#[cfg_attr(feature = "derive_default", derive(Default))]
44795#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44796#[cfg_attr(feature = "derive_clone", derive(Clone))]
44797#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44798pub struct GroupHeader127 {
44799	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44800	pub msg_id: String,
44801	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44802	pub cre_dt_tm: String,
44803	#[cfg_attr( feature = "derive_serde", serde(rename = "Authstn", skip_serializing_if = "Option::is_none") )]
44804	pub authstn: Option<Vec<Authorisation1Choice>>,
44805	#[cfg_attr( feature = "derive_serde", serde(rename = "BtchBookg", skip_serializing_if = "Option::is_none") )]
44806	pub btch_bookg: Option<bool>,
44807	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs") )]
44808	pub nb_of_txs: String,
44809	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
44810	pub ctrl_sum: Option<f64>,
44811	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpRvsl", skip_serializing_if = "Option::is_none") )]
44812	pub grp_rvsl: Option<bool>,
44813	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlRvsdIntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
44814	pub ttl_rvsd_intr_bk_sttlm_amt: Option<ActiveCurrencyAndAmount>,
44815	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
44816	pub intr_bk_sttlm_dt: Option<String>,
44817	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInf") )]
44818	pub sttlm_inf: SettlementInstruction15,
44819	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
44820	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44821	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
44822	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44823}
44824
44825impl GroupHeader127 {
44826	pub fn validate(&self) -> Result<(), ValidationError> {
44827		if self.msg_id.chars().count() < 1 {
44828			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44829		}
44830		if self.msg_id.chars().count() > 35 {
44831			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44832		}
44833		if let Some(ref vec) = self.authstn { for item in vec { item.validate()? } }
44834		let pattern = Regex::new("[0-9]{1,15}").unwrap();
44835		if !pattern.is_match(&self.nb_of_txs) {
44836			return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
44837		}
44838		if let Some(ref val) = self.ttl_rvsd_intr_bk_sttlm_amt { val.validate()? }
44839		self.sttlm_inf.validate()?;
44840		if let Some(ref val) = self.instg_agt { val.validate()? }
44841		if let Some(ref val) = self.instd_agt { val.validate()? }
44842		Ok(())
44843	}
44844}
44845
44846
44847// GroupHeader128 ...
44848#[cfg_attr(feature = "derive_debug", derive(Debug))]
44849#[cfg_attr(feature = "derive_default", derive(Default))]
44850#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44851#[cfg_attr(feature = "derive_clone", derive(Clone))]
44852#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44853pub struct GroupHeader128 {
44854	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44855	pub msg_id: String,
44856	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44857	pub cre_dt_tm: String,
44858	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty", skip_serializing_if = "Option::is_none") )]
44859	pub initg_pty: Option<PartyIdentification272>,
44860	#[cfg_attr( feature = "derive_serde", serde(rename = "FwdgAgt", skip_serializing_if = "Option::is_none") )]
44861	pub fwdg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44862	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
44863	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44864	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
44865	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
44866}
44867
44868impl GroupHeader128 {
44869	pub fn validate(&self) -> Result<(), ValidationError> {
44870		if self.msg_id.chars().count() < 1 {
44871			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44872		}
44873		if self.msg_id.chars().count() > 35 {
44874			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44875		}
44876		if let Some(ref val) = self.initg_pty { val.validate()? }
44877		if let Some(ref val) = self.fwdg_agt { val.validate()? }
44878		if let Some(ref val) = self.dbtr_agt { val.validate()? }
44879		if let Some(ref val) = self.cdtr_agt { val.validate()? }
44880		Ok(())
44881	}
44882}
44883
44884
44885// GroupHeader129 ...
44886#[cfg_attr(feature = "derive_debug", derive(Debug))]
44887#[cfg_attr(feature = "derive_default", derive(Default))]
44888#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44889#[cfg_attr(feature = "derive_clone", derive(Clone))]
44890#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44891pub struct GroupHeader129 {
44892	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
44893	pub msg_id: String,
44894	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
44895	pub cre_dt_tm: String,
44896	#[cfg_attr( feature = "derive_serde", serde(rename = "Sndr") )]
44897	pub sndr: Party50Choice,
44898	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcvr") )]
44899	pub rcvr: Party50Choice,
44900}
44901
44902impl GroupHeader129 {
44903	pub fn validate(&self) -> Result<(), ValidationError> {
44904		if self.msg_id.chars().count() < 1 {
44905			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
44906		}
44907		if self.msg_id.chars().count() > 35 {
44908			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
44909		}
44910		self.sndr.validate()?;
44911		self.rcvr.validate()?;
44912		Ok(())
44913	}
44914}
44915
44916
44917// GroupHeader69 ...
44918#[cfg_attr(feature = "derive_debug", derive(Debug))]
44919#[cfg_attr(feature = "derive_default", derive(Default))]
44920#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44921#[cfg_attr(feature = "derive_clone", derive(Clone))]
44922#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44923pub struct GroupHeader69 {
44924	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
44925	pub id: String,
44926	#[cfg_attr( feature = "derive_serde", serde(rename = "IssdDt") )]
44927	pub issd_dt: String,
44928	#[cfg_attr( feature = "derive_serde", serde(rename = "RptCtgy") )]
44929	pub rpt_ctgy: String,
44930	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRptPurp") )]
44931	pub tax_rpt_purp: String,
44932	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlId", skip_serializing_if = "Option::is_none") )]
44933	pub orgnl_id: Option<String>,
44934	#[cfg_attr( feature = "derive_serde", serde(rename = "SellrTaxRprtv", skip_serializing_if = "Option::is_none") )]
44935	pub sellr_tax_rprtv: Option<PartyIdentification116>,
44936	#[cfg_attr( feature = "derive_serde", serde(rename = "BuyrTaxRprtv", skip_serializing_if = "Option::is_none") )]
44937	pub buyr_tax_rprtv: Option<PartyIdentification116>,
44938	#[cfg_attr( feature = "derive_serde", serde(rename = "LangCd", skip_serializing_if = "Option::is_none") )]
44939	pub lang_cd: Option<String>,
44940}
44941
44942impl GroupHeader69 {
44943	pub fn validate(&self) -> Result<(), ValidationError> {
44944		if self.id.chars().count() < 1 {
44945			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
44946		}
44947		if self.id.chars().count() > 35 {
44948			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
44949		}
44950		if self.rpt_ctgy.chars().count() < 1 {
44951			return Err(ValidationError::new(1001, "rpt_ctgy is shorter than the minimum length of 1".to_string()));
44952		}
44953		if self.rpt_ctgy.chars().count() > 4 {
44954			return Err(ValidationError::new(1002, "rpt_ctgy exceeds the maximum length of 4".to_string()));
44955		}
44956		if self.tax_rpt_purp.chars().count() < 1 {
44957			return Err(ValidationError::new(1001, "tax_rpt_purp is shorter than the minimum length of 1".to_string()));
44958		}
44959		if self.tax_rpt_purp.chars().count() > 4 {
44960			return Err(ValidationError::new(1002, "tax_rpt_purp exceeds the maximum length of 4".to_string()));
44961		}
44962		if let Some(ref val) = self.orgnl_id {
44963			if val.chars().count() < 1 {
44964				return Err(ValidationError::new(1001, "orgnl_id is shorter than the minimum length of 1".to_string()));
44965			}
44966			if val.chars().count() > 35 {
44967				return Err(ValidationError::new(1002, "orgnl_id exceeds the maximum length of 35".to_string()));
44968			}
44969		}
44970		if let Some(ref val) = self.sellr_tax_rprtv { val.validate()? }
44971		if let Some(ref val) = self.buyr_tax_rprtv { val.validate()? }
44972		Ok(())
44973	}
44974}
44975
44976
44977// Guarantee1 ...
44978#[cfg_attr(feature = "derive_debug", derive(Debug))]
44979#[cfg_attr(feature = "derive_default", derive(Default))]
44980#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
44981#[cfg_attr(feature = "derive_clone", derive(Clone))]
44982#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
44983pub struct Guarantee1 {
44984	#[cfg_attr( feature = "derive_serde", serde(rename = "Prvdr") )]
44985	pub prvdr: PartyIdentification118Choice,
44986	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
44987	pub amt: ActiveCurrencyAndAmount,
44988}
44989
44990impl Guarantee1 {
44991	pub fn validate(&self) -> Result<(), ValidationError> {
44992		self.prvdr.validate()?;
44993		self.amt.validate()?;
44994		Ok(())
44995	}
44996}
44997
44998
44999// HighFrequencyTradingProfile1 ...
45000#[cfg_attr(feature = "derive_debug", derive(Debug))]
45001#[cfg_attr(feature = "derive_default", derive(Default))]
45002#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45003#[cfg_attr(feature = "derive_clone", derive(Clone))]
45004#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45005pub struct HighFrequencyTradingProfile1 {
45006	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
45007	pub dt: Option<String>,
45008	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmFrqcy", skip_serializing_if = "Option::is_none") )]
45009	pub sttlm_frqcy: Option<SettlementFrequency1Choice>,
45010	#[cfg_attr( feature = "derive_serde", serde(rename = "CnsldtnTp", skip_serializing_if = "Option::is_none") )]
45011	pub cnsldtn_tp: Option<ConsolidationType1Choice>,
45012}
45013
45014impl HighFrequencyTradingProfile1 {
45015	pub fn validate(&self) -> Result<(), ValidationError> {
45016		if let Some(ref val) = self.sttlm_frqcy { val.validate()? }
45017		if let Some(ref val) = self.cnsldtn_tp { val.validate()? }
45018		Ok(())
45019	}
45020}
45021
45022
45023// Holding1Code ...
45024#[cfg_attr(feature = "derive_debug", derive(Debug))]
45025#[cfg_attr(feature = "derive_default", derive(Default))]
45026#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45027#[cfg_attr(feature = "derive_clone", derive(Clone))]
45028#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45029pub enum Holding1Code {
45030	#[cfg_attr(feature = "derive_default", default)]
45031	#[cfg_attr( feature = "derive_serde", serde(rename = "CERT") )]
45032	CodeCERT,
45033	#[cfg_attr( feature = "derive_serde", serde(rename = "NPRH") )]
45034	CodeNPRH,
45035	#[cfg_attr( feature = "derive_serde", serde(rename = "PRTH") )]
45036	CodePRTH,
45037}
45038
45039impl Holding1Code {
45040	pub fn validate(&self) -> Result<(), ValidationError> {
45041		Ok(())
45042	}
45043}
45044
45045
45046// HoldingTransferable1Code ...
45047#[cfg_attr(feature = "derive_debug", derive(Debug))]
45048#[cfg_attr(feature = "derive_default", derive(Default))]
45049#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45050#[cfg_attr(feature = "derive_clone", derive(Clone))]
45051#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45052pub enum HoldingTransferable1Code {
45053	#[cfg_attr(feature = "derive_default", default)]
45054	#[cfg_attr( feature = "derive_serde", serde(rename = "TRAL") )]
45055	CodeTRAL,
45056	#[cfg_attr( feature = "derive_serde", serde(rename = "TRNA") )]
45057	CodeTRNA,
45058	#[cfg_attr( feature = "derive_serde", serde(rename = "RFOD") )]
45059	CodeRFOD,
45060}
45061
45062impl HoldingTransferable1Code {
45063	pub fn validate(&self) -> Result<(), ValidationError> {
45064		Ok(())
45065	}
45066}
45067
45068
45069// HypotheticalCapitalMeasure1 ...
45070#[cfg_attr(feature = "derive_debug", derive(Debug))]
45071#[cfg_attr(feature = "derive_default", derive(Default))]
45072#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45073#[cfg_attr(feature = "derive_clone", derive(Clone))]
45074#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45075pub struct HypotheticalCapitalMeasure1 {
45076	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
45077	pub amt: ActiveCurrencyAndAmount,
45078	#[cfg_attr( feature = "derive_serde", serde(rename = "DfltWtrfllId") )]
45079	pub dflt_wtrfll_id: String,
45080}
45081
45082impl HypotheticalCapitalMeasure1 {
45083	pub fn validate(&self) -> Result<(), ValidationError> {
45084		self.amt.validate()?;
45085		if self.dflt_wtrfll_id.chars().count() < 1 {
45086			return Err(ValidationError::new(1001, "dflt_wtrfll_id is shorter than the minimum length of 1".to_string()));
45087		}
45088		if self.dflt_wtrfll_id.chars().count() > 35 {
45089			return Err(ValidationError::new(1002, "dflt_wtrfll_id exceeds the maximum length of 35".to_string()));
45090		}
45091		Ok(())
45092	}
45093}
45094
45095
45096// ISINQueryCriteria1 ...
45097#[cfg_attr(feature = "derive_debug", derive(Debug))]
45098#[cfg_attr(feature = "derive_default", derive(Default))]
45099#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45100#[cfg_attr(feature = "derive_clone", derive(Clone))]
45101#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45102pub struct ISINQueryCriteria1 {
45103	#[cfg_attr( feature = "derive_serde", serde(rename = "Idr", skip_serializing_if = "Option::is_none") )]
45104	pub idr: Option<Vec<String>>,
45105	#[cfg_attr( feature = "derive_serde", serde(rename = "NotRptd", skip_serializing_if = "Option::is_none") )]
45106	pub not_rptd: Option<NotReported1Code>,
45107}
45108
45109impl ISINQueryCriteria1 {
45110	pub fn validate(&self) -> Result<(), ValidationError> {
45111		if let Some(ref vec) = self.idr {
45112			for item in vec {
45113				let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
45114				if !pattern.is_match(&item) {
45115					return Err(ValidationError::new(1005, "idr does not match the required pattern".to_string()));
45116				}
45117			}
45118		}
45119		if let Some(ref val) = self.not_rptd { val.validate()? }
45120		Ok(())
45121	}
45122}
45123
45124
45125// IdentificationAssignment4 ...
45126#[cfg_attr(feature = "derive_debug", derive(Debug))]
45127#[cfg_attr(feature = "derive_default", derive(Default))]
45128#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45129#[cfg_attr(feature = "derive_clone", derive(Clone))]
45130#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45131pub struct IdentificationAssignment4 {
45132	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
45133	pub msg_id: String,
45134	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
45135	pub cre_dt_tm: String,
45136	#[cfg_attr( feature = "derive_serde", serde(rename = "Cretr", skip_serializing_if = "Option::is_none") )]
45137	pub cretr: Option<Party50Choice>,
45138	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstAgt", skip_serializing_if = "Option::is_none") )]
45139	pub frst_agt: Option<BranchAndFinancialInstitutionIdentification8>,
45140	#[cfg_attr( feature = "derive_serde", serde(rename = "Assgnr") )]
45141	pub assgnr: Party50Choice,
45142	#[cfg_attr( feature = "derive_serde", serde(rename = "Assgne") )]
45143	pub assgne: Party50Choice,
45144}
45145
45146impl IdentificationAssignment4 {
45147	pub fn validate(&self) -> Result<(), ValidationError> {
45148		if self.msg_id.chars().count() < 1 {
45149			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
45150		}
45151		if self.msg_id.chars().count() > 35 {
45152			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
45153		}
45154		if let Some(ref val) = self.cretr { val.validate()? }
45155		if let Some(ref val) = self.frst_agt { val.validate()? }
45156		self.assgnr.validate()?;
45157		self.assgne.validate()?;
45158		Ok(())
45159	}
45160}
45161
45162
45163// IdentificationInformation5 ...
45164#[cfg_attr(feature = "derive_debug", derive(Debug))]
45165#[cfg_attr(feature = "derive_default", derive(Default))]
45166#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45167#[cfg_attr(feature = "derive_clone", derive(Clone))]
45168#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45169pub struct IdentificationInformation5 {
45170	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty", skip_serializing_if = "Option::is_none") )]
45171	pub pty: Option<PartyIdentification272>,
45172	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
45173	pub acct: Option<CashAccount40>,
45174	#[cfg_attr( feature = "derive_serde", serde(rename = "Agt", skip_serializing_if = "Option::is_none") )]
45175	pub agt: Option<BranchAndFinancialInstitutionIdentification8>,
45176}
45177
45178impl IdentificationInformation5 {
45179	pub fn validate(&self) -> Result<(), ValidationError> {
45180		if let Some(ref val) = self.pty { val.validate()? }
45181		if let Some(ref val) = self.acct { val.validate()? }
45182		if let Some(ref val) = self.agt { val.validate()? }
45183		Ok(())
45184	}
45185}
45186
45187
45188// IdentificationModification5 ...
45189#[cfg_attr(feature = "derive_debug", derive(Debug))]
45190#[cfg_attr(feature = "derive_default", derive(Default))]
45191#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45192#[cfg_attr(feature = "derive_clone", derive(Clone))]
45193#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45194pub struct IdentificationModification5 {
45195	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
45196	pub id: String,
45197	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPtyAndAcctId", skip_serializing_if = "Option::is_none") )]
45198	pub orgnl_pty_and_acct_id: Option<IdentificationInformation5>,
45199	#[cfg_attr( feature = "derive_serde", serde(rename = "UpdtdPtyAndAcctId") )]
45200	pub updtd_pty_and_acct_id: IdentificationInformation5,
45201	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
45202	pub addtl_inf: Option<String>,
45203}
45204
45205impl IdentificationModification5 {
45206	pub fn validate(&self) -> Result<(), ValidationError> {
45207		if self.id.chars().count() < 1 {
45208			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
45209		}
45210		if self.id.chars().count() > 35 {
45211			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
45212		}
45213		if let Some(ref val) = self.orgnl_pty_and_acct_id { val.validate()? }
45214		self.updtd_pty_and_acct_id.validate()?;
45215		if let Some(ref val) = self.addtl_inf {
45216			if val.chars().count() < 1 {
45217				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
45218			}
45219			if val.chars().count() > 140 {
45220				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
45221			}
45222		}
45223		Ok(())
45224	}
45225}
45226
45227
45228// IdentificationSource1Choice ...
45229#[cfg_attr(feature = "derive_debug", derive(Debug))]
45230#[cfg_attr(feature = "derive_default", derive(Default))]
45231#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45232#[cfg_attr(feature = "derive_clone", derive(Clone))]
45233#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45234pub struct IdentificationSource1Choice {
45235	#[cfg_attr( feature = "derive_serde", serde(rename = "Dmst", skip_serializing_if = "Option::is_none") )]
45236	pub dmst: Option<String>,
45237	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
45238	pub prtry: Option<String>,
45239}
45240
45241impl IdentificationSource1Choice {
45242	pub fn validate(&self) -> Result<(), ValidationError> {
45243		if let Some(ref val) = self.dmst {
45244			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
45245			if !pattern.is_match(val) {
45246				return Err(ValidationError::new(1005, "dmst does not match the required pattern".to_string()));
45247			}
45248		}
45249		if let Some(ref val) = self.prtry {
45250			if val.chars().count() < 1 {
45251				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
45252			}
45253			if val.chars().count() > 35 {
45254				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
45255			}
45256		}
45257		Ok(())
45258	}
45259}
45260
45261
45262// IdentificationSource3Choice ...
45263#[cfg_attr(feature = "derive_debug", derive(Debug))]
45264#[cfg_attr(feature = "derive_default", derive(Default))]
45265#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45266#[cfg_attr(feature = "derive_clone", derive(Clone))]
45267#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45268pub struct IdentificationSource3Choice {
45269	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
45270	pub cd: Option<String>,
45271	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
45272	pub prtry: Option<String>,
45273}
45274
45275impl IdentificationSource3Choice {
45276	pub fn validate(&self) -> Result<(), ValidationError> {
45277		if let Some(ref val) = self.cd {
45278			if val.chars().count() < 1 {
45279				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
45280			}
45281			if val.chars().count() > 4 {
45282				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
45283			}
45284		}
45285		if let Some(ref val) = self.prtry {
45286			if val.chars().count() < 1 {
45287				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
45288			}
45289			if val.chars().count() > 35 {
45290				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
45291			}
45292		}
45293		Ok(())
45294	}
45295}
45296
45297
45298// IdentificationSource5Choice ...
45299#[cfg_attr(feature = "derive_debug", derive(Debug))]
45300#[cfg_attr(feature = "derive_default", derive(Default))]
45301#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45302#[cfg_attr(feature = "derive_clone", derive(Clone))]
45303#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45304pub struct IdentificationSource5Choice {
45305	#[cfg_attr( feature = "derive_serde", serde(rename = "DmstIdSrc", skip_serializing_if = "Option::is_none") )]
45306	pub dmst_id_src: Option<String>,
45307	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryIdSrc", skip_serializing_if = "Option::is_none") )]
45308	pub prtry_id_src: Option<String>,
45309}
45310
45311impl IdentificationSource5Choice {
45312	pub fn validate(&self) -> Result<(), ValidationError> {
45313		if let Some(ref val) = self.dmst_id_src {
45314			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
45315			if !pattern.is_match(val) {
45316				return Err(ValidationError::new(1005, "dmst_id_src does not match the required pattern".to_string()));
45317			}
45318		}
45319		if let Some(ref val) = self.prtry_id_src {
45320			if val.chars().count() < 1 {
45321				return Err(ValidationError::new(1001, "prtry_id_src is shorter than the minimum length of 1".to_string()));
45322			}
45323			if val.chars().count() > 35 {
45324				return Err(ValidationError::new(1002, "prtry_id_src exceeds the maximum length of 35".to_string()));
45325			}
45326		}
45327		Ok(())
45328	}
45329}
45330
45331
45332// IdentificationVerification5 ...
45333#[cfg_attr(feature = "derive_debug", derive(Debug))]
45334#[cfg_attr(feature = "derive_default", derive(Default))]
45335#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45336#[cfg_attr(feature = "derive_clone", derive(Clone))]
45337#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45338pub struct IdentificationVerification5 {
45339	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
45340	pub id: String,
45341	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyAndAcctId") )]
45342	pub pty_and_acct_id: IdentificationInformation5,
45343}
45344
45345impl IdentificationVerification5 {
45346	pub fn validate(&self) -> Result<(), ValidationError> {
45347		if self.id.chars().count() < 1 {
45348			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
45349		}
45350		if self.id.chars().count() > 35 {
45351			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
45352		}
45353		self.pty_and_acct_id.validate()?;
45354		Ok(())
45355	}
45356}
45357
45358
45359// ImplementationSpecification1 ...
45360#[cfg_attr(feature = "derive_debug", derive(Debug))]
45361#[cfg_attr(feature = "derive_default", derive(Default))]
45362#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45363#[cfg_attr(feature = "derive_clone", derive(Clone))]
45364#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45365pub struct ImplementationSpecification1 {
45366	#[cfg_attr( feature = "derive_serde", serde(rename = "Regy") )]
45367	pub regy: String,
45368	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
45369	pub id: String,
45370}
45371
45372impl ImplementationSpecification1 {
45373	pub fn validate(&self) -> Result<(), ValidationError> {
45374		if self.regy.chars().count() < 1 {
45375			return Err(ValidationError::new(1001, "regy is shorter than the minimum length of 1".to_string()));
45376		}
45377		if self.regy.chars().count() > 350 {
45378			return Err(ValidationError::new(1002, "regy exceeds the maximum length of 350".to_string()));
45379		}
45380		if self.id.chars().count() < 1 {
45381			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
45382		}
45383		if self.id.chars().count() > 2048 {
45384			return Err(ValidationError::new(1002, "id exceeds the maximum length of 2048".to_string()));
45385		}
45386		Ok(())
45387	}
45388}
45389
45390
45391// ImpliedCurrencyAmountRange1Choice ...
45392#[cfg_attr(feature = "derive_debug", derive(Debug))]
45393#[cfg_attr(feature = "derive_default", derive(Default))]
45394#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45395#[cfg_attr(feature = "derive_clone", derive(Clone))]
45396#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45397pub struct ImpliedCurrencyAmountRange1Choice {
45398	#[cfg_attr( feature = "derive_serde", serde(rename = "FrAmt", skip_serializing_if = "Option::is_none") )]
45399	pub fr_amt: Option<AmountRangeBoundary1>,
45400	#[cfg_attr( feature = "derive_serde", serde(rename = "ToAmt", skip_serializing_if = "Option::is_none") )]
45401	pub to_amt: Option<AmountRangeBoundary1>,
45402	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToAmt", skip_serializing_if = "Option::is_none") )]
45403	pub fr_to_amt: Option<FromToAmountRange1>,
45404	#[cfg_attr( feature = "derive_serde", serde(rename = "EQAmt", skip_serializing_if = "Option::is_none") )]
45405	pub eq_amt: Option<f64>,
45406	#[cfg_attr( feature = "derive_serde", serde(rename = "NEQAmt", skip_serializing_if = "Option::is_none") )]
45407	pub neq_amt: Option<f64>,
45408}
45409
45410impl ImpliedCurrencyAmountRange1Choice {
45411	pub fn validate(&self) -> Result<(), ValidationError> {
45412		if let Some(ref val) = self.fr_amt { val.validate()? }
45413		if let Some(ref val) = self.to_amt { val.validate()? }
45414		if let Some(ref val) = self.fr_to_amt { val.validate()? }
45415		if let Some(ref val) = self.eq_amt {
45416			if *val < 0.000000 {
45417				return Err(ValidationError::new(1003, "eq_amt is less than the minimum value of 0.000000".to_string()));
45418			}
45419		}
45420		if let Some(ref val) = self.neq_amt {
45421			if *val < 0.000000 {
45422				return Err(ValidationError::new(1003, "neq_amt is less than the minimum value of 0.000000".to_string()));
45423			}
45424		}
45425		Ok(())
45426	}
45427}
45428
45429
45430// ImpliedCurrencyAndAmountRange1 ...
45431#[cfg_attr(feature = "derive_debug", derive(Debug))]
45432#[cfg_attr(feature = "derive_default", derive(Default))]
45433#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45434#[cfg_attr(feature = "derive_clone", derive(Clone))]
45435#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45436pub struct ImpliedCurrencyAndAmountRange1 {
45437	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
45438	pub amt: ImpliedCurrencyAmountRange1Choice,
45439	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
45440	pub cdt_dbt_ind: Option<CreditDebitCode>,
45441}
45442
45443impl ImpliedCurrencyAndAmountRange1 {
45444	pub fn validate(&self) -> Result<(), ValidationError> {
45445		self.amt.validate()?;
45446		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
45447		Ok(())
45448	}
45449}
45450
45451
45452// IncomePreference2Code ...
45453#[cfg_attr(feature = "derive_debug", derive(Debug))]
45454#[cfg_attr(feature = "derive_default", derive(Default))]
45455#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45456#[cfg_attr(feature = "derive_clone", derive(Clone))]
45457#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45458pub enum IncomePreference2Code {
45459	#[cfg_attr(feature = "derive_default", default)]
45460	#[cfg_attr( feature = "derive_serde", serde(rename = "CASH") )]
45461	CodeCASH,
45462	#[cfg_attr( feature = "derive_serde", serde(rename = "SECU") )]
45463	CodeSECU,
45464}
45465
45466impl IncomePreference2Code {
45467	pub fn validate(&self) -> Result<(), ValidationError> {
45468		Ok(())
45469	}
45470}
45471
45472
45473// IncomeStatement1 ...
45474#[cfg_attr(feature = "derive_debug", derive(Debug))]
45475#[cfg_attr(feature = "derive_default", derive(Default))]
45476#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45477#[cfg_attr(feature = "derive_clone", derive(Clone))]
45478#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45479pub struct IncomeStatement1 {
45480	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrFees") )]
45481	pub clr_fees: ActiveCurrencyAndAmount,
45482	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrOprgRvn") )]
45483	pub othr_oprg_rvn: ActiveCurrencyAndAmount,
45484	#[cfg_attr( feature = "derive_serde", serde(rename = "OprgExpnss") )]
45485	pub oprg_expnss: ActiveCurrencyAndAmount,
45486	#[cfg_attr( feature = "derive_serde", serde(rename = "OprgPrftOrLoss") )]
45487	pub oprg_prft_or_loss: AmountAndDirection102,
45488	#[cfg_attr( feature = "derive_serde", serde(rename = "NetIntrstIncm") )]
45489	pub net_intrst_incm: ActiveCurrencyAndAmount,
45490	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrNonOprgRvn") )]
45491	pub othr_non_oprg_rvn: ActiveCurrencyAndAmount,
45492	#[cfg_attr( feature = "derive_serde", serde(rename = "NonOprgExpnss") )]
45493	pub non_oprg_expnss: ActiveCurrencyAndAmount,
45494	#[cfg_attr( feature = "derive_serde", serde(rename = "PreTaxPrftOrLoss") )]
45495	pub pre_tax_prft_or_loss: AmountAndDirection102,
45496	#[cfg_attr( feature = "derive_serde", serde(rename = "PstTaxPrftOrLoss") )]
45497	pub pst_tax_prft_or_loss: AmountAndDirection102,
45498}
45499
45500impl IncomeStatement1 {
45501	pub fn validate(&self) -> Result<(), ValidationError> {
45502		self.clr_fees.validate()?;
45503		self.othr_oprg_rvn.validate()?;
45504		self.oprg_expnss.validate()?;
45505		self.oprg_prft_or_loss.validate()?;
45506		self.net_intrst_incm.validate()?;
45507		self.othr_non_oprg_rvn.validate()?;
45508		self.non_oprg_expnss.validate()?;
45509		self.pre_tax_prft_or_loss.validate()?;
45510		self.pst_tax_prft_or_loss.validate()?;
45511		Ok(())
45512	}
45513}
45514
45515
45516// IncorrectData1Choice ...
45517#[cfg_attr(feature = "derive_debug", derive(Debug))]
45518#[cfg_attr(feature = "derive_default", derive(Default))]
45519#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45520#[cfg_attr(feature = "derive_clone", derive(Clone))]
45521#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45522pub struct IncorrectData1Choice {
45523	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
45524	pub cd: Option<String>,
45525	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
45526	pub prtry: Option<String>,
45527}
45528
45529impl IncorrectData1Choice {
45530	pub fn validate(&self) -> Result<(), ValidationError> {
45531		if let Some(ref val) = self.cd {
45532			if val.chars().count() < 1 {
45533				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
45534			}
45535			if val.chars().count() > 4 {
45536				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
45537			}
45538		}
45539		if let Some(ref val) = self.prtry {
45540			if val.chars().count() < 1 {
45541				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
45542			}
45543			if val.chars().count() > 35 {
45544				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
45545			}
45546		}
45547		Ok(())
45548	}
45549}
45550
45551
45552// IndexIdentification1 ...
45553#[cfg_attr(feature = "derive_debug", derive(Debug))]
45554#[cfg_attr(feature = "derive_default", derive(Default))]
45555#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45556#[cfg_attr(feature = "derive_clone", derive(Clone))]
45557#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45558pub struct IndexIdentification1 {
45559	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
45560	pub isin: Option<String>,
45561	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
45562	pub nm: Option<String>,
45563	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
45564	pub indx: Option<String>,
45565}
45566
45567impl IndexIdentification1 {
45568	pub fn validate(&self) -> Result<(), ValidationError> {
45569		if let Some(ref val) = self.isin {
45570			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
45571			if !pattern.is_match(val) {
45572				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
45573			}
45574		}
45575		if let Some(ref val) = self.nm {
45576			if val.chars().count() < 1 {
45577				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
45578			}
45579			if val.chars().count() > 350 {
45580				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
45581			}
45582		}
45583		if let Some(ref val) = self.indx {
45584			if val.chars().count() < 1 {
45585				return Err(ValidationError::new(1001, "indx is shorter than the minimum length of 1".to_string()));
45586			}
45587			if val.chars().count() > 4 {
45588				return Err(ValidationError::new(1002, "indx exceeds the maximum length of 4".to_string()));
45589			}
45590		}
45591		Ok(())
45592	}
45593}
45594
45595
45596// IndividualCostOrCharge2 ...
45597#[cfg_attr(feature = "derive_debug", derive(Debug))]
45598#[cfg_attr(feature = "derive_default", derive(Default))]
45599#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45600#[cfg_attr(feature = "derive_clone", derive(Clone))]
45601#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45602pub struct IndividualCostOrCharge2 {
45603	#[cfg_attr( feature = "derive_serde", serde(rename = "CostTp") )]
45604	pub cost_tp: ChargeType8Choice,
45605	#[cfg_attr( feature = "derive_serde", serde(rename = "ExAnteOrExPst") )]
45606	pub ex_ante_or_ex_pst: IntendedOrActual2Code,
45607	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
45608	pub amt: Option<ActiveCurrencyAnd13DecimalAmount>,
45609	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgn", skip_serializing_if = "Option::is_none") )]
45610	pub sgn: Option<bool>,
45611	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
45612	pub rate: Option<f64>,
45613	#[cfg_attr( feature = "derive_serde", serde(rename = "RefPrd", skip_serializing_if = "Option::is_none") )]
45614	pub ref_prd: Option<Period15>,
45615	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
45616	pub addtl_inf: Option<AdditionalInformation15>,
45617}
45618
45619impl IndividualCostOrCharge2 {
45620	pub fn validate(&self) -> Result<(), ValidationError> {
45621		self.cost_tp.validate()?;
45622		self.ex_ante_or_ex_pst.validate()?;
45623		if let Some(ref val) = self.amt { val.validate()? }
45624		if let Some(ref val) = self.ref_prd { val.validate()? }
45625		if let Some(ref val) = self.addtl_inf { val.validate()? }
45626		Ok(())
45627	}
45628}
45629
45630
45631// IndividualPerson29 ...
45632#[cfg_attr(feature = "derive_debug", derive(Debug))]
45633#[cfg_attr(feature = "derive_default", derive(Default))]
45634#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45635#[cfg_attr(feature = "derive_clone", derive(Clone))]
45636#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45637pub struct IndividualPerson29 {
45638	#[cfg_attr( feature = "derive_serde", serde(rename = "NmPrfx", skip_serializing_if = "Option::is_none") )]
45639	pub nm_prfx: Option<NamePrefix1Choice>,
45640	#[cfg_attr( feature = "derive_serde", serde(rename = "GvnNm", skip_serializing_if = "Option::is_none") )]
45641	pub gvn_nm: Option<String>,
45642	#[cfg_attr( feature = "derive_serde", serde(rename = "MddlNm", skip_serializing_if = "Option::is_none") )]
45643	pub mddl_nm: Option<String>,
45644	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
45645	pub nm: String,
45646	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr") )]
45647	pub pstl_adr: Vec<PostalAddress21>,
45648}
45649
45650impl IndividualPerson29 {
45651	pub fn validate(&self) -> Result<(), ValidationError> {
45652		if let Some(ref val) = self.nm_prfx { val.validate()? }
45653		if let Some(ref val) = self.gvn_nm {
45654			if val.chars().count() < 1 {
45655				return Err(ValidationError::new(1001, "gvn_nm is shorter than the minimum length of 1".to_string()));
45656			}
45657			if val.chars().count() > 35 {
45658				return Err(ValidationError::new(1002, "gvn_nm exceeds the maximum length of 35".to_string()));
45659			}
45660		}
45661		if let Some(ref val) = self.mddl_nm {
45662			if val.chars().count() < 1 {
45663				return Err(ValidationError::new(1001, "mddl_nm is shorter than the minimum length of 1".to_string()));
45664			}
45665			if val.chars().count() > 35 {
45666				return Err(ValidationError::new(1002, "mddl_nm exceeds the maximum length of 35".to_string()));
45667			}
45668		}
45669		if self.nm.chars().count() < 1 {
45670			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
45671		}
45672		if self.nm.chars().count() > 350 {
45673			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
45674		}
45675		for item in &self.pstl_adr { item.validate()? }
45676		Ok(())
45677	}
45678}
45679
45680
45681// IndividualPerson30 ...
45682#[cfg_attr(feature = "derive_debug", derive(Debug))]
45683#[cfg_attr(feature = "derive_default", derive(Default))]
45684#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45685#[cfg_attr(feature = "derive_clone", derive(Clone))]
45686#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45687pub struct IndividualPerson30 {
45688	#[cfg_attr( feature = "derive_serde", serde(rename = "GvnNm", skip_serializing_if = "Option::is_none") )]
45689	pub gvn_nm: Option<String>,
45690	#[cfg_attr( feature = "derive_serde", serde(rename = "MddlNm", skip_serializing_if = "Option::is_none") )]
45691	pub mddl_nm: Option<String>,
45692	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
45693	pub nm: String,
45694	#[cfg_attr( feature = "derive_serde", serde(rename = "Gndr", skip_serializing_if = "Option::is_none") )]
45695	pub gndr: Option<GenderCode>,
45696	#[cfg_attr( feature = "derive_serde", serde(rename = "BirthDt", skip_serializing_if = "Option::is_none") )]
45697	pub birth_dt: Option<String>,
45698}
45699
45700impl IndividualPerson30 {
45701	pub fn validate(&self) -> Result<(), ValidationError> {
45702		if let Some(ref val) = self.gvn_nm {
45703			if val.chars().count() < 1 {
45704				return Err(ValidationError::new(1001, "gvn_nm is shorter than the minimum length of 1".to_string()));
45705			}
45706			if val.chars().count() > 35 {
45707				return Err(ValidationError::new(1002, "gvn_nm exceeds the maximum length of 35".to_string()));
45708			}
45709		}
45710		if let Some(ref val) = self.mddl_nm {
45711			if val.chars().count() < 1 {
45712				return Err(ValidationError::new(1001, "mddl_nm is shorter than the minimum length of 1".to_string()));
45713			}
45714			if val.chars().count() > 35 {
45715				return Err(ValidationError::new(1002, "mddl_nm exceeds the maximum length of 35".to_string()));
45716			}
45717		}
45718		if self.nm.chars().count() < 1 {
45719			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
45720		}
45721		if self.nm.chars().count() > 350 {
45722			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
45723		}
45724		if let Some(ref val) = self.gndr { val.validate()? }
45725		Ok(())
45726	}
45727}
45728
45729
45730// IndividualPerson35 ...
45731#[cfg_attr(feature = "derive_debug", derive(Debug))]
45732#[cfg_attr(feature = "derive_default", derive(Default))]
45733#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45734#[cfg_attr(feature = "derive_clone", derive(Clone))]
45735#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45736pub struct IndividualPerson35 {
45737	#[cfg_attr( feature = "derive_serde", serde(rename = "GvnNm", skip_serializing_if = "Option::is_none") )]
45738	pub gvn_nm: Option<String>,
45739	#[cfg_attr( feature = "derive_serde", serde(rename = "MddlNm", skip_serializing_if = "Option::is_none") )]
45740	pub mddl_nm: Option<String>,
45741	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
45742	pub nm: String,
45743	#[cfg_attr( feature = "derive_serde", serde(rename = "Gndr", skip_serializing_if = "Option::is_none") )]
45744	pub gndr: Option<Gender1Code>,
45745	#[cfg_attr( feature = "derive_serde", serde(rename = "BirthDt", skip_serializing_if = "Option::is_none") )]
45746	pub birth_dt: Option<String>,
45747}
45748
45749impl IndividualPerson35 {
45750	pub fn validate(&self) -> Result<(), ValidationError> {
45751		if let Some(ref val) = self.gvn_nm {
45752			if val.chars().count() < 1 {
45753				return Err(ValidationError::new(1001, "gvn_nm is shorter than the minimum length of 1".to_string()));
45754			}
45755			if val.chars().count() > 35 {
45756				return Err(ValidationError::new(1002, "gvn_nm exceeds the maximum length of 35".to_string()));
45757			}
45758		}
45759		if let Some(ref val) = self.mddl_nm {
45760			if val.chars().count() < 1 {
45761				return Err(ValidationError::new(1001, "mddl_nm is shorter than the minimum length of 1".to_string()));
45762			}
45763			if val.chars().count() > 35 {
45764				return Err(ValidationError::new(1002, "mddl_nm exceeds the maximum length of 35".to_string()));
45765			}
45766		}
45767		if self.nm.chars().count() < 1 {
45768			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
45769		}
45770		if self.nm.chars().count() > 350 {
45771			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
45772		}
45773		if let Some(ref val) = self.gndr { val.validate()? }
45774		Ok(())
45775	}
45776}
45777
45778
45779// IndividualPerson37 ...
45780#[cfg_attr(feature = "derive_debug", derive(Debug))]
45781#[cfg_attr(feature = "derive_default", derive(Default))]
45782#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45783#[cfg_attr(feature = "derive_clone", derive(Clone))]
45784#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45785pub struct IndividualPerson37 {
45786	#[cfg_attr( feature = "derive_serde", serde(rename = "NmPrfx", skip_serializing_if = "Option::is_none") )]
45787	pub nm_prfx: Option<NamePrefix1Choice>,
45788	#[cfg_attr( feature = "derive_serde", serde(rename = "GvnNm", skip_serializing_if = "Option::is_none") )]
45789	pub gvn_nm: Option<String>,
45790	#[cfg_attr( feature = "derive_serde", serde(rename = "MddlNm", skip_serializing_if = "Option::is_none") )]
45791	pub mddl_nm: Option<String>,
45792	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
45793	pub nm: String,
45794	#[cfg_attr( feature = "derive_serde", serde(rename = "NmSfx", skip_serializing_if = "Option::is_none") )]
45795	pub nm_sfx: Option<String>,
45796	#[cfg_attr( feature = "derive_serde", serde(rename = "Gndr", skip_serializing_if = "Option::is_none") )]
45797	pub gndr: Option<Gender1Code>,
45798	#[cfg_attr( feature = "derive_serde", serde(rename = "BirthDt", skip_serializing_if = "Option::is_none") )]
45799	pub birth_dt: Option<String>,
45800	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfBirth", skip_serializing_if = "Option::is_none") )]
45801	pub ctry_of_birth: Option<String>,
45802	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvcOfBirth", skip_serializing_if = "Option::is_none") )]
45803	pub prvc_of_birth: Option<String>,
45804	#[cfg_attr( feature = "derive_serde", serde(rename = "CityOfBirth", skip_serializing_if = "Option::is_none") )]
45805	pub city_of_birth: Option<String>,
45806	#[cfg_attr( feature = "derive_serde", serde(rename = "Prfssn", skip_serializing_if = "Option::is_none") )]
45807	pub prfssn: Option<String>,
45808	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr") )]
45809	pub pstl_adr: Vec<PostalAddress21>,
45810	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctznsh", skip_serializing_if = "Option::is_none") )]
45811	pub ctznsh: Option<Vec<CitizenshipInformation2>>,
45812	#[cfg_attr( feature = "derive_serde", serde(rename = "EmplngCpny", skip_serializing_if = "Option::is_none") )]
45813	pub emplng_cpny: Option<String>,
45814	#[cfg_attr( feature = "derive_serde", serde(rename = "BizFctn", skip_serializing_if = "Option::is_none") )]
45815	pub biz_fctn: Option<String>,
45816	#[cfg_attr( feature = "derive_serde", serde(rename = "PltclyXpsdPrsn", skip_serializing_if = "Option::is_none") )]
45817	pub pltcly_xpsd_prsn: Option<PoliticallyExposedPerson1>,
45818	#[cfg_attr( feature = "derive_serde", serde(rename = "DthDt", skip_serializing_if = "Option::is_none") )]
45819	pub dth_dt: Option<String>,
45820	#[cfg_attr( feature = "derive_serde", serde(rename = "CvlSts", skip_serializing_if = "Option::is_none") )]
45821	pub cvl_sts: Option<CivilStatus1Choice>,
45822	#[cfg_attr( feature = "derive_serde", serde(rename = "EdctnLvl", skip_serializing_if = "Option::is_none") )]
45823	pub edctn_lvl: Option<String>,
45824	#[cfg_attr( feature = "derive_serde", serde(rename = "FmlyInf", skip_serializing_if = "Option::is_none") )]
45825	pub fmly_inf: Option<PersonalInformation1>,
45826	#[cfg_attr( feature = "derive_serde", serde(rename = "GDPRData", skip_serializing_if = "Option::is_none") )]
45827	pub gdpr_data: Option<Vec<GDPRData1>>,
45828}
45829
45830impl IndividualPerson37 {
45831	pub fn validate(&self) -> Result<(), ValidationError> {
45832		if let Some(ref val) = self.nm_prfx { val.validate()? }
45833		if let Some(ref val) = self.gvn_nm {
45834			if val.chars().count() < 1 {
45835				return Err(ValidationError::new(1001, "gvn_nm is shorter than the minimum length of 1".to_string()));
45836			}
45837			if val.chars().count() > 35 {
45838				return Err(ValidationError::new(1002, "gvn_nm exceeds the maximum length of 35".to_string()));
45839			}
45840		}
45841		if let Some(ref val) = self.mddl_nm {
45842			if val.chars().count() < 1 {
45843				return Err(ValidationError::new(1001, "mddl_nm is shorter than the minimum length of 1".to_string()));
45844			}
45845			if val.chars().count() > 35 {
45846				return Err(ValidationError::new(1002, "mddl_nm exceeds the maximum length of 35".to_string()));
45847			}
45848		}
45849		if self.nm.chars().count() < 1 {
45850			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
45851		}
45852		if self.nm.chars().count() > 350 {
45853			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
45854		}
45855		if let Some(ref val) = self.nm_sfx {
45856			if val.chars().count() < 1 {
45857				return Err(ValidationError::new(1001, "nm_sfx is shorter than the minimum length of 1".to_string()));
45858			}
45859			if val.chars().count() > 35 {
45860				return Err(ValidationError::new(1002, "nm_sfx exceeds the maximum length of 35".to_string()));
45861			}
45862		}
45863		if let Some(ref val) = self.gndr { val.validate()? }
45864		if let Some(ref val) = self.ctry_of_birth {
45865			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
45866			if !pattern.is_match(val) {
45867				return Err(ValidationError::new(1005, "ctry_of_birth does not match the required pattern".to_string()));
45868			}
45869		}
45870		if let Some(ref val) = self.prvc_of_birth {
45871			if val.chars().count() < 1 {
45872				return Err(ValidationError::new(1001, "prvc_of_birth is shorter than the minimum length of 1".to_string()));
45873			}
45874			if val.chars().count() > 35 {
45875				return Err(ValidationError::new(1002, "prvc_of_birth exceeds the maximum length of 35".to_string()));
45876			}
45877		}
45878		if let Some(ref val) = self.city_of_birth {
45879			if val.chars().count() < 1 {
45880				return Err(ValidationError::new(1001, "city_of_birth is shorter than the minimum length of 1".to_string()));
45881			}
45882			if val.chars().count() > 35 {
45883				return Err(ValidationError::new(1002, "city_of_birth exceeds the maximum length of 35".to_string()));
45884			}
45885		}
45886		if let Some(ref val) = self.prfssn {
45887			if val.chars().count() < 1 {
45888				return Err(ValidationError::new(1001, "prfssn is shorter than the minimum length of 1".to_string()));
45889			}
45890			if val.chars().count() > 35 {
45891				return Err(ValidationError::new(1002, "prfssn exceeds the maximum length of 35".to_string()));
45892			}
45893		}
45894		for item in &self.pstl_adr { item.validate()? }
45895		if let Some(ref vec) = self.ctznsh { for item in vec { item.validate()? } }
45896		if let Some(ref val) = self.emplng_cpny {
45897			if val.chars().count() < 1 {
45898				return Err(ValidationError::new(1001, "emplng_cpny is shorter than the minimum length of 1".to_string()));
45899			}
45900			if val.chars().count() > 140 {
45901				return Err(ValidationError::new(1002, "emplng_cpny exceeds the maximum length of 140".to_string()));
45902			}
45903		}
45904		if let Some(ref val) = self.biz_fctn {
45905			if val.chars().count() < 1 {
45906				return Err(ValidationError::new(1001, "biz_fctn is shorter than the minimum length of 1".to_string()));
45907			}
45908			if val.chars().count() > 35 {
45909				return Err(ValidationError::new(1002, "biz_fctn exceeds the maximum length of 35".to_string()));
45910			}
45911		}
45912		if let Some(ref val) = self.pltcly_xpsd_prsn { val.validate()? }
45913		if let Some(ref val) = self.cvl_sts { val.validate()? }
45914		if let Some(ref val) = self.edctn_lvl {
45915			if val.chars().count() < 1 {
45916				return Err(ValidationError::new(1001, "edctn_lvl is shorter than the minimum length of 1".to_string()));
45917			}
45918			if val.chars().count() > 35 {
45919				return Err(ValidationError::new(1002, "edctn_lvl exceeds the maximum length of 35".to_string()));
45920			}
45921		}
45922		if let Some(ref val) = self.fmly_inf { val.validate()? }
45923		if let Some(ref vec) = self.gdpr_data { for item in vec { item.validate()? } }
45924		Ok(())
45925	}
45926}
45927
45928
45929// IndividualPerson38 ...
45930#[cfg_attr(feature = "derive_debug", derive(Debug))]
45931#[cfg_attr(feature = "derive_default", derive(Default))]
45932#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
45933#[cfg_attr(feature = "derive_clone", derive(Clone))]
45934#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
45935pub struct IndividualPerson38 {
45936	#[cfg_attr( feature = "derive_serde", serde(rename = "NmPrfx", skip_serializing_if = "Option::is_none") )]
45937	pub nm_prfx: Option<NamePrefix1Choice>,
45938	#[cfg_attr( feature = "derive_serde", serde(rename = "GvnNm", skip_serializing_if = "Option::is_none") )]
45939	pub gvn_nm: Option<String>,
45940	#[cfg_attr( feature = "derive_serde", serde(rename = "MddlNm", skip_serializing_if = "Option::is_none") )]
45941	pub mddl_nm: Option<String>,
45942	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
45943	pub nm: String,
45944	#[cfg_attr( feature = "derive_serde", serde(rename = "NmSfx", skip_serializing_if = "Option::is_none") )]
45945	pub nm_sfx: Option<String>,
45946	#[cfg_attr( feature = "derive_serde", serde(rename = "Gndr", skip_serializing_if = "Option::is_none") )]
45947	pub gndr: Option<Gender1Code>,
45948	#[cfg_attr( feature = "derive_serde", serde(rename = "BirthDt", skip_serializing_if = "Option::is_none") )]
45949	pub birth_dt: Option<String>,
45950	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfBirth", skip_serializing_if = "Option::is_none") )]
45951	pub ctry_of_birth: Option<String>,
45952	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvcOfBirth", skip_serializing_if = "Option::is_none") )]
45953	pub prvc_of_birth: Option<String>,
45954	#[cfg_attr( feature = "derive_serde", serde(rename = "CityOfBirth", skip_serializing_if = "Option::is_none") )]
45955	pub city_of_birth: Option<String>,
45956	#[cfg_attr( feature = "derive_serde", serde(rename = "Prfssn", skip_serializing_if = "Option::is_none") )]
45957	pub prfssn: Option<String>,
45958	#[cfg_attr( feature = "derive_serde", serde(rename = "ModfdPstlAdr", skip_serializing_if = "Option::is_none") )]
45959	pub modfd_pstl_adr: Option<Vec<ModificationScope34>>,
45960	#[cfg_attr( feature = "derive_serde", serde(rename = "ModfdCtznsh", skip_serializing_if = "Option::is_none") )]
45961	pub modfd_ctznsh: Option<Vec<ModificationScope39>>,
45962	#[cfg_attr( feature = "derive_serde", serde(rename = "EmplngCpny", skip_serializing_if = "Option::is_none") )]
45963	pub emplng_cpny: Option<String>,
45964	#[cfg_attr( feature = "derive_serde", serde(rename = "BizFctn", skip_serializing_if = "Option::is_none") )]
45965	pub biz_fctn: Option<String>,
45966	#[cfg_attr( feature = "derive_serde", serde(rename = "PltclyXpsdPrsn", skip_serializing_if = "Option::is_none") )]
45967	pub pltcly_xpsd_prsn: Option<PoliticallyExposedPerson1>,
45968	#[cfg_attr( feature = "derive_serde", serde(rename = "DthDt", skip_serializing_if = "Option::is_none") )]
45969	pub dth_dt: Option<String>,
45970	#[cfg_attr( feature = "derive_serde", serde(rename = "CvlSts", skip_serializing_if = "Option::is_none") )]
45971	pub cvl_sts: Option<CivilStatus1Choice>,
45972	#[cfg_attr( feature = "derive_serde", serde(rename = "EdctnLvl", skip_serializing_if = "Option::is_none") )]
45973	pub edctn_lvl: Option<String>,
45974	#[cfg_attr( feature = "derive_serde", serde(rename = "FmlyInf", skip_serializing_if = "Option::is_none") )]
45975	pub fmly_inf: Option<PersonalInformation1>,
45976	#[cfg_attr( feature = "derive_serde", serde(rename = "GDPRData", skip_serializing_if = "Option::is_none") )]
45977	pub gdpr_data: Option<Vec<GDPRData1>>,
45978}
45979
45980impl IndividualPerson38 {
45981	pub fn validate(&self) -> Result<(), ValidationError> {
45982		if let Some(ref val) = self.nm_prfx { val.validate()? }
45983		if let Some(ref val) = self.gvn_nm {
45984			if val.chars().count() < 1 {
45985				return Err(ValidationError::new(1001, "gvn_nm is shorter than the minimum length of 1".to_string()));
45986			}
45987			if val.chars().count() > 35 {
45988				return Err(ValidationError::new(1002, "gvn_nm exceeds the maximum length of 35".to_string()));
45989			}
45990		}
45991		if let Some(ref val) = self.mddl_nm {
45992			if val.chars().count() < 1 {
45993				return Err(ValidationError::new(1001, "mddl_nm is shorter than the minimum length of 1".to_string()));
45994			}
45995			if val.chars().count() > 35 {
45996				return Err(ValidationError::new(1002, "mddl_nm exceeds the maximum length of 35".to_string()));
45997			}
45998		}
45999		if self.nm.chars().count() < 1 {
46000			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
46001		}
46002		if self.nm.chars().count() > 350 {
46003			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
46004		}
46005		if let Some(ref val) = self.nm_sfx {
46006			if val.chars().count() < 1 {
46007				return Err(ValidationError::new(1001, "nm_sfx is shorter than the minimum length of 1".to_string()));
46008			}
46009			if val.chars().count() > 35 {
46010				return Err(ValidationError::new(1002, "nm_sfx exceeds the maximum length of 35".to_string()));
46011			}
46012		}
46013		if let Some(ref val) = self.gndr { val.validate()? }
46014		if let Some(ref val) = self.ctry_of_birth {
46015			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
46016			if !pattern.is_match(val) {
46017				return Err(ValidationError::new(1005, "ctry_of_birth does not match the required pattern".to_string()));
46018			}
46019		}
46020		if let Some(ref val) = self.prvc_of_birth {
46021			if val.chars().count() < 1 {
46022				return Err(ValidationError::new(1001, "prvc_of_birth is shorter than the minimum length of 1".to_string()));
46023			}
46024			if val.chars().count() > 35 {
46025				return Err(ValidationError::new(1002, "prvc_of_birth exceeds the maximum length of 35".to_string()));
46026			}
46027		}
46028		if let Some(ref val) = self.city_of_birth {
46029			if val.chars().count() < 1 {
46030				return Err(ValidationError::new(1001, "city_of_birth is shorter than the minimum length of 1".to_string()));
46031			}
46032			if val.chars().count() > 35 {
46033				return Err(ValidationError::new(1002, "city_of_birth exceeds the maximum length of 35".to_string()));
46034			}
46035		}
46036		if let Some(ref val) = self.prfssn {
46037			if val.chars().count() < 1 {
46038				return Err(ValidationError::new(1001, "prfssn is shorter than the minimum length of 1".to_string()));
46039			}
46040			if val.chars().count() > 35 {
46041				return Err(ValidationError::new(1002, "prfssn exceeds the maximum length of 35".to_string()));
46042			}
46043		}
46044		if let Some(ref vec) = self.modfd_pstl_adr { for item in vec { item.validate()? } }
46045		if let Some(ref vec) = self.modfd_ctznsh { for item in vec { item.validate()? } }
46046		if let Some(ref val) = self.emplng_cpny {
46047			if val.chars().count() < 1 {
46048				return Err(ValidationError::new(1001, "emplng_cpny is shorter than the minimum length of 1".to_string()));
46049			}
46050			if val.chars().count() > 140 {
46051				return Err(ValidationError::new(1002, "emplng_cpny exceeds the maximum length of 140".to_string()));
46052			}
46053		}
46054		if let Some(ref val) = self.biz_fctn {
46055			if val.chars().count() < 1 {
46056				return Err(ValidationError::new(1001, "biz_fctn is shorter than the minimum length of 1".to_string()));
46057			}
46058			if val.chars().count() > 35 {
46059				return Err(ValidationError::new(1002, "biz_fctn exceeds the maximum length of 35".to_string()));
46060			}
46061		}
46062		if let Some(ref val) = self.pltcly_xpsd_prsn { val.validate()? }
46063		if let Some(ref val) = self.cvl_sts { val.validate()? }
46064		if let Some(ref val) = self.edctn_lvl {
46065			if val.chars().count() < 1 {
46066				return Err(ValidationError::new(1001, "edctn_lvl is shorter than the minimum length of 1".to_string()));
46067			}
46068			if val.chars().count() > 35 {
46069				return Err(ValidationError::new(1002, "edctn_lvl exceeds the maximum length of 35".to_string()));
46070			}
46071		}
46072		if let Some(ref val) = self.fmly_inf { val.validate()? }
46073		if let Some(ref vec) = self.gdpr_data { for item in vec { item.validate()? } }
46074		Ok(())
46075	}
46076}
46077
46078
46079// IndividualPerson44 ...
46080#[cfg_attr(feature = "derive_debug", derive(Debug))]
46081#[cfg_attr(feature = "derive_default", derive(Default))]
46082#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46083#[cfg_attr(feature = "derive_clone", derive(Clone))]
46084#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46085pub struct IndividualPerson44 {
46086	#[cfg_attr( feature = "derive_serde", serde(rename = "CurNm") )]
46087	pub cur_nm: IndividualPersonNameLong2,
46088	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsNm", skip_serializing_if = "Option::is_none") )]
46089	pub prvs_nm: Option<Vec<IndividualPersonNameLong2>>,
46090	#[cfg_attr( feature = "derive_serde", serde(rename = "Gndr", skip_serializing_if = "Option::is_none") )]
46091	pub gndr: Option<Gender1Code>,
46092	#[cfg_attr( feature = "derive_serde", serde(rename = "Lang", skip_serializing_if = "Option::is_none") )]
46093	pub lang: Option<String>,
46094	#[cfg_attr( feature = "derive_serde", serde(rename = "BirthDt", skip_serializing_if = "Option::is_none") )]
46095	pub birth_dt: Option<String>,
46096	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfBirth", skip_serializing_if = "Option::is_none") )]
46097	pub ctry_of_birth: Option<String>,
46098	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvcOfBirth", skip_serializing_if = "Option::is_none") )]
46099	pub prvc_of_birth: Option<String>,
46100	#[cfg_attr( feature = "derive_serde", serde(rename = "CityOfBirth", skip_serializing_if = "Option::is_none") )]
46101	pub city_of_birth: Option<String>,
46102	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxtnCtry", skip_serializing_if = "Option::is_none") )]
46103	pub taxtn_ctry: Option<String>,
46104	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryAndResdtlSts", skip_serializing_if = "Option::is_none") )]
46105	pub ctry_and_resdtl_sts: Option<CountryAndResidentialStatusType1>,
46106	#[cfg_attr( feature = "derive_serde", serde(rename = "SclSctyNb", skip_serializing_if = "Option::is_none") )]
46107	pub scl_scty_nb: Option<String>,
46108	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
46109	pub pstl_adr: Option<Vec<PostalAddress27>>,
46110	#[cfg_attr( feature = "derive_serde", serde(rename = "CtznshInf", skip_serializing_if = "Option::is_none") )]
46111	pub ctznsh_inf: Option<Vec<CitizenshipInformation1>>,
46112	#[cfg_attr( feature = "derive_serde", serde(rename = "PmryComAdr", skip_serializing_if = "Option::is_none") )]
46113	pub pmry_com_adr: Option<CommunicationAddress3>,
46114	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndryComAdr", skip_serializing_if = "Option::is_none") )]
46115	pub scndry_com_adr: Option<CommunicationAddress3>,
46116	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrId", skip_serializing_if = "Option::is_none") )]
46117	pub othr_id: Option<Vec<GenericIdentification44>>,
46118	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrDtls", skip_serializing_if = "Option::is_none") )]
46119	pub othr_dtls: Option<Vec<TransferInstruction1>>,
46120}
46121
46122impl IndividualPerson44 {
46123	pub fn validate(&self) -> Result<(), ValidationError> {
46124		self.cur_nm.validate()?;
46125		if let Some(ref vec) = self.prvs_nm { for item in vec { item.validate()? } }
46126		if let Some(ref val) = self.gndr { val.validate()? }
46127		if let Some(ref val) = self.ctry_of_birth {
46128			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
46129			if !pattern.is_match(val) {
46130				return Err(ValidationError::new(1005, "ctry_of_birth does not match the required pattern".to_string()));
46131			}
46132		}
46133		if let Some(ref val) = self.prvc_of_birth {
46134			if val.chars().count() < 1 {
46135				return Err(ValidationError::new(1001, "prvc_of_birth is shorter than the minimum length of 1".to_string()));
46136			}
46137			if val.chars().count() > 35 {
46138				return Err(ValidationError::new(1002, "prvc_of_birth exceeds the maximum length of 35".to_string()));
46139			}
46140		}
46141		if let Some(ref val) = self.city_of_birth {
46142			if val.chars().count() < 1 {
46143				return Err(ValidationError::new(1001, "city_of_birth is shorter than the minimum length of 1".to_string()));
46144			}
46145			if val.chars().count() > 35 {
46146				return Err(ValidationError::new(1002, "city_of_birth exceeds the maximum length of 35".to_string()));
46147			}
46148		}
46149		if let Some(ref val) = self.taxtn_ctry {
46150			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
46151			if !pattern.is_match(val) {
46152				return Err(ValidationError::new(1005, "taxtn_ctry does not match the required pattern".to_string()));
46153			}
46154		}
46155		if let Some(ref val) = self.ctry_and_resdtl_sts { val.validate()? }
46156		if let Some(ref val) = self.scl_scty_nb {
46157			if val.chars().count() < 1 {
46158				return Err(ValidationError::new(1001, "scl_scty_nb is shorter than the minimum length of 1".to_string()));
46159			}
46160			if val.chars().count() > 35 {
46161				return Err(ValidationError::new(1002, "scl_scty_nb exceeds the maximum length of 35".to_string()));
46162			}
46163		}
46164		if let Some(ref vec) = self.pstl_adr { for item in vec { item.validate()? } }
46165		if let Some(ref vec) = self.ctznsh_inf { for item in vec { item.validate()? } }
46166		if let Some(ref val) = self.pmry_com_adr { val.validate()? }
46167		if let Some(ref val) = self.scndry_com_adr { val.validate()? }
46168		if let Some(ref vec) = self.othr_id { for item in vec { item.validate()? } }
46169		if let Some(ref vec) = self.othr_dtls { for item in vec { item.validate()? } }
46170		Ok(())
46171	}
46172}
46173
46174
46175// IndividualPersonIdentification2Choice ...
46176#[cfg_attr(feature = "derive_debug", derive(Debug))]
46177#[cfg_attr(feature = "derive_default", derive(Default))]
46178#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46179#[cfg_attr(feature = "derive_clone", derive(Clone))]
46180#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46181pub struct IndividualPersonIdentification2Choice {
46182	#[cfg_attr( feature = "derive_serde", serde(rename = "IdNb", skip_serializing_if = "Option::is_none") )]
46183	pub id_nb: Option<GenericIdentification81>,
46184	#[cfg_attr( feature = "derive_serde", serde(rename = "PrsnNm", skip_serializing_if = "Option::is_none") )]
46185	pub prsn_nm: Option<IndividualPerson30>,
46186}
46187
46188impl IndividualPersonIdentification2Choice {
46189	pub fn validate(&self) -> Result<(), ValidationError> {
46190		if let Some(ref val) = self.id_nb { val.validate()? }
46191		if let Some(ref val) = self.prsn_nm { val.validate()? }
46192		Ok(())
46193	}
46194}
46195
46196
46197// IndividualPersonIdentification3Choice ...
46198#[cfg_attr(feature = "derive_debug", derive(Debug))]
46199#[cfg_attr(feature = "derive_default", derive(Default))]
46200#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46201#[cfg_attr(feature = "derive_clone", derive(Clone))]
46202#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46203pub struct IndividualPersonIdentification3Choice {
46204	#[cfg_attr( feature = "derive_serde", serde(rename = "IdNb", skip_serializing_if = "Option::is_none") )]
46205	pub id_nb: Option<GenericIdentification81>,
46206	#[cfg_attr( feature = "derive_serde", serde(rename = "PrsnNm", skip_serializing_if = "Option::is_none") )]
46207	pub prsn_nm: Option<IndividualPerson35>,
46208}
46209
46210impl IndividualPersonIdentification3Choice {
46211	pub fn validate(&self) -> Result<(), ValidationError> {
46212		if let Some(ref val) = self.id_nb { val.validate()? }
46213		if let Some(ref val) = self.prsn_nm { val.validate()? }
46214		Ok(())
46215	}
46216}
46217
46218
46219// IndividualPersonNameLong2 ...
46220#[cfg_attr(feature = "derive_debug", derive(Debug))]
46221#[cfg_attr(feature = "derive_default", derive(Default))]
46222#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46223#[cfg_attr(feature = "derive_clone", derive(Clone))]
46224#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46225pub struct IndividualPersonNameLong2 {
46226	#[cfg_attr( feature = "derive_serde", serde(rename = "NmPrfx", skip_serializing_if = "Option::is_none") )]
46227	pub nm_prfx: Option<NamePrefix2Code>,
46228	#[cfg_attr( feature = "derive_serde", serde(rename = "Srnm") )]
46229	pub srnm: String,
46230	#[cfg_attr( feature = "derive_serde", serde(rename = "GvnNm", skip_serializing_if = "Option::is_none") )]
46231	pub gvn_nm: Option<String>,
46232	#[cfg_attr( feature = "derive_serde", serde(rename = "MddlNm", skip_serializing_if = "Option::is_none") )]
46233	pub mddl_nm: Option<String>,
46234	#[cfg_attr( feature = "derive_serde", serde(rename = "Initls", skip_serializing_if = "Option::is_none") )]
46235	pub initls: Option<String>,
46236	#[cfg_attr( feature = "derive_serde", serde(rename = "NmSfx", skip_serializing_if = "Option::is_none") )]
46237	pub nm_sfx: Option<String>,
46238	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
46239	pub nm: Option<String>,
46240	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
46241	pub start_dt: Option<String>,
46242	#[cfg_attr( feature = "derive_serde", serde(rename = "EndDt", skip_serializing_if = "Option::is_none") )]
46243	pub end_dt: Option<String>,
46244}
46245
46246impl IndividualPersonNameLong2 {
46247	pub fn validate(&self) -> Result<(), ValidationError> {
46248		if let Some(ref val) = self.nm_prfx { val.validate()? }
46249		if self.srnm.chars().count() < 1 {
46250			return Err(ValidationError::new(1001, "srnm is shorter than the minimum length of 1".to_string()));
46251		}
46252		if self.srnm.chars().count() > 35 {
46253			return Err(ValidationError::new(1002, "srnm exceeds the maximum length of 35".to_string()));
46254		}
46255		if let Some(ref val) = self.gvn_nm {
46256			if val.chars().count() < 1 {
46257				return Err(ValidationError::new(1001, "gvn_nm is shorter than the minimum length of 1".to_string()));
46258			}
46259			if val.chars().count() > 35 {
46260				return Err(ValidationError::new(1002, "gvn_nm exceeds the maximum length of 35".to_string()));
46261			}
46262		}
46263		if let Some(ref val) = self.mddl_nm {
46264			if val.chars().count() < 1 {
46265				return Err(ValidationError::new(1001, "mddl_nm is shorter than the minimum length of 1".to_string()));
46266			}
46267			if val.chars().count() > 35 {
46268				return Err(ValidationError::new(1002, "mddl_nm exceeds the maximum length of 35".to_string()));
46269			}
46270		}
46271		if let Some(ref val) = self.initls {
46272			if val.chars().count() < 1 {
46273				return Err(ValidationError::new(1001, "initls is shorter than the minimum length of 1".to_string()));
46274			}
46275			if val.chars().count() > 6 {
46276				return Err(ValidationError::new(1002, "initls exceeds the maximum length of 6".to_string()));
46277			}
46278		}
46279		if let Some(ref val) = self.nm_sfx {
46280			if val.chars().count() < 1 {
46281				return Err(ValidationError::new(1001, "nm_sfx is shorter than the minimum length of 1".to_string()));
46282			}
46283			if val.chars().count() > 350 {
46284				return Err(ValidationError::new(1002, "nm_sfx exceeds the maximum length of 350".to_string()));
46285			}
46286		}
46287		if let Some(ref val) = self.nm {
46288			if val.chars().count() < 1 {
46289				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
46290			}
46291			if val.chars().count() > 350 {
46292				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
46293			}
46294		}
46295		Ok(())
46296	}
46297}
46298
46299
46300// IndustrialProductCommodityConstruction1 ...
46301#[cfg_attr(feature = "derive_debug", derive(Debug))]
46302#[cfg_attr(feature = "derive_default", derive(Default))]
46303#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46304#[cfg_attr(feature = "derive_clone", derive(Clone))]
46305#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46306pub struct IndustrialProductCommodityConstruction1 {
46307	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
46308	pub base_pdct: AssetClassProductType6Code,
46309	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
46310	pub sub_pdct: Option<AssetClassSubProductType33Code>,
46311}
46312
46313impl IndustrialProductCommodityConstruction1 {
46314	pub fn validate(&self) -> Result<(), ValidationError> {
46315		self.base_pdct.validate()?;
46316		if let Some(ref val) = self.sub_pdct { val.validate()? }
46317		Ok(())
46318	}
46319}
46320
46321
46322// IndustrialProductCommodityConstruction2 ...
46323#[cfg_attr(feature = "derive_debug", derive(Debug))]
46324#[cfg_attr(feature = "derive_default", derive(Default))]
46325#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46326#[cfg_attr(feature = "derive_clone", derive(Clone))]
46327#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46328pub struct IndustrialProductCommodityConstruction2 {
46329	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
46330	pub base_pdct: AssetClassProductType6Code,
46331	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
46332	pub sub_pdct: Option<AssetClassSubProductType33Code>,
46333}
46334
46335impl IndustrialProductCommodityConstruction2 {
46336	pub fn validate(&self) -> Result<(), ValidationError> {
46337		self.base_pdct.validate()?;
46338		if let Some(ref val) = self.sub_pdct { val.validate()? }
46339		Ok(())
46340	}
46341}
46342
46343
46344// IndustrialProductCommodityManufacturing1 ...
46345#[cfg_attr(feature = "derive_debug", derive(Debug))]
46346#[cfg_attr(feature = "derive_default", derive(Default))]
46347#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46348#[cfg_attr(feature = "derive_clone", derive(Clone))]
46349#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46350pub struct IndustrialProductCommodityManufacturing1 {
46351	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
46352	pub base_pdct: AssetClassProductType6Code,
46353	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
46354	pub sub_pdct: Option<AssetClassSubProductType34Code>,
46355}
46356
46357impl IndustrialProductCommodityManufacturing1 {
46358	pub fn validate(&self) -> Result<(), ValidationError> {
46359		self.base_pdct.validate()?;
46360		if let Some(ref val) = self.sub_pdct { val.validate()? }
46361		Ok(())
46362	}
46363}
46364
46365
46366// IndustrialProductCommodityManufacturing2 ...
46367#[cfg_attr(feature = "derive_debug", derive(Debug))]
46368#[cfg_attr(feature = "derive_default", derive(Default))]
46369#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46370#[cfg_attr(feature = "derive_clone", derive(Clone))]
46371#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46372pub struct IndustrialProductCommodityManufacturing2 {
46373	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
46374	pub base_pdct: AssetClassProductType6Code,
46375	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
46376	pub sub_pdct: Option<AssetClassSubProductType34Code>,
46377}
46378
46379impl IndustrialProductCommodityManufacturing2 {
46380	pub fn validate(&self) -> Result<(), ValidationError> {
46381		self.base_pdct.validate()?;
46382		if let Some(ref val) = self.sub_pdct { val.validate()? }
46383		Ok(())
46384	}
46385}
46386
46387
46388// InflationIndex1Choice ...
46389#[cfg_attr(feature = "derive_debug", derive(Debug))]
46390#[cfg_attr(feature = "derive_default", derive(Default))]
46391#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46392#[cfg_attr(feature = "derive_clone", derive(Clone))]
46393#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46394pub struct InflationIndex1Choice {
46395	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
46396	pub isin: Option<String>,
46397	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
46398	pub nm: Option<String>,
46399}
46400
46401impl InflationIndex1Choice {
46402	pub fn validate(&self) -> Result<(), ValidationError> {
46403		if let Some(ref val) = self.isin {
46404			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
46405			if !pattern.is_match(val) {
46406				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
46407			}
46408		}
46409		if let Some(ref val) = self.nm {
46410			if val.chars().count() < 1 {
46411				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
46412			}
46413			if val.chars().count() > 25 {
46414				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 25".to_string()));
46415			}
46416		}
46417		Ok(())
46418	}
46419}
46420
46421
46422// InformationDistribution1Choice ...
46423#[cfg_attr(feature = "derive_debug", derive(Debug))]
46424#[cfg_attr(feature = "derive_default", derive(Default))]
46425#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46426#[cfg_attr(feature = "derive_clone", derive(Clone))]
46427#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46428pub struct InformationDistribution1Choice {
46429	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
46430	pub cd: Option<InformationDistribution2Code>,
46431	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
46432	pub prtry: Option<GenericIdentification47>,
46433}
46434
46435impl InformationDistribution1Choice {
46436	pub fn validate(&self) -> Result<(), ValidationError> {
46437		if let Some(ref val) = self.cd { val.validate()? }
46438		if let Some(ref val) = self.prtry { val.validate()? }
46439		Ok(())
46440	}
46441}
46442
46443
46444// InformationDistribution2Code ...
46445#[cfg_attr(feature = "derive_debug", derive(Debug))]
46446#[cfg_attr(feature = "derive_default", derive(Default))]
46447#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46448#[cfg_attr(feature = "derive_clone", derive(Clone))]
46449#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46450pub enum InformationDistribution2Code {
46451	#[cfg_attr(feature = "derive_default", default)]
46452	#[cfg_attr( feature = "derive_serde", serde(rename = "ELEC") )]
46453	CodeELEC,
46454	#[cfg_attr( feature = "derive_serde", serde(rename = "NONE") )]
46455	CodeNONE,
46456	#[cfg_attr( feature = "derive_serde", serde(rename = "PAPR") )]
46457	CodePAPR,
46458}
46459
46460impl InformationDistribution2Code {
46461	pub fn validate(&self) -> Result<(), ValidationError> {
46462		Ok(())
46463	}
46464}
46465
46466
46467// InformationQualifierType1 ...
46468#[cfg_attr(feature = "derive_debug", derive(Debug))]
46469#[cfg_attr(feature = "derive_default", derive(Default))]
46470#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46471#[cfg_attr(feature = "derive_clone", derive(Clone))]
46472#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46473pub struct InformationQualifierType1 {
46474	#[cfg_attr( feature = "derive_serde", serde(rename = "IsFrmtd", skip_serializing_if = "Option::is_none") )]
46475	pub is_frmtd: Option<bool>,
46476	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
46477	pub prty: Option<Priority1Code>,
46478}
46479
46480impl InformationQualifierType1 {
46481	pub fn validate(&self) -> Result<(), ValidationError> {
46482		if let Some(ref val) = self.prty { val.validate()? }
46483		Ok(())
46484	}
46485}
46486
46487
46488// InformationType1Choice ...
46489#[cfg_attr(feature = "derive_debug", derive(Debug))]
46490#[cfg_attr(feature = "derive_default", derive(Default))]
46491#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46492#[cfg_attr(feature = "derive_clone", derive(Clone))]
46493#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46494pub struct InformationType1Choice {
46495	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
46496	pub cd: Option<InformationType1Code>,
46497	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
46498	pub prtry: Option<String>,
46499}
46500
46501impl InformationType1Choice {
46502	pub fn validate(&self) -> Result<(), ValidationError> {
46503		if let Some(ref val) = self.cd { val.validate()? }
46504		if let Some(ref val) = self.prtry {
46505			if val.chars().count() < 1 {
46506				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
46507			}
46508			if val.chars().count() > 140 {
46509				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 140".to_string()));
46510			}
46511		}
46512		Ok(())
46513	}
46514}
46515
46516
46517// InformationType1Code ...
46518#[cfg_attr(feature = "derive_debug", derive(Debug))]
46519#[cfg_attr(feature = "derive_default", derive(Default))]
46520#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46521#[cfg_attr(feature = "derive_clone", derive(Clone))]
46522#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46523pub enum InformationType1Code {
46524	#[cfg_attr(feature = "derive_default", default)]
46525	#[cfg_attr( feature = "derive_serde", serde(rename = "INST") )]
46526	CodeINST,
46527	#[cfg_attr( feature = "derive_serde", serde(rename = "RELY") )]
46528	CodeRELY,
46529}
46530
46531impl InformationType1Code {
46532	pub fn validate(&self) -> Result<(), ValidationError> {
46533		Ok(())
46534	}
46535}
46536
46537
46538// InitialAmount1Choice ...
46539#[cfg_attr(feature = "derive_debug", derive(Debug))]
46540#[cfg_attr(feature = "derive_default", derive(Default))]
46541#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46542#[cfg_attr(feature = "derive_clone", derive(Clone))]
46543#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46544pub struct InitialAmount1Choice {
46545	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlNbOfInstlmts", skip_serializing_if = "Option::is_none") )]
46546	pub initl_nb_of_instlmts: Option<f64>,
46547	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
46548	pub amt: Option<ActiveCurrencyAndAmount>,
46549}
46550
46551impl InitialAmount1Choice {
46552	pub fn validate(&self) -> Result<(), ValidationError> {
46553		if let Some(ref val) = self.amt { val.validate()? }
46554		Ok(())
46555	}
46556}
46557
46558
46559// InitialMarginExposure1 ...
46560#[cfg_attr(feature = "derive_debug", derive(Debug))]
46561#[cfg_attr(feature = "derive_default", derive(Default))]
46562#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46563#[cfg_attr(feature = "derive_clone", derive(Clone))]
46564#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46565pub struct InitialMarginExposure1 {
46566	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
46567	pub amt: Amount3,
46568	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
46569	pub tp: MarginType2Choice,
46570	#[cfg_attr( feature = "derive_serde", serde(rename = "CoreInd") )]
46571	pub core_ind: bool,
46572}
46573
46574impl InitialMarginExposure1 {
46575	pub fn validate(&self) -> Result<(), ValidationError> {
46576		self.amt.validate()?;
46577		self.tp.validate()?;
46578		Ok(())
46579	}
46580}
46581
46582
46583// InitialMarginRequirement1 ...
46584#[cfg_attr(feature = "derive_debug", derive(Debug))]
46585#[cfg_attr(feature = "derive_default", derive(Default))]
46586#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46587#[cfg_attr(feature = "derive_clone", derive(Clone))]
46588#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46589pub struct InitialMarginRequirement1 {
46590	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlMrgnXpsr") )]
46591	pub initl_mrgn_xpsr: Vec<InitialMarginExposure1>,
46592	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdt") )]
46593	pub cdt: ActiveCurrencyAndAmount,
46594}
46595
46596impl InitialMarginRequirement1 {
46597	pub fn validate(&self) -> Result<(), ValidationError> {
46598		for item in &self.initl_mrgn_xpsr { item.validate()? }
46599		self.cdt.validate()?;
46600		Ok(())
46601	}
46602}
46603
46604
46605// InitialPhysicalForm1Code ...
46606#[cfg_attr(feature = "derive_debug", derive(Debug))]
46607#[cfg_attr(feature = "derive_default", derive(Default))]
46608#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46609#[cfg_attr(feature = "derive_clone", derive(Clone))]
46610#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46611pub enum InitialPhysicalForm1Code {
46612	#[cfg_attr(feature = "derive_default", default)]
46613	#[cfg_attr( feature = "derive_serde", serde(rename = "GTGT") )]
46614	CodeGTGT,
46615	#[cfg_attr( feature = "derive_serde", serde(rename = "GPGP") )]
46616	CodeGPGP,
46617	#[cfg_attr( feature = "derive_serde", serde(rename = "DERN") )]
46618	CodeDERN,
46619}
46620
46621impl InitialPhysicalForm1Code {
46622	pub fn validate(&self) -> Result<(), ValidationError> {
46623		Ok(())
46624	}
46625}
46626
46627
46628// InitialPhysicalForm2Code ...
46629#[cfg_attr(feature = "derive_debug", derive(Debug))]
46630#[cfg_attr(feature = "derive_default", derive(Default))]
46631#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46632#[cfg_attr(feature = "derive_clone", derive(Clone))]
46633#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46634pub enum InitialPhysicalForm2Code {
46635	#[cfg_attr(feature = "derive_default", default)]
46636	#[cfg_attr( feature = "derive_serde", serde(rename = "GPGP") )]
46637	CodeGPGP,
46638	#[cfg_attr( feature = "derive_serde", serde(rename = "DERN") )]
46639	CodeDERN,
46640}
46641
46642impl InitialPhysicalForm2Code {
46643	pub fn validate(&self) -> Result<(), ValidationError> {
46644		Ok(())
46645	}
46646}
46647
46648
46649// InitialPhysicalForm3Choice ...
46650#[cfg_attr(feature = "derive_debug", derive(Debug))]
46651#[cfg_attr(feature = "derive_default", derive(Default))]
46652#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46653#[cfg_attr(feature = "derive_clone", derive(Clone))]
46654#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46655pub struct InitialPhysicalForm3Choice {
46656	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
46657	pub cd: Option<InitialPhysicalForm2Code>,
46658	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
46659	pub prtry: Option<GenericIdentification30>,
46660}
46661
46662impl InitialPhysicalForm3Choice {
46663	pub fn validate(&self) -> Result<(), ValidationError> {
46664		if let Some(ref val) = self.cd { val.validate()? }
46665		if let Some(ref val) = self.prtry { val.validate()? }
46666		Ok(())
46667	}
46668}
46669
46670
46671// InitialPhysicalForm4Choice ...
46672#[cfg_attr(feature = "derive_debug", derive(Debug))]
46673#[cfg_attr(feature = "derive_default", derive(Default))]
46674#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46675#[cfg_attr(feature = "derive_clone", derive(Clone))]
46676#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46677pub struct InitialPhysicalForm4Choice {
46678	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
46679	pub cd: Option<InitialPhysicalForm1Code>,
46680	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
46681	pub prtry: Option<GenericIdentification30>,
46682}
46683
46684impl InitialPhysicalForm4Choice {
46685	pub fn validate(&self) -> Result<(), ValidationError> {
46686		if let Some(ref val) = self.cd { val.validate()? }
46687		if let Some(ref val) = self.prtry { val.validate()? }
46688		Ok(())
46689	}
46690}
46691
46692
46693// Instruction1Code ...
46694#[cfg_attr(feature = "derive_debug", derive(Debug))]
46695#[cfg_attr(feature = "derive_default", derive(Default))]
46696#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46697#[cfg_attr(feature = "derive_clone", derive(Clone))]
46698#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46699pub enum Instruction1Code {
46700	#[cfg_attr(feature = "derive_default", default)]
46701	#[cfg_attr( feature = "derive_serde", serde(rename = "PBEN") )]
46702	CodePBEN,
46703	#[cfg_attr( feature = "derive_serde", serde(rename = "TTIL") )]
46704	CodeTTIL,
46705	#[cfg_attr( feature = "derive_serde", serde(rename = "TFRO") )]
46706	CodeTFRO,
46707}
46708
46709impl Instruction1Code {
46710	pub fn validate(&self) -> Result<(), ValidationError> {
46711		Ok(())
46712	}
46713}
46714
46715
46716// Instruction4Code ...
46717#[cfg_attr(feature = "derive_debug", derive(Debug))]
46718#[cfg_attr(feature = "derive_default", derive(Default))]
46719#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46720#[cfg_attr(feature = "derive_clone", derive(Clone))]
46721#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46722pub enum Instruction4Code {
46723	#[cfg_attr(feature = "derive_default", default)]
46724	#[cfg_attr( feature = "derive_serde", serde(rename = "PHOA") )]
46725	CodePHOA,
46726	#[cfg_attr( feature = "derive_serde", serde(rename = "TELA") )]
46727	CodeTELA,
46728}
46729
46730impl Instruction4Code {
46731	pub fn validate(&self) -> Result<(), ValidationError> {
46732		Ok(())
46733	}
46734}
46735
46736
46737// InstructionForAssignee1 ...
46738#[cfg_attr(feature = "derive_debug", derive(Debug))]
46739#[cfg_attr(feature = "derive_default", derive(Default))]
46740#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46741#[cfg_attr(feature = "derive_clone", derive(Clone))]
46742#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46743pub struct InstructionForAssignee1 {
46744	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
46745	pub cd: Option<String>,
46746	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrInf", skip_serializing_if = "Option::is_none") )]
46747	pub instr_inf: Option<String>,
46748}
46749
46750impl InstructionForAssignee1 {
46751	pub fn validate(&self) -> Result<(), ValidationError> {
46752		if let Some(ref val) = self.cd {
46753			if val.chars().count() < 1 {
46754				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
46755			}
46756			if val.chars().count() > 4 {
46757				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
46758			}
46759		}
46760		if let Some(ref val) = self.instr_inf {
46761			if val.chars().count() < 1 {
46762				return Err(ValidationError::new(1001, "instr_inf is shorter than the minimum length of 1".to_string()));
46763			}
46764			if val.chars().count() > 140 {
46765				return Err(ValidationError::new(1002, "instr_inf exceeds the maximum length of 140".to_string()));
46766			}
46767		}
46768		Ok(())
46769	}
46770}
46771
46772
46773// InstructionForChequeAgent1 ...
46774#[cfg_attr(feature = "derive_debug", derive(Debug))]
46775#[cfg_attr(feature = "derive_default", derive(Default))]
46776#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46777#[cfg_attr(feature = "derive_clone", derive(Clone))]
46778#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46779pub struct InstructionForChequeAgent1 {
46780	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
46781	pub cd: Option<String>,
46782	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrInf", skip_serializing_if = "Option::is_none") )]
46783	pub instr_inf: Option<String>,
46784}
46785
46786impl InstructionForChequeAgent1 {
46787	pub fn validate(&self) -> Result<(), ValidationError> {
46788		if let Some(ref val) = self.cd {
46789			if val.chars().count() < 1 {
46790				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
46791			}
46792			if val.chars().count() > 4 {
46793				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
46794			}
46795		}
46796		if let Some(ref val) = self.instr_inf {
46797			if val.chars().count() < 1 {
46798				return Err(ValidationError::new(1001, "instr_inf is shorter than the minimum length of 1".to_string()));
46799			}
46800			if val.chars().count() > 140 {
46801				return Err(ValidationError::new(1002, "instr_inf exceeds the maximum length of 140".to_string()));
46802			}
46803		}
46804		Ok(())
46805	}
46806}
46807
46808
46809// InstructionForCreditorAgent3 ...
46810#[cfg_attr(feature = "derive_debug", derive(Debug))]
46811#[cfg_attr(feature = "derive_default", derive(Default))]
46812#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46813#[cfg_attr(feature = "derive_clone", derive(Clone))]
46814#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46815pub struct InstructionForCreditorAgent3 {
46816	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
46817	pub cd: Option<String>,
46818	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrInf", skip_serializing_if = "Option::is_none") )]
46819	pub instr_inf: Option<String>,
46820}
46821
46822impl InstructionForCreditorAgent3 {
46823	pub fn validate(&self) -> Result<(), ValidationError> {
46824		if let Some(ref val) = self.cd {
46825			if val.chars().count() < 1 {
46826				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
46827			}
46828			if val.chars().count() > 4 {
46829				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
46830			}
46831		}
46832		if let Some(ref val) = self.instr_inf {
46833			if val.chars().count() < 1 {
46834				return Err(ValidationError::new(1001, "instr_inf is shorter than the minimum length of 1".to_string()));
46835			}
46836			if val.chars().count() > 140 {
46837				return Err(ValidationError::new(1002, "instr_inf exceeds the maximum length of 140".to_string()));
46838			}
46839		}
46840		Ok(())
46841	}
46842}
46843
46844
46845// InstructionForDebtorAgent1 ...
46846#[cfg_attr(feature = "derive_debug", derive(Debug))]
46847#[cfg_attr(feature = "derive_default", derive(Default))]
46848#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46849#[cfg_attr(feature = "derive_clone", derive(Clone))]
46850#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46851pub struct InstructionForDebtorAgent1 {
46852	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
46853	pub cd: Option<String>,
46854	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrInf", skip_serializing_if = "Option::is_none") )]
46855	pub instr_inf: Option<String>,
46856}
46857
46858impl InstructionForDebtorAgent1 {
46859	pub fn validate(&self) -> Result<(), ValidationError> {
46860		if let Some(ref val) = self.cd {
46861			if val.chars().count() < 1 {
46862				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
46863			}
46864			if val.chars().count() > 4 {
46865				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
46866			}
46867		}
46868		if let Some(ref val) = self.instr_inf {
46869			if val.chars().count() < 1 {
46870				return Err(ValidationError::new(1001, "instr_inf is shorter than the minimum length of 1".to_string()));
46871			}
46872			if val.chars().count() > 140 {
46873				return Err(ValidationError::new(1002, "instr_inf exceeds the maximum length of 140".to_string()));
46874			}
46875		}
46876		Ok(())
46877	}
46878}
46879
46880
46881// InstructionForInstructedAgent1 ...
46882#[cfg_attr(feature = "derive_debug", derive(Debug))]
46883#[cfg_attr(feature = "derive_default", derive(Default))]
46884#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46885#[cfg_attr(feature = "derive_clone", derive(Clone))]
46886#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46887pub struct InstructionForInstructedAgent1 {
46888	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
46889	pub cd: Option<String>,
46890	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrInf", skip_serializing_if = "Option::is_none") )]
46891	pub instr_inf: Option<String>,
46892}
46893
46894impl InstructionForInstructedAgent1 {
46895	pub fn validate(&self) -> Result<(), ValidationError> {
46896		if let Some(ref val) = self.cd {
46897			if val.chars().count() < 1 {
46898				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
46899			}
46900			if val.chars().count() > 4 {
46901				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
46902			}
46903		}
46904		if let Some(ref val) = self.instr_inf {
46905			if val.chars().count() < 1 {
46906				return Err(ValidationError::new(1001, "instr_inf is shorter than the minimum length of 1".to_string()));
46907			}
46908			if val.chars().count() > 140 {
46909				return Err(ValidationError::new(1002, "instr_inf exceeds the maximum length of 140".to_string()));
46910			}
46911		}
46912		Ok(())
46913	}
46914}
46915
46916
46917// InstructionForNextAgent1 ...
46918#[cfg_attr(feature = "derive_debug", derive(Debug))]
46919#[cfg_attr(feature = "derive_default", derive(Default))]
46920#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46921#[cfg_attr(feature = "derive_clone", derive(Clone))]
46922#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46923pub struct InstructionForNextAgent1 {
46924	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
46925	pub cd: Option<Instruction4Code>,
46926	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrInf", skip_serializing_if = "Option::is_none") )]
46927	pub instr_inf: Option<String>,
46928}
46929
46930impl InstructionForNextAgent1 {
46931	pub fn validate(&self) -> Result<(), ValidationError> {
46932		if let Some(ref val) = self.cd { val.validate()? }
46933		if let Some(ref val) = self.instr_inf {
46934			if val.chars().count() < 1 {
46935				return Err(ValidationError::new(1001, "instr_inf is shorter than the minimum length of 1".to_string()));
46936			}
46937			if val.chars().count() > 140 {
46938				return Err(ValidationError::new(1002, "instr_inf exceeds the maximum length of 140".to_string()));
46939			}
46940		}
46941		Ok(())
46942	}
46943}
46944
46945
46946// InstructionStatusReturnCriteria1 ...
46947#[cfg_attr(feature = "derive_debug", derive(Debug))]
46948#[cfg_attr(feature = "derive_default", derive(Default))]
46949#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46950#[cfg_attr(feature = "derive_clone", derive(Clone))]
46951#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46952pub struct InstructionStatusReturnCriteria1 {
46953	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInstrStsInd") )]
46954	pub pmt_instr_sts_ind: bool,
46955	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInstrStsDtTmInd", skip_serializing_if = "Option::is_none") )]
46956	pub pmt_instr_sts_dt_tm_ind: Option<bool>,
46957	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInstrStsRsnInd", skip_serializing_if = "Option::is_none") )]
46958	pub pmt_instr_sts_rsn_ind: Option<bool>,
46959}
46960
46961impl InstructionStatusReturnCriteria1 {
46962	pub fn validate(&self) -> Result<(), ValidationError> {
46963		Ok(())
46964	}
46965}
46966
46967
46968// InstructionStatusSearch5 ...
46969#[cfg_attr(feature = "derive_debug", derive(Debug))]
46970#[cfg_attr(feature = "derive_default", derive(Default))]
46971#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
46972#[cfg_attr(feature = "derive_clone", derive(Clone))]
46973#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
46974pub struct InstructionStatusSearch5 {
46975	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInstrSts", skip_serializing_if = "Option::is_none") )]
46976	pub pmt_instr_sts: Option<PaymentStatusCodeSearch2Choice>,
46977	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInstrStsDtTm", skip_serializing_if = "Option::is_none") )]
46978	pub pmt_instr_sts_dt_tm: Option<DateTimePeriod1Choice>,
46979	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryStsRsn", skip_serializing_if = "Option::is_none") )]
46980	pub prtry_sts_rsn: Option<String>,
46981}
46982
46983impl InstructionStatusSearch5 {
46984	pub fn validate(&self) -> Result<(), ValidationError> {
46985		if let Some(ref val) = self.pmt_instr_sts { val.validate()? }
46986		if let Some(ref val) = self.pmt_instr_sts_dt_tm { val.validate()? }
46987		if let Some(ref val) = self.prtry_sts_rsn {
46988			if val.chars().count() < 1 {
46989				return Err(ValidationError::new(1001, "prtry_sts_rsn is shorter than the minimum length of 1".to_string()));
46990			}
46991			if val.chars().count() > 4 {
46992				return Err(ValidationError::new(1002, "prtry_sts_rsn exceeds the maximum length of 4".to_string()));
46993			}
46994			let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
46995			if !pattern.is_match(val) {
46996				return Err(ValidationError::new(1005, "prtry_sts_rsn does not match the required pattern".to_string()));
46997			}
46998		}
46999		Ok(())
47000	}
47001}
47002
47003
47004// InstrumentAndSubClassIdentification2 ...
47005#[cfg_attr(feature = "derive_debug", derive(Debug))]
47006#[cfg_attr(feature = "derive_default", derive(Default))]
47007#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47008#[cfg_attr(feature = "derive_clone", derive(Clone))]
47009#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47010pub struct InstrumentAndSubClassIdentification2 {
47011	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN") )]
47012	pub isin: String,
47013	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivSubClss", skip_serializing_if = "Option::is_none") )]
47014	pub deriv_sub_clss: Option<NonEquitySubClass1>,
47015	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmClssfctn", skip_serializing_if = "Option::is_none") )]
47016	pub fin_instrm_clssfctn: Option<NonEquityInstrumentReportingClassification1Code>,
47017}
47018
47019impl InstrumentAndSubClassIdentification2 {
47020	pub fn validate(&self) -> Result<(), ValidationError> {
47021		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
47022		if !pattern.is_match(&self.isin) {
47023			return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
47024		}
47025		if let Some(ref val) = self.deriv_sub_clss { val.validate()? }
47026		if let Some(ref val) = self.fin_instrm_clssfctn { val.validate()? }
47027		Ok(())
47028	}
47029}
47030
47031
47032// InstrumentIdentification6Choice ...
47033#[cfg_attr(feature = "derive_debug", derive(Debug))]
47034#[cfg_attr(feature = "derive_default", derive(Default))]
47035#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47036#[cfg_attr(feature = "derive_clone", derive(Clone))]
47037#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47038pub struct InstrumentIdentification6Choice {
47039	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
47040	pub isin: Option<String>,
47041	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrntvInstrmId", skip_serializing_if = "Option::is_none") )]
47042	pub altrntv_instrm_id: Option<String>,
47043	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqPdctIdr", skip_serializing_if = "Option::is_none") )]
47044	pub unq_pdct_idr: Option<UniqueProductIdentifier1Choice>,
47045	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrId", skip_serializing_if = "Option::is_none") )]
47046	pub othr_id: Option<GenericIdentification184>,
47047}
47048
47049impl InstrumentIdentification6Choice {
47050	pub fn validate(&self) -> Result<(), ValidationError> {
47051		if let Some(ref val) = self.isin {
47052			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
47053			if !pattern.is_match(val) {
47054				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
47055			}
47056		}
47057		if let Some(ref val) = self.altrntv_instrm_id {
47058			if val.chars().count() < 1 {
47059				return Err(ValidationError::new(1001, "altrntv_instrm_id is shorter than the minimum length of 1".to_string()));
47060			}
47061			if val.chars().count() > 52 {
47062				return Err(ValidationError::new(1002, "altrntv_instrm_id exceeds the maximum length of 52".to_string()));
47063			}
47064		}
47065		if let Some(ref val) = self.unq_pdct_idr { val.validate()? }
47066		if let Some(ref val) = self.othr_id { val.validate()? }
47067		Ok(())
47068	}
47069}
47070
47071
47072// InstrumentOrSubClassIdentification2Choice ...
47073#[cfg_attr(feature = "derive_debug", derive(Debug))]
47074#[cfg_attr(feature = "derive_default", derive(Default))]
47075#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47076#[cfg_attr(feature = "derive_clone", derive(Clone))]
47077#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47078pub struct InstrumentOrSubClassIdentification2Choice {
47079	#[cfg_attr( feature = "derive_serde", serde(rename = "ISINAndSubClss", skip_serializing_if = "Option::is_none") )]
47080	pub isin_and_sub_clss: Option<InstrumentAndSubClassIdentification2>,
47081	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstClssAndSubClss", skip_serializing_if = "Option::is_none") )]
47082	pub asst_clss_and_sub_clss: Option<AssetClassAndSubClassIdentification2>,
47083}
47084
47085impl InstrumentOrSubClassIdentification2Choice {
47086	pub fn validate(&self) -> Result<(), ValidationError> {
47087		if let Some(ref val) = self.isin_and_sub_clss { val.validate()? }
47088		if let Some(ref val) = self.asst_clss_and_sub_clss { val.validate()? }
47089		Ok(())
47090	}
47091}
47092
47093
47094// InstrumentSubStructureType1Code ...
47095#[cfg_attr(feature = "derive_debug", derive(Debug))]
47096#[cfg_attr(feature = "derive_default", derive(Default))]
47097#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47098#[cfg_attr(feature = "derive_clone", derive(Clone))]
47099#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47100pub enum InstrumentSubStructureType1Code {
47101	#[cfg_attr(feature = "derive_default", default)]
47102	#[cfg_attr( feature = "derive_serde", serde(rename = "ABSE") )]
47103	CodeABSE,
47104	#[cfg_attr( feature = "derive_serde", serde(rename = "AIRT") )]
47105	CodeAIRT,
47106	#[cfg_attr( feature = "derive_serde", serde(rename = "AUTT") )]
47107	CodeAUTT,
47108	#[cfg_attr( feature = "derive_serde", serde(rename = "CBOB") )]
47109	CodeCBOB,
47110	#[cfg_attr( feature = "derive_serde", serde(rename = "CDOB") )]
47111	CodeCDOB,
47112	#[cfg_attr( feature = "derive_serde", serde(rename = "CLNO") )]
47113	CodeCLNO,
47114	#[cfg_attr( feature = "derive_serde", serde(rename = "CLOB") )]
47115	CodeCLOB,
47116	#[cfg_attr( feature = "derive_serde", serde(rename = "CMBS") )]
47117	CodeCMBS,
47118	#[cfg_attr( feature = "derive_serde", serde(rename = "CSMR") )]
47119	CodeCSMR,
47120	#[cfg_attr( feature = "derive_serde", serde(rename = "CRCT") )]
47121	CodeCRCT,
47122	#[cfg_attr( feature = "derive_serde", serde(rename = "HELO") )]
47123	CodeHELO,
47124	#[cfg_attr( feature = "derive_serde", serde(rename = "LPNO") )]
47125	CodeLPNO,
47126	#[cfg_attr( feature = "derive_serde", serde(rename = "PFAB") )]
47127	CodePFAB,
47128	#[cfg_attr( feature = "derive_serde", serde(rename = "PYRT") )]
47129	CodePYRT,
47130	#[cfg_attr( feature = "derive_serde", serde(rename = "REPK") )]
47131	CodeREPK,
47132	#[cfg_attr( feature = "derive_serde", serde(rename = "RMBS") )]
47133	CodeRMBS,
47134	#[cfg_attr( feature = "derive_serde", serde(rename = "SCBO") )]
47135	CodeSCBO,
47136	#[cfg_attr( feature = "derive_serde", serde(rename = "STRB") )]
47137	CodeSTRB,
47138	#[cfg_attr( feature = "derive_serde", serde(rename = "STUT") )]
47139	CodeSTUT,
47140	#[cfg_attr( feature = "derive_serde", serde(rename = "WBSE") )]
47141	CodeWBSE,
47142}
47143
47144impl InstrumentSubStructureType1Code {
47145	pub fn validate(&self) -> Result<(), ValidationError> {
47146		Ok(())
47147	}
47148}
47149
47150
47151// InstrumentSubStructureType2Choice ...
47152#[cfg_attr(feature = "derive_debug", derive(Debug))]
47153#[cfg_attr(feature = "derive_default", derive(Default))]
47154#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47155#[cfg_attr(feature = "derive_clone", derive(Clone))]
47156#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47157pub struct InstrumentSubStructureType2Choice {
47158	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
47159	pub cd: Option<InstrumentSubStructureType1Code>,
47160	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
47161	pub prtry: Option<GenericIdentification30>,
47162}
47163
47164impl InstrumentSubStructureType2Choice {
47165	pub fn validate(&self) -> Result<(), ValidationError> {
47166		if let Some(ref val) = self.cd { val.validate()? }
47167		if let Some(ref val) = self.prtry { val.validate()? }
47168		Ok(())
47169	}
47170}
47171
47172
47173// Insurance1Code ...
47174#[cfg_attr(feature = "derive_debug", derive(Debug))]
47175#[cfg_attr(feature = "derive_default", derive(Default))]
47176#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47177#[cfg_attr(feature = "derive_clone", derive(Clone))]
47178#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47179pub enum Insurance1Code {
47180	#[cfg_attr(feature = "derive_default", default)]
47181	#[cfg_attr( feature = "derive_serde", serde(rename = "LIFE") )]
47182	CodeLIFE,
47183	#[cfg_attr( feature = "derive_serde", serde(rename = "PDIS") )]
47184	CodePDIS,
47185}
47186
47187impl Insurance1Code {
47188	pub fn validate(&self) -> Result<(), ValidationError> {
47189		Ok(())
47190	}
47191}
47192
47193
47194// InsuranceType2Choice ...
47195#[cfg_attr(feature = "derive_debug", derive(Debug))]
47196#[cfg_attr(feature = "derive_default", derive(Default))]
47197#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47198#[cfg_attr(feature = "derive_clone", derive(Clone))]
47199#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47200pub struct InsuranceType2Choice {
47201	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
47202	pub cd: Option<Insurance1Code>,
47203	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
47204	pub prtry: Option<GenericIdentification47>,
47205}
47206
47207impl InsuranceType2Choice {
47208	pub fn validate(&self) -> Result<(), ValidationError> {
47209		if let Some(ref val) = self.cd { val.validate()? }
47210		if let Some(ref val) = self.prtry { val.validate()? }
47211		Ok(())
47212	}
47213}
47214
47215
47216// IntendedOrActual2Code ...
47217#[cfg_attr(feature = "derive_debug", derive(Debug))]
47218#[cfg_attr(feature = "derive_default", derive(Default))]
47219#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47220#[cfg_attr(feature = "derive_clone", derive(Clone))]
47221#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47222pub enum IntendedOrActual2Code {
47223	#[cfg_attr(feature = "derive_default", default)]
47224	#[cfg_attr( feature = "derive_serde", serde(rename = "ANTE") )]
47225	CodeANTE,
47226	#[cfg_attr( feature = "derive_serde", serde(rename = "POST") )]
47227	CodePOST,
47228}
47229
47230impl IntendedOrActual2Code {
47231	pub fn validate(&self) -> Result<(), ValidationError> {
47232		Ok(())
47233	}
47234}
47235
47236
47237// InterestComputationMethod1Code ...
47238#[cfg_attr(feature = "derive_debug", derive(Debug))]
47239#[cfg_attr(feature = "derive_default", derive(Default))]
47240#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47241#[cfg_attr(feature = "derive_clone", derive(Clone))]
47242#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47243pub enum InterestComputationMethod1Code {
47244	#[cfg_attr(feature = "derive_default", default)]
47245	#[cfg_attr( feature = "derive_serde", serde(rename = "A001") )]
47246	CodeA001,
47247	#[cfg_attr( feature = "derive_serde", serde(rename = "A002") )]
47248	CodeA002,
47249	#[cfg_attr( feature = "derive_serde", serde(rename = "A003") )]
47250	CodeA003,
47251	#[cfg_attr( feature = "derive_serde", serde(rename = "A004") )]
47252	CodeA004,
47253	#[cfg_attr( feature = "derive_serde", serde(rename = "A005") )]
47254	CodeA005,
47255	#[cfg_attr( feature = "derive_serde", serde(rename = "A006") )]
47256	CodeA006,
47257	#[cfg_attr( feature = "derive_serde", serde(rename = "A007") )]
47258	CodeA007,
47259	#[cfg_attr( feature = "derive_serde", serde(rename = "A008") )]
47260	CodeA008,
47261	#[cfg_attr( feature = "derive_serde", serde(rename = "A009") )]
47262	CodeA009,
47263	#[cfg_attr( feature = "derive_serde", serde(rename = "A010") )]
47264	CodeA010,
47265	#[cfg_attr( feature = "derive_serde", serde(rename = "A011") )]
47266	CodeA011,
47267	#[cfg_attr( feature = "derive_serde", serde(rename = "A012") )]
47268	CodeA012,
47269	#[cfg_attr( feature = "derive_serde", serde(rename = "A013") )]
47270	CodeA013,
47271	#[cfg_attr( feature = "derive_serde", serde(rename = "A014") )]
47272	CodeA014,
47273}
47274
47275impl InterestComputationMethod1Code {
47276	pub fn validate(&self) -> Result<(), ValidationError> {
47277		Ok(())
47278	}
47279}
47280
47281
47282// InterestComputationMethod2Code ...
47283#[cfg_attr(feature = "derive_debug", derive(Debug))]
47284#[cfg_attr(feature = "derive_default", derive(Default))]
47285#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47286#[cfg_attr(feature = "derive_clone", derive(Clone))]
47287#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47288pub enum InterestComputationMethod2Code {
47289	#[cfg_attr(feature = "derive_default", default)]
47290	#[cfg_attr( feature = "derive_serde", serde(rename = "A001") )]
47291	CodeA001,
47292	#[cfg_attr( feature = "derive_serde", serde(rename = "A002") )]
47293	CodeA002,
47294	#[cfg_attr( feature = "derive_serde", serde(rename = "A003") )]
47295	CodeA003,
47296	#[cfg_attr( feature = "derive_serde", serde(rename = "A004") )]
47297	CodeA004,
47298	#[cfg_attr( feature = "derive_serde", serde(rename = "A005") )]
47299	CodeA005,
47300	#[cfg_attr( feature = "derive_serde", serde(rename = "A006") )]
47301	CodeA006,
47302	#[cfg_attr( feature = "derive_serde", serde(rename = "A007") )]
47303	CodeA007,
47304	#[cfg_attr( feature = "derive_serde", serde(rename = "A008") )]
47305	CodeA008,
47306	#[cfg_attr( feature = "derive_serde", serde(rename = "A009") )]
47307	CodeA009,
47308	#[cfg_attr( feature = "derive_serde", serde(rename = "A010") )]
47309	CodeA010,
47310	#[cfg_attr( feature = "derive_serde", serde(rename = "A011") )]
47311	CodeA011,
47312	#[cfg_attr( feature = "derive_serde", serde(rename = "A012") )]
47313	CodeA012,
47314	#[cfg_attr( feature = "derive_serde", serde(rename = "A013") )]
47315	CodeA013,
47316	#[cfg_attr( feature = "derive_serde", serde(rename = "A014") )]
47317	CodeA014,
47318	#[cfg_attr( feature = "derive_serde", serde(rename = "NARR") )]
47319	CodeNARR,
47320}
47321
47322impl InterestComputationMethod2Code {
47323	pub fn validate(&self) -> Result<(), ValidationError> {
47324		Ok(())
47325	}
47326}
47327
47328
47329// InterestComputationMethod4Code ...
47330#[cfg_attr(feature = "derive_debug", derive(Debug))]
47331#[cfg_attr(feature = "derive_default", derive(Default))]
47332#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47333#[cfg_attr(feature = "derive_clone", derive(Clone))]
47334#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47335pub enum InterestComputationMethod4Code {
47336	#[cfg_attr(feature = "derive_default", default)]
47337	#[cfg_attr( feature = "derive_serde", serde(rename = "A004") )]
47338	CodeA004,
47339	#[cfg_attr( feature = "derive_serde", serde(rename = "A019") )]
47340	CodeA019,
47341	#[cfg_attr( feature = "derive_serde", serde(rename = "A017") )]
47342	CodeA017,
47343	#[cfg_attr( feature = "derive_serde", serde(rename = "A005") )]
47344	CodeA005,
47345	#[cfg_attr( feature = "derive_serde", serde(rename = "A009") )]
47346	CodeA009,
47347	#[cfg_attr( feature = "derive_serde", serde(rename = "A014") )]
47348	CodeA014,
47349	#[cfg_attr( feature = "derive_serde", serde(rename = "A010") )]
47350	CodeA010,
47351	#[cfg_attr( feature = "derive_serde", serde(rename = "A006") )]
47352	CodeA006,
47353	#[cfg_attr( feature = "derive_serde", serde(rename = "A008") )]
47354	CodeA008,
47355	#[cfg_attr( feature = "derive_serde", serde(rename = "A015") )]
47356	CodeA015,
47357	#[cfg_attr( feature = "derive_serde", serde(rename = "A018") )]
47358	CodeA018,
47359	#[cfg_attr( feature = "derive_serde", serde(rename = "A011") )]
47360	CodeA011,
47361	#[cfg_attr( feature = "derive_serde", serde(rename = "A001") )]
47362	CodeA001,
47363	#[cfg_attr( feature = "derive_serde", serde(rename = "A002") )]
47364	CodeA002,
47365	#[cfg_attr( feature = "derive_serde", serde(rename = "A003") )]
47366	CodeA003,
47367	#[cfg_attr( feature = "derive_serde", serde(rename = "A012") )]
47368	CodeA012,
47369	#[cfg_attr( feature = "derive_serde", serde(rename = "A013") )]
47370	CodeA013,
47371	#[cfg_attr( feature = "derive_serde", serde(rename = "A007") )]
47372	CodeA007,
47373	#[cfg_attr( feature = "derive_serde", serde(rename = "A016") )]
47374	CodeA016,
47375	#[cfg_attr( feature = "derive_serde", serde(rename = "NARR") )]
47376	CodeNARR,
47377	#[cfg_attr( feature = "derive_serde", serde(rename = "A020") )]
47378	CodeA020,
47379}
47380
47381impl InterestComputationMethod4Code {
47382	pub fn validate(&self) -> Result<(), ValidationError> {
47383		Ok(())
47384	}
47385}
47386
47387
47388// InterestComputationMethodFormat6Choice ...
47389#[cfg_attr(feature = "derive_debug", derive(Debug))]
47390#[cfg_attr(feature = "derive_default", derive(Default))]
47391#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47392#[cfg_attr(feature = "derive_clone", derive(Clone))]
47393#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47394pub struct InterestComputationMethodFormat6Choice {
47395	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
47396	pub cd: Option<InterestComputationMethod1Code>,
47397	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
47398	pub prtry: Option<String>,
47399}
47400
47401impl InterestComputationMethodFormat6Choice {
47402	pub fn validate(&self) -> Result<(), ValidationError> {
47403		if let Some(ref val) = self.cd { val.validate()? }
47404		if let Some(ref val) = self.prtry {
47405			if val.chars().count() < 1 {
47406				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
47407			}
47408			if val.chars().count() > 35 {
47409				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
47410			}
47411		}
47412		Ok(())
47413	}
47414}
47415
47416
47417// InterestComputationMethodFormat7 ...
47418#[cfg_attr(feature = "derive_debug", derive(Debug))]
47419#[cfg_attr(feature = "derive_default", derive(Default))]
47420#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47421#[cfg_attr(feature = "derive_clone", derive(Clone))]
47422#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47423pub struct InterestComputationMethodFormat7 {
47424	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
47425	pub cd: InterestComputationMethod4Code,
47426	#[cfg_attr( feature = "derive_serde", serde(rename = "Nrrtv", skip_serializing_if = "Option::is_none") )]
47427	pub nrrtv: Option<String>,
47428}
47429
47430impl InterestComputationMethodFormat7 {
47431	pub fn validate(&self) -> Result<(), ValidationError> {
47432		self.cd.validate()?;
47433		if let Some(ref val) = self.nrrtv {
47434			if val.chars().count() < 1 {
47435				return Err(ValidationError::new(1001, "nrrtv is shorter than the minimum length of 1".to_string()));
47436			}
47437			if val.chars().count() > 1000 {
47438				return Err(ValidationError::new(1002, "nrrtv exceeds the maximum length of 1000".to_string()));
47439			}
47440		}
47441		Ok(())
47442	}
47443}
47444
47445
47446// InterestPaymentDateRange1 ...
47447#[cfg_attr(feature = "derive_debug", derive(Debug))]
47448#[cfg_attr(feature = "derive_default", derive(Default))]
47449#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47450#[cfg_attr(feature = "derive_clone", derive(Clone))]
47451#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47452pub struct InterestPaymentDateRange1 {
47453	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstSchdlId", skip_serializing_if = "Option::is_none") )]
47454	pub intrst_schdl_id: Option<String>,
47455	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdDt", skip_serializing_if = "Option::is_none") )]
47456	pub xpctd_dt: Option<String>,
47457	#[cfg_attr( feature = "derive_serde", serde(rename = "DueDt", skip_serializing_if = "Option::is_none") )]
47458	pub due_dt: Option<String>,
47459}
47460
47461impl InterestPaymentDateRange1 {
47462	pub fn validate(&self) -> Result<(), ValidationError> {
47463		if let Some(ref val) = self.intrst_schdl_id {
47464			if val.chars().count() < 1 {
47465				return Err(ValidationError::new(1001, "intrst_schdl_id is shorter than the minimum length of 1".to_string()));
47466			}
47467			if val.chars().count() > 35 {
47468				return Err(ValidationError::new(1002, "intrst_schdl_id exceeds the maximum length of 35".to_string()));
47469			}
47470		}
47471		Ok(())
47472	}
47473}
47474
47475
47476// InterestPaymentSchedule1 ...
47477#[cfg_attr(feature = "derive_debug", derive(Debug))]
47478#[cfg_attr(feature = "derive_default", derive(Default))]
47479#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47480#[cfg_attr(feature = "derive_clone", derive(Clone))]
47481#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47482pub struct InterestPaymentSchedule1 {
47483	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstSchdlId", skip_serializing_if = "Option::is_none") )]
47484	pub intrst_schdl_id: Option<String>,
47485	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
47486	pub amt: Option<ActiveCurrencyAndAmount>,
47487	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdDt", skip_serializing_if = "Option::is_none") )]
47488	pub xpctd_dt: Option<String>,
47489	#[cfg_attr( feature = "derive_serde", serde(rename = "DueDt", skip_serializing_if = "Option::is_none") )]
47490	pub due_dt: Option<String>,
47491	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
47492	pub addtl_inf: Option<String>,
47493}
47494
47495impl InterestPaymentSchedule1 {
47496	pub fn validate(&self) -> Result<(), ValidationError> {
47497		if let Some(ref val) = self.intrst_schdl_id {
47498			if val.chars().count() < 1 {
47499				return Err(ValidationError::new(1001, "intrst_schdl_id is shorter than the minimum length of 1".to_string()));
47500			}
47501			if val.chars().count() > 35 {
47502				return Err(ValidationError::new(1002, "intrst_schdl_id exceeds the maximum length of 35".to_string()));
47503			}
47504		}
47505		if let Some(ref val) = self.amt { val.validate()? }
47506		if let Some(ref val) = self.addtl_inf {
47507			if val.chars().count() < 1 {
47508				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
47509			}
47510			if val.chars().count() > 1025 {
47511				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 1025".to_string()));
47512			}
47513		}
47514		Ok(())
47515	}
47516}
47517
47518
47519// InterestRate27Choice ...
47520#[cfg_attr(feature = "derive_debug", derive(Debug))]
47521#[cfg_attr(feature = "derive_default", derive(Default))]
47522#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47523#[cfg_attr(feature = "derive_clone", derive(Clone))]
47524#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47525pub struct InterestRate27Choice {
47526	#[cfg_attr( feature = "derive_serde", serde(rename = "Fxd", skip_serializing_if = "Option::is_none") )]
47527	pub fxd: Option<FixedRate11>,
47528	#[cfg_attr( feature = "derive_serde", serde(rename = "Fltg", skip_serializing_if = "Option::is_none") )]
47529	pub fltg: Option<FloatingInterestRate22>,
47530}
47531
47532impl InterestRate27Choice {
47533	pub fn validate(&self) -> Result<(), ValidationError> {
47534		if let Some(ref val) = self.fxd { val.validate()? }
47535		if let Some(ref val) = self.fltg { val.validate()? }
47536		Ok(())
47537	}
47538}
47539
47540
47541// InterestRate2Choice ...
47542#[cfg_attr(feature = "derive_debug", derive(Debug))]
47543#[cfg_attr(feature = "derive_default", derive(Default))]
47544#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47545#[cfg_attr(feature = "derive_clone", derive(Clone))]
47546#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47547pub struct InterestRate2Choice {
47548	#[cfg_attr( feature = "derive_serde", serde(rename = "Fxd", skip_serializing_if = "Option::is_none") )]
47549	pub fxd: Option<f64>,
47550	#[cfg_attr( feature = "derive_serde", serde(rename = "Fltg", skip_serializing_if = "Option::is_none") )]
47551	pub fltg: Option<FloatingInterestRate4>,
47552}
47553
47554impl InterestRate2Choice {
47555	pub fn validate(&self) -> Result<(), ValidationError> {
47556		if let Some(ref val) = self.fltg { val.validate()? }
47557		Ok(())
47558	}
47559}
47560
47561
47562// InterestRate33Choice ...
47563#[cfg_attr(feature = "derive_debug", derive(Debug))]
47564#[cfg_attr(feature = "derive_default", derive(Default))]
47565#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47566#[cfg_attr(feature = "derive_clone", derive(Clone))]
47567#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47568pub struct InterestRate33Choice {
47569	#[cfg_attr( feature = "derive_serde", serde(rename = "Fxd", skip_serializing_if = "Option::is_none") )]
47570	pub fxd: Option<FixedRate10>,
47571	#[cfg_attr( feature = "derive_serde", serde(rename = "Fltg", skip_serializing_if = "Option::is_none") )]
47572	pub fltg: Option<FloatingRate13>,
47573}
47574
47575impl InterestRate33Choice {
47576	pub fn validate(&self) -> Result<(), ValidationError> {
47577		if let Some(ref val) = self.fxd { val.validate()? }
47578		if let Some(ref val) = self.fltg { val.validate()? }
47579		Ok(())
47580	}
47581}
47582
47583
47584// InterestRate6 ...
47585#[cfg_attr(feature = "derive_debug", derive(Debug))]
47586#[cfg_attr(feature = "derive_default", derive(Default))]
47587#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47588#[cfg_attr(feature = "derive_clone", derive(Clone))]
47589#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47590pub struct InterestRate6 {
47591	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
47592	pub amt: AmountAndDirection53,
47593	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRate") )]
47594	pub intrst_rate: InterestRate27Choice,
47595}
47596
47597impl InterestRate6 {
47598	pub fn validate(&self) -> Result<(), ValidationError> {
47599		self.amt.validate()?;
47600		self.intrst_rate.validate()?;
47601		Ok(())
47602	}
47603}
47604
47605
47606// InterestRate6Choice ...
47607#[cfg_attr(feature = "derive_debug", derive(Debug))]
47608#[cfg_attr(feature = "derive_default", derive(Default))]
47609#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47610#[cfg_attr(feature = "derive_clone", derive(Clone))]
47611#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47612pub struct InterestRate6Choice {
47613	#[cfg_attr( feature = "derive_serde", serde(rename = "Fxd", skip_serializing_if = "Option::is_none") )]
47614	pub fxd: Option<f64>,
47615	#[cfg_attr( feature = "derive_serde", serde(rename = "Fltg", skip_serializing_if = "Option::is_none") )]
47616	pub fltg: Option<FloatingInterestRate6>,
47617}
47618
47619impl InterestRate6Choice {
47620	pub fn validate(&self) -> Result<(), ValidationError> {
47621		if let Some(ref val) = self.fltg { val.validate()? }
47622		Ok(())
47623	}
47624}
47625
47626
47627// InterestRate8Choice ...
47628#[cfg_attr(feature = "derive_debug", derive(Debug))]
47629#[cfg_attr(feature = "derive_default", derive(Default))]
47630#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47631#[cfg_attr(feature = "derive_clone", derive(Clone))]
47632#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47633pub struct InterestRate8Choice {
47634	#[cfg_attr( feature = "derive_serde", serde(rename = "Fxd", skip_serializing_if = "Option::is_none") )]
47635	pub fxd: Option<f64>,
47636	#[cfg_attr( feature = "derive_serde", serde(rename = "Fltg", skip_serializing_if = "Option::is_none") )]
47637	pub fltg: Option<FloatingInterestRate8>,
47638}
47639
47640impl InterestRate8Choice {
47641	pub fn validate(&self) -> Result<(), ValidationError> {
47642		if let Some(ref val) = self.fltg { val.validate()? }
47643		Ok(())
47644	}
47645}
47646
47647
47648// InterestRateContractTerm1 ...
47649#[cfg_attr(feature = "derive_debug", derive(Debug))]
47650#[cfg_attr(feature = "derive_default", derive(Default))]
47651#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47652#[cfg_attr(feature = "derive_clone", derive(Clone))]
47653#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47654pub struct InterestRateContractTerm1 {
47655	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit") )]
47656	pub unit: RateBasis1Code,
47657	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
47658	pub val: f64,
47659}
47660
47661impl InterestRateContractTerm1 {
47662	pub fn validate(&self) -> Result<(), ValidationError> {
47663		self.unit.validate()?;
47664		Ok(())
47665	}
47666}
47667
47668
47669// InterestRateContractTerm2 ...
47670#[cfg_attr(feature = "derive_debug", derive(Debug))]
47671#[cfg_attr(feature = "derive_default", derive(Default))]
47672#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47673#[cfg_attr(feature = "derive_clone", derive(Clone))]
47674#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47675pub struct InterestRateContractTerm2 {
47676	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit") )]
47677	pub unit: RateBasis1Code,
47678	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
47679	pub val: f64,
47680}
47681
47682impl InterestRateContractTerm2 {
47683	pub fn validate(&self) -> Result<(), ValidationError> {
47684		self.unit.validate()?;
47685		Ok(())
47686	}
47687}
47688
47689
47690// InterestRateContractTerm4 ...
47691#[cfg_attr(feature = "derive_debug", derive(Debug))]
47692#[cfg_attr(feature = "derive_default", derive(Default))]
47693#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47694#[cfg_attr(feature = "derive_clone", derive(Clone))]
47695#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47696pub struct InterestRateContractTerm4 {
47697	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit", skip_serializing_if = "Option::is_none") )]
47698	pub unit: Option<Frequency13Code>,
47699	#[cfg_attr( feature = "derive_serde", serde(rename = "Val", skip_serializing_if = "Option::is_none") )]
47700	pub val: Option<f64>,
47701}
47702
47703impl InterestRateContractTerm4 {
47704	pub fn validate(&self) -> Result<(), ValidationError> {
47705		if let Some(ref val) = self.unit { val.validate()? }
47706		Ok(())
47707	}
47708}
47709
47710
47711// InterestRateDerivative2Choice ...
47712#[cfg_attr(feature = "derive_debug", derive(Debug))]
47713#[cfg_attr(feature = "derive_default", derive(Default))]
47714#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47715#[cfg_attr(feature = "derive_clone", derive(Clone))]
47716#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47717pub struct InterestRateDerivative2Choice {
47718	#[cfg_attr( feature = "derive_serde", serde(rename = "SwpRltd", skip_serializing_if = "Option::is_none") )]
47719	pub swp_rltd: Option<SwapType1Code>,
47720	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
47721	pub othr: Option<UnderlyingInterestRateType3Code>,
47722}
47723
47724impl InterestRateDerivative2Choice {
47725	pub fn validate(&self) -> Result<(), ValidationError> {
47726		if let Some(ref val) = self.swp_rltd { val.validate()? }
47727		if let Some(ref val) = self.othr { val.validate()? }
47728		Ok(())
47729	}
47730}
47731
47732
47733// InterestRateDerivative5 ...
47734#[cfg_attr(feature = "derive_debug", derive(Debug))]
47735#[cfg_attr(feature = "derive_default", derive(Default))]
47736#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47737#[cfg_attr(feature = "derive_clone", derive(Clone))]
47738#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47739pub struct InterestRateDerivative5 {
47740	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygTp") )]
47741	pub undrlyg_tp: InterestRateDerivative2Choice,
47742	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygBd", skip_serializing_if = "Option::is_none") )]
47743	pub undrlyg_bd: Option<BondDerivative2>,
47744	#[cfg_attr( feature = "derive_serde", serde(rename = "SwptnNtnlCcy", skip_serializing_if = "Option::is_none") )]
47745	pub swptn_ntnl_ccy: Option<String>,
47746	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygSwpMtrtyDt", skip_serializing_if = "Option::is_none") )]
47747	pub undrlyg_swp_mtrty_dt: Option<String>,
47748	#[cfg_attr( feature = "derive_serde", serde(rename = "InfltnIndx", skip_serializing_if = "Option::is_none") )]
47749	pub infltn_indx: Option<InflationIndex1Choice>,
47750	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRateRef") )]
47751	pub intrst_rate_ref: FloatingInterestRate8,
47752}
47753
47754impl InterestRateDerivative5 {
47755	pub fn validate(&self) -> Result<(), ValidationError> {
47756		self.undrlyg_tp.validate()?;
47757		if let Some(ref val) = self.undrlyg_bd { val.validate()? }
47758		if let Some(ref val) = self.swptn_ntnl_ccy {
47759			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
47760			if !pattern.is_match(val) {
47761				return Err(ValidationError::new(1005, "swptn_ntnl_ccy does not match the required pattern".to_string()));
47762			}
47763		}
47764		if let Some(ref val) = self.infltn_indx { val.validate()? }
47765		self.intrst_rate_ref.validate()?;
47766		Ok(())
47767	}
47768}
47769
47770
47771// InterestRateFrequency3Choice ...
47772#[cfg_attr(feature = "derive_debug", derive(Debug))]
47773#[cfg_attr(feature = "derive_default", derive(Default))]
47774#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47775#[cfg_attr(feature = "derive_clone", derive(Clone))]
47776#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47777pub struct InterestRateFrequency3Choice {
47778	#[cfg_attr( feature = "derive_serde", serde(rename = "Term", skip_serializing_if = "Option::is_none") )]
47779	pub term: Option<InterestRateContractTerm4>,
47780	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
47781	pub prtry: Option<String>,
47782}
47783
47784impl InterestRateFrequency3Choice {
47785	pub fn validate(&self) -> Result<(), ValidationError> {
47786		if let Some(ref val) = self.term { val.validate()? }
47787		if let Some(ref val) = self.prtry {
47788			if val.chars().count() < 1 {
47789				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
47790			}
47791			if val.chars().count() > 52 {
47792				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 52".to_string()));
47793			}
47794		}
47795		Ok(())
47796	}
47797}
47798
47799
47800// InterestRateLegs14 ...
47801#[cfg_attr(feature = "derive_debug", derive(Debug))]
47802#[cfg_attr(feature = "derive_default", derive(Default))]
47803#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47804#[cfg_attr(feature = "derive_clone", derive(Clone))]
47805#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47806pub struct InterestRateLegs14 {
47807	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstLeg", skip_serializing_if = "Option::is_none") )]
47808	pub frst_leg: Option<InterestRate33Choice>,
47809	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndLeg", skip_serializing_if = "Option::is_none") )]
47810	pub scnd_leg: Option<InterestRate33Choice>,
47811}
47812
47813impl InterestRateLegs14 {
47814	pub fn validate(&self) -> Result<(), ValidationError> {
47815		if let Some(ref val) = self.frst_leg { val.validate()? }
47816		if let Some(ref val) = self.scnd_leg { val.validate()? }
47817		Ok(())
47818	}
47819}
47820
47821
47822// InterestRateType1Code ...
47823#[cfg_attr(feature = "derive_debug", derive(Debug))]
47824#[cfg_attr(feature = "derive_default", derive(Default))]
47825#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47826#[cfg_attr(feature = "derive_clone", derive(Clone))]
47827#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47828pub enum InterestRateType1Code {
47829	#[cfg_attr(feature = "derive_default", default)]
47830	#[cfg_attr( feature = "derive_serde", serde(rename = "FIXE") )]
47831	CodeFIXE,
47832	#[cfg_attr( feature = "derive_serde", serde(rename = "VARI") )]
47833	CodeVARI,
47834}
47835
47836impl InterestRateType1Code {
47837	pub fn validate(&self) -> Result<(), ValidationError> {
47838		Ok(())
47839	}
47840}
47841
47842
47843// InterestRecord2 ...
47844#[cfg_attr(feature = "derive_debug", derive(Debug))]
47845#[cfg_attr(feature = "derive_default", derive(Default))]
47846#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47847#[cfg_attr(feature = "derive_clone", derive(Clone))]
47848#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47849pub struct InterestRecord2 {
47850	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
47851	pub amt: ActiveOrHistoricCurrencyAndAmount,
47852	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
47853	pub cdt_dbt_ind: CreditDebitCode,
47854	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
47855	pub tp: Option<InterestType1Choice>,
47856	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
47857	pub rate: Option<Rate4>,
47858	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDt", skip_serializing_if = "Option::is_none") )]
47859	pub fr_to_dt: Option<DateTimePeriod1>,
47860	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
47861	pub rsn: Option<String>,
47862	#[cfg_attr( feature = "derive_serde", serde(rename = "Tax", skip_serializing_if = "Option::is_none") )]
47863	pub tax: Option<TaxCharges2>,
47864}
47865
47866impl InterestRecord2 {
47867	pub fn validate(&self) -> Result<(), ValidationError> {
47868		self.amt.validate()?;
47869		self.cdt_dbt_ind.validate()?;
47870		if let Some(ref val) = self.tp { val.validate()? }
47871		if let Some(ref val) = self.rate { val.validate()? }
47872		if let Some(ref val) = self.fr_to_dt { val.validate()? }
47873		if let Some(ref val) = self.rsn {
47874			if val.chars().count() < 1 {
47875				return Err(ValidationError::new(1001, "rsn is shorter than the minimum length of 1".to_string()));
47876			}
47877			if val.chars().count() > 35 {
47878				return Err(ValidationError::new(1002, "rsn exceeds the maximum length of 35".to_string()));
47879			}
47880		}
47881		if let Some(ref val) = self.tax { val.validate()? }
47882		Ok(())
47883	}
47884}
47885
47886
47887// InterestType1Choice ...
47888#[cfg_attr(feature = "derive_debug", derive(Debug))]
47889#[cfg_attr(feature = "derive_default", derive(Default))]
47890#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47891#[cfg_attr(feature = "derive_clone", derive(Clone))]
47892#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47893pub struct InterestType1Choice {
47894	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
47895	pub cd: Option<InterestType1Code>,
47896	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
47897	pub prtry: Option<String>,
47898}
47899
47900impl InterestType1Choice {
47901	pub fn validate(&self) -> Result<(), ValidationError> {
47902		if let Some(ref val) = self.cd { val.validate()? }
47903		if let Some(ref val) = self.prtry {
47904			if val.chars().count() < 1 {
47905				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
47906			}
47907			if val.chars().count() > 35 {
47908				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
47909			}
47910		}
47911		Ok(())
47912	}
47913}
47914
47915
47916// InterestType1Code ...
47917#[cfg_attr(feature = "derive_debug", derive(Debug))]
47918#[cfg_attr(feature = "derive_default", derive(Default))]
47919#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47920#[cfg_attr(feature = "derive_clone", derive(Clone))]
47921#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47922pub enum InterestType1Code {
47923	#[cfg_attr(feature = "derive_default", default)]
47924	#[cfg_attr( feature = "derive_serde", serde(rename = "INDY") )]
47925	CodeINDY,
47926	#[cfg_attr( feature = "derive_serde", serde(rename = "OVRN") )]
47927	CodeOVRN,
47928}
47929
47930impl InterestType1Code {
47931	pub fn validate(&self) -> Result<(), ValidationError> {
47932		Ok(())
47933	}
47934}
47935
47936
47937// InterestType3Code ...
47938#[cfg_attr(feature = "derive_debug", derive(Debug))]
47939#[cfg_attr(feature = "derive_default", derive(Default))]
47940#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47941#[cfg_attr(feature = "derive_clone", derive(Clone))]
47942#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47943pub enum InterestType3Code {
47944	#[cfg_attr(feature = "derive_default", default)]
47945	#[cfg_attr( feature = "derive_serde", serde(rename = "ZCPN") )]
47946	CodeZCPN,
47947	#[cfg_attr( feature = "derive_serde", serde(rename = "FIXD") )]
47948	CodeFIXD,
47949	#[cfg_attr( feature = "derive_serde", serde(rename = "FLRN") )]
47950	CodeFLRN,
47951	#[cfg_attr( feature = "derive_serde", serde(rename = "DUAL") )]
47952	CodeDUAL,
47953	#[cfg_attr( feature = "derive_serde", serde(rename = "INDE") )]
47954	CodeINDE,
47955	#[cfg_attr( feature = "derive_serde", serde(rename = "DSCO") )]
47956	CodeDSCO,
47957}
47958
47959impl InterestType3Code {
47960	pub fn validate(&self) -> Result<(), ValidationError> {
47961		Ok(())
47962	}
47963}
47964
47965
47966// Intermediary46 ...
47967#[cfg_attr(feature = "derive_debug", derive(Debug))]
47968#[cfg_attr(feature = "derive_default", derive(Default))]
47969#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
47970#[cfg_attr(feature = "derive_clone", derive(Clone))]
47971#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
47972pub struct Intermediary46 {
47973	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
47974	pub id: PartyIdentification177Choice,
47975	#[cfg_attr( feature = "derive_serde", serde(rename = "LglNttyIdr", skip_serializing_if = "Option::is_none") )]
47976	pub lgl_ntty_idr: Option<String>,
47977	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
47978	pub acct: Option<Account32>,
47979	#[cfg_attr( feature = "derive_serde", serde(rename = "WvdTrlrComssnInd", skip_serializing_if = "Option::is_none") )]
47980	pub wvd_trlr_comssn_ind: Option<bool>,
47981	#[cfg_attr( feature = "derive_serde", serde(rename = "Role", skip_serializing_if = "Option::is_none") )]
47982	pub role: Option<PartyRole2Choice>,
47983	#[cfg_attr( feature = "derive_serde", serde(rename = "PmryComAdr", skip_serializing_if = "Option::is_none") )]
47984	pub pmry_com_adr: Option<Vec<CommunicationAddress6>>,
47985	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndryComAdr", skip_serializing_if = "Option::is_none") )]
47986	pub scndry_com_adr: Option<Vec<CommunicationAddress6>>,
47987	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none") )]
47988	pub nm_and_adr: Option<NameAndAddress4>,
47989}
47990
47991impl Intermediary46 {
47992	pub fn validate(&self) -> Result<(), ValidationError> {
47993		self.id.validate()?;
47994		if let Some(ref val) = self.lgl_ntty_idr {
47995			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
47996			if !pattern.is_match(val) {
47997				return Err(ValidationError::new(1005, "lgl_ntty_idr does not match the required pattern".to_string()));
47998			}
47999		}
48000		if let Some(ref val) = self.acct { val.validate()? }
48001		if let Some(ref val) = self.role { val.validate()? }
48002		if let Some(ref vec) = self.pmry_com_adr { for item in vec { item.validate()? } }
48003		if let Some(ref vec) = self.scndry_com_adr { for item in vec { item.validate()? } }
48004		if let Some(ref val) = self.nm_and_adr { val.validate()? }
48005		Ok(())
48006	}
48007}
48008
48009
48010// Intermediary47 ...
48011#[cfg_attr(feature = "derive_debug", derive(Debug))]
48012#[cfg_attr(feature = "derive_default", derive(Default))]
48013#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48014#[cfg_attr(feature = "derive_clone", derive(Clone))]
48015#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48016pub struct Intermediary47 {
48017	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
48018	pub id: PartyIdentification125Choice,
48019	#[cfg_attr( feature = "derive_serde", serde(rename = "LglNttyIdr", skip_serializing_if = "Option::is_none") )]
48020	pub lgl_ntty_idr: Option<String>,
48021	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
48022	pub acct: Option<Account32>,
48023}
48024
48025impl Intermediary47 {
48026	pub fn validate(&self) -> Result<(), ValidationError> {
48027		self.id.validate()?;
48028		if let Some(ref val) = self.lgl_ntty_idr {
48029			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
48030			if !pattern.is_match(val) {
48031				return Err(ValidationError::new(1005, "lgl_ntty_idr does not match the required pattern".to_string()));
48032			}
48033		}
48034		if let Some(ref val) = self.acct { val.validate()? }
48035		Ok(())
48036	}
48037}
48038
48039
48040// InternalPartyRole1Code ...
48041#[cfg_attr(feature = "derive_debug", derive(Debug))]
48042#[cfg_attr(feature = "derive_default", derive(Default))]
48043#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48044#[cfg_attr(feature = "derive_clone", derive(Clone))]
48045#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48046pub enum InternalPartyRole1Code {
48047	#[cfg_attr(feature = "derive_default", default)]
48048	#[cfg_attr( feature = "derive_serde", serde(rename = "INTC") )]
48049	CodeINTC,
48050}
48051
48052impl InternalPartyRole1Code {
48053	pub fn validate(&self) -> Result<(), ValidationError> {
48054		Ok(())
48055	}
48056}
48057
48058
48059// InternalisationData1 ...
48060#[cfg_attr(feature = "derive_debug", derive(Debug))]
48061#[cfg_attr(feature = "derive_default", derive(Default))]
48062#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48063#[cfg_attr(feature = "derive_clone", derive(Clone))]
48064#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48065pub struct InternalisationData1 {
48066	#[cfg_attr( feature = "derive_serde", serde(rename = "Aggt") )]
48067	pub aggt: InternalisationData2,
48068	#[cfg_attr( feature = "derive_serde", serde(rename = "FaildRate") )]
48069	pub faild_rate: InternalisationDataRate1,
48070}
48071
48072impl InternalisationData1 {
48073	pub fn validate(&self) -> Result<(), ValidationError> {
48074		self.aggt.validate()?;
48075		self.faild_rate.validate()?;
48076		Ok(())
48077	}
48078}
48079
48080
48081// InternalisationData2 ...
48082#[cfg_attr(feature = "derive_debug", derive(Debug))]
48083#[cfg_attr(feature = "derive_default", derive(Default))]
48084#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48085#[cfg_attr(feature = "derive_clone", derive(Clone))]
48086#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48087pub struct InternalisationData2 {
48088	#[cfg_attr( feature = "derive_serde", serde(rename = "Sttld") )]
48089	pub sttld: InternalisationDataVolume1,
48090	#[cfg_attr( feature = "derive_serde", serde(rename = "Faild") )]
48091	pub faild: InternalisationDataVolume1,
48092	#[cfg_attr( feature = "derive_serde", serde(rename = "Ttl") )]
48093	pub ttl: InternalisationDataVolume1,
48094}
48095
48096impl InternalisationData2 {
48097	pub fn validate(&self) -> Result<(), ValidationError> {
48098		self.sttld.validate()?;
48099		self.faild.validate()?;
48100		self.ttl.validate()?;
48101		Ok(())
48102	}
48103}
48104
48105
48106// InternalisationDataRate1 ...
48107#[cfg_attr(feature = "derive_debug", derive(Debug))]
48108#[cfg_attr(feature = "derive_default", derive(Default))]
48109#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48110#[cfg_attr(feature = "derive_clone", derive(Clone))]
48111#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48112pub struct InternalisationDataRate1 {
48113	#[cfg_attr( feature = "derive_serde", serde(rename = "VolPctg") )]
48114	pub vol_pctg: f64,
48115	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
48116	pub val: f64,
48117}
48118
48119impl InternalisationDataRate1 {
48120	pub fn validate(&self) -> Result<(), ValidationError> {
48121		Ok(())
48122	}
48123}
48124
48125
48126// InternalisationDataVolume1 ...
48127#[cfg_attr(feature = "derive_debug", derive(Debug))]
48128#[cfg_attr(feature = "derive_default", derive(Default))]
48129#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48130#[cfg_attr(feature = "derive_clone", derive(Clone))]
48131#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48132pub struct InternalisationDataVolume1 {
48133	#[cfg_attr( feature = "derive_serde", serde(rename = "Vol") )]
48134	pub vol: f64,
48135	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
48136	pub val: f64,
48137}
48138
48139impl InternalisationDataVolume1 {
48140	pub fn validate(&self) -> Result<(), ValidationError> {
48141		if self.vol < 0.000000 {
48142			return Err(ValidationError::new(1003, "vol is less than the minimum value of 0.000000".to_string()));
48143		}
48144		if self.val < 0.000000 {
48145			return Err(ValidationError::new(1003, "val is less than the minimum value of 0.000000".to_string()));
48146		}
48147		Ok(())
48148	}
48149}
48150
48151
48152// InteroperabilityCCP1 ...
48153#[cfg_attr(feature = "derive_debug", derive(Debug))]
48154#[cfg_attr(feature = "derive_default", derive(Default))]
48155#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48156#[cfg_attr(feature = "derive_clone", derive(Clone))]
48157#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48158pub struct InteroperabilityCCP1 {
48159	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
48160	pub id: GenericIdentification168,
48161	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlInitlMrgn") )]
48162	pub ttl_initl_mrgn: Vec<ActiveCurrencyAndAmount>,
48163	#[cfg_attr( feature = "derive_serde", serde(rename = "TrdsClrd", skip_serializing_if = "Option::is_none") )]
48164	pub trds_clrd: Option<f64>,
48165	#[cfg_attr( feature = "derive_serde", serde(rename = "GrssNtnlAmt") )]
48166	pub grss_ntnl_amt: Vec<ActiveCurrencyAnd24Amount>,
48167	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstHldg") )]
48168	pub asst_hldg: Vec<AssetHolding3>,
48169}
48170
48171impl InteroperabilityCCP1 {
48172	pub fn validate(&self) -> Result<(), ValidationError> {
48173		self.id.validate()?;
48174		for item in &self.ttl_initl_mrgn { item.validate()? }
48175		if let Some(ref val) = self.trds_clrd {
48176			if *val < 0.000000 {
48177				return Err(ValidationError::new(1003, "trds_clrd is less than the minimum value of 0.000000".to_string()));
48178			}
48179		}
48180		for item in &self.grss_ntnl_amt { item.validate()? }
48181		for item in &self.asst_hldg { item.validate()? }
48182		Ok(())
48183	}
48184}
48185
48186
48187// IntraBalance5 ...
48188#[cfg_attr(feature = "derive_debug", derive(Debug))]
48189#[cfg_attr(feature = "derive_default", derive(Default))]
48190#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48191#[cfg_attr(feature = "derive_clone", derive(Clone))]
48192#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48193pub struct IntraBalance5 {
48194	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmAmt") )]
48195	pub sttlm_amt: Amount2Choice,
48196	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmDt") )]
48197	pub sttlm_dt: DateAndDateTime2Choice,
48198	#[cfg_attr( feature = "derive_serde", serde(rename = "BalFr") )]
48199	pub bal_fr: CashSubBalanceTypeAndQuantityBreakdown3,
48200	#[cfg_attr( feature = "derive_serde", serde(rename = "BalTo") )]
48201	pub bal_to: CashSubBalanceTypeAndQuantityBreakdown3,
48202	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSubBalId", skip_serializing_if = "Option::is_none") )]
48203	pub csh_sub_bal_id: Option<GenericIdentification37>,
48204	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
48205	pub prty: Option<PriorityNumeric4Choice>,
48206	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrPrcgAddtlDtls", skip_serializing_if = "Option::is_none") )]
48207	pub instr_prcg_addtl_dtls: Option<String>,
48208}
48209
48210impl IntraBalance5 {
48211	pub fn validate(&self) -> Result<(), ValidationError> {
48212		self.sttlm_amt.validate()?;
48213		self.sttlm_dt.validate()?;
48214		self.bal_fr.validate()?;
48215		self.bal_to.validate()?;
48216		if let Some(ref val) = self.csh_sub_bal_id { val.validate()? }
48217		if let Some(ref val) = self.prty { val.validate()? }
48218		if let Some(ref val) = self.instr_prcg_addtl_dtls {
48219			if val.chars().count() < 1 {
48220				return Err(ValidationError::new(1001, "instr_prcg_addtl_dtls is shorter than the minimum length of 1".to_string()));
48221			}
48222			if val.chars().count() > 350 {
48223				return Err(ValidationError::new(1002, "instr_prcg_addtl_dtls exceeds the maximum length of 350".to_string()));
48224			}
48225		}
48226		Ok(())
48227	}
48228}
48229
48230
48231// IntraBalance6 ...
48232#[cfg_attr(feature = "derive_debug", derive(Debug))]
48233#[cfg_attr(feature = "derive_default", derive(Default))]
48234#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48235#[cfg_attr(feature = "derive_clone", derive(Clone))]
48236#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48237pub struct IntraBalance6 {
48238	#[cfg_attr( feature = "derive_serde", serde(rename = "SttldAmt", skip_serializing_if = "Option::is_none") )]
48239	pub sttld_amt: Option<Amount2Choice>,
48240	#[cfg_attr( feature = "derive_serde", serde(rename = "PrevslySttldAmt", skip_serializing_if = "Option::is_none") )]
48241	pub prevsly_sttld_amt: Option<Amount2Choice>,
48242	#[cfg_attr( feature = "derive_serde", serde(rename = "RmngSttlmAmt", skip_serializing_if = "Option::is_none") )]
48243	pub rmng_sttlm_amt: Option<Amount2Choice>,
48244	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmDt") )]
48245	pub sttlm_dt: DateAndDateTime2Choice,
48246	#[cfg_attr( feature = "derive_serde", serde(rename = "BalFr") )]
48247	pub bal_fr: CashSubBalanceTypeAndQuantityBreakdown3,
48248	#[cfg_attr( feature = "derive_serde", serde(rename = "BalTo") )]
48249	pub bal_to: CashSubBalanceTypeAndQuantityBreakdown3,
48250	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSubBalId", skip_serializing_if = "Option::is_none") )]
48251	pub csh_sub_bal_id: Option<GenericIdentification37>,
48252	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrPrcgAddtlDtls", skip_serializing_if = "Option::is_none") )]
48253	pub instr_prcg_addtl_dtls: Option<String>,
48254}
48255
48256impl IntraBalance6 {
48257	pub fn validate(&self) -> Result<(), ValidationError> {
48258		if let Some(ref val) = self.sttld_amt { val.validate()? }
48259		if let Some(ref val) = self.prevsly_sttld_amt { val.validate()? }
48260		if let Some(ref val) = self.rmng_sttlm_amt { val.validate()? }
48261		self.sttlm_dt.validate()?;
48262		self.bal_fr.validate()?;
48263		self.bal_to.validate()?;
48264		if let Some(ref val) = self.csh_sub_bal_id { val.validate()? }
48265		if let Some(ref val) = self.instr_prcg_addtl_dtls {
48266			if val.chars().count() < 1 {
48267				return Err(ValidationError::new(1001, "instr_prcg_addtl_dtls is shorter than the minimum length of 1".to_string()));
48268			}
48269			if val.chars().count() > 350 {
48270				return Err(ValidationError::new(1002, "instr_prcg_addtl_dtls exceeds the maximum length of 350".to_string()));
48271			}
48272		}
48273		Ok(())
48274	}
48275}
48276
48277
48278// IntraBalanceCancellation7 ...
48279#[cfg_attr(feature = "derive_debug", derive(Debug))]
48280#[cfg_attr(feature = "derive_default", derive(Default))]
48281#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48282#[cfg_attr(feature = "derive_clone", derive(Clone))]
48283#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48284pub struct IntraBalanceCancellation7 {
48285	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcct", skip_serializing_if = "Option::is_none") )]
48286	pub csh_acct: Option<CashAccount40>,
48287	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctOwnr", skip_serializing_if = "Option::is_none") )]
48288	pub csh_acct_ownr: Option<SystemPartyIdentification8>,
48289	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctSvcr", skip_serializing_if = "Option::is_none") )]
48290	pub csh_acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
48291	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgSts", skip_serializing_if = "Option::is_none") )]
48292	pub prcg_sts: Option<ProcessingStatus69Choice>,
48293	#[cfg_attr( feature = "derive_serde", serde(rename = "Cxl") )]
48294	pub cxl: Vec<IntraBalanceCancellation8>,
48295}
48296
48297impl IntraBalanceCancellation7 {
48298	pub fn validate(&self) -> Result<(), ValidationError> {
48299		if let Some(ref val) = self.csh_acct { val.validate()? }
48300		if let Some(ref val) = self.csh_acct_ownr { val.validate()? }
48301		if let Some(ref val) = self.csh_acct_svcr { val.validate()? }
48302		if let Some(ref val) = self.prcg_sts { val.validate()? }
48303		for item in &self.cxl { item.validate()? }
48304		Ok(())
48305	}
48306}
48307
48308
48309// IntraBalanceCancellation8 ...
48310#[cfg_attr(feature = "derive_debug", derive(Debug))]
48311#[cfg_attr(feature = "derive_default", derive(Default))]
48312#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48313#[cfg_attr(feature = "derive_clone", derive(Clone))]
48314#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48315pub struct IntraBalanceCancellation8 {
48316	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcct", skip_serializing_if = "Option::is_none") )]
48317	pub csh_acct: Option<CashAccount40>,
48318	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctOwnr", skip_serializing_if = "Option::is_none") )]
48319	pub csh_acct_ownr: Option<SystemPartyIdentification8>,
48320	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctSvcr", skip_serializing_if = "Option::is_none") )]
48321	pub csh_acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
48322	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgSts", skip_serializing_if = "Option::is_none") )]
48323	pub prcg_sts: Option<ProcessingStatus69Choice>,
48324	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqRef") )]
48325	pub req_ref: String,
48326	#[cfg_attr( feature = "derive_serde", serde(rename = "StsDt", skip_serializing_if = "Option::is_none") )]
48327	pub sts_dt: Option<String>,
48328	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
48329	pub tx_id: Option<References14>,
48330	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygIntraBal", skip_serializing_if = "Option::is_none") )]
48331	pub undrlyg_intra_bal: Option<IntraBalance5>,
48332}
48333
48334impl IntraBalanceCancellation8 {
48335	pub fn validate(&self) -> Result<(), ValidationError> {
48336		if let Some(ref val) = self.csh_acct { val.validate()? }
48337		if let Some(ref val) = self.csh_acct_ownr { val.validate()? }
48338		if let Some(ref val) = self.csh_acct_svcr { val.validate()? }
48339		if let Some(ref val) = self.prcg_sts { val.validate()? }
48340		if self.req_ref.chars().count() < 1 {
48341			return Err(ValidationError::new(1001, "req_ref is shorter than the minimum length of 1".to_string()));
48342		}
48343		if self.req_ref.chars().count() > 35 {
48344			return Err(ValidationError::new(1002, "req_ref exceeds the maximum length of 35".to_string()));
48345		}
48346		if let Some(ref val) = self.tx_id { val.validate()? }
48347		if let Some(ref val) = self.undrlyg_intra_bal { val.validate()? }
48348		Ok(())
48349	}
48350}
48351
48352
48353// IntraBalanceModification7 ...
48354#[cfg_attr(feature = "derive_debug", derive(Debug))]
48355#[cfg_attr(feature = "derive_default", derive(Default))]
48356#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48357#[cfg_attr(feature = "derive_clone", derive(Clone))]
48358#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48359pub struct IntraBalanceModification7 {
48360	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcct", skip_serializing_if = "Option::is_none") )]
48361	pub csh_acct: Option<CashAccount40>,
48362	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctOwnr", skip_serializing_if = "Option::is_none") )]
48363	pub csh_acct_ownr: Option<SystemPartyIdentification8>,
48364	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctSvcr", skip_serializing_if = "Option::is_none") )]
48365	pub csh_acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
48366	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgSts", skip_serializing_if = "Option::is_none") )]
48367	pub prcg_sts: Option<ProcessingStatus71Choice>,
48368	#[cfg_attr( feature = "derive_serde", serde(rename = "Mod") )]
48369	pub mod_attr: Vec<IntraBalanceModification8>,
48370}
48371
48372impl IntraBalanceModification7 {
48373	pub fn validate(&self) -> Result<(), ValidationError> {
48374		if let Some(ref val) = self.csh_acct { val.validate()? }
48375		if let Some(ref val) = self.csh_acct_ownr { val.validate()? }
48376		if let Some(ref val) = self.csh_acct_svcr { val.validate()? }
48377		if let Some(ref val) = self.prcg_sts { val.validate()? }
48378		for item in &self.mod_attr { item.validate()? }
48379		Ok(())
48380	}
48381}
48382
48383
48384// IntraBalanceModification8 ...
48385#[cfg_attr(feature = "derive_debug", derive(Debug))]
48386#[cfg_attr(feature = "derive_default", derive(Default))]
48387#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48388#[cfg_attr(feature = "derive_clone", derive(Clone))]
48389#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48390pub struct IntraBalanceModification8 {
48391	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcct", skip_serializing_if = "Option::is_none") )]
48392	pub csh_acct: Option<CashAccount40>,
48393	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctOwnr", skip_serializing_if = "Option::is_none") )]
48394	pub csh_acct_ownr: Option<SystemPartyIdentification8>,
48395	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctSvcr", skip_serializing_if = "Option::is_none") )]
48396	pub csh_acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
48397	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgSts", skip_serializing_if = "Option::is_none") )]
48398	pub prcg_sts: Option<ProcessingStatus71Choice>,
48399	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqRef") )]
48400	pub req_ref: String,
48401	#[cfg_attr( feature = "derive_serde", serde(rename = "StsDt", skip_serializing_if = "Option::is_none") )]
48402	pub sts_dt: Option<String>,
48403	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqDtls", skip_serializing_if = "Option::is_none") )]
48404	pub req_dtls: Option<RequestDetails22>,
48405	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygIntraBal", skip_serializing_if = "Option::is_none") )]
48406	pub undrlyg_intra_bal: Option<IntraBalance5>,
48407}
48408
48409impl IntraBalanceModification8 {
48410	pub fn validate(&self) -> Result<(), ValidationError> {
48411		if let Some(ref val) = self.csh_acct { val.validate()? }
48412		if let Some(ref val) = self.csh_acct_ownr { val.validate()? }
48413		if let Some(ref val) = self.csh_acct_svcr { val.validate()? }
48414		if let Some(ref val) = self.prcg_sts { val.validate()? }
48415		if self.req_ref.chars().count() < 1 {
48416			return Err(ValidationError::new(1001, "req_ref is shorter than the minimum length of 1".to_string()));
48417		}
48418		if self.req_ref.chars().count() > 35 {
48419			return Err(ValidationError::new(1002, "req_ref exceeds the maximum length of 35".to_string()));
48420		}
48421		if let Some(ref val) = self.req_dtls { val.validate()? }
48422		if let Some(ref val) = self.undrlyg_intra_bal { val.validate()? }
48423		Ok(())
48424	}
48425}
48426
48427
48428// IntraBalanceMovement6 ...
48429#[cfg_attr(feature = "derive_debug", derive(Debug))]
48430#[cfg_attr(feature = "derive_default", derive(Default))]
48431#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48432#[cfg_attr(feature = "derive_clone", derive(Clone))]
48433#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48434pub struct IntraBalanceMovement6 {
48435	#[cfg_attr( feature = "derive_serde", serde(rename = "BalFr") )]
48436	pub bal_fr: CashSubBalanceTypeAndQuantityBreakdown3,
48437	#[cfg_attr( feature = "derive_serde", serde(rename = "BalTo") )]
48438	pub bal_to: CashSubBalanceTypeAndQuantityBreakdown3,
48439	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmAmt") )]
48440	pub sttlm_amt: Amount2Choice,
48441	#[cfg_attr( feature = "derive_serde", serde(rename = "SttldAmt", skip_serializing_if = "Option::is_none") )]
48442	pub sttld_amt: Option<Amount2Choice>,
48443	#[cfg_attr( feature = "derive_serde", serde(rename = "PrevslySttldAmt", skip_serializing_if = "Option::is_none") )]
48444	pub prevsly_sttld_amt: Option<Amount2Choice>,
48445	#[cfg_attr( feature = "derive_serde", serde(rename = "RmngSttlmAmt", skip_serializing_if = "Option::is_none") )]
48446	pub rmng_sttlm_amt: Option<Amount2Choice>,
48447	#[cfg_attr( feature = "derive_serde", serde(rename = "IntnddSttlmDt") )]
48448	pub intndd_sttlm_dt: DateAndDateTime2Choice,
48449	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvSttlmDt", skip_serializing_if = "Option::is_none") )]
48450	pub fctv_sttlm_dt: Option<DateAndDateTime2Choice>,
48451	#[cfg_attr( feature = "derive_serde", serde(rename = "StsDt", skip_serializing_if = "Option::is_none") )]
48452	pub sts_dt: Option<String>,
48453	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSubBalId", skip_serializing_if = "Option::is_none") )]
48454	pub csh_sub_bal_id: Option<GenericIdentification37>,
48455	#[cfg_attr( feature = "derive_serde", serde(rename = "Lnkgs", skip_serializing_if = "Option::is_none") )]
48456	pub lnkgs: Option<Vec<Linkages57>>,
48457	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
48458	pub prty: Option<PriorityNumeric4Choice>,
48459	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgOrgtr", skip_serializing_if = "Option::is_none") )]
48460	pub msg_orgtr: Option<SystemPartyIdentification8>,
48461	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
48462	pub cre_dt_tm: String,
48463	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrPrcgAddtlDtls", skip_serializing_if = "Option::is_none") )]
48464	pub instr_prcg_addtl_dtls: Option<String>,
48465	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
48466	pub splmtry_data: Option<Vec<SupplementaryData1>>,
48467}
48468
48469impl IntraBalanceMovement6 {
48470	pub fn validate(&self) -> Result<(), ValidationError> {
48471		self.bal_fr.validate()?;
48472		self.bal_to.validate()?;
48473		self.sttlm_amt.validate()?;
48474		if let Some(ref val) = self.sttld_amt { val.validate()? }
48475		if let Some(ref val) = self.prevsly_sttld_amt { val.validate()? }
48476		if let Some(ref val) = self.rmng_sttlm_amt { val.validate()? }
48477		self.intndd_sttlm_dt.validate()?;
48478		if let Some(ref val) = self.fctv_sttlm_dt { val.validate()? }
48479		if let Some(ref val) = self.csh_sub_bal_id { val.validate()? }
48480		if let Some(ref vec) = self.lnkgs { for item in vec { item.validate()? } }
48481		if let Some(ref val) = self.prty { val.validate()? }
48482		if let Some(ref val) = self.msg_orgtr { val.validate()? }
48483		if let Some(ref val) = self.instr_prcg_addtl_dtls {
48484			if val.chars().count() < 1 {
48485				return Err(ValidationError::new(1001, "instr_prcg_addtl_dtls is shorter than the minimum length of 1".to_string()));
48486			}
48487			if val.chars().count() > 350 {
48488				return Err(ValidationError::new(1002, "instr_prcg_addtl_dtls exceeds the maximum length of 350".to_string()));
48489			}
48490		}
48491		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
48492		Ok(())
48493	}
48494}
48495
48496
48497// IntraBalanceMovement7 ...
48498#[cfg_attr(feature = "derive_debug", derive(Debug))]
48499#[cfg_attr(feature = "derive_default", derive(Default))]
48500#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48501#[cfg_attr(feature = "derive_clone", derive(Clone))]
48502#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48503pub struct IntraBalanceMovement7 {
48504	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcct", skip_serializing_if = "Option::is_none") )]
48505	pub csh_acct: Option<CashAccount40>,
48506	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctOwnr", skip_serializing_if = "Option::is_none") )]
48507	pub csh_acct_ownr: Option<SystemPartyIdentification8>,
48508	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctSvcr", skip_serializing_if = "Option::is_none") )]
48509	pub csh_acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
48510	#[cfg_attr( feature = "derive_serde", serde(rename = "StsAndRsn", skip_serializing_if = "Option::is_none") )]
48511	pub sts_and_rsn: Option<IntraBalanceStatusAndReason2>,
48512	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnrTxId") )]
48513	pub acct_ownr_tx_id: String,
48514	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrTxId", skip_serializing_if = "Option::is_none") )]
48515	pub acct_svcr_tx_id: Option<String>,
48516	#[cfg_attr( feature = "derive_serde", serde(rename = "MktInfrstrctrTxId", skip_serializing_if = "Option::is_none") )]
48517	pub mkt_infrstrctr_tx_id: Option<String>,
48518	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcrTxId", skip_serializing_if = "Option::is_none") )]
48519	pub prcr_tx_id: Option<String>,
48520	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolId", skip_serializing_if = "Option::is_none") )]
48521	pub pool_id: Option<String>,
48522	#[cfg_attr( feature = "derive_serde", serde(rename = "CorpActnEvtId", skip_serializing_if = "Option::is_none") )]
48523	pub corp_actn_evt_id: Option<String>,
48524	#[cfg_attr( feature = "derive_serde", serde(rename = "MvmntDtls", skip_serializing_if = "Option::is_none") )]
48525	pub mvmnt_dtls: Option<IntraBalanceMovement6>,
48526}
48527
48528impl IntraBalanceMovement7 {
48529	pub fn validate(&self) -> Result<(), ValidationError> {
48530		if let Some(ref val) = self.csh_acct { val.validate()? }
48531		if let Some(ref val) = self.csh_acct_ownr { val.validate()? }
48532		if let Some(ref val) = self.csh_acct_svcr { val.validate()? }
48533		if let Some(ref val) = self.sts_and_rsn { val.validate()? }
48534		if self.acct_ownr_tx_id.chars().count() < 1 {
48535			return Err(ValidationError::new(1001, "acct_ownr_tx_id is shorter than the minimum length of 1".to_string()));
48536		}
48537		if self.acct_ownr_tx_id.chars().count() > 35 {
48538			return Err(ValidationError::new(1002, "acct_ownr_tx_id exceeds the maximum length of 35".to_string()));
48539		}
48540		if let Some(ref val) = self.acct_svcr_tx_id {
48541			if val.chars().count() < 1 {
48542				return Err(ValidationError::new(1001, "acct_svcr_tx_id is shorter than the minimum length of 1".to_string()));
48543			}
48544			if val.chars().count() > 35 {
48545				return Err(ValidationError::new(1002, "acct_svcr_tx_id exceeds the maximum length of 35".to_string()));
48546			}
48547		}
48548		if let Some(ref val) = self.mkt_infrstrctr_tx_id {
48549			if val.chars().count() < 1 {
48550				return Err(ValidationError::new(1001, "mkt_infrstrctr_tx_id is shorter than the minimum length of 1".to_string()));
48551			}
48552			if val.chars().count() > 35 {
48553				return Err(ValidationError::new(1002, "mkt_infrstrctr_tx_id exceeds the maximum length of 35".to_string()));
48554			}
48555		}
48556		if let Some(ref val) = self.prcr_tx_id {
48557			if val.chars().count() < 1 {
48558				return Err(ValidationError::new(1001, "prcr_tx_id is shorter than the minimum length of 1".to_string()));
48559			}
48560			if val.chars().count() > 35 {
48561				return Err(ValidationError::new(1002, "prcr_tx_id exceeds the maximum length of 35".to_string()));
48562			}
48563		}
48564		if let Some(ref val) = self.pool_id {
48565			if val.chars().count() < 1 {
48566				return Err(ValidationError::new(1001, "pool_id is shorter than the minimum length of 1".to_string()));
48567			}
48568			if val.chars().count() > 35 {
48569				return Err(ValidationError::new(1002, "pool_id exceeds the maximum length of 35".to_string()));
48570			}
48571		}
48572		if let Some(ref val) = self.corp_actn_evt_id {
48573			if val.chars().count() < 1 {
48574				return Err(ValidationError::new(1001, "corp_actn_evt_id is shorter than the minimum length of 1".to_string()));
48575			}
48576			if val.chars().count() > 35 {
48577				return Err(ValidationError::new(1002, "corp_actn_evt_id exceeds the maximum length of 35".to_string()));
48578			}
48579		}
48580		if let Some(ref val) = self.mvmnt_dtls { val.validate()? }
48581		Ok(())
48582	}
48583}
48584
48585
48586// IntraBalanceMovements4 ...
48587#[cfg_attr(feature = "derive_debug", derive(Debug))]
48588#[cfg_attr(feature = "derive_default", derive(Default))]
48589#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48590#[cfg_attr(feature = "derive_clone", derive(Clone))]
48591#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48592pub struct IntraBalanceMovements4 {
48593	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcct", skip_serializing_if = "Option::is_none") )]
48594	pub csh_acct: Option<CashAccount40>,
48595	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctOwnr", skip_serializing_if = "Option::is_none") )]
48596	pub csh_acct_ownr: Option<SystemPartyIdentification8>,
48597	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctSvcr", skip_serializing_if = "Option::is_none") )]
48598	pub csh_acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
48599	#[cfg_attr( feature = "derive_serde", serde(rename = "StsAndRsn", skip_serializing_if = "Option::is_none") )]
48600	pub sts_and_rsn: Option<IntraBalanceStatusAndReason2>,
48601	#[cfg_attr( feature = "derive_serde", serde(rename = "Mvmnt") )]
48602	pub mvmnt: Vec<IntraBalanceMovement7>,
48603}
48604
48605impl IntraBalanceMovements4 {
48606	pub fn validate(&self) -> Result<(), ValidationError> {
48607		if let Some(ref val) = self.csh_acct { val.validate()? }
48608		if let Some(ref val) = self.csh_acct_ownr { val.validate()? }
48609		if let Some(ref val) = self.csh_acct_svcr { val.validate()? }
48610		if let Some(ref val) = self.sts_and_rsn { val.validate()? }
48611		for item in &self.mvmnt { item.validate()? }
48612		Ok(())
48613	}
48614}
48615
48616
48617// IntraBalanceOrOperationalError10Choice ...
48618#[cfg_attr(feature = "derive_debug", derive(Debug))]
48619#[cfg_attr(feature = "derive_default", derive(Default))]
48620#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48621#[cfg_attr(feature = "derive_clone", derive(Clone))]
48622#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48623pub struct IntraBalanceOrOperationalError10Choice {
48624	#[cfg_attr( feature = "derive_serde", serde(rename = "Cxls", skip_serializing_if = "Option::is_none") )]
48625	pub cxls: Option<Vec<IntraBalanceCancellation7>>,
48626	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
48627	pub oprl_err: Option<Vec<ErrorHandling5>>,
48628}
48629
48630impl IntraBalanceOrOperationalError10Choice {
48631	pub fn validate(&self) -> Result<(), ValidationError> {
48632		if let Some(ref vec) = self.cxls { for item in vec { item.validate()? } }
48633		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
48634		Ok(())
48635	}
48636}
48637
48638
48639// IntraBalanceOrOperationalError11Choice ...
48640#[cfg_attr(feature = "derive_debug", derive(Debug))]
48641#[cfg_attr(feature = "derive_default", derive(Default))]
48642#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48643#[cfg_attr(feature = "derive_clone", derive(Clone))]
48644#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48645pub struct IntraBalanceOrOperationalError11Choice {
48646	#[cfg_attr( feature = "derive_serde", serde(rename = "Mvmnts", skip_serializing_if = "Option::is_none") )]
48647	pub mvmnts: Option<Vec<IntraBalanceMovements4>>,
48648	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
48649	pub oprl_err: Option<Vec<ErrorHandling5>>,
48650}
48651
48652impl IntraBalanceOrOperationalError11Choice {
48653	pub fn validate(&self) -> Result<(), ValidationError> {
48654		if let Some(ref vec) = self.mvmnts { for item in vec { item.validate()? } }
48655		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
48656		Ok(())
48657	}
48658}
48659
48660
48661// IntraBalanceOrOperationalError12Choice ...
48662#[cfg_attr(feature = "derive_debug", derive(Debug))]
48663#[cfg_attr(feature = "derive_default", derive(Default))]
48664#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48665#[cfg_attr(feature = "derive_clone", derive(Clone))]
48666#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48667pub struct IntraBalanceOrOperationalError12Choice {
48668	#[cfg_attr( feature = "derive_serde", serde(rename = "Mods", skip_serializing_if = "Option::is_none") )]
48669	pub mods: Option<Vec<IntraBalanceModification7>>,
48670	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
48671	pub oprl_err: Option<Vec<ErrorHandling5>>,
48672}
48673
48674impl IntraBalanceOrOperationalError12Choice {
48675	pub fn validate(&self) -> Result<(), ValidationError> {
48676		if let Some(ref vec) = self.mods { for item in vec { item.validate()? } }
48677		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
48678		Ok(())
48679	}
48680}
48681
48682
48683// IntraBalancePending5 ...
48684#[cfg_attr(feature = "derive_debug", derive(Debug))]
48685#[cfg_attr(feature = "derive_default", derive(Default))]
48686#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48687#[cfg_attr(feature = "derive_clone", derive(Clone))]
48688#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48689pub struct IntraBalancePending5 {
48690	#[cfg_attr( feature = "derive_serde", serde(rename = "StsAndRsn", skip_serializing_if = "Option::is_none") )]
48691	pub sts_and_rsn: Option<PendingStatusAndReason2>,
48692	#[cfg_attr( feature = "derive_serde", serde(rename = "Mvmnt") )]
48693	pub mvmnt: Vec<IntraBalancePending6>,
48694}
48695
48696impl IntraBalancePending5 {
48697	pub fn validate(&self) -> Result<(), ValidationError> {
48698		if let Some(ref val) = self.sts_and_rsn { val.validate()? }
48699		for item in &self.mvmnt { item.validate()? }
48700		Ok(())
48701	}
48702}
48703
48704
48705// IntraBalancePending6 ...
48706#[cfg_attr(feature = "derive_debug", derive(Debug))]
48707#[cfg_attr(feature = "derive_default", derive(Default))]
48708#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48709#[cfg_attr(feature = "derive_clone", derive(Clone))]
48710#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48711pub struct IntraBalancePending6 {
48712	#[cfg_attr( feature = "derive_serde", serde(rename = "StsAndRsn", skip_serializing_if = "Option::is_none") )]
48713	pub sts_and_rsn: Option<PendingStatusAndReason2>,
48714	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnrTxId") )]
48715	pub acct_ownr_tx_id: String,
48716	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrTxId", skip_serializing_if = "Option::is_none") )]
48717	pub acct_svcr_tx_id: Option<String>,
48718	#[cfg_attr( feature = "derive_serde", serde(rename = "MktInfrstrctrTxId", skip_serializing_if = "Option::is_none") )]
48719	pub mkt_infrstrctr_tx_id: Option<String>,
48720	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcrTxId", skip_serializing_if = "Option::is_none") )]
48721	pub prcr_tx_id: Option<String>,
48722	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolId", skip_serializing_if = "Option::is_none") )]
48723	pub pool_id: Option<String>,
48724	#[cfg_attr( feature = "derive_serde", serde(rename = "CorpActnEvtId", skip_serializing_if = "Option::is_none") )]
48725	pub corp_actn_evt_id: Option<String>,
48726	#[cfg_attr( feature = "derive_serde", serde(rename = "BalFr") )]
48727	pub bal_fr: CashSubBalanceTypeAndQuantityBreakdown3,
48728	#[cfg_attr( feature = "derive_serde", serde(rename = "BalTo") )]
48729	pub bal_to: CashSubBalanceTypeAndQuantityBreakdown3,
48730	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmAmt") )]
48731	pub sttlm_amt: Amount2Choice,
48732	#[cfg_attr( feature = "derive_serde", serde(rename = "IntnddSttlmDt") )]
48733	pub intndd_sttlm_dt: DateAndDateTime2Choice,
48734	#[cfg_attr( feature = "derive_serde", serde(rename = "StsDt", skip_serializing_if = "Option::is_none") )]
48735	pub sts_dt: Option<String>,
48736	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSubBalId", skip_serializing_if = "Option::is_none") )]
48737	pub csh_sub_bal_id: Option<GenericIdentification37>,
48738	#[cfg_attr( feature = "derive_serde", serde(rename = "Lnkgs", skip_serializing_if = "Option::is_none") )]
48739	pub lnkgs: Option<Vec<Linkages57>>,
48740	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
48741	pub prty: Option<PriorityNumeric4Choice>,
48742	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgOrgtr", skip_serializing_if = "Option::is_none") )]
48743	pub msg_orgtr: Option<SystemPartyIdentification8>,
48744	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
48745	pub cre_dt_tm: String,
48746	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrPrcgAddtlDtls", skip_serializing_if = "Option::is_none") )]
48747	pub instr_prcg_addtl_dtls: Option<String>,
48748	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
48749	pub splmtry_data: Option<Vec<SupplementaryData1>>,
48750}
48751
48752impl IntraBalancePending6 {
48753	pub fn validate(&self) -> Result<(), ValidationError> {
48754		if let Some(ref val) = self.sts_and_rsn { val.validate()? }
48755		if self.acct_ownr_tx_id.chars().count() < 1 {
48756			return Err(ValidationError::new(1001, "acct_ownr_tx_id is shorter than the minimum length of 1".to_string()));
48757		}
48758		if self.acct_ownr_tx_id.chars().count() > 35 {
48759			return Err(ValidationError::new(1002, "acct_ownr_tx_id exceeds the maximum length of 35".to_string()));
48760		}
48761		if let Some(ref val) = self.acct_svcr_tx_id {
48762			if val.chars().count() < 1 {
48763				return Err(ValidationError::new(1001, "acct_svcr_tx_id is shorter than the minimum length of 1".to_string()));
48764			}
48765			if val.chars().count() > 35 {
48766				return Err(ValidationError::new(1002, "acct_svcr_tx_id exceeds the maximum length of 35".to_string()));
48767			}
48768		}
48769		if let Some(ref val) = self.mkt_infrstrctr_tx_id {
48770			if val.chars().count() < 1 {
48771				return Err(ValidationError::new(1001, "mkt_infrstrctr_tx_id is shorter than the minimum length of 1".to_string()));
48772			}
48773			if val.chars().count() > 35 {
48774				return Err(ValidationError::new(1002, "mkt_infrstrctr_tx_id exceeds the maximum length of 35".to_string()));
48775			}
48776		}
48777		if let Some(ref val) = self.prcr_tx_id {
48778			if val.chars().count() < 1 {
48779				return Err(ValidationError::new(1001, "prcr_tx_id is shorter than the minimum length of 1".to_string()));
48780			}
48781			if val.chars().count() > 35 {
48782				return Err(ValidationError::new(1002, "prcr_tx_id exceeds the maximum length of 35".to_string()));
48783			}
48784		}
48785		if let Some(ref val) = self.pool_id {
48786			if val.chars().count() < 1 {
48787				return Err(ValidationError::new(1001, "pool_id is shorter than the minimum length of 1".to_string()));
48788			}
48789			if val.chars().count() > 35 {
48790				return Err(ValidationError::new(1002, "pool_id exceeds the maximum length of 35".to_string()));
48791			}
48792		}
48793		if let Some(ref val) = self.corp_actn_evt_id {
48794			if val.chars().count() < 1 {
48795				return Err(ValidationError::new(1001, "corp_actn_evt_id is shorter than the minimum length of 1".to_string()));
48796			}
48797			if val.chars().count() > 35 {
48798				return Err(ValidationError::new(1002, "corp_actn_evt_id exceeds the maximum length of 35".to_string()));
48799			}
48800		}
48801		self.bal_fr.validate()?;
48802		self.bal_to.validate()?;
48803		self.sttlm_amt.validate()?;
48804		self.intndd_sttlm_dt.validate()?;
48805		if let Some(ref val) = self.csh_sub_bal_id { val.validate()? }
48806		if let Some(ref vec) = self.lnkgs { for item in vec { item.validate()? } }
48807		if let Some(ref val) = self.prty { val.validate()? }
48808		if let Some(ref val) = self.msg_orgtr { val.validate()? }
48809		if let Some(ref val) = self.instr_prcg_addtl_dtls {
48810			if val.chars().count() < 1 {
48811				return Err(ValidationError::new(1001, "instr_prcg_addtl_dtls is shorter than the minimum length of 1".to_string()));
48812			}
48813			if val.chars().count() > 350 {
48814				return Err(ValidationError::new(1002, "instr_prcg_addtl_dtls exceeds the maximum length of 350".to_string()));
48815			}
48816		}
48817		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
48818		Ok(())
48819	}
48820}
48821
48822
48823// IntraBalancePosting5 ...
48824#[cfg_attr(feature = "derive_debug", derive(Debug))]
48825#[cfg_attr(feature = "derive_default", derive(Default))]
48826#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48827#[cfg_attr(feature = "derive_clone", derive(Clone))]
48828#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48829pub struct IntraBalancePosting5 {
48830	#[cfg_attr( feature = "derive_serde", serde(rename = "BalFr") )]
48831	pub bal_fr: CashSubBalanceTypeAndQuantityBreakdown3,
48832	#[cfg_attr( feature = "derive_serde", serde(rename = "Mvmnt") )]
48833	pub mvmnt: Vec<IntraBalancePosting6>,
48834}
48835
48836impl IntraBalancePosting5 {
48837	pub fn validate(&self) -> Result<(), ValidationError> {
48838		self.bal_fr.validate()?;
48839		for item in &self.mvmnt { item.validate()? }
48840		Ok(())
48841	}
48842}
48843
48844
48845// IntraBalancePosting6 ...
48846#[cfg_attr(feature = "derive_debug", derive(Debug))]
48847#[cfg_attr(feature = "derive_default", derive(Default))]
48848#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48849#[cfg_attr(feature = "derive_clone", derive(Clone))]
48850#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48851pub struct IntraBalancePosting6 {
48852	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnrTxId") )]
48853	pub acct_ownr_tx_id: String,
48854	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrTxId", skip_serializing_if = "Option::is_none") )]
48855	pub acct_svcr_tx_id: Option<String>,
48856	#[cfg_attr( feature = "derive_serde", serde(rename = "MktInfrstrctrTxId", skip_serializing_if = "Option::is_none") )]
48857	pub mkt_infrstrctr_tx_id: Option<String>,
48858	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcrTxId", skip_serializing_if = "Option::is_none") )]
48859	pub prcr_tx_id: Option<String>,
48860	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolId", skip_serializing_if = "Option::is_none") )]
48861	pub pool_id: Option<String>,
48862	#[cfg_attr( feature = "derive_serde", serde(rename = "CorpActnEvtId", skip_serializing_if = "Option::is_none") )]
48863	pub corp_actn_evt_id: Option<String>,
48864	#[cfg_attr( feature = "derive_serde", serde(rename = "BalTo") )]
48865	pub bal_to: CashSubBalanceTypeAndQuantityBreakdown3,
48866	#[cfg_attr( feature = "derive_serde", serde(rename = "SttldAmt") )]
48867	pub sttld_amt: Amount2Choice,
48868	#[cfg_attr( feature = "derive_serde", serde(rename = "PrevslySttldAmt", skip_serializing_if = "Option::is_none") )]
48869	pub prevsly_sttld_amt: Option<Amount2Choice>,
48870	#[cfg_attr( feature = "derive_serde", serde(rename = "RmngSttlmAmt", skip_serializing_if = "Option::is_none") )]
48871	pub rmng_sttlm_amt: Option<Amount2Choice>,
48872	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvSttlmDt") )]
48873	pub fctv_sttlm_dt: DateAndDateTime2Choice,
48874	#[cfg_attr( feature = "derive_serde", serde(rename = "StsDt", skip_serializing_if = "Option::is_none") )]
48875	pub sts_dt: Option<String>,
48876	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSubBalId", skip_serializing_if = "Option::is_none") )]
48877	pub csh_sub_bal_id: Option<GenericIdentification37>,
48878	#[cfg_attr( feature = "derive_serde", serde(rename = "Lnkgs", skip_serializing_if = "Option::is_none") )]
48879	pub lnkgs: Option<Vec<Linkages57>>,
48880	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
48881	pub prty: Option<PriorityNumeric4Choice>,
48882	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgOrgtr", skip_serializing_if = "Option::is_none") )]
48883	pub msg_orgtr: Option<SystemPartyIdentification8>,
48884	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
48885	pub cre_dt_tm: String,
48886	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrPrcgAddtlDtls", skip_serializing_if = "Option::is_none") )]
48887	pub instr_prcg_addtl_dtls: Option<String>,
48888	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
48889	pub splmtry_data: Option<Vec<SupplementaryData1>>,
48890}
48891
48892impl IntraBalancePosting6 {
48893	pub fn validate(&self) -> Result<(), ValidationError> {
48894		if self.acct_ownr_tx_id.chars().count() < 1 {
48895			return Err(ValidationError::new(1001, "acct_ownr_tx_id is shorter than the minimum length of 1".to_string()));
48896		}
48897		if self.acct_ownr_tx_id.chars().count() > 35 {
48898			return Err(ValidationError::new(1002, "acct_ownr_tx_id exceeds the maximum length of 35".to_string()));
48899		}
48900		if let Some(ref val) = self.acct_svcr_tx_id {
48901			if val.chars().count() < 1 {
48902				return Err(ValidationError::new(1001, "acct_svcr_tx_id is shorter than the minimum length of 1".to_string()));
48903			}
48904			if val.chars().count() > 35 {
48905				return Err(ValidationError::new(1002, "acct_svcr_tx_id exceeds the maximum length of 35".to_string()));
48906			}
48907		}
48908		if let Some(ref val) = self.mkt_infrstrctr_tx_id {
48909			if val.chars().count() < 1 {
48910				return Err(ValidationError::new(1001, "mkt_infrstrctr_tx_id is shorter than the minimum length of 1".to_string()));
48911			}
48912			if val.chars().count() > 35 {
48913				return Err(ValidationError::new(1002, "mkt_infrstrctr_tx_id exceeds the maximum length of 35".to_string()));
48914			}
48915		}
48916		if let Some(ref val) = self.prcr_tx_id {
48917			if val.chars().count() < 1 {
48918				return Err(ValidationError::new(1001, "prcr_tx_id is shorter than the minimum length of 1".to_string()));
48919			}
48920			if val.chars().count() > 35 {
48921				return Err(ValidationError::new(1002, "prcr_tx_id exceeds the maximum length of 35".to_string()));
48922			}
48923		}
48924		if let Some(ref val) = self.pool_id {
48925			if val.chars().count() < 1 {
48926				return Err(ValidationError::new(1001, "pool_id is shorter than the minimum length of 1".to_string()));
48927			}
48928			if val.chars().count() > 35 {
48929				return Err(ValidationError::new(1002, "pool_id exceeds the maximum length of 35".to_string()));
48930			}
48931		}
48932		if let Some(ref val) = self.corp_actn_evt_id {
48933			if val.chars().count() < 1 {
48934				return Err(ValidationError::new(1001, "corp_actn_evt_id is shorter than the minimum length of 1".to_string()));
48935			}
48936			if val.chars().count() > 35 {
48937				return Err(ValidationError::new(1002, "corp_actn_evt_id exceeds the maximum length of 35".to_string()));
48938			}
48939		}
48940		self.bal_to.validate()?;
48941		self.sttld_amt.validate()?;
48942		if let Some(ref val) = self.prevsly_sttld_amt { val.validate()? }
48943		if let Some(ref val) = self.rmng_sttlm_amt { val.validate()? }
48944		self.fctv_sttlm_dt.validate()?;
48945		if let Some(ref val) = self.csh_sub_bal_id { val.validate()? }
48946		if let Some(ref vec) = self.lnkgs { for item in vec { item.validate()? } }
48947		if let Some(ref val) = self.prty { val.validate()? }
48948		if let Some(ref val) = self.msg_orgtr { val.validate()? }
48949		if let Some(ref val) = self.instr_prcg_addtl_dtls {
48950			if val.chars().count() < 1 {
48951				return Err(ValidationError::new(1001, "instr_prcg_addtl_dtls is shorter than the minimum length of 1".to_string()));
48952			}
48953			if val.chars().count() > 350 {
48954				return Err(ValidationError::new(1002, "instr_prcg_addtl_dtls exceeds the maximum length of 350".to_string()));
48955			}
48956		}
48957		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
48958		Ok(())
48959	}
48960}
48961
48962
48963// IntraBalanceQueryCriteria10 ...
48964#[cfg_attr(feature = "derive_debug", derive(Debug))]
48965#[cfg_attr(feature = "derive_default", derive(Default))]
48966#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
48967#[cfg_attr(feature = "derive_clone", derive(Clone))]
48968#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
48969pub struct IntraBalanceQueryCriteria10 {
48970	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlReqId", skip_serializing_if = "Option::is_none") )]
48971	pub cxl_req_id: Option<Vec<String>>,
48972	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgSts", skip_serializing_if = "Option::is_none") )]
48973	pub prcg_sts: Option<Vec<CancellationProcessingStatus9Choice>>,
48974	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcct", skip_serializing_if = "Option::is_none") )]
48975	pub csh_acct: Option<Vec<AccountIdentificationSearchCriteria2Choice>>,
48976	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctOwnr", skip_serializing_if = "Option::is_none") )]
48977	pub csh_acct_ownr: Option<Vec<SystemPartyIdentification8>>,
48978	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctSvcr", skip_serializing_if = "Option::is_none") )]
48979	pub csh_acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
48980	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgOrgtr", skip_serializing_if = "Option::is_none") )]
48981	pub msg_orgtr: Option<Vec<SystemPartyIdentification8>>,
48982	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
48983	pub cre_dt_tm: Option<DateAndDateTimeSearch5Choice>,
48984}
48985
48986impl IntraBalanceQueryCriteria10 {
48987	pub fn validate(&self) -> Result<(), ValidationError> {
48988		if let Some(ref vec) = self.cxl_req_id {
48989			for item in vec {
48990				if item.chars().count() < 1 {
48991					return Err(ValidationError::new(1001, "cxl_req_id is shorter than the minimum length of 1".to_string()));
48992				}
48993				if item.chars().count() > 35 {
48994					return Err(ValidationError::new(1002, "cxl_req_id exceeds the maximum length of 35".to_string()));
48995				}
48996			}
48997		}
48998		if let Some(ref vec) = self.prcg_sts { for item in vec { item.validate()? } }
48999		if let Some(ref vec) = self.csh_acct { for item in vec { item.validate()? } }
49000		if let Some(ref vec) = self.csh_acct_ownr { for item in vec { item.validate()? } }
49001		if let Some(ref val) = self.csh_acct_svcr { val.validate()? }
49002		if let Some(ref vec) = self.msg_orgtr { for item in vec { item.validate()? } }
49003		if let Some(ref val) = self.cre_dt_tm { val.validate()? }
49004		Ok(())
49005	}
49006}
49007
49008
49009// IntraBalanceQueryCriteria11 ...
49010#[cfg_attr(feature = "derive_debug", derive(Debug))]
49011#[cfg_attr(feature = "derive_default", derive(Default))]
49012#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49013#[cfg_attr(feature = "derive_clone", derive(Clone))]
49014#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49015pub struct IntraBalanceQueryCriteria11 {
49016	#[cfg_attr( feature = "derive_serde", serde(rename = "Refs", skip_serializing_if = "Option::is_none") )]
49017	pub refs: Option<Vec<References36Choice>>,
49018	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
49019	pub sts: Option<IntraBalanceQueryStatus3>,
49020	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcct", skip_serializing_if = "Option::is_none") )]
49021	pub csh_acct: Option<Vec<AccountIdentificationSearchCriteria2Choice>>,
49022	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctOwnr", skip_serializing_if = "Option::is_none") )]
49023	pub csh_acct_ownr: Option<Vec<SystemPartyIdentification8>>,
49024	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctSvcr", skip_serializing_if = "Option::is_none") )]
49025	pub csh_acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
49026	#[cfg_attr( feature = "derive_serde", serde(rename = "BalTp", skip_serializing_if = "Option::is_none") )]
49027	pub bal_tp: Option<Vec<IntraBalanceType3>>,
49028	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSubBalId", skip_serializing_if = "Option::is_none") )]
49029	pub csh_sub_bal_id: Option<Vec<GenericIdentification37>>,
49030	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmAmt", skip_serializing_if = "Option::is_none") )]
49031	pub sttlm_amt: Option<ImpliedCurrencyAmountRange1Choice>,
49032	#[cfg_attr( feature = "derive_serde", serde(rename = "SttldAmt", skip_serializing_if = "Option::is_none") )]
49033	pub sttld_amt: Option<ImpliedCurrencyAmountRange1Choice>,
49034	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcy", skip_serializing_if = "Option::is_none") )]
49035	pub sttlm_ccy: Option<Vec<String>>,
49036	#[cfg_attr( feature = "derive_serde", serde(rename = "IntnddSttlmDt", skip_serializing_if = "Option::is_none") )]
49037	pub intndd_sttlm_dt: Option<DateAndDateTimeSearch5Choice>,
49038	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvSttlmDt", skip_serializing_if = "Option::is_none") )]
49039	pub fctv_sttlm_dt: Option<DateAndDateTimeSearch5Choice>,
49040	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
49041	pub prty: Option<Vec<PriorityNumeric4Choice>>,
49042	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgOrgtr", skip_serializing_if = "Option::is_none") )]
49043	pub msg_orgtr: Option<Vec<SystemPartyIdentification8>>,
49044	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
49045	pub cre_dt_tm: Option<DateAndDateTimeSearch5Choice>,
49046}
49047
49048impl IntraBalanceQueryCriteria11 {
49049	pub fn validate(&self) -> Result<(), ValidationError> {
49050		if let Some(ref vec) = self.refs { for item in vec { item.validate()? } }
49051		if let Some(ref val) = self.sts { val.validate()? }
49052		if let Some(ref vec) = self.csh_acct { for item in vec { item.validate()? } }
49053		if let Some(ref vec) = self.csh_acct_ownr { for item in vec { item.validate()? } }
49054		if let Some(ref val) = self.csh_acct_svcr { val.validate()? }
49055		if let Some(ref vec) = self.bal_tp { for item in vec { item.validate()? } }
49056		if let Some(ref vec) = self.csh_sub_bal_id { for item in vec { item.validate()? } }
49057		if let Some(ref val) = self.sttlm_amt { val.validate()? }
49058		if let Some(ref val) = self.sttld_amt { val.validate()? }
49059		if let Some(ref vec) = self.sttlm_ccy {
49060			for item in vec {
49061				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
49062				if !pattern.is_match(&item) {
49063					return Err(ValidationError::new(1005, "sttlm_ccy does not match the required pattern".to_string()));
49064				}
49065			}
49066		}
49067		if let Some(ref val) = self.intndd_sttlm_dt { val.validate()? }
49068		if let Some(ref val) = self.fctv_sttlm_dt { val.validate()? }
49069		if let Some(ref vec) = self.prty { for item in vec { item.validate()? } }
49070		if let Some(ref vec) = self.msg_orgtr { for item in vec { item.validate()? } }
49071		if let Some(ref val) = self.cre_dt_tm { val.validate()? }
49072		Ok(())
49073	}
49074}
49075
49076
49077// IntraBalanceQueryCriteria12 ...
49078#[cfg_attr(feature = "derive_debug", derive(Debug))]
49079#[cfg_attr(feature = "derive_default", derive(Default))]
49080#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49081#[cfg_attr(feature = "derive_clone", derive(Clone))]
49082#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49083pub struct IntraBalanceQueryCriteria12 {
49084	#[cfg_attr( feature = "derive_serde", serde(rename = "ModReqId", skip_serializing_if = "Option::is_none") )]
49085	pub mod_req_id: Option<Vec<String>>,
49086	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgSts", skip_serializing_if = "Option::is_none") )]
49087	pub prcg_sts: Option<Vec<ModificationProcessingStatus9Choice>>,
49088	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcct", skip_serializing_if = "Option::is_none") )]
49089	pub csh_acct: Option<Vec<AccountIdentificationSearchCriteria2Choice>>,
49090	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctOwnr", skip_serializing_if = "Option::is_none") )]
49091	pub csh_acct_ownr: Option<Vec<SystemPartyIdentification8>>,
49092	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctSvcr", skip_serializing_if = "Option::is_none") )]
49093	pub csh_acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
49094	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgOrgtr", skip_serializing_if = "Option::is_none") )]
49095	pub msg_orgtr: Option<Vec<SystemPartyIdentification8>>,
49096	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
49097	pub cre_dt_tm: Option<DateAndDateTimeSearch5Choice>,
49098}
49099
49100impl IntraBalanceQueryCriteria12 {
49101	pub fn validate(&self) -> Result<(), ValidationError> {
49102		if let Some(ref vec) = self.mod_req_id {
49103			for item in vec {
49104				if item.chars().count() < 1 {
49105					return Err(ValidationError::new(1001, "mod_req_id is shorter than the minimum length of 1".to_string()));
49106				}
49107				if item.chars().count() > 35 {
49108					return Err(ValidationError::new(1002, "mod_req_id exceeds the maximum length of 35".to_string()));
49109				}
49110			}
49111		}
49112		if let Some(ref vec) = self.prcg_sts { for item in vec { item.validate()? } }
49113		if let Some(ref vec) = self.csh_acct { for item in vec { item.validate()? } }
49114		if let Some(ref vec) = self.csh_acct_ownr { for item in vec { item.validate()? } }
49115		if let Some(ref val) = self.csh_acct_svcr { val.validate()? }
49116		if let Some(ref vec) = self.msg_orgtr { for item in vec { item.validate()? } }
49117		if let Some(ref val) = self.cre_dt_tm { val.validate()? }
49118		Ok(())
49119	}
49120}
49121
49122
49123// IntraBalanceQueryDefinition10 ...
49124#[cfg_attr(feature = "derive_debug", derive(Debug))]
49125#[cfg_attr(feature = "derive_default", derive(Default))]
49126#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49127#[cfg_attr(feature = "derive_clone", derive(Clone))]
49128#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49129pub struct IntraBalanceQueryDefinition10 {
49130	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp") )]
49131	pub qry_tp: MovementResponseType1Code,
49132	#[cfg_attr( feature = "derive_serde", serde(rename = "SchCrit") )]
49133	pub sch_crit: IntraBalanceQueryCriteria10,
49134}
49135
49136impl IntraBalanceQueryDefinition10 {
49137	pub fn validate(&self) -> Result<(), ValidationError> {
49138		self.qry_tp.validate()?;
49139		self.sch_crit.validate()?;
49140		Ok(())
49141	}
49142}
49143
49144
49145// IntraBalanceQueryDefinition11 ...
49146#[cfg_attr(feature = "derive_debug", derive(Debug))]
49147#[cfg_attr(feature = "derive_default", derive(Default))]
49148#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49149#[cfg_attr(feature = "derive_clone", derive(Clone))]
49150#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49151pub struct IntraBalanceQueryDefinition11 {
49152	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp") )]
49153	pub qry_tp: MovementResponseType1Code,
49154	#[cfg_attr( feature = "derive_serde", serde(rename = "SchCrit") )]
49155	pub sch_crit: IntraBalanceQueryCriteria11,
49156}
49157
49158impl IntraBalanceQueryDefinition11 {
49159	pub fn validate(&self) -> Result<(), ValidationError> {
49160		self.qry_tp.validate()?;
49161		self.sch_crit.validate()?;
49162		Ok(())
49163	}
49164}
49165
49166
49167// IntraBalanceQueryDefinition12 ...
49168#[cfg_attr(feature = "derive_debug", derive(Debug))]
49169#[cfg_attr(feature = "derive_default", derive(Default))]
49170#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49171#[cfg_attr(feature = "derive_clone", derive(Clone))]
49172#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49173pub struct IntraBalanceQueryDefinition12 {
49174	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp") )]
49175	pub qry_tp: MovementResponseType1Code,
49176	#[cfg_attr( feature = "derive_serde", serde(rename = "SchCrit") )]
49177	pub sch_crit: IntraBalanceQueryCriteria12,
49178}
49179
49180impl IntraBalanceQueryDefinition12 {
49181	pub fn validate(&self) -> Result<(), ValidationError> {
49182		self.qry_tp.validate()?;
49183		self.sch_crit.validate()?;
49184		Ok(())
49185	}
49186}
49187
49188
49189// IntraBalanceQueryStatus3 ...
49190#[cfg_attr(feature = "derive_debug", derive(Debug))]
49191#[cfg_attr(feature = "derive_default", derive(Default))]
49192#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49193#[cfg_attr(feature = "derive_clone", derive(Clone))]
49194#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49195pub struct IntraBalanceQueryStatus3 {
49196	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
49197	pub tp: IntraBalanceStatusType2,
49198	#[cfg_attr( feature = "derive_serde", serde(rename = "DtPrd", skip_serializing_if = "Option::is_none") )]
49199	pub dt_prd: Option<DateAndDateTimeSearch5Choice>,
49200}
49201
49202impl IntraBalanceQueryStatus3 {
49203	pub fn validate(&self) -> Result<(), ValidationError> {
49204		self.tp.validate()?;
49205		if let Some(ref val) = self.dt_prd { val.validate()? }
49206		Ok(())
49207	}
49208}
49209
49210
49211// IntraBalanceReport5 ...
49212#[cfg_attr(feature = "derive_debug", derive(Debug))]
49213#[cfg_attr(feature = "derive_default", derive(Default))]
49214#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49215#[cfg_attr(feature = "derive_clone", derive(Clone))]
49216#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49217pub struct IntraBalanceReport5 {
49218	#[cfg_attr( feature = "derive_serde", serde(rename = "RptNb", skip_serializing_if = "Option::is_none") )]
49219	pub rpt_nb: Option<Number3Choice>,
49220	#[cfg_attr( feature = "derive_serde", serde(rename = "QryRef", skip_serializing_if = "Option::is_none") )]
49221	pub qry_ref: Option<String>,
49222	#[cfg_attr( feature = "derive_serde", serde(rename = "RptId", skip_serializing_if = "Option::is_none") )]
49223	pub rpt_id: Option<String>,
49224	#[cfg_attr( feature = "derive_serde", serde(rename = "RptDtTm", skip_serializing_if = "Option::is_none") )]
49225	pub rpt_dt_tm: Option<DateAndDateTime2Choice>,
49226	#[cfg_attr( feature = "derive_serde", serde(rename = "RptPrd", skip_serializing_if = "Option::is_none") )]
49227	pub rpt_prd: Option<Period7Choice>,
49228	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp", skip_serializing_if = "Option::is_none") )]
49229	pub qry_tp: Option<MovementResponseType1Code>,
49230	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy", skip_serializing_if = "Option::is_none") )]
49231	pub frqcy: Option<Frequency22Choice>,
49232	#[cfg_attr( feature = "derive_serde", serde(rename = "UpdTp") )]
49233	pub upd_tp: UpdateType15Choice,
49234	#[cfg_attr( feature = "derive_serde", serde(rename = "ActvtyInd") )]
49235	pub actvty_ind: bool,
49236}
49237
49238impl IntraBalanceReport5 {
49239	pub fn validate(&self) -> Result<(), ValidationError> {
49240		if let Some(ref val) = self.rpt_nb { val.validate()? }
49241		if let Some(ref val) = self.qry_ref {
49242			if val.chars().count() < 1 {
49243				return Err(ValidationError::new(1001, "qry_ref is shorter than the minimum length of 1".to_string()));
49244			}
49245			if val.chars().count() > 35 {
49246				return Err(ValidationError::new(1002, "qry_ref exceeds the maximum length of 35".to_string()));
49247			}
49248		}
49249		if let Some(ref val) = self.rpt_id {
49250			if val.chars().count() < 1 {
49251				return Err(ValidationError::new(1001, "rpt_id is shorter than the minimum length of 1".to_string()));
49252			}
49253			if val.chars().count() > 35 {
49254				return Err(ValidationError::new(1002, "rpt_id exceeds the maximum length of 35".to_string()));
49255			}
49256		}
49257		if let Some(ref val) = self.rpt_dt_tm { val.validate()? }
49258		if let Some(ref val) = self.rpt_prd { val.validate()? }
49259		if let Some(ref val) = self.qry_tp { val.validate()? }
49260		if let Some(ref val) = self.frqcy { val.validate()? }
49261		self.upd_tp.validate()?;
49262		Ok(())
49263	}
49264}
49265
49266
49267// IntraBalanceReport6 ...
49268#[cfg_attr(feature = "derive_debug", derive(Debug))]
49269#[cfg_attr(feature = "derive_default", derive(Default))]
49270#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49271#[cfg_attr(feature = "derive_clone", derive(Clone))]
49272#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49273pub struct IntraBalanceReport6 {
49274	#[cfg_attr( feature = "derive_serde", serde(rename = "RptNb", skip_serializing_if = "Option::is_none") )]
49275	pub rpt_nb: Option<Number3Choice>,
49276	#[cfg_attr( feature = "derive_serde", serde(rename = "QryRef", skip_serializing_if = "Option::is_none") )]
49277	pub qry_ref: Option<String>,
49278	#[cfg_attr( feature = "derive_serde", serde(rename = "RptId", skip_serializing_if = "Option::is_none") )]
49279	pub rpt_id: Option<String>,
49280	#[cfg_attr( feature = "derive_serde", serde(rename = "RptDtTm", skip_serializing_if = "Option::is_none") )]
49281	pub rpt_dt_tm: Option<DateAndDateTime2Choice>,
49282	#[cfg_attr( feature = "derive_serde", serde(rename = "RptPrd", skip_serializing_if = "Option::is_none") )]
49283	pub rpt_prd: Option<Period7Choice>,
49284	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy", skip_serializing_if = "Option::is_none") )]
49285	pub frqcy: Option<Frequency22Choice>,
49286	#[cfg_attr( feature = "derive_serde", serde(rename = "UpdTp") )]
49287	pub upd_tp: UpdateType15Choice,
49288	#[cfg_attr( feature = "derive_serde", serde(rename = "ActvtyInd") )]
49289	pub actvty_ind: bool,
49290}
49291
49292impl IntraBalanceReport6 {
49293	pub fn validate(&self) -> Result<(), ValidationError> {
49294		if let Some(ref val) = self.rpt_nb { val.validate()? }
49295		if let Some(ref val) = self.qry_ref {
49296			if val.chars().count() < 1 {
49297				return Err(ValidationError::new(1001, "qry_ref is shorter than the minimum length of 1".to_string()));
49298			}
49299			if val.chars().count() > 35 {
49300				return Err(ValidationError::new(1002, "qry_ref exceeds the maximum length of 35".to_string()));
49301			}
49302		}
49303		if let Some(ref val) = self.rpt_id {
49304			if val.chars().count() < 1 {
49305				return Err(ValidationError::new(1001, "rpt_id is shorter than the minimum length of 1".to_string()));
49306			}
49307			if val.chars().count() > 35 {
49308				return Err(ValidationError::new(1002, "rpt_id exceeds the maximum length of 35".to_string()));
49309			}
49310		}
49311		if let Some(ref val) = self.rpt_dt_tm { val.validate()? }
49312		if let Some(ref val) = self.rpt_prd { val.validate()? }
49313		if let Some(ref val) = self.frqcy { val.validate()? }
49314		self.upd_tp.validate()?;
49315		Ok(())
49316	}
49317}
49318
49319
49320// IntraBalanceStatusAndReason2 ...
49321#[cfg_attr(feature = "derive_debug", derive(Debug))]
49322#[cfg_attr(feature = "derive_default", derive(Default))]
49323#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49324#[cfg_attr(feature = "derive_clone", derive(Clone))]
49325#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49326pub struct IntraBalanceStatusAndReason2 {
49327	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgSts", skip_serializing_if = "Option::is_none") )]
49328	pub prcg_sts: Option<Vec<ProcessingStatus67Choice>>,
49329	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmSts", skip_serializing_if = "Option::is_none") )]
49330	pub sttlm_sts: Option<Vec<SettlementStatus16Choice>>,
49331	#[cfg_attr( feature = "derive_serde", serde(rename = "Sttld", skip_serializing_if = "Option::is_none") )]
49332	pub sttld: Option<ProprietaryReason4>,
49333}
49334
49335impl IntraBalanceStatusAndReason2 {
49336	pub fn validate(&self) -> Result<(), ValidationError> {
49337		if let Some(ref vec) = self.prcg_sts { for item in vec { item.validate()? } }
49338		if let Some(ref vec) = self.sttlm_sts { for item in vec { item.validate()? } }
49339		if let Some(ref val) = self.sttld { val.validate()? }
49340		Ok(())
49341	}
49342}
49343
49344
49345// IntraBalanceStatusType2 ...
49346#[cfg_attr(feature = "derive_debug", derive(Debug))]
49347#[cfg_attr(feature = "derive_default", derive(Default))]
49348#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49349#[cfg_attr(feature = "derive_clone", derive(Clone))]
49350#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49351pub struct IntraBalanceStatusType2 {
49352	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgSts", skip_serializing_if = "Option::is_none") )]
49353	pub prcg_sts: Option<Vec<ProcessingStatus68Choice>>,
49354	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmSts", skip_serializing_if = "Option::is_none") )]
49355	pub sttlm_sts: Option<Vec<SettlementStatus26Choice>>,
49356	#[cfg_attr( feature = "derive_serde", serde(rename = "Sttld", skip_serializing_if = "Option::is_none") )]
49357	pub sttld: Option<ProprietaryReason4>,
49358}
49359
49360impl IntraBalanceStatusType2 {
49361	pub fn validate(&self) -> Result<(), ValidationError> {
49362		if let Some(ref vec) = self.prcg_sts { for item in vec { item.validate()? } }
49363		if let Some(ref vec) = self.sttlm_sts { for item in vec { item.validate()? } }
49364		if let Some(ref val) = self.sttld { val.validate()? }
49365		Ok(())
49366	}
49367}
49368
49369
49370// IntraBalanceType3 ...
49371#[cfg_attr(feature = "derive_debug", derive(Debug))]
49372#[cfg_attr(feature = "derive_default", derive(Default))]
49373#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49374#[cfg_attr(feature = "derive_clone", derive(Clone))]
49375#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49376pub struct IntraBalanceType3 {
49377	#[cfg_attr( feature = "derive_serde", serde(rename = "BalFr", skip_serializing_if = "Option::is_none") )]
49378	pub bal_fr: Option<CashSubBalanceTypeAndQuantityBreakdown3>,
49379	#[cfg_attr( feature = "derive_serde", serde(rename = "BalTo", skip_serializing_if = "Option::is_none") )]
49380	pub bal_to: Option<CashSubBalanceTypeAndQuantityBreakdown3>,
49381}
49382
49383impl IntraBalanceType3 {
49384	pub fn validate(&self) -> Result<(), ValidationError> {
49385		if let Some(ref val) = self.bal_fr { val.validate()? }
49386		if let Some(ref val) = self.bal_to { val.validate()? }
49387		Ok(())
49388	}
49389}
49390
49391
49392// IntraDayMarginCall1 ...
49393#[cfg_attr(feature = "derive_debug", derive(Debug))]
49394#[cfg_attr(feature = "derive_default", derive(Default))]
49395#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49396#[cfg_attr(feature = "derive_clone", derive(Clone))]
49397#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49398pub struct IntraDayMarginCall1 {
49399	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnAcctId") )]
49400	pub mrgn_acct_id: GenericIdentification165,
49401	#[cfg_attr( feature = "derive_serde", serde(rename = "IntraDayCall") )]
49402	pub intra_day_call: ActiveCurrencyAndAmount,
49403	#[cfg_attr( feature = "derive_serde", serde(rename = "TmStmp") )]
49404	pub tm_stmp: String,
49405}
49406
49407impl IntraDayMarginCall1 {
49408	pub fn validate(&self) -> Result<(), ValidationError> {
49409		self.mrgn_acct_id.validate()?;
49410		self.intra_day_call.validate()?;
49411		Ok(())
49412	}
49413}
49414
49415
49416// IntraDayRequirement1 ...
49417#[cfg_attr(feature = "derive_debug", derive(Debug))]
49418#[cfg_attr(feature = "derive_default", derive(Default))]
49419#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49420#[cfg_attr(feature = "derive_clone", derive(Clone))]
49421#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49422pub struct IntraDayRequirement1 {
49423	#[cfg_attr( feature = "derive_serde", serde(rename = "IntraDayMrgnCall") )]
49424	pub intra_day_mrgn_call: ActiveCurrencyAndAmount,
49425	#[cfg_attr( feature = "derive_serde", serde(rename = "PeakInitlMrgnLblty") )]
49426	pub peak_initl_mrgn_lblty: ActiveCurrencyAndAmount,
49427	#[cfg_attr( feature = "derive_serde", serde(rename = "PeakVartnMrgnLblty") )]
49428	pub peak_vartn_mrgn_lblty: ActiveCurrencyAndAmount,
49429	#[cfg_attr( feature = "derive_serde", serde(rename = "AggtPeakLblty") )]
49430	pub aggt_peak_lblty: ActiveCurrencyAndAmount,
49431	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnAcctId") )]
49432	pub mrgn_acct_id: GenericIdentification165,
49433}
49434
49435impl IntraDayRequirement1 {
49436	pub fn validate(&self) -> Result<(), ValidationError> {
49437		self.intra_day_mrgn_call.validate()?;
49438		self.peak_initl_mrgn_lblty.validate()?;
49439		self.peak_vartn_mrgn_lblty.validate()?;
49440		self.aggt_peak_lblty.validate()?;
49441		self.mrgn_acct_id.validate()?;
49442		Ok(())
49443	}
49444}
49445
49446
49447// InvestigatedParties1Choice ...
49448#[cfg_attr(feature = "derive_debug", derive(Debug))]
49449#[cfg_attr(feature = "derive_default", derive(Default))]
49450#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49451#[cfg_attr(feature = "derive_clone", derive(Clone))]
49452#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49453pub struct InvestigatedParties1Choice {
49454	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
49455	pub cd: Option<InvestigatedParties1Code>,
49456	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
49457	pub prtry: Option<String>,
49458}
49459
49460impl InvestigatedParties1Choice {
49461	pub fn validate(&self) -> Result<(), ValidationError> {
49462		if let Some(ref val) = self.cd { val.validate()? }
49463		if let Some(ref val) = self.prtry {
49464			if val.chars().count() < 1 {
49465				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
49466			}
49467			if val.chars().count() > 35 {
49468				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
49469			}
49470		}
49471		Ok(())
49472	}
49473}
49474
49475
49476// InvestigatedParties1Code ...
49477#[cfg_attr(feature = "derive_debug", derive(Debug))]
49478#[cfg_attr(feature = "derive_default", derive(Default))]
49479#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49480#[cfg_attr(feature = "derive_clone", derive(Clone))]
49481#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49482pub enum InvestigatedParties1Code {
49483	#[cfg_attr(feature = "derive_default", default)]
49484	#[cfg_attr( feature = "derive_serde", serde(rename = "ALLP") )]
49485	CodeALLP,
49486	#[cfg_attr( feature = "derive_serde", serde(rename = "OWNE") )]
49487	CodeOWNE,
49488}
49489
49490impl InvestigatedParties1Code {
49491	pub fn validate(&self) -> Result<(), ValidationError> {
49492		Ok(())
49493	}
49494}
49495
49496
49497// InvestigationActionReason1 ...
49498#[cfg_attr(feature = "derive_debug", derive(Debug))]
49499#[cfg_attr(feature = "derive_default", derive(Default))]
49500#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49501#[cfg_attr(feature = "derive_clone", derive(Clone))]
49502#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49503pub struct InvestigationActionReason1 {
49504	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
49505	pub orgtr: Option<PartyIdentification135>,
49506	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
49507	pub rsn: InvestigationActionReason1Choice,
49508	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
49509	pub addtl_inf: Option<Vec<String>>,
49510}
49511
49512impl InvestigationActionReason1 {
49513	pub fn validate(&self) -> Result<(), ValidationError> {
49514		if let Some(ref val) = self.orgtr { val.validate()? }
49515		self.rsn.validate()?;
49516		if let Some(ref vec) = self.addtl_inf {
49517			for item in vec {
49518				if item.chars().count() < 1 {
49519					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
49520				}
49521				if item.chars().count() > 105 {
49522					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
49523				}
49524			}
49525		}
49526		Ok(())
49527	}
49528}
49529
49530
49531// InvestigationActionReason1Choice ...
49532#[cfg_attr(feature = "derive_debug", derive(Debug))]
49533#[cfg_attr(feature = "derive_default", derive(Default))]
49534#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49535#[cfg_attr(feature = "derive_clone", derive(Clone))]
49536#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49537pub struct InvestigationActionReason1Choice {
49538	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
49539	pub cd: Option<String>,
49540	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
49541	pub prtry: Option<String>,
49542}
49543
49544impl InvestigationActionReason1Choice {
49545	pub fn validate(&self) -> Result<(), ValidationError> {
49546		if let Some(ref val) = self.cd {
49547			if val.chars().count() < 1 {
49548				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
49549			}
49550			if val.chars().count() > 4 {
49551				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
49552			}
49553		}
49554		if let Some(ref val) = self.prtry {
49555			if val.chars().count() < 1 {
49556				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
49557			}
49558			if val.chars().count() > 35 {
49559				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
49560			}
49561		}
49562		Ok(())
49563	}
49564}
49565
49566
49567// InvestigationData2 ...
49568#[cfg_attr(feature = "derive_debug", derive(Debug))]
49569#[cfg_attr(feature = "derive_default", derive(Default))]
49570#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49571#[cfg_attr(feature = "derive_clone", derive(Clone))]
49572#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49573pub struct InvestigationData2 {
49574	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInvstgtnSeq", skip_serializing_if = "Option::is_none") )]
49575	pub orgnl_invstgtn_seq: Option<f64>,
49576	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInvstgtnRsn", skip_serializing_if = "Option::is_none") )]
49577	pub orgnl_invstgtn_rsn: Option<InvestigationReason1Choice>,
49578	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInvstgtnRsnSubTp", skip_serializing_if = "Option::is_none") )]
49579	pub orgnl_invstgtn_rsn_sub_tp: Option<InvestigationReasonSubType1Choice>,
49580	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnData") )]
49581	pub rspn_data: InvestigationDataRecord1Choice,
49582	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdInvstgtnData", skip_serializing_if = "Option::is_none") )]
49583	pub rltd_invstgtn_data: Option<RelatedInvestigationData1>,
49584	#[cfg_attr( feature = "derive_serde", serde(rename = "NclsdFile", skip_serializing_if = "Option::is_none") )]
49585	pub nclsd_file: Option<Vec<Document12>>,
49586	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdFileData", skip_serializing_if = "Option::is_none") )]
49587	pub rltd_file_data: Option<Vec<FileData1>>,
49588	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnOrgtr", skip_serializing_if = "Option::is_none") )]
49589	pub rspn_orgtr: Option<Party40Choice>,
49590}
49591
49592impl InvestigationData2 {
49593	pub fn validate(&self) -> Result<(), ValidationError> {
49594		if let Some(ref val) = self.orgnl_invstgtn_rsn { val.validate()? }
49595		if let Some(ref val) = self.orgnl_invstgtn_rsn_sub_tp { val.validate()? }
49596		self.rspn_data.validate()?;
49597		if let Some(ref val) = self.rltd_invstgtn_data { val.validate()? }
49598		if let Some(ref vec) = self.nclsd_file { for item in vec { item.validate()? } }
49599		if let Some(ref vec) = self.rltd_file_data { for item in vec { item.validate()? } }
49600		if let Some(ref val) = self.rspn_orgtr { val.validate()? }
49601		Ok(())
49602	}
49603}
49604
49605
49606// InvestigationDataRecord1Choice ...
49607#[cfg_attr(feature = "derive_debug", derive(Debug))]
49608#[cfg_attr(feature = "derive_default", derive(Default))]
49609#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49610#[cfg_attr(feature = "derive_clone", derive(Clone))]
49611#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49612pub struct InvestigationDataRecord1Choice {
49613	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtAuthstn", skip_serializing_if = "Option::is_none") )]
49614	pub dbt_authstn: Option<DebitAuthorisationConfirmation3>,
49615	#[cfg_attr( feature = "derive_serde", serde(rename = "Compstn", skip_serializing_if = "Option::is_none") )]
49616	pub compstn: Option<CompensationResponse1>,
49617	#[cfg_attr( feature = "derive_serde", serde(rename = "Valtn", skip_serializing_if = "Option::is_none") )]
49618	pub valtn: Option<AdjustmentCompensation1>,
49619	#[cfg_attr( feature = "derive_serde", serde(rename = "Conf", skip_serializing_if = "Option::is_none") )]
49620	pub conf: Option<BookingConfirmation1>,
49621	#[cfg_attr( feature = "derive_serde", serde(rename = "TxSts", skip_serializing_if = "Option::is_none") )]
49622	pub tx_sts: Option<PaymentTransactionStatus1>,
49623	#[cfg_attr( feature = "derive_serde", serde(rename = "TxData", skip_serializing_if = "Option::is_none") )]
49624	pub tx_data: Option<Vec<TransactionAmendment1>>,
49625	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnNrrtv", skip_serializing_if = "Option::is_none") )]
49626	pub rspn_nrrtv: Option<String>,
49627}
49628
49629impl InvestigationDataRecord1Choice {
49630	pub fn validate(&self) -> Result<(), ValidationError> {
49631		if let Some(ref val) = self.dbt_authstn { val.validate()? }
49632		if let Some(ref val) = self.compstn { val.validate()? }
49633		if let Some(ref val) = self.valtn { val.validate()? }
49634		if let Some(ref val) = self.conf { val.validate()? }
49635		if let Some(ref val) = self.tx_sts { val.validate()? }
49636		if let Some(ref vec) = self.tx_data { for item in vec { item.validate()? } }
49637		if let Some(ref val) = self.rspn_nrrtv {
49638			if val.chars().count() < 1 {
49639				return Err(ValidationError::new(1001, "rspn_nrrtv is shorter than the minimum length of 1".to_string()));
49640			}
49641			if val.chars().count() > 500 {
49642				return Err(ValidationError::new(1002, "rspn_nrrtv exceeds the maximum length of 500".to_string()));
49643			}
49644		}
49645		Ok(())
49646	}
49647}
49648
49649
49650// InvestigationLocationData1 ...
49651#[cfg_attr(feature = "derive_debug", derive(Debug))]
49652#[cfg_attr(feature = "derive_default", derive(Default))]
49653#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49654#[cfg_attr(feature = "derive_clone", derive(Clone))]
49655#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49656pub struct InvestigationLocationData1 {
49657	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtd") )]
49658	pub mtd: InvestigationLocationMethod1Code,
49659	#[cfg_attr( feature = "derive_serde", serde(rename = "ElctrncAdr", skip_serializing_if = "Option::is_none") )]
49660	pub elctrnc_adr: Option<String>,
49661	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
49662	pub pstl_adr: Option<NameAndAddress16>,
49663}
49664
49665impl InvestigationLocationData1 {
49666	pub fn validate(&self) -> Result<(), ValidationError> {
49667		self.mtd.validate()?;
49668		if let Some(ref val) = self.elctrnc_adr {
49669			if val.chars().count() < 1 {
49670				return Err(ValidationError::new(1001, "elctrnc_adr is shorter than the minimum length of 1".to_string()));
49671			}
49672			if val.chars().count() > 2048 {
49673				return Err(ValidationError::new(1002, "elctrnc_adr exceeds the maximum length of 2048".to_string()));
49674			}
49675		}
49676		if let Some(ref val) = self.pstl_adr { val.validate()? }
49677		Ok(())
49678	}
49679}
49680
49681
49682// InvestigationLocationMethod1Code ...
49683#[cfg_attr(feature = "derive_debug", derive(Debug))]
49684#[cfg_attr(feature = "derive_default", derive(Default))]
49685#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49686#[cfg_attr(feature = "derive_clone", derive(Clone))]
49687#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49688pub enum InvestigationLocationMethod1Code {
49689	#[cfg_attr(feature = "derive_default", default)]
49690	#[cfg_attr( feature = "derive_serde", serde(rename = "EDIC") )]
49691	CodeEDIC,
49692	#[cfg_attr( feature = "derive_serde", serde(rename = "EMAL") )]
49693	CodeEMAL,
49694	#[cfg_attr( feature = "derive_serde", serde(rename = "FAXI") )]
49695	CodeFAXI,
49696	#[cfg_attr( feature = "derive_serde", serde(rename = "POST") )]
49697	CodePOST,
49698	#[cfg_attr( feature = "derive_serde", serde(rename = "SMSM") )]
49699	CodeSMSM,
49700	#[cfg_attr( feature = "derive_serde", serde(rename = "URID") )]
49701	CodeURID,
49702}
49703
49704impl InvestigationLocationMethod1Code {
49705	pub fn validate(&self) -> Result<(), ValidationError> {
49706		Ok(())
49707	}
49708}
49709
49710
49711// InvestigationReason1Choice ...
49712#[cfg_attr(feature = "derive_debug", derive(Debug))]
49713#[cfg_attr(feature = "derive_default", derive(Default))]
49714#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49715#[cfg_attr(feature = "derive_clone", derive(Clone))]
49716#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49717pub struct InvestigationReason1Choice {
49718	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
49719	pub cd: Option<String>,
49720	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
49721	pub prtry: Option<String>,
49722}
49723
49724impl InvestigationReason1Choice {
49725	pub fn validate(&self) -> Result<(), ValidationError> {
49726		if let Some(ref val) = self.cd {
49727			if val.chars().count() < 1 {
49728				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
49729			}
49730			if val.chars().count() > 4 {
49731				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
49732			}
49733		}
49734		if let Some(ref val) = self.prtry {
49735			if val.chars().count() < 1 {
49736				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
49737			}
49738			if val.chars().count() > 35 {
49739				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
49740			}
49741		}
49742		Ok(())
49743	}
49744}
49745
49746
49747// InvestigationReason2 ...
49748#[cfg_attr(feature = "derive_debug", derive(Debug))]
49749#[cfg_attr(feature = "derive_default", derive(Default))]
49750#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49751#[cfg_attr(feature = "derive_clone", derive(Clone))]
49752#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49753pub struct InvestigationReason2 {
49754	#[cfg_attr( feature = "derive_serde", serde(rename = "Seq", skip_serializing_if = "Option::is_none") )]
49755	pub seq: Option<f64>,
49756	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
49757	pub rsn: InvestigationReason1Choice,
49758	#[cfg_attr( feature = "derive_serde", serde(rename = "RsnSubTp", skip_serializing_if = "Option::is_none") )]
49759	pub rsn_sub_tp: Option<InvestigationReasonSubType1Choice>,
49760	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlReqData", skip_serializing_if = "Option::is_none") )]
49761	pub addtl_req_data: Option<AdditionalRequestData1Choice>,
49762	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdInvstgtnData", skip_serializing_if = "Option::is_none") )]
49763	pub rltd_invstgtn_data: Option<RelatedInvestigationData1>,
49764	#[cfg_attr( feature = "derive_serde", serde(rename = "NclsdFile", skip_serializing_if = "Option::is_none") )]
49765	pub nclsd_file: Option<Vec<Document12>>,
49766	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdFileData", skip_serializing_if = "Option::is_none") )]
49767	pub rltd_file_data: Option<Vec<FileData1>>,
49768}
49769
49770impl InvestigationReason2 {
49771	pub fn validate(&self) -> Result<(), ValidationError> {
49772		self.rsn.validate()?;
49773		if let Some(ref val) = self.rsn_sub_tp { val.validate()? }
49774		if let Some(ref val) = self.addtl_req_data { val.validate()? }
49775		if let Some(ref val) = self.rltd_invstgtn_data { val.validate()? }
49776		if let Some(ref vec) = self.nclsd_file { for item in vec { item.validate()? } }
49777		if let Some(ref vec) = self.rltd_file_data { for item in vec { item.validate()? } }
49778		Ok(())
49779	}
49780}
49781
49782
49783// InvestigationReasonSubType1Choice ...
49784#[cfg_attr(feature = "derive_debug", derive(Debug))]
49785#[cfg_attr(feature = "derive_default", derive(Default))]
49786#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49787#[cfg_attr(feature = "derive_clone", derive(Clone))]
49788#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49789pub struct InvestigationReasonSubType1Choice {
49790	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
49791	pub cd: Option<String>,
49792	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
49793	pub prtry: Option<String>,
49794}
49795
49796impl InvestigationReasonSubType1Choice {
49797	pub fn validate(&self) -> Result<(), ValidationError> {
49798		if let Some(ref val) = self.cd {
49799			if val.chars().count() < 1 {
49800				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
49801			}
49802			if val.chars().count() > 4 {
49803				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
49804			}
49805		}
49806		if let Some(ref val) = self.prtry {
49807			if val.chars().count() < 1 {
49808				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
49809			}
49810			if val.chars().count() > 35 {
49811				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
49812			}
49813		}
49814		Ok(())
49815	}
49816}
49817
49818
49819// InvestigationRejection1Code ...
49820#[cfg_attr(feature = "derive_debug", derive(Debug))]
49821#[cfg_attr(feature = "derive_default", derive(Default))]
49822#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49823#[cfg_attr(feature = "derive_clone", derive(Clone))]
49824#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49825pub enum InvestigationRejection1Code {
49826	#[cfg_attr(feature = "derive_default", default)]
49827	#[cfg_attr( feature = "derive_serde", serde(rename = "NFND") )]
49828	CodeNFND,
49829	#[cfg_attr( feature = "derive_serde", serde(rename = "NAUT") )]
49830	CodeNAUT,
49831	#[cfg_attr( feature = "derive_serde", serde(rename = "UKNW") )]
49832	CodeUKNW,
49833	#[cfg_attr( feature = "derive_serde", serde(rename = "PCOR") )]
49834	CodePCOR,
49835	#[cfg_attr( feature = "derive_serde", serde(rename = "WMSG") )]
49836	CodeWMSG,
49837	#[cfg_attr( feature = "derive_serde", serde(rename = "RNCR") )]
49838	CodeRNCR,
49839	#[cfg_attr( feature = "derive_serde", serde(rename = "MROI") )]
49840	CodeMROI,
49841}
49842
49843impl InvestigationRejection1Code {
49844	pub fn validate(&self) -> Result<(), ValidationError> {
49845		Ok(())
49846	}
49847}
49848
49849
49850// InvestigationRejectionJustification1 ...
49851#[cfg_attr(feature = "derive_debug", derive(Debug))]
49852#[cfg_attr(feature = "derive_default", derive(Default))]
49853#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49854#[cfg_attr(feature = "derive_clone", derive(Clone))]
49855#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49856pub struct InvestigationRejectionJustification1 {
49857	#[cfg_attr( feature = "derive_serde", serde(rename = "RjctnRsn") )]
49858	pub rjctn_rsn: InvestigationRejection1Code,
49859}
49860
49861impl InvestigationRejectionJustification1 {
49862	pub fn validate(&self) -> Result<(), ValidationError> {
49863		self.rjctn_rsn.validate()?;
49864		Ok(())
49865	}
49866}
49867
49868
49869// InvestigationRequest2 ...
49870#[cfg_attr(feature = "derive_debug", derive(Debug))]
49871#[cfg_attr(feature = "derive_default", derive(Default))]
49872#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49873#[cfg_attr(feature = "derive_clone", derive(Clone))]
49874#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49875pub struct InvestigationRequest2 {
49876	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
49877	pub msg_id: String,
49878	#[cfg_attr( feature = "derive_serde", serde(rename = "RqstrInvstgtnId", skip_serializing_if = "Option::is_none") )]
49879	pub rqstr_invstgtn_id: Option<String>,
49880	#[cfg_attr( feature = "derive_serde", serde(rename = "RspndrInvstgtnId", skip_serializing_if = "Option::is_none") )]
49881	pub rspndr_invstgtn_id: Option<String>,
49882	#[cfg_attr( feature = "derive_serde", serde(rename = "EIR", skip_serializing_if = "Option::is_none") )]
49883	pub eir: Option<String>,
49884	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqActn", skip_serializing_if = "Option::is_none") )]
49885	pub req_actn: Option<InvestigationRequestAction1>,
49886	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstgtnTp") )]
49887	pub invstgtn_tp: InvestigationType1Choice,
49888	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstgtnSubTp", skip_serializing_if = "Option::is_none") )]
49889	pub invstgtn_sub_tp: Option<InvestigationSubType1Choice>,
49890	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygInstrm", skip_serializing_if = "Option::is_none") )]
49891	pub undrlyg_instrm: Option<UnderlyingInvestigationInstrument1Choice>,
49892	#[cfg_attr( feature = "derive_serde", serde(rename = "Undrlyg") )]
49893	pub undrlyg: UnderlyingData2Choice,
49894	#[cfg_attr( feature = "derive_serde", serde(rename = "Rqstr") )]
49895	pub rqstr: Party40Choice,
49896	#[cfg_attr( feature = "derive_serde", serde(rename = "Rspndr") )]
49897	pub rspndr: Party40Choice,
49898	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqOrgtr", skip_serializing_if = "Option::is_none") )]
49899	pub req_orgtr: Option<Party40Choice>,
49900	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdRspndr", skip_serializing_if = "Option::is_none") )]
49901	pub xpctd_rspndr: Option<Party40Choice>,
49902	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcLvl", skip_serializing_if = "Option::is_none") )]
49903	pub svc_lvl: Option<Vec<InvestigationServiceLevel1Choice>>,
49904}
49905
49906impl InvestigationRequest2 {
49907	pub fn validate(&self) -> Result<(), ValidationError> {
49908		if self.msg_id.chars().count() < 1 {
49909			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
49910		}
49911		if self.msg_id.chars().count() > 35 {
49912			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
49913		}
49914		if let Some(ref val) = self.rqstr_invstgtn_id {
49915			if val.chars().count() < 1 {
49916				return Err(ValidationError::new(1001, "rqstr_invstgtn_id is shorter than the minimum length of 1".to_string()));
49917			}
49918			if val.chars().count() > 35 {
49919				return Err(ValidationError::new(1002, "rqstr_invstgtn_id exceeds the maximum length of 35".to_string()));
49920			}
49921		}
49922		if let Some(ref val) = self.rspndr_invstgtn_id {
49923			if val.chars().count() < 1 {
49924				return Err(ValidationError::new(1001, "rspndr_invstgtn_id is shorter than the minimum length of 1".to_string()));
49925			}
49926			if val.chars().count() > 35 {
49927				return Err(ValidationError::new(1002, "rspndr_invstgtn_id exceeds the maximum length of 35".to_string()));
49928			}
49929		}
49930		if let Some(ref val) = self.eir {
49931			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
49932			if !pattern.is_match(val) {
49933				return Err(ValidationError::new(1005, "eir does not match the required pattern".to_string()));
49934			}
49935		}
49936		if let Some(ref val) = self.req_actn { val.validate()? }
49937		self.invstgtn_tp.validate()?;
49938		if let Some(ref val) = self.invstgtn_sub_tp { val.validate()? }
49939		if let Some(ref val) = self.undrlyg_instrm { val.validate()? }
49940		self.undrlyg.validate()?;
49941		self.rqstr.validate()?;
49942		self.rspndr.validate()?;
49943		if let Some(ref val) = self.req_orgtr { val.validate()? }
49944		if let Some(ref val) = self.xpctd_rspndr { val.validate()? }
49945		if let Some(ref vec) = self.svc_lvl { for item in vec { item.validate()? } }
49946		Ok(())
49947	}
49948}
49949
49950
49951// InvestigationRequest3 ...
49952#[cfg_attr(feature = "derive_debug", derive(Debug))]
49953#[cfg_attr(feature = "derive_default", derive(Default))]
49954#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
49955#[cfg_attr(feature = "derive_clone", derive(Clone))]
49956#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
49957pub struct InvestigationRequest3 {
49958	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
49959	pub msg_id: String,
49960	#[cfg_attr( feature = "derive_serde", serde(rename = "RqstrInvstgtnId", skip_serializing_if = "Option::is_none") )]
49961	pub rqstr_invstgtn_id: Option<String>,
49962	#[cfg_attr( feature = "derive_serde", serde(rename = "RspndrInvstgtnId", skip_serializing_if = "Option::is_none") )]
49963	pub rspndr_invstgtn_id: Option<String>,
49964	#[cfg_attr( feature = "derive_serde", serde(rename = "EIR", skip_serializing_if = "Option::is_none") )]
49965	pub eir: Option<String>,
49966	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqActn", skip_serializing_if = "Option::is_none") )]
49967	pub req_actn: Option<InvestigationRequestAction1>,
49968	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstgtnTp") )]
49969	pub invstgtn_tp: InvestigationType1Choice,
49970	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstgtnSubTp", skip_serializing_if = "Option::is_none") )]
49971	pub invstgtn_sub_tp: Option<InvestigationSubType1Choice>,
49972	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygInstrm", skip_serializing_if = "Option::is_none") )]
49973	pub undrlyg_instrm: Option<UnderlyingInvestigationInstrument1Choice>,
49974	#[cfg_attr( feature = "derive_serde", serde(rename = "Undrlyg", skip_serializing_if = "Option::is_none") )]
49975	pub undrlyg: Option<UnderlyingData2Choice>,
49976	#[cfg_attr( feature = "derive_serde", serde(rename = "Rqstr") )]
49977	pub rqstr: Party40Choice,
49978	#[cfg_attr( feature = "derive_serde", serde(rename = "Rspndr") )]
49979	pub rspndr: Party40Choice,
49980	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqOrgtr", skip_serializing_if = "Option::is_none") )]
49981	pub req_orgtr: Option<Party40Choice>,
49982	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdRspndr", skip_serializing_if = "Option::is_none") )]
49983	pub xpctd_rspndr: Option<Party40Choice>,
49984	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcLvl", skip_serializing_if = "Option::is_none") )]
49985	pub svc_lvl: Option<Vec<InvestigationServiceLevel1Choice>>,
49986}
49987
49988impl InvestigationRequest3 {
49989	pub fn validate(&self) -> Result<(), ValidationError> {
49990		if self.msg_id.chars().count() < 1 {
49991			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
49992		}
49993		if self.msg_id.chars().count() > 35 {
49994			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
49995		}
49996		if let Some(ref val) = self.rqstr_invstgtn_id {
49997			if val.chars().count() < 1 {
49998				return Err(ValidationError::new(1001, "rqstr_invstgtn_id is shorter than the minimum length of 1".to_string()));
49999			}
50000			if val.chars().count() > 35 {
50001				return Err(ValidationError::new(1002, "rqstr_invstgtn_id exceeds the maximum length of 35".to_string()));
50002			}
50003		}
50004		if let Some(ref val) = self.rspndr_invstgtn_id {
50005			if val.chars().count() < 1 {
50006				return Err(ValidationError::new(1001, "rspndr_invstgtn_id is shorter than the minimum length of 1".to_string()));
50007			}
50008			if val.chars().count() > 35 {
50009				return Err(ValidationError::new(1002, "rspndr_invstgtn_id exceeds the maximum length of 35".to_string()));
50010			}
50011		}
50012		if let Some(ref val) = self.eir {
50013			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
50014			if !pattern.is_match(val) {
50015				return Err(ValidationError::new(1005, "eir does not match the required pattern".to_string()));
50016			}
50017		}
50018		if let Some(ref val) = self.req_actn { val.validate()? }
50019		self.invstgtn_tp.validate()?;
50020		if let Some(ref val) = self.invstgtn_sub_tp { val.validate()? }
50021		if let Some(ref val) = self.undrlyg_instrm { val.validate()? }
50022		if let Some(ref val) = self.undrlyg { val.validate()? }
50023		self.rqstr.validate()?;
50024		self.rspndr.validate()?;
50025		if let Some(ref val) = self.req_orgtr { val.validate()? }
50026		if let Some(ref val) = self.xpctd_rspndr { val.validate()? }
50027		if let Some(ref vec) = self.svc_lvl { for item in vec { item.validate()? } }
50028		Ok(())
50029	}
50030}
50031
50032
50033// InvestigationRequestAction1 ...
50034#[cfg_attr(feature = "derive_debug", derive(Debug))]
50035#[cfg_attr(feature = "derive_default", derive(Default))]
50036#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50037#[cfg_attr(feature = "derive_clone", derive(Clone))]
50038#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50039pub struct InvestigationRequestAction1 {
50040	#[cfg_attr( feature = "derive_serde", serde(rename = "Actn") )]
50041	pub actn: InvestigationRequestAction1Choice,
50042	#[cfg_attr( feature = "derive_serde", serde(rename = "ActnRsn", skip_serializing_if = "Option::is_none") )]
50043	pub actn_rsn: Option<InvestigationActionReason1>,
50044}
50045
50046impl InvestigationRequestAction1 {
50047	pub fn validate(&self) -> Result<(), ValidationError> {
50048		self.actn.validate()?;
50049		if let Some(ref val) = self.actn_rsn { val.validate()? }
50050		Ok(())
50051	}
50052}
50053
50054
50055// InvestigationRequestAction1Choice ...
50056#[cfg_attr(feature = "derive_debug", derive(Debug))]
50057#[cfg_attr(feature = "derive_default", derive(Default))]
50058#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50059#[cfg_attr(feature = "derive_clone", derive(Clone))]
50060#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50061pub struct InvestigationRequestAction1Choice {
50062	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
50063	pub cd: Option<String>,
50064	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
50065	pub prtry: Option<String>,
50066}
50067
50068impl InvestigationRequestAction1Choice {
50069	pub fn validate(&self) -> Result<(), ValidationError> {
50070		if let Some(ref val) = self.cd {
50071			if val.chars().count() < 1 {
50072				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
50073			}
50074			if val.chars().count() > 4 {
50075				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
50076			}
50077		}
50078		if let Some(ref val) = self.prtry {
50079			if val.chars().count() < 1 {
50080				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
50081			}
50082			if val.chars().count() > 35 {
50083				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
50084			}
50085		}
50086		Ok(())
50087	}
50088}
50089
50090
50091// InvestigationResponse3 ...
50092#[cfg_attr(feature = "derive_debug", derive(Debug))]
50093#[cfg_attr(feature = "derive_default", derive(Default))]
50094#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50095#[cfg_attr(feature = "derive_clone", derive(Clone))]
50096#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50097pub struct InvestigationResponse3 {
50098	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
50099	pub msg_id: String,
50100	#[cfg_attr( feature = "derive_serde", serde(rename = "RspndrInvstgtnId", skip_serializing_if = "Option::is_none") )]
50101	pub rspndr_invstgtn_id: Option<String>,
50102	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstgtnSts") )]
50103	pub invstgtn_sts: InvestigationStatus2,
50104	#[cfg_attr( feature = "derive_serde", serde(rename = "NxtRspndr", skip_serializing_if = "Option::is_none") )]
50105	pub nxt_rspndr: Option<Party40Choice>,
50106	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstgtnData", skip_serializing_if = "Option::is_none") )]
50107	pub invstgtn_data: Option<Vec<InvestigationData2>>,
50108}
50109
50110impl InvestigationResponse3 {
50111	pub fn validate(&self) -> Result<(), ValidationError> {
50112		if self.msg_id.chars().count() < 1 {
50113			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
50114		}
50115		if self.msg_id.chars().count() > 35 {
50116			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
50117		}
50118		if let Some(ref val) = self.rspndr_invstgtn_id {
50119			if val.chars().count() < 1 {
50120				return Err(ValidationError::new(1001, "rspndr_invstgtn_id is shorter than the minimum length of 1".to_string()));
50121			}
50122			if val.chars().count() > 35 {
50123				return Err(ValidationError::new(1002, "rspndr_invstgtn_id exceeds the maximum length of 35".to_string()));
50124			}
50125		}
50126		self.invstgtn_sts.validate()?;
50127		if let Some(ref val) = self.nxt_rspndr { val.validate()? }
50128		if let Some(ref vec) = self.invstgtn_data { for item in vec { item.validate()? } }
50129		Ok(())
50130	}
50131}
50132
50133
50134// InvestigationResult1Choice ...
50135#[cfg_attr(feature = "derive_debug", derive(Debug))]
50136#[cfg_attr(feature = "derive_default", derive(Default))]
50137#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50138#[cfg_attr(feature = "derive_clone", derive(Clone))]
50139#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50140pub struct InvestigationResult1Choice {
50141	#[cfg_attr( feature = "derive_serde", serde(rename = "Rslt", skip_serializing_if = "Option::is_none") )]
50142	pub rslt: Option<SupplementaryDataEnvelope1>,
50143	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstgtnSts", skip_serializing_if = "Option::is_none") )]
50144	pub invstgtn_sts: Option<InvestigationStatus1Code>,
50145}
50146
50147impl InvestigationResult1Choice {
50148	pub fn validate(&self) -> Result<(), ValidationError> {
50149		if let Some(ref val) = self.rslt { val.validate()? }
50150		if let Some(ref val) = self.invstgtn_sts { val.validate()? }
50151		Ok(())
50152	}
50153}
50154
50155
50156// InvestigationServiceLevel1Choice ...
50157#[cfg_attr(feature = "derive_debug", derive(Debug))]
50158#[cfg_attr(feature = "derive_default", derive(Default))]
50159#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50160#[cfg_attr(feature = "derive_clone", derive(Clone))]
50161#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50162pub struct InvestigationServiceLevel1Choice {
50163	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
50164	pub cd: Option<String>,
50165	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
50166	pub prtry: Option<String>,
50167}
50168
50169impl InvestigationServiceLevel1Choice {
50170	pub fn validate(&self) -> Result<(), ValidationError> {
50171		if let Some(ref val) = self.cd {
50172			if val.chars().count() < 1 {
50173				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
50174			}
50175			if val.chars().count() > 4 {
50176				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
50177			}
50178		}
50179		if let Some(ref val) = self.prtry {
50180			if val.chars().count() < 1 {
50181				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
50182			}
50183			if val.chars().count() > 35 {
50184				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
50185			}
50186		}
50187		Ok(())
50188	}
50189}
50190
50191
50192// InvestigationStatus1Code ...
50193#[cfg_attr(feature = "derive_debug", derive(Debug))]
50194#[cfg_attr(feature = "derive_default", derive(Default))]
50195#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50196#[cfg_attr(feature = "derive_clone", derive(Clone))]
50197#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50198pub enum InvestigationStatus1Code {
50199	#[cfg_attr(feature = "derive_default", default)]
50200	#[cfg_attr( feature = "derive_serde", serde(rename = "FOUN") )]
50201	CodeFOUN,
50202	#[cfg_attr( feature = "derive_serde", serde(rename = "NFOU") )]
50203	CodeNFOU,
50204	#[cfg_attr( feature = "derive_serde", serde(rename = "NOAP") )]
50205	CodeNOAP,
50206}
50207
50208impl InvestigationStatus1Code {
50209	pub fn validate(&self) -> Result<(), ValidationError> {
50210		Ok(())
50211	}
50212}
50213
50214
50215// InvestigationStatus2 ...
50216#[cfg_attr(feature = "derive_debug", derive(Debug))]
50217#[cfg_attr(feature = "derive_default", derive(Default))]
50218#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50219#[cfg_attr(feature = "derive_clone", derive(Clone))]
50220#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50221pub struct InvestigationStatus2 {
50222	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
50223	pub sts: String,
50224	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsn", skip_serializing_if = "Option::is_none") )]
50225	pub sts_rsn: Option<InvestigationStatusReason1Choice>,
50226}
50227
50228impl InvestigationStatus2 {
50229	pub fn validate(&self) -> Result<(), ValidationError> {
50230		if self.sts.chars().count() < 1 {
50231			return Err(ValidationError::new(1001, "sts is shorter than the minimum length of 1".to_string()));
50232		}
50233		if self.sts.chars().count() > 4 {
50234			return Err(ValidationError::new(1002, "sts exceeds the maximum length of 4".to_string()));
50235		}
50236		if let Some(ref val) = self.sts_rsn { val.validate()? }
50237		Ok(())
50238	}
50239}
50240
50241
50242// InvestigationStatus6Choice ...
50243#[cfg_attr(feature = "derive_debug", derive(Debug))]
50244#[cfg_attr(feature = "derive_default", derive(Default))]
50245#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50246#[cfg_attr(feature = "derive_clone", derive(Clone))]
50247#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50248pub struct InvestigationStatus6Choice {
50249	#[cfg_attr( feature = "derive_serde", serde(rename = "Conf", skip_serializing_if = "Option::is_none") )]
50250	pub conf: Option<String>,
50251	#[cfg_attr( feature = "derive_serde", serde(rename = "RjctdMod", skip_serializing_if = "Option::is_none") )]
50252	pub rjctd_mod: Option<Vec<ModificationStatusReason1Choice>>,
50253	#[cfg_attr( feature = "derive_serde", serde(rename = "DplctOf", skip_serializing_if = "Option::is_none") )]
50254	pub dplct_of: Option<Case6>,
50255	#[cfg_attr( feature = "derive_serde", serde(rename = "AssgnmtCxlConf", skip_serializing_if = "Option::is_none") )]
50256	pub assgnmt_cxl_conf: Option<bool>,
50257}
50258
50259impl InvestigationStatus6Choice {
50260	pub fn validate(&self) -> Result<(), ValidationError> {
50261		if let Some(ref val) = self.conf {
50262			if val.chars().count() < 1 {
50263				return Err(ValidationError::new(1001, "conf is shorter than the minimum length of 1".to_string()));
50264			}
50265			if val.chars().count() > 4 {
50266				return Err(ValidationError::new(1002, "conf exceeds the maximum length of 4".to_string()));
50267			}
50268		}
50269		if let Some(ref vec) = self.rjctd_mod { for item in vec { item.validate()? } }
50270		if let Some(ref val) = self.dplct_of { val.validate()? }
50271		Ok(())
50272	}
50273}
50274
50275
50276// InvestigationStatusReason1Choice ...
50277#[cfg_attr(feature = "derive_debug", derive(Debug))]
50278#[cfg_attr(feature = "derive_default", derive(Default))]
50279#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50280#[cfg_attr(feature = "derive_clone", derive(Clone))]
50281#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50282pub struct InvestigationStatusReason1Choice {
50283	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
50284	pub cd: Option<String>,
50285	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
50286	pub prtry: Option<String>,
50287}
50288
50289impl InvestigationStatusReason1Choice {
50290	pub fn validate(&self) -> Result<(), ValidationError> {
50291		if let Some(ref val) = self.cd {
50292			if val.chars().count() < 1 {
50293				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
50294			}
50295			if val.chars().count() > 4 {
50296				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
50297			}
50298		}
50299		if let Some(ref val) = self.prtry {
50300			if val.chars().count() < 1 {
50301				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
50302			}
50303			if val.chars().count() > 35 {
50304				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
50305			}
50306		}
50307		Ok(())
50308	}
50309}
50310
50311
50312// InvestigationSubType1Choice ...
50313#[cfg_attr(feature = "derive_debug", derive(Debug))]
50314#[cfg_attr(feature = "derive_default", derive(Default))]
50315#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50316#[cfg_attr(feature = "derive_clone", derive(Clone))]
50317#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50318pub struct InvestigationSubType1Choice {
50319	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
50320	pub cd: Option<String>,
50321	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
50322	pub prtry: Option<String>,
50323}
50324
50325impl InvestigationSubType1Choice {
50326	pub fn validate(&self) -> Result<(), ValidationError> {
50327		if let Some(ref val) = self.cd {
50328			if val.chars().count() < 1 {
50329				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
50330			}
50331			if val.chars().count() > 4 {
50332				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
50333			}
50334		}
50335		if let Some(ref val) = self.prtry {
50336			if val.chars().count() < 1 {
50337				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
50338			}
50339			if val.chars().count() > 35 {
50340				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
50341			}
50342		}
50343		Ok(())
50344	}
50345}
50346
50347
50348// InvestigationType1Choice ...
50349#[cfg_attr(feature = "derive_debug", derive(Debug))]
50350#[cfg_attr(feature = "derive_default", derive(Default))]
50351#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50352#[cfg_attr(feature = "derive_clone", derive(Clone))]
50353#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50354pub struct InvestigationType1Choice {
50355	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
50356	pub cd: Option<String>,
50357	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
50358	pub prtry: Option<String>,
50359}
50360
50361impl InvestigationType1Choice {
50362	pub fn validate(&self) -> Result<(), ValidationError> {
50363		if let Some(ref val) = self.cd {
50364			if val.chars().count() < 1 {
50365				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
50366			}
50367			if val.chars().count() > 4 {
50368				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
50369			}
50370		}
50371		if let Some(ref val) = self.prtry {
50372			if val.chars().count() < 1 {
50373				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
50374			}
50375			if val.chars().count() > 35 {
50376				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
50377			}
50378		}
50379		Ok(())
50380	}
50381}
50382
50383
50384// Investment1Choice ...
50385#[cfg_attr(feature = "derive_debug", derive(Debug))]
50386#[cfg_attr(feature = "derive_default", derive(Default))]
50387#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50388#[cfg_attr(feature = "derive_clone", derive(Clone))]
50389#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50390pub struct Investment1Choice {
50391	#[cfg_attr( feature = "derive_serde", serde(rename = "UscrdCshDpst", skip_serializing_if = "Option::is_none") )]
50392	pub uscrd_csh_dpst: Option<Deposit1>,
50393	#[cfg_attr( feature = "derive_serde", serde(rename = "CntrlBkDpst", skip_serializing_if = "Option::is_none") )]
50394	pub cntrl_bk_dpst: Option<Deposit1>,
50395	#[cfg_attr( feature = "derive_serde", serde(rename = "RpAgrmt", skip_serializing_if = "Option::is_none") )]
50396	pub rp_agrmt: Option<RepurchaseAgreement2>,
50397	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrInvstmts", skip_serializing_if = "Option::is_none") )]
50398	pub othr_invstmts: Option<OtherInvestment1>,
50399	#[cfg_attr( feature = "derive_serde", serde(rename = "OutrghtInvstmt", skip_serializing_if = "Option::is_none") )]
50400	pub outrght_invstmt: Option<SecurityIdentificationAndAmount1>,
50401}
50402
50403impl Investment1Choice {
50404	pub fn validate(&self) -> Result<(), ValidationError> {
50405		if let Some(ref val) = self.uscrd_csh_dpst { val.validate()? }
50406		if let Some(ref val) = self.cntrl_bk_dpst { val.validate()? }
50407		if let Some(ref val) = self.rp_agrmt { val.validate()? }
50408		if let Some(ref val) = self.othr_invstmts { val.validate()? }
50409		if let Some(ref val) = self.outrght_invstmt { val.validate()? }
50410		Ok(())
50411	}
50412}
50413
50414
50415// InvestmentAccount42 ...
50416#[cfg_attr(feature = "derive_debug", derive(Debug))]
50417#[cfg_attr(feature = "derive_default", derive(Default))]
50418#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50419#[cfg_attr(feature = "derive_clone", derive(Clone))]
50420#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50421pub struct InvestmentAccount42 {
50422	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
50423	pub acct_id: Option<AccountIdentification1>,
50424	#[cfg_attr( feature = "derive_serde", serde(rename = "OwnrId", skip_serializing_if = "Option::is_none") )]
50425	pub ownr_id: Option<PartyIdentification2Choice>,
50426	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
50427	pub acct_svcr: Option<PartyIdentification2Choice>,
50428}
50429
50430impl InvestmentAccount42 {
50431	pub fn validate(&self) -> Result<(), ValidationError> {
50432		if let Some(ref val) = self.acct_id { val.validate()? }
50433		if let Some(ref val) = self.ownr_id { val.validate()? }
50434		if let Some(ref val) = self.acct_svcr { val.validate()? }
50435		Ok(())
50436	}
50437}
50438
50439
50440// InvestmentAccount73 ...
50441#[cfg_attr(feature = "derive_debug", derive(Debug))]
50442#[cfg_attr(feature = "derive_default", derive(Default))]
50443#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50444#[cfg_attr(feature = "derive_clone", derive(Clone))]
50445#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50446pub struct InvestmentAccount73 {
50447	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
50448	pub id: Option<String>,
50449	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
50450	pub nm: Option<String>,
50451	#[cfg_attr( feature = "derive_serde", serde(rename = "Dsgnt", skip_serializing_if = "Option::is_none") )]
50452	pub dsgnt: Option<String>,
50453	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
50454	pub tp: Option<AccountType2Choice>,
50455	#[cfg_attr( feature = "derive_serde", serde(rename = "OwnrshTp") )]
50456	pub ownrsh_tp: OwnershipType2Choice,
50457	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxXmptn", skip_serializing_if = "Option::is_none") )]
50458	pub tax_xmptn: Option<TaxExemptionReason2Choice>,
50459	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtFrqcy", skip_serializing_if = "Option::is_none") )]
50460	pub stmt_frqcy: Option<StatementFrequencyReason2Choice>,
50461	#[cfg_attr( feature = "derive_serde", serde(rename = "RefCcy", skip_serializing_if = "Option::is_none") )]
50462	pub ref_ccy: Option<String>,
50463	#[cfg_attr( feature = "derive_serde", serde(rename = "Lang", skip_serializing_if = "Option::is_none") )]
50464	pub lang: Option<String>,
50465	#[cfg_attr( feature = "derive_serde", serde(rename = "IncmPref", skip_serializing_if = "Option::is_none") )]
50466	pub incm_pref: Option<IncomePreference2Code>,
50467	#[cfg_attr( feature = "derive_serde", serde(rename = "RinvstmtDtls", skip_serializing_if = "Option::is_none") )]
50468	pub rinvstmt_dtls: Option<Vec<Reinvestment4>>,
50469	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxWhldgMtd", skip_serializing_if = "Option::is_none") )]
50470	pub tax_whldg_mtd: Option<TaxWithholdingMethod3Code>,
50471	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRptg", skip_serializing_if = "Option::is_none") )]
50472	pub tax_rptg: Option<Vec<TaxReporting3>>,
50473	#[cfg_attr( feature = "derive_serde", serde(rename = "LttrInttDtls", skip_serializing_if = "Option::is_none") )]
50474	pub lttr_intt_dtls: Option<LetterIntent1>,
50475	#[cfg_attr( feature = "derive_serde", serde(rename = "AcmltnRghtRef", skip_serializing_if = "Option::is_none") )]
50476	pub acmltn_rght_ref: Option<String>,
50477	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqrdSgntriesNb", skip_serializing_if = "Option::is_none") )]
50478	pub reqrd_sgntries_nb: Option<f64>,
50479	#[cfg_attr( feature = "derive_serde", serde(rename = "FndFmlyNm", skip_serializing_if = "Option::is_none") )]
50480	pub fnd_fmly_nm: Option<String>,
50481	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmDtls", skip_serializing_if = "Option::is_none") )]
50482	pub fin_instrm_dtls: Option<Vec<FinancialInstrument87>>,
50483	#[cfg_attr( feature = "derive_serde", serde(rename = "RndgDtls", skip_serializing_if = "Option::is_none") )]
50484	pub rndg_dtls: Option<RoundingParameters1>,
50485	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
50486	pub acct_svcr: Option<PartyIdentification125Choice>,
50487	#[cfg_attr( feature = "derive_serde", serde(rename = "BlckdSts", skip_serializing_if = "Option::is_none") )]
50488	pub blckd_sts: Option<BlockedStatusReason2Choice>,
50489	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctUsgTp", skip_serializing_if = "Option::is_none") )]
50490	pub acct_usg_tp: Option<AccountUsageType2Choice>,
50491	#[cfg_attr( feature = "derive_serde", serde(rename = "FrgnStsCertfctn", skip_serializing_if = "Option::is_none") )]
50492	pub frgn_sts_certfctn: Option<Provided1Code>,
50493	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSgntrDtTm", skip_serializing_if = "Option::is_none") )]
50494	pub acct_sgntr_dt_tm: Option<DateAndDateTime1Choice>,
50495	#[cfg_attr( feature = "derive_serde", serde(rename = "TxChanlTp", skip_serializing_if = "Option::is_none") )]
50496	pub tx_chanl_tp: Option<TransactionChannelType1Choice>,
50497	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtAcctCtgy", skip_serializing_if = "Option::is_none") )]
50498	pub invstmt_acct_ctgy: Option<InvestmentAccountCategory1Choice>,
50499	#[cfg_attr( feature = "derive_serde", serde(rename = "Pldgg", skip_serializing_if = "Option::is_none") )]
50500	pub pldgg: Option<Eligible1Code>,
50501	#[cfg_attr( feature = "derive_serde", serde(rename = "Coll", skip_serializing_if = "Option::is_none") )]
50502	pub coll: Option<Collateral1Code>,
50503	#[cfg_attr( feature = "derive_serde", serde(rename = "ThrdPtyRghts", skip_serializing_if = "Option::is_none") )]
50504	pub thrd_pty_rghts: Option<ThirdPartyRights2>,
50505	#[cfg_attr( feature = "derive_serde", serde(rename = "PwrOfAttnyLvlOfCtrl", skip_serializing_if = "Option::is_none") )]
50506	pub pwr_of_attny_lvl_of_ctrl: Option<LevelOfControl1Choice>,
50507	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctgSts", skip_serializing_if = "Option::is_none") )]
50508	pub acctg_sts: Option<AccountingStatus1Choice>,
50509	#[cfg_attr( feature = "derive_serde", serde(rename = "OpngDt", skip_serializing_if = "Option::is_none") )]
50510	pub opng_dt: Option<DateAndDateTime1Choice>,
50511	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
50512	pub clsg_dt: Option<DateAndDateTime1Choice>,
50513	#[cfg_attr( feature = "derive_serde", serde(rename = "NegInd", skip_serializing_if = "Option::is_none") )]
50514	pub neg_ind: Option<bool>,
50515	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgOrdr", skip_serializing_if = "Option::is_none") )]
50516	pub prcg_ordr: Option<PositionEffect3Code>,
50517	#[cfg_attr( feature = "derive_serde", serde(rename = "Lblty", skip_serializing_if = "Option::is_none") )]
50518	pub lblty: Option<Liability1Choice>,
50519	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrPrfl", skip_serializing_if = "Option::is_none") )]
50520	pub invstr_prfl: Option<Vec<InvestorProfile2>>,
50521	#[cfg_attr( feature = "derive_serde", serde(rename = "FsclYr", skip_serializing_if = "Option::is_none") )]
50522	pub fscl_yr: Option<FiscalYear1Choice>,
50523}
50524
50525impl InvestmentAccount73 {
50526	pub fn validate(&self) -> Result<(), ValidationError> {
50527		if let Some(ref val) = self.id {
50528			if val.chars().count() < 1 {
50529				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
50530			}
50531			if val.chars().count() > 35 {
50532				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
50533			}
50534		}
50535		if let Some(ref val) = self.nm {
50536			if val.chars().count() < 1 {
50537				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
50538			}
50539			if val.chars().count() > 35 {
50540				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 35".to_string()));
50541			}
50542		}
50543		if let Some(ref val) = self.dsgnt {
50544			if val.chars().count() < 1 {
50545				return Err(ValidationError::new(1001, "dsgnt is shorter than the minimum length of 1".to_string()));
50546			}
50547			if val.chars().count() > 35 {
50548				return Err(ValidationError::new(1002, "dsgnt exceeds the maximum length of 35".to_string()));
50549			}
50550		}
50551		if let Some(ref val) = self.tp { val.validate()? }
50552		self.ownrsh_tp.validate()?;
50553		if let Some(ref val) = self.tax_xmptn { val.validate()? }
50554		if let Some(ref val) = self.stmt_frqcy { val.validate()? }
50555		if let Some(ref val) = self.ref_ccy {
50556			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
50557			if !pattern.is_match(val) {
50558				return Err(ValidationError::new(1005, "ref_ccy does not match the required pattern".to_string()));
50559			}
50560		}
50561		if let Some(ref val) = self.incm_pref { val.validate()? }
50562		if let Some(ref vec) = self.rinvstmt_dtls { for item in vec { item.validate()? } }
50563		if let Some(ref val) = self.tax_whldg_mtd { val.validate()? }
50564		if let Some(ref vec) = self.tax_rptg { for item in vec { item.validate()? } }
50565		if let Some(ref val) = self.lttr_intt_dtls { val.validate()? }
50566		if let Some(ref val) = self.acmltn_rght_ref {
50567			if val.chars().count() < 1 {
50568				return Err(ValidationError::new(1001, "acmltn_rght_ref is shorter than the minimum length of 1".to_string()));
50569			}
50570			if val.chars().count() > 35 {
50571				return Err(ValidationError::new(1002, "acmltn_rght_ref exceeds the maximum length of 35".to_string()));
50572			}
50573		}
50574		if let Some(ref val) = self.fnd_fmly_nm {
50575			if val.chars().count() < 1 {
50576				return Err(ValidationError::new(1001, "fnd_fmly_nm is shorter than the minimum length of 1".to_string()));
50577			}
50578			if val.chars().count() > 350 {
50579				return Err(ValidationError::new(1002, "fnd_fmly_nm exceeds the maximum length of 350".to_string()));
50580			}
50581		}
50582		if let Some(ref vec) = self.fin_instrm_dtls { for item in vec { item.validate()? } }
50583		if let Some(ref val) = self.rndg_dtls { val.validate()? }
50584		if let Some(ref val) = self.acct_svcr { val.validate()? }
50585		if let Some(ref val) = self.blckd_sts { val.validate()? }
50586		if let Some(ref val) = self.acct_usg_tp { val.validate()? }
50587		if let Some(ref val) = self.frgn_sts_certfctn { val.validate()? }
50588		if let Some(ref val) = self.acct_sgntr_dt_tm { val.validate()? }
50589		if let Some(ref val) = self.tx_chanl_tp { val.validate()? }
50590		if let Some(ref val) = self.invstmt_acct_ctgy { val.validate()? }
50591		if let Some(ref val) = self.pldgg { val.validate()? }
50592		if let Some(ref val) = self.coll { val.validate()? }
50593		if let Some(ref val) = self.thrd_pty_rghts { val.validate()? }
50594		if let Some(ref val) = self.pwr_of_attny_lvl_of_ctrl { val.validate()? }
50595		if let Some(ref val) = self.acctg_sts { val.validate()? }
50596		if let Some(ref val) = self.opng_dt { val.validate()? }
50597		if let Some(ref val) = self.clsg_dt { val.validate()? }
50598		if let Some(ref val) = self.prcg_ordr { val.validate()? }
50599		if let Some(ref val) = self.lblty { val.validate()? }
50600		if let Some(ref vec) = self.invstr_prfl { for item in vec { item.validate()? } }
50601		if let Some(ref val) = self.fscl_yr { val.validate()? }
50602		Ok(())
50603	}
50604}
50605
50606
50607// InvestmentAccount74 ...
50608#[cfg_attr(feature = "derive_debug", derive(Debug))]
50609#[cfg_attr(feature = "derive_default", derive(Default))]
50610#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50611#[cfg_attr(feature = "derive_clone", derive(Clone))]
50612#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50613pub struct InvestmentAccount74 {
50614	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
50615	pub id: String,
50616	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSts", skip_serializing_if = "Option::is_none") )]
50617	pub acct_sts: Option<AccountStatus2>,
50618	#[cfg_attr( feature = "derive_serde", serde(rename = "BlckdSts", skip_serializing_if = "Option::is_none") )]
50619	pub blckd_sts: Option<BlockedStatusReason2Choice>,
50620	#[cfg_attr( feature = "derive_serde", serde(rename = "StsDt", skip_serializing_if = "Option::is_none") )]
50621	pub sts_dt: Option<DateAndDateTime1Choice>,
50622	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
50623	pub nm: Option<String>,
50624	#[cfg_attr( feature = "derive_serde", serde(rename = "Dsgnt", skip_serializing_if = "Option::is_none") )]
50625	pub dsgnt: Option<String>,
50626	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
50627	pub tp: Option<AccountType2Choice>,
50628	#[cfg_attr( feature = "derive_serde", serde(rename = "OwnrshTp", skip_serializing_if = "Option::is_none") )]
50629	pub ownrsh_tp: Option<OwnershipType2Choice>,
50630	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxXmptn", skip_serializing_if = "Option::is_none") )]
50631	pub tax_xmptn: Option<TaxExemptionReason2Choice>,
50632	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtFrqcy", skip_serializing_if = "Option::is_none") )]
50633	pub stmt_frqcy: Option<StatementFrequencyReason2Choice>,
50634	#[cfg_attr( feature = "derive_serde", serde(rename = "RefCcy", skip_serializing_if = "Option::is_none") )]
50635	pub ref_ccy: Option<String>,
50636	#[cfg_attr( feature = "derive_serde", serde(rename = "Lang", skip_serializing_if = "Option::is_none") )]
50637	pub lang: Option<String>,
50638	#[cfg_attr( feature = "derive_serde", serde(rename = "IncmPref", skip_serializing_if = "Option::is_none") )]
50639	pub incm_pref: Option<IncomePreference2Code>,
50640	#[cfg_attr( feature = "derive_serde", serde(rename = "RinvstmtDtls", skip_serializing_if = "Option::is_none") )]
50641	pub rinvstmt_dtls: Option<Vec<Reinvestment4>>,
50642	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxWhldgMtd", skip_serializing_if = "Option::is_none") )]
50643	pub tax_whldg_mtd: Option<TaxWithholdingMethod3Code>,
50644	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRptg", skip_serializing_if = "Option::is_none") )]
50645	pub tax_rptg: Option<Vec<TaxReporting3>>,
50646	#[cfg_attr( feature = "derive_serde", serde(rename = "LttrInttDtls", skip_serializing_if = "Option::is_none") )]
50647	pub lttr_intt_dtls: Option<LetterIntent1>,
50648	#[cfg_attr( feature = "derive_serde", serde(rename = "AcmltnRghtRef", skip_serializing_if = "Option::is_none") )]
50649	pub acmltn_rght_ref: Option<String>,
50650	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqrdSgntriesNb", skip_serializing_if = "Option::is_none") )]
50651	pub reqrd_sgntries_nb: Option<f64>,
50652	#[cfg_attr( feature = "derive_serde", serde(rename = "FndFmlyNm", skip_serializing_if = "Option::is_none") )]
50653	pub fnd_fmly_nm: Option<String>,
50654	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmDtls", skip_serializing_if = "Option::is_none") )]
50655	pub fin_instrm_dtls: Option<Vec<FinancialInstrument87>>,
50656	#[cfg_attr( feature = "derive_serde", serde(rename = "RndgDtls", skip_serializing_if = "Option::is_none") )]
50657	pub rndg_dtls: Option<RoundingParameters1>,
50658	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
50659	pub acct_svcr: Option<PartyIdentification125Choice>,
50660	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctUsgTp", skip_serializing_if = "Option::is_none") )]
50661	pub acct_usg_tp: Option<AccountUsageType2Choice>,
50662	#[cfg_attr( feature = "derive_serde", serde(rename = "FrgnStsCertfctn", skip_serializing_if = "Option::is_none") )]
50663	pub frgn_sts_certfctn: Option<Provided1Code>,
50664	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSgntrDtTm", skip_serializing_if = "Option::is_none") )]
50665	pub acct_sgntr_dt_tm: Option<DateAndDateTime1Choice>,
50666	#[cfg_attr( feature = "derive_serde", serde(rename = "TxChanlTp", skip_serializing_if = "Option::is_none") )]
50667	pub tx_chanl_tp: Option<TransactionChannelType1Choice>,
50668	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtAcctCtgy", skip_serializing_if = "Option::is_none") )]
50669	pub invstmt_acct_ctgy: Option<InvestmentAccountCategory1Choice>,
50670	#[cfg_attr( feature = "derive_serde", serde(rename = "Pldgg", skip_serializing_if = "Option::is_none") )]
50671	pub pldgg: Option<Eligible1Code>,
50672	#[cfg_attr( feature = "derive_serde", serde(rename = "Coll", skip_serializing_if = "Option::is_none") )]
50673	pub coll: Option<Collateral1Code>,
50674	#[cfg_attr( feature = "derive_serde", serde(rename = "ThrdPtyRghts", skip_serializing_if = "Option::is_none") )]
50675	pub thrd_pty_rghts: Option<ThirdPartyRights2>,
50676	#[cfg_attr( feature = "derive_serde", serde(rename = "PwrOfAttnyLvlOfCtrl", skip_serializing_if = "Option::is_none") )]
50677	pub pwr_of_attny_lvl_of_ctrl: Option<LevelOfControl1Choice>,
50678	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctgSts", skip_serializing_if = "Option::is_none") )]
50679	pub acctg_sts: Option<AccountingStatus1Choice>,
50680	#[cfg_attr( feature = "derive_serde", serde(rename = "OpngDt", skip_serializing_if = "Option::is_none") )]
50681	pub opng_dt: Option<DateAndDateTime1Choice>,
50682	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
50683	pub clsg_dt: Option<DateAndDateTime1Choice>,
50684	#[cfg_attr( feature = "derive_serde", serde(rename = "NegInd", skip_serializing_if = "Option::is_none") )]
50685	pub neg_ind: Option<bool>,
50686	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgOrdr", skip_serializing_if = "Option::is_none") )]
50687	pub prcg_ordr: Option<PositionEffect3Code>,
50688	#[cfg_attr( feature = "derive_serde", serde(rename = "Lblty", skip_serializing_if = "Option::is_none") )]
50689	pub lblty: Option<Liability1Choice>,
50690	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrPrfl", skip_serializing_if = "Option::is_none") )]
50691	pub invstr_prfl: Option<Vec<InvestorProfile2>>,
50692	#[cfg_attr( feature = "derive_serde", serde(rename = "FsclYr", skip_serializing_if = "Option::is_none") )]
50693	pub fscl_yr: Option<FiscalYear1Choice>,
50694}
50695
50696impl InvestmentAccount74 {
50697	pub fn validate(&self) -> Result<(), ValidationError> {
50698		if self.id.chars().count() < 1 {
50699			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
50700		}
50701		if self.id.chars().count() > 35 {
50702			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
50703		}
50704		if let Some(ref val) = self.acct_sts { val.validate()? }
50705		if let Some(ref val) = self.blckd_sts { val.validate()? }
50706		if let Some(ref val) = self.sts_dt { val.validate()? }
50707		if let Some(ref val) = self.nm {
50708			if val.chars().count() < 1 {
50709				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
50710			}
50711			if val.chars().count() > 35 {
50712				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 35".to_string()));
50713			}
50714		}
50715		if let Some(ref val) = self.dsgnt {
50716			if val.chars().count() < 1 {
50717				return Err(ValidationError::new(1001, "dsgnt is shorter than the minimum length of 1".to_string()));
50718			}
50719			if val.chars().count() > 35 {
50720				return Err(ValidationError::new(1002, "dsgnt exceeds the maximum length of 35".to_string()));
50721			}
50722		}
50723		if let Some(ref val) = self.tp { val.validate()? }
50724		if let Some(ref val) = self.ownrsh_tp { val.validate()? }
50725		if let Some(ref val) = self.tax_xmptn { val.validate()? }
50726		if let Some(ref val) = self.stmt_frqcy { val.validate()? }
50727		if let Some(ref val) = self.ref_ccy {
50728			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
50729			if !pattern.is_match(val) {
50730				return Err(ValidationError::new(1005, "ref_ccy does not match the required pattern".to_string()));
50731			}
50732		}
50733		if let Some(ref val) = self.incm_pref { val.validate()? }
50734		if let Some(ref vec) = self.rinvstmt_dtls { for item in vec { item.validate()? } }
50735		if let Some(ref val) = self.tax_whldg_mtd { val.validate()? }
50736		if let Some(ref vec) = self.tax_rptg { for item in vec { item.validate()? } }
50737		if let Some(ref val) = self.lttr_intt_dtls { val.validate()? }
50738		if let Some(ref val) = self.acmltn_rght_ref {
50739			if val.chars().count() < 1 {
50740				return Err(ValidationError::new(1001, "acmltn_rght_ref is shorter than the minimum length of 1".to_string()));
50741			}
50742			if val.chars().count() > 35 {
50743				return Err(ValidationError::new(1002, "acmltn_rght_ref exceeds the maximum length of 35".to_string()));
50744			}
50745		}
50746		if let Some(ref val) = self.fnd_fmly_nm {
50747			if val.chars().count() < 1 {
50748				return Err(ValidationError::new(1001, "fnd_fmly_nm is shorter than the minimum length of 1".to_string()));
50749			}
50750			if val.chars().count() > 350 {
50751				return Err(ValidationError::new(1002, "fnd_fmly_nm exceeds the maximum length of 350".to_string()));
50752			}
50753		}
50754		if let Some(ref vec) = self.fin_instrm_dtls { for item in vec { item.validate()? } }
50755		if let Some(ref val) = self.rndg_dtls { val.validate()? }
50756		if let Some(ref val) = self.acct_svcr { val.validate()? }
50757		if let Some(ref val) = self.acct_usg_tp { val.validate()? }
50758		if let Some(ref val) = self.frgn_sts_certfctn { val.validate()? }
50759		if let Some(ref val) = self.acct_sgntr_dt_tm { val.validate()? }
50760		if let Some(ref val) = self.tx_chanl_tp { val.validate()? }
50761		if let Some(ref val) = self.invstmt_acct_ctgy { val.validate()? }
50762		if let Some(ref val) = self.pldgg { val.validate()? }
50763		if let Some(ref val) = self.coll { val.validate()? }
50764		if let Some(ref val) = self.thrd_pty_rghts { val.validate()? }
50765		if let Some(ref val) = self.pwr_of_attny_lvl_of_ctrl { val.validate()? }
50766		if let Some(ref val) = self.acctg_sts { val.validate()? }
50767		if let Some(ref val) = self.opng_dt { val.validate()? }
50768		if let Some(ref val) = self.clsg_dt { val.validate()? }
50769		if let Some(ref val) = self.prcg_ordr { val.validate()? }
50770		if let Some(ref val) = self.lblty { val.validate()? }
50771		if let Some(ref vec) = self.invstr_prfl { for item in vec { item.validate()? } }
50772		if let Some(ref val) = self.fscl_yr { val.validate()? }
50773		Ok(())
50774	}
50775}
50776
50777
50778// InvestmentAccount75 ...
50779#[cfg_attr(feature = "derive_debug", derive(Debug))]
50780#[cfg_attr(feature = "derive_default", derive(Default))]
50781#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50782#[cfg_attr(feature = "derive_clone", derive(Clone))]
50783#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50784pub struct InvestmentAccount75 {
50785	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctStsUpdInstr", skip_serializing_if = "Option::is_none") )]
50786	pub acct_sts_upd_instr: Option<AccountStatusUpdateInstruction1>,
50787	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
50788	pub nm: Option<String>,
50789	#[cfg_attr( feature = "derive_serde", serde(rename = "Dsgnt", skip_serializing_if = "Option::is_none") )]
50790	pub dsgnt: Option<String>,
50791	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
50792	pub tp: Option<AccountType2Choice>,
50793	#[cfg_attr( feature = "derive_serde", serde(rename = "OwnrshTp", skip_serializing_if = "Option::is_none") )]
50794	pub ownrsh_tp: Option<OwnershipType2Choice>,
50795	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxXmptn", skip_serializing_if = "Option::is_none") )]
50796	pub tax_xmptn: Option<TaxExemptionReason2Choice>,
50797	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtFrqcy", skip_serializing_if = "Option::is_none") )]
50798	pub stmt_frqcy: Option<StatementFrequencyReason2Choice>,
50799	#[cfg_attr( feature = "derive_serde", serde(rename = "RefCcy", skip_serializing_if = "Option::is_none") )]
50800	pub ref_ccy: Option<String>,
50801	#[cfg_attr( feature = "derive_serde", serde(rename = "Lang", skip_serializing_if = "Option::is_none") )]
50802	pub lang: Option<String>,
50803	#[cfg_attr( feature = "derive_serde", serde(rename = "IncmPref", skip_serializing_if = "Option::is_none") )]
50804	pub incm_pref: Option<IncomePreference2Code>,
50805	#[cfg_attr( feature = "derive_serde", serde(rename = "RinvstmtDtls", skip_serializing_if = "Option::is_none") )]
50806	pub rinvstmt_dtls: Option<Vec<Reinvestment4>>,
50807	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxWhldgMtd", skip_serializing_if = "Option::is_none") )]
50808	pub tax_whldg_mtd: Option<TaxWithholdingMethod3Code>,
50809	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRptg", skip_serializing_if = "Option::is_none") )]
50810	pub tax_rptg: Option<Vec<TaxReporting3>>,
50811	#[cfg_attr( feature = "derive_serde", serde(rename = "LttrInttDtls", skip_serializing_if = "Option::is_none") )]
50812	pub lttr_intt_dtls: Option<LetterIntent1>,
50813	#[cfg_attr( feature = "derive_serde", serde(rename = "AcmltnRghtRef", skip_serializing_if = "Option::is_none") )]
50814	pub acmltn_rght_ref: Option<String>,
50815	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqrdSgntriesNb", skip_serializing_if = "Option::is_none") )]
50816	pub reqrd_sgntries_nb: Option<f64>,
50817	#[cfg_attr( feature = "derive_serde", serde(rename = "FndFmlyNm", skip_serializing_if = "Option::is_none") )]
50818	pub fnd_fmly_nm: Option<String>,
50819	#[cfg_attr( feature = "derive_serde", serde(rename = "ModfdFinInstrmDtls", skip_serializing_if = "Option::is_none") )]
50820	pub modfd_fin_instrm_dtls: Option<Vec<ModificationScope42>>,
50821	#[cfg_attr( feature = "derive_serde", serde(rename = "RndgDtls", skip_serializing_if = "Option::is_none") )]
50822	pub rndg_dtls: Option<RoundingParameters1>,
50823	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
50824	pub acct_svcr: Option<PartyIdentification125Choice>,
50825	#[cfg_attr( feature = "derive_serde", serde(rename = "BlckdSts", skip_serializing_if = "Option::is_none") )]
50826	pub blckd_sts: Option<BlockedStatusReason2Choice>,
50827	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctUsgTp", skip_serializing_if = "Option::is_none") )]
50828	pub acct_usg_tp: Option<AccountUsageType2Choice>,
50829	#[cfg_attr( feature = "derive_serde", serde(rename = "FrgnStsCertfctn", skip_serializing_if = "Option::is_none") )]
50830	pub frgn_sts_certfctn: Option<Provided1Code>,
50831	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSgntrDtTm", skip_serializing_if = "Option::is_none") )]
50832	pub acct_sgntr_dt_tm: Option<DateAndDateTime1Choice>,
50833	#[cfg_attr( feature = "derive_serde", serde(rename = "TxChanlTp", skip_serializing_if = "Option::is_none") )]
50834	pub tx_chanl_tp: Option<TransactionChannelType1Choice>,
50835	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtAcctCtgy", skip_serializing_if = "Option::is_none") )]
50836	pub invstmt_acct_ctgy: Option<InvestmentAccountCategory1Choice>,
50837	#[cfg_attr( feature = "derive_serde", serde(rename = "Pldgg", skip_serializing_if = "Option::is_none") )]
50838	pub pldgg: Option<Eligible1Code>,
50839	#[cfg_attr( feature = "derive_serde", serde(rename = "Coll", skip_serializing_if = "Option::is_none") )]
50840	pub coll: Option<Collateral1Code>,
50841	#[cfg_attr( feature = "derive_serde", serde(rename = "ThrdPtyRghts", skip_serializing_if = "Option::is_none") )]
50842	pub thrd_pty_rghts: Option<ThirdPartyRights2>,
50843	#[cfg_attr( feature = "derive_serde", serde(rename = "PwrOfAttnyLvlOfCtrl", skip_serializing_if = "Option::is_none") )]
50844	pub pwr_of_attny_lvl_of_ctrl: Option<LevelOfControl1Choice>,
50845	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctgSts", skip_serializing_if = "Option::is_none") )]
50846	pub acctg_sts: Option<AccountingStatus1Choice>,
50847	#[cfg_attr( feature = "derive_serde", serde(rename = "OpngDt", skip_serializing_if = "Option::is_none") )]
50848	pub opng_dt: Option<DateAndDateTime1Choice>,
50849	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
50850	pub clsg_dt: Option<DateAndDateTime1Choice>,
50851	#[cfg_attr( feature = "derive_serde", serde(rename = "NegInd", skip_serializing_if = "Option::is_none") )]
50852	pub neg_ind: Option<bool>,
50853	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgOrdr", skip_serializing_if = "Option::is_none") )]
50854	pub prcg_ordr: Option<PositionEffect3Code>,
50855	#[cfg_attr( feature = "derive_serde", serde(rename = "Lblty", skip_serializing_if = "Option::is_none") )]
50856	pub lblty: Option<Liability1Choice>,
50857	#[cfg_attr( feature = "derive_serde", serde(rename = "ModfdInvstrPrfl", skip_serializing_if = "Option::is_none") )]
50858	pub modfd_invstr_prfl: Option<Vec<ModificationScope46>>,
50859	#[cfg_attr( feature = "derive_serde", serde(rename = "FsclYr", skip_serializing_if = "Option::is_none") )]
50860	pub fscl_yr: Option<FiscalYear1Choice>,
50861}
50862
50863impl InvestmentAccount75 {
50864	pub fn validate(&self) -> Result<(), ValidationError> {
50865		if let Some(ref val) = self.acct_sts_upd_instr { val.validate()? }
50866		if let Some(ref val) = self.nm {
50867			if val.chars().count() < 1 {
50868				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
50869			}
50870			if val.chars().count() > 35 {
50871				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 35".to_string()));
50872			}
50873		}
50874		if let Some(ref val) = self.dsgnt {
50875			if val.chars().count() < 1 {
50876				return Err(ValidationError::new(1001, "dsgnt is shorter than the minimum length of 1".to_string()));
50877			}
50878			if val.chars().count() > 35 {
50879				return Err(ValidationError::new(1002, "dsgnt exceeds the maximum length of 35".to_string()));
50880			}
50881		}
50882		if let Some(ref val) = self.tp { val.validate()? }
50883		if let Some(ref val) = self.ownrsh_tp { val.validate()? }
50884		if let Some(ref val) = self.tax_xmptn { val.validate()? }
50885		if let Some(ref val) = self.stmt_frqcy { val.validate()? }
50886		if let Some(ref val) = self.ref_ccy {
50887			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
50888			if !pattern.is_match(val) {
50889				return Err(ValidationError::new(1005, "ref_ccy does not match the required pattern".to_string()));
50890			}
50891		}
50892		if let Some(ref val) = self.incm_pref { val.validate()? }
50893		if let Some(ref vec) = self.rinvstmt_dtls { for item in vec { item.validate()? } }
50894		if let Some(ref val) = self.tax_whldg_mtd { val.validate()? }
50895		if let Some(ref vec) = self.tax_rptg { for item in vec { item.validate()? } }
50896		if let Some(ref val) = self.lttr_intt_dtls { val.validate()? }
50897		if let Some(ref val) = self.acmltn_rght_ref {
50898			if val.chars().count() < 1 {
50899				return Err(ValidationError::new(1001, "acmltn_rght_ref is shorter than the minimum length of 1".to_string()));
50900			}
50901			if val.chars().count() > 35 {
50902				return Err(ValidationError::new(1002, "acmltn_rght_ref exceeds the maximum length of 35".to_string()));
50903			}
50904		}
50905		if let Some(ref val) = self.fnd_fmly_nm {
50906			if val.chars().count() < 1 {
50907				return Err(ValidationError::new(1001, "fnd_fmly_nm is shorter than the minimum length of 1".to_string()));
50908			}
50909			if val.chars().count() > 350 {
50910				return Err(ValidationError::new(1002, "fnd_fmly_nm exceeds the maximum length of 350".to_string()));
50911			}
50912		}
50913		if let Some(ref vec) = self.modfd_fin_instrm_dtls { for item in vec { item.validate()? } }
50914		if let Some(ref val) = self.rndg_dtls { val.validate()? }
50915		if let Some(ref val) = self.acct_svcr { val.validate()? }
50916		if let Some(ref val) = self.blckd_sts { val.validate()? }
50917		if let Some(ref val) = self.acct_usg_tp { val.validate()? }
50918		if let Some(ref val) = self.frgn_sts_certfctn { val.validate()? }
50919		if let Some(ref val) = self.acct_sgntr_dt_tm { val.validate()? }
50920		if let Some(ref val) = self.tx_chanl_tp { val.validate()? }
50921		if let Some(ref val) = self.invstmt_acct_ctgy { val.validate()? }
50922		if let Some(ref val) = self.pldgg { val.validate()? }
50923		if let Some(ref val) = self.coll { val.validate()? }
50924		if let Some(ref val) = self.thrd_pty_rghts { val.validate()? }
50925		if let Some(ref val) = self.pwr_of_attny_lvl_of_ctrl { val.validate()? }
50926		if let Some(ref val) = self.acctg_sts { val.validate()? }
50927		if let Some(ref val) = self.opng_dt { val.validate()? }
50928		if let Some(ref val) = self.clsg_dt { val.validate()? }
50929		if let Some(ref val) = self.prcg_ordr { val.validate()? }
50930		if let Some(ref val) = self.lblty { val.validate()? }
50931		if let Some(ref vec) = self.modfd_invstr_prfl { for item in vec { item.validate()? } }
50932		if let Some(ref val) = self.fscl_yr { val.validate()? }
50933		Ok(())
50934	}
50935}
50936
50937
50938// InvestmentAccount76 ...
50939#[cfg_attr(feature = "derive_debug", derive(Debug))]
50940#[cfg_attr(feature = "derive_default", derive(Default))]
50941#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
50942#[cfg_attr(feature = "derive_clone", derive(Clone))]
50943#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
50944pub struct InvestmentAccount76 {
50945	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
50946	pub nm: Option<String>,
50947	#[cfg_attr( feature = "derive_serde", serde(rename = "Dsgnt", skip_serializing_if = "Option::is_none") )]
50948	pub dsgnt: Option<String>,
50949	#[cfg_attr( feature = "derive_serde", serde(rename = "FndTp", skip_serializing_if = "Option::is_none") )]
50950	pub fnd_tp: Option<String>,
50951	#[cfg_attr( feature = "derive_serde", serde(rename = "FndFmlyNm", skip_serializing_if = "Option::is_none") )]
50952	pub fnd_fmly_nm: Option<String>,
50953	#[cfg_attr( feature = "derive_serde", serde(rename = "SctyDtls", skip_serializing_if = "Option::is_none") )]
50954	pub scty_dtls: Option<FinancialInstrument55>,
50955	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
50956	pub acct_ownr: Option<AccountOwner3Choice>,
50957	#[cfg_attr( feature = "derive_serde", serde(rename = "Intrmy", skip_serializing_if = "Option::is_none") )]
50958	pub intrmy: Option<Vec<Intermediary47>>,
50959	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
50960	pub acct_svcr: Option<PartyIdentification125Choice>,
50961}
50962
50963impl InvestmentAccount76 {
50964	pub fn validate(&self) -> Result<(), ValidationError> {
50965		if let Some(ref val) = self.nm {
50966			if val.chars().count() < 1 {
50967				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
50968			}
50969			if val.chars().count() > 35 {
50970				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 35".to_string()));
50971			}
50972		}
50973		if let Some(ref val) = self.dsgnt {
50974			if val.chars().count() < 1 {
50975				return Err(ValidationError::new(1001, "dsgnt is shorter than the minimum length of 1".to_string()));
50976			}
50977			if val.chars().count() > 35 {
50978				return Err(ValidationError::new(1002, "dsgnt exceeds the maximum length of 35".to_string()));
50979			}
50980		}
50981		if let Some(ref val) = self.fnd_tp {
50982			if val.chars().count() < 1 {
50983				return Err(ValidationError::new(1001, "fnd_tp is shorter than the minimum length of 1".to_string()));
50984			}
50985			if val.chars().count() > 35 {
50986				return Err(ValidationError::new(1002, "fnd_tp exceeds the maximum length of 35".to_string()));
50987			}
50988		}
50989		if let Some(ref val) = self.fnd_fmly_nm {
50990			if val.chars().count() < 1 {
50991				return Err(ValidationError::new(1001, "fnd_fmly_nm is shorter than the minimum length of 1".to_string()));
50992			}
50993			if val.chars().count() > 350 {
50994				return Err(ValidationError::new(1002, "fnd_fmly_nm exceeds the maximum length of 350".to_string()));
50995			}
50996		}
50997		if let Some(ref val) = self.scty_dtls { val.validate()? }
50998		if let Some(ref val) = self.acct_ownr { val.validate()? }
50999		if let Some(ref vec) = self.intrmy { for item in vec { item.validate()? } }
51000		if let Some(ref val) = self.acct_svcr { val.validate()? }
51001		Ok(())
51002	}
51003}
51004
51005
51006// InvestmentAccount77 ...
51007#[cfg_attr(feature = "derive_debug", derive(Debug))]
51008#[cfg_attr(feature = "derive_default", derive(Default))]
51009#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51010#[cfg_attr(feature = "derive_clone", derive(Clone))]
51011#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51012pub struct InvestmentAccount77 {
51013	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId") )]
51014	pub acct_id: String,
51015	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctNm", skip_serializing_if = "Option::is_none") )]
51016	pub acct_nm: Option<String>,
51017	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctDsgnt", skip_serializing_if = "Option::is_none") )]
51018	pub acct_dsgnt: Option<String>,
51019	#[cfg_attr( feature = "derive_serde", serde(rename = "OwnrId", skip_serializing_if = "Option::is_none") )]
51020	pub ownr_id: Option<OwnerIdentification3Choice>,
51021	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
51022	pub acct_svcr: Option<PartyIdentification125Choice>,
51023}
51024
51025impl InvestmentAccount77 {
51026	pub fn validate(&self) -> Result<(), ValidationError> {
51027		if self.acct_id.chars().count() < 1 {
51028			return Err(ValidationError::new(1001, "acct_id is shorter than the minimum length of 1".to_string()));
51029		}
51030		if self.acct_id.chars().count() > 35 {
51031			return Err(ValidationError::new(1002, "acct_id exceeds the maximum length of 35".to_string()));
51032		}
51033		if let Some(ref val) = self.acct_nm {
51034			if val.chars().count() < 1 {
51035				return Err(ValidationError::new(1001, "acct_nm is shorter than the minimum length of 1".to_string()));
51036			}
51037			if val.chars().count() > 35 {
51038				return Err(ValidationError::new(1002, "acct_nm exceeds the maximum length of 35".to_string()));
51039			}
51040		}
51041		if let Some(ref val) = self.acct_dsgnt {
51042			if val.chars().count() < 1 {
51043				return Err(ValidationError::new(1001, "acct_dsgnt is shorter than the minimum length of 1".to_string()));
51044			}
51045			if val.chars().count() > 35 {
51046				return Err(ValidationError::new(1002, "acct_dsgnt exceeds the maximum length of 35".to_string()));
51047			}
51048		}
51049		if let Some(ref val) = self.ownr_id { val.validate()? }
51050		if let Some(ref val) = self.acct_svcr { val.validate()? }
51051		Ok(())
51052	}
51053}
51054
51055
51056// InvestmentAccountCategory1Choice ...
51057#[cfg_attr(feature = "derive_debug", derive(Debug))]
51058#[cfg_attr(feature = "derive_default", derive(Default))]
51059#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51060#[cfg_attr(feature = "derive_clone", derive(Clone))]
51061#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51062pub struct InvestmentAccountCategory1Choice {
51063	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
51064	pub cd: Option<InvestmentAccountCategory1Code>,
51065	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
51066	pub prtry: Option<GenericIdentification47>,
51067}
51068
51069impl InvestmentAccountCategory1Choice {
51070	pub fn validate(&self) -> Result<(), ValidationError> {
51071		if let Some(ref val) = self.cd { val.validate()? }
51072		if let Some(ref val) = self.prtry { val.validate()? }
51073		Ok(())
51074	}
51075}
51076
51077
51078// InvestmentAccountCategory1Code ...
51079#[cfg_attr(feature = "derive_debug", derive(Debug))]
51080#[cfg_attr(feature = "derive_default", derive(Default))]
51081#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51082#[cfg_attr(feature = "derive_clone", derive(Clone))]
51083#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51084pub enum InvestmentAccountCategory1Code {
51085	#[cfg_attr(feature = "derive_default", default)]
51086	#[cfg_attr( feature = "derive_serde", serde(rename = "MAND") )]
51087	CodeMAND,
51088	#[cfg_attr( feature = "derive_serde", serde(rename = "RETA") )]
51089	CodeRETA,
51090}
51091
51092impl InvestmentAccountCategory1Code {
51093	pub fn validate(&self) -> Result<(), ValidationError> {
51094		Ok(())
51095	}
51096}
51097
51098
51099// InvestmentAccountModification4 ...
51100#[cfg_attr(feature = "derive_debug", derive(Debug))]
51101#[cfg_attr(feature = "derive_default", derive(Default))]
51102#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51103#[cfg_attr(feature = "derive_clone", derive(Clone))]
51104#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51105pub struct InvestmentAccountModification4 {
51106	#[cfg_attr( feature = "derive_serde", serde(rename = "ModRsn", skip_serializing_if = "Option::is_none") )]
51107	pub mod_rsn: Option<String>,
51108	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctApplId", skip_serializing_if = "Option::is_none") )]
51109	pub acct_appl_id: Option<String>,
51110	#[cfg_attr( feature = "derive_serde", serde(rename = "ClntRef", skip_serializing_if = "Option::is_none") )]
51111	pub clnt_ref: Option<String>,
51112	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyRef", skip_serializing_if = "Option::is_none") )]
51113	pub ctr_pty_ref: Option<AdditionalReference13>,
51114	#[cfg_attr( feature = "derive_serde", serde(rename = "ExstgAcctId", skip_serializing_if = "Option::is_none") )]
51115	pub exstg_acct_id: Option<Vec<Account23>>,
51116}
51117
51118impl InvestmentAccountModification4 {
51119	pub fn validate(&self) -> Result<(), ValidationError> {
51120		if let Some(ref val) = self.mod_rsn {
51121			if val.chars().count() < 1 {
51122				return Err(ValidationError::new(1001, "mod_rsn is shorter than the minimum length of 1".to_string()));
51123			}
51124			if val.chars().count() > 350 {
51125				return Err(ValidationError::new(1002, "mod_rsn exceeds the maximum length of 350".to_string()));
51126			}
51127		}
51128		if let Some(ref val) = self.acct_appl_id {
51129			if val.chars().count() < 1 {
51130				return Err(ValidationError::new(1001, "acct_appl_id is shorter than the minimum length of 1".to_string()));
51131			}
51132			if val.chars().count() > 35 {
51133				return Err(ValidationError::new(1002, "acct_appl_id exceeds the maximum length of 35".to_string()));
51134			}
51135		}
51136		if let Some(ref val) = self.clnt_ref {
51137			if val.chars().count() < 1 {
51138				return Err(ValidationError::new(1001, "clnt_ref is shorter than the minimum length of 1".to_string()));
51139			}
51140			if val.chars().count() > 35 {
51141				return Err(ValidationError::new(1002, "clnt_ref exceeds the maximum length of 35".to_string()));
51142			}
51143		}
51144		if let Some(ref val) = self.ctr_pty_ref { val.validate()? }
51145		if let Some(ref vec) = self.exstg_acct_id { for item in vec { item.validate()? } }
51146		Ok(())
51147	}
51148}
51149
51150
51151// InvestmentAccountOpening4 ...
51152#[cfg_attr(feature = "derive_debug", derive(Debug))]
51153#[cfg_attr(feature = "derive_default", derive(Default))]
51154#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51155#[cfg_attr(feature = "derive_clone", derive(Clone))]
51156#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51157pub struct InvestmentAccountOpening4 {
51158	#[cfg_attr( feature = "derive_serde", serde(rename = "OpngTp") )]
51159	pub opng_tp: AccountOpeningType1Choice,
51160	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctApplId", skip_serializing_if = "Option::is_none") )]
51161	pub acct_appl_id: Option<String>,
51162	#[cfg_attr( feature = "derive_serde", serde(rename = "ClntRef", skip_serializing_if = "Option::is_none") )]
51163	pub clnt_ref: Option<String>,
51164	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyRef", skip_serializing_if = "Option::is_none") )]
51165	pub ctr_pty_ref: Option<AdditionalReference13>,
51166	#[cfg_attr( feature = "derive_serde", serde(rename = "ExstgAcctId", skip_serializing_if = "Option::is_none") )]
51167	pub exstg_acct_id: Option<Vec<Account23>>,
51168}
51169
51170impl InvestmentAccountOpening4 {
51171	pub fn validate(&self) -> Result<(), ValidationError> {
51172		self.opng_tp.validate()?;
51173		if let Some(ref val) = self.acct_appl_id {
51174			if val.chars().count() < 1 {
51175				return Err(ValidationError::new(1001, "acct_appl_id is shorter than the minimum length of 1".to_string()));
51176			}
51177			if val.chars().count() > 35 {
51178				return Err(ValidationError::new(1002, "acct_appl_id exceeds the maximum length of 35".to_string()));
51179			}
51180		}
51181		if let Some(ref val) = self.clnt_ref {
51182			if val.chars().count() < 1 {
51183				return Err(ValidationError::new(1001, "clnt_ref is shorter than the minimum length of 1".to_string()));
51184			}
51185			if val.chars().count() > 35 {
51186				return Err(ValidationError::new(1002, "clnt_ref exceeds the maximum length of 35".to_string()));
51187			}
51188		}
51189		if let Some(ref val) = self.ctr_pty_ref { val.validate()? }
51190		if let Some(ref vec) = self.exstg_acct_id { for item in vec { item.validate()? } }
51191		Ok(())
51192	}
51193}
51194
51195
51196// InvestmentAccountOwnershipInformation16 ...
51197#[cfg_attr(feature = "derive_debug", derive(Debug))]
51198#[cfg_attr(feature = "derive_default", derive(Default))]
51199#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51200#[cfg_attr(feature = "derive_clone", derive(Clone))]
51201#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51202pub struct InvestmentAccountOwnershipInformation16 {
51203	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty") )]
51204	pub pty: Party47Choice,
51205	#[cfg_attr( feature = "derive_serde", serde(rename = "MnyLndrgChck", skip_serializing_if = "Option::is_none") )]
51206	pub mny_lndrg_chck: Option<MoneyLaunderingCheck1Choice>,
51207	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrPrflVldtn", skip_serializing_if = "Option::is_none") )]
51208	pub invstr_prfl_vldtn: Option<Vec<PartyProfileInformation5>>,
51209	#[cfg_attr( feature = "derive_serde", serde(rename = "OwnrshBnfcryRate", skip_serializing_if = "Option::is_none") )]
51210	pub ownrsh_bnfcry_rate: Option<OwnershipBeneficiaryRate1>,
51211	#[cfg_attr( feature = "derive_serde", serde(rename = "ClntId", skip_serializing_if = "Option::is_none") )]
51212	pub clnt_id: Option<String>,
51213	#[cfg_attr( feature = "derive_serde", serde(rename = "FsclXmptn", skip_serializing_if = "Option::is_none") )]
51214	pub fscl_xmptn: Option<bool>,
51215	#[cfg_attr( feature = "derive_serde", serde(rename = "SgntryRghtInd", skip_serializing_if = "Option::is_none") )]
51216	pub sgntry_rght_ind: Option<bool>,
51217	#[cfg_attr( feature = "derive_serde", serde(rename = "MiFIDClssfctn", skip_serializing_if = "Option::is_none") )]
51218	pub mi_fid_clssfctn: Option<MiFIDClassification1>,
51219	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntfctn", skip_serializing_if = "Option::is_none") )]
51220	pub ntfctn: Option<Vec<Notification2>>,
51221	#[cfg_attr( feature = "derive_serde", serde(rename = "FATCAFormTp", skip_serializing_if = "Option::is_none") )]
51222	pub fatca_form_tp: Option<Vec<FATCAForm1Choice>>,
51223	#[cfg_attr( feature = "derive_serde", serde(rename = "FATCASts", skip_serializing_if = "Option::is_none") )]
51224	pub fatca_sts: Option<Vec<FATCAStatus2>>,
51225	#[cfg_attr( feature = "derive_serde", serde(rename = "FATCARptgDt", skip_serializing_if = "Option::is_none") )]
51226	pub fatca_rptg_dt: Option<String>,
51227	#[cfg_attr( feature = "derive_serde", serde(rename = "CRSFormTp", skip_serializing_if = "Option::is_none") )]
51228	pub crs_form_tp: Option<Vec<CRSForm1Choice>>,
51229	#[cfg_attr( feature = "derive_serde", serde(rename = "CRSSts", skip_serializing_if = "Option::is_none") )]
51230	pub crs_sts: Option<Vec<CRSStatus4>>,
51231	#[cfg_attr( feature = "derive_serde", serde(rename = "CRSRptgDt", skip_serializing_if = "Option::is_none") )]
51232	pub crs_rptg_dt: Option<String>,
51233	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrId", skip_serializing_if = "Option::is_none") )]
51234	pub othr_id: Option<Vec<GenericIdentification82>>,
51235	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxXmptn", skip_serializing_if = "Option::is_none") )]
51236	pub tax_xmptn: Option<TaxExemptionReason2Choice>,
51237	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRptg", skip_serializing_if = "Option::is_none") )]
51238	pub tax_rptg: Option<Vec<TaxReporting3>>,
51239	#[cfg_attr( feature = "derive_serde", serde(rename = "Lang", skip_serializing_if = "Option::is_none") )]
51240	pub lang: Option<String>,
51241	#[cfg_attr( feature = "derive_serde", serde(rename = "MailTp", skip_serializing_if = "Option::is_none") )]
51242	pub mail_tp: Option<MailType1Choice>,
51243	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryAndResdtlSts", skip_serializing_if = "Option::is_none") )]
51244	pub ctry_and_resdtl_sts: Option<CountryAndResidentialStatusType2>,
51245	#[cfg_attr( feature = "derive_serde", serde(rename = "MntryWlth", skip_serializing_if = "Option::is_none") )]
51246	pub mntry_wlth: Option<DateAndAmount1>,
51247	#[cfg_attr( feature = "derive_serde", serde(rename = "EqtyVal", skip_serializing_if = "Option::is_none") )]
51248	pub eqty_val: Option<DateAndAmount1>,
51249	#[cfg_attr( feature = "derive_serde", serde(rename = "WorkgCptl", skip_serializing_if = "Option::is_none") )]
51250	pub workg_cptl: Option<DateAndAmount1>,
51251	#[cfg_attr( feature = "derive_serde", serde(rename = "CpnyLk", skip_serializing_if = "Option::is_none") )]
51252	pub cpny_lk: Option<CompanyLink1Choice>,
51253	#[cfg_attr( feature = "derive_serde", serde(rename = "ElctrncMlngSvcRef", skip_serializing_if = "Option::is_none") )]
51254	pub elctrnc_mlng_svc_ref: Option<String>,
51255	#[cfg_attr( feature = "derive_serde", serde(rename = "PmryComAdr", skip_serializing_if = "Option::is_none") )]
51256	pub pmry_com_adr: Option<Vec<CommunicationAddress6>>,
51257	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndryComAdr", skip_serializing_if = "Option::is_none") )]
51258	pub scndry_com_adr: Option<Vec<CommunicationAddress6>>,
51259	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRgltryInf", skip_serializing_if = "Option::is_none") )]
51260	pub addtl_rgltry_inf: Option<RegulatoryInformation1>,
51261	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctgSts", skip_serializing_if = "Option::is_none") )]
51262	pub acctg_sts: Option<AccountingStatus1Choice>,
51263	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
51264	pub addtl_inf: Option<Vec<AdditiononalInformation13>>,
51265	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlgPty", skip_serializing_if = "Option::is_none") )]
51266	pub ctrlg_pty: Option<bool>,
51267}
51268
51269impl InvestmentAccountOwnershipInformation16 {
51270	pub fn validate(&self) -> Result<(), ValidationError> {
51271		self.pty.validate()?;
51272		if let Some(ref val) = self.mny_lndrg_chck { val.validate()? }
51273		if let Some(ref vec) = self.invstr_prfl_vldtn { for item in vec { item.validate()? } }
51274		if let Some(ref val) = self.ownrsh_bnfcry_rate { val.validate()? }
51275		if let Some(ref val) = self.clnt_id {
51276			if val.chars().count() < 1 {
51277				return Err(ValidationError::new(1001, "clnt_id is shorter than the minimum length of 1".to_string()));
51278			}
51279			if val.chars().count() > 35 {
51280				return Err(ValidationError::new(1002, "clnt_id exceeds the maximum length of 35".to_string()));
51281			}
51282		}
51283		if let Some(ref val) = self.mi_fid_clssfctn { val.validate()? }
51284		if let Some(ref vec) = self.ntfctn { for item in vec { item.validate()? } }
51285		if let Some(ref vec) = self.fatca_form_tp { for item in vec { item.validate()? } }
51286		if let Some(ref vec) = self.fatca_sts { for item in vec { item.validate()? } }
51287		if let Some(ref vec) = self.crs_form_tp { for item in vec { item.validate()? } }
51288		if let Some(ref vec) = self.crs_sts { for item in vec { item.validate()? } }
51289		if let Some(ref vec) = self.othr_id { for item in vec { item.validate()? } }
51290		if let Some(ref val) = self.tax_xmptn { val.validate()? }
51291		if let Some(ref vec) = self.tax_rptg { for item in vec { item.validate()? } }
51292		if let Some(ref val) = self.mail_tp { val.validate()? }
51293		if let Some(ref val) = self.ctry_and_resdtl_sts { val.validate()? }
51294		if let Some(ref val) = self.mntry_wlth { val.validate()? }
51295		if let Some(ref val) = self.eqty_val { val.validate()? }
51296		if let Some(ref val) = self.workg_cptl { val.validate()? }
51297		if let Some(ref val) = self.cpny_lk { val.validate()? }
51298		if let Some(ref val) = self.elctrnc_mlng_svc_ref {
51299			if val.chars().count() < 1 {
51300				return Err(ValidationError::new(1001, "elctrnc_mlng_svc_ref is shorter than the minimum length of 1".to_string()));
51301			}
51302			if val.chars().count() > 350 {
51303				return Err(ValidationError::new(1002, "elctrnc_mlng_svc_ref exceeds the maximum length of 350".to_string()));
51304			}
51305		}
51306		if let Some(ref vec) = self.pmry_com_adr { for item in vec { item.validate()? } }
51307		if let Some(ref vec) = self.scndry_com_adr { for item in vec { item.validate()? } }
51308		if let Some(ref val) = self.addtl_rgltry_inf { val.validate()? }
51309		if let Some(ref val) = self.acctg_sts { val.validate()? }
51310		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
51311		Ok(())
51312	}
51313}
51314
51315
51316// InvestmentAccountOwnershipInformation17 ...
51317#[cfg_attr(feature = "derive_debug", derive(Debug))]
51318#[cfg_attr(feature = "derive_default", derive(Default))]
51319#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51320#[cfg_attr(feature = "derive_clone", derive(Clone))]
51321#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51322pub struct InvestmentAccountOwnershipInformation17 {
51323	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty") )]
51324	pub pty: Party48Choice,
51325	#[cfg_attr( feature = "derive_serde", serde(rename = "MnyLndrgChck", skip_serializing_if = "Option::is_none") )]
51326	pub mny_lndrg_chck: Option<MoneyLaunderingCheck1Choice>,
51327	#[cfg_attr( feature = "derive_serde", serde(rename = "ModfdInvstrPrflVldtn", skip_serializing_if = "Option::is_none") )]
51328	pub modfd_invstr_prfl_vldtn: Option<Vec<ModificationScope27>>,
51329	#[cfg_attr( feature = "derive_serde", serde(rename = "OwnrshBnfcryRate", skip_serializing_if = "Option::is_none") )]
51330	pub ownrsh_bnfcry_rate: Option<OwnershipBeneficiaryRate1>,
51331	#[cfg_attr( feature = "derive_serde", serde(rename = "ClntId", skip_serializing_if = "Option::is_none") )]
51332	pub clnt_id: Option<String>,
51333	#[cfg_attr( feature = "derive_serde", serde(rename = "FsclXmptn", skip_serializing_if = "Option::is_none") )]
51334	pub fscl_xmptn: Option<bool>,
51335	#[cfg_attr( feature = "derive_serde", serde(rename = "SgntryRghtInd", skip_serializing_if = "Option::is_none") )]
51336	pub sgntry_rght_ind: Option<bool>,
51337	#[cfg_attr( feature = "derive_serde", serde(rename = "MiFIDClssfctn", skip_serializing_if = "Option::is_none") )]
51338	pub mi_fid_clssfctn: Option<MiFIDClassification1>,
51339	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntfctn", skip_serializing_if = "Option::is_none") )]
51340	pub ntfctn: Option<Vec<Notification2>>,
51341	#[cfg_attr( feature = "derive_serde", serde(rename = "FATCAFormTp", skip_serializing_if = "Option::is_none") )]
51342	pub fatca_form_tp: Option<Vec<FATCAForm1Choice>>,
51343	#[cfg_attr( feature = "derive_serde", serde(rename = "FATCASts", skip_serializing_if = "Option::is_none") )]
51344	pub fatca_sts: Option<Vec<FATCAStatus2>>,
51345	#[cfg_attr( feature = "derive_serde", serde(rename = "FATCARptgDt", skip_serializing_if = "Option::is_none") )]
51346	pub fatca_rptg_dt: Option<String>,
51347	#[cfg_attr( feature = "derive_serde", serde(rename = "CRSFormTp", skip_serializing_if = "Option::is_none") )]
51348	pub crs_form_tp: Option<Vec<CRSForm1Choice>>,
51349	#[cfg_attr( feature = "derive_serde", serde(rename = "CRSSts", skip_serializing_if = "Option::is_none") )]
51350	pub crs_sts: Option<Vec<CRSStatus4>>,
51351	#[cfg_attr( feature = "derive_serde", serde(rename = "CRSRptgDt", skip_serializing_if = "Option::is_none") )]
51352	pub crs_rptg_dt: Option<String>,
51353	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrId", skip_serializing_if = "Option::is_none") )]
51354	pub othr_id: Option<Vec<GenericIdentification82>>,
51355	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxXmptn", skip_serializing_if = "Option::is_none") )]
51356	pub tax_xmptn: Option<TaxExemptionReason2Choice>,
51357	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRptg", skip_serializing_if = "Option::is_none") )]
51358	pub tax_rptg: Option<Vec<TaxReporting3>>,
51359	#[cfg_attr( feature = "derive_serde", serde(rename = "Lang", skip_serializing_if = "Option::is_none") )]
51360	pub lang: Option<String>,
51361	#[cfg_attr( feature = "derive_serde", serde(rename = "MailTp", skip_serializing_if = "Option::is_none") )]
51362	pub mail_tp: Option<MailType1Choice>,
51363	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryAndResdtlSts", skip_serializing_if = "Option::is_none") )]
51364	pub ctry_and_resdtl_sts: Option<CountryAndResidentialStatusType2>,
51365	#[cfg_attr( feature = "derive_serde", serde(rename = "MntryWlth", skip_serializing_if = "Option::is_none") )]
51366	pub mntry_wlth: Option<DateAndAmount1>,
51367	#[cfg_attr( feature = "derive_serde", serde(rename = "EqtyVal", skip_serializing_if = "Option::is_none") )]
51368	pub eqty_val: Option<DateAndAmount1>,
51369	#[cfg_attr( feature = "derive_serde", serde(rename = "WorkgCptl", skip_serializing_if = "Option::is_none") )]
51370	pub workg_cptl: Option<DateAndAmount1>,
51371	#[cfg_attr( feature = "derive_serde", serde(rename = "CpnyLk", skip_serializing_if = "Option::is_none") )]
51372	pub cpny_lk: Option<CompanyLink1Choice>,
51373	#[cfg_attr( feature = "derive_serde", serde(rename = "ElctrncMlngSvcRef", skip_serializing_if = "Option::is_none") )]
51374	pub elctrnc_mlng_svc_ref: Option<String>,
51375	#[cfg_attr( feature = "derive_serde", serde(rename = "PmryComAdr", skip_serializing_if = "Option::is_none") )]
51376	pub pmry_com_adr: Option<Vec<CommunicationAddress6>>,
51377	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndryComAdr", skip_serializing_if = "Option::is_none") )]
51378	pub scndry_com_adr: Option<Vec<CommunicationAddress6>>,
51379	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRgltryInf", skip_serializing_if = "Option::is_none") )]
51380	pub addtl_rgltry_inf: Option<RegulatoryInformation1>,
51381	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctgSts", skip_serializing_if = "Option::is_none") )]
51382	pub acctg_sts: Option<AccountingStatus1Choice>,
51383	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
51384	pub addtl_inf: Option<Vec<AdditiononalInformation13>>,
51385	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlgPty", skip_serializing_if = "Option::is_none") )]
51386	pub ctrlg_pty: Option<bool>,
51387}
51388
51389impl InvestmentAccountOwnershipInformation17 {
51390	pub fn validate(&self) -> Result<(), ValidationError> {
51391		self.pty.validate()?;
51392		if let Some(ref val) = self.mny_lndrg_chck { val.validate()? }
51393		if let Some(ref vec) = self.modfd_invstr_prfl_vldtn { for item in vec { item.validate()? } }
51394		if let Some(ref val) = self.ownrsh_bnfcry_rate { val.validate()? }
51395		if let Some(ref val) = self.clnt_id {
51396			if val.chars().count() < 1 {
51397				return Err(ValidationError::new(1001, "clnt_id is shorter than the minimum length of 1".to_string()));
51398			}
51399			if val.chars().count() > 35 {
51400				return Err(ValidationError::new(1002, "clnt_id exceeds the maximum length of 35".to_string()));
51401			}
51402		}
51403		if let Some(ref val) = self.mi_fid_clssfctn { val.validate()? }
51404		if let Some(ref vec) = self.ntfctn { for item in vec { item.validate()? } }
51405		if let Some(ref vec) = self.fatca_form_tp { for item in vec { item.validate()? } }
51406		if let Some(ref vec) = self.fatca_sts { for item in vec { item.validate()? } }
51407		if let Some(ref vec) = self.crs_form_tp { for item in vec { item.validate()? } }
51408		if let Some(ref vec) = self.crs_sts { for item in vec { item.validate()? } }
51409		if let Some(ref vec) = self.othr_id { for item in vec { item.validate()? } }
51410		if let Some(ref val) = self.tax_xmptn { val.validate()? }
51411		if let Some(ref vec) = self.tax_rptg { for item in vec { item.validate()? } }
51412		if let Some(ref val) = self.mail_tp { val.validate()? }
51413		if let Some(ref val) = self.ctry_and_resdtl_sts { val.validate()? }
51414		if let Some(ref val) = self.mntry_wlth { val.validate()? }
51415		if let Some(ref val) = self.eqty_val { val.validate()? }
51416		if let Some(ref val) = self.workg_cptl { val.validate()? }
51417		if let Some(ref val) = self.cpny_lk { val.validate()? }
51418		if let Some(ref val) = self.elctrnc_mlng_svc_ref {
51419			if val.chars().count() < 1 {
51420				return Err(ValidationError::new(1001, "elctrnc_mlng_svc_ref is shorter than the minimum length of 1".to_string()));
51421			}
51422			if val.chars().count() > 350 {
51423				return Err(ValidationError::new(1002, "elctrnc_mlng_svc_ref exceeds the maximum length of 350".to_string()));
51424			}
51425		}
51426		if let Some(ref vec) = self.pmry_com_adr { for item in vec { item.validate()? } }
51427		if let Some(ref vec) = self.scndry_com_adr { for item in vec { item.validate()? } }
51428		if let Some(ref val) = self.addtl_rgltry_inf { val.validate()? }
51429		if let Some(ref val) = self.acctg_sts { val.validate()? }
51430		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
51431		Ok(())
51432	}
51433}
51434
51435
51436// InvestmentFundMiFIDFee2Code ...
51437#[cfg_attr(feature = "derive_debug", derive(Debug))]
51438#[cfg_attr(feature = "derive_default", derive(Default))]
51439#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51440#[cfg_attr(feature = "derive_clone", derive(Clone))]
51441#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51442pub enum InvestmentFundMiFIDFee2Code {
51443	#[cfg_attr(feature = "derive_default", default)]
51444	#[cfg_attr( feature = "derive_serde", serde(rename = "BORF") )]
51445	CodeBORF,
51446	#[cfg_attr( feature = "derive_serde", serde(rename = "DIS2") )]
51447	CodeDIS2,
51448	#[cfg_attr( feature = "derive_serde", serde(rename = "FES3") )]
51449	CodeFES3,
51450	#[cfg_attr( feature = "derive_serde", serde(rename = "FEND") )]
51451	CodeFEND,
51452	#[cfg_attr( feature = "derive_serde", serde(rename = "FES2") )]
51453	CodeFES2,
51454	#[cfg_attr( feature = "derive_serde", serde(rename = "GOC1") )]
51455	CodeGOC1,
51456	#[cfg_attr( feature = "derive_serde", serde(rename = "GOCS") )]
51457	CodeGOCS,
51458	#[cfg_attr( feature = "derive_serde", serde(rename = "INCF") )]
51459	CodeINCF,
51460	#[cfg_attr( feature = "derive_serde", serde(rename = "INCS") )]
51461	CodeINCS,
51462	#[cfg_attr( feature = "derive_serde", serde(rename = "MNF1") )]
51463	CodeMNF1,
51464	#[cfg_attr( feature = "derive_serde", serde(rename = "MANS") )]
51465	CodeMANS,
51466	#[cfg_attr( feature = "derive_serde", serde(rename = "NET2") )]
51467	CodeNET2,
51468	#[cfg_attr( feature = "derive_serde", serde(rename = "NESF") )]
51469	CodeNESF,
51470	#[cfg_attr( feature = "derive_serde", serde(rename = "NETO") )]
51471	CodeNETO,
51472	#[cfg_attr( feature = "derive_serde", serde(rename = "NRAM") )]
51473	CodeNRAM,
51474	#[cfg_attr( feature = "derive_serde", serde(rename = "OOEA") )]
51475	CodeOOEA,
51476	#[cfg_attr( feature = "derive_serde", serde(rename = "OOSF") )]
51477	CodeOOSF,
51478	#[cfg_attr( feature = "derive_serde", serde(rename = "OOSS") )]
51479	CodeOOSS,
51480	#[cfg_attr( feature = "derive_serde", serde(rename = "BENS") )]
51481	CodeBENS,
51482	#[cfg_attr( feature = "derive_serde", serde(rename = "ENAC") )]
51483	CodeENAC,
51484	#[cfg_attr( feature = "derive_serde", serde(rename = "ENFX") )]
51485	CodeENFX,
51486	#[cfg_attr( feature = "derive_serde", serde(rename = "EXAC") )]
51487	CodeEXAC,
51488	#[cfg_attr( feature = "derive_serde", serde(rename = "ENBX") )]
51489	CodeENBX,
51490	#[cfg_attr( feature = "derive_serde", serde(rename = "BEND") )]
51491	CodeBEND,
51492	#[cfg_attr( feature = "derive_serde", serde(rename = "PENO") )]
51493	CodePENO,
51494	#[cfg_attr( feature = "derive_serde", serde(rename = "OTES") )]
51495	CodeOTES,
51496	#[cfg_attr( feature = "derive_serde", serde(rename = "OCAS") )]
51497	CodeOCAS,
51498	#[cfg_attr( feature = "derive_serde", serde(rename = "RPSS") )]
51499	CodeRPSS,
51500	#[cfg_attr( feature = "derive_serde", serde(rename = "TRS1") )]
51501	CodeTRS1,
51502}
51503
51504impl InvestmentFundMiFIDFee2Code {
51505	pub fn validate(&self) -> Result<(), ValidationError> {
51506		Ok(())
51507	}
51508}
51509
51510
51511// InvestmentFundOrder4 ...
51512#[cfg_attr(feature = "derive_debug", derive(Debug))]
51513#[cfg_attr(feature = "derive_default", derive(Default))]
51514#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51515#[cfg_attr(feature = "derive_clone", derive(Clone))]
51516#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51517pub struct InvestmentFundOrder4 {
51518	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrRef", skip_serializing_if = "Option::is_none") )]
51519	pub ordr_ref: Option<String>,
51520	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrRef", skip_serializing_if = "Option::is_none") )]
51521	pub mstr_ref: Option<String>,
51522}
51523
51524impl InvestmentFundOrder4 {
51525	pub fn validate(&self) -> Result<(), ValidationError> {
51526		if let Some(ref val) = self.ordr_ref {
51527			if val.chars().count() < 1 {
51528				return Err(ValidationError::new(1001, "ordr_ref is shorter than the minimum length of 1".to_string()));
51529			}
51530			if val.chars().count() > 35 {
51531				return Err(ValidationError::new(1002, "ordr_ref exceeds the maximum length of 35".to_string()));
51532			}
51533		}
51534		if let Some(ref val) = self.mstr_ref {
51535			if val.chars().count() < 1 {
51536				return Err(ValidationError::new(1001, "mstr_ref is shorter than the minimum length of 1".to_string()));
51537			}
51538			if val.chars().count() > 35 {
51539				return Err(ValidationError::new(1002, "mstr_ref exceeds the maximum length of 35".to_string()));
51540			}
51541		}
51542		Ok(())
51543	}
51544}
51545
51546
51547// InvestmentFundPlanType1Choice ...
51548#[cfg_attr(feature = "derive_debug", derive(Debug))]
51549#[cfg_attr(feature = "derive_default", derive(Default))]
51550#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51551#[cfg_attr(feature = "derive_clone", derive(Clone))]
51552#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51553pub struct InvestmentFundPlanType1Choice {
51554	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
51555	pub cd: Option<InvestmentFundPlanType1Code>,
51556	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
51557	pub prtry: Option<GenericIdentification36>,
51558}
51559
51560impl InvestmentFundPlanType1Choice {
51561	pub fn validate(&self) -> Result<(), ValidationError> {
51562		if let Some(ref val) = self.cd { val.validate()? }
51563		if let Some(ref val) = self.prtry { val.validate()? }
51564		Ok(())
51565	}
51566}
51567
51568
51569// InvestmentFundPlanType1Code ...
51570#[cfg_attr(feature = "derive_debug", derive(Debug))]
51571#[cfg_attr(feature = "derive_default", derive(Default))]
51572#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51573#[cfg_attr(feature = "derive_clone", derive(Clone))]
51574#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51575pub enum InvestmentFundPlanType1Code {
51576	#[cfg_attr(feature = "derive_default", default)]
51577	#[cfg_attr( feature = "derive_serde", serde(rename = "INVP") )]
51578	CodeINVP,
51579	#[cfg_attr( feature = "derive_serde", serde(rename = "SWIP") )]
51580	CodeSWIP,
51581	#[cfg_attr( feature = "derive_serde", serde(rename = "WTHP") )]
51582	CodeWTHP,
51583}
51584
51585impl InvestmentFundPlanType1Code {
51586	pub fn validate(&self) -> Result<(), ValidationError> {
51587		Ok(())
51588	}
51589}
51590
51591
51592// InvestmentFundRole6Code ...
51593#[cfg_attr(feature = "derive_debug", derive(Debug))]
51594#[cfg_attr(feature = "derive_default", derive(Default))]
51595#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51596#[cfg_attr(feature = "derive_clone", derive(Clone))]
51597#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51598pub enum InvestmentFundRole6Code {
51599	#[cfg_attr(feature = "derive_default", default)]
51600	#[cfg_attr( feature = "derive_serde", serde(rename = "CACO") )]
51601	CodeCACO,
51602	#[cfg_attr( feature = "derive_serde", serde(rename = "CONC") )]
51603	CodeCONC,
51604	#[cfg_attr( feature = "derive_serde", serde(rename = "CUST") )]
51605	CodeCUST,
51606	#[cfg_attr( feature = "derive_serde", serde(rename = "DATP") )]
51607	CodeDATP,
51608	#[cfg_attr( feature = "derive_serde", serde(rename = "DIST") )]
51609	CodeDIST,
51610	#[cfg_attr( feature = "derive_serde", serde(rename = "FACT") )]
51611	CodeFACT,
51612	#[cfg_attr( feature = "derive_serde", serde(rename = "FIAD") )]
51613	CodeFIAD,
51614	#[cfg_attr( feature = "derive_serde", serde(rename = "FIAG") )]
51615	CodeFIAG,
51616	#[cfg_attr( feature = "derive_serde", serde(rename = "FMCO") )]
51617	CodeFMCO,
51618	#[cfg_attr( feature = "derive_serde", serde(rename = "FNBR") )]
51619	CodeFNBR,
51620	#[cfg_attr( feature = "derive_serde", serde(rename = "FTAG") )]
51621	CodeFTAG,
51622	#[cfg_attr( feature = "derive_serde", serde(rename = "INTR") )]
51623	CodeINTR,
51624	#[cfg_attr( feature = "derive_serde", serde(rename = "INVE") )]
51625	CodeINVE,
51626	#[cfg_attr( feature = "derive_serde", serde(rename = "INVS") )]
51627	CodeINVS,
51628	#[cfg_attr( feature = "derive_serde", serde(rename = "PAYI") )]
51629	CodePAYI,
51630	#[cfg_attr( feature = "derive_serde", serde(rename = "REGI") )]
51631	CodeREGI,
51632	#[cfg_attr( feature = "derive_serde", serde(rename = "TRAG") )]
51633	CodeTRAG,
51634	#[cfg_attr( feature = "derive_serde", serde(rename = "TRAN") )]
51635	CodeTRAN,
51636}
51637
51638impl InvestmentFundRole6Code {
51639	pub fn validate(&self) -> Result<(), ValidationError> {
51640		Ok(())
51641	}
51642}
51643
51644
51645// InvestmentFundRole7Code ...
51646#[cfg_attr(feature = "derive_debug", derive(Debug))]
51647#[cfg_attr(feature = "derive_default", derive(Default))]
51648#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51649#[cfg_attr(feature = "derive_clone", derive(Clone))]
51650#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51651pub enum InvestmentFundRole7Code {
51652	#[cfg_attr(feature = "derive_default", default)]
51653	#[cfg_attr( feature = "derive_serde", serde(rename = "CONC") )]
51654	CodeCONC,
51655	#[cfg_attr( feature = "derive_serde", serde(rename = "DIST") )]
51656	CodeDIST,
51657	#[cfg_attr( feature = "derive_serde", serde(rename = "FMCO") )]
51658	CodeFMCO,
51659	#[cfg_attr( feature = "derive_serde", serde(rename = "INTR") )]
51660	CodeINTR,
51661	#[cfg_attr( feature = "derive_serde", serde(rename = "PAYI") )]
51662	CodePAYI,
51663	#[cfg_attr( feature = "derive_serde", serde(rename = "TRAG") )]
51664	CodeTRAG,
51665	#[cfg_attr( feature = "derive_serde", serde(rename = "CUST") )]
51666	CodeCUST,
51667	#[cfg_attr( feature = "derive_serde", serde(rename = "CACO") )]
51668	CodeCACO,
51669	#[cfg_attr( feature = "derive_serde", serde(rename = "FACT") )]
51670	CodeFACT,
51671	#[cfg_attr( feature = "derive_serde", serde(rename = "INVE") )]
51672	CodeINVE,
51673	#[cfg_attr( feature = "derive_serde", serde(rename = "INVS") )]
51674	CodeINVS,
51675}
51676
51677impl InvestmentFundRole7Code {
51678	pub fn validate(&self) -> Result<(), ValidationError> {
51679		Ok(())
51680	}
51681}
51682
51683
51684// InvestmentFundTransactionInType1Choice ...
51685#[cfg_attr(feature = "derive_debug", derive(Debug))]
51686#[cfg_attr(feature = "derive_default", derive(Default))]
51687#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51688#[cfg_attr(feature = "derive_clone", derive(Clone))]
51689#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51690pub struct InvestmentFundTransactionInType1Choice {
51691	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
51692	pub cd: Option<InvestmentFundTransactionInType1Code>,
51693	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
51694	pub prtry: Option<GenericIdentification47>,
51695}
51696
51697impl InvestmentFundTransactionInType1Choice {
51698	pub fn validate(&self) -> Result<(), ValidationError> {
51699		if let Some(ref val) = self.cd { val.validate()? }
51700		if let Some(ref val) = self.prtry { val.validate()? }
51701		Ok(())
51702	}
51703}
51704
51705
51706// InvestmentFundTransactionInType1Code ...
51707#[cfg_attr(feature = "derive_debug", derive(Debug))]
51708#[cfg_attr(feature = "derive_default", derive(Default))]
51709#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51710#[cfg_attr(feature = "derive_clone", derive(Clone))]
51711#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51712pub enum InvestmentFundTransactionInType1Code {
51713	#[cfg_attr(feature = "derive_default", default)]
51714	#[cfg_attr( feature = "derive_serde", serde(rename = "SUBS") )]
51715	CodeSUBS,
51716	#[cfg_attr( feature = "derive_serde", serde(rename = "SWII") )]
51717	CodeSWII,
51718	#[cfg_attr( feature = "derive_serde", serde(rename = "INSP") )]
51719	CodeINSP,
51720	#[cfg_attr( feature = "derive_serde", serde(rename = "CROI") )]
51721	CodeCROI,
51722	#[cfg_attr( feature = "derive_serde", serde(rename = "RDIV") )]
51723	CodeRDIV,
51724}
51725
51726impl InvestmentFundTransactionInType1Code {
51727	pub fn validate(&self) -> Result<(), ValidationError> {
51728		Ok(())
51729	}
51730}
51731
51732
51733// InvestmentFundTransactionOutType1Choice ...
51734#[cfg_attr(feature = "derive_debug", derive(Debug))]
51735#[cfg_attr(feature = "derive_default", derive(Default))]
51736#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51737#[cfg_attr(feature = "derive_clone", derive(Clone))]
51738#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51739pub struct InvestmentFundTransactionOutType1Choice {
51740	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
51741	pub cd: Option<InvestmentFundTransactionOutType1Code>,
51742	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
51743	pub prtry: Option<GenericIdentification47>,
51744}
51745
51746impl InvestmentFundTransactionOutType1Choice {
51747	pub fn validate(&self) -> Result<(), ValidationError> {
51748		if let Some(ref val) = self.cd { val.validate()? }
51749		if let Some(ref val) = self.prtry { val.validate()? }
51750		Ok(())
51751	}
51752}
51753
51754
51755// InvestmentFundTransactionOutType1Code ...
51756#[cfg_attr(feature = "derive_debug", derive(Debug))]
51757#[cfg_attr(feature = "derive_default", derive(Default))]
51758#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51759#[cfg_attr(feature = "derive_clone", derive(Clone))]
51760#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51761pub enum InvestmentFundTransactionOutType1Code {
51762	#[cfg_attr(feature = "derive_default", default)]
51763	#[cfg_attr( feature = "derive_serde", serde(rename = "REDM") )]
51764	CodeREDM,
51765	#[cfg_attr( feature = "derive_serde", serde(rename = "SWIO") )]
51766	CodeSWIO,
51767	#[cfg_attr( feature = "derive_serde", serde(rename = "INSP") )]
51768	CodeINSP,
51769	#[cfg_attr( feature = "derive_serde", serde(rename = "CROO") )]
51770	CodeCROO,
51771}
51772
51773impl InvestmentFundTransactionOutType1Code {
51774	pub fn validate(&self) -> Result<(), ValidationError> {
51775		Ok(())
51776	}
51777}
51778
51779
51780// InvestmentFundTransactionType1Code ...
51781#[cfg_attr(feature = "derive_debug", derive(Debug))]
51782#[cfg_attr(feature = "derive_default", derive(Default))]
51783#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51784#[cfg_attr(feature = "derive_clone", derive(Clone))]
51785#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51786pub enum InvestmentFundTransactionType1Code {
51787	#[cfg_attr(feature = "derive_default", default)]
51788	#[cfg_attr( feature = "derive_serde", serde(rename = "ALLL") )]
51789	CodeALLL,
51790	#[cfg_attr( feature = "derive_serde", serde(rename = "SELL") )]
51791	CodeSELL,
51792	#[cfg_attr( feature = "derive_serde", serde(rename = "BUYI") )]
51793	CodeBUYI,
51794	#[cfg_attr( feature = "derive_serde", serde(rename = "SWIO") )]
51795	CodeSWIO,
51796	#[cfg_attr( feature = "derive_serde", serde(rename = "TRIN") )]
51797	CodeTRIN,
51798	#[cfg_attr( feature = "derive_serde", serde(rename = "TOUT") )]
51799	CodeTOUT,
51800	#[cfg_attr( feature = "derive_serde", serde(rename = "SUBS") )]
51801	CodeSUBS,
51802	#[cfg_attr( feature = "derive_serde", serde(rename = "REDM") )]
51803	CodeREDM,
51804	#[cfg_attr( feature = "derive_serde", serde(rename = "CDEP") )]
51805	CodeCDEP,
51806	#[cfg_attr( feature = "derive_serde", serde(rename = "CWIT") )]
51807	CodeCWIT,
51808	#[cfg_attr( feature = "derive_serde", serde(rename = "DIVP") )]
51809	CodeDIVP,
51810	#[cfg_attr( feature = "derive_serde", serde(rename = "CAEV") )]
51811	CodeCAEV,
51812	#[cfg_attr( feature = "derive_serde", serde(rename = "CROI") )]
51813	CodeCROI,
51814	#[cfg_attr( feature = "derive_serde", serde(rename = "CROO") )]
51815	CodeCROO,
51816	#[cfg_attr( feature = "derive_serde", serde(rename = "DIVI") )]
51817	CodeDIVI,
51818	#[cfg_attr( feature = "derive_serde", serde(rename = "INSP") )]
51819	CodeINSP,
51820	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
51821	CodeOTHR,
51822	#[cfg_attr( feature = "derive_serde", serde(rename = "REAA") )]
51823	CodeREAA,
51824	#[cfg_attr( feature = "derive_serde", serde(rename = "RWPL") )]
51825	CodeRWPL,
51826	#[cfg_attr( feature = "derive_serde", serde(rename = "RDIV") )]
51827	CodeRDIV,
51828	#[cfg_attr( feature = "derive_serde", serde(rename = "SSPL") )]
51829	CodeSSPL,
51830	#[cfg_attr( feature = "derive_serde", serde(rename = "SUAA") )]
51831	CodeSUAA,
51832}
51833
51834impl InvestmentFundTransactionType1Code {
51835	pub fn validate(&self) -> Result<(), ValidationError> {
51836		Ok(())
51837	}
51838}
51839
51840
51841// InvestmentNeed2Choice ...
51842#[cfg_attr(feature = "derive_debug", derive(Debug))]
51843#[cfg_attr(feature = "derive_default", derive(Default))]
51844#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51845#[cfg_attr(feature = "derive_clone", derive(Clone))]
51846#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51847pub struct InvestmentNeed2Choice {
51848	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
51849	pub cd: Option<InvestmentNeed2Code>,
51850	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
51851	pub prtry: Option<GenericIdentification47>,
51852}
51853
51854impl InvestmentNeed2Choice {
51855	pub fn validate(&self) -> Result<(), ValidationError> {
51856		if let Some(ref val) = self.cd { val.validate()? }
51857		if let Some(ref val) = self.prtry { val.validate()? }
51858		Ok(())
51859	}
51860}
51861
51862
51863// InvestmentNeed2Code ...
51864#[cfg_attr(feature = "derive_debug", derive(Debug))]
51865#[cfg_attr(feature = "derive_default", derive(Default))]
51866#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51867#[cfg_attr(feature = "derive_clone", derive(Clone))]
51868#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51869pub enum InvestmentNeed2Code {
51870	#[cfg_attr(feature = "derive_default", default)]
51871	#[cfg_attr( feature = "derive_serde", serde(rename = "NSPE") )]
51872	CodeNSPE,
51873	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
51874	CodeOTHR,
51875	#[cfg_attr( feature = "derive_serde", serde(rename = "ISLB") )]
51876	CodeISLB,
51877}
51878
51879impl InvestmentNeed2Code {
51880	pub fn validate(&self) -> Result<(), ValidationError> {
51881		Ok(())
51882	}
51883}
51884
51885
51886// InvestmentParty1Choice ...
51887#[cfg_attr(feature = "derive_debug", derive(Debug))]
51888#[cfg_attr(feature = "derive_default", derive(Default))]
51889#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51890#[cfg_attr(feature = "derive_clone", derive(Clone))]
51891#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51892pub struct InvestmentParty1Choice {
51893	#[cfg_attr( feature = "derive_serde", serde(rename = "Prsn", skip_serializing_if = "Option::is_none") )]
51894	pub prsn: Option<PersonIdentification12>,
51895	#[cfg_attr( feature = "derive_serde", serde(rename = "Algo", skip_serializing_if = "Option::is_none") )]
51896	pub algo: Option<String>,
51897}
51898
51899impl InvestmentParty1Choice {
51900	pub fn validate(&self) -> Result<(), ValidationError> {
51901		if let Some(ref val) = self.prsn { val.validate()? }
51902		if let Some(ref val) = self.algo {
51903			if val.chars().count() < 1 {
51904				return Err(ValidationError::new(1001, "algo is shorter than the minimum length of 1".to_string()));
51905			}
51906			if val.chars().count() > 50 {
51907				return Err(ValidationError::new(1002, "algo exceeds the maximum length of 50".to_string()));
51908			}
51909		}
51910		Ok(())
51911	}
51912}
51913
51914
51915// InvestmentPlan16 ...
51916#[cfg_attr(feature = "derive_debug", derive(Debug))]
51917#[cfg_attr(feature = "derive_default", derive(Default))]
51918#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
51919#[cfg_attr(feature = "derive_clone", derive(Clone))]
51920#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
51921pub struct InvestmentPlan16 {
51922	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy") )]
51923	pub frqcy: Frequency20Choice,
51924	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
51925	pub start_dt: Option<String>,
51926	#[cfg_attr( feature = "derive_serde", serde(rename = "EndDt", skip_serializing_if = "Option::is_none") )]
51927	pub end_dt: Option<String>,
51928	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty") )]
51929	pub qty: UnitsOrAmount1Choice,
51930	#[cfg_attr( feature = "derive_serde", serde(rename = "GrssAmtInd", skip_serializing_if = "Option::is_none") )]
51931	pub grss_amt_ind: Option<bool>,
51932	#[cfg_attr( feature = "derive_serde", serde(rename = "IncmPref", skip_serializing_if = "Option::is_none") )]
51933	pub incm_pref: Option<IncomePreference2Code>,
51934	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlAmt", skip_serializing_if = "Option::is_none") )]
51935	pub initl_amt: Option<InitialAmount1Choice>,
51936	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfInstlmts", skip_serializing_if = "Option::is_none") )]
51937	pub ttl_nb_of_instlmts: Option<f64>,
51938	#[cfg_attr( feature = "derive_serde", serde(rename = "RndgDrctn", skip_serializing_if = "Option::is_none") )]
51939	pub rndg_drctn: Option<RoundingDirection1Code>,
51940	#[cfg_attr( feature = "derive_serde", serde(rename = "SctyDtls") )]
51941	pub scty_dtls: Vec<Repartition6>,
51942	#[cfg_attr( feature = "derive_serde", serde(rename = "ModfdCshSttlm", skip_serializing_if = "Option::is_none") )]
51943	pub modfd_csh_sttlm: Option<Vec<CashSettlement4>>,
51944	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctRef", skip_serializing_if = "Option::is_none") )]
51945	pub ctrct_ref: Option<String>,
51946	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdCtrctRef", skip_serializing_if = "Option::is_none") )]
51947	pub rltd_ctrct_ref: Option<String>,
51948	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctId", skip_serializing_if = "Option::is_none") )]
51949	pub pdct_id: Option<String>,
51950	#[cfg_attr( feature = "derive_serde", serde(rename = "SLAChrgAndComssnRef", skip_serializing_if = "Option::is_none") )]
51951	pub sla_chrg_and_comssn_ref: Option<String>,
51952	#[cfg_attr( feature = "derive_serde", serde(rename = "InsrncCover", skip_serializing_if = "Option::is_none") )]
51953	pub insrnc_cover: Option<InsuranceType2Choice>,
51954	#[cfg_attr( feature = "derive_serde", serde(rename = "PlanSts", skip_serializing_if = "Option::is_none") )]
51955	pub plan_sts: Option<PlanStatus2Choice>,
51956	#[cfg_attr( feature = "derive_serde", serde(rename = "InstlmtMgrRole", skip_serializing_if = "Option::is_none") )]
51957	pub instlmt_mgr_role: Option<PartyRole4Choice>,
51958}
51959
51960impl InvestmentPlan16 {
51961	pub fn validate(&self) -> Result<(), ValidationError> {
51962		self.frqcy.validate()?;
51963		self.qty.validate()?;
51964		if let Some(ref val) = self.incm_pref { val.validate()? }
51965		if let Some(ref val) = self.initl_amt { val.validate()? }
51966		if let Some(ref val) = self.rndg_drctn { val.validate()? }
51967		for item in &self.scty_dtls { item.validate()? }
51968		if let Some(ref vec) = self.modfd_csh_sttlm { for item in vec { item.validate()? } }
51969		if let Some(ref val) = self.ctrct_ref {
51970			if val.chars().count() < 1 {
51971				return Err(ValidationError::new(1001, "ctrct_ref is shorter than the minimum length of 1".to_string()));
51972			}
51973			if val.chars().count() > 35 {
51974				return Err(ValidationError::new(1002, "ctrct_ref exceeds the maximum length of 35".to_string()));
51975			}
51976		}
51977		if let Some(ref val) = self.rltd_ctrct_ref {
51978			if val.chars().count() < 1 {
51979				return Err(ValidationError::new(1001, "rltd_ctrct_ref is shorter than the minimum length of 1".to_string()));
51980			}
51981			if val.chars().count() > 35 {
51982				return Err(ValidationError::new(1002, "rltd_ctrct_ref exceeds the maximum length of 35".to_string()));
51983			}
51984		}
51985		if let Some(ref val) = self.pdct_id {
51986			if val.chars().count() < 1 {
51987				return Err(ValidationError::new(1001, "pdct_id is shorter than the minimum length of 1".to_string()));
51988			}
51989			if val.chars().count() > 35 {
51990				return Err(ValidationError::new(1002, "pdct_id exceeds the maximum length of 35".to_string()));
51991			}
51992		}
51993		if let Some(ref val) = self.sla_chrg_and_comssn_ref {
51994			if val.chars().count() < 1 {
51995				return Err(ValidationError::new(1001, "sla_chrg_and_comssn_ref is shorter than the minimum length of 1".to_string()));
51996			}
51997			if val.chars().count() > 35 {
51998				return Err(ValidationError::new(1002, "sla_chrg_and_comssn_ref exceeds the maximum length of 35".to_string()));
51999			}
52000		}
52001		if let Some(ref val) = self.insrnc_cover { val.validate()? }
52002		if let Some(ref val) = self.plan_sts { val.validate()? }
52003		if let Some(ref val) = self.instlmt_mgr_role { val.validate()? }
52004		Ok(())
52005	}
52006}
52007
52008
52009// InvestmentPlan17 ...
52010#[cfg_attr(feature = "derive_debug", derive(Debug))]
52011#[cfg_attr(feature = "derive_default", derive(Default))]
52012#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52013#[cfg_attr(feature = "derive_clone", derive(Clone))]
52014#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52015pub struct InvestmentPlan17 {
52016	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy") )]
52017	pub frqcy: Frequency20Choice,
52018	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
52019	pub start_dt: Option<String>,
52020	#[cfg_attr( feature = "derive_serde", serde(rename = "EndDt", skip_serializing_if = "Option::is_none") )]
52021	pub end_dt: Option<String>,
52022	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty") )]
52023	pub qty: UnitsOrAmount1Choice,
52024	#[cfg_attr( feature = "derive_serde", serde(rename = "GrssAmtInd", skip_serializing_if = "Option::is_none") )]
52025	pub grss_amt_ind: Option<bool>,
52026	#[cfg_attr( feature = "derive_serde", serde(rename = "IncmPref", skip_serializing_if = "Option::is_none") )]
52027	pub incm_pref: Option<IncomePreference2Code>,
52028	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlAmt", skip_serializing_if = "Option::is_none") )]
52029	pub initl_amt: Option<InitialAmount1Choice>,
52030	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfInstlmts", skip_serializing_if = "Option::is_none") )]
52031	pub ttl_nb_of_instlmts: Option<f64>,
52032	#[cfg_attr( feature = "derive_serde", serde(rename = "RndgDrctn", skip_serializing_if = "Option::is_none") )]
52033	pub rndg_drctn: Option<RoundingDirection1Code>,
52034	#[cfg_attr( feature = "derive_serde", serde(rename = "SctyDtls") )]
52035	pub scty_dtls: Vec<Repartition6>,
52036	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSttlm", skip_serializing_if = "Option::is_none") )]
52037	pub csh_sttlm: Option<Vec<CashSettlement3>>,
52038	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctRef", skip_serializing_if = "Option::is_none") )]
52039	pub ctrct_ref: Option<String>,
52040	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdCtrctRef", skip_serializing_if = "Option::is_none") )]
52041	pub rltd_ctrct_ref: Option<String>,
52042	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctId", skip_serializing_if = "Option::is_none") )]
52043	pub pdct_id: Option<String>,
52044	#[cfg_attr( feature = "derive_serde", serde(rename = "SLAChrgAndComssnRef", skip_serializing_if = "Option::is_none") )]
52045	pub sla_chrg_and_comssn_ref: Option<String>,
52046	#[cfg_attr( feature = "derive_serde", serde(rename = "InsrncCover", skip_serializing_if = "Option::is_none") )]
52047	pub insrnc_cover: Option<InsuranceType2Choice>,
52048	#[cfg_attr( feature = "derive_serde", serde(rename = "PlanSts", skip_serializing_if = "Option::is_none") )]
52049	pub plan_sts: Option<PlanStatus2Choice>,
52050	#[cfg_attr( feature = "derive_serde", serde(rename = "InstlmtMgrRole", skip_serializing_if = "Option::is_none") )]
52051	pub instlmt_mgr_role: Option<PartyRole4Choice>,
52052}
52053
52054impl InvestmentPlan17 {
52055	pub fn validate(&self) -> Result<(), ValidationError> {
52056		self.frqcy.validate()?;
52057		self.qty.validate()?;
52058		if let Some(ref val) = self.incm_pref { val.validate()? }
52059		if let Some(ref val) = self.initl_amt { val.validate()? }
52060		if let Some(ref val) = self.rndg_drctn { val.validate()? }
52061		for item in &self.scty_dtls { item.validate()? }
52062		if let Some(ref vec) = self.csh_sttlm { for item in vec { item.validate()? } }
52063		if let Some(ref val) = self.ctrct_ref {
52064			if val.chars().count() < 1 {
52065				return Err(ValidationError::new(1001, "ctrct_ref is shorter than the minimum length of 1".to_string()));
52066			}
52067			if val.chars().count() > 35 {
52068				return Err(ValidationError::new(1002, "ctrct_ref exceeds the maximum length of 35".to_string()));
52069			}
52070		}
52071		if let Some(ref val) = self.rltd_ctrct_ref {
52072			if val.chars().count() < 1 {
52073				return Err(ValidationError::new(1001, "rltd_ctrct_ref is shorter than the minimum length of 1".to_string()));
52074			}
52075			if val.chars().count() > 35 {
52076				return Err(ValidationError::new(1002, "rltd_ctrct_ref exceeds the maximum length of 35".to_string()));
52077			}
52078		}
52079		if let Some(ref val) = self.pdct_id {
52080			if val.chars().count() < 1 {
52081				return Err(ValidationError::new(1001, "pdct_id is shorter than the minimum length of 1".to_string()));
52082			}
52083			if val.chars().count() > 35 {
52084				return Err(ValidationError::new(1002, "pdct_id exceeds the maximum length of 35".to_string()));
52085			}
52086		}
52087		if let Some(ref val) = self.sla_chrg_and_comssn_ref {
52088			if val.chars().count() < 1 {
52089				return Err(ValidationError::new(1001, "sla_chrg_and_comssn_ref is shorter than the minimum length of 1".to_string()));
52090			}
52091			if val.chars().count() > 35 {
52092				return Err(ValidationError::new(1002, "sla_chrg_and_comssn_ref exceeds the maximum length of 35".to_string()));
52093			}
52094		}
52095		if let Some(ref val) = self.insrnc_cover { val.validate()? }
52096		if let Some(ref val) = self.plan_sts { val.validate()? }
52097		if let Some(ref val) = self.instlmt_mgr_role { val.validate()? }
52098		Ok(())
52099	}
52100}
52101
52102
52103// InvestmentPlanCharacteristics1 ...
52104#[cfg_attr(feature = "derive_debug", derive(Debug))]
52105#[cfg_attr(feature = "derive_default", derive(Default))]
52106#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52107#[cfg_attr(feature = "derive_clone", derive(Clone))]
52108#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52109pub struct InvestmentPlanCharacteristics1 {
52110	#[cfg_attr( feature = "derive_serde", serde(rename = "PlanTp") )]
52111	pub plan_tp: InvestmentFundPlanType1Choice,
52112	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy", skip_serializing_if = "Option::is_none") )]
52113	pub frqcy: Option<Frequency20Choice>,
52114	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfInstlmts", skip_serializing_if = "Option::is_none") )]
52115	pub ttl_nb_of_instlmts: Option<f64>,
52116	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty", skip_serializing_if = "Option::is_none") )]
52117	pub qty: Option<UnitsOrAmount1Choice>,
52118	#[cfg_attr( feature = "derive_serde", serde(rename = "PlanConttn", skip_serializing_if = "Option::is_none") )]
52119	pub plan_conttn: Option<bool>,
52120	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSbcpt", skip_serializing_if = "Option::is_none") )]
52121	pub addtl_sbcpt: Option<bool>,
52122	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSbcptFctn", skip_serializing_if = "Option::is_none") )]
52123	pub addtl_sbcpt_fctn: Option<bool>,
52124	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
52125	pub addtl_inf: Option<Vec<AdditionalInformation15>>,
52126}
52127
52128impl InvestmentPlanCharacteristics1 {
52129	pub fn validate(&self) -> Result<(), ValidationError> {
52130		self.plan_tp.validate()?;
52131		if let Some(ref val) = self.frqcy { val.validate()? }
52132		if let Some(ref val) = self.qty { val.validate()? }
52133		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
52134		Ok(())
52135	}
52136}
52137
52138
52139// InvestmentRestrictions3 ...
52140#[cfg_attr(feature = "derive_debug", derive(Debug))]
52141#[cfg_attr(feature = "derive_default", derive(Default))]
52142#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52143#[cfg_attr(feature = "derive_clone", derive(Clone))]
52144#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52145pub struct InvestmentRestrictions3 {
52146	#[cfg_attr( feature = "derive_serde", serde(rename = "MinInitlSbcptAmt", skip_serializing_if = "Option::is_none") )]
52147	pub min_initl_sbcpt_amt: Option<ActiveCurrencyAndAmount>,
52148	#[cfg_attr( feature = "derive_serde", serde(rename = "MinInitlSbcptUnits", skip_serializing_if = "Option::is_none") )]
52149	pub min_initl_sbcpt_units: Option<f64>,
52150	#[cfg_attr( feature = "derive_serde", serde(rename = "MinSbsqntSbcptAmt", skip_serializing_if = "Option::is_none") )]
52151	pub min_sbsqnt_sbcpt_amt: Option<ActiveCurrencyAndAmount>,
52152	#[cfg_attr( feature = "derive_serde", serde(rename = "MinSbsqntSbcptUnits", skip_serializing_if = "Option::is_none") )]
52153	pub min_sbsqnt_sbcpt_units: Option<f64>,
52154	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxRedAmt", skip_serializing_if = "Option::is_none") )]
52155	pub max_red_amt: Option<ActiveCurrencyAndAmount>,
52156	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxRedUnits", skip_serializing_if = "Option::is_none") )]
52157	pub max_red_units: Option<f64>,
52158	#[cfg_attr( feature = "derive_serde", serde(rename = "MinRedPctg", skip_serializing_if = "Option::is_none") )]
52159	pub min_red_pctg: Option<f64>,
52160	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrRedRstrctns", skip_serializing_if = "Option::is_none") )]
52161	pub othr_red_rstrctns: Option<String>,
52162	#[cfg_attr( feature = "derive_serde", serde(rename = "MinSwtchSbcptAmt", skip_serializing_if = "Option::is_none") )]
52163	pub min_swtch_sbcpt_amt: Option<ActiveCurrencyAndAmount>,
52164	#[cfg_attr( feature = "derive_serde", serde(rename = "MinSwtchSbcptUnits", skip_serializing_if = "Option::is_none") )]
52165	pub min_swtch_sbcpt_units: Option<f64>,
52166	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxSwtchRedAmt", skip_serializing_if = "Option::is_none") )]
52167	pub max_swtch_red_amt: Option<ActiveCurrencyAndAmount>,
52168	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxSwtchRedUnits", skip_serializing_if = "Option::is_none") )]
52169	pub max_swtch_red_units: Option<f64>,
52170	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrSwtchRstrctns", skip_serializing_if = "Option::is_none") )]
52171	pub othr_swtch_rstrctns: Option<String>,
52172	#[cfg_attr( feature = "derive_serde", serde(rename = "MinHldgAmt", skip_serializing_if = "Option::is_none") )]
52173	pub min_hldg_amt: Option<ActiveCurrencyAndAmount>,
52174	#[cfg_attr( feature = "derive_serde", serde(rename = "MinHldgUnits", skip_serializing_if = "Option::is_none") )]
52175	pub min_hldg_units: Option<f64>,
52176	#[cfg_attr( feature = "derive_serde", serde(rename = "MinHldgPrd", skip_serializing_if = "Option::is_none") )]
52177	pub min_hldg_prd: Option<String>,
52178	#[cfg_attr( feature = "derive_serde", serde(rename = "HldgTrfbl", skip_serializing_if = "Option::is_none") )]
52179	pub hldg_trfbl: Option<HoldingTransferable1Code>,
52180	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
52181	pub addtl_inf: Option<Vec<AdditionalInformation15>>,
52182}
52183
52184impl InvestmentRestrictions3 {
52185	pub fn validate(&self) -> Result<(), ValidationError> {
52186		if let Some(ref val) = self.min_initl_sbcpt_amt { val.validate()? }
52187		if let Some(ref val) = self.min_sbsqnt_sbcpt_amt { val.validate()? }
52188		if let Some(ref val) = self.max_red_amt { val.validate()? }
52189		if let Some(ref val) = self.othr_red_rstrctns {
52190			if val.chars().count() < 1 {
52191				return Err(ValidationError::new(1001, "othr_red_rstrctns is shorter than the minimum length of 1".to_string()));
52192			}
52193			if val.chars().count() > 350 {
52194				return Err(ValidationError::new(1002, "othr_red_rstrctns exceeds the maximum length of 350".to_string()));
52195			}
52196		}
52197		if let Some(ref val) = self.min_swtch_sbcpt_amt { val.validate()? }
52198		if let Some(ref val) = self.max_swtch_red_amt { val.validate()? }
52199		if let Some(ref val) = self.othr_swtch_rstrctns {
52200			if val.chars().count() < 1 {
52201				return Err(ValidationError::new(1001, "othr_swtch_rstrctns is shorter than the minimum length of 1".to_string()));
52202			}
52203			if val.chars().count() > 350 {
52204				return Err(ValidationError::new(1002, "othr_swtch_rstrctns exceeds the maximum length of 350".to_string()));
52205			}
52206		}
52207		if let Some(ref val) = self.min_hldg_amt { val.validate()? }
52208		if let Some(ref val) = self.min_hldg_prd {
52209			if val.chars().count() < 1 {
52210				return Err(ValidationError::new(1001, "min_hldg_prd is shorter than the minimum length of 1".to_string()));
52211			}
52212			if val.chars().count() > 70 {
52213				return Err(ValidationError::new(1002, "min_hldg_prd exceeds the maximum length of 70".to_string()));
52214			}
52215		}
52216		if let Some(ref val) = self.hldg_trfbl { val.validate()? }
52217		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
52218		Ok(())
52219	}
52220}
52221
52222
52223// InvestorKnowledge1 ...
52224#[cfg_attr(feature = "derive_debug", derive(Debug))]
52225#[cfg_attr(feature = "derive_default", derive(Default))]
52226#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52227#[cfg_attr(feature = "derive_clone", derive(Clone))]
52228#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52229pub struct InvestorKnowledge1 {
52230	#[cfg_attr( feature = "derive_serde", serde(rename = "BsicInvstr", skip_serializing_if = "Option::is_none") )]
52231	pub bsic_invstr: Option<TargetMarket1Code>,
52232	#[cfg_attr( feature = "derive_serde", serde(rename = "InfrmdInvstr", skip_serializing_if = "Option::is_none") )]
52233	pub infrmd_invstr: Option<TargetMarket1Code>,
52234	#[cfg_attr( feature = "derive_serde", serde(rename = "AdvncdInvstr", skip_serializing_if = "Option::is_none") )]
52235	pub advncd_invstr: Option<TargetMarket1Code>,
52236	#[cfg_attr( feature = "derive_serde", serde(rename = "ExprtInvstrDE", skip_serializing_if = "Option::is_none") )]
52237	pub exprt_invstr_de: Option<TargetMarket1Code>,
52238	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
52239	pub othr: Option<Vec<OtherTargetMarketInvestorKnowledge1>>,
52240}
52241
52242impl InvestorKnowledge1 {
52243	pub fn validate(&self) -> Result<(), ValidationError> {
52244		if let Some(ref val) = self.bsic_invstr { val.validate()? }
52245		if let Some(ref val) = self.infrmd_invstr { val.validate()? }
52246		if let Some(ref val) = self.advncd_invstr { val.validate()? }
52247		if let Some(ref val) = self.exprt_invstr_de { val.validate()? }
52248		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
52249		Ok(())
52250	}
52251}
52252
52253
52254// InvestorProfile2 ...
52255#[cfg_attr(feature = "derive_debug", derive(Debug))]
52256#[cfg_attr(feature = "derive_default", derive(Default))]
52257#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52258#[cfg_attr(feature = "derive_clone", derive(Clone))]
52259#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52260pub struct InvestorProfile2 {
52261	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
52262	pub tp: Option<ProfileType1Choice>,
52263	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
52264	pub sts: Option<InvestorProfileStatus1Choice>,
52265	#[cfg_attr( feature = "derive_serde", serde(rename = "Trsr", skip_serializing_if = "Option::is_none") )]
52266	pub trsr: Option<TreasuryProfile1>,
52267	#[cfg_attr( feature = "derive_serde", serde(rename = "HghFrqcyTradg", skip_serializing_if = "Option::is_none") )]
52268	pub hgh_frqcy_tradg: Option<HighFrequencyTradingProfile1>,
52269	#[cfg_attr( feature = "derive_serde", serde(rename = "MktMakr", skip_serializing_if = "Option::is_none") )]
52270	pub mkt_makr: Option<MarketMakerProfile2>,
52271}
52272
52273impl InvestorProfile2 {
52274	pub fn validate(&self) -> Result<(), ValidationError> {
52275		if let Some(ref val) = self.tp { val.validate()? }
52276		if let Some(ref val) = self.sts { val.validate()? }
52277		if let Some(ref val) = self.trsr { val.validate()? }
52278		if let Some(ref val) = self.hgh_frqcy_tradg { val.validate()? }
52279		if let Some(ref val) = self.mkt_makr { val.validate()? }
52280		Ok(())
52281	}
52282}
52283
52284
52285// InvestorProfileStatus1Choice ...
52286#[cfg_attr(feature = "derive_debug", derive(Debug))]
52287#[cfg_attr(feature = "derive_default", derive(Default))]
52288#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52289#[cfg_attr(feature = "derive_clone", derive(Clone))]
52290#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52291pub struct InvestorProfileStatus1Choice {
52292	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
52293	pub cd: Option<InvestorProfileStatus1Code>,
52294	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
52295	pub prtry: Option<GenericIdentification47>,
52296}
52297
52298impl InvestorProfileStatus1Choice {
52299	pub fn validate(&self) -> Result<(), ValidationError> {
52300		if let Some(ref val) = self.cd { val.validate()? }
52301		if let Some(ref val) = self.prtry { val.validate()? }
52302		Ok(())
52303	}
52304}
52305
52306
52307// InvestorProfileStatus1Code ...
52308#[cfg_attr(feature = "derive_debug", derive(Debug))]
52309#[cfg_attr(feature = "derive_default", derive(Default))]
52310#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52311#[cfg_attr(feature = "derive_clone", derive(Clone))]
52312#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52313pub enum InvestorProfileStatus1Code {
52314	#[cfg_attr(feature = "derive_default", default)]
52315	#[cfg_attr( feature = "derive_serde", serde(rename = "DISA") )]
52316	CodeDISA,
52317	#[cfg_attr( feature = "derive_serde", serde(rename = "DISG") )]
52318	CodeDISG,
52319	#[cfg_attr( feature = "derive_serde", serde(rename = "ENAB") )]
52320	CodeENAB,
52321	#[cfg_attr( feature = "derive_serde", serde(rename = "ENBG") )]
52322	CodeENBG,
52323	#[cfg_attr( feature = "derive_serde", serde(rename = "ADMI") )]
52324	CodeADMI,
52325	#[cfg_attr( feature = "derive_serde", serde(rename = "ANLY") )]
52326	CodeANLY,
52327	#[cfg_attr( feature = "derive_serde", serde(rename = "NAPP") )]
52328	CodeNAPP,
52329	#[cfg_attr( feature = "derive_serde", serde(rename = "PSUS") )]
52330	CodePSUS,
52331	#[cfg_attr( feature = "derive_serde", serde(rename = "PEND") )]
52332	CodePEND,
52333	#[cfg_attr( feature = "derive_serde", serde(rename = "SUPS") )]
52334	CodeSUPS,
52335}
52336
52337impl InvestorProfileStatus1Code {
52338	pub fn validate(&self) -> Result<(), ValidationError> {
52339		Ok(())
52340	}
52341}
52342
52343
52344// InvestorRequirements4 ...
52345#[cfg_attr(feature = "derive_debug", derive(Debug))]
52346#[cfg_attr(feature = "derive_default", derive(Default))]
52347#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52348#[cfg_attr(feature = "derive_clone", derive(Clone))]
52349#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52350pub struct InvestorRequirements4 {
52351	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrPrflPrsrvtn", skip_serializing_if = "Option::is_none") )]
52352	pub rtr_prfl_prsrvtn: Option<TargetMarket1Code>,
52353	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrPrflGrwth", skip_serializing_if = "Option::is_none") )]
52354	pub rtr_prfl_grwth: Option<TargetMarket1Code>,
52355	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrPrflIncm", skip_serializing_if = "Option::is_none") )]
52356	pub rtr_prfl_incm: Option<TargetMarket1Code>,
52357	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrPrflHdgg", skip_serializing_if = "Option::is_none") )]
52358	pub rtr_prfl_hdgg: Option<TargetMarket1Code>,
52359	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnOrLvrgdRtrPrfl", skip_serializing_if = "Option::is_none") )]
52360	pub optn_or_lvrgd_rtr_prfl: Option<TargetMarket1Code>,
52361	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrPrflPnsnSchmeDE", skip_serializing_if = "Option::is_none") )]
52362	pub rtr_prfl_pnsn_schme_de: Option<TargetMarket1Code>,
52363	#[cfg_attr( feature = "derive_serde", serde(rename = "MinHldgPrd", skip_serializing_if = "Option::is_none") )]
52364	pub min_hldg_prd: Option<TimeHorizon2Choice>,
52365	#[cfg_attr( feature = "derive_serde", serde(rename = "SstnbltyPrefs", skip_serializing_if = "Option::is_none") )]
52366	pub sstnblty_prefs: Option<SustainabilityPreferences2Code>,
52367	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrSpcfcInvstmtNeed", skip_serializing_if = "Option::is_none") )]
52368	pub othr_spcfc_invstmt_need: Option<InvestmentNeed2Choice>,
52369	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
52370	pub othr: Option<Vec<OtherInvestmentNeed1>>,
52371}
52372
52373impl InvestorRequirements4 {
52374	pub fn validate(&self) -> Result<(), ValidationError> {
52375		if let Some(ref val) = self.rtr_prfl_prsrvtn { val.validate()? }
52376		if let Some(ref val) = self.rtr_prfl_grwth { val.validate()? }
52377		if let Some(ref val) = self.rtr_prfl_incm { val.validate()? }
52378		if let Some(ref val) = self.rtr_prfl_hdgg { val.validate()? }
52379		if let Some(ref val) = self.optn_or_lvrgd_rtr_prfl { val.validate()? }
52380		if let Some(ref val) = self.rtr_prfl_pnsn_schme_de { val.validate()? }
52381		if let Some(ref val) = self.min_hldg_prd { val.validate()? }
52382		if let Some(ref val) = self.sstnblty_prefs { val.validate()? }
52383		if let Some(ref val) = self.othr_spcfc_invstmt_need { val.validate()? }
52384		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
52385		Ok(())
52386	}
52387}
52388
52389
52390// InvestorRestrictionType1Code ...
52391#[cfg_attr(feature = "derive_debug", derive(Debug))]
52392#[cfg_attr(feature = "derive_default", derive(Default))]
52393#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52394#[cfg_attr(feature = "derive_clone", derive(Clone))]
52395#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52396pub enum InvestorRestrictionType1Code {
52397	#[cfg_attr(feature = "derive_default", default)]
52398	#[cfg_attr( feature = "derive_serde", serde(rename = "LERE") )]
52399	CodeLERE,
52400	#[cfg_attr( feature = "derive_serde", serde(rename = "CITI") )]
52401	CodeCITI,
52402	#[cfg_attr( feature = "derive_serde", serde(rename = "INDV") )]
52403	CodeINDV,
52404}
52405
52406impl InvestorRestrictionType1Code {
52407	pub fn validate(&self) -> Result<(), ValidationError> {
52408		Ok(())
52409	}
52410}
52411
52412
52413// InvestorRestrictionType3Choice ...
52414#[cfg_attr(feature = "derive_debug", derive(Debug))]
52415#[cfg_attr(feature = "derive_default", derive(Default))]
52416#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52417#[cfg_attr(feature = "derive_clone", derive(Clone))]
52418#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52419pub struct InvestorRestrictionType3Choice {
52420	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
52421	pub cd: Option<InvestorRestrictionType1Code>,
52422	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
52423	pub prtry: Option<GenericIdentification30>,
52424}
52425
52426impl InvestorRestrictionType3Choice {
52427	pub fn validate(&self) -> Result<(), ValidationError> {
52428		if let Some(ref val) = self.cd { val.validate()? }
52429		if let Some(ref val) = self.prtry { val.validate()? }
52430		Ok(())
52431	}
52432}
52433
52434
52435// InvestorType1Code ...
52436#[cfg_attr(feature = "derive_debug", derive(Debug))]
52437#[cfg_attr(feature = "derive_default", derive(Default))]
52438#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52439#[cfg_attr(feature = "derive_clone", derive(Clone))]
52440#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52441pub enum InvestorType1Code {
52442	#[cfg_attr(feature = "derive_default", default)]
52443	#[cfg_attr( feature = "derive_serde", serde(rename = "RETL") )]
52444	CodeRETL,
52445	#[cfg_attr( feature = "derive_serde", serde(rename = "PROF") )]
52446	CodePROF,
52447	#[cfg_attr( feature = "derive_serde", serde(rename = "STAF") )]
52448	CodeSTAF,
52449	#[cfg_attr( feature = "derive_serde", serde(rename = "PPER") )]
52450	CodePPER,
52451}
52452
52453impl InvestorType1Code {
52454	pub fn validate(&self) -> Result<(), ValidationError> {
52455		Ok(())
52456	}
52457}
52458
52459
52460// InvestorType2 ...
52461#[cfg_attr(feature = "derive_debug", derive(Debug))]
52462#[cfg_attr(feature = "derive_default", derive(Default))]
52463#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52464#[cfg_attr(feature = "derive_clone", derive(Clone))]
52465#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52466pub struct InvestorType2 {
52467	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrTpRtl", skip_serializing_if = "Option::is_none") )]
52468	pub invstr_tp_rtl: Option<TargetMarket1Code>,
52469	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrTpPrfssnl", skip_serializing_if = "Option::is_none") )]
52470	pub invstr_tp_prfssnl: Option<TargetMarket5Choice>,
52471	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrTpElgblCtrPty", skip_serializing_if = "Option::is_none") )]
52472	pub invstr_tp_elgbl_ctr_pty: Option<TargetMarket3Code>,
52473	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
52474	pub othr: Option<Vec<OtherTargetMarketInvestor1>>,
52475}
52476
52477impl InvestorType2 {
52478	pub fn validate(&self) -> Result<(), ValidationError> {
52479		if let Some(ref val) = self.invstr_tp_rtl { val.validate()? }
52480		if let Some(ref val) = self.invstr_tp_prfssnl { val.validate()? }
52481		if let Some(ref val) = self.invstr_tp_elgbl_ctr_pty { val.validate()? }
52482		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
52483		Ok(())
52484	}
52485}
52486
52487
52488// InvestorType2Code ...
52489#[cfg_attr(feature = "derive_debug", derive(Debug))]
52490#[cfg_attr(feature = "derive_default", derive(Default))]
52491#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52492#[cfg_attr(feature = "derive_clone", derive(Clone))]
52493#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52494pub enum InvestorType2Code {
52495	#[cfg_attr(feature = "derive_default", default)]
52496	#[cfg_attr( feature = "derive_serde", serde(rename = "BOT3") )]
52497	CodeBOT3,
52498	#[cfg_attr( feature = "derive_serde", serde(rename = "EPRO") )]
52499	CodeEPRO,
52500	#[cfg_attr( feature = "derive_serde", serde(rename = "PRF2") )]
52501	CodePRF2,
52502}
52503
52504impl InvestorType2Code {
52505	pub fn validate(&self) -> Result<(), ValidationError> {
52506		Ok(())
52507	}
52508}
52509
52510
52511// InvestorType3Choice ...
52512#[cfg_attr(feature = "derive_debug", derive(Debug))]
52513#[cfg_attr(feature = "derive_default", derive(Default))]
52514#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52515#[cfg_attr(feature = "derive_clone", derive(Clone))]
52516#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52517pub struct InvestorType3Choice {
52518	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
52519	pub cd: Option<InvestorType1Code>,
52520	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
52521	pub prtry: Option<GenericIdentification30>,
52522}
52523
52524impl InvestorType3Choice {
52525	pub fn validate(&self) -> Result<(), ValidationError> {
52526		if let Some(ref val) = self.cd { val.validate()? }
52527		if let Some(ref val) = self.prtry { val.validate()? }
52528		Ok(())
52529	}
52530}
52531
52532
52533// InvestorType3Code ...
52534#[cfg_attr(feature = "derive_debug", derive(Debug))]
52535#[cfg_attr(feature = "derive_default", derive(Default))]
52536#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52537#[cfg_attr(feature = "derive_clone", derive(Clone))]
52538#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52539pub enum InvestorType3Code {
52540	#[cfg_attr(feature = "derive_default", default)]
52541	#[cfg_attr( feature = "derive_serde", serde(rename = "RETL") )]
52542	CodeRETL,
52543	#[cfg_attr( feature = "derive_serde", serde(rename = "PRF2") )]
52544	CodePRF2,
52545	#[cfg_attr( feature = "derive_serde", serde(rename = "NEI1") )]
52546	CodeNEI1,
52547	#[cfg_attr( feature = "derive_serde", serde(rename = "BOT2") )]
52548	CodeBOT2,
52549}
52550
52551impl InvestorType3Code {
52552	pub fn validate(&self) -> Result<(), ValidationError> {
52553		Ok(())
52554	}
52555}
52556
52557
52558// InvestorType4Code ...
52559#[cfg_attr(feature = "derive_debug", derive(Debug))]
52560#[cfg_attr(feature = "derive_default", derive(Default))]
52561#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52562#[cfg_attr(feature = "derive_clone", derive(Clone))]
52563#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52564pub enum InvestorType4Code {
52565	#[cfg_attr(feature = "derive_default", default)]
52566	#[cfg_attr( feature = "derive_serde", serde(rename = "BOT3") )]
52567	CodeBOT3,
52568	#[cfg_attr( feature = "derive_serde", serde(rename = "NPRF") )]
52569	CodeNPRF,
52570	#[cfg_attr( feature = "derive_serde", serde(rename = "PRF3") )]
52571	CodePRF3,
52572	#[cfg_attr( feature = "derive_serde", serde(rename = "PRF4") )]
52573	CodePRF4,
52574}
52575
52576impl InvestorType4Code {
52577	pub fn validate(&self) -> Result<(), ValidationError> {
52578		Ok(())
52579	}
52580}
52581
52582
52583// InvoiceTaxReportTransactionStatus1 ...
52584#[cfg_attr(feature = "derive_debug", derive(Debug))]
52585#[cfg_attr(feature = "derive_default", derive(Default))]
52586#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52587#[cfg_attr(feature = "derive_clone", derive(Clone))]
52588#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52589pub struct InvoiceTaxReportTransactionStatus1 {
52590	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRptId") )]
52591	pub tax_rpt_id: String,
52592	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
52593	pub sts: TaxReportingStatus2Code,
52594	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtnRule", skip_serializing_if = "Option::is_none") )]
52595	pub vldtn_rule: Option<Vec<GenericValidationRuleIdentification1>>,
52596	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
52597	pub splmtry_data: Option<Vec<SupplementaryData1>>,
52598}
52599
52600impl InvoiceTaxReportTransactionStatus1 {
52601	pub fn validate(&self) -> Result<(), ValidationError> {
52602		if self.tax_rpt_id.chars().count() < 1 {
52603			return Err(ValidationError::new(1001, "tax_rpt_id is shorter than the minimum length of 1".to_string()));
52604		}
52605		if self.tax_rpt_id.chars().count() > 35 {
52606			return Err(ValidationError::new(1002, "tax_rpt_id exceeds the maximum length of 35".to_string()));
52607		}
52608		self.sts.validate()?;
52609		if let Some(ref vec) = self.vldtn_rule { for item in vec { item.validate()? } }
52610		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
52611		Ok(())
52612	}
52613}
52614
52615
52616// InvoiceTaxStatusReportHeader1 ...
52617#[cfg_attr(feature = "derive_debug", derive(Debug))]
52618#[cfg_attr(feature = "derive_default", derive(Default))]
52619#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52620#[cfg_attr(feature = "derive_clone", derive(Clone))]
52621#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52622pub struct InvoiceTaxStatusReportHeader1 {
52623	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxAuthrty", skip_serializing_if = "Option::is_none") )]
52624	pub tax_authrty: Option<TaxOrganisationIdentification1>,
52625	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
52626	pub msg_id: MessageIdentification1,
52627	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
52628	pub orgnl_msg_id: MessageIdentification1,
52629	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSts") )]
52630	pub rpt_sts: TaxReportingStatus1Code,
52631	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtnRule", skip_serializing_if = "Option::is_none") )]
52632	pub vldtn_rule: Option<Vec<GenericValidationRuleIdentification1>>,
52633}
52634
52635impl InvoiceTaxStatusReportHeader1 {
52636	pub fn validate(&self) -> Result<(), ValidationError> {
52637		if let Some(ref val) = self.tax_authrty { val.validate()? }
52638		self.msg_id.validate()?;
52639		self.orgnl_msg_id.validate()?;
52640		self.rpt_sts.validate()?;
52641		if let Some(ref vec) = self.vldtn_rule { for item in vec { item.validate()? } }
52642		Ok(())
52643	}
52644}
52645
52646
52647// Issuance5 ...
52648#[cfg_attr(feature = "derive_debug", derive(Debug))]
52649#[cfg_attr(feature = "derive_default", derive(Default))]
52650#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52651#[cfg_attr(feature = "derive_clone", derive(Clone))]
52652#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52653pub struct Issuance5 {
52654	#[cfg_attr( feature = "derive_serde", serde(rename = "IssePlc", skip_serializing_if = "Option::is_none") )]
52655	pub isse_plc: Option<String>,
52656	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfIsse", skip_serializing_if = "Option::is_none") )]
52657	pub ctry_of_isse: Option<String>,
52658	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseDt", skip_serializing_if = "Option::is_none") )]
52659	pub isse_dt: Option<String>,
52660	#[cfg_attr( feature = "derive_serde", serde(rename = "AnncmntDt", skip_serializing_if = "Option::is_none") )]
52661	pub anncmnt_dt: Option<String>,
52662	#[cfg_attr( feature = "derive_serde", serde(rename = "ISINVldFr", skip_serializing_if = "Option::is_none") )]
52663	pub isin_vld_fr: Option<String>,
52664	#[cfg_attr( feature = "derive_serde", serde(rename = "IssrOrg", skip_serializing_if = "Option::is_none") )]
52665	pub issr_org: Option<Organisation38>,
52666	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseNmnlAmt", skip_serializing_if = "Option::is_none") )]
52667	pub isse_nmnl_amt: Option<FinancialInstrumentQuantity1Choice>,
52668	#[cfg_attr( feature = "derive_serde", serde(rename = "FullIssdAmt", skip_serializing_if = "Option::is_none") )]
52669	pub full_issd_amt: Option<ActiveCurrencyAndAmount>,
52670	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseSz", skip_serializing_if = "Option::is_none") )]
52671	pub isse_sz: Option<f64>,
52672	#[cfg_attr( feature = "derive_serde", serde(rename = "IssePric", skip_serializing_if = "Option::is_none") )]
52673	pub isse_pric: Option<PriceValue1>,
52674	#[cfg_attr( feature = "derive_serde", serde(rename = "IssncDstrbtn", skip_serializing_if = "Option::is_none") )]
52675	pub issnc_dstrbtn: Option<SecuritiesTransactionType31Choice>,
52676	#[cfg_attr( feature = "derive_serde", serde(rename = "GovngLaw", skip_serializing_if = "Option::is_none") )]
52677	pub govng_law: Option<Vec<Jurisdiction1>>,
52678}
52679
52680impl Issuance5 {
52681	pub fn validate(&self) -> Result<(), ValidationError> {
52682		if let Some(ref val) = self.isse_plc {
52683			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
52684			if !pattern.is_match(val) {
52685				return Err(ValidationError::new(1005, "isse_plc does not match the required pattern".to_string()));
52686			}
52687		}
52688		if let Some(ref val) = self.ctry_of_isse {
52689			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
52690			if !pattern.is_match(val) {
52691				return Err(ValidationError::new(1005, "ctry_of_isse does not match the required pattern".to_string()));
52692			}
52693		}
52694		if let Some(ref val) = self.issr_org { val.validate()? }
52695		if let Some(ref val) = self.isse_nmnl_amt { val.validate()? }
52696		if let Some(ref val) = self.full_issd_amt { val.validate()? }
52697		if let Some(ref val) = self.isse_pric { val.validate()? }
52698		if let Some(ref val) = self.issnc_dstrbtn { val.validate()? }
52699		if let Some(ref vec) = self.govng_law { for item in vec { item.validate()? } }
52700		Ok(())
52701	}
52702}
52703
52704
52705// Issuance6 ...
52706#[cfg_attr(feature = "derive_debug", derive(Debug))]
52707#[cfg_attr(feature = "derive_default", derive(Default))]
52708#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52709#[cfg_attr(feature = "derive_clone", derive(Clone))]
52710#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52711pub struct Issuance6 {
52712	#[cfg_attr( feature = "derive_serde", serde(rename = "IssePlc", skip_serializing_if = "Option::is_none") )]
52713	pub isse_plc: Option<String>,
52714	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfIsse", skip_serializing_if = "Option::is_none") )]
52715	pub ctry_of_isse: Option<String>,
52716	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseDt", skip_serializing_if = "Option::is_none") )]
52717	pub isse_dt: Option<String>,
52718	#[cfg_attr( feature = "derive_serde", serde(rename = "AnncmntDt", skip_serializing_if = "Option::is_none") )]
52719	pub anncmnt_dt: Option<String>,
52720	#[cfg_attr( feature = "derive_serde", serde(rename = "IssrOrg", skip_serializing_if = "Option::is_none") )]
52721	pub issr_org: Option<Organisation38>,
52722	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseNmnlAmt", skip_serializing_if = "Option::is_none") )]
52723	pub isse_nmnl_amt: Option<FinancialInstrumentQuantity1Choice>,
52724	#[cfg_attr( feature = "derive_serde", serde(rename = "FullIssdAmt", skip_serializing_if = "Option::is_none") )]
52725	pub full_issd_amt: Option<ActiveCurrencyAndAmount>,
52726	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseSz", skip_serializing_if = "Option::is_none") )]
52727	pub isse_sz: Option<f64>,
52728	#[cfg_attr( feature = "derive_serde", serde(rename = "IssePric", skip_serializing_if = "Option::is_none") )]
52729	pub isse_pric: Option<PriceValue1>,
52730	#[cfg_attr( feature = "derive_serde", serde(rename = "IssncDstrbtn", skip_serializing_if = "Option::is_none") )]
52731	pub issnc_dstrbtn: Option<SecuritiesTransactionType31Choice>,
52732	#[cfg_attr( feature = "derive_serde", serde(rename = "GovngLaw", skip_serializing_if = "Option::is_none") )]
52733	pub govng_law: Option<Vec<Jurisdiction1>>,
52734}
52735
52736impl Issuance6 {
52737	pub fn validate(&self) -> Result<(), ValidationError> {
52738		if let Some(ref val) = self.isse_plc {
52739			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
52740			if !pattern.is_match(val) {
52741				return Err(ValidationError::new(1005, "isse_plc does not match the required pattern".to_string()));
52742			}
52743		}
52744		if let Some(ref val) = self.ctry_of_isse {
52745			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
52746			if !pattern.is_match(val) {
52747				return Err(ValidationError::new(1005, "ctry_of_isse does not match the required pattern".to_string()));
52748			}
52749		}
52750		if let Some(ref val) = self.issr_org { val.validate()? }
52751		if let Some(ref val) = self.isse_nmnl_amt { val.validate()? }
52752		if let Some(ref val) = self.full_issd_amt { val.validate()? }
52753		if let Some(ref val) = self.isse_pric { val.validate()? }
52754		if let Some(ref val) = self.issnc_dstrbtn { val.validate()? }
52755		if let Some(ref vec) = self.govng_law { for item in vec { item.validate()? } }
52756		Ok(())
52757	}
52758}
52759
52760
52761// IssuanceAccount2 ...
52762#[cfg_attr(feature = "derive_debug", derive(Debug))]
52763#[cfg_attr(feature = "derive_default", derive(Default))]
52764#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52765#[cfg_attr(feature = "derive_clone", derive(Clone))]
52766#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52767pub struct IssuanceAccount2 {
52768	#[cfg_attr( feature = "derive_serde", serde(rename = "IssncAcct") )]
52769	pub issnc_acct: SecuritiesAccount19,
52770	#[cfg_attr( feature = "derive_serde", serde(rename = "PmryAcctInd") )]
52771	pub pmry_acct_ind: bool,
52772}
52773
52774impl IssuanceAccount2 {
52775	pub fn validate(&self) -> Result<(), ValidationError> {
52776		self.issnc_acct.validate()?;
52777		Ok(())
52778	}
52779}
52780
52781
52782// IssuerCSDIdentification1 ...
52783#[cfg_attr(feature = "derive_debug", derive(Debug))]
52784#[cfg_attr(feature = "derive_default", derive(Default))]
52785#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52786#[cfg_attr(feature = "derive_clone", derive(Clone))]
52787#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52788pub struct IssuerCSDIdentification1 {
52789	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
52790	pub lei: Option<String>,
52791	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstTwoCharsInstrmId") )]
52792	pub frst_two_chars_instrm_id: String,
52793	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
52794	pub ctry: Option<String>,
52795}
52796
52797impl IssuerCSDIdentification1 {
52798	pub fn validate(&self) -> Result<(), ValidationError> {
52799		if let Some(ref val) = self.lei {
52800			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
52801			if !pattern.is_match(val) {
52802				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
52803			}
52804		}
52805		let pattern = Regex::new("[A-Z]{2}").unwrap();
52806		if !pattern.is_match(&self.frst_two_chars_instrm_id) {
52807			return Err(ValidationError::new(1005, "frst_two_chars_instrm_id does not match the required pattern".to_string()));
52808		}
52809		if let Some(ref val) = self.ctry {
52810			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
52811			if !pattern.is_match(val) {
52812				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
52813			}
52814		}
52815		Ok(())
52816	}
52817}
52818
52819
52820// IssuerCSDReport1 ...
52821#[cfg_attr(feature = "derive_debug", derive(Debug))]
52822#[cfg_attr(feature = "derive_default", derive(Default))]
52823#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52824#[cfg_attr(feature = "derive_clone", derive(Clone))]
52825#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52826pub struct IssuerCSDReport1 {
52827	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
52828	pub id: IssuerCSDIdentification1,
52829	#[cfg_attr( feature = "derive_serde", serde(rename = "OvrllTtl") )]
52830	pub ovrll_ttl: InternalisationData1,
52831	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrm") )]
52832	pub fin_instrm: SettlementInternaliserFinancialInstrument1,
52833	#[cfg_attr( feature = "derive_serde", serde(rename = "TxTp") )]
52834	pub tx_tp: SettlementInternaliserTransactionType1,
52835	#[cfg_attr( feature = "derive_serde", serde(rename = "ClntTp") )]
52836	pub clnt_tp: SettlementInternaliserClientType1,
52837	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlCshTrf") )]
52838	pub ttl_csh_trf: InternalisationData1,
52839}
52840
52841impl IssuerCSDReport1 {
52842	pub fn validate(&self) -> Result<(), ValidationError> {
52843		self.id.validate()?;
52844		self.ovrll_ttl.validate()?;
52845		self.fin_instrm.validate()?;
52846		self.tx_tp.validate()?;
52847		self.clnt_tp.validate()?;
52848		self.ttl_csh_trf.validate()?;
52849		Ok(())
52850	}
52851}
52852
52853
52854// IssuerJurisdiction1Choice ...
52855#[cfg_attr(feature = "derive_debug", derive(Debug))]
52856#[cfg_attr(feature = "derive_default", derive(Default))]
52857#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52858#[cfg_attr(feature = "derive_clone", derive(Clone))]
52859#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52860pub struct IssuerJurisdiction1Choice {
52861	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryCd", skip_serializing_if = "Option::is_none") )]
52862	pub ctry_cd: Option<String>,
52863	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
52864	pub othr: Option<String>,
52865}
52866
52867impl IssuerJurisdiction1Choice {
52868	pub fn validate(&self) -> Result<(), ValidationError> {
52869		if let Some(ref val) = self.ctry_cd {
52870			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
52871			if !pattern.is_match(val) {
52872				return Err(ValidationError::new(1005, "ctry_cd does not match the required pattern".to_string()));
52873			}
52874		}
52875		if let Some(ref val) = self.othr {
52876			if val.chars().count() < 1 {
52877				return Err(ValidationError::new(1001, "othr is shorter than the minimum length of 1".to_string()));
52878			}
52879			if val.chars().count() > 35 {
52880				return Err(ValidationError::new(1002, "othr exceeds the maximum length of 35".to_string()));
52881			}
52882		}
52883		Ok(())
52884	}
52885}
52886
52887
52888// Jurisdiction1 ...
52889#[cfg_attr(feature = "derive_debug", derive(Debug))]
52890#[cfg_attr(feature = "derive_default", derive(Default))]
52891#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52892#[cfg_attr(feature = "derive_clone", derive(Clone))]
52893#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52894pub struct Jurisdiction1 {
52895	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
52896	pub id: Option<String>,
52897	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
52898	pub ctry: Option<String>,
52899}
52900
52901impl Jurisdiction1 {
52902	pub fn validate(&self) -> Result<(), ValidationError> {
52903		if let Some(ref val) = self.id {
52904			if val.chars().count() < 1 {
52905				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
52906			}
52907			if val.chars().count() > 70 {
52908				return Err(ValidationError::new(1002, "id exceeds the maximum length of 70".to_string()));
52909			}
52910		}
52911		if let Some(ref val) = self.ctry {
52912			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
52913			if !pattern.is_match(val) {
52914				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
52915			}
52916		}
52917		Ok(())
52918	}
52919}
52920
52921
52922// KYCCheckType1Choice ...
52923#[cfg_attr(feature = "derive_debug", derive(Debug))]
52924#[cfg_attr(feature = "derive_default", derive(Default))]
52925#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52926#[cfg_attr(feature = "derive_clone", derive(Clone))]
52927#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52928pub struct KYCCheckType1Choice {
52929	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
52930	pub cd: Option<KnowYourCustomerCheckType1Code>,
52931	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
52932	pub prtry: Option<GenericIdentification47>,
52933}
52934
52935impl KYCCheckType1Choice {
52936	pub fn validate(&self) -> Result<(), ValidationError> {
52937		if let Some(ref val) = self.cd { val.validate()? }
52938		if let Some(ref val) = self.prtry { val.validate()? }
52939		Ok(())
52940	}
52941}
52942
52943
52944// KnowYourCustomerCheckType1Code ...
52945#[cfg_attr(feature = "derive_debug", derive(Debug))]
52946#[cfg_attr(feature = "derive_default", derive(Default))]
52947#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52948#[cfg_attr(feature = "derive_clone", derive(Clone))]
52949#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52950pub enum KnowYourCustomerCheckType1Code {
52951	#[cfg_attr(feature = "derive_default", default)]
52952	#[cfg_attr( feature = "derive_serde", serde(rename = "ENHA") )]
52953	CodeENHA,
52954	#[cfg_attr( feature = "derive_serde", serde(rename = "ORDN") )]
52955	CodeORDN,
52956	#[cfg_attr( feature = "derive_serde", serde(rename = "SIMP") )]
52957	CodeSIMP,
52958}
52959
52960impl KnowYourCustomerCheckType1Code {
52961	pub fn validate(&self) -> Result<(), ValidationError> {
52962		Ok(())
52963	}
52964}
52965
52966
52967// LaxPayload ...
52968#[cfg_attr(feature = "derive_debug", derive(Debug))]
52969#[cfg_attr(feature = "derive_default", derive(Default))]
52970#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52971#[cfg_attr(feature = "derive_clone", derive(Clone))]
52972#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52973pub struct LaxPayload {
52974}
52975
52976impl LaxPayload {
52977	pub fn validate(&self) -> Result<(), ValidationError> {
52978		Ok(())
52979	}
52980}
52981
52982
52983// LegalMandate1 ...
52984#[cfg_attr(feature = "derive_debug", derive(Debug))]
52985#[cfg_attr(feature = "derive_default", derive(Default))]
52986#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
52987#[cfg_attr(feature = "derive_clone", derive(Clone))]
52988#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
52989pub struct LegalMandate1 {
52990	#[cfg_attr( feature = "derive_serde", serde(rename = "Prgrph") )]
52991	pub prgrph: String,
52992	#[cfg_attr( feature = "derive_serde", serde(rename = "Dsclmr", skip_serializing_if = "Option::is_none") )]
52993	pub dsclmr: Option<String>,
52994}
52995
52996impl LegalMandate1 {
52997	pub fn validate(&self) -> Result<(), ValidationError> {
52998		if self.prgrph.chars().count() < 1 {
52999			return Err(ValidationError::new(1001, "prgrph is shorter than the minimum length of 1".to_string()));
53000		}
53001		if self.prgrph.chars().count() > 35 {
53002			return Err(ValidationError::new(1002, "prgrph exceeds the maximum length of 35".to_string()));
53003		}
53004		if let Some(ref val) = self.dsclmr {
53005			if val.chars().count() < 1 {
53006				return Err(ValidationError::new(1001, "dsclmr is shorter than the minimum length of 1".to_string()));
53007			}
53008			if val.chars().count() > 350 {
53009				return Err(ValidationError::new(1002, "dsclmr exceeds the maximum length of 350".to_string()));
53010			}
53011		}
53012		Ok(())
53013	}
53014}
53015
53016
53017// LegalOrganisation1 ...
53018#[cfg_attr(feature = "derive_debug", derive(Debug))]
53019#[cfg_attr(feature = "derive_default", derive(Default))]
53020#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53021#[cfg_attr(feature = "derive_clone", derive(Clone))]
53022#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53023pub struct LegalOrganisation1 {
53024	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
53025	pub id: Option<String>,
53026	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
53027	pub nm: Option<String>,
53028}
53029
53030impl LegalOrganisation1 {
53031	pub fn validate(&self) -> Result<(), ValidationError> {
53032		if let Some(ref val) = self.id {
53033			if val.chars().count() < 1 {
53034				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
53035			}
53036			if val.chars().count() > 35 {
53037				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
53038			}
53039		}
53040		if let Some(ref val) = self.nm {
53041			if val.chars().count() < 1 {
53042				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
53043			}
53044			if val.chars().count() > 140 {
53045				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
53046			}
53047		}
53048		Ok(())
53049	}
53050}
53051
53052
53053// LegalOrganisation2 ...
53054#[cfg_attr(feature = "derive_debug", derive(Debug))]
53055#[cfg_attr(feature = "derive_default", derive(Default))]
53056#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53057#[cfg_attr(feature = "derive_clone", derive(Clone))]
53058#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53059pub struct LegalOrganisation2 {
53060	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
53061	pub id: Option<String>,
53062	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
53063	pub nm: Option<String>,
53064	#[cfg_attr( feature = "derive_serde", serde(rename = "EstblishmtDt", skip_serializing_if = "Option::is_none") )]
53065	pub estblishmt_dt: Option<String>,
53066	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnDt", skip_serializing_if = "Option::is_none") )]
53067	pub regn_dt: Option<String>,
53068}
53069
53070impl LegalOrganisation2 {
53071	pub fn validate(&self) -> Result<(), ValidationError> {
53072		if let Some(ref val) = self.id {
53073			if val.chars().count() < 1 {
53074				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
53075			}
53076			if val.chars().count() > 35 {
53077				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
53078			}
53079		}
53080		if let Some(ref val) = self.nm {
53081			if val.chars().count() < 1 {
53082				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
53083			}
53084			if val.chars().count() > 140 {
53085				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
53086			}
53087		}
53088		Ok(())
53089	}
53090}
53091
53092
53093// LegalPersonIdentification1 ...
53094#[cfg_attr(feature = "derive_debug", derive(Debug))]
53095#[cfg_attr(feature = "derive_default", derive(Default))]
53096#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53097#[cfg_attr(feature = "derive_clone", derive(Clone))]
53098#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53099pub struct LegalPersonIdentification1 {
53100	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
53101	pub id: OrganisationIdentification15Choice,
53102	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
53103	pub ctry: Option<String>,
53104}
53105
53106impl LegalPersonIdentification1 {
53107	pub fn validate(&self) -> Result<(), ValidationError> {
53108		self.id.validate()?;
53109		if let Some(ref val) = self.ctry {
53110			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
53111			if !pattern.is_match(val) {
53112				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
53113			}
53114		}
53115		Ok(())
53116	}
53117}
53118
53119
53120// LegalRestrictions1Code ...
53121#[cfg_attr(feature = "derive_debug", derive(Debug))]
53122#[cfg_attr(feature = "derive_default", derive(Default))]
53123#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53124#[cfg_attr(feature = "derive_clone", derive(Clone))]
53125#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53126pub enum LegalRestrictions1Code {
53127	#[cfg_attr(feature = "derive_default", default)]
53128	#[cfg_attr( feature = "derive_serde", serde(rename = "USLE") )]
53129	CodeUSLE,
53130	#[cfg_attr( feature = "derive_serde", serde(rename = "NORE") )]
53131	CodeNORE,
53132	#[cfg_attr( feature = "derive_serde", serde(rename = "REST") )]
53133	CodeREST,
53134}
53135
53136impl LegalRestrictions1Code {
53137	pub fn validate(&self) -> Result<(), ValidationError> {
53138		Ok(())
53139	}
53140}
53141
53142
53143// LegalRestrictions2Code ...
53144#[cfg_attr(feature = "derive_debug", derive(Debug))]
53145#[cfg_attr(feature = "derive_default", derive(Default))]
53146#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53147#[cfg_attr(feature = "derive_clone", derive(Clone))]
53148#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53149pub enum LegalRestrictions2Code {
53150	#[cfg_attr(feature = "derive_default", default)]
53151	#[cfg_attr( feature = "derive_serde", serde(rename = "JURO") )]
53152	CodeJURO,
53153	#[cfg_attr( feature = "derive_serde", serde(rename = "PPLA") )]
53154	CodePPLA,
53155	#[cfg_attr( feature = "derive_serde", serde(rename = "ACRI") )]
53156	CodeACRI,
53157	#[cfg_attr( feature = "derive_serde", serde(rename = "MARG") )]
53158	CodeMARG,
53159	#[cfg_attr( feature = "derive_serde", serde(rename = "PRIV") )]
53160	CodePRIV,
53161}
53162
53163impl LegalRestrictions2Code {
53164	pub fn validate(&self) -> Result<(), ValidationError> {
53165		Ok(())
53166	}
53167}
53168
53169
53170// LegalRestrictions4Choice ...
53171#[cfg_attr(feature = "derive_debug", derive(Debug))]
53172#[cfg_attr(feature = "derive_default", derive(Default))]
53173#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53174#[cfg_attr(feature = "derive_clone", derive(Clone))]
53175#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53176pub struct LegalRestrictions4Choice {
53177	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
53178	pub cd: Option<LegalRestrictions1Code>,
53179	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
53180	pub prtry: Option<GenericIdentification30>,
53181}
53182
53183impl LegalRestrictions4Choice {
53184	pub fn validate(&self) -> Result<(), ValidationError> {
53185		if let Some(ref val) = self.cd { val.validate()? }
53186		if let Some(ref val) = self.prtry { val.validate()? }
53187		Ok(())
53188	}
53189}
53190
53191
53192// LegalRestrictions5Choice ...
53193#[cfg_attr(feature = "derive_debug", derive(Debug))]
53194#[cfg_attr(feature = "derive_default", derive(Default))]
53195#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53196#[cfg_attr(feature = "derive_clone", derive(Clone))]
53197#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53198pub struct LegalRestrictions5Choice {
53199	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
53200	pub cd: Option<LegalRestrictions2Code>,
53201	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
53202	pub prtry: Option<GenericIdentification30>,
53203}
53204
53205impl LegalRestrictions5Choice {
53206	pub fn validate(&self) -> Result<(), ValidationError> {
53207		if let Some(ref val) = self.cd { val.validate()? }
53208		if let Some(ref val) = self.prtry { val.validate()? }
53209		Ok(())
53210	}
53211}
53212
53213
53214// LetterIntent1 ...
53215#[cfg_attr(feature = "derive_debug", derive(Debug))]
53216#[cfg_attr(feature = "derive_default", derive(Default))]
53217#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53218#[cfg_attr(feature = "derive_clone", derive(Clone))]
53219#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53220pub struct LetterIntent1 {
53221	#[cfg_attr( feature = "derive_serde", serde(rename = "LttrInttRef") )]
53222	pub lttr_intt_ref: String,
53223	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
53224	pub amt: Option<ActiveCurrencyAnd13DecimalAmount>,
53225	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
53226	pub start_dt: Option<String>,
53227	#[cfg_attr( feature = "derive_serde", serde(rename = "EndDt", skip_serializing_if = "Option::is_none") )]
53228	pub end_dt: Option<String>,
53229}
53230
53231impl LetterIntent1 {
53232	pub fn validate(&self) -> Result<(), ValidationError> {
53233		if self.lttr_intt_ref.chars().count() < 1 {
53234			return Err(ValidationError::new(1001, "lttr_intt_ref is shorter than the minimum length of 1".to_string()));
53235		}
53236		if self.lttr_intt_ref.chars().count() > 35 {
53237			return Err(ValidationError::new(1002, "lttr_intt_ref exceeds the maximum length of 35".to_string()));
53238		}
53239		if let Some(ref val) = self.amt { val.validate()? }
53240		Ok(())
53241	}
53242}
53243
53244
53245// LevelOfControl1Choice ...
53246#[cfg_attr(feature = "derive_debug", derive(Debug))]
53247#[cfg_attr(feature = "derive_default", derive(Default))]
53248#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53249#[cfg_attr(feature = "derive_clone", derive(Clone))]
53250#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53251pub struct LevelOfControl1Choice {
53252	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
53253	pub cd: Option<LevelOfControl1Code>,
53254	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
53255	pub prtry: Option<GenericIdentification47>,
53256}
53257
53258impl LevelOfControl1Choice {
53259	pub fn validate(&self) -> Result<(), ValidationError> {
53260		if let Some(ref val) = self.cd { val.validate()? }
53261		if let Some(ref val) = self.prtry { val.validate()? }
53262		Ok(())
53263	}
53264}
53265
53266
53267// LevelOfControl1Code ...
53268#[cfg_attr(feature = "derive_debug", derive(Debug))]
53269#[cfg_attr(feature = "derive_default", derive(Default))]
53270#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53271#[cfg_attr(feature = "derive_clone", derive(Clone))]
53272#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53273pub enum LevelOfControl1Code {
53274	#[cfg_attr(feature = "derive_default", default)]
53275	#[cfg_attr( feature = "derive_serde", serde(rename = "TRAN") )]
53276	CodeTRAN,
53277	#[cfg_attr( feature = "derive_serde", serde(rename = "VIEW") )]
53278	CodeVIEW,
53279}
53280
53281impl LevelOfControl1Code {
53282	pub fn validate(&self) -> Result<(), ValidationError> {
53283		Ok(())
53284	}
53285}
53286
53287
53288// Liability1Choice ...
53289#[cfg_attr(feature = "derive_debug", derive(Debug))]
53290#[cfg_attr(feature = "derive_default", derive(Default))]
53291#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53292#[cfg_attr(feature = "derive_clone", derive(Clone))]
53293#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53294pub struct Liability1Choice {
53295	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
53296	pub cd: Option<Liability1Code>,
53297	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
53298	pub prtry: Option<GenericIdentification47>,
53299}
53300
53301impl Liability1Choice {
53302	pub fn validate(&self) -> Result<(), ValidationError> {
53303		if let Some(ref val) = self.cd { val.validate()? }
53304		if let Some(ref val) = self.prtry { val.validate()? }
53305		Ok(())
53306	}
53307}
53308
53309
53310// Liability1Code ...
53311#[cfg_attr(feature = "derive_debug", derive(Debug))]
53312#[cfg_attr(feature = "derive_default", derive(Default))]
53313#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53314#[cfg_attr(feature = "derive_clone", derive(Clone))]
53315#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53316pub enum Liability1Code {
53317	#[cfg_attr(feature = "derive_default", default)]
53318	#[cfg_attr( feature = "derive_serde", serde(rename = "INVE") )]
53319	CodeINVE,
53320	#[cfg_attr( feature = "derive_serde", serde(rename = "BROK") )]
53321	CodeBROK,
53322}
53323
53324impl Liability1Code {
53325	pub fn validate(&self) -> Result<(), ValidationError> {
53326		Ok(())
53327	}
53328}
53329
53330
53331// Limit10 ...
53332#[cfg_attr(feature = "derive_debug", derive(Debug))]
53333#[cfg_attr(feature = "derive_default", derive(Default))]
53334#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53335#[cfg_attr(feature = "derive_clone", derive(Clone))]
53336#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53337pub struct Limit10 {
53338	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
53339	pub amt: Amount2Choice,
53340	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
53341	pub cdt_dbt_ind: Option<CreditDebitCode>,
53342}
53343
53344impl Limit10 {
53345	pub fn validate(&self) -> Result<(), ValidationError> {
53346		self.amt.validate()?;
53347		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
53348		Ok(())
53349	}
53350}
53351
53352
53353// Limit2 ...
53354#[cfg_attr(feature = "derive_debug", derive(Debug))]
53355#[cfg_attr(feature = "derive_default", derive(Default))]
53356#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53357#[cfg_attr(feature = "derive_clone", derive(Clone))]
53358#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53359pub struct Limit2 {
53360	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
53361	pub amt: ActiveOrHistoricCurrencyAndAmount,
53362	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
53363	pub cdt_dbt_ind: FloorLimitType1Code,
53364}
53365
53366impl Limit2 {
53367	pub fn validate(&self) -> Result<(), ValidationError> {
53368		self.amt.validate()?;
53369		self.cdt_dbt_ind.validate()?;
53370		Ok(())
53371	}
53372}
53373
53374
53375// Limit5 ...
53376#[cfg_attr(feature = "derive_debug", derive(Debug))]
53377#[cfg_attr(feature = "derive_default", derive(Default))]
53378#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53379#[cfg_attr(feature = "derive_clone", derive(Clone))]
53380#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53381pub struct Limit5 {
53382	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
53383	pub amt: Amount2Choice,
53384	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
53385	pub cdt_dbt_ind: CreditDebitCode,
53386}
53387
53388impl Limit5 {
53389	pub fn validate(&self) -> Result<(), ValidationError> {
53390		self.amt.validate()?;
53391		self.cdt_dbt_ind.validate()?;
53392		Ok(())
53393	}
53394}
53395
53396
53397// Limit7 ...
53398#[cfg_attr(feature = "derive_debug", derive(Debug))]
53399#[cfg_attr(feature = "derive_default", derive(Default))]
53400#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53401#[cfg_attr(feature = "derive_clone", derive(Clone))]
53402#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53403pub struct Limit7 {
53404	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
53405	pub amt: Amount2Choice,
53406	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
53407	pub cdt_dbt_ind: Option<CreditDebitCode>,
53408	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
53409	pub sts: Option<LimitStatus1Code>,
53410	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDtTm", skip_serializing_if = "Option::is_none") )]
53411	pub start_dt_tm: Option<DateAndDateTime2Choice>,
53412	#[cfg_attr( feature = "derive_serde", serde(rename = "UsdAmt", skip_serializing_if = "Option::is_none") )]
53413	pub usd_amt: Option<Amount2Choice>,
53414	#[cfg_attr( feature = "derive_serde", serde(rename = "UsdAmtCdtDbtInd", skip_serializing_if = "Option::is_none") )]
53415	pub usd_amt_cdt_dbt_ind: Option<CreditDebitCode>,
53416	#[cfg_attr( feature = "derive_serde", serde(rename = "UsdPctg", skip_serializing_if = "Option::is_none") )]
53417	pub usd_pctg: Option<f64>,
53418	#[cfg_attr( feature = "derive_serde", serde(rename = "RmngAmt", skip_serializing_if = "Option::is_none") )]
53419	pub rmng_amt: Option<Amount2Choice>,
53420}
53421
53422impl Limit7 {
53423	pub fn validate(&self) -> Result<(), ValidationError> {
53424		self.amt.validate()?;
53425		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
53426		if let Some(ref val) = self.sts { val.validate()? }
53427		if let Some(ref val) = self.start_dt_tm { val.validate()? }
53428		if let Some(ref val) = self.usd_amt { val.validate()? }
53429		if let Some(ref val) = self.usd_amt_cdt_dbt_ind { val.validate()? }
53430		if let Some(ref val) = self.rmng_amt { val.validate()? }
53431		Ok(())
53432	}
53433}
53434
53435
53436// Limit8 ...
53437#[cfg_attr(feature = "derive_debug", derive(Debug))]
53438#[cfg_attr(feature = "derive_default", derive(Default))]
53439#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53440#[cfg_attr(feature = "derive_clone", derive(Clone))]
53441#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53442pub struct Limit8 {
53443	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDtTm", skip_serializing_if = "Option::is_none") )]
53444	pub start_dt_tm: Option<DateAndDateTime2Choice>,
53445	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
53446	pub amt: Amount2Choice,
53447	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
53448	pub cdt_dbt_ind: Option<CreditDebitCode>,
53449}
53450
53451impl Limit8 {
53452	pub fn validate(&self) -> Result<(), ValidationError> {
53453		if let Some(ref val) = self.start_dt_tm { val.validate()? }
53454		self.amt.validate()?;
53455		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
53456		Ok(())
53457	}
53458}
53459
53460
53461// LimitCriteria7 ...
53462#[cfg_attr(feature = "derive_debug", derive(Debug))]
53463#[cfg_attr(feature = "derive_default", derive(Default))]
53464#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53465#[cfg_attr(feature = "derive_clone", derive(Clone))]
53466#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53467pub struct LimitCriteria7 {
53468	#[cfg_attr( feature = "derive_serde", serde(rename = "NewQryNm", skip_serializing_if = "Option::is_none") )]
53469	pub new_qry_nm: Option<String>,
53470	#[cfg_attr( feature = "derive_serde", serde(rename = "SchCrit", skip_serializing_if = "Option::is_none") )]
53471	pub sch_crit: Option<Vec<LimitSearchCriteria7>>,
53472	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrCrit", skip_serializing_if = "Option::is_none") )]
53473	pub rtr_crit: Option<LimitReturnCriteria2>,
53474}
53475
53476impl LimitCriteria7 {
53477	pub fn validate(&self) -> Result<(), ValidationError> {
53478		if let Some(ref val) = self.new_qry_nm {
53479			if val.chars().count() < 1 {
53480				return Err(ValidationError::new(1001, "new_qry_nm is shorter than the minimum length of 1".to_string()));
53481			}
53482			if val.chars().count() > 35 {
53483				return Err(ValidationError::new(1002, "new_qry_nm exceeds the maximum length of 35".to_string()));
53484			}
53485		}
53486		if let Some(ref vec) = self.sch_crit { for item in vec { item.validate()? } }
53487		if let Some(ref val) = self.rtr_crit { val.validate()? }
53488		Ok(())
53489	}
53490}
53491
53492
53493// LimitCriteria7Choice ...
53494#[cfg_attr(feature = "derive_debug", derive(Debug))]
53495#[cfg_attr(feature = "derive_default", derive(Default))]
53496#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53497#[cfg_attr(feature = "derive_clone", derive(Clone))]
53498#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53499pub struct LimitCriteria7Choice {
53500	#[cfg_attr( feature = "derive_serde", serde(rename = "QryNm", skip_serializing_if = "Option::is_none") )]
53501	pub qry_nm: Option<String>,
53502	#[cfg_attr( feature = "derive_serde", serde(rename = "NewCrit", skip_serializing_if = "Option::is_none") )]
53503	pub new_crit: Option<LimitCriteria7>,
53504}
53505
53506impl LimitCriteria7Choice {
53507	pub fn validate(&self) -> Result<(), ValidationError> {
53508		if let Some(ref val) = self.qry_nm {
53509			if val.chars().count() < 1 {
53510				return Err(ValidationError::new(1001, "qry_nm is shorter than the minimum length of 1".to_string()));
53511			}
53512			if val.chars().count() > 35 {
53513				return Err(ValidationError::new(1002, "qry_nm exceeds the maximum length of 35".to_string()));
53514			}
53515		}
53516		if let Some(ref val) = self.new_crit { val.validate()? }
53517		Ok(())
53518	}
53519}
53520
53521
53522// LimitIdentification3Choice ...
53523#[cfg_attr(feature = "derive_debug", derive(Debug))]
53524#[cfg_attr(feature = "derive_default", derive(Default))]
53525#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53526#[cfg_attr(feature = "derive_clone", derive(Clone))]
53527#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53528pub struct LimitIdentification3Choice {
53529	#[cfg_attr( feature = "derive_serde", serde(rename = "Cur", skip_serializing_if = "Option::is_none") )]
53530	pub cur: Option<LimitIdentification8>,
53531	#[cfg_attr( feature = "derive_serde", serde(rename = "Dflt", skip_serializing_if = "Option::is_none") )]
53532	pub dflt: Option<LimitIdentification8>,
53533	#[cfg_attr( feature = "derive_serde", serde(rename = "AllCur", skip_serializing_if = "Option::is_none") )]
53534	pub all_cur: Option<LimitIdentification9>,
53535	#[cfg_attr( feature = "derive_serde", serde(rename = "AllDflt", skip_serializing_if = "Option::is_none") )]
53536	pub all_dflt: Option<LimitIdentification9>,
53537}
53538
53539impl LimitIdentification3Choice {
53540	pub fn validate(&self) -> Result<(), ValidationError> {
53541		if let Some(ref val) = self.cur { val.validate()? }
53542		if let Some(ref val) = self.dflt { val.validate()? }
53543		if let Some(ref val) = self.all_cur { val.validate()? }
53544		if let Some(ref val) = self.all_dflt { val.validate()? }
53545		Ok(())
53546	}
53547}
53548
53549
53550// LimitIdentification8 ...
53551#[cfg_attr(feature = "derive_debug", derive(Debug))]
53552#[cfg_attr(feature = "derive_default", derive(Default))]
53553#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53554#[cfg_attr(feature = "derive_clone", derive(Clone))]
53555#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53556pub struct LimitIdentification8 {
53557	#[cfg_attr( feature = "derive_serde", serde(rename = "SysId", skip_serializing_if = "Option::is_none") )]
53558	pub sys_id: Option<SystemIdentification2Choice>,
53559	#[cfg_attr( feature = "derive_serde", serde(rename = "BilLmtCtrPtyId", skip_serializing_if = "Option::is_none") )]
53560	pub bil_lmt_ctr_pty_id: Option<BranchAndFinancialInstitutionIdentification8>,
53561	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
53562	pub tp: LimitType1Choice,
53563	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
53564	pub acct_ownr: Option<BranchAndFinancialInstitutionIdentification8>,
53565	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
53566	pub acct_id: Option<AccountIdentification4Choice>,
53567}
53568
53569impl LimitIdentification8 {
53570	pub fn validate(&self) -> Result<(), ValidationError> {
53571		if let Some(ref val) = self.sys_id { val.validate()? }
53572		if let Some(ref val) = self.bil_lmt_ctr_pty_id { val.validate()? }
53573		self.tp.validate()?;
53574		if let Some(ref val) = self.acct_ownr { val.validate()? }
53575		if let Some(ref val) = self.acct_id { val.validate()? }
53576		Ok(())
53577	}
53578}
53579
53580
53581// LimitIdentification9 ...
53582#[cfg_attr(feature = "derive_debug", derive(Debug))]
53583#[cfg_attr(feature = "derive_default", derive(Default))]
53584#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53585#[cfg_attr(feature = "derive_clone", derive(Clone))]
53586#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53587pub struct LimitIdentification9 {
53588	#[cfg_attr( feature = "derive_serde", serde(rename = "SysId", skip_serializing_if = "Option::is_none") )]
53589	pub sys_id: Option<SystemIdentification2Choice>,
53590	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
53591	pub tp: LimitType1Choice,
53592	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
53593	pub acct_ownr: Option<BranchAndFinancialInstitutionIdentification8>,
53594	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
53595	pub acct_id: Option<AccountIdentification4Choice>,
53596}
53597
53598impl LimitIdentification9 {
53599	pub fn validate(&self) -> Result<(), ValidationError> {
53600		if let Some(ref val) = self.sys_id { val.validate()? }
53601		self.tp.validate()?;
53602		if let Some(ref val) = self.acct_ownr { val.validate()? }
53603		if let Some(ref val) = self.acct_id { val.validate()? }
53604		Ok(())
53605	}
53606}
53607
53608
53609// LimitOrError4Choice ...
53610#[cfg_attr(feature = "derive_debug", derive(Debug))]
53611#[cfg_attr(feature = "derive_default", derive(Default))]
53612#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53613#[cfg_attr(feature = "derive_clone", derive(Clone))]
53614#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53615pub struct LimitOrError4Choice {
53616	#[cfg_attr( feature = "derive_serde", serde(rename = "Lmt", skip_serializing_if = "Option::is_none") )]
53617	pub lmt: Option<Limit7>,
53618	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
53619	pub biz_err: Option<Vec<ErrorHandling5>>,
53620}
53621
53622impl LimitOrError4Choice {
53623	pub fn validate(&self) -> Result<(), ValidationError> {
53624		if let Some(ref val) = self.lmt { val.validate()? }
53625		if let Some(ref vec) = self.biz_err { for item in vec { item.validate()? } }
53626		Ok(())
53627	}
53628}
53629
53630
53631// LimitQuery5 ...
53632#[cfg_attr(feature = "derive_debug", derive(Debug))]
53633#[cfg_attr(feature = "derive_default", derive(Default))]
53634#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53635#[cfg_attr(feature = "derive_clone", derive(Clone))]
53636#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53637pub struct LimitQuery5 {
53638	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp", skip_serializing_if = "Option::is_none") )]
53639	pub qry_tp: Option<QueryType2Code>,
53640	#[cfg_attr( feature = "derive_serde", serde(rename = "LmtCrit", skip_serializing_if = "Option::is_none") )]
53641	pub lmt_crit: Option<LimitCriteria7Choice>,
53642}
53643
53644impl LimitQuery5 {
53645	pub fn validate(&self) -> Result<(), ValidationError> {
53646		if let Some(ref val) = self.qry_tp { val.validate()? }
53647		if let Some(ref val) = self.lmt_crit { val.validate()? }
53648		Ok(())
53649	}
53650}
53651
53652
53653// LimitReport8 ...
53654#[cfg_attr(feature = "derive_debug", derive(Debug))]
53655#[cfg_attr(feature = "derive_default", derive(Default))]
53656#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53657#[cfg_attr(feature = "derive_clone", derive(Clone))]
53658#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53659pub struct LimitReport8 {
53660	#[cfg_attr( feature = "derive_serde", serde(rename = "LmtId") )]
53661	pub lmt_id: LimitIdentification8,
53662	#[cfg_attr( feature = "derive_serde", serde(rename = "LmtOrErr") )]
53663	pub lmt_or_err: LimitOrError4Choice,
53664}
53665
53666impl LimitReport8 {
53667	pub fn validate(&self) -> Result<(), ValidationError> {
53668		self.lmt_id.validate()?;
53669		self.lmt_or_err.validate()?;
53670		Ok(())
53671	}
53672}
53673
53674
53675// LimitReportOrError5Choice ...
53676#[cfg_attr(feature = "derive_debug", derive(Debug))]
53677#[cfg_attr(feature = "derive_default", derive(Default))]
53678#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53679#[cfg_attr(feature = "derive_clone", derive(Clone))]
53680#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53681pub struct LimitReportOrError5Choice {
53682	#[cfg_attr( feature = "derive_serde", serde(rename = "BizRpt", skip_serializing_if = "Option::is_none") )]
53683	pub biz_rpt: Option<Limits8>,
53684	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
53685	pub oprl_err: Option<Vec<ErrorHandling5>>,
53686}
53687
53688impl LimitReportOrError5Choice {
53689	pub fn validate(&self) -> Result<(), ValidationError> {
53690		if let Some(ref val) = self.biz_rpt { val.validate()? }
53691		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
53692		Ok(())
53693	}
53694}
53695
53696
53697// LimitReturnCriteria2 ...
53698#[cfg_attr(feature = "derive_debug", derive(Debug))]
53699#[cfg_attr(feature = "derive_default", derive(Default))]
53700#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53701#[cfg_attr(feature = "derive_clone", derive(Clone))]
53702#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53703pub struct LimitReturnCriteria2 {
53704	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDtTmInd", skip_serializing_if = "Option::is_none") )]
53705	pub start_dt_tm_ind: Option<bool>,
53706	#[cfg_attr( feature = "derive_serde", serde(rename = "StsInd", skip_serializing_if = "Option::is_none") )]
53707	pub sts_ind: Option<bool>,
53708	#[cfg_attr( feature = "derive_serde", serde(rename = "UsdAmtInd", skip_serializing_if = "Option::is_none") )]
53709	pub usd_amt_ind: Option<bool>,
53710	#[cfg_attr( feature = "derive_serde", serde(rename = "UsdPctgInd", skip_serializing_if = "Option::is_none") )]
53711	pub usd_pctg_ind: Option<bool>,
53712}
53713
53714impl LimitReturnCriteria2 {
53715	pub fn validate(&self) -> Result<(), ValidationError> {
53716		Ok(())
53717	}
53718}
53719
53720
53721// LimitSearchCriteria7 ...
53722#[cfg_attr(feature = "derive_debug", derive(Debug))]
53723#[cfg_attr(feature = "derive_default", derive(Default))]
53724#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53725#[cfg_attr(feature = "derive_clone", derive(Clone))]
53726#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53727pub struct LimitSearchCriteria7 {
53728	#[cfg_attr( feature = "derive_serde", serde(rename = "SysId", skip_serializing_if = "Option::is_none") )]
53729	pub sys_id: Option<SystemIdentification2Choice>,
53730	#[cfg_attr( feature = "derive_serde", serde(rename = "BilLmtCtrPtyId", skip_serializing_if = "Option::is_none") )]
53731	pub bil_lmt_ctr_pty_id: Option<Vec<BranchAndFinancialInstitutionIdentification8>>,
53732	#[cfg_attr( feature = "derive_serde", serde(rename = "DfltLmtTp", skip_serializing_if = "Option::is_none") )]
53733	pub dflt_lmt_tp: Option<Vec<LimitType1Choice>>,
53734	#[cfg_attr( feature = "derive_serde", serde(rename = "CurLmtTp", skip_serializing_if = "Option::is_none") )]
53735	pub cur_lmt_tp: Option<Vec<LimitType1Choice>>,
53736	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
53737	pub acct_ownr: Option<BranchAndFinancialInstitutionIdentification8>,
53738	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
53739	pub acct_id: Option<AccountIdentification4Choice>,
53740	#[cfg_attr( feature = "derive_serde", serde(rename = "UsdAmt", skip_serializing_if = "Option::is_none") )]
53741	pub usd_amt: Option<ActiveAmountRange3Choice>,
53742	#[cfg_attr( feature = "derive_serde", serde(rename = "UsdPctg", skip_serializing_if = "Option::is_none") )]
53743	pub usd_pctg: Option<PercentageRange1Choice>,
53744	#[cfg_attr( feature = "derive_serde", serde(rename = "LmtCcy", skip_serializing_if = "Option::is_none") )]
53745	pub lmt_ccy: Option<String>,
53746	#[cfg_attr( feature = "derive_serde", serde(rename = "LmtAmt", skip_serializing_if = "Option::is_none") )]
53747	pub lmt_amt: Option<ActiveAmountRange3Choice>,
53748	#[cfg_attr( feature = "derive_serde", serde(rename = "LmtVldAsOfDt", skip_serializing_if = "Option::is_none") )]
53749	pub lmt_vld_as_of_dt: Option<DateAndPeriod2Choice>,
53750}
53751
53752impl LimitSearchCriteria7 {
53753	pub fn validate(&self) -> Result<(), ValidationError> {
53754		if let Some(ref val) = self.sys_id { val.validate()? }
53755		if let Some(ref vec) = self.bil_lmt_ctr_pty_id { for item in vec { item.validate()? } }
53756		if let Some(ref vec) = self.dflt_lmt_tp { for item in vec { item.validate()? } }
53757		if let Some(ref vec) = self.cur_lmt_tp { for item in vec { item.validate()? } }
53758		if let Some(ref val) = self.acct_ownr { val.validate()? }
53759		if let Some(ref val) = self.acct_id { val.validate()? }
53760		if let Some(ref val) = self.usd_amt { val.validate()? }
53761		if let Some(ref val) = self.usd_pctg { val.validate()? }
53762		if let Some(ref val) = self.lmt_ccy {
53763			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
53764			if !pattern.is_match(val) {
53765				return Err(ValidationError::new(1005, "lmt_ccy does not match the required pattern".to_string()));
53766			}
53767		}
53768		if let Some(ref val) = self.lmt_amt { val.validate()? }
53769		if let Some(ref val) = self.lmt_vld_as_of_dt { val.validate()? }
53770		Ok(())
53771	}
53772}
53773
53774
53775// LimitStatus1Code ...
53776#[cfg_attr(feature = "derive_debug", derive(Debug))]
53777#[cfg_attr(feature = "derive_default", derive(Default))]
53778#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53779#[cfg_attr(feature = "derive_clone", derive(Clone))]
53780#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53781pub enum LimitStatus1Code {
53782	#[cfg_attr(feature = "derive_default", default)]
53783	#[cfg_attr( feature = "derive_serde", serde(rename = "ENAB") )]
53784	CodeENAB,
53785	#[cfg_attr( feature = "derive_serde", serde(rename = "DISA") )]
53786	CodeDISA,
53787	#[cfg_attr( feature = "derive_serde", serde(rename = "DELD") )]
53788	CodeDELD,
53789	#[cfg_attr( feature = "derive_serde", serde(rename = "REQD") )]
53790	CodeREQD,
53791}
53792
53793impl LimitStatus1Code {
53794	pub fn validate(&self) -> Result<(), ValidationError> {
53795		Ok(())
53796	}
53797}
53798
53799
53800// LimitStructure3Choice ...
53801#[cfg_attr(feature = "derive_debug", derive(Debug))]
53802#[cfg_attr(feature = "derive_default", derive(Default))]
53803#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53804#[cfg_attr(feature = "derive_clone", derive(Clone))]
53805#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53806pub struct LimitStructure3Choice {
53807	#[cfg_attr( feature = "derive_serde", serde(rename = "CurLmtId", skip_serializing_if = "Option::is_none") )]
53808	pub cur_lmt_id: Option<LimitIdentification8>,
53809	#[cfg_attr( feature = "derive_serde", serde(rename = "AllCurLmts", skip_serializing_if = "Option::is_none") )]
53810	pub all_cur_lmts: Option<LimitIdentification9>,
53811}
53812
53813impl LimitStructure3Choice {
53814	pub fn validate(&self) -> Result<(), ValidationError> {
53815		if let Some(ref val) = self.cur_lmt_id { val.validate()? }
53816		if let Some(ref val) = self.all_cur_lmts { val.validate()? }
53817		Ok(())
53818	}
53819}
53820
53821
53822// LimitStructure5 ...
53823#[cfg_attr(feature = "derive_debug", derive(Debug))]
53824#[cfg_attr(feature = "derive_default", derive(Default))]
53825#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53826#[cfg_attr(feature = "derive_clone", derive(Clone))]
53827#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53828pub struct LimitStructure5 {
53829	#[cfg_attr( feature = "derive_serde", serde(rename = "LmtId") )]
53830	pub lmt_id: LimitIdentification3Choice,
53831	#[cfg_attr( feature = "derive_serde", serde(rename = "NewLmtValSet") )]
53832	pub new_lmt_val_set: Limit8,
53833	#[cfg_attr( feature = "derive_serde", serde(rename = "OdLmtValSet", skip_serializing_if = "Option::is_none") )]
53834	pub od_lmt_val_set: Option<Limit10>,
53835	#[cfg_attr( feature = "derive_serde", serde(rename = "LmtValAmdmnt", skip_serializing_if = "Option::is_none") )]
53836	pub lmt_val_amdmnt: Option<Amount4Choice>,
53837}
53838
53839impl LimitStructure5 {
53840	pub fn validate(&self) -> Result<(), ValidationError> {
53841		self.lmt_id.validate()?;
53842		self.new_lmt_val_set.validate()?;
53843		if let Some(ref val) = self.od_lmt_val_set { val.validate()? }
53844		if let Some(ref val) = self.lmt_val_amdmnt { val.validate()? }
53845		Ok(())
53846	}
53847}
53848
53849
53850// LimitStructure6 ...
53851#[cfg_attr(feature = "derive_debug", derive(Debug))]
53852#[cfg_attr(feature = "derive_default", derive(Default))]
53853#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53854#[cfg_attr(feature = "derive_clone", derive(Clone))]
53855#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53856pub struct LimitStructure6 {
53857	#[cfg_attr( feature = "derive_serde", serde(rename = "LmtId") )]
53858	pub lmt_id: LimitIdentification8,
53859	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDtTm", skip_serializing_if = "Option::is_none") )]
53860	pub start_dt_tm: Option<DateAndDateTime2Choice>,
53861	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
53862	pub amt: Amount2Choice,
53863	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
53864	pub cdt_dbt_ind: Option<CreditDebitCode>,
53865}
53866
53867impl LimitStructure6 {
53868	pub fn validate(&self) -> Result<(), ValidationError> {
53869		self.lmt_id.validate()?;
53870		if let Some(ref val) = self.start_dt_tm { val.validate()? }
53871		self.amt.validate()?;
53872		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
53873		Ok(())
53874	}
53875}
53876
53877
53878// LimitType1Choice ...
53879#[cfg_attr(feature = "derive_debug", derive(Debug))]
53880#[cfg_attr(feature = "derive_default", derive(Default))]
53881#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53882#[cfg_attr(feature = "derive_clone", derive(Clone))]
53883#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53884pub struct LimitType1Choice {
53885	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
53886	pub cd: Option<LimitType3Code>,
53887	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
53888	pub prtry: Option<String>,
53889}
53890
53891impl LimitType1Choice {
53892	pub fn validate(&self) -> Result<(), ValidationError> {
53893		if let Some(ref val) = self.cd { val.validate()? }
53894		if let Some(ref val) = self.prtry {
53895			if val.chars().count() < 1 {
53896				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
53897			}
53898			if val.chars().count() > 35 {
53899				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
53900			}
53901		}
53902		Ok(())
53903	}
53904}
53905
53906
53907// LimitType3Code ...
53908#[cfg_attr(feature = "derive_debug", derive(Debug))]
53909#[cfg_attr(feature = "derive_default", derive(Default))]
53910#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53911#[cfg_attr(feature = "derive_clone", derive(Clone))]
53912#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53913pub enum LimitType3Code {
53914	#[cfg_attr(feature = "derive_default", default)]
53915	#[cfg_attr( feature = "derive_serde", serde(rename = "MULT") )]
53916	CodeMULT,
53917	#[cfg_attr( feature = "derive_serde", serde(rename = "BILI") )]
53918	CodeBILI,
53919	#[cfg_attr( feature = "derive_serde", serde(rename = "MAND") )]
53920	CodeMAND,
53921	#[cfg_attr( feature = "derive_serde", serde(rename = "DISC") )]
53922	CodeDISC,
53923	#[cfg_attr( feature = "derive_serde", serde(rename = "NELI") )]
53924	CodeNELI,
53925	#[cfg_attr( feature = "derive_serde", serde(rename = "INBI") )]
53926	CodeINBI,
53927	#[cfg_attr( feature = "derive_serde", serde(rename = "GLBL") )]
53928	CodeGLBL,
53929	#[cfg_attr( feature = "derive_serde", serde(rename = "DIDB") )]
53930	CodeDIDB,
53931	#[cfg_attr( feature = "derive_serde", serde(rename = "SPLC") )]
53932	CodeSPLC,
53933	#[cfg_attr( feature = "derive_serde", serde(rename = "SPLF") )]
53934	CodeSPLF,
53935	#[cfg_attr( feature = "derive_serde", serde(rename = "TDLC") )]
53936	CodeTDLC,
53937	#[cfg_attr( feature = "derive_serde", serde(rename = "TDLF") )]
53938	CodeTDLF,
53939	#[cfg_attr( feature = "derive_serde", serde(rename = "UCDT") )]
53940	CodeUCDT,
53941	#[cfg_attr( feature = "derive_serde", serde(rename = "ACOL") )]
53942	CodeACOL,
53943	#[cfg_attr( feature = "derive_serde", serde(rename = "EXGT") )]
53944	CodeEXGT,
53945}
53946
53947impl LimitType3Code {
53948	pub fn validate(&self) -> Result<(), ValidationError> {
53949		Ok(())
53950	}
53951}
53952
53953
53954// Limits8 ...
53955#[cfg_attr(feature = "derive_debug", derive(Debug))]
53956#[cfg_attr(feature = "derive_default", derive(Default))]
53957#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53958#[cfg_attr(feature = "derive_clone", derive(Clone))]
53959#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53960pub struct Limits8 {
53961	#[cfg_attr( feature = "derive_serde", serde(rename = "CurLmt", skip_serializing_if = "Option::is_none") )]
53962	pub cur_lmt: Option<Vec<LimitReport8>>,
53963	#[cfg_attr( feature = "derive_serde", serde(rename = "DfltLmt", skip_serializing_if = "Option::is_none") )]
53964	pub dflt_lmt: Option<Vec<LimitReport8>>,
53965}
53966
53967impl Limits8 {
53968	pub fn validate(&self) -> Result<(), ValidationError> {
53969		if let Some(ref vec) = self.cur_lmt { for item in vec { item.validate()? } }
53970		if let Some(ref vec) = self.dflt_lmt { for item in vec { item.validate()? } }
53971		Ok(())
53972	}
53973}
53974
53975
53976// LinkageType1Code ...
53977#[cfg_attr(feature = "derive_debug", derive(Debug))]
53978#[cfg_attr(feature = "derive_default", derive(Default))]
53979#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
53980#[cfg_attr(feature = "derive_clone", derive(Clone))]
53981#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
53982pub enum LinkageType1Code {
53983	#[cfg_attr(feature = "derive_default", default)]
53984	#[cfg_attr( feature = "derive_serde", serde(rename = "LINK") )]
53985	CodeLINK,
53986	#[cfg_attr( feature = "derive_serde", serde(rename = "UNLK") )]
53987	CodeUNLK,
53988	#[cfg_attr( feature = "derive_serde", serde(rename = "SOFT") )]
53989	CodeSOFT,
53990}
53991
53992impl LinkageType1Code {
53993	pub fn validate(&self) -> Result<(), ValidationError> {
53994		Ok(())
53995	}
53996}
53997
53998
53999// LinkageType3Choice ...
54000#[cfg_attr(feature = "derive_debug", derive(Debug))]
54001#[cfg_attr(feature = "derive_default", derive(Default))]
54002#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54003#[cfg_attr(feature = "derive_clone", derive(Clone))]
54004#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54005pub struct LinkageType3Choice {
54006	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
54007	pub cd: Option<LinkageType1Code>,
54008	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
54009	pub prtry: Option<GenericIdentification30>,
54010}
54011
54012impl LinkageType3Choice {
54013	pub fn validate(&self) -> Result<(), ValidationError> {
54014		if let Some(ref val) = self.cd { val.validate()? }
54015		if let Some(ref val) = self.prtry { val.validate()? }
54016		Ok(())
54017	}
54018}
54019
54020
54021// Linkages57 ...
54022#[cfg_attr(feature = "derive_debug", derive(Debug))]
54023#[cfg_attr(feature = "derive_default", derive(Default))]
54024#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54025#[cfg_attr(feature = "derive_clone", derive(Clone))]
54026#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54027pub struct Linkages57 {
54028	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgPos", skip_serializing_if = "Option::is_none") )]
54029	pub prcg_pos: Option<ProcessingPosition7Choice>,
54030	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNb", skip_serializing_if = "Option::is_none") )]
54031	pub msg_nb: Option<DocumentNumber5Choice>,
54032	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref") )]
54033	pub ref_attr: References34Choice,
54034	#[cfg_attr( feature = "derive_serde", serde(rename = "RefOwnr", skip_serializing_if = "Option::is_none") )]
54035	pub ref_ownr: Option<PartyIdentification127Choice>,
54036}
54037
54038impl Linkages57 {
54039	pub fn validate(&self) -> Result<(), ValidationError> {
54040		if let Some(ref val) = self.prcg_pos { val.validate()? }
54041		if let Some(ref val) = self.msg_nb { val.validate()? }
54042		self.ref_attr.validate()?;
54043		if let Some(ref val) = self.ref_ownr { val.validate()? }
54044		Ok(())
54045	}
54046}
54047
54048
54049// LinkedMessage5Choice ...
54050#[cfg_attr(feature = "derive_debug", derive(Debug))]
54051#[cfg_attr(feature = "derive_default", derive(Default))]
54052#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54053#[cfg_attr(feature = "derive_clone", derive(Clone))]
54054#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54055pub struct LinkedMessage5Choice {
54056	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsRef", skip_serializing_if = "Option::is_none") )]
54057	pub prvs_ref: Option<AdditionalReference13>,
54058	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrRef", skip_serializing_if = "Option::is_none") )]
54059	pub othr_ref: Option<AdditionalReference13>,
54060}
54061
54062impl LinkedMessage5Choice {
54063	pub fn validate(&self) -> Result<(), ValidationError> {
54064		if let Some(ref val) = self.prvs_ref { val.validate()? }
54065		if let Some(ref val) = self.othr_ref { val.validate()? }
54066		Ok(())
54067	}
54068}
54069
54070
54071// LiquidResourceInformation1 ...
54072#[cfg_attr(feature = "derive_debug", derive(Debug))]
54073#[cfg_attr(feature = "derive_default", derive(Default))]
54074#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54075#[cfg_attr(feature = "derive_clone", derive(Clone))]
54076#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54077pub struct LiquidResourceInformation1 {
54078	#[cfg_attr( feature = "derive_serde", serde(rename = "CntrPtyId", skip_serializing_if = "Option::is_none") )]
54079	pub cntr_pty_id: Option<String>,
54080	#[cfg_attr( feature = "derive_serde", serde(rename = "LqdRsrcVal") )]
54081	pub lqd_rsrc_val: AmountAndDirection102,
54082	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal", skip_serializing_if = "Option::is_none") )]
54083	pub mkt_val: Option<AmountAndDirection102>,
54084	#[cfg_attr( feature = "derive_serde", serde(rename = "Scrd") )]
54085	pub scrd: bool,
54086	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstNcmbrd") )]
54087	pub asst_ncmbrd: bool,
54088	#[cfg_attr( feature = "derive_serde", serde(rename = "QlfygRsrc") )]
54089	pub qlfyg_rsrc: bool,
54090	#[cfg_attr( feature = "derive_serde", serde(rename = "AgcyArrgmnts") )]
54091	pub agcy_arrgmnts: bool,
54092}
54093
54094impl LiquidResourceInformation1 {
54095	pub fn validate(&self) -> Result<(), ValidationError> {
54096		if let Some(ref val) = self.cntr_pty_id {
54097			if val.chars().count() < 1 {
54098				return Err(ValidationError::new(1001, "cntr_pty_id is shorter than the minimum length of 1".to_string()));
54099			}
54100			if val.chars().count() > 35 {
54101				return Err(ValidationError::new(1002, "cntr_pty_id exceeds the maximum length of 35".to_string()));
54102			}
54103		}
54104		self.lqd_rsrc_val.validate()?;
54105		if let Some(ref val) = self.mkt_val { val.validate()? }
54106		Ok(())
54107	}
54108}
54109
54110
54111// LiquidResources1 ...
54112#[cfg_attr(feature = "derive_debug", derive(Debug))]
54113#[cfg_attr(feature = "derive_default", derive(Default))]
54114#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54115#[cfg_attr(feature = "derive_clone", derive(Clone))]
54116#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54117pub struct LiquidResources1 {
54118	#[cfg_attr( feature = "derive_serde", serde(rename = "CshDue") )]
54119	pub csh_due: Vec<LiquidResourceInformation1>,
54120	#[cfg_attr( feature = "derive_serde", serde(rename = "FcltiesCmmtdLinesOfCdt", skip_serializing_if = "Option::is_none") )]
54121	pub fclties_cmmtd_lines_of_cdt: Option<Vec<LiquidResourceInformation1>>,
54122	#[cfg_attr( feature = "derive_serde", serde(rename = "FcltiesCmmtdRpAgrmts", skip_serializing_if = "Option::is_none") )]
54123	pub fclties_cmmtd_rp_agrmts: Option<Vec<LiquidResourceInformation1>>,
54124	#[cfg_attr( feature = "derive_serde", serde(rename = "FcltiesCmmtdFxSwps", skip_serializing_if = "Option::is_none") )]
54125	pub fclties_cmmtd_fx_swps: Option<Vec<LiquidResourceInformation1>>,
54126	#[cfg_attr( feature = "derive_serde", serde(rename = "FcltiesOthrCmmtd", skip_serializing_if = "Option::is_none") )]
54127	pub fclties_othr_cmmtd: Option<Vec<LiquidResourceInformation1>>,
54128	#[cfg_attr( feature = "derive_serde", serde(rename = "FcltiesUcmmtd", skip_serializing_if = "Option::is_none") )]
54129	pub fclties_ucmmtd: Option<Vec<LiquidResourceInformation1>>,
54130	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmsCCP", skip_serializing_if = "Option::is_none") )]
54131	pub fin_instrms_ccp: Option<Vec<LiquidResourceInformation1>>,
54132	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmsTrsrInvstmts", skip_serializing_if = "Option::is_none") )]
54133	pub fin_instrms_trsr_invstmts: Option<Vec<LiquidResourceInformation1>>,
54134	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmsDfltrsSttlmColl", skip_serializing_if = "Option::is_none") )]
54135	pub fin_instrms_dfltrs_sttlm_coll: Option<Vec<LiquidResourceInformation1>>,
54136	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmsDfltrsNonCshColl", skip_serializing_if = "Option::is_none") )]
54137	pub fin_instrms_dfltrs_non_csh_coll: Option<Vec<LiquidResourceInformation1>>,
54138}
54139
54140impl LiquidResources1 {
54141	pub fn validate(&self) -> Result<(), ValidationError> {
54142		for item in &self.csh_due { item.validate()? }
54143		if let Some(ref vec) = self.fclties_cmmtd_lines_of_cdt { for item in vec { item.validate()? } }
54144		if let Some(ref vec) = self.fclties_cmmtd_rp_agrmts { for item in vec { item.validate()? } }
54145		if let Some(ref vec) = self.fclties_cmmtd_fx_swps { for item in vec { item.validate()? } }
54146		if let Some(ref vec) = self.fclties_othr_cmmtd { for item in vec { item.validate()? } }
54147		if let Some(ref vec) = self.fclties_ucmmtd { for item in vec { item.validate()? } }
54148		if let Some(ref vec) = self.fin_instrms_ccp { for item in vec { item.validate()? } }
54149		if let Some(ref vec) = self.fin_instrms_trsr_invstmts { for item in vec { item.validate()? } }
54150		if let Some(ref vec) = self.fin_instrms_dfltrs_sttlm_coll { for item in vec { item.validate()? } }
54151		if let Some(ref vec) = self.fin_instrms_dfltrs_non_csh_coll { for item in vec { item.validate()? } }
54152		Ok(())
54153	}
54154}
54155
54156
54157// LiquidityCreditTransfer4 ...
54158#[cfg_attr(feature = "derive_debug", derive(Debug))]
54159#[cfg_attr(feature = "derive_default", derive(Default))]
54160#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54161#[cfg_attr(feature = "derive_clone", derive(Clone))]
54162#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54163pub struct LiquidityCreditTransfer4 {
54164	#[cfg_attr( feature = "derive_serde", serde(rename = "LqdtyTrfId", skip_serializing_if = "Option::is_none") )]
54165	pub lqdty_trf_id: Option<PaymentIdentification8>,
54166	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
54167	pub cdtr: Option<BranchAndFinancialInstitutionIdentification8>,
54168	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
54169	pub cdtr_acct: Option<CashAccount40>,
54170	#[cfg_attr( feature = "derive_serde", serde(rename = "TrfdAmt") )]
54171	pub trfd_amt: Amount2Choice,
54172	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
54173	pub dbtr: Option<BranchAndFinancialInstitutionIdentification8>,
54174	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
54175	pub dbtr_acct: Option<CashAccount40>,
54176	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmDt", skip_serializing_if = "Option::is_none") )]
54177	pub sttlm_dt: Option<String>,
54178}
54179
54180impl LiquidityCreditTransfer4 {
54181	pub fn validate(&self) -> Result<(), ValidationError> {
54182		if let Some(ref val) = self.lqdty_trf_id { val.validate()? }
54183		if let Some(ref val) = self.cdtr { val.validate()? }
54184		if let Some(ref val) = self.cdtr_acct { val.validate()? }
54185		self.trfd_amt.validate()?;
54186		if let Some(ref val) = self.dbtr { val.validate()? }
54187		if let Some(ref val) = self.dbtr_acct { val.validate()? }
54188		Ok(())
54189	}
54190}
54191
54192
54193// LiquidityDebitTransfer4 ...
54194#[cfg_attr(feature = "derive_debug", derive(Debug))]
54195#[cfg_attr(feature = "derive_default", derive(Default))]
54196#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54197#[cfg_attr(feature = "derive_clone", derive(Clone))]
54198#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54199pub struct LiquidityDebitTransfer4 {
54200	#[cfg_attr( feature = "derive_serde", serde(rename = "LqdtyTrfId", skip_serializing_if = "Option::is_none") )]
54201	pub lqdty_trf_id: Option<PaymentIdentification8>,
54202	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
54203	pub cdtr: Option<BranchAndFinancialInstitutionIdentification8>,
54204	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
54205	pub cdtr_acct: Option<CashAccount40>,
54206	#[cfg_attr( feature = "derive_serde", serde(rename = "TrfdAmt") )]
54207	pub trfd_amt: Amount2Choice,
54208	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
54209	pub dbtr: Option<BranchAndFinancialInstitutionIdentification8>,
54210	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
54211	pub dbtr_acct: Option<CashAccount40>,
54212	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmDt", skip_serializing_if = "Option::is_none") )]
54213	pub sttlm_dt: Option<String>,
54214}
54215
54216impl LiquidityDebitTransfer4 {
54217	pub fn validate(&self) -> Result<(), ValidationError> {
54218		if let Some(ref val) = self.lqdty_trf_id { val.validate()? }
54219		if let Some(ref val) = self.cdtr { val.validate()? }
54220		if let Some(ref val) = self.cdtr_acct { val.validate()? }
54221		self.trfd_amt.validate()?;
54222		if let Some(ref val) = self.dbtr { val.validate()? }
54223		if let Some(ref val) = self.dbtr_acct { val.validate()? }
54224		Ok(())
54225	}
54226}
54227
54228
54229// LiquidityRequiredAndAvailable1 ...
54230#[cfg_attr(feature = "derive_debug", derive(Debug))]
54231#[cfg_attr(feature = "derive_default", derive(Default))]
54232#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54233#[cfg_attr(feature = "derive_clone", derive(Clone))]
54234#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54235pub struct LiquidityRequiredAndAvailable1 {
54236	#[cfg_attr( feature = "derive_serde", serde(rename = "LqdRsrcs") )]
54237	pub lqd_rsrcs: LiquidResources1,
54238	#[cfg_attr( feature = "derive_serde", serde(rename = "LqdtyHrzn") )]
54239	pub lqdty_hrzn: SettlementDate6Code,
54240	#[cfg_attr( feature = "derive_serde", serde(rename = "StrssLqdRsrcRqrmnt") )]
54241	pub strss_lqd_rsrc_rqrmnt: StressLiquidResourceRequirement1,
54242}
54243
54244impl LiquidityRequiredAndAvailable1 {
54245	pub fn validate(&self) -> Result<(), ValidationError> {
54246		self.lqd_rsrcs.validate()?;
54247		self.lqdty_hrzn.validate()?;
54248		self.strss_lqd_rsrc_rqrmnt.validate()?;
54249		Ok(())
54250	}
54251}
54252
54253
54254// LiquidityStressScenarioDefinition1 ...
54255#[cfg_attr(feature = "derive_debug", derive(Debug))]
54256#[cfg_attr(feature = "derive_default", derive(Default))]
54257#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54258#[cfg_attr(feature = "derive_clone", derive(Clone))]
54259#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54260pub struct LiquidityStressScenarioDefinition1 {
54261	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
54262	pub id: GenericIdentification168,
54263	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc") )]
54264	pub desc: String,
54265	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
54266	pub tp: Option<String>,
54267	#[cfg_attr( feature = "derive_serde", serde(rename = "StrssCcy") )]
54268	pub strss_ccy: String,
54269}
54270
54271impl LiquidityStressScenarioDefinition1 {
54272	pub fn validate(&self) -> Result<(), ValidationError> {
54273		self.id.validate()?;
54274		if self.desc.chars().count() < 1 {
54275			return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
54276		}
54277		if self.desc.chars().count() > 2000 {
54278			return Err(ValidationError::new(1002, "desc exceeds the maximum length of 2000".to_string()));
54279		}
54280		if let Some(ref val) = self.tp {
54281			if val.chars().count() < 1 {
54282				return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
54283			}
54284			if val.chars().count() > 35 {
54285				return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
54286			}
54287		}
54288		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
54289		if !pattern.is_match(&self.strss_ccy) {
54290			return Err(ValidationError::new(1005, "strss_ccy does not match the required pattern".to_string()));
54291		}
54292		Ok(())
54293	}
54294}
54295
54296
54297// LiquidityStressTestResult1 ...
54298#[cfg_attr(feature = "derive_debug", derive(Debug))]
54299#[cfg_attr(feature = "derive_default", derive(Default))]
54300#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54301#[cfg_attr(feature = "derive_clone", derive(Clone))]
54302#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54303pub struct LiquidityStressTestResult1 {
54304	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
54305	pub id: String,
54306	#[cfg_attr( feature = "derive_serde", serde(rename = "ScnroDfltrs") )]
54307	pub scnro_dfltrs: CoverTwoDefaulters1,
54308	#[cfg_attr( feature = "derive_serde", serde(rename = "LqdtyReqrdAndAvlbl") )]
54309	pub lqdty_reqrd_and_avlbl: Vec<LiquidityRequiredAndAvailable1>,
54310}
54311
54312impl LiquidityStressTestResult1 {
54313	pub fn validate(&self) -> Result<(), ValidationError> {
54314		if self.id.chars().count() < 1 {
54315			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
54316		}
54317		if self.id.chars().count() > 256 {
54318			return Err(ValidationError::new(1002, "id exceeds the maximum length of 256".to_string()));
54319		}
54320		self.scnro_dfltrs.validate()?;
54321		for item in &self.lqdty_reqrd_and_avlbl { item.validate()? }
54322		Ok(())
54323	}
54324}
54325
54326
54327// LoanContract4 ...
54328#[cfg_attr(feature = "derive_debug", derive(Debug))]
54329#[cfg_attr(feature = "derive_default", derive(Default))]
54330#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54331#[cfg_attr(feature = "derive_clone", derive(Clone))]
54332#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54333pub struct LoanContract4 {
54334	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctDocId") )]
54335	pub ctrct_doc_id: DocumentIdentification22,
54336	#[cfg_attr( feature = "derive_serde", serde(rename = "LnTpId", skip_serializing_if = "Option::is_none") )]
54337	pub ln_tp_id: Option<String>,
54338	#[cfg_attr( feature = "derive_serde", serde(rename = "Buyr") )]
54339	pub buyr: Vec<TradeParty6>,
54340	#[cfg_attr( feature = "derive_serde", serde(rename = "Sellr") )]
54341	pub sellr: Vec<TradeParty6>,
54342	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
54343	pub amt: Option<ActiveCurrencyAndAmount>,
54344	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
54345	pub mtrty_dt: Option<String>,
54346	#[cfg_attr( feature = "derive_serde", serde(rename = "PrlngtnFlg", skip_serializing_if = "Option::is_none") )]
54347	pub prlngtn_flg: Option<bool>,
54348	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
54349	pub start_dt: Option<String>,
54350	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcy", skip_serializing_if = "Option::is_none") )]
54351	pub sttlm_ccy: Option<String>,
54352	#[cfg_attr( feature = "derive_serde", serde(rename = "SpclConds", skip_serializing_if = "Option::is_none") )]
54353	pub spcl_conds: Option<SpecialCondition1>,
54354	#[cfg_attr( feature = "derive_serde", serde(rename = "DrtnCd", skip_serializing_if = "Option::is_none") )]
54355	pub drtn_cd: Option<String>,
54356	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRate", skip_serializing_if = "Option::is_none") )]
54357	pub intrst_rate: Option<InterestRate2Choice>,
54358	#[cfg_attr( feature = "derive_serde", serde(rename = "Trch", skip_serializing_if = "Option::is_none") )]
54359	pub trch: Option<Vec<LoanContractTranche1>>,
54360	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtSchdl", skip_serializing_if = "Option::is_none") )]
54361	pub pmt_schdl: Option<Vec<PaymentSchedule1>>,
54362	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstSchdl", skip_serializing_if = "Option::is_none") )]
54363	pub intrst_schdl: Option<Vec<InterestPaymentSchedule1>>,
54364	#[cfg_attr( feature = "derive_serde", serde(rename = "IntraCpnyLn") )]
54365	pub intra_cpny_ln: bool,
54366	#[cfg_attr( feature = "derive_serde", serde(rename = "Coll", skip_serializing_if = "Option::is_none") )]
54367	pub coll: Option<ContractCollateral1>,
54368	#[cfg_attr( feature = "derive_serde", serde(rename = "SndctdLn", skip_serializing_if = "Option::is_none") )]
54369	pub sndctd_ln: Option<Vec<SyndicatedLoan3>>,
54370	#[cfg_attr( feature = "derive_serde", serde(rename = "Attchmnt", skip_serializing_if = "Option::is_none") )]
54371	pub attchmnt: Option<Vec<DocumentGeneralInformation5>>,
54372}
54373
54374impl LoanContract4 {
54375	pub fn validate(&self) -> Result<(), ValidationError> {
54376		self.ctrct_doc_id.validate()?;
54377		if let Some(ref val) = self.ln_tp_id {
54378			if val.chars().count() < 1 {
54379				return Err(ValidationError::new(1001, "ln_tp_id is shorter than the minimum length of 1".to_string()));
54380			}
54381			if val.chars().count() > 35 {
54382				return Err(ValidationError::new(1002, "ln_tp_id exceeds the maximum length of 35".to_string()));
54383			}
54384		}
54385		for item in &self.buyr { item.validate()? }
54386		for item in &self.sellr { item.validate()? }
54387		if let Some(ref val) = self.amt { val.validate()? }
54388		if let Some(ref val) = self.sttlm_ccy {
54389			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
54390			if !pattern.is_match(val) {
54391				return Err(ValidationError::new(1005, "sttlm_ccy does not match the required pattern".to_string()));
54392			}
54393		}
54394		if let Some(ref val) = self.spcl_conds { val.validate()? }
54395		if let Some(ref val) = self.drtn_cd {
54396			let pattern = Regex::new("[0-9]").unwrap();
54397			if !pattern.is_match(val) {
54398				return Err(ValidationError::new(1005, "drtn_cd does not match the required pattern".to_string()));
54399			}
54400		}
54401		if let Some(ref val) = self.intrst_rate { val.validate()? }
54402		if let Some(ref vec) = self.trch { for item in vec { item.validate()? } }
54403		if let Some(ref vec) = self.pmt_schdl { for item in vec { item.validate()? } }
54404		if let Some(ref vec) = self.intrst_schdl { for item in vec { item.validate()? } }
54405		if let Some(ref val) = self.coll { val.validate()? }
54406		if let Some(ref vec) = self.sndctd_ln { for item in vec { item.validate()? } }
54407		if let Some(ref vec) = self.attchmnt { for item in vec { item.validate()? } }
54408		Ok(())
54409	}
54410}
54411
54412
54413// LoanContractTranche1 ...
54414#[cfg_attr(feature = "derive_debug", derive(Debug))]
54415#[cfg_attr(feature = "derive_default", derive(Default))]
54416#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54417#[cfg_attr(feature = "derive_clone", derive(Clone))]
54418#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54419pub struct LoanContractTranche1 {
54420	#[cfg_attr( feature = "derive_serde", serde(rename = "TrchNb") )]
54421	pub trch_nb: f64,
54422	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdDt") )]
54423	pub xpctd_dt: String,
54424	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
54425	pub amt: ActiveCurrencyAndAmount,
54426	#[cfg_attr( feature = "derive_serde", serde(rename = "DueDt", skip_serializing_if = "Option::is_none") )]
54427	pub due_dt: Option<String>,
54428	#[cfg_attr( feature = "derive_serde", serde(rename = "DrtnCd", skip_serializing_if = "Option::is_none") )]
54429	pub drtn_cd: Option<String>,
54430	#[cfg_attr( feature = "derive_serde", serde(rename = "LastTrchInd", skip_serializing_if = "Option::is_none") )]
54431	pub last_trch_ind: Option<bool>,
54432}
54433
54434impl LoanContractTranche1 {
54435	pub fn validate(&self) -> Result<(), ValidationError> {
54436		self.amt.validate()?;
54437		if let Some(ref val) = self.drtn_cd {
54438			let pattern = Regex::new("[0-9]").unwrap();
54439			if !pattern.is_match(val) {
54440				return Err(ValidationError::new(1005, "drtn_cd does not match the required pattern".to_string()));
54441			}
54442		}
54443		Ok(())
54444	}
54445}
54446
54447
54448// LoanData113 ...
54449#[cfg_attr(feature = "derive_debug", derive(Debug))]
54450#[cfg_attr(feature = "derive_default", derive(Default))]
54451#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54452#[cfg_attr(feature = "derive_clone", derive(Clone))]
54453#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54454pub struct LoanData113 {
54455	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr") )]
54456	pub unq_trad_idr: String,
54457	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
54458	pub evt_dt: String,
54459	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal") )]
54460	pub mkt_val: AmountAndDirection53,
54461}
54462
54463impl LoanData113 {
54464	pub fn validate(&self) -> Result<(), ValidationError> {
54465		if self.unq_trad_idr.chars().count() < 1 {
54466			return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
54467		}
54468		if self.unq_trad_idr.chars().count() > 52 {
54469			return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
54470		}
54471		self.mkt_val.validate()?;
54472		Ok(())
54473	}
54474}
54475
54476
54477// LoanData120 ...
54478#[cfg_attr(feature = "derive_debug", derive(Debug))]
54479#[cfg_attr(feature = "derive_default", derive(Default))]
54480#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54481#[cfg_attr(feature = "derive_clone", derive(Clone))]
54482#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54483pub struct LoanData120 {
54484	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
54485	pub evt_dt: String,
54486	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr", skip_serializing_if = "Option::is_none") )]
54487	pub unq_trad_idr: Option<String>,
54488	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
54489	pub mstr_agrmt: Option<MasterAgreement7>,
54490}
54491
54492impl LoanData120 {
54493	pub fn validate(&self) -> Result<(), ValidationError> {
54494		if let Some(ref val) = self.unq_trad_idr {
54495			if val.chars().count() < 1 {
54496				return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
54497			}
54498			if val.chars().count() > 52 {
54499				return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
54500			}
54501		}
54502		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
54503		Ok(())
54504	}
54505}
54506
54507
54508// LoanData134 ...
54509#[cfg_attr(feature = "derive_debug", derive(Debug))]
54510#[cfg_attr(feature = "derive_default", derive(Default))]
54511#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54512#[cfg_attr(feature = "derive_clone", derive(Clone))]
54513#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54514pub struct LoanData134 {
54515	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctTp", skip_serializing_if = "Option::is_none") )]
54516	pub ctrct_tp: Option<ExposureType10Code>,
54517	#[cfg_attr( feature = "derive_serde", serde(rename = "Clrd", skip_serializing_if = "Option::is_none") )]
54518	pub clrd: Option<bool>,
54519	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtflCd", skip_serializing_if = "Option::is_none") )]
54520	pub prtfl_cd: Option<String>,
54521	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
54522	pub tradg_vn: Option<TradingVenueType1Choice>,
54523	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmtTp", skip_serializing_if = "Option::is_none") )]
54524	pub mstr_agrmt_tp: Option<String>,
54525	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
54526	pub mtrty_dt: Option<String>,
54527	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlColl", skip_serializing_if = "Option::is_none") )]
54528	pub gnl_coll: Option<SpecialCollateral1Code>,
54529	#[cfg_attr( feature = "derive_serde", serde(rename = "Term", skip_serializing_if = "Option::is_none") )]
54530	pub term: Option<ContractTerm6Choice>,
54531	#[cfg_attr( feature = "derive_serde", serde(rename = "Rates", skip_serializing_if = "Option::is_none") )]
54532	pub rates: Option<Rates1Choice>,
54533	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplAmtCcy", skip_serializing_if = "Option::is_none") )]
54534	pub prncpl_amt_ccy: Option<String>,
54535	#[cfg_attr( feature = "derive_serde", serde(rename = "PricCcy", skip_serializing_if = "Option::is_none") )]
54536	pub pric_ccy: Option<String>,
54537	#[cfg_attr( feature = "derive_serde", serde(rename = "Scty", skip_serializing_if = "Option::is_none") )]
54538	pub scty: Option<Security49>,
54539	#[cfg_attr( feature = "derive_serde", serde(rename = "OutsdngMrgnLnCcy", skip_serializing_if = "Option::is_none") )]
54540	pub outsdng_mrgn_ln_ccy: Option<String>,
54541}
54542
54543impl LoanData134 {
54544	pub fn validate(&self) -> Result<(), ValidationError> {
54545		if let Some(ref val) = self.ctrct_tp { val.validate()? }
54546		if let Some(ref val) = self.prtfl_cd {
54547			if val.chars().count() < 1 {
54548				return Err(ValidationError::new(1001, "prtfl_cd is shorter than the minimum length of 1".to_string()));
54549			}
54550			if val.chars().count() > 52 {
54551				return Err(ValidationError::new(1002, "prtfl_cd exceeds the maximum length of 52".to_string()));
54552			}
54553		}
54554		if let Some(ref val) = self.tradg_vn { val.validate()? }
54555		if let Some(ref val) = self.mstr_agrmt_tp {
54556			if val.chars().count() < 1 {
54557				return Err(ValidationError::new(1001, "mstr_agrmt_tp is shorter than the minimum length of 1".to_string()));
54558			}
54559			if val.chars().count() > 4 {
54560				return Err(ValidationError::new(1002, "mstr_agrmt_tp exceeds the maximum length of 4".to_string()));
54561			}
54562		}
54563		if let Some(ref val) = self.gnl_coll { val.validate()? }
54564		if let Some(ref val) = self.term { val.validate()? }
54565		if let Some(ref val) = self.rates { val.validate()? }
54566		if let Some(ref val) = self.prncpl_amt_ccy {
54567			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
54568			if !pattern.is_match(val) {
54569				return Err(ValidationError::new(1005, "prncpl_amt_ccy does not match the required pattern".to_string()));
54570			}
54571		}
54572		if let Some(ref val) = self.pric_ccy {
54573			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
54574			if !pattern.is_match(val) {
54575				return Err(ValidationError::new(1005, "pric_ccy does not match the required pattern".to_string()));
54576			}
54577		}
54578		if let Some(ref val) = self.scty { val.validate()? }
54579		if let Some(ref val) = self.outsdng_mrgn_ln_ccy {
54580			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
54581			if !pattern.is_match(val) {
54582				return Err(ValidationError::new(1005, "outsdng_mrgn_ln_ccy does not match the required pattern".to_string()));
54583			}
54584		}
54585		Ok(())
54586	}
54587}
54588
54589
54590// LoanData135 ...
54591#[cfg_attr(feature = "derive_debug", derive(Debug))]
54592#[cfg_attr(feature = "derive_default", derive(Default))]
54593#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54594#[cfg_attr(feature = "derive_clone", derive(Clone))]
54595#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54596pub struct LoanData135 {
54597	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr") )]
54598	pub unq_trad_idr: String,
54599	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
54600	pub evt_dt: String,
54601	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnDtTm") )]
54602	pub exctn_dt_tm: String,
54603	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSts", skip_serializing_if = "Option::is_none") )]
54604	pub clr_sts: Option<Cleared16Choice>,
54605	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
54606	pub tradg_vn: Option<String>,
54607	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
54608	pub mstr_agrmt: Option<MasterAgreement7>,
54609	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
54610	pub val_dt: Option<String>,
54611	#[cfg_attr( feature = "derive_serde", serde(rename = "MinNtcePrd", skip_serializing_if = "Option::is_none") )]
54612	pub min_ntce_prd: Option<f64>,
54613	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlstCallBckDt", skip_serializing_if = "Option::is_none") )]
54614	pub earlst_call_bck_dt: Option<String>,
54615	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlColl", skip_serializing_if = "Option::is_none") )]
54616	pub gnl_coll: Option<SpecialCollateral1Code>,
54617	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryByVal", skip_serializing_if = "Option::is_none") )]
54618	pub dlvry_by_val: Option<bool>,
54619	#[cfg_attr( feature = "derive_serde", serde(rename = "CollDlvryMtd", skip_serializing_if = "Option::is_none") )]
54620	pub coll_dlvry_mtd: Option<CollateralDeliveryMethod1Code>,
54621	#[cfg_attr( feature = "derive_serde", serde(rename = "Term", skip_serializing_if = "Option::is_none") )]
54622	pub term: Option<Vec<ContractTerm7Choice>>,
54623	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRate", skip_serializing_if = "Option::is_none") )]
54624	pub intrst_rate: Option<InterestRate27Choice>,
54625	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplAmt", skip_serializing_if = "Option::is_none") )]
54626	pub prncpl_amt: Option<PrincipalAmount3>,
54627	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
54628	pub termntn_dt: Option<String>,
54629}
54630
54631impl LoanData135 {
54632	pub fn validate(&self) -> Result<(), ValidationError> {
54633		if self.unq_trad_idr.chars().count() < 1 {
54634			return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
54635		}
54636		if self.unq_trad_idr.chars().count() > 52 {
54637			return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
54638		}
54639		if let Some(ref val) = self.clr_sts { val.validate()? }
54640		if let Some(ref val) = self.tradg_vn {
54641			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
54642			if !pattern.is_match(val) {
54643				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
54644			}
54645		}
54646		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
54647		if let Some(ref val) = self.min_ntce_prd {
54648			if *val < 0.000000 {
54649				return Err(ValidationError::new(1003, "min_ntce_prd is less than the minimum value of 0.000000".to_string()));
54650			}
54651		}
54652		if let Some(ref val) = self.gnl_coll { val.validate()? }
54653		if let Some(ref val) = self.coll_dlvry_mtd { val.validate()? }
54654		if let Some(ref vec) = self.term { for item in vec { item.validate()? } }
54655		if let Some(ref val) = self.intrst_rate { val.validate()? }
54656		if let Some(ref val) = self.prncpl_amt { val.validate()? }
54657		Ok(())
54658	}
54659}
54660
54661
54662// LoanData136 ...
54663#[cfg_attr(feature = "derive_debug", derive(Debug))]
54664#[cfg_attr(feature = "derive_default", derive(Default))]
54665#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54666#[cfg_attr(feature = "derive_clone", derive(Clone))]
54667#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54668pub struct LoanData136 {
54669	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr") )]
54670	pub unq_trad_idr: String,
54671	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
54672	pub evt_dt: String,
54673	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnDtTm") )]
54674	pub exctn_dt_tm: String,
54675	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSts", skip_serializing_if = "Option::is_none") )]
54676	pub clr_sts: Option<Cleared16Choice>,
54677	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
54678	pub tradg_vn: Option<String>,
54679	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
54680	pub mstr_agrmt: Option<MasterAgreement7>,
54681	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
54682	pub val_dt: Option<String>,
54683	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
54684	pub mtrty_dt: Option<String>,
54685	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlColl", skip_serializing_if = "Option::is_none") )]
54686	pub gnl_coll: Option<SpecialCollateral1Code>,
54687	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplAmt", skip_serializing_if = "Option::is_none") )]
54688	pub prncpl_amt: Option<PrincipalAmount3>,
54689	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitPric", skip_serializing_if = "Option::is_none") )]
54690	pub unit_pric: Option<SecuritiesTransactionPrice19Choice>,
54691	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
54692	pub termntn_dt: Option<String>,
54693}
54694
54695impl LoanData136 {
54696	pub fn validate(&self) -> Result<(), ValidationError> {
54697		if self.unq_trad_idr.chars().count() < 1 {
54698			return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
54699		}
54700		if self.unq_trad_idr.chars().count() > 52 {
54701			return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
54702		}
54703		if let Some(ref val) = self.clr_sts { val.validate()? }
54704		if let Some(ref val) = self.tradg_vn {
54705			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
54706			if !pattern.is_match(val) {
54707				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
54708			}
54709		}
54710		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
54711		if let Some(ref val) = self.gnl_coll { val.validate()? }
54712		if let Some(ref val) = self.prncpl_amt { val.validate()? }
54713		if let Some(ref val) = self.unit_pric { val.validate()? }
54714		Ok(())
54715	}
54716}
54717
54718
54719// LoanData137 ...
54720#[cfg_attr(feature = "derive_debug", derive(Debug))]
54721#[cfg_attr(feature = "derive_default", derive(Default))]
54722#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54723#[cfg_attr(feature = "derive_clone", derive(Clone))]
54724#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54725pub struct LoanData137 {
54726	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr") )]
54727	pub unq_trad_idr: String,
54728	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
54729	pub evt_dt: String,
54730	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnDtTm") )]
54731	pub exctn_dt_tm: String,
54732	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSts", skip_serializing_if = "Option::is_none") )]
54733	pub clr_sts: Option<Cleared16Choice>,
54734	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
54735	pub tradg_vn: Option<String>,
54736	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
54737	pub mstr_agrmt: Option<MasterAgreement7>,
54738	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
54739	pub val_dt: Option<String>,
54740	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlColl", skip_serializing_if = "Option::is_none") )]
54741	pub gnl_coll: Option<SpecialCollateral1Code>,
54742	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryByVal", skip_serializing_if = "Option::is_none") )]
54743	pub dlvry_by_val: Option<bool>,
54744	#[cfg_attr( feature = "derive_serde", serde(rename = "CollDlvryMtd", skip_serializing_if = "Option::is_none") )]
54745	pub coll_dlvry_mtd: Option<CollateralDeliveryMethod1Code>,
54746	#[cfg_attr( feature = "derive_serde", serde(rename = "Term", skip_serializing_if = "Option::is_none") )]
54747	pub term: Option<Vec<ContractTerm7Choice>>,
54748	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstTp", skip_serializing_if = "Option::is_none") )]
54749	pub asst_tp: Option<SecurityCommodity9>,
54750	#[cfg_attr( feature = "derive_serde", serde(rename = "LnVal", skip_serializing_if = "Option::is_none") )]
54751	pub ln_val: Option<ActiveOrHistoricCurrencyAndAmount>,
54752	#[cfg_attr( feature = "derive_serde", serde(rename = "RbtRate", skip_serializing_if = "Option::is_none") )]
54753	pub rbt_rate: Option<InterestRate27Choice>,
54754	#[cfg_attr( feature = "derive_serde", serde(rename = "LndgFee", skip_serializing_if = "Option::is_none") )]
54755	pub lndg_fee: Option<f64>,
54756	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
54757	pub termntn_dt: Option<String>,
54758}
54759
54760impl LoanData137 {
54761	pub fn validate(&self) -> Result<(), ValidationError> {
54762		if self.unq_trad_idr.chars().count() < 1 {
54763			return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
54764		}
54765		if self.unq_trad_idr.chars().count() > 52 {
54766			return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
54767		}
54768		if let Some(ref val) = self.clr_sts { val.validate()? }
54769		if let Some(ref val) = self.tradg_vn {
54770			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
54771			if !pattern.is_match(val) {
54772				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
54773			}
54774		}
54775		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
54776		if let Some(ref val) = self.gnl_coll { val.validate()? }
54777		if let Some(ref val) = self.coll_dlvry_mtd { val.validate()? }
54778		if let Some(ref vec) = self.term { for item in vec { item.validate()? } }
54779		if let Some(ref val) = self.asst_tp { val.validate()? }
54780		if let Some(ref val) = self.ln_val { val.validate()? }
54781		if let Some(ref val) = self.rbt_rate { val.validate()? }
54782		Ok(())
54783	}
54784}
54785
54786
54787// LoanData138 ...
54788#[cfg_attr(feature = "derive_debug", derive(Debug))]
54789#[cfg_attr(feature = "derive_default", derive(Default))]
54790#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54791#[cfg_attr(feature = "derive_clone", derive(Clone))]
54792#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54793pub struct LoanData138 {
54794	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr") )]
54795	pub unq_trad_idr: String,
54796	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
54797	pub evt_dt: String,
54798	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnDtTm") )]
54799	pub exctn_dt_tm: String,
54800	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
54801	pub tradg_vn: Option<String>,
54802	#[cfg_attr( feature = "derive_serde", serde(rename = "CollDlvryMtd", skip_serializing_if = "Option::is_none") )]
54803	pub coll_dlvry_mtd: Option<CollateralDeliveryMethod1Code>,
54804	#[cfg_attr( feature = "derive_serde", serde(rename = "OutsdngMrgnLnAmt", skip_serializing_if = "Option::is_none") )]
54805	pub outsdng_mrgn_ln_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
54806	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtMktValAmt", skip_serializing_if = "Option::is_none") )]
54807	pub shrt_mkt_val_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
54808	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnLnAttr", skip_serializing_if = "Option::is_none") )]
54809	pub mrgn_ln_attr: Option<Vec<InterestRate6>>,
54810	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
54811	pub termntn_dt: Option<String>,
54812}
54813
54814impl LoanData138 {
54815	pub fn validate(&self) -> Result<(), ValidationError> {
54816		if self.unq_trad_idr.chars().count() < 1 {
54817			return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
54818		}
54819		if self.unq_trad_idr.chars().count() > 52 {
54820			return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
54821		}
54822		if let Some(ref val) = self.tradg_vn {
54823			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
54824			if !pattern.is_match(val) {
54825				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
54826			}
54827		}
54828		if let Some(ref val) = self.coll_dlvry_mtd { val.validate()? }
54829		if let Some(ref val) = self.outsdng_mrgn_ln_amt { val.validate()? }
54830		if let Some(ref val) = self.shrt_mkt_val_amt { val.validate()? }
54831		if let Some(ref vec) = self.mrgn_ln_attr { for item in vec { item.validate()? } }
54832		Ok(())
54833	}
54834}
54835
54836
54837// LoanData139 ...
54838#[cfg_attr(feature = "derive_debug", derive(Debug))]
54839#[cfg_attr(feature = "derive_default", derive(Default))]
54840#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54841#[cfg_attr(feature = "derive_clone", derive(Clone))]
54842#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54843pub struct LoanData139 {
54844	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr", skip_serializing_if = "Option::is_none") )]
54845	pub unq_trad_idr: Option<String>,
54846	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt", skip_serializing_if = "Option::is_none") )]
54847	pub evt_dt: Option<String>,
54848	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnDtTm", skip_serializing_if = "Option::is_none") )]
54849	pub exctn_dt_tm: Option<String>,
54850	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSts", skip_serializing_if = "Option::is_none") )]
54851	pub clr_sts: Option<Cleared16Choice>,
54852	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
54853	pub tradg_vn: Option<String>,
54854	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
54855	pub mstr_agrmt: Option<MasterAgreement7>,
54856	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
54857	pub val_dt: Option<String>,
54858	#[cfg_attr( feature = "derive_serde", serde(rename = "MinNtcePrd", skip_serializing_if = "Option::is_none") )]
54859	pub min_ntce_prd: Option<f64>,
54860	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlstCallBckDt", skip_serializing_if = "Option::is_none") )]
54861	pub earlst_call_bck_dt: Option<String>,
54862	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlColl", skip_serializing_if = "Option::is_none") )]
54863	pub gnl_coll: Option<SpecialCollateral1Code>,
54864	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryByVal", skip_serializing_if = "Option::is_none") )]
54865	pub dlvry_by_val: Option<bool>,
54866	#[cfg_attr( feature = "derive_serde", serde(rename = "CollDlvryMtd", skip_serializing_if = "Option::is_none") )]
54867	pub coll_dlvry_mtd: Option<CollateralDeliveryMethod1Code>,
54868	#[cfg_attr( feature = "derive_serde", serde(rename = "Term", skip_serializing_if = "Option::is_none") )]
54869	pub term: Option<Vec<ContractTerm7Choice>>,
54870	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRate", skip_serializing_if = "Option::is_none") )]
54871	pub intrst_rate: Option<InterestRate27Choice>,
54872	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplAmt", skip_serializing_if = "Option::is_none") )]
54873	pub prncpl_amt: Option<PrincipalAmount3>,
54874	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
54875	pub termntn_dt: Option<String>,
54876}
54877
54878impl LoanData139 {
54879	pub fn validate(&self) -> Result<(), ValidationError> {
54880		if let Some(ref val) = self.unq_trad_idr {
54881			if val.chars().count() < 1 {
54882				return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
54883			}
54884			if val.chars().count() > 52 {
54885				return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
54886			}
54887		}
54888		if let Some(ref val) = self.clr_sts { val.validate()? }
54889		if let Some(ref val) = self.tradg_vn {
54890			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
54891			if !pattern.is_match(val) {
54892				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
54893			}
54894		}
54895		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
54896		if let Some(ref val) = self.min_ntce_prd {
54897			if *val < 0.000000 {
54898				return Err(ValidationError::new(1003, "min_ntce_prd is less than the minimum value of 0.000000".to_string()));
54899			}
54900		}
54901		if let Some(ref val) = self.gnl_coll { val.validate()? }
54902		if let Some(ref val) = self.coll_dlvry_mtd { val.validate()? }
54903		if let Some(ref vec) = self.term { for item in vec { item.validate()? } }
54904		if let Some(ref val) = self.intrst_rate { val.validate()? }
54905		if let Some(ref val) = self.prncpl_amt { val.validate()? }
54906		Ok(())
54907	}
54908}
54909
54910
54911// LoanData140 ...
54912#[cfg_attr(feature = "derive_debug", derive(Debug))]
54913#[cfg_attr(feature = "derive_default", derive(Default))]
54914#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54915#[cfg_attr(feature = "derive_clone", derive(Clone))]
54916#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54917pub struct LoanData140 {
54918	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr", skip_serializing_if = "Option::is_none") )]
54919	pub unq_trad_idr: Option<String>,
54920	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
54921	pub evt_dt: String,
54922	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnDtTm", skip_serializing_if = "Option::is_none") )]
54923	pub exctn_dt_tm: Option<String>,
54924	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSts", skip_serializing_if = "Option::is_none") )]
54925	pub clr_sts: Option<Cleared16Choice>,
54926	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
54927	pub tradg_vn: Option<String>,
54928	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
54929	pub mstr_agrmt: Option<MasterAgreement7>,
54930	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
54931	pub val_dt: Option<String>,
54932	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
54933	pub mtrty_dt: Option<String>,
54934	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlColl", skip_serializing_if = "Option::is_none") )]
54935	pub gnl_coll: Option<SpecialCollateral1Code>,
54936	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplAmt", skip_serializing_if = "Option::is_none") )]
54937	pub prncpl_amt: Option<PrincipalAmount3>,
54938	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitPric", skip_serializing_if = "Option::is_none") )]
54939	pub unit_pric: Option<SecuritiesTransactionPrice19Choice>,
54940	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
54941	pub termntn_dt: Option<String>,
54942}
54943
54944impl LoanData140 {
54945	pub fn validate(&self) -> Result<(), ValidationError> {
54946		if let Some(ref val) = self.unq_trad_idr {
54947			if val.chars().count() < 1 {
54948				return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
54949			}
54950			if val.chars().count() > 52 {
54951				return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
54952			}
54953		}
54954		if let Some(ref val) = self.clr_sts { val.validate()? }
54955		if let Some(ref val) = self.tradg_vn {
54956			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
54957			if !pattern.is_match(val) {
54958				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
54959			}
54960		}
54961		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
54962		if let Some(ref val) = self.gnl_coll { val.validate()? }
54963		if let Some(ref val) = self.prncpl_amt { val.validate()? }
54964		if let Some(ref val) = self.unit_pric { val.validate()? }
54965		Ok(())
54966	}
54967}
54968
54969
54970// LoanData141 ...
54971#[cfg_attr(feature = "derive_debug", derive(Debug))]
54972#[cfg_attr(feature = "derive_default", derive(Default))]
54973#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
54974#[cfg_attr(feature = "derive_clone", derive(Clone))]
54975#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
54976pub struct LoanData141 {
54977	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr", skip_serializing_if = "Option::is_none") )]
54978	pub unq_trad_idr: Option<String>,
54979	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
54980	pub evt_dt: String,
54981	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnDtTm", skip_serializing_if = "Option::is_none") )]
54982	pub exctn_dt_tm: Option<String>,
54983	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSts", skip_serializing_if = "Option::is_none") )]
54984	pub clr_sts: Option<Cleared16Choice>,
54985	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
54986	pub tradg_vn: Option<String>,
54987	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
54988	pub mstr_agrmt: Option<MasterAgreement7>,
54989	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
54990	pub val_dt: Option<String>,
54991	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlColl", skip_serializing_if = "Option::is_none") )]
54992	pub gnl_coll: Option<SpecialCollateral1Code>,
54993	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryByVal", skip_serializing_if = "Option::is_none") )]
54994	pub dlvry_by_val: Option<bool>,
54995	#[cfg_attr( feature = "derive_serde", serde(rename = "CollDlvryMtd", skip_serializing_if = "Option::is_none") )]
54996	pub coll_dlvry_mtd: Option<CollateralDeliveryMethod1Code>,
54997	#[cfg_attr( feature = "derive_serde", serde(rename = "Term", skip_serializing_if = "Option::is_none") )]
54998	pub term: Option<Vec<ContractTerm7Choice>>,
54999	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstTp", skip_serializing_if = "Option::is_none") )]
55000	pub asst_tp: Option<SecurityCommodity9>,
55001	#[cfg_attr( feature = "derive_serde", serde(rename = "LnVal", skip_serializing_if = "Option::is_none") )]
55002	pub ln_val: Option<ActiveOrHistoricCurrencyAndAmount>,
55003	#[cfg_attr( feature = "derive_serde", serde(rename = "RbtRate", skip_serializing_if = "Option::is_none") )]
55004	pub rbt_rate: Option<InterestRate27Choice>,
55005	#[cfg_attr( feature = "derive_serde", serde(rename = "LndgFee", skip_serializing_if = "Option::is_none") )]
55006	pub lndg_fee: Option<f64>,
55007	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
55008	pub termntn_dt: Option<String>,
55009}
55010
55011impl LoanData141 {
55012	pub fn validate(&self) -> Result<(), ValidationError> {
55013		if let Some(ref val) = self.unq_trad_idr {
55014			if val.chars().count() < 1 {
55015				return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
55016			}
55017			if val.chars().count() > 52 {
55018				return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
55019			}
55020		}
55021		if let Some(ref val) = self.clr_sts { val.validate()? }
55022		if let Some(ref val) = self.tradg_vn {
55023			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
55024			if !pattern.is_match(val) {
55025				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
55026			}
55027		}
55028		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
55029		if let Some(ref val) = self.gnl_coll { val.validate()? }
55030		if let Some(ref val) = self.coll_dlvry_mtd { val.validate()? }
55031		if let Some(ref vec) = self.term { for item in vec { item.validate()? } }
55032		if let Some(ref val) = self.asst_tp { val.validate()? }
55033		if let Some(ref val) = self.ln_val { val.validate()? }
55034		if let Some(ref val) = self.rbt_rate { val.validate()? }
55035		Ok(())
55036	}
55037}
55038
55039
55040// LoanData142 ...
55041#[cfg_attr(feature = "derive_debug", derive(Debug))]
55042#[cfg_attr(feature = "derive_default", derive(Default))]
55043#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55044#[cfg_attr(feature = "derive_clone", derive(Clone))]
55045#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55046pub struct LoanData142 {
55047	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr", skip_serializing_if = "Option::is_none") )]
55048	pub unq_trad_idr: Option<String>,
55049	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
55050	pub evt_dt: String,
55051	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnDtTm", skip_serializing_if = "Option::is_none") )]
55052	pub exctn_dt_tm: Option<String>,
55053	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
55054	pub tradg_vn: Option<String>,
55055	#[cfg_attr( feature = "derive_serde", serde(rename = "CollDlvryMtd", skip_serializing_if = "Option::is_none") )]
55056	pub coll_dlvry_mtd: Option<CollateralDeliveryMethod1Code>,
55057	#[cfg_attr( feature = "derive_serde", serde(rename = "OutsdngMrgnLnAmt", skip_serializing_if = "Option::is_none") )]
55058	pub outsdng_mrgn_ln_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
55059	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtMktValAmt", skip_serializing_if = "Option::is_none") )]
55060	pub shrt_mkt_val_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
55061	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnLnAttr", skip_serializing_if = "Option::is_none") )]
55062	pub mrgn_ln_attr: Option<Vec<InterestRate6>>,
55063	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
55064	pub termntn_dt: Option<String>,
55065}
55066
55067impl LoanData142 {
55068	pub fn validate(&self) -> Result<(), ValidationError> {
55069		if let Some(ref val) = self.unq_trad_idr {
55070			if val.chars().count() < 1 {
55071				return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
55072			}
55073			if val.chars().count() > 52 {
55074				return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
55075			}
55076		}
55077		if let Some(ref val) = self.tradg_vn {
55078			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
55079			if !pattern.is_match(val) {
55080				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
55081			}
55082		}
55083		if let Some(ref val) = self.coll_dlvry_mtd { val.validate()? }
55084		if let Some(ref val) = self.outsdng_mrgn_ln_amt { val.validate()? }
55085		if let Some(ref val) = self.shrt_mkt_val_amt { val.validate()? }
55086		if let Some(ref vec) = self.mrgn_ln_attr { for item in vec { item.validate()? } }
55087		Ok(())
55088	}
55089}
55090
55091
55092// LoanData143 ...
55093#[cfg_attr(feature = "derive_debug", derive(Debug))]
55094#[cfg_attr(feature = "derive_default", derive(Default))]
55095#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55096#[cfg_attr(feature = "derive_clone", derive(Clone))]
55097#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55098pub struct LoanData143 {
55099	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr") )]
55100	pub unq_trad_idr: String,
55101	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
55102	pub evt_dt: String,
55103	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnDtTm") )]
55104	pub exctn_dt_tm: String,
55105	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSts") )]
55106	pub clr_sts: Cleared16Choice,
55107	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn") )]
55108	pub tradg_vn: String,
55109	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
55110	pub mstr_agrmt: Option<MasterAgreement7>,
55111	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt") )]
55112	pub val_dt: String,
55113	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlColl", skip_serializing_if = "Option::is_none") )]
55114	pub gnl_coll: Option<SpecialCollateral1Code>,
55115	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryByVal") )]
55116	pub dlvry_by_val: bool,
55117	#[cfg_attr( feature = "derive_serde", serde(rename = "CollDlvryMtd") )]
55118	pub coll_dlvry_mtd: CollateralDeliveryMethod1Code,
55119	#[cfg_attr( feature = "derive_serde", serde(rename = "Term", skip_serializing_if = "Option::is_none") )]
55120	pub term: Option<Vec<ContractTerm7Choice>>,
55121	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRate", skip_serializing_if = "Option::is_none") )]
55122	pub intrst_rate: Option<InterestRate27Choice>,
55123	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplAmt", skip_serializing_if = "Option::is_none") )]
55124	pub prncpl_amt: Option<PrincipalAmount3>,
55125	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
55126	pub termntn_dt: Option<String>,
55127	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitPric", skip_serializing_if = "Option::is_none") )]
55128	pub unit_pric: Option<SecuritiesTransactionPrice19Choice>,
55129}
55130
55131impl LoanData143 {
55132	pub fn validate(&self) -> Result<(), ValidationError> {
55133		if self.unq_trad_idr.chars().count() < 1 {
55134			return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
55135		}
55136		if self.unq_trad_idr.chars().count() > 52 {
55137			return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
55138		}
55139		self.clr_sts.validate()?;
55140		let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
55141		if !pattern.is_match(&self.tradg_vn) {
55142			return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
55143		}
55144		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
55145		if let Some(ref val) = self.gnl_coll { val.validate()? }
55146		self.coll_dlvry_mtd.validate()?;
55147		if let Some(ref vec) = self.term { for item in vec { item.validate()? } }
55148		if let Some(ref val) = self.intrst_rate { val.validate()? }
55149		if let Some(ref val) = self.prncpl_amt { val.validate()? }
55150		if let Some(ref val) = self.unit_pric { val.validate()? }
55151		Ok(())
55152	}
55153}
55154
55155
55156// LoanData144 ...
55157#[cfg_attr(feature = "derive_debug", derive(Debug))]
55158#[cfg_attr(feature = "derive_default", derive(Default))]
55159#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55160#[cfg_attr(feature = "derive_clone", derive(Clone))]
55161#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55162pub struct LoanData144 {
55163	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplAmt", skip_serializing_if = "Option::is_none") )]
55164	pub prncpl_amt: Option<PrincipalAmount3>,
55165	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt") )]
55166	pub mtrty_dt: String,
55167	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr") )]
55168	pub unq_trad_idr: String,
55169	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
55170	pub evt_dt: String,
55171	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSts") )]
55172	pub clr_sts: Cleared16Choice,
55173	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn") )]
55174	pub tradg_vn: String,
55175	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
55176	pub mstr_agrmt: Option<MasterAgreement7>,
55177	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnDtTm") )]
55178	pub exctn_dt_tm: String,
55179	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt") )]
55180	pub val_dt: String,
55181	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
55182	pub termntn_dt: Option<String>,
55183	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlColl", skip_serializing_if = "Option::is_none") )]
55184	pub gnl_coll: Option<SpecialCollateral1Code>,
55185	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitPric", skip_serializing_if = "Option::is_none") )]
55186	pub unit_pric: Option<SecuritiesTransactionPrice19Choice>,
55187}
55188
55189impl LoanData144 {
55190	pub fn validate(&self) -> Result<(), ValidationError> {
55191		if let Some(ref val) = self.prncpl_amt { val.validate()? }
55192		if self.unq_trad_idr.chars().count() < 1 {
55193			return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
55194		}
55195		if self.unq_trad_idr.chars().count() > 52 {
55196			return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
55197		}
55198		self.clr_sts.validate()?;
55199		let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
55200		if !pattern.is_match(&self.tradg_vn) {
55201			return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
55202		}
55203		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
55204		if let Some(ref val) = self.gnl_coll { val.validate()? }
55205		if let Some(ref val) = self.unit_pric { val.validate()? }
55206		Ok(())
55207	}
55208}
55209
55210
55211// LoanData145 ...
55212#[cfg_attr(feature = "derive_debug", derive(Debug))]
55213#[cfg_attr(feature = "derive_default", derive(Default))]
55214#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55215#[cfg_attr(feature = "derive_clone", derive(Clone))]
55216#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55217pub struct LoanData145 {
55218	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryByVal") )]
55219	pub dlvry_by_val: bool,
55220	#[cfg_attr( feature = "derive_serde", serde(rename = "CollDlvryMtd", skip_serializing_if = "Option::is_none") )]
55221	pub coll_dlvry_mtd: Option<CollateralDeliveryMethod1Code>,
55222	#[cfg_attr( feature = "derive_serde", serde(rename = "Term", skip_serializing_if = "Option::is_none") )]
55223	pub term: Option<Vec<ContractTerm7Choice>>,
55224	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstTp") )]
55225	pub asst_tp: SecurityCommodity9,
55226	#[cfg_attr( feature = "derive_serde", serde(rename = "RbtRate", skip_serializing_if = "Option::is_none") )]
55227	pub rbt_rate: Option<InterestRate27Choice>,
55228	#[cfg_attr( feature = "derive_serde", serde(rename = "LnVal") )]
55229	pub ln_val: ActiveOrHistoricCurrencyAndAmount,
55230	#[cfg_attr( feature = "derive_serde", serde(rename = "LndgFee", skip_serializing_if = "Option::is_none") )]
55231	pub lndg_fee: Option<f64>,
55232	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr") )]
55233	pub unq_trad_idr: String,
55234	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt") )]
55235	pub evt_dt: String,
55236	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSts") )]
55237	pub clr_sts: Cleared16Choice,
55238	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn") )]
55239	pub tradg_vn: String,
55240	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
55241	pub mstr_agrmt: Option<MasterAgreement7>,
55242	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnDtTm") )]
55243	pub exctn_dt_tm: String,
55244	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt") )]
55245	pub val_dt: String,
55246	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
55247	pub termntn_dt: Option<String>,
55248	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlColl", skip_serializing_if = "Option::is_none") )]
55249	pub gnl_coll: Option<SpecialCollateral1Code>,
55250}
55251
55252impl LoanData145 {
55253	pub fn validate(&self) -> Result<(), ValidationError> {
55254		if let Some(ref val) = self.coll_dlvry_mtd { val.validate()? }
55255		if let Some(ref vec) = self.term { for item in vec { item.validate()? } }
55256		self.asst_tp.validate()?;
55257		if let Some(ref val) = self.rbt_rate { val.validate()? }
55258		self.ln_val.validate()?;
55259		if self.unq_trad_idr.chars().count() < 1 {
55260			return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
55261		}
55262		if self.unq_trad_idr.chars().count() > 52 {
55263			return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
55264		}
55265		self.clr_sts.validate()?;
55266		let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
55267		if !pattern.is_match(&self.tradg_vn) {
55268			return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
55269		}
55270		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
55271		if let Some(ref val) = self.gnl_coll { val.validate()? }
55272		Ok(())
55273	}
55274}
55275
55276
55277// LoanData86 ...
55278#[cfg_attr(feature = "derive_debug", derive(Debug))]
55279#[cfg_attr(feature = "derive_default", derive(Default))]
55280#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55281#[cfg_attr(feature = "derive_clone", derive(Clone))]
55282#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55283pub struct LoanData86 {
55284	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr") )]
55285	pub unq_trad_idr: String,
55286	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt", skip_serializing_if = "Option::is_none") )]
55287	pub evt_dt: Option<String>,
55288	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
55289	pub termntn_dt: Option<String>,
55290}
55291
55292impl LoanData86 {
55293	pub fn validate(&self) -> Result<(), ValidationError> {
55294		if self.unq_trad_idr.chars().count() < 1 {
55295			return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
55296		}
55297		if self.unq_trad_idr.chars().count() > 52 {
55298			return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
55299		}
55300		Ok(())
55301	}
55302}
55303
55304
55305// LoanMatchingCriteria9 ...
55306#[cfg_attr(feature = "derive_debug", derive(Debug))]
55307#[cfg_attr(feature = "derive_default", derive(Default))]
55308#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55309#[cfg_attr(feature = "derive_clone", derive(Clone))]
55310#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55311pub struct LoanMatchingCriteria9 {
55312	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr", skip_serializing_if = "Option::is_none") )]
55313	pub unq_trad_idr: Option<CompareText2>,
55314	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
55315	pub termntn_dt: Option<CompareDate3>,
55316	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctTp", skip_serializing_if = "Option::is_none") )]
55317	pub ctrct_tp: Option<CompareExposureType3>,
55318	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSts", skip_serializing_if = "Option::is_none") )]
55319	pub clr_sts: Option<CompareClearingStatus3>,
55320	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrDtTm", skip_serializing_if = "Option::is_none") )]
55321	pub clr_dt_tm: Option<CompareDateTime3>,
55322	#[cfg_attr( feature = "derive_serde", serde(rename = "CCP", skip_serializing_if = "Option::is_none") )]
55323	pub ccp: Option<CompareOrganisationIdentification6>,
55324	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
55325	pub tradg_vn: Option<CompareMICIdentifier3>,
55326	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmtTp", skip_serializing_if = "Option::is_none") )]
55327	pub mstr_agrmt_tp: Option<CompareAgreementType2>,
55328	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnDtTm", skip_serializing_if = "Option::is_none") )]
55329	pub exctn_dt_tm: Option<CompareDateTime3>,
55330	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
55331	pub val_dt: Option<CompareDate3>,
55332	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
55333	pub mtrty_dt: Option<CompareDate3>,
55334	#[cfg_attr( feature = "derive_serde", serde(rename = "MinNtcePrd", skip_serializing_if = "Option::is_none") )]
55335	pub min_ntce_prd: Option<CompareNumber5>,
55336	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlstCallBckDt", skip_serializing_if = "Option::is_none") )]
55337	pub earlst_call_bck_dt: Option<CompareDate3>,
55338	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlColl", skip_serializing_if = "Option::is_none") )]
55339	pub gnl_coll: Option<CompareSpecialCollateral3>,
55340	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryByVal", skip_serializing_if = "Option::is_none") )]
55341	pub dlvry_by_val: Option<CompareTrueFalseIndicator3>,
55342	#[cfg_attr( feature = "derive_serde", serde(rename = "CollDlvryMtd", skip_serializing_if = "Option::is_none") )]
55343	pub coll_dlvry_mtd: Option<CompareDeliveryMethod3>,
55344	#[cfg_attr( feature = "derive_serde", serde(rename = "OpnTerm", skip_serializing_if = "Option::is_none") )]
55345	pub opn_term: Option<CompareTrueFalseIndicator3>,
55346	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnOptn", skip_serializing_if = "Option::is_none") )]
55347	pub termntn_optn: Option<CompareTerminationOption3>,
55348	#[cfg_attr( feature = "derive_serde", serde(rename = "FxdIntrstRate", skip_serializing_if = "Option::is_none") )]
55349	pub fxd_intrst_rate: Option<ComparePercentageRate3>,
55350	#[cfg_attr( feature = "derive_serde", serde(rename = "DayCntBsis", skip_serializing_if = "Option::is_none") )]
55351	pub day_cnt_bsis: Option<CompareInterestComputationMethod3>,
55352	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgIntrstRefRate", skip_serializing_if = "Option::is_none") )]
55353	pub fltg_intrst_ref_rate: Option<CompareBenchmarkCurveName3>,
55354	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgIntrstRateTermUnit", skip_serializing_if = "Option::is_none") )]
55355	pub fltg_intrst_rate_term_unit: Option<CompareRateBasis3>,
55356	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgIntrstRateTermVal", skip_serializing_if = "Option::is_none") )]
55357	pub fltg_intrst_rate_term_val: Option<CompareNumber5>,
55358	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgIntrstRatePmtFrqcyUnit", skip_serializing_if = "Option::is_none") )]
55359	pub fltg_intrst_rate_pmt_frqcy_unit: Option<CompareRateBasis3>,
55360	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgIntrstRatePmtFrqcyVal", skip_serializing_if = "Option::is_none") )]
55361	pub fltg_intrst_rate_pmt_frqcy_val: Option<CompareNumber5>,
55362	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgIntrstRateRstFrqcyUnit", skip_serializing_if = "Option::is_none") )]
55363	pub fltg_intrst_rate_rst_frqcy_unit: Option<CompareRateBasis3>,
55364	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgIntrstRateRstFrqcyVal", skip_serializing_if = "Option::is_none") )]
55365	pub fltg_intrst_rate_rst_frqcy_val: Option<CompareNumber6>,
55366	#[cfg_attr( feature = "derive_serde", serde(rename = "BsisPtSprd", skip_serializing_if = "Option::is_none") )]
55367	pub bsis_pt_sprd: Option<CompareDecimalNumber3>,
55368	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnLnAttr", skip_serializing_if = "Option::is_none") )]
55369	pub mrgn_ln_attr: Option<Vec<CompareInterestRate1>>,
55370	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplAmtValDtAmt", skip_serializing_if = "Option::is_none") )]
55371	pub prncpl_amt_val_dt_amt: Option<CompareActiveOrHistoricCurrencyAndAmount3>,
55372	#[cfg_attr( feature = "derive_serde", serde(rename = "PrncplAmtMtrtyDtAmt", skip_serializing_if = "Option::is_none") )]
55373	pub prncpl_amt_mtrty_dt_amt: Option<CompareActiveOrHistoricCurrencyAndAmount3>,
55374	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstTp", skip_serializing_if = "Option::is_none") )]
55375	pub asst_tp: Option<SecurityCommodity7Choice>,
55376	#[cfg_attr( feature = "derive_serde", serde(rename = "LnVal", skip_serializing_if = "Option::is_none") )]
55377	pub ln_val: Option<CompareActiveOrHistoricCurrencyAndAmount3>,
55378	#[cfg_attr( feature = "derive_serde", serde(rename = "FxdRbtRefRate", skip_serializing_if = "Option::is_none") )]
55379	pub fxd_rbt_ref_rate: Option<ComparePercentageRate3>,
55380	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgRbtRefRate", skip_serializing_if = "Option::is_none") )]
55381	pub fltg_rbt_ref_rate: Option<CompareBenchmarkCurveName3>,
55382	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgRbtRateTermUnit", skip_serializing_if = "Option::is_none") )]
55383	pub fltg_rbt_rate_term_unit: Option<CompareRateBasis3>,
55384	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgRbtRateTermVal", skip_serializing_if = "Option::is_none") )]
55385	pub fltg_rbt_rate_term_val: Option<CompareNumber6>,
55386	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgRbtRatePmtFrqcyUnit", skip_serializing_if = "Option::is_none") )]
55387	pub fltg_rbt_rate_pmt_frqcy_unit: Option<CompareRateBasis3>,
55388	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgRbtRatePmtFrqcyVal", skip_serializing_if = "Option::is_none") )]
55389	pub fltg_rbt_rate_pmt_frqcy_val: Option<CompareNumber6>,
55390	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgRbtRateRstFrqcyUnit", skip_serializing_if = "Option::is_none") )]
55391	pub fltg_rbt_rate_rst_frqcy_unit: Option<CompareRateBasis3>,
55392	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgRbtRateRstFrqcyVal", skip_serializing_if = "Option::is_none") )]
55393	pub fltg_rbt_rate_rst_frqcy_val: Option<CompareNumber6>,
55394	#[cfg_attr( feature = "derive_serde", serde(rename = "RbtRateBsisPtSprd", skip_serializing_if = "Option::is_none") )]
55395	pub rbt_rate_bsis_pt_sprd: Option<CompareDecimalNumber3>,
55396	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgRateAdjstmnt", skip_serializing_if = "Option::is_none") )]
55397	pub fltg_rate_adjstmnt: Option<Vec<ComparePercentageRate3>>,
55398	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgRateAdjstmntDt", skip_serializing_if = "Option::is_none") )]
55399	pub fltg_rate_adjstmnt_dt: Option<Vec<CompareDate3>>,
55400	#[cfg_attr( feature = "derive_serde", serde(rename = "LndgFee", skip_serializing_if = "Option::is_none") )]
55401	pub lndg_fee: Option<ComparePercentageRate3>,
55402	#[cfg_attr( feature = "derive_serde", serde(rename = "OutsdngMrgnLnAmt", skip_serializing_if = "Option::is_none") )]
55403	pub outsdng_mrgn_ln_amt: Option<CompareActiveOrHistoricCurrencyAndAmount3>,
55404	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtMktValAmt", skip_serializing_if = "Option::is_none") )]
55405	pub shrt_mkt_val_amt: Option<CompareActiveOrHistoricCurrencyAndAmount3>,
55406	#[cfg_attr( feature = "derive_serde", serde(rename = "LvlTp", skip_serializing_if = "Option::is_none") )]
55407	pub lvl_tp: Option<CompareReportingLevelType3>,
55408	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitOfMeasr", skip_serializing_if = "Option::is_none") )]
55409	pub unit_of_measr: Option<CompareUnitOfMeasure3>,
55410}
55411
55412impl LoanMatchingCriteria9 {
55413	pub fn validate(&self) -> Result<(), ValidationError> {
55414		if let Some(ref val) = self.unq_trad_idr { val.validate()? }
55415		if let Some(ref val) = self.termntn_dt { val.validate()? }
55416		if let Some(ref val) = self.ctrct_tp { val.validate()? }
55417		if let Some(ref val) = self.clr_sts { val.validate()? }
55418		if let Some(ref val) = self.clr_dt_tm { val.validate()? }
55419		if let Some(ref val) = self.ccp { val.validate()? }
55420		if let Some(ref val) = self.tradg_vn { val.validate()? }
55421		if let Some(ref val) = self.mstr_agrmt_tp { val.validate()? }
55422		if let Some(ref val) = self.exctn_dt_tm { val.validate()? }
55423		if let Some(ref val) = self.val_dt { val.validate()? }
55424		if let Some(ref val) = self.mtrty_dt { val.validate()? }
55425		if let Some(ref val) = self.min_ntce_prd { val.validate()? }
55426		if let Some(ref val) = self.earlst_call_bck_dt { val.validate()? }
55427		if let Some(ref val) = self.gnl_coll { val.validate()? }
55428		if let Some(ref val) = self.dlvry_by_val { val.validate()? }
55429		if let Some(ref val) = self.coll_dlvry_mtd { val.validate()? }
55430		if let Some(ref val) = self.opn_term { val.validate()? }
55431		if let Some(ref val) = self.termntn_optn { val.validate()? }
55432		if let Some(ref val) = self.fxd_intrst_rate { val.validate()? }
55433		if let Some(ref val) = self.day_cnt_bsis { val.validate()? }
55434		if let Some(ref val) = self.fltg_intrst_ref_rate { val.validate()? }
55435		if let Some(ref val) = self.fltg_intrst_rate_term_unit { val.validate()? }
55436		if let Some(ref val) = self.fltg_intrst_rate_term_val { val.validate()? }
55437		if let Some(ref val) = self.fltg_intrst_rate_pmt_frqcy_unit { val.validate()? }
55438		if let Some(ref val) = self.fltg_intrst_rate_pmt_frqcy_val { val.validate()? }
55439		if let Some(ref val) = self.fltg_intrst_rate_rst_frqcy_unit { val.validate()? }
55440		if let Some(ref val) = self.fltg_intrst_rate_rst_frqcy_val { val.validate()? }
55441		if let Some(ref val) = self.bsis_pt_sprd { val.validate()? }
55442		if let Some(ref vec) = self.mrgn_ln_attr { for item in vec { item.validate()? } }
55443		if let Some(ref val) = self.prncpl_amt_val_dt_amt { val.validate()? }
55444		if let Some(ref val) = self.prncpl_amt_mtrty_dt_amt { val.validate()? }
55445		if let Some(ref val) = self.asst_tp { val.validate()? }
55446		if let Some(ref val) = self.ln_val { val.validate()? }
55447		if let Some(ref val) = self.fxd_rbt_ref_rate { val.validate()? }
55448		if let Some(ref val) = self.fltg_rbt_ref_rate { val.validate()? }
55449		if let Some(ref val) = self.fltg_rbt_rate_term_unit { val.validate()? }
55450		if let Some(ref val) = self.fltg_rbt_rate_term_val { val.validate()? }
55451		if let Some(ref val) = self.fltg_rbt_rate_pmt_frqcy_unit { val.validate()? }
55452		if let Some(ref val) = self.fltg_rbt_rate_pmt_frqcy_val { val.validate()? }
55453		if let Some(ref val) = self.fltg_rbt_rate_rst_frqcy_unit { val.validate()? }
55454		if let Some(ref val) = self.fltg_rbt_rate_rst_frqcy_val { val.validate()? }
55455		if let Some(ref val) = self.rbt_rate_bsis_pt_sprd { val.validate()? }
55456		if let Some(ref vec) = self.fltg_rate_adjstmnt { for item in vec { item.validate()? } }
55457		if let Some(ref vec) = self.fltg_rate_adjstmnt_dt { for item in vec { item.validate()? } }
55458		if let Some(ref val) = self.lndg_fee { val.validate()? }
55459		if let Some(ref val) = self.outsdng_mrgn_ln_amt { val.validate()? }
55460		if let Some(ref val) = self.shrt_mkt_val_amt { val.validate()? }
55461		if let Some(ref val) = self.lvl_tp { val.validate()? }
55462		if let Some(ref val) = self.unit_of_measr { val.validate()? }
55463		Ok(())
55464	}
55465}
55466
55467
55468// LocalInstrument2Choice ...
55469#[cfg_attr(feature = "derive_debug", derive(Debug))]
55470#[cfg_attr(feature = "derive_default", derive(Default))]
55471#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55472#[cfg_attr(feature = "derive_clone", derive(Clone))]
55473#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55474pub struct LocalInstrument2Choice {
55475	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
55476	pub cd: Option<String>,
55477	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
55478	pub prtry: Option<String>,
55479}
55480
55481impl LocalInstrument2Choice {
55482	pub fn validate(&self) -> Result<(), ValidationError> {
55483		if let Some(ref val) = self.cd {
55484			if val.chars().count() < 1 {
55485				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
55486			}
55487			if val.chars().count() > 35 {
55488				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 35".to_string()));
55489			}
55490		}
55491		if let Some(ref val) = self.prtry {
55492			if val.chars().count() < 1 {
55493				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
55494			}
55495			if val.chars().count() > 35 {
55496				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
55497			}
55498		}
55499		Ok(())
55500	}
55501}
55502
55503
55504// LocalMarketAnnex6 ...
55505#[cfg_attr(feature = "derive_debug", derive(Debug))]
55506#[cfg_attr(feature = "derive_default", derive(Default))]
55507#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55508#[cfg_attr(feature = "derive_clone", derive(Clone))]
55509#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55510pub struct LocalMarketAnnex6 {
55511	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry") )]
55512	pub ctry: Vec<String>,
55513	#[cfg_attr( feature = "derive_serde", serde(rename = "LclOrdrDsk") )]
55514	pub lcl_ordr_dsk: OrderDesk1,
55515	#[cfg_attr( feature = "derive_serde", serde(rename = "SbcptPrcgChrtcs", skip_serializing_if = "Option::is_none") )]
55516	pub sbcpt_prcg_chrtcs: Option<ProcessingCharacteristics11>,
55517	#[cfg_attr( feature = "derive_serde", serde(rename = "RedPrcgChrtcs", skip_serializing_if = "Option::is_none") )]
55518	pub red_prcg_chrtcs: Option<ProcessingCharacteristics10>,
55519	#[cfg_attr( feature = "derive_serde", serde(rename = "SwtchPrcgChrtcs", skip_serializing_if = "Option::is_none") )]
55520	pub swtch_prcg_chrtcs: Option<ProcessingCharacteristics9>,
55521	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSttlmDtls", skip_serializing_if = "Option::is_none") )]
55522	pub csh_sttlm_dtls: Option<Vec<CashAccount205>>,
55523	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
55524	pub addtl_inf: Option<Vec<AdditionalInformation15>>,
55525}
55526
55527impl LocalMarketAnnex6 {
55528	pub fn validate(&self) -> Result<(), ValidationError> {
55529		for item in &self.ctry {
55530			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
55531			if !pattern.is_match(&item) {
55532				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
55533			}
55534		}
55535		self.lcl_ordr_dsk.validate()?;
55536		if let Some(ref val) = self.sbcpt_prcg_chrtcs { val.validate()? }
55537		if let Some(ref val) = self.red_prcg_chrtcs { val.validate()? }
55538		if let Some(ref val) = self.swtch_prcg_chrtcs { val.validate()? }
55539		if let Some(ref vec) = self.csh_sttlm_dtls { for item in vec { item.validate()? } }
55540		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
55541		Ok(())
55542	}
55543}
55544
55545
55546// LockStatus1Code ...
55547#[cfg_attr(feature = "derive_debug", derive(Debug))]
55548#[cfg_attr(feature = "derive_default", derive(Default))]
55549#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55550#[cfg_attr(feature = "derive_clone", derive(Clone))]
55551#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55552pub enum LockStatus1Code {
55553	#[cfg_attr(feature = "derive_default", default)]
55554	#[cfg_attr( feature = "derive_serde", serde(rename = "LOCK") )]
55555	CodeLOCK,
55556	#[cfg_attr( feature = "derive_serde", serde(rename = "ULCK") )]
55557	CodeULCK,
55558}
55559
55560impl LockStatus1Code {
55561	pub fn validate(&self) -> Result<(), ValidationError> {
55562		Ok(())
55563	}
55564}
55565
55566
55567// LongPaymentIdentification4 ...
55568#[cfg_attr(feature = "derive_debug", derive(Debug))]
55569#[cfg_attr(feature = "derive_default", derive(Default))]
55570#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55571#[cfg_attr(feature = "derive_clone", derive(Clone))]
55572#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55573pub struct LongPaymentIdentification4 {
55574	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
55575	pub tx_id: Option<String>,
55576	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
55577	pub uetr: Option<String>,
55578	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmt") )]
55579	pub intr_bk_sttlm_amt: f64,
55580	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt") )]
55581	pub intr_bk_sttlm_dt: String,
55582	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMtd", skip_serializing_if = "Option::is_none") )]
55583	pub pmt_mtd: Option<PaymentOrigin1Choice>,
55584	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt") )]
55585	pub instg_agt: BranchAndFinancialInstitutionIdentification8,
55586	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt") )]
55587	pub instd_agt: BranchAndFinancialInstitutionIdentification8,
55588	#[cfg_attr( feature = "derive_serde", serde(rename = "NtryTp", skip_serializing_if = "Option::is_none") )]
55589	pub ntry_tp: Option<String>,
55590	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId", skip_serializing_if = "Option::is_none") )]
55591	pub end_to_end_id: Option<String>,
55592}
55593
55594impl LongPaymentIdentification4 {
55595	pub fn validate(&self) -> Result<(), ValidationError> {
55596		if let Some(ref val) = self.tx_id {
55597			if val.chars().count() < 1 {
55598				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
55599			}
55600			if val.chars().count() > 35 {
55601				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
55602			}
55603		}
55604		if let Some(ref val) = self.uetr {
55605			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
55606			if !pattern.is_match(val) {
55607				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
55608			}
55609		}
55610		if let Some(ref val) = self.pmt_mtd { val.validate()? }
55611		self.instg_agt.validate()?;
55612		self.instd_agt.validate()?;
55613		if let Some(ref val) = self.ntry_tp {
55614			let pattern = Regex::new("[BEOVW]{1,1}[0-9]{2,2}|DUM").unwrap();
55615			if !pattern.is_match(val) {
55616				return Err(ValidationError::new(1005, "ntry_tp does not match the required pattern".to_string()));
55617			}
55618		}
55619		if let Some(ref val) = self.end_to_end_id {
55620			if val.chars().count() < 1 {
55621				return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
55622			}
55623			if val.chars().count() > 35 {
55624				return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
55625			}
55626		}
55627		Ok(())
55628	}
55629}
55630
55631
55632// LongPostalAddress1Choice ...
55633#[cfg_attr(feature = "derive_debug", derive(Debug))]
55634#[cfg_attr(feature = "derive_default", derive(Default))]
55635#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55636#[cfg_attr(feature = "derive_clone", derive(Clone))]
55637#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55638pub struct LongPostalAddress1Choice {
55639	#[cfg_attr( feature = "derive_serde", serde(rename = "Ustrd", skip_serializing_if = "Option::is_none") )]
55640	pub ustrd: Option<String>,
55641	#[cfg_attr( feature = "derive_serde", serde(rename = "Strd", skip_serializing_if = "Option::is_none") )]
55642	pub strd: Option<StructuredLongPostalAddress1>,
55643}
55644
55645impl LongPostalAddress1Choice {
55646	pub fn validate(&self) -> Result<(), ValidationError> {
55647		if let Some(ref val) = self.ustrd {
55648			if val.chars().count() < 1 {
55649				return Err(ValidationError::new(1001, "ustrd is shorter than the minimum length of 1".to_string()));
55650			}
55651			if val.chars().count() > 140 {
55652				return Err(ValidationError::new(1002, "ustrd exceeds the maximum length of 140".to_string()));
55653			}
55654		}
55655		if let Some(ref val) = self.strd { val.validate()? }
55656		Ok(())
55657	}
55658}
55659
55660
55661// LossBearing2 ...
55662#[cfg_attr(feature = "derive_debug", derive(Debug))]
55663#[cfg_attr(feature = "derive_default", derive(Default))]
55664#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55665#[cfg_attr(feature = "derive_clone", derive(Clone))]
55666#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55667pub struct LossBearing2 {
55668	#[cfg_attr( feature = "derive_serde", serde(rename = "NoCptlLoss", skip_serializing_if = "Option::is_none") )]
55669	pub no_cptl_loss: Option<TargetMarket1Code>,
55670	#[cfg_attr( feature = "derive_serde", serde(rename = "LtdCptlLoss", skip_serializing_if = "Option::is_none") )]
55671	pub ltd_cptl_loss: Option<TargetMarket1Code>,
55672	#[cfg_attr( feature = "derive_serde", serde(rename = "LtdCptlLossLvl", skip_serializing_if = "Option::is_none") )]
55673	pub ltd_cptl_loss_lvl: Option<f64>,
55674	#[cfg_attr( feature = "derive_serde", serde(rename = "NoCptlGrnt", skip_serializing_if = "Option::is_none") )]
55675	pub no_cptl_grnt: Option<TargetMarket1Code>,
55676	#[cfg_attr( feature = "derive_serde", serde(rename = "LossByndCptl", skip_serializing_if = "Option::is_none") )]
55677	pub loss_bynd_cptl: Option<TargetMarket1Code>,
55678	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
55679	pub othr: Option<Vec<OtherTargetMarketLossBearing1>>,
55680}
55681
55682impl LossBearing2 {
55683	pub fn validate(&self) -> Result<(), ValidationError> {
55684		if let Some(ref val) = self.no_cptl_loss { val.validate()? }
55685		if let Some(ref val) = self.ltd_cptl_loss { val.validate()? }
55686		if let Some(ref val) = self.no_cptl_grnt { val.validate()? }
55687		if let Some(ref val) = self.loss_bynd_cptl { val.validate()? }
55688		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
55689		Ok(())
55690	}
55691}
55692
55693
55694// MICEntityType1Code ...
55695#[cfg_attr(feature = "derive_debug", derive(Debug))]
55696#[cfg_attr(feature = "derive_default", derive(Default))]
55697#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55698#[cfg_attr(feature = "derive_clone", derive(Clone))]
55699#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55700pub enum MICEntityType1Code {
55701	#[cfg_attr(feature = "derive_default", default)]
55702	#[cfg_attr( feature = "derive_serde", serde(rename = "APPA") )]
55703	CodeAPPA,
55704	#[cfg_attr( feature = "derive_serde", serde(rename = "CTPS") )]
55705	CodeCTPS,
55706	#[cfg_attr( feature = "derive_serde", serde(rename = "MLTF") )]
55707	CodeMLTF,
55708	#[cfg_attr( feature = "derive_serde", serde(rename = "OTFS") )]
55709	CodeOTFS,
55710	#[cfg_attr( feature = "derive_serde", serde(rename = "RMKT") )]
55711	CodeRMKT,
55712	#[cfg_attr( feature = "derive_serde", serde(rename = "SINT") )]
55713	CodeSINT,
55714}
55715
55716impl MICEntityType1Code {
55717	pub fn validate(&self) -> Result<(), ValidationError> {
55718		Ok(())
55719	}
55720}
55721
55722
55723// MailType1Choice ...
55724#[cfg_attr(feature = "derive_debug", derive(Debug))]
55725#[cfg_attr(feature = "derive_default", derive(Default))]
55726#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55727#[cfg_attr(feature = "derive_clone", derive(Clone))]
55728#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55729pub struct MailType1Choice {
55730	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
55731	pub cd: Option<MailType1Code>,
55732	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
55733	pub prtry: Option<GenericIdentification47>,
55734}
55735
55736impl MailType1Choice {
55737	pub fn validate(&self) -> Result<(), ValidationError> {
55738		if let Some(ref val) = self.cd { val.validate()? }
55739		if let Some(ref val) = self.prtry { val.validate()? }
55740		Ok(())
55741	}
55742}
55743
55744
55745// MailType1Code ...
55746#[cfg_attr(feature = "derive_debug", derive(Debug))]
55747#[cfg_attr(feature = "derive_default", derive(Default))]
55748#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55749#[cfg_attr(feature = "derive_clone", derive(Clone))]
55750#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55751pub enum MailType1Code {
55752	#[cfg_attr(feature = "derive_default", default)]
55753	#[cfg_attr( feature = "derive_serde", serde(rename = "AIRM") )]
55754	CodeAIRM,
55755	#[cfg_attr( feature = "derive_serde", serde(rename = "ORDM") )]
55756	CodeORDM,
55757	#[cfg_attr( feature = "derive_serde", serde(rename = "REGM") )]
55758	CodeREGM,
55759}
55760
55761impl MailType1Code {
55762	pub fn validate(&self) -> Result<(), ValidationError> {
55763		Ok(())
55764	}
55765}
55766
55767
55768// MainFundOrderDeskLocation1 ...
55769#[cfg_attr(feature = "derive_debug", derive(Debug))]
55770#[cfg_attr(feature = "derive_default", derive(Default))]
55771#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55772#[cfg_attr(feature = "derive_clone", derive(Clone))]
55773#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55774pub struct MainFundOrderDeskLocation1 {
55775	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry") )]
55776	pub ctry: String,
55777	#[cfg_attr( feature = "derive_serde", serde(rename = "TmZoneOffSet") )]
55778	pub tm_zone_off_set: UTCOffset1,
55779}
55780
55781impl MainFundOrderDeskLocation1 {
55782	pub fn validate(&self) -> Result<(), ValidationError> {
55783		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
55784		if !pattern.is_match(&self.ctry) {
55785			return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
55786		}
55787		self.tm_zone_off_set.validate()?;
55788		Ok(())
55789	}
55790}
55791
55792
55793// Mandate20 ...
55794#[cfg_attr(feature = "derive_debug", derive(Debug))]
55795#[cfg_attr(feature = "derive_default", derive(Default))]
55796#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55797#[cfg_attr(feature = "derive_clone", derive(Clone))]
55798#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55799pub struct Mandate20 {
55800	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtId") )]
55801	pub mndt_id: String,
55802	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtReqId", skip_serializing_if = "Option::is_none") )]
55803	pub mndt_req_id: Option<String>,
55804	#[cfg_attr( feature = "derive_serde", serde(rename = "Authntcn", skip_serializing_if = "Option::is_none") )]
55805	pub authntcn: Option<MandateAuthentication1>,
55806	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
55807	pub tp: Option<MandateTypeInformation2>,
55808	#[cfg_attr( feature = "derive_serde", serde(rename = "Ocrncs", skip_serializing_if = "Option::is_none") )]
55809	pub ocrncs: Option<MandateOccurrences5>,
55810	#[cfg_attr( feature = "derive_serde", serde(rename = "TrckgInd") )]
55811	pub trckg_ind: bool,
55812	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstColltnAmt", skip_serializing_if = "Option::is_none") )]
55813	pub frst_colltn_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
55814	#[cfg_attr( feature = "derive_serde", serde(rename = "ColltnAmt", skip_serializing_if = "Option::is_none") )]
55815	pub colltn_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
55816	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxAmt", skip_serializing_if = "Option::is_none") )]
55817	pub max_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
55818	#[cfg_attr( feature = "derive_serde", serde(rename = "Adjstmnt", skip_serializing_if = "Option::is_none") )]
55819	pub adjstmnt: Option<MandateAdjustment1>,
55820	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
55821	pub rsn: Option<MandateSetupReason1Choice>,
55822	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrSchmeId", skip_serializing_if = "Option::is_none") )]
55823	pub cdtr_schme_id: Option<PartyIdentification272>,
55824	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
55825	pub cdtr: PartyIdentification272,
55826	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
55827	pub cdtr_acct: Option<CashAccount40>,
55828	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
55829	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
55830	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
55831	pub ultmt_cdtr: Option<PartyIdentification272>,
55832	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr") )]
55833	pub dbtr: PartyIdentification272,
55834	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
55835	pub dbtr_acct: Option<CashAccount40>,
55836	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt") )]
55837	pub dbtr_agt: BranchAndFinancialInstitutionIdentification8,
55838	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
55839	pub ultmt_dbtr: Option<PartyIdentification272>,
55840	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtRef", skip_serializing_if = "Option::is_none") )]
55841	pub mndt_ref: Option<String>,
55842	#[cfg_attr( feature = "derive_serde", serde(rename = "RfrdDoc", skip_serializing_if = "Option::is_none") )]
55843	pub rfrd_doc: Option<Vec<ReferredMandateDocument2>>,
55844}
55845
55846impl Mandate20 {
55847	pub fn validate(&self) -> Result<(), ValidationError> {
55848		if self.mndt_id.chars().count() < 1 {
55849			return Err(ValidationError::new(1001, "mndt_id is shorter than the minimum length of 1".to_string()));
55850		}
55851		if self.mndt_id.chars().count() > 35 {
55852			return Err(ValidationError::new(1002, "mndt_id exceeds the maximum length of 35".to_string()));
55853		}
55854		if let Some(ref val) = self.mndt_req_id {
55855			if val.chars().count() < 1 {
55856				return Err(ValidationError::new(1001, "mndt_req_id is shorter than the minimum length of 1".to_string()));
55857			}
55858			if val.chars().count() > 35 {
55859				return Err(ValidationError::new(1002, "mndt_req_id exceeds the maximum length of 35".to_string()));
55860			}
55861		}
55862		if let Some(ref val) = self.authntcn { val.validate()? }
55863		if let Some(ref val) = self.tp { val.validate()? }
55864		if let Some(ref val) = self.ocrncs { val.validate()? }
55865		if let Some(ref val) = self.frst_colltn_amt { val.validate()? }
55866		if let Some(ref val) = self.colltn_amt { val.validate()? }
55867		if let Some(ref val) = self.max_amt { val.validate()? }
55868		if let Some(ref val) = self.adjstmnt { val.validate()? }
55869		if let Some(ref val) = self.rsn { val.validate()? }
55870		if let Some(ref val) = self.cdtr_schme_id { val.validate()? }
55871		self.cdtr.validate()?;
55872		if let Some(ref val) = self.cdtr_acct { val.validate()? }
55873		if let Some(ref val) = self.cdtr_agt { val.validate()? }
55874		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
55875		self.dbtr.validate()?;
55876		if let Some(ref val) = self.dbtr_acct { val.validate()? }
55877		self.dbtr_agt.validate()?;
55878		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
55879		if let Some(ref val) = self.mndt_ref {
55880			if val.chars().count() < 1 {
55881				return Err(ValidationError::new(1001, "mndt_ref is shorter than the minimum length of 1".to_string()));
55882			}
55883			if val.chars().count() > 35 {
55884				return Err(ValidationError::new(1002, "mndt_ref exceeds the maximum length of 35".to_string()));
55885			}
55886		}
55887		if let Some(ref vec) = self.rfrd_doc { for item in vec { item.validate()? } }
55888		Ok(())
55889	}
55890}
55891
55892
55893// Mandate21 ...
55894#[cfg_attr(feature = "derive_debug", derive(Debug))]
55895#[cfg_attr(feature = "derive_default", derive(Default))]
55896#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55897#[cfg_attr(feature = "derive_clone", derive(Clone))]
55898#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55899pub struct Mandate21 {
55900	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtId") )]
55901	pub mndt_id: String,
55902	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtReqId", skip_serializing_if = "Option::is_none") )]
55903	pub mndt_req_id: Option<String>,
55904	#[cfg_attr( feature = "derive_serde", serde(rename = "Authntcn", skip_serializing_if = "Option::is_none") )]
55905	pub authntcn: Option<MandateAuthentication1>,
55906	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
55907	pub tp: Option<MandateTypeInformation2>,
55908	#[cfg_attr( feature = "derive_serde", serde(rename = "Ocrncs", skip_serializing_if = "Option::is_none") )]
55909	pub ocrncs: Option<MandateOccurrences5>,
55910	#[cfg_attr( feature = "derive_serde", serde(rename = "TrckgInd") )]
55911	pub trckg_ind: bool,
55912	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstColltnAmt", skip_serializing_if = "Option::is_none") )]
55913	pub frst_colltn_amt: Option<ActiveCurrencyAndAmount>,
55914	#[cfg_attr( feature = "derive_serde", serde(rename = "ColltnAmt", skip_serializing_if = "Option::is_none") )]
55915	pub colltn_amt: Option<ActiveCurrencyAndAmount>,
55916	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxAmt", skip_serializing_if = "Option::is_none") )]
55917	pub max_amt: Option<ActiveCurrencyAndAmount>,
55918	#[cfg_attr( feature = "derive_serde", serde(rename = "Adjstmnt", skip_serializing_if = "Option::is_none") )]
55919	pub adjstmnt: Option<MandateAdjustment1>,
55920	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
55921	pub rsn: Option<MandateSetupReason1Choice>,
55922	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrSchmeId", skip_serializing_if = "Option::is_none") )]
55923	pub cdtr_schme_id: Option<PartyIdentification272>,
55924	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
55925	pub cdtr: Option<PartyIdentification272>,
55926	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
55927	pub cdtr_acct: Option<CashAccount40>,
55928	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
55929	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
55930	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
55931	pub ultmt_cdtr: Option<PartyIdentification272>,
55932	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
55933	pub dbtr: Option<PartyIdentification272>,
55934	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
55935	pub dbtr_acct: Option<CashAccount40>,
55936	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
55937	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
55938	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
55939	pub ultmt_dbtr: Option<PartyIdentification272>,
55940	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtRef", skip_serializing_if = "Option::is_none") )]
55941	pub mndt_ref: Option<String>,
55942	#[cfg_attr( feature = "derive_serde", serde(rename = "RfrdDoc", skip_serializing_if = "Option::is_none") )]
55943	pub rfrd_doc: Option<Vec<ReferredMandateDocument2>>,
55944}
55945
55946impl Mandate21 {
55947	pub fn validate(&self) -> Result<(), ValidationError> {
55948		if self.mndt_id.chars().count() < 1 {
55949			return Err(ValidationError::new(1001, "mndt_id is shorter than the minimum length of 1".to_string()));
55950		}
55951		if self.mndt_id.chars().count() > 35 {
55952			return Err(ValidationError::new(1002, "mndt_id exceeds the maximum length of 35".to_string()));
55953		}
55954		if let Some(ref val) = self.mndt_req_id {
55955			if val.chars().count() < 1 {
55956				return Err(ValidationError::new(1001, "mndt_req_id is shorter than the minimum length of 1".to_string()));
55957			}
55958			if val.chars().count() > 35 {
55959				return Err(ValidationError::new(1002, "mndt_req_id exceeds the maximum length of 35".to_string()));
55960			}
55961		}
55962		if let Some(ref val) = self.authntcn { val.validate()? }
55963		if let Some(ref val) = self.tp { val.validate()? }
55964		if let Some(ref val) = self.ocrncs { val.validate()? }
55965		if let Some(ref val) = self.frst_colltn_amt { val.validate()? }
55966		if let Some(ref val) = self.colltn_amt { val.validate()? }
55967		if let Some(ref val) = self.max_amt { val.validate()? }
55968		if let Some(ref val) = self.adjstmnt { val.validate()? }
55969		if let Some(ref val) = self.rsn { val.validate()? }
55970		if let Some(ref val) = self.cdtr_schme_id { val.validate()? }
55971		if let Some(ref val) = self.cdtr { val.validate()? }
55972		if let Some(ref val) = self.cdtr_acct { val.validate()? }
55973		if let Some(ref val) = self.cdtr_agt { val.validate()? }
55974		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
55975		if let Some(ref val) = self.dbtr { val.validate()? }
55976		if let Some(ref val) = self.dbtr_acct { val.validate()? }
55977		if let Some(ref val) = self.dbtr_agt { val.validate()? }
55978		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
55979		if let Some(ref val) = self.mndt_ref {
55980			if val.chars().count() < 1 {
55981				return Err(ValidationError::new(1001, "mndt_ref is shorter than the minimum length of 1".to_string()));
55982			}
55983			if val.chars().count() > 35 {
55984				return Err(ValidationError::new(1002, "mndt_ref exceeds the maximum length of 35".to_string()));
55985			}
55986		}
55987		if let Some(ref vec) = self.rfrd_doc { for item in vec { item.validate()? } }
55988		Ok(())
55989	}
55990}
55991
55992
55993// Mandate22 ...
55994#[cfg_attr(feature = "derive_debug", derive(Debug))]
55995#[cfg_attr(feature = "derive_default", derive(Default))]
55996#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
55997#[cfg_attr(feature = "derive_clone", derive(Clone))]
55998#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
55999pub struct Mandate22 {
56000	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtId", skip_serializing_if = "Option::is_none") )]
56001	pub mndt_id: Option<String>,
56002	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtReqId", skip_serializing_if = "Option::is_none") )]
56003	pub mndt_req_id: Option<String>,
56004	#[cfg_attr( feature = "derive_serde", serde(rename = "Authntcn", skip_serializing_if = "Option::is_none") )]
56005	pub authntcn: Option<MandateAuthentication1>,
56006	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
56007	pub tp: Option<MandateTypeInformation2>,
56008	#[cfg_attr( feature = "derive_serde", serde(rename = "Ocrncs", skip_serializing_if = "Option::is_none") )]
56009	pub ocrncs: Option<MandateOccurrences5>,
56010	#[cfg_attr( feature = "derive_serde", serde(rename = "TrckgInd") )]
56011	pub trckg_ind: bool,
56012	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstColltnAmt", skip_serializing_if = "Option::is_none") )]
56013	pub frst_colltn_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
56014	#[cfg_attr( feature = "derive_serde", serde(rename = "ColltnAmt", skip_serializing_if = "Option::is_none") )]
56015	pub colltn_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
56016	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxAmt", skip_serializing_if = "Option::is_none") )]
56017	pub max_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
56018	#[cfg_attr( feature = "derive_serde", serde(rename = "Adjstmnt", skip_serializing_if = "Option::is_none") )]
56019	pub adjstmnt: Option<MandateAdjustment1>,
56020	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
56021	pub rsn: Option<MandateSetupReason1Choice>,
56022	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrSchmeId", skip_serializing_if = "Option::is_none") )]
56023	pub cdtr_schme_id: Option<PartyIdentification272>,
56024	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
56025	pub cdtr: PartyIdentification272,
56026	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
56027	pub cdtr_acct: Option<CashAccount40>,
56028	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
56029	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
56030	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
56031	pub ultmt_cdtr: Option<PartyIdentification272>,
56032	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr") )]
56033	pub dbtr: PartyIdentification272,
56034	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
56035	pub dbtr_acct: Option<CashAccount40>,
56036	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt") )]
56037	pub dbtr_agt: BranchAndFinancialInstitutionIdentification8,
56038	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
56039	pub ultmt_dbtr: Option<PartyIdentification272>,
56040	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtRef", skip_serializing_if = "Option::is_none") )]
56041	pub mndt_ref: Option<String>,
56042	#[cfg_attr( feature = "derive_serde", serde(rename = "RfrdDoc", skip_serializing_if = "Option::is_none") )]
56043	pub rfrd_doc: Option<Vec<ReferredMandateDocument2>>,
56044}
56045
56046impl Mandate22 {
56047	pub fn validate(&self) -> Result<(), ValidationError> {
56048		if let Some(ref val) = self.mndt_id {
56049			if val.chars().count() < 1 {
56050				return Err(ValidationError::new(1001, "mndt_id is shorter than the minimum length of 1".to_string()));
56051			}
56052			if val.chars().count() > 35 {
56053				return Err(ValidationError::new(1002, "mndt_id exceeds the maximum length of 35".to_string()));
56054			}
56055		}
56056		if let Some(ref val) = self.mndt_req_id {
56057			if val.chars().count() < 1 {
56058				return Err(ValidationError::new(1001, "mndt_req_id is shorter than the minimum length of 1".to_string()));
56059			}
56060			if val.chars().count() > 35 {
56061				return Err(ValidationError::new(1002, "mndt_req_id exceeds the maximum length of 35".to_string()));
56062			}
56063		}
56064		if let Some(ref val) = self.authntcn { val.validate()? }
56065		if let Some(ref val) = self.tp { val.validate()? }
56066		if let Some(ref val) = self.ocrncs { val.validate()? }
56067		if let Some(ref val) = self.frst_colltn_amt { val.validate()? }
56068		if let Some(ref val) = self.colltn_amt { val.validate()? }
56069		if let Some(ref val) = self.max_amt { val.validate()? }
56070		if let Some(ref val) = self.adjstmnt { val.validate()? }
56071		if let Some(ref val) = self.rsn { val.validate()? }
56072		if let Some(ref val) = self.cdtr_schme_id { val.validate()? }
56073		self.cdtr.validate()?;
56074		if let Some(ref val) = self.cdtr_acct { val.validate()? }
56075		if let Some(ref val) = self.cdtr_agt { val.validate()? }
56076		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
56077		self.dbtr.validate()?;
56078		if let Some(ref val) = self.dbtr_acct { val.validate()? }
56079		self.dbtr_agt.validate()?;
56080		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
56081		if let Some(ref val) = self.mndt_ref {
56082			if val.chars().count() < 1 {
56083				return Err(ValidationError::new(1001, "mndt_ref is shorter than the minimum length of 1".to_string()));
56084			}
56085			if val.chars().count() > 35 {
56086				return Err(ValidationError::new(1002, "mndt_ref exceeds the maximum length of 35".to_string()));
56087			}
56088		}
56089		if let Some(ref vec) = self.rfrd_doc { for item in vec { item.validate()? } }
56090		Ok(())
56091	}
56092}
56093
56094
56095// Mandate23 ...
56096#[cfg_attr(feature = "derive_debug", derive(Debug))]
56097#[cfg_attr(feature = "derive_default", derive(Default))]
56098#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56099#[cfg_attr(feature = "derive_clone", derive(Clone))]
56100#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56101pub struct Mandate23 {
56102	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtId", skip_serializing_if = "Option::is_none") )]
56103	pub mndt_id: Option<Vec<String>>,
56104	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtReqId") )]
56105	pub mndt_req_id: String,
56106	#[cfg_attr( feature = "derive_serde", serde(rename = "Authntcn", skip_serializing_if = "Option::is_none") )]
56107	pub authntcn: Option<MandateAuthentication1>,
56108	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
56109	pub tp: Option<MandateTypeInformation2>,
56110	#[cfg_attr( feature = "derive_serde", serde(rename = "Ocrncs", skip_serializing_if = "Option::is_none") )]
56111	pub ocrncs: Option<MandateOccurrences5>,
56112	#[cfg_attr( feature = "derive_serde", serde(rename = "TrckgInd") )]
56113	pub trckg_ind: bool,
56114	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstColltnAmt", skip_serializing_if = "Option::is_none") )]
56115	pub frst_colltn_amt: Option<ActiveCurrencyAndAmount>,
56116	#[cfg_attr( feature = "derive_serde", serde(rename = "ColltnAmt", skip_serializing_if = "Option::is_none") )]
56117	pub colltn_amt: Option<ActiveCurrencyAndAmount>,
56118	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxAmt", skip_serializing_if = "Option::is_none") )]
56119	pub max_amt: Option<ActiveCurrencyAndAmount>,
56120	#[cfg_attr( feature = "derive_serde", serde(rename = "Adjstmnt", skip_serializing_if = "Option::is_none") )]
56121	pub adjstmnt: Option<MandateAdjustment1>,
56122	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
56123	pub rsn: Option<MandateSetupReason1Choice>,
56124	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrSchmeId", skip_serializing_if = "Option::is_none") )]
56125	pub cdtr_schme_id: Option<PartyIdentification272>,
56126	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
56127	pub cdtr: PartyIdentification272,
56128	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
56129	pub cdtr_acct: Option<CashAccount40>,
56130	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
56131	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
56132	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
56133	pub ultmt_cdtr: Option<PartyIdentification272>,
56134	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr") )]
56135	pub dbtr: PartyIdentification272,
56136	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
56137	pub dbtr_acct: Option<CashAccount40>,
56138	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt") )]
56139	pub dbtr_agt: BranchAndFinancialInstitutionIdentification8,
56140	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
56141	pub ultmt_dbtr: Option<PartyIdentification272>,
56142	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtRef", skip_serializing_if = "Option::is_none") )]
56143	pub mndt_ref: Option<String>,
56144	#[cfg_attr( feature = "derive_serde", serde(rename = "RfrdDoc", skip_serializing_if = "Option::is_none") )]
56145	pub rfrd_doc: Option<Vec<ReferredMandateDocument2>>,
56146	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
56147	pub splmtry_data: Option<Vec<SupplementaryData1>>,
56148}
56149
56150impl Mandate23 {
56151	pub fn validate(&self) -> Result<(), ValidationError> {
56152		if let Some(ref vec) = self.mndt_id {
56153			for item in vec {
56154				if item.chars().count() < 1 {
56155					return Err(ValidationError::new(1001, "mndt_id is shorter than the minimum length of 1".to_string()));
56156				}
56157				if item.chars().count() > 35 {
56158					return Err(ValidationError::new(1002, "mndt_id exceeds the maximum length of 35".to_string()));
56159				}
56160			}
56161		}
56162		if self.mndt_req_id.chars().count() < 1 {
56163			return Err(ValidationError::new(1001, "mndt_req_id is shorter than the minimum length of 1".to_string()));
56164		}
56165		if self.mndt_req_id.chars().count() > 35 {
56166			return Err(ValidationError::new(1002, "mndt_req_id exceeds the maximum length of 35".to_string()));
56167		}
56168		if let Some(ref val) = self.authntcn { val.validate()? }
56169		if let Some(ref val) = self.tp { val.validate()? }
56170		if let Some(ref val) = self.ocrncs { val.validate()? }
56171		if let Some(ref val) = self.frst_colltn_amt { val.validate()? }
56172		if let Some(ref val) = self.colltn_amt { val.validate()? }
56173		if let Some(ref val) = self.max_amt { val.validate()? }
56174		if let Some(ref val) = self.adjstmnt { val.validate()? }
56175		if let Some(ref val) = self.rsn { val.validate()? }
56176		if let Some(ref val) = self.cdtr_schme_id { val.validate()? }
56177		self.cdtr.validate()?;
56178		if let Some(ref val) = self.cdtr_acct { val.validate()? }
56179		if let Some(ref val) = self.cdtr_agt { val.validate()? }
56180		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
56181		self.dbtr.validate()?;
56182		if let Some(ref val) = self.dbtr_acct { val.validate()? }
56183		self.dbtr_agt.validate()?;
56184		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
56185		if let Some(ref val) = self.mndt_ref {
56186			if val.chars().count() < 1 {
56187				return Err(ValidationError::new(1001, "mndt_ref is shorter than the minimum length of 1".to_string()));
56188			}
56189			if val.chars().count() > 35 {
56190				return Err(ValidationError::new(1002, "mndt_ref exceeds the maximum length of 35".to_string()));
56191			}
56192		}
56193		if let Some(ref vec) = self.rfrd_doc { for item in vec { item.validate()? } }
56194		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
56195		Ok(())
56196	}
56197}
56198
56199
56200// MandateAcceptance8 ...
56201#[cfg_attr(feature = "derive_debug", derive(Debug))]
56202#[cfg_attr(feature = "derive_default", derive(Default))]
56203#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56204#[cfg_attr(feature = "derive_clone", derive(Clone))]
56205#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56206pub struct MandateAcceptance8 {
56207	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgInf", skip_serializing_if = "Option::is_none") )]
56208	pub orgnl_msg_inf: Option<OriginalMessageInformation1>,
56209	#[cfg_attr( feature = "derive_serde", serde(rename = "AccptncRslt") )]
56210	pub accptnc_rslt: AcceptanceResult6,
56211	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMndt", skip_serializing_if = "Option::is_none") )]
56212	pub orgnl_mndt: Option<OriginalMandate11Choice>,
56213	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
56214	pub splmtry_data: Option<Vec<SupplementaryData1>>,
56215}
56216
56217impl MandateAcceptance8 {
56218	pub fn validate(&self) -> Result<(), ValidationError> {
56219		if let Some(ref val) = self.orgnl_msg_inf { val.validate()? }
56220		self.accptnc_rslt.validate()?;
56221		if let Some(ref val) = self.orgnl_mndt { val.validate()? }
56222		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
56223		Ok(())
56224	}
56225}
56226
56227
56228// MandateAdjustment1 ...
56229#[cfg_attr(feature = "derive_debug", derive(Debug))]
56230#[cfg_attr(feature = "derive_default", derive(Default))]
56231#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56232#[cfg_attr(feature = "derive_clone", derive(Clone))]
56233#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56234pub struct MandateAdjustment1 {
56235	#[cfg_attr( feature = "derive_serde", serde(rename = "DtAdjstmntRuleInd") )]
56236	pub dt_adjstmnt_rule_ind: bool,
56237	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctgy", skip_serializing_if = "Option::is_none") )]
56238	pub ctgy: Option<Frequency37Choice>,
56239	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
56240	pub amt: Option<ActiveCurrencyAndAmount>,
56241	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
56242	pub rate: Option<f64>,
56243}
56244
56245impl MandateAdjustment1 {
56246	pub fn validate(&self) -> Result<(), ValidationError> {
56247		if let Some(ref val) = self.ctgy { val.validate()? }
56248		if let Some(ref val) = self.amt { val.validate()? }
56249		Ok(())
56250	}
56251}
56252
56253
56254// MandateAmendment8 ...
56255#[cfg_attr(feature = "derive_debug", derive(Debug))]
56256#[cfg_attr(feature = "derive_default", derive(Default))]
56257#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56258#[cfg_attr(feature = "derive_clone", derive(Clone))]
56259#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56260pub struct MandateAmendment8 {
56261	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgInf", skip_serializing_if = "Option::is_none") )]
56262	pub orgnl_msg_inf: Option<OriginalMessageInformation1>,
56263	#[cfg_attr( feature = "derive_serde", serde(rename = "AmdmntRsn") )]
56264	pub amdmnt_rsn: MandateAmendmentReason3,
56265	#[cfg_attr( feature = "derive_serde", serde(rename = "Mndt") )]
56266	pub mndt: Mandate21,
56267	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMndt") )]
56268	pub orgnl_mndt: OriginalMandate10Choice,
56269	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
56270	pub splmtry_data: Option<Vec<SupplementaryData1>>,
56271}
56272
56273impl MandateAmendment8 {
56274	pub fn validate(&self) -> Result<(), ValidationError> {
56275		if let Some(ref val) = self.orgnl_msg_inf { val.validate()? }
56276		self.amdmnt_rsn.validate()?;
56277		self.mndt.validate()?;
56278		self.orgnl_mndt.validate()?;
56279		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
56280		Ok(())
56281	}
56282}
56283
56284
56285// MandateAmendmentReason3 ...
56286#[cfg_attr(feature = "derive_debug", derive(Debug))]
56287#[cfg_attr(feature = "derive_default", derive(Default))]
56288#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56289#[cfg_attr(feature = "derive_clone", derive(Clone))]
56290#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56291pub struct MandateAmendmentReason3 {
56292	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
56293	pub orgtr: Option<PartyIdentification272>,
56294	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
56295	pub rsn: MandateReason1Choice,
56296	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
56297	pub addtl_inf: Option<Vec<String>>,
56298}
56299
56300impl MandateAmendmentReason3 {
56301	pub fn validate(&self) -> Result<(), ValidationError> {
56302		if let Some(ref val) = self.orgtr { val.validate()? }
56303		self.rsn.validate()?;
56304		if let Some(ref vec) = self.addtl_inf {
56305			for item in vec {
56306				if item.chars().count() < 1 {
56307					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
56308				}
56309				if item.chars().count() > 105 {
56310					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
56311				}
56312			}
56313		}
56314		Ok(())
56315	}
56316}
56317
56318
56319// MandateAuthentication1 ...
56320#[cfg_attr(feature = "derive_debug", derive(Debug))]
56321#[cfg_attr(feature = "derive_default", derive(Default))]
56322#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56323#[cfg_attr(feature = "derive_clone", derive(Clone))]
56324#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56325pub struct MandateAuthentication1 {
56326	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgAuthntcnCd", skip_serializing_if = "Option::is_none") )]
56327	pub msg_authntcn_cd: Option<String>,
56328	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
56329	pub dt: Option<String>,
56330	#[cfg_attr( feature = "derive_serde", serde(rename = "Chanl", skip_serializing_if = "Option::is_none") )]
56331	pub chanl: Option<AuthenticationChannel1Choice>,
56332}
56333
56334impl MandateAuthentication1 {
56335	pub fn validate(&self) -> Result<(), ValidationError> {
56336		if let Some(ref val) = self.msg_authntcn_cd {
56337			if val.chars().count() < 1 {
56338				return Err(ValidationError::new(1001, "msg_authntcn_cd is shorter than the minimum length of 1".to_string()));
56339			}
56340			if val.chars().count() > 16 {
56341				return Err(ValidationError::new(1002, "msg_authntcn_cd exceeds the maximum length of 16".to_string()));
56342			}
56343		}
56344		if let Some(ref val) = self.chanl { val.validate()? }
56345		Ok(())
56346	}
56347}
56348
56349
56350// MandateCancellation8 ...
56351#[cfg_attr(feature = "derive_debug", derive(Debug))]
56352#[cfg_attr(feature = "derive_default", derive(Default))]
56353#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56354#[cfg_attr(feature = "derive_clone", derive(Clone))]
56355#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56356pub struct MandateCancellation8 {
56357	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgInf", skip_serializing_if = "Option::is_none") )]
56358	pub orgnl_msg_inf: Option<OriginalMessageInformation1>,
56359	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlRsn") )]
56360	pub cxl_rsn: MandateCancellationReason2,
56361	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMndt") )]
56362	pub orgnl_mndt: OriginalMandate10Choice,
56363	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
56364	pub splmtry_data: Option<Vec<SupplementaryData1>>,
56365}
56366
56367impl MandateCancellation8 {
56368	pub fn validate(&self) -> Result<(), ValidationError> {
56369		if let Some(ref val) = self.orgnl_msg_inf { val.validate()? }
56370		self.cxl_rsn.validate()?;
56371		self.orgnl_mndt.validate()?;
56372		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
56373		Ok(())
56374	}
56375}
56376
56377
56378// MandateCancellationReason2 ...
56379#[cfg_attr(feature = "derive_debug", derive(Debug))]
56380#[cfg_attr(feature = "derive_default", derive(Default))]
56381#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56382#[cfg_attr(feature = "derive_clone", derive(Clone))]
56383#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56384pub struct MandateCancellationReason2 {
56385	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
56386	pub orgtr: Option<PartyIdentification272>,
56387	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
56388	pub rsn: MandateReason1Choice,
56389	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
56390	pub addtl_inf: Option<Vec<String>>,
56391}
56392
56393impl MandateCancellationReason2 {
56394	pub fn validate(&self) -> Result<(), ValidationError> {
56395		if let Some(ref val) = self.orgtr { val.validate()? }
56396		self.rsn.validate()?;
56397		if let Some(ref vec) = self.addtl_inf {
56398			for item in vec {
56399				if item.chars().count() < 1 {
56400					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
56401				}
56402				if item.chars().count() > 105 {
56403					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
56404				}
56405			}
56406		}
56407		Ok(())
56408	}
56409}
56410
56411
56412// MandateClassification1Choice ...
56413#[cfg_attr(feature = "derive_debug", derive(Debug))]
56414#[cfg_attr(feature = "derive_default", derive(Default))]
56415#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56416#[cfg_attr(feature = "derive_clone", derive(Clone))]
56417#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56418pub struct MandateClassification1Choice {
56419	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
56420	pub cd: Option<MandateClassification1Code>,
56421	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
56422	pub prtry: Option<String>,
56423}
56424
56425impl MandateClassification1Choice {
56426	pub fn validate(&self) -> Result<(), ValidationError> {
56427		if let Some(ref val) = self.cd { val.validate()? }
56428		if let Some(ref val) = self.prtry {
56429			if val.chars().count() < 1 {
56430				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
56431			}
56432			if val.chars().count() > 35 {
56433				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
56434			}
56435		}
56436		Ok(())
56437	}
56438}
56439
56440
56441// MandateClassification1Code ...
56442#[cfg_attr(feature = "derive_debug", derive(Debug))]
56443#[cfg_attr(feature = "derive_default", derive(Default))]
56444#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56445#[cfg_attr(feature = "derive_clone", derive(Clone))]
56446#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56447pub enum MandateClassification1Code {
56448	#[cfg_attr(feature = "derive_default", default)]
56449	#[cfg_attr( feature = "derive_serde", serde(rename = "FIXE") )]
56450	CodeFIXE,
56451	#[cfg_attr( feature = "derive_serde", serde(rename = "USGB") )]
56452	CodeUSGB,
56453	#[cfg_attr( feature = "derive_serde", serde(rename = "VARI") )]
56454	CodeVARI,
56455}
56456
56457impl MandateClassification1Code {
56458	pub fn validate(&self) -> Result<(), ValidationError> {
56459		Ok(())
56460	}
56461}
56462
56463
56464// MandateCopy4 ...
56465#[cfg_attr(feature = "derive_debug", derive(Debug))]
56466#[cfg_attr(feature = "derive_default", derive(Default))]
56467#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56468#[cfg_attr(feature = "derive_clone", derive(Clone))]
56469#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56470pub struct MandateCopy4 {
56471	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgInf", skip_serializing_if = "Option::is_none") )]
56472	pub orgnl_msg_inf: Option<OriginalMessageInformation1>,
56473	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMndt") )]
56474	pub orgnl_mndt: OriginalMandate10Choice,
56475	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtSts", skip_serializing_if = "Option::is_none") )]
56476	pub mndt_sts: Option<MandateStatus1Choice>,
56477	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
56478	pub splmtry_data: Option<Vec<SupplementaryData1>>,
56479}
56480
56481impl MandateCopy4 {
56482	pub fn validate(&self) -> Result<(), ValidationError> {
56483		if let Some(ref val) = self.orgnl_msg_inf { val.validate()? }
56484		self.orgnl_mndt.validate()?;
56485		if let Some(ref val) = self.mndt_sts { val.validate()? }
56486		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
56487		Ok(())
56488	}
56489}
56490
56491
56492// MandateOccurrences5 ...
56493#[cfg_attr(feature = "derive_debug", derive(Debug))]
56494#[cfg_attr(feature = "derive_default", derive(Default))]
56495#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56496#[cfg_attr(feature = "derive_clone", derive(Clone))]
56497#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56498pub struct MandateOccurrences5 {
56499	#[cfg_attr( feature = "derive_serde", serde(rename = "SeqTp") )]
56500	pub seq_tp: SequenceType2Code,
56501	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy", skip_serializing_if = "Option::is_none") )]
56502	pub frqcy: Option<Frequency36Choice>,
56503	#[cfg_attr( feature = "derive_serde", serde(rename = "Drtn", skip_serializing_if = "Option::is_none") )]
56504	pub drtn: Option<DatePeriod3>,
56505	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstColltnDt", skip_serializing_if = "Option::is_none") )]
56506	pub frst_colltn_dt: Option<String>,
56507	#[cfg_attr( feature = "derive_serde", serde(rename = "FnlColltnDt", skip_serializing_if = "Option::is_none") )]
56508	pub fnl_colltn_dt: Option<String>,
56509}
56510
56511impl MandateOccurrences5 {
56512	pub fn validate(&self) -> Result<(), ValidationError> {
56513		self.seq_tp.validate()?;
56514		if let Some(ref val) = self.frqcy { val.validate()? }
56515		if let Some(ref val) = self.drtn { val.validate()? }
56516		Ok(())
56517	}
56518}
56519
56520
56521// MandateReason1Choice ...
56522#[cfg_attr(feature = "derive_debug", derive(Debug))]
56523#[cfg_attr(feature = "derive_default", derive(Default))]
56524#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56525#[cfg_attr(feature = "derive_clone", derive(Clone))]
56526#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56527pub struct MandateReason1Choice {
56528	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
56529	pub cd: Option<String>,
56530	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
56531	pub prtry: Option<String>,
56532}
56533
56534impl MandateReason1Choice {
56535	pub fn validate(&self) -> Result<(), ValidationError> {
56536		if let Some(ref val) = self.cd {
56537			if val.chars().count() < 1 {
56538				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
56539			}
56540			if val.chars().count() > 4 {
56541				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
56542			}
56543		}
56544		if let Some(ref val) = self.prtry {
56545			if val.chars().count() < 1 {
56546				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
56547			}
56548			if val.chars().count() > 35 {
56549				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
56550			}
56551		}
56552		Ok(())
56553	}
56554}
56555
56556
56557// MandateRelatedData2Choice ...
56558#[cfg_attr(feature = "derive_debug", derive(Debug))]
56559#[cfg_attr(feature = "derive_default", derive(Default))]
56560#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56561#[cfg_attr(feature = "derive_clone", derive(Clone))]
56562#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56563pub struct MandateRelatedData2Choice {
56564	#[cfg_attr( feature = "derive_serde", serde(rename = "DrctDbtMndt", skip_serializing_if = "Option::is_none") )]
56565	pub drct_dbt_mndt: Option<MandateRelatedInformation15>,
56566	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtTrfMndt", skip_serializing_if = "Option::is_none") )]
56567	pub cdt_trf_mndt: Option<CreditTransferMandateData1>,
56568}
56569
56570impl MandateRelatedData2Choice {
56571	pub fn validate(&self) -> Result<(), ValidationError> {
56572		if let Some(ref val) = self.drct_dbt_mndt { val.validate()? }
56573		if let Some(ref val) = self.cdt_trf_mndt { val.validate()? }
56574		Ok(())
56575	}
56576}
56577
56578
56579// MandateRelatedData3Choice ...
56580#[cfg_attr(feature = "derive_debug", derive(Debug))]
56581#[cfg_attr(feature = "derive_default", derive(Default))]
56582#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56583#[cfg_attr(feature = "derive_clone", derive(Clone))]
56584#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56585pub struct MandateRelatedData3Choice {
56586	#[cfg_attr( feature = "derive_serde", serde(rename = "DrctDbtMndt", skip_serializing_if = "Option::is_none") )]
56587	pub drct_dbt_mndt: Option<MandateRelatedInformation16>,
56588	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtTrfMndt", skip_serializing_if = "Option::is_none") )]
56589	pub cdt_trf_mndt: Option<CreditTransferMandateData1>,
56590}
56591
56592impl MandateRelatedData3Choice {
56593	pub fn validate(&self) -> Result<(), ValidationError> {
56594		if let Some(ref val) = self.drct_dbt_mndt { val.validate()? }
56595		if let Some(ref val) = self.cdt_trf_mndt { val.validate()? }
56596		Ok(())
56597	}
56598}
56599
56600
56601// MandateRelatedInformation15 ...
56602#[cfg_attr(feature = "derive_debug", derive(Debug))]
56603#[cfg_attr(feature = "derive_default", derive(Default))]
56604#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56605#[cfg_attr(feature = "derive_clone", derive(Clone))]
56606#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56607pub struct MandateRelatedInformation15 {
56608	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtId", skip_serializing_if = "Option::is_none") )]
56609	pub mndt_id: Option<String>,
56610	#[cfg_attr( feature = "derive_serde", serde(rename = "DtOfSgntr", skip_serializing_if = "Option::is_none") )]
56611	pub dt_of_sgntr: Option<String>,
56612	#[cfg_attr( feature = "derive_serde", serde(rename = "AmdmntInd", skip_serializing_if = "Option::is_none") )]
56613	pub amdmnt_ind: Option<bool>,
56614	#[cfg_attr( feature = "derive_serde", serde(rename = "AmdmntInfDtls", skip_serializing_if = "Option::is_none") )]
56615	pub amdmnt_inf_dtls: Option<AmendmentInformationDetails14>,
56616	#[cfg_attr( feature = "derive_serde", serde(rename = "ElctrncSgntr", skip_serializing_if = "Option::is_none") )]
56617	pub elctrnc_sgntr: Option<String>,
56618	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstColltnDt", skip_serializing_if = "Option::is_none") )]
56619	pub frst_colltn_dt: Option<String>,
56620	#[cfg_attr( feature = "derive_serde", serde(rename = "FnlColltnDt", skip_serializing_if = "Option::is_none") )]
56621	pub fnl_colltn_dt: Option<String>,
56622	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy", skip_serializing_if = "Option::is_none") )]
56623	pub frqcy: Option<Frequency36Choice>,
56624	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
56625	pub rsn: Option<MandateSetupReason1Choice>,
56626	#[cfg_attr( feature = "derive_serde", serde(rename = "TrckgDays", skip_serializing_if = "Option::is_none") )]
56627	pub trckg_days: Option<String>,
56628}
56629
56630impl MandateRelatedInformation15 {
56631	pub fn validate(&self) -> Result<(), ValidationError> {
56632		if let Some(ref val) = self.mndt_id {
56633			if val.chars().count() < 1 {
56634				return Err(ValidationError::new(1001, "mndt_id is shorter than the minimum length of 1".to_string()));
56635			}
56636			if val.chars().count() > 35 {
56637				return Err(ValidationError::new(1002, "mndt_id exceeds the maximum length of 35".to_string()));
56638			}
56639		}
56640		if let Some(ref val) = self.amdmnt_inf_dtls { val.validate()? }
56641		if let Some(ref val) = self.elctrnc_sgntr {
56642			if val.chars().count() < 1 {
56643				return Err(ValidationError::new(1001, "elctrnc_sgntr is shorter than the minimum length of 1".to_string()));
56644			}
56645			if val.chars().count() > 1025 {
56646				return Err(ValidationError::new(1002, "elctrnc_sgntr exceeds the maximum length of 1025".to_string()));
56647			}
56648		}
56649		if let Some(ref val) = self.frqcy { val.validate()? }
56650		if let Some(ref val) = self.rsn { val.validate()? }
56651		if let Some(ref val) = self.trckg_days {
56652			let pattern = Regex::new("[0-9]{2}").unwrap();
56653			if !pattern.is_match(val) {
56654				return Err(ValidationError::new(1005, "trckg_days does not match the required pattern".to_string()));
56655			}
56656		}
56657		Ok(())
56658	}
56659}
56660
56661
56662// MandateRelatedInformation16 ...
56663#[cfg_attr(feature = "derive_debug", derive(Debug))]
56664#[cfg_attr(feature = "derive_default", derive(Default))]
56665#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56666#[cfg_attr(feature = "derive_clone", derive(Clone))]
56667#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56668pub struct MandateRelatedInformation16 {
56669	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtId", skip_serializing_if = "Option::is_none") )]
56670	pub mndt_id: Option<String>,
56671	#[cfg_attr( feature = "derive_serde", serde(rename = "DtOfSgntr", skip_serializing_if = "Option::is_none") )]
56672	pub dt_of_sgntr: Option<String>,
56673	#[cfg_attr( feature = "derive_serde", serde(rename = "AmdmntInd", skip_serializing_if = "Option::is_none") )]
56674	pub amdmnt_ind: Option<bool>,
56675	#[cfg_attr( feature = "derive_serde", serde(rename = "AmdmntInfDtls", skip_serializing_if = "Option::is_none") )]
56676	pub amdmnt_inf_dtls: Option<AmendmentInformationDetails15>,
56677	#[cfg_attr( feature = "derive_serde", serde(rename = "ElctrncSgntr", skip_serializing_if = "Option::is_none") )]
56678	pub elctrnc_sgntr: Option<String>,
56679	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstColltnDt", skip_serializing_if = "Option::is_none") )]
56680	pub frst_colltn_dt: Option<String>,
56681	#[cfg_attr( feature = "derive_serde", serde(rename = "FnlColltnDt", skip_serializing_if = "Option::is_none") )]
56682	pub fnl_colltn_dt: Option<String>,
56683	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy", skip_serializing_if = "Option::is_none") )]
56684	pub frqcy: Option<Frequency36Choice>,
56685	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
56686	pub rsn: Option<MandateSetupReason1Choice>,
56687	#[cfg_attr( feature = "derive_serde", serde(rename = "TrckgDays", skip_serializing_if = "Option::is_none") )]
56688	pub trckg_days: Option<String>,
56689}
56690
56691impl MandateRelatedInformation16 {
56692	pub fn validate(&self) -> Result<(), ValidationError> {
56693		if let Some(ref val) = self.mndt_id {
56694			if val.chars().count() < 1 {
56695				return Err(ValidationError::new(1001, "mndt_id is shorter than the minimum length of 1".to_string()));
56696			}
56697			if val.chars().count() > 35 {
56698				return Err(ValidationError::new(1002, "mndt_id exceeds the maximum length of 35".to_string()));
56699			}
56700		}
56701		if let Some(ref val) = self.amdmnt_inf_dtls { val.validate()? }
56702		if let Some(ref val) = self.elctrnc_sgntr {
56703			if val.chars().count() < 1 {
56704				return Err(ValidationError::new(1001, "elctrnc_sgntr is shorter than the minimum length of 1".to_string()));
56705			}
56706			if val.chars().count() > 1025 {
56707				return Err(ValidationError::new(1002, "elctrnc_sgntr exceeds the maximum length of 1025".to_string()));
56708			}
56709		}
56710		if let Some(ref val) = self.frqcy { val.validate()? }
56711		if let Some(ref val) = self.rsn { val.validate()? }
56712		if let Some(ref val) = self.trckg_days {
56713			let pattern = Regex::new("[0-9]{2}").unwrap();
56714			if !pattern.is_match(val) {
56715				return Err(ValidationError::new(1005, "trckg_days does not match the required pattern".to_string()));
56716			}
56717		}
56718		Ok(())
56719	}
56720}
56721
56722
56723// MandateSetupReason1Choice ...
56724#[cfg_attr(feature = "derive_debug", derive(Debug))]
56725#[cfg_attr(feature = "derive_default", derive(Default))]
56726#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56727#[cfg_attr(feature = "derive_clone", derive(Clone))]
56728#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56729pub struct MandateSetupReason1Choice {
56730	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
56731	pub cd: Option<String>,
56732	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
56733	pub prtry: Option<String>,
56734}
56735
56736impl MandateSetupReason1Choice {
56737	pub fn validate(&self) -> Result<(), ValidationError> {
56738		if let Some(ref val) = self.cd {
56739			if val.chars().count() < 1 {
56740				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
56741			}
56742			if val.chars().count() > 4 {
56743				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
56744			}
56745		}
56746		if let Some(ref val) = self.prtry {
56747			if val.chars().count() < 1 {
56748				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
56749			}
56750			if val.chars().count() > 70 {
56751				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 70".to_string()));
56752			}
56753		}
56754		Ok(())
56755	}
56756}
56757
56758
56759// MandateStatus1Choice ...
56760#[cfg_attr(feature = "derive_debug", derive(Debug))]
56761#[cfg_attr(feature = "derive_default", derive(Default))]
56762#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56763#[cfg_attr(feature = "derive_clone", derive(Clone))]
56764#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56765pub struct MandateStatus1Choice {
56766	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
56767	pub cd: Option<String>,
56768	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
56769	pub prtry: Option<String>,
56770}
56771
56772impl MandateStatus1Choice {
56773	pub fn validate(&self) -> Result<(), ValidationError> {
56774		if let Some(ref val) = self.cd {
56775			if val.chars().count() < 1 {
56776				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
56777			}
56778			if val.chars().count() > 4 {
56779				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
56780			}
56781		}
56782		if let Some(ref val) = self.prtry {
56783			if val.chars().count() < 1 {
56784				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
56785			}
56786			if val.chars().count() > 35 {
56787				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
56788			}
56789		}
56790		Ok(())
56791	}
56792}
56793
56794
56795// MandateSuspension4 ...
56796#[cfg_attr(feature = "derive_debug", derive(Debug))]
56797#[cfg_attr(feature = "derive_default", derive(Default))]
56798#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56799#[cfg_attr(feature = "derive_clone", derive(Clone))]
56800#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56801pub struct MandateSuspension4 {
56802	#[cfg_attr( feature = "derive_serde", serde(rename = "SspnsnReqId") )]
56803	pub sspnsn_req_id: String,
56804	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgInf", skip_serializing_if = "Option::is_none") )]
56805	pub orgnl_msg_inf: Option<OriginalMessageInformation1>,
56806	#[cfg_attr( feature = "derive_serde", serde(rename = "SspnsnRsn") )]
56807	pub sspnsn_rsn: MandateSuspensionReason3,
56808	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMndt") )]
56809	pub orgnl_mndt: OriginalMandate10Choice,
56810	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
56811	pub splmtry_data: Option<Vec<SupplementaryData1>>,
56812}
56813
56814impl MandateSuspension4 {
56815	pub fn validate(&self) -> Result<(), ValidationError> {
56816		if self.sspnsn_req_id.chars().count() < 1 {
56817			return Err(ValidationError::new(1001, "sspnsn_req_id is shorter than the minimum length of 1".to_string()));
56818		}
56819		if self.sspnsn_req_id.chars().count() > 35 {
56820			return Err(ValidationError::new(1002, "sspnsn_req_id exceeds the maximum length of 35".to_string()));
56821		}
56822		if let Some(ref val) = self.orgnl_msg_inf { val.validate()? }
56823		self.sspnsn_rsn.validate()?;
56824		self.orgnl_mndt.validate()?;
56825		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
56826		Ok(())
56827	}
56828}
56829
56830
56831// MandateSuspensionReason1Choice ...
56832#[cfg_attr(feature = "derive_debug", derive(Debug))]
56833#[cfg_attr(feature = "derive_default", derive(Default))]
56834#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56835#[cfg_attr(feature = "derive_clone", derive(Clone))]
56836#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56837pub struct MandateSuspensionReason1Choice {
56838	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
56839	pub cd: Option<String>,
56840	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
56841	pub prtry: Option<String>,
56842}
56843
56844impl MandateSuspensionReason1Choice {
56845	pub fn validate(&self) -> Result<(), ValidationError> {
56846		if let Some(ref val) = self.cd {
56847			if val.chars().count() < 1 {
56848				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
56849			}
56850			if val.chars().count() > 4 {
56851				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
56852			}
56853		}
56854		if let Some(ref val) = self.prtry {
56855			if val.chars().count() < 1 {
56856				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
56857			}
56858			if val.chars().count() > 35 {
56859				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
56860			}
56861		}
56862		Ok(())
56863	}
56864}
56865
56866
56867// MandateSuspensionReason3 ...
56868#[cfg_attr(feature = "derive_debug", derive(Debug))]
56869#[cfg_attr(feature = "derive_default", derive(Default))]
56870#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56871#[cfg_attr(feature = "derive_clone", derive(Clone))]
56872#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56873pub struct MandateSuspensionReason3 {
56874	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
56875	pub orgtr: Option<PartyIdentification272>,
56876	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
56877	pub rsn: MandateSuspensionReason1Choice,
56878	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
56879	pub addtl_inf: Option<Vec<String>>,
56880}
56881
56882impl MandateSuspensionReason3 {
56883	pub fn validate(&self) -> Result<(), ValidationError> {
56884		if let Some(ref val) = self.orgtr { val.validate()? }
56885		self.rsn.validate()?;
56886		if let Some(ref vec) = self.addtl_inf {
56887			for item in vec {
56888				if item.chars().count() < 1 {
56889					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
56890				}
56891				if item.chars().count() > 105 {
56892					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
56893				}
56894			}
56895		}
56896		Ok(())
56897	}
56898}
56899
56900
56901// MandateTypeInformation2 ...
56902#[cfg_attr(feature = "derive_debug", derive(Debug))]
56903#[cfg_attr(feature = "derive_default", derive(Default))]
56904#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56905#[cfg_attr(feature = "derive_clone", derive(Clone))]
56906#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56907pub struct MandateTypeInformation2 {
56908	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcLvl", skip_serializing_if = "Option::is_none") )]
56909	pub svc_lvl: Option<ServiceLevel8Choice>,
56910	#[cfg_attr( feature = "derive_serde", serde(rename = "LclInstrm", skip_serializing_if = "Option::is_none") )]
56911	pub lcl_instrm: Option<LocalInstrument2Choice>,
56912	#[cfg_attr( feature = "derive_serde", serde(rename = "CtgyPurp", skip_serializing_if = "Option::is_none") )]
56913	pub ctgy_purp: Option<CategoryPurpose1Choice>,
56914	#[cfg_attr( feature = "derive_serde", serde(rename = "Clssfctn", skip_serializing_if = "Option::is_none") )]
56915	pub clssfctn: Option<MandateClassification1Choice>,
56916}
56917
56918impl MandateTypeInformation2 {
56919	pub fn validate(&self) -> Result<(), ValidationError> {
56920		if let Some(ref val) = self.svc_lvl { val.validate()? }
56921		if let Some(ref val) = self.lcl_instrm { val.validate()? }
56922		if let Some(ref val) = self.ctgy_purp { val.validate()? }
56923		if let Some(ref val) = self.clssfctn { val.validate()? }
56924		Ok(())
56925	}
56926}
56927
56928
56929// ManifestData2 ...
56930#[cfg_attr(feature = "derive_debug", derive(Debug))]
56931#[cfg_attr(feature = "derive_default", derive(Default))]
56932#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56933#[cfg_attr(feature = "derive_clone", derive(Clone))]
56934#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56935pub struct ManifestData2 {
56936	#[cfg_attr( feature = "derive_serde", serde(rename = "DocTp") )]
56937	pub doc_tp: String,
56938	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfDocs") )]
56939	pub nb_of_docs: f64,
56940}
56941
56942impl ManifestData2 {
56943	pub fn validate(&self) -> Result<(), ValidationError> {
56944		if self.doc_tp.chars().count() < 1 {
56945			return Err(ValidationError::new(1001, "doc_tp is shorter than the minimum length of 1".to_string()));
56946		}
56947		if self.doc_tp.chars().count() > 35 {
56948			return Err(ValidationError::new(1002, "doc_tp exceeds the maximum length of 35".to_string()));
56949		}
56950		Ok(())
56951	}
56952}
56953
56954
56955// MarginAccount1 ...
56956#[cfg_attr(feature = "derive_debug", derive(Debug))]
56957#[cfg_attr(feature = "derive_default", derive(Default))]
56958#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56959#[cfg_attr(feature = "derive_clone", derive(Clone))]
56960#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56961pub struct MarginAccount1 {
56962	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
56963	pub id: PartyIdentification118Choice,
56964	#[cfg_attr( feature = "derive_serde", serde(rename = "PosAcct") )]
56965	pub pos_acct: Vec<PositionAccount1>,
56966}
56967
56968impl MarginAccount1 {
56969	pub fn validate(&self) -> Result<(), ValidationError> {
56970		self.id.validate()?;
56971		for item in &self.pos_acct { item.validate()? }
56972		Ok(())
56973	}
56974}
56975
56976
56977// MarginCollateralReport4 ...
56978#[cfg_attr(feature = "derive_debug", derive(Debug))]
56979#[cfg_attr(feature = "derive_default", derive(Default))]
56980#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
56981#[cfg_attr(feature = "derive_clone", derive(Clone))]
56982#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
56983pub struct MarginCollateralReport4 {
56984	#[cfg_attr( feature = "derive_serde", serde(rename = "CollPrtflCd") )]
56985	pub coll_prtfl_cd: CollateralPortfolioCode5Choice,
56986	#[cfg_attr( feature = "derive_serde", serde(rename = "CollstnCtgy") )]
56987	pub collstn_ctgy: CollateralisationType3Code,
56988	#[cfg_attr( feature = "derive_serde", serde(rename = "TmStmp", skip_serializing_if = "Option::is_none") )]
56989	pub tm_stmp: Option<String>,
56990}
56991
56992impl MarginCollateralReport4 {
56993	pub fn validate(&self) -> Result<(), ValidationError> {
56994		self.coll_prtfl_cd.validate()?;
56995		self.collstn_ctgy.validate()?;
56996		Ok(())
56997	}
56998}
56999
57000
57001// MarginCollateralReport5 ...
57002#[cfg_attr(feature = "derive_debug", derive(Debug))]
57003#[cfg_attr(feature = "derive_default", derive(Default))]
57004#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57005#[cfg_attr(feature = "derive_clone", derive(Clone))]
57006#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57007pub struct MarginCollateralReport5 {
57008	#[cfg_attr( feature = "derive_serde", serde(rename = "CollPrtflCd") )]
57009	pub coll_prtfl_cd: CollateralPortfolioCode6Choice,
57010	#[cfg_attr( feature = "derive_serde", serde(rename = "CollstnCtgy") )]
57011	pub collstn_ctgy: CollateralisationType3Code,
57012	#[cfg_attr( feature = "derive_serde", serde(rename = "TmStmp", skip_serializing_if = "Option::is_none") )]
57013	pub tm_stmp: Option<String>,
57014}
57015
57016impl MarginCollateralReport5 {
57017	pub fn validate(&self) -> Result<(), ValidationError> {
57018		self.coll_prtfl_cd.validate()?;
57019		self.collstn_ctgy.validate()?;
57020		Ok(())
57021	}
57022}
57023
57024
57025// MarginPortfolio3 ...
57026#[cfg_attr(feature = "derive_debug", derive(Debug))]
57027#[cfg_attr(feature = "derive_default", derive(Default))]
57028#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57029#[cfg_attr(feature = "derive_clone", derive(Clone))]
57030#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57031pub struct MarginPortfolio3 {
57032	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlMrgnPrtflCd") )]
57033	pub initl_mrgn_prtfl_cd: PortfolioCode5Choice,
57034	#[cfg_attr( feature = "derive_serde", serde(rename = "VartnMrgnPrtflCd", skip_serializing_if = "Option::is_none") )]
57035	pub vartn_mrgn_prtfl_cd: Option<PortfolioCode5Choice>,
57036}
57037
57038impl MarginPortfolio3 {
57039	pub fn validate(&self) -> Result<(), ValidationError> {
57040		self.initl_mrgn_prtfl_cd.validate()?;
57041		if let Some(ref val) = self.vartn_mrgn_prtfl_cd { val.validate()? }
57042		Ok(())
57043	}
57044}
57045
57046
57047// MarginPortfolio4 ...
57048#[cfg_attr(feature = "derive_debug", derive(Debug))]
57049#[cfg_attr(feature = "derive_default", derive(Default))]
57050#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57051#[cfg_attr(feature = "derive_clone", derive(Clone))]
57052#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57053pub struct MarginPortfolio4 {
57054	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlMrgnPrtflCd", skip_serializing_if = "Option::is_none") )]
57055	pub initl_mrgn_prtfl_cd: Option<PortfolioCode5Choice>,
57056	#[cfg_attr( feature = "derive_serde", serde(rename = "VartnMrgnPrtflCd", skip_serializing_if = "Option::is_none") )]
57057	pub vartn_mrgn_prtfl_cd: Option<PortfolioCode5Choice>,
57058}
57059
57060impl MarginPortfolio4 {
57061	pub fn validate(&self) -> Result<(), ValidationError> {
57062		if let Some(ref val) = self.initl_mrgn_prtfl_cd { val.validate()? }
57063		if let Some(ref val) = self.vartn_mrgn_prtfl_cd { val.validate()? }
57064		Ok(())
57065	}
57066}
57067
57068
57069// MarginReportData10 ...
57070#[cfg_attr(feature = "derive_debug", derive(Debug))]
57071#[cfg_attr(feature = "derive_default", derive(Default))]
57072#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57073#[cfg_attr(feature = "derive_clone", derive(Clone))]
57074#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57075pub struct MarginReportData10 {
57076	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgTmStmp", skip_serializing_if = "Option::is_none") )]
57077	pub rptg_tm_stmp: Option<String>,
57078	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId") )]
57079	pub ctr_pty_id: TradeCounterpartyReport20,
57080	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt", skip_serializing_if = "Option::is_none") )]
57081	pub evt_dt: Option<String>,
57082	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
57083	pub tx_id: Option<UniqueTransactionIdentifier2Choice>,
57084	#[cfg_attr( feature = "derive_serde", serde(rename = "Coll") )]
57085	pub coll: MarginCollateralReport5,
57086	#[cfg_attr( feature = "derive_serde", serde(rename = "PstdMrgnOrColl", skip_serializing_if = "Option::is_none") )]
57087	pub pstd_mrgn_or_coll: Option<PostedMarginOrCollateral6>,
57088	#[cfg_attr( feature = "derive_serde", serde(rename = "RcvdMrgnOrColl", skip_serializing_if = "Option::is_none") )]
57089	pub rcvd_mrgn_or_coll: Option<ReceivedMarginOrCollateral6>,
57090	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyRatgTrggrInd", skip_serializing_if = "Option::is_none") )]
57091	pub ctr_pty_ratg_trggr_ind: Option<bool>,
57092	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyRatgThrshldInd", skip_serializing_if = "Option::is_none") )]
57093	pub ctr_pty_ratg_thrshld_ind: Option<bool>,
57094	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctMod", skip_serializing_if = "Option::is_none") )]
57095	pub ctrct_mod: Option<ContractModification8>,
57096	#[cfg_attr( feature = "derive_serde", serde(rename = "TechAttrbts", skip_serializing_if = "Option::is_none") )]
57097	pub tech_attrbts: Option<TechnicalAttributes6>,
57098	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
57099	pub splmtry_data: Option<Vec<SupplementaryData1>>,
57100}
57101
57102impl MarginReportData10 {
57103	pub fn validate(&self) -> Result<(), ValidationError> {
57104		self.ctr_pty_id.validate()?;
57105		if let Some(ref val) = self.tx_id { val.validate()? }
57106		self.coll.validate()?;
57107		if let Some(ref val) = self.pstd_mrgn_or_coll { val.validate()? }
57108		if let Some(ref val) = self.rcvd_mrgn_or_coll { val.validate()? }
57109		if let Some(ref val) = self.ctrct_mod { val.validate()? }
57110		if let Some(ref val) = self.tech_attrbts { val.validate()? }
57111		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
57112		Ok(())
57113	}
57114}
57115
57116
57117// MarginReportData9 ...
57118#[cfg_attr(feature = "derive_debug", derive(Debug))]
57119#[cfg_attr(feature = "derive_default", derive(Default))]
57120#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57121#[cfg_attr(feature = "derive_clone", derive(Clone))]
57122#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57123pub struct MarginReportData9 {
57124	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgTmStmp", skip_serializing_if = "Option::is_none") )]
57125	pub rptg_tm_stmp: Option<String>,
57126	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId") )]
57127	pub ctr_pty_id: TradeCounterpartyReport20,
57128	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDt", skip_serializing_if = "Option::is_none") )]
57129	pub evt_dt: Option<String>,
57130	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
57131	pub tx_id: Option<UniqueTransactionIdentifier2Choice>,
57132	#[cfg_attr( feature = "derive_serde", serde(rename = "Coll") )]
57133	pub coll: MarginCollateralReport5,
57134	#[cfg_attr( feature = "derive_serde", serde(rename = "PstdMrgnOrColl", skip_serializing_if = "Option::is_none") )]
57135	pub pstd_mrgn_or_coll: Option<PostedMarginOrCollateral6>,
57136	#[cfg_attr( feature = "derive_serde", serde(rename = "RcvdMrgnOrColl", skip_serializing_if = "Option::is_none") )]
57137	pub rcvd_mrgn_or_coll: Option<ReceivedMarginOrCollateral6>,
57138	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyRatgTrggrInd", skip_serializing_if = "Option::is_none") )]
57139	pub ctr_pty_ratg_trggr_ind: Option<bool>,
57140	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyRatgThrshldInd", skip_serializing_if = "Option::is_none") )]
57141	pub ctr_pty_ratg_thrshld_ind: Option<bool>,
57142	#[cfg_attr( feature = "derive_serde", serde(rename = "TechAttrbts", skip_serializing_if = "Option::is_none") )]
57143	pub tech_attrbts: Option<TechnicalAttributes6>,
57144	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
57145	pub splmtry_data: Option<Vec<SupplementaryData1>>,
57146}
57147
57148impl MarginReportData9 {
57149	pub fn validate(&self) -> Result<(), ValidationError> {
57150		self.ctr_pty_id.validate()?;
57151		if let Some(ref val) = self.tx_id { val.validate()? }
57152		self.coll.validate()?;
57153		if let Some(ref val) = self.pstd_mrgn_or_coll { val.validate()? }
57154		if let Some(ref val) = self.rcvd_mrgn_or_coll { val.validate()? }
57155		if let Some(ref val) = self.tech_attrbts { val.validate()? }
57156		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
57157		Ok(())
57158	}
57159}
57160
57161
57162// MarginType2Choice ...
57163#[cfg_attr(feature = "derive_debug", derive(Debug))]
57164#[cfg_attr(feature = "derive_default", derive(Default))]
57165#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57166#[cfg_attr(feature = "derive_clone", derive(Clone))]
57167#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57168pub struct MarginType2Choice {
57169	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
57170	pub cd: Option<MarginType2Code>,
57171	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
57172	pub prtry: Option<GenericIdentification36>,
57173}
57174
57175impl MarginType2Choice {
57176	pub fn validate(&self) -> Result<(), ValidationError> {
57177		if let Some(ref val) = self.cd { val.validate()? }
57178		if let Some(ref val) = self.prtry { val.validate()? }
57179		Ok(())
57180	}
57181}
57182
57183
57184// MarginType2Code ...
57185#[cfg_attr(feature = "derive_debug", derive(Debug))]
57186#[cfg_attr(feature = "derive_default", derive(Default))]
57187#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57188#[cfg_attr(feature = "derive_clone", derive(Clone))]
57189#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57190pub enum MarginType2Code {
57191	#[cfg_attr(feature = "derive_default", default)]
57192	#[cfg_attr( feature = "derive_serde", serde(rename = "ADFM") )]
57193	CodeADFM,
57194	#[cfg_attr( feature = "derive_serde", serde(rename = "COMA") )]
57195	CodeCOMA,
57196	#[cfg_attr( feature = "derive_serde", serde(rename = "CEMA") )]
57197	CodeCEMA,
57198	#[cfg_attr( feature = "derive_serde", serde(rename = "SEMA") )]
57199	CodeSEMA,
57200	#[cfg_attr( feature = "derive_serde", serde(rename = "SCMA") )]
57201	CodeSCMA,
57202	#[cfg_attr( feature = "derive_serde", serde(rename = "UFMA") )]
57203	CodeUFMA,
57204	#[cfg_attr( feature = "derive_serde", serde(rename = "MARM") )]
57205	CodeMARM,
57206	#[cfg_attr( feature = "derive_serde", serde(rename = "SORM") )]
57207	CodeSORM,
57208	#[cfg_attr( feature = "derive_serde", serde(rename = "WWRM") )]
57209	CodeWWRM,
57210	#[cfg_attr( feature = "derive_serde", serde(rename = "BARM") )]
57211	CodeBARM,
57212	#[cfg_attr( feature = "derive_serde", serde(rename = "LIRM") )]
57213	CodeLIRM,
57214	#[cfg_attr( feature = "derive_serde", serde(rename = "CRAM") )]
57215	CodeCRAM,
57216	#[cfg_attr( feature = "derive_serde", serde(rename = "CVMA") )]
57217	CodeCVMA,
57218	#[cfg_attr( feature = "derive_serde", serde(rename = "SPMA") )]
57219	CodeSPMA,
57220	#[cfg_attr( feature = "derive_serde", serde(rename = "JTDR") )]
57221	CodeJTDR,
57222	#[cfg_attr( feature = "derive_serde", serde(rename = "DRAO") )]
57223	CodeDRAO,
57224	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
57225	CodeOTHR,
57226}
57227
57228impl MarginType2Code {
57229	pub fn validate(&self) -> Result<(), ValidationError> {
57230		Ok(())
57231	}
57232}
57233
57234
57235// MarketDetail2 ...
57236#[cfg_attr(feature = "derive_debug", derive(Debug))]
57237#[cfg_attr(feature = "derive_default", derive(Default))]
57238#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57239#[cfg_attr(feature = "derive_clone", derive(Clone))]
57240#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57241pub struct MarketDetail2 {
57242	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
57243	pub id: String,
57244	#[cfg_attr( feature = "derive_serde", serde(rename = "AvrgDalyNbOfTxs", skip_serializing_if = "Option::is_none") )]
57245	pub avrg_daly_nb_of_txs: Option<f64>,
57246}
57247
57248impl MarketDetail2 {
57249	pub fn validate(&self) -> Result<(), ValidationError> {
57250		let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
57251		if !pattern.is_match(&self.id) {
57252			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
57253		}
57254		Ok(())
57255	}
57256}
57257
57258
57259// MarketIdentification1Code ...
57260#[cfg_attr(feature = "derive_debug", derive(Debug))]
57261#[cfg_attr(feature = "derive_default", derive(Default))]
57262#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57263#[cfg_attr(feature = "derive_clone", derive(Clone))]
57264#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57265pub enum MarketIdentification1Code {
57266	#[cfg_attr(feature = "derive_default", default)]
57267	#[cfg_attr( feature = "derive_serde", serde(rename = "SGMT") )]
57268	CodeSGMT,
57269	#[cfg_attr( feature = "derive_serde", serde(rename = "OPRT") )]
57270	CodeOPRT,
57271}
57272
57273impl MarketIdentification1Code {
57274	pub fn validate(&self) -> Result<(), ValidationError> {
57275		Ok(())
57276	}
57277}
57278
57279
57280// MarketIdentification87 ...
57281#[cfg_attr(feature = "derive_debug", derive(Debug))]
57282#[cfg_attr(feature = "derive_default", derive(Default))]
57283#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57284#[cfg_attr(feature = "derive_clone", derive(Clone))]
57285#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57286pub struct MarketIdentification87 {
57287	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry") )]
57288	pub ctry: String,
57289	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnTp") )]
57290	pub clssfctn_tp: ClassificationType1Choice,
57291	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmPurp", skip_serializing_if = "Option::is_none") )]
57292	pub sttlm_purp: Option<Purpose3Choice>,
57293}
57294
57295impl MarketIdentification87 {
57296	pub fn validate(&self) -> Result<(), ValidationError> {
57297		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
57298		if !pattern.is_match(&self.ctry) {
57299			return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
57300		}
57301		self.clssfctn_tp.validate()?;
57302		if let Some(ref val) = self.sttlm_purp { val.validate()? }
57303		Ok(())
57304	}
57305}
57306
57307
57308// MarketIdentification95 ...
57309#[cfg_attr(feature = "derive_debug", derive(Debug))]
57310#[cfg_attr(feature = "derive_default", derive(Default))]
57311#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57312#[cfg_attr(feature = "derive_clone", derive(Clone))]
57313#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57314pub struct MarketIdentification95 {
57315	#[cfg_attr( feature = "derive_serde", serde(rename = "Oprg") )]
57316	pub oprg: String,
57317	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgmt") )]
57318	pub sgmt: String,
57319	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
57320	pub tp: MarketIdentification1Code,
57321	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctgy", skip_serializing_if = "Option::is_none") )]
57322	pub ctgy: Option<MICEntityType1Code>,
57323	#[cfg_attr( feature = "derive_serde", serde(rename = "InstnNm") )]
57324	pub instn_nm: String,
57325	#[cfg_attr( feature = "derive_serde", serde(rename = "Acrnm", skip_serializing_if = "Option::is_none") )]
57326	pub acrnm: Option<String>,
57327	#[cfg_attr( feature = "derive_serde", serde(rename = "City", skip_serializing_if = "Option::is_none") )]
57328	pub city: Option<String>,
57329	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry") )]
57330	pub ctry: CountryCodeAndName3,
57331	#[cfg_attr( feature = "derive_serde", serde(rename = "AuthrtyNm", skip_serializing_if = "Option::is_none") )]
57332	pub authrty_nm: Option<String>,
57333	#[cfg_attr( feature = "derive_serde", serde(rename = "WebSite", skip_serializing_if = "Option::is_none") )]
57334	pub web_site: Option<String>,
57335	#[cfg_attr( feature = "derive_serde", serde(rename = "Note", skip_serializing_if = "Option::is_none") )]
57336	pub note: Option<String>,
57337	#[cfg_attr( feature = "derive_serde", serde(rename = "Mod", skip_serializing_if = "Option::is_none") )]
57338	pub mod_attr: Option<Modification1Code>,
57339	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDt", skip_serializing_if = "Option::is_none") )]
57340	pub cre_dt: Option<String>,
57341	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtyPrd") )]
57342	pub vldty_prd: Period4Choice,
57343	#[cfg_attr( feature = "derive_serde", serde(rename = "StsDt", skip_serializing_if = "Option::is_none") )]
57344	pub sts_dt: Option<String>,
57345	#[cfg_attr( feature = "derive_serde", serde(rename = "LastUpdtdDt", skip_serializing_if = "Option::is_none") )]
57346	pub last_updtd_dt: Option<String>,
57347}
57348
57349impl MarketIdentification95 {
57350	pub fn validate(&self) -> Result<(), ValidationError> {
57351		let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
57352		if !pattern.is_match(&self.oprg) {
57353			return Err(ValidationError::new(1005, "oprg does not match the required pattern".to_string()));
57354		}
57355		let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
57356		if !pattern.is_match(&self.sgmt) {
57357			return Err(ValidationError::new(1005, "sgmt does not match the required pattern".to_string()));
57358		}
57359		self.tp.validate()?;
57360		if let Some(ref val) = self.ctgy { val.validate()? }
57361		if self.instn_nm.chars().count() < 1 {
57362			return Err(ValidationError::new(1001, "instn_nm is shorter than the minimum length of 1".to_string()));
57363		}
57364		if self.instn_nm.chars().count() > 450 {
57365			return Err(ValidationError::new(1002, "instn_nm exceeds the maximum length of 450".to_string()));
57366		}
57367		if let Some(ref val) = self.acrnm {
57368			if val.chars().count() < 1 {
57369				return Err(ValidationError::new(1001, "acrnm is shorter than the minimum length of 1".to_string()));
57370			}
57371			if val.chars().count() > 35 {
57372				return Err(ValidationError::new(1002, "acrnm exceeds the maximum length of 35".to_string()));
57373			}
57374		}
57375		if let Some(ref val) = self.city {
57376			if val.chars().count() < 1 {
57377				return Err(ValidationError::new(1001, "city is shorter than the minimum length of 1".to_string()));
57378			}
57379			if val.chars().count() > 35 {
57380				return Err(ValidationError::new(1002, "city exceeds the maximum length of 35".to_string()));
57381			}
57382		}
57383		self.ctry.validate()?;
57384		if let Some(ref val) = self.authrty_nm {
57385			if val.chars().count() < 1 {
57386				return Err(ValidationError::new(1001, "authrty_nm is shorter than the minimum length of 1".to_string()));
57387			}
57388			if val.chars().count() > 450 {
57389				return Err(ValidationError::new(1002, "authrty_nm exceeds the maximum length of 450".to_string()));
57390			}
57391		}
57392		if let Some(ref val) = self.web_site {
57393			if val.chars().count() < 1 {
57394				return Err(ValidationError::new(1001, "web_site is shorter than the minimum length of 1".to_string()));
57395			}
57396			if val.chars().count() > 210 {
57397				return Err(ValidationError::new(1002, "web_site exceeds the maximum length of 210".to_string()));
57398			}
57399		}
57400		if let Some(ref val) = self.note {
57401			if val.chars().count() < 1 {
57402				return Err(ValidationError::new(1001, "note is shorter than the minimum length of 1".to_string()));
57403			}
57404			if val.chars().count() > 450 {
57405				return Err(ValidationError::new(1002, "note exceeds the maximum length of 450".to_string()));
57406			}
57407		}
57408		if let Some(ref val) = self.mod_attr { val.validate()? }
57409		self.vldty_prd.validate()?;
57410		Ok(())
57411	}
57412}
57413
57414
57415// MarketIdentificationOrCashPurpose1Choice ...
57416#[cfg_attr(feature = "derive_debug", derive(Debug))]
57417#[cfg_attr(feature = "derive_default", derive(Default))]
57418#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57419#[cfg_attr(feature = "derive_clone", derive(Clone))]
57420#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57421pub struct MarketIdentificationOrCashPurpose1Choice {
57422	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInstrMktId", skip_serializing_if = "Option::is_none") )]
57423	pub sttlm_instr_mkt_id: Option<MarketIdentification87>,
57424	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSSIPurp", skip_serializing_if = "Option::is_none") )]
57425	pub csh_ssi_purp: Option<Vec<String>>,
57426}
57427
57428impl MarketIdentificationOrCashPurpose1Choice {
57429	pub fn validate(&self) -> Result<(), ValidationError> {
57430		if let Some(ref val) = self.sttlm_instr_mkt_id { val.validate()? }
57431		if let Some(ref vec) = self.csh_ssi_purp {
57432			for item in vec {
57433				if item.chars().count() < 1 {
57434					return Err(ValidationError::new(1001, "csh_ssi_purp is shorter than the minimum length of 1".to_string()));
57435				}
57436				if item.chars().count() > 4 {
57437					return Err(ValidationError::new(1002, "csh_ssi_purp exceeds the maximum length of 4".to_string()));
57438				}
57439			}
57440		}
57441		Ok(())
57442	}
57443}
57444
57445
57446// MarketInfrastructureIdentification1Choice ...
57447#[cfg_attr(feature = "derive_debug", derive(Debug))]
57448#[cfg_attr(feature = "derive_default", derive(Default))]
57449#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57450#[cfg_attr(feature = "derive_clone", derive(Clone))]
57451#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57452pub struct MarketInfrastructureIdentification1Choice {
57453	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
57454	pub cd: Option<String>,
57455	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
57456	pub prtry: Option<String>,
57457}
57458
57459impl MarketInfrastructureIdentification1Choice {
57460	pub fn validate(&self) -> Result<(), ValidationError> {
57461		if let Some(ref val) = self.cd {
57462			if val.chars().count() < 1 {
57463				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
57464			}
57465			if val.chars().count() > 3 {
57466				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 3".to_string()));
57467			}
57468		}
57469		if let Some(ref val) = self.prtry {
57470			if val.chars().count() < 1 {
57471				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
57472			}
57473			if val.chars().count() > 35 {
57474				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
57475			}
57476		}
57477		Ok(())
57478	}
57479}
57480
57481
57482// MarketMakerProfile2 ...
57483#[cfg_attr(feature = "derive_debug", derive(Debug))]
57484#[cfg_attr(feature = "derive_default", derive(Default))]
57485#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57486#[cfg_attr(feature = "derive_clone", derive(Clone))]
57487#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57488pub struct MarketMakerProfile2 {
57489	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctPrd", skip_serializing_if = "Option::is_none") )]
57490	pub ctrct_prd: Option<DateTimePeriod2>,
57491	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmplc", skip_serializing_if = "Option::is_none") )]
57492	pub cmplc: Option<bool>,
57493	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxSprd", skip_serializing_if = "Option::is_none") )]
57494	pub max_sprd: Option<f64>,
57495	#[cfg_attr( feature = "derive_serde", serde(rename = "Dscnt", skip_serializing_if = "Option::is_none") )]
57496	pub dscnt: Option<f64>,
57497}
57498
57499impl MarketMakerProfile2 {
57500	pub fn validate(&self) -> Result<(), ValidationError> {
57501		if let Some(ref val) = self.ctrct_prd { val.validate()? }
57502		Ok(())
57503	}
57504}
57505
57506
57507// MarketPracticeVersion1 ...
57508#[cfg_attr(feature = "derive_debug", derive(Debug))]
57509#[cfg_attr(feature = "derive_default", derive(Default))]
57510#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57511#[cfg_attr(feature = "derive_clone", derive(Clone))]
57512#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57513pub struct MarketPracticeVersion1 {
57514	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
57515	pub nm: String,
57516	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
57517	pub dt: Option<String>,
57518	#[cfg_attr( feature = "derive_serde", serde(rename = "Nb", skip_serializing_if = "Option::is_none") )]
57519	pub nb: Option<String>,
57520}
57521
57522impl MarketPracticeVersion1 {
57523	pub fn validate(&self) -> Result<(), ValidationError> {
57524		if self.nm.chars().count() < 1 {
57525			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
57526		}
57527		if self.nm.chars().count() > 35 {
57528			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 35".to_string()));
57529		}
57530		if let Some(ref val) = self.nb {
57531			if val.chars().count() < 1 {
57532				return Err(ValidationError::new(1001, "nb is shorter than the minimum length of 1".to_string()));
57533			}
57534			if val.chars().count() > 35 {
57535				return Err(ValidationError::new(1002, "nb exceeds the maximum length of 35".to_string()));
57536			}
57537		}
57538		Ok(())
57539	}
57540}
57541
57542
57543// MarketSpecificAttribute1 ...
57544#[cfg_attr(feature = "derive_debug", derive(Debug))]
57545#[cfg_attr(feature = "derive_default", derive(Default))]
57546#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57547#[cfg_attr(feature = "derive_clone", derive(Clone))]
57548#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57549pub struct MarketSpecificAttribute1 {
57550	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
57551	pub nm: String,
57552	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
57553	pub val: String,
57554}
57555
57556impl MarketSpecificAttribute1 {
57557	pub fn validate(&self) -> Result<(), ValidationError> {
57558		if self.nm.chars().count() < 1 {
57559			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
57560		}
57561		if self.nm.chars().count() > 35 {
57562			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 35".to_string()));
57563		}
57564		if self.val.chars().count() < 1 {
57565			return Err(ValidationError::new(1001, "val is shorter than the minimum length of 1".to_string()));
57566		}
57567		if self.val.chars().count() > 350 {
57568			return Err(ValidationError::new(1002, "val exceeds the maximum length of 350".to_string()));
57569		}
57570		Ok(())
57571	}
57572}
57573
57574
57575// MasterAgreement7 ...
57576#[cfg_attr(feature = "derive_debug", derive(Debug))]
57577#[cfg_attr(feature = "derive_default", derive(Default))]
57578#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57579#[cfg_attr(feature = "derive_clone", derive(Clone))]
57580#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57581pub struct MasterAgreement7 {
57582	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
57583	pub tp: AgreementType2Choice,
57584	#[cfg_attr( feature = "derive_serde", serde(rename = "Vrsn", skip_serializing_if = "Option::is_none") )]
57585	pub vrsn: Option<String>,
57586	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrMstrAgrmtDtls", skip_serializing_if = "Option::is_none") )]
57587	pub othr_mstr_agrmt_dtls: Option<String>,
57588}
57589
57590impl MasterAgreement7 {
57591	pub fn validate(&self) -> Result<(), ValidationError> {
57592		self.tp.validate()?;
57593		if let Some(ref val) = self.vrsn {
57594			if val.chars().count() < 1 {
57595				return Err(ValidationError::new(1001, "vrsn is shorter than the minimum length of 1".to_string()));
57596			}
57597			if val.chars().count() > 50 {
57598				return Err(ValidationError::new(1002, "vrsn exceeds the maximum length of 50".to_string()));
57599			}
57600		}
57601		if let Some(ref val) = self.othr_mstr_agrmt_dtls {
57602			if val.chars().count() < 1 {
57603				return Err(ValidationError::new(1001, "othr_mstr_agrmt_dtls is shorter than the minimum length of 1".to_string()));
57604			}
57605			if val.chars().count() > 350 {
57606				return Err(ValidationError::new(1002, "othr_mstr_agrmt_dtls exceeds the maximum length of 350".to_string()));
57607			}
57608		}
57609		Ok(())
57610	}
57611}
57612
57613
57614// MasterAgreement8 ...
57615#[cfg_attr(feature = "derive_debug", derive(Debug))]
57616#[cfg_attr(feature = "derive_default", derive(Default))]
57617#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57618#[cfg_attr(feature = "derive_clone", derive(Clone))]
57619#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57620pub struct MasterAgreement8 {
57621	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
57622	pub tp: Option<AgreementType2Choice>,
57623	#[cfg_attr( feature = "derive_serde", serde(rename = "Vrsn", skip_serializing_if = "Option::is_none") )]
57624	pub vrsn: Option<String>,
57625	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrMstrAgrmtDtls", skip_serializing_if = "Option::is_none") )]
57626	pub othr_mstr_agrmt_dtls: Option<String>,
57627}
57628
57629impl MasterAgreement8 {
57630	pub fn validate(&self) -> Result<(), ValidationError> {
57631		if let Some(ref val) = self.tp { val.validate()? }
57632		if let Some(ref val) = self.vrsn {
57633			if val.chars().count() < 1 {
57634				return Err(ValidationError::new(1001, "vrsn is shorter than the minimum length of 1".to_string()));
57635			}
57636			if val.chars().count() > 50 {
57637				return Err(ValidationError::new(1002, "vrsn exceeds the maximum length of 50".to_string()));
57638			}
57639		}
57640		if let Some(ref val) = self.othr_mstr_agrmt_dtls {
57641			if val.chars().count() < 1 {
57642				return Err(ValidationError::new(1001, "othr_mstr_agrmt_dtls is shorter than the minimum length of 1".to_string()));
57643			}
57644			if val.chars().count() > 350 {
57645				return Err(ValidationError::new(1002, "othr_mstr_agrmt_dtls exceeds the maximum length of 350".to_string()));
57646			}
57647		}
57648		Ok(())
57649	}
57650}
57651
57652
57653// MatchingCriteria10 ...
57654#[cfg_attr(feature = "derive_debug", derive(Debug))]
57655#[cfg_attr(feature = "derive_default", derive(Default))]
57656#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57657#[cfg_attr(feature = "derive_clone", derive(Clone))]
57658#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57659pub struct MatchingCriteria10 {
57660	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyMtchgCrit", skip_serializing_if = "Option::is_none") )]
57661	pub ctr_pty_mtchg_crit: Option<CounterpartyMatchingCriteria4>,
57662	#[cfg_attr( feature = "derive_serde", serde(rename = "LnMtchgCrit", skip_serializing_if = "Option::is_none") )]
57663	pub ln_mtchg_crit: Option<LoanMatchingCriteria9>,
57664	#[cfg_attr( feature = "derive_serde", serde(rename = "CollMtchgCrit", skip_serializing_if = "Option::is_none") )]
57665	pub coll_mtchg_crit: Option<CollateralMatchingCriteria6>,
57666}
57667
57668impl MatchingCriteria10 {
57669	pub fn validate(&self) -> Result<(), ValidationError> {
57670		if let Some(ref val) = self.ctr_pty_mtchg_crit { val.validate()? }
57671		if let Some(ref val) = self.ln_mtchg_crit { val.validate()? }
57672		if let Some(ref val) = self.coll_mtchg_crit { val.validate()? }
57673		Ok(())
57674	}
57675}
57676
57677
57678// MatchingCriteria17 ...
57679#[cfg_attr(feature = "derive_debug", derive(Debug))]
57680#[cfg_attr(feature = "derive_default", derive(Default))]
57681#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57682#[cfg_attr(feature = "derive_clone", derive(Clone))]
57683#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57684pub struct MatchingCriteria17 {
57685	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyMtchgCrit", skip_serializing_if = "Option::is_none") )]
57686	pub ctr_pty_mtchg_crit: Option<CounterpartyMatchingCriteria6>,
57687	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnMtchgCrit", skip_serializing_if = "Option::is_none") )]
57688	pub valtn_mtchg_crit: Option<ValuationMatchingCriteria1>,
57689	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctMtchgCrit", skip_serializing_if = "Option::is_none") )]
57690	pub ctrct_mtchg_crit: Option<ContractMatchingCriteria3>,
57691	#[cfg_attr( feature = "derive_serde", serde(rename = "TxMtchgCrit", skip_serializing_if = "Option::is_none") )]
57692	pub tx_mtchg_crit: Option<TransactionMatchingCriteria7>,
57693}
57694
57695impl MatchingCriteria17 {
57696	pub fn validate(&self) -> Result<(), ValidationError> {
57697		if let Some(ref val) = self.ctr_pty_mtchg_crit { val.validate()? }
57698		if let Some(ref val) = self.valtn_mtchg_crit { val.validate()? }
57699		if let Some(ref val) = self.ctrct_mtchg_crit { val.validate()? }
57700		if let Some(ref val) = self.tx_mtchg_crit { val.validate()? }
57701		Ok(())
57702	}
57703}
57704
57705
57706// MaturityRedemptionType1Code ...
57707#[cfg_attr(feature = "derive_debug", derive(Debug))]
57708#[cfg_attr(feature = "derive_default", derive(Default))]
57709#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57710#[cfg_attr(feature = "derive_clone", derive(Clone))]
57711#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57712pub enum MaturityRedemptionType1Code {
57713	#[cfg_attr(feature = "derive_default", default)]
57714	#[cfg_attr( feature = "derive_serde", serde(rename = "FRED") )]
57715	CodeFRED,
57716	#[cfg_attr( feature = "derive_serde", serde(rename = "PRNR") )]
57717	CodePRNR,
57718	#[cfg_attr( feature = "derive_serde", serde(rename = "PRWR") )]
57719	CodePRWR,
57720	#[cfg_attr( feature = "derive_serde", serde(rename = "RNDM") )]
57721	CodeRNDM,
57722	#[cfg_attr( feature = "derive_serde", serde(rename = "PRRA") )]
57723	CodePRRA,
57724	#[cfg_attr( feature = "derive_serde", serde(rename = "CALL") )]
57725	CodeCALL,
57726	#[cfg_attr( feature = "derive_serde", serde(rename = "PUUT") )]
57727	CodePUUT,
57728}
57729
57730impl MaturityRedemptionType1Code {
57731	pub fn validate(&self) -> Result<(), ValidationError> {
57732		Ok(())
57733	}
57734}
57735
57736
57737// MaturityRedemptionType3Choice ...
57738#[cfg_attr(feature = "derive_debug", derive(Debug))]
57739#[cfg_attr(feature = "derive_default", derive(Default))]
57740#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57741#[cfg_attr(feature = "derive_clone", derive(Clone))]
57742#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57743pub struct MaturityRedemptionType3Choice {
57744	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
57745	pub cd: Option<MaturityRedemptionType1Code>,
57746	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
57747	pub prtry: Option<GenericIdentification30>,
57748}
57749
57750impl MaturityRedemptionType3Choice {
57751	pub fn validate(&self) -> Result<(), ValidationError> {
57752		if let Some(ref val) = self.cd { val.validate()? }
57753		if let Some(ref val) = self.prtry { val.validate()? }
57754		Ok(())
57755	}
57756}
57757
57758
57759// MaturityTerm2 ...
57760#[cfg_attr(feature = "derive_debug", derive(Debug))]
57761#[cfg_attr(feature = "derive_default", derive(Default))]
57762#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57763#[cfg_attr(feature = "derive_clone", derive(Clone))]
57764#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57765pub struct MaturityTerm2 {
57766	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit") )]
57767	pub unit: RateBasis1Code,
57768	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
57769	pub val: f64,
57770}
57771
57772impl MaturityTerm2 {
57773	pub fn validate(&self) -> Result<(), ValidationError> {
57774		self.unit.validate()?;
57775		Ok(())
57776	}
57777}
57778
57779
57780// MaximumAmountByPeriod1 ...
57781#[cfg_attr(feature = "derive_debug", derive(Debug))]
57782#[cfg_attr(feature = "derive_default", derive(Default))]
57783#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57784#[cfg_attr(feature = "derive_clone", derive(Clone))]
57785#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57786pub struct MaximumAmountByPeriod1 {
57787	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxAmt") )]
57788	pub max_amt: ActiveCurrencyAndAmount,
57789	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfDays") )]
57790	pub nb_of_days: String,
57791}
57792
57793impl MaximumAmountByPeriod1 {
57794	pub fn validate(&self) -> Result<(), ValidationError> {
57795		self.max_amt.validate()?;
57796		let pattern = Regex::new("[0-9]{1,3}").unwrap();
57797		if !pattern.is_match(&self.nb_of_days) {
57798			return Err(ValidationError::new(1005, "nb_of_days does not match the required pattern".to_string()));
57799		}
57800		Ok(())
57801	}
57802}
57803
57804
57805// Member6 ...
57806#[cfg_attr(feature = "derive_debug", derive(Debug))]
57807#[cfg_attr(feature = "derive_default", derive(Default))]
57808#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57809#[cfg_attr(feature = "derive_clone", derive(Clone))]
57810#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57811pub struct Member6 {
57812	#[cfg_attr( feature = "derive_serde", serde(rename = "MmbRtrAdr", skip_serializing_if = "Option::is_none") )]
57813	pub mmb_rtr_adr: Option<Vec<MemberIdentification3Choice>>,
57814	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctRef", skip_serializing_if = "Option::is_none") )]
57815	pub ctct_ref: Option<Vec<ContactIdentificationAndAddress1>>,
57816	#[cfg_attr( feature = "derive_serde", serde(rename = "ComAdr", skip_serializing_if = "Option::is_none") )]
57817	pub com_adr: Option<CommunicationAddress8>,
57818}
57819
57820impl Member6 {
57821	pub fn validate(&self) -> Result<(), ValidationError> {
57822		if let Some(ref vec) = self.mmb_rtr_adr { for item in vec { item.validate()? } }
57823		if let Some(ref vec) = self.ctct_ref { for item in vec { item.validate()? } }
57824		if let Some(ref val) = self.com_adr { val.validate()? }
57825		Ok(())
57826	}
57827}
57828
57829
57830// Member7 ...
57831#[cfg_attr(feature = "derive_debug", derive(Debug))]
57832#[cfg_attr(feature = "derive_default", derive(Default))]
57833#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57834#[cfg_attr(feature = "derive_clone", derive(Clone))]
57835#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57836pub struct Member7 {
57837	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
57838	pub nm: Option<String>,
57839	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrAdr", skip_serializing_if = "Option::is_none") )]
57840	pub rtr_adr: Option<Vec<MemberIdentification3Choice>>,
57841	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
57842	pub acct: Option<Vec<CashAccount40>>,
57843	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
57844	pub tp: Option<SystemMemberType1Choice>,
57845	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
57846	pub sts: Option<SystemMemberStatus1Choice>,
57847	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctRef", skip_serializing_if = "Option::is_none") )]
57848	pub ctct_ref: Option<Vec<ContactIdentificationAndAddress2>>,
57849	#[cfg_attr( feature = "derive_serde", serde(rename = "ComAdr", skip_serializing_if = "Option::is_none") )]
57850	pub com_adr: Option<CommunicationAddress10>,
57851}
57852
57853impl Member7 {
57854	pub fn validate(&self) -> Result<(), ValidationError> {
57855		if let Some(ref val) = self.nm {
57856			if val.chars().count() < 1 {
57857				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
57858			}
57859			if val.chars().count() > 35 {
57860				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 35".to_string()));
57861			}
57862		}
57863		if let Some(ref vec) = self.rtr_adr { for item in vec { item.validate()? } }
57864		if let Some(ref vec) = self.acct { for item in vec { item.validate()? } }
57865		if let Some(ref val) = self.tp { val.validate()? }
57866		if let Some(ref val) = self.sts { val.validate()? }
57867		if let Some(ref vec) = self.ctct_ref { for item in vec { item.validate()? } }
57868		if let Some(ref val) = self.com_adr { val.validate()? }
57869		Ok(())
57870	}
57871}
57872
57873
57874// MemberCriteria4 ...
57875#[cfg_attr(feature = "derive_debug", derive(Debug))]
57876#[cfg_attr(feature = "derive_default", derive(Default))]
57877#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57878#[cfg_attr(feature = "derive_clone", derive(Clone))]
57879#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57880pub struct MemberCriteria4 {
57881	#[cfg_attr( feature = "derive_serde", serde(rename = "NewQryNm", skip_serializing_if = "Option::is_none") )]
57882	pub new_qry_nm: Option<String>,
57883	#[cfg_attr( feature = "derive_serde", serde(rename = "SchCrit", skip_serializing_if = "Option::is_none") )]
57884	pub sch_crit: Option<Vec<MemberSearchCriteria4>>,
57885	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrCrit", skip_serializing_if = "Option::is_none") )]
57886	pub rtr_crit: Option<MemberReturnCriteria1>,
57887}
57888
57889impl MemberCriteria4 {
57890	pub fn validate(&self) -> Result<(), ValidationError> {
57891		if let Some(ref val) = self.new_qry_nm {
57892			if val.chars().count() < 1 {
57893				return Err(ValidationError::new(1001, "new_qry_nm is shorter than the minimum length of 1".to_string()));
57894			}
57895			if val.chars().count() > 35 {
57896				return Err(ValidationError::new(1002, "new_qry_nm exceeds the maximum length of 35".to_string()));
57897			}
57898		}
57899		if let Some(ref vec) = self.sch_crit { for item in vec { item.validate()? } }
57900		if let Some(ref val) = self.rtr_crit { val.validate()? }
57901		Ok(())
57902	}
57903}
57904
57905
57906// MemberCriteriaDefinition2Choice ...
57907#[cfg_attr(feature = "derive_debug", derive(Debug))]
57908#[cfg_attr(feature = "derive_default", derive(Default))]
57909#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57910#[cfg_attr(feature = "derive_clone", derive(Clone))]
57911#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57912pub struct MemberCriteriaDefinition2Choice {
57913	#[cfg_attr( feature = "derive_serde", serde(rename = "QryNm", skip_serializing_if = "Option::is_none") )]
57914	pub qry_nm: Option<String>,
57915	#[cfg_attr( feature = "derive_serde", serde(rename = "NewCrit", skip_serializing_if = "Option::is_none") )]
57916	pub new_crit: Option<MemberCriteria4>,
57917}
57918
57919impl MemberCriteriaDefinition2Choice {
57920	pub fn validate(&self) -> Result<(), ValidationError> {
57921		if let Some(ref val) = self.qry_nm {
57922			if val.chars().count() < 1 {
57923				return Err(ValidationError::new(1001, "qry_nm is shorter than the minimum length of 1".to_string()));
57924			}
57925			if val.chars().count() > 35 {
57926				return Err(ValidationError::new(1002, "qry_nm exceeds the maximum length of 35".to_string()));
57927			}
57928		}
57929		if let Some(ref val) = self.new_crit { val.validate()? }
57930		Ok(())
57931	}
57932}
57933
57934
57935// MemberIdentification3Choice ...
57936#[cfg_attr(feature = "derive_debug", derive(Debug))]
57937#[cfg_attr(feature = "derive_default", derive(Default))]
57938#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57939#[cfg_attr(feature = "derive_clone", derive(Clone))]
57940#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57941pub struct MemberIdentification3Choice {
57942	#[cfg_attr( feature = "derive_serde", serde(rename = "BICFI", skip_serializing_if = "Option::is_none") )]
57943	pub bicfi: Option<String>,
57944	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysMmbId", skip_serializing_if = "Option::is_none") )]
57945	pub clr_sys_mmb_id: Option<ClearingSystemMemberIdentification2>,
57946	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
57947	pub othr: Option<GenericFinancialIdentification1>,
57948}
57949
57950impl MemberIdentification3Choice {
57951	pub fn validate(&self) -> Result<(), ValidationError> {
57952		if let Some(ref val) = self.bicfi {
57953			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
57954			if !pattern.is_match(val) {
57955				return Err(ValidationError::new(1005, "bicfi does not match the required pattern".to_string()));
57956			}
57957		}
57958		if let Some(ref val) = self.clr_sys_mmb_id { val.validate()? }
57959		if let Some(ref val) = self.othr { val.validate()? }
57960		Ok(())
57961	}
57962}
57963
57964
57965// MemberQueryDefinition4 ...
57966#[cfg_attr(feature = "derive_debug", derive(Debug))]
57967#[cfg_attr(feature = "derive_default", derive(Default))]
57968#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57969#[cfg_attr(feature = "derive_clone", derive(Clone))]
57970#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57971pub struct MemberQueryDefinition4 {
57972	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp", skip_serializing_if = "Option::is_none") )]
57973	pub qry_tp: Option<QueryType2Code>,
57974	#[cfg_attr( feature = "derive_serde", serde(rename = "MmbCrit", skip_serializing_if = "Option::is_none") )]
57975	pub mmb_crit: Option<MemberCriteriaDefinition2Choice>,
57976}
57977
57978impl MemberQueryDefinition4 {
57979	pub fn validate(&self) -> Result<(), ValidationError> {
57980		if let Some(ref val) = self.qry_tp { val.validate()? }
57981		if let Some(ref val) = self.mmb_crit { val.validate()? }
57982		Ok(())
57983	}
57984}
57985
57986
57987// MemberReport6 ...
57988#[cfg_attr(feature = "derive_debug", derive(Debug))]
57989#[cfg_attr(feature = "derive_default", derive(Default))]
57990#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
57991#[cfg_attr(feature = "derive_clone", derive(Clone))]
57992#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
57993pub struct MemberReport6 {
57994	#[cfg_attr( feature = "derive_serde", serde(rename = "MmbId") )]
57995	pub mmb_id: MemberIdentification3Choice,
57996	#[cfg_attr( feature = "derive_serde", serde(rename = "MmbOrErr") )]
57997	pub mmb_or_err: MemberReportOrError8Choice,
57998}
57999
58000impl MemberReport6 {
58001	pub fn validate(&self) -> Result<(), ValidationError> {
58002		self.mmb_id.validate()?;
58003		self.mmb_or_err.validate()?;
58004		Ok(())
58005	}
58006}
58007
58008
58009// MemberReportOrError7Choice ...
58010#[cfg_attr(feature = "derive_debug", derive(Debug))]
58011#[cfg_attr(feature = "derive_default", derive(Default))]
58012#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58013#[cfg_attr(feature = "derive_clone", derive(Clone))]
58014#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58015pub struct MemberReportOrError7Choice {
58016	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
58017	pub rpt: Option<Vec<MemberReport6>>,
58018	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
58019	pub oprl_err: Option<Vec<ErrorHandling3>>,
58020}
58021
58022impl MemberReportOrError7Choice {
58023	pub fn validate(&self) -> Result<(), ValidationError> {
58024		if let Some(ref vec) = self.rpt { for item in vec { item.validate()? } }
58025		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
58026		Ok(())
58027	}
58028}
58029
58030
58031// MemberReportOrError8Choice ...
58032#[cfg_attr(feature = "derive_debug", derive(Debug))]
58033#[cfg_attr(feature = "derive_default", derive(Default))]
58034#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58035#[cfg_attr(feature = "derive_clone", derive(Clone))]
58036#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58037pub struct MemberReportOrError8Choice {
58038	#[cfg_attr( feature = "derive_serde", serde(rename = "Mmb", skip_serializing_if = "Option::is_none") )]
58039	pub mmb: Option<Member7>,
58040	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
58041	pub biz_err: Option<ErrorHandling3>,
58042}
58043
58044impl MemberReportOrError8Choice {
58045	pub fn validate(&self) -> Result<(), ValidationError> {
58046		if let Some(ref val) = self.mmb { val.validate()? }
58047		if let Some(ref val) = self.biz_err { val.validate()? }
58048		Ok(())
58049	}
58050}
58051
58052
58053// MemberReturnCriteria1 ...
58054#[cfg_attr(feature = "derive_debug", derive(Debug))]
58055#[cfg_attr(feature = "derive_default", derive(Default))]
58056#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58057#[cfg_attr(feature = "derive_clone", derive(Clone))]
58058#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58059pub struct MemberReturnCriteria1 {
58060	#[cfg_attr( feature = "derive_serde", serde(rename = "NmInd", skip_serializing_if = "Option::is_none") )]
58061	pub nm_ind: Option<bool>,
58062	#[cfg_attr( feature = "derive_serde", serde(rename = "MmbRtrAdrInd", skip_serializing_if = "Option::is_none") )]
58063	pub mmb_rtr_adr_ind: Option<bool>,
58064	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctInd", skip_serializing_if = "Option::is_none") )]
58065	pub acct_ind: Option<bool>,
58066	#[cfg_attr( feature = "derive_serde", serde(rename = "TpInd", skip_serializing_if = "Option::is_none") )]
58067	pub tp_ind: Option<bool>,
58068	#[cfg_attr( feature = "derive_serde", serde(rename = "StsInd", skip_serializing_if = "Option::is_none") )]
58069	pub sts_ind: Option<bool>,
58070	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctRefInd", skip_serializing_if = "Option::is_none") )]
58071	pub ctct_ref_ind: Option<bool>,
58072	#[cfg_attr( feature = "derive_serde", serde(rename = "ComAdrInd", skip_serializing_if = "Option::is_none") )]
58073	pub com_adr_ind: Option<bool>,
58074}
58075
58076impl MemberReturnCriteria1 {
58077	pub fn validate(&self) -> Result<(), ValidationError> {
58078		Ok(())
58079	}
58080}
58081
58082
58083// MemberSearchCriteria4 ...
58084#[cfg_attr(feature = "derive_debug", derive(Debug))]
58085#[cfg_attr(feature = "derive_default", derive(Default))]
58086#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58087#[cfg_attr(feature = "derive_clone", derive(Clone))]
58088#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58089pub struct MemberSearchCriteria4 {
58090	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
58091	pub id: Option<Vec<MemberIdentification3Choice>>,
58092	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
58093	pub tp: Option<Vec<SystemMemberType1Choice>>,
58094	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
58095	pub sts: Option<Vec<SystemMemberStatus1Choice>>,
58096}
58097
58098impl MemberSearchCriteria4 {
58099	pub fn validate(&self) -> Result<(), ValidationError> {
58100		if let Some(ref vec) = self.id { for item in vec { item.validate()? } }
58101		if let Some(ref vec) = self.tp { for item in vec { item.validate()? } }
58102		if let Some(ref vec) = self.sts { for item in vec { item.validate()? } }
58103		Ok(())
58104	}
58105}
58106
58107
58108// MemberStatus1Code ...
58109#[cfg_attr(feature = "derive_debug", derive(Debug))]
58110#[cfg_attr(feature = "derive_default", derive(Default))]
58111#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58112#[cfg_attr(feature = "derive_clone", derive(Clone))]
58113#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58114pub enum MemberStatus1Code {
58115	#[cfg_attr(feature = "derive_default", default)]
58116	#[cfg_attr( feature = "derive_serde", serde(rename = "ENBL") )]
58117	CodeENBL,
58118	#[cfg_attr( feature = "derive_serde", serde(rename = "DSBL") )]
58119	CodeDSBL,
58120	#[cfg_attr( feature = "derive_serde", serde(rename = "DLTD") )]
58121	CodeDLTD,
58122	#[cfg_attr( feature = "derive_serde", serde(rename = "JOIN") )]
58123	CodeJOIN,
58124}
58125
58126impl MemberStatus1Code {
58127	pub fn validate(&self) -> Result<(), ValidationError> {
58128		Ok(())
58129	}
58130}
58131
58132
58133// MessageHeader1 ...
58134#[cfg_attr(feature = "derive_debug", derive(Debug))]
58135#[cfg_attr(feature = "derive_default", derive(Default))]
58136#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58137#[cfg_attr(feature = "derive_clone", derive(Clone))]
58138#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58139pub struct MessageHeader1 {
58140	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
58141	pub msg_id: String,
58142	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
58143	pub cre_dt_tm: Option<String>,
58144}
58145
58146impl MessageHeader1 {
58147	pub fn validate(&self) -> Result<(), ValidationError> {
58148		if self.msg_id.chars().count() < 1 {
58149			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
58150		}
58151		if self.msg_id.chars().count() > 35 {
58152			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
58153		}
58154		Ok(())
58155	}
58156}
58157
58158
58159// MessageHeader10 ...
58160#[cfg_attr(feature = "derive_debug", derive(Debug))]
58161#[cfg_attr(feature = "derive_default", derive(Default))]
58162#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58163#[cfg_attr(feature = "derive_clone", derive(Clone))]
58164#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58165pub struct MessageHeader10 {
58166	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
58167	pub msg_id: String,
58168	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
58169	pub cre_dt_tm: Option<String>,
58170	#[cfg_attr( feature = "derive_serde", serde(rename = "QryNm", skip_serializing_if = "Option::is_none") )]
58171	pub qry_nm: Option<String>,
58172}
58173
58174impl MessageHeader10 {
58175	pub fn validate(&self) -> Result<(), ValidationError> {
58176		if self.msg_id.chars().count() < 1 {
58177			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
58178		}
58179		if self.msg_id.chars().count() > 35 {
58180			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
58181		}
58182		if let Some(ref val) = self.qry_nm {
58183			if val.chars().count() < 1 {
58184				return Err(ValidationError::new(1001, "qry_nm is shorter than the minimum length of 1".to_string()));
58185			}
58186			if val.chars().count() > 35 {
58187				return Err(ValidationError::new(1002, "qry_nm exceeds the maximum length of 35".to_string()));
58188			}
58189		}
58190		Ok(())
58191	}
58192}
58193
58194
58195// MessageHeader11 ...
58196#[cfg_attr(feature = "derive_debug", derive(Debug))]
58197#[cfg_attr(feature = "derive_default", derive(Default))]
58198#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58199#[cfg_attr(feature = "derive_clone", derive(Clone))]
58200#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58201pub struct MessageHeader11 {
58202	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
58203	pub msg_id: String,
58204	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
58205	pub cre_dt_tm: Option<String>,
58206	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqTp", skip_serializing_if = "Option::is_none") )]
58207	pub req_tp: Option<RequestType4Choice>,
58208	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizQry", skip_serializing_if = "Option::is_none") )]
58209	pub orgnl_biz_qry: Option<OriginalBusinessQuery1>,
58210}
58211
58212impl MessageHeader11 {
58213	pub fn validate(&self) -> Result<(), ValidationError> {
58214		if self.msg_id.chars().count() < 1 {
58215			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
58216		}
58217		if self.msg_id.chars().count() > 35 {
58218			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
58219		}
58220		if let Some(ref val) = self.req_tp { val.validate()? }
58221		if let Some(ref val) = self.orgnl_biz_qry { val.validate()? }
58222		Ok(())
58223	}
58224}
58225
58226
58227// MessageHeader12 ...
58228#[cfg_attr(feature = "derive_debug", derive(Debug))]
58229#[cfg_attr(feature = "derive_default", derive(Default))]
58230#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58231#[cfg_attr(feature = "derive_clone", derive(Clone))]
58232#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58233pub struct MessageHeader12 {
58234	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
58235	pub msg_id: String,
58236	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
58237	pub cre_dt_tm: Option<String>,
58238	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizInstr", skip_serializing_if = "Option::is_none") )]
58239	pub orgnl_biz_instr: Option<OriginalBusinessInstruction1>,
58240}
58241
58242impl MessageHeader12 {
58243	pub fn validate(&self) -> Result<(), ValidationError> {
58244		if self.msg_id.chars().count() < 1 {
58245			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
58246		}
58247		if self.msg_id.chars().count() > 35 {
58248			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
58249		}
58250		if let Some(ref val) = self.orgnl_biz_instr { val.validate()? }
58251		Ok(())
58252	}
58253}
58254
58255
58256// MessageHeader2 ...
58257#[cfg_attr(feature = "derive_debug", derive(Debug))]
58258#[cfg_attr(feature = "derive_default", derive(Default))]
58259#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58260#[cfg_attr(feature = "derive_clone", derive(Clone))]
58261#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58262pub struct MessageHeader2 {
58263	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
58264	pub msg_id: String,
58265	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
58266	pub cre_dt_tm: Option<String>,
58267	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqTp", skip_serializing_if = "Option::is_none") )]
58268	pub req_tp: Option<RequestType2Choice>,
58269}
58270
58271impl MessageHeader2 {
58272	pub fn validate(&self) -> Result<(), ValidationError> {
58273		if self.msg_id.chars().count() < 1 {
58274			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
58275		}
58276		if self.msg_id.chars().count() > 35 {
58277			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
58278		}
58279		if let Some(ref val) = self.req_tp { val.validate()? }
58280		Ok(())
58281	}
58282}
58283
58284
58285// MessageHeader3 ...
58286#[cfg_attr(feature = "derive_debug", derive(Debug))]
58287#[cfg_attr(feature = "derive_default", derive(Default))]
58288#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58289#[cfg_attr(feature = "derive_clone", derive(Clone))]
58290#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58291pub struct MessageHeader3 {
58292	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
58293	pub msg_id: String,
58294	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
58295	pub cre_dt_tm: Option<String>,
58296	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqTp", skip_serializing_if = "Option::is_none") )]
58297	pub req_tp: Option<RequestType2Choice>,
58298	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizQry", skip_serializing_if = "Option::is_none") )]
58299	pub orgnl_biz_qry: Option<OriginalBusinessQuery1>,
58300	#[cfg_attr( feature = "derive_serde", serde(rename = "QryNm", skip_serializing_if = "Option::is_none") )]
58301	pub qry_nm: Option<String>,
58302}
58303
58304impl MessageHeader3 {
58305	pub fn validate(&self) -> Result<(), ValidationError> {
58306		if self.msg_id.chars().count() < 1 {
58307			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
58308		}
58309		if self.msg_id.chars().count() > 35 {
58310			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
58311		}
58312		if let Some(ref val) = self.req_tp { val.validate()? }
58313		if let Some(ref val) = self.orgnl_biz_qry { val.validate()? }
58314		if let Some(ref val) = self.qry_nm {
58315			if val.chars().count() < 1 {
58316				return Err(ValidationError::new(1001, "qry_nm is shorter than the minimum length of 1".to_string()));
58317			}
58318			if val.chars().count() > 35 {
58319				return Err(ValidationError::new(1002, "qry_nm exceeds the maximum length of 35".to_string()));
58320			}
58321		}
58322		Ok(())
58323	}
58324}
58325
58326
58327// MessageHeader4 ...
58328#[cfg_attr(feature = "derive_debug", derive(Debug))]
58329#[cfg_attr(feature = "derive_default", derive(Default))]
58330#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58331#[cfg_attr(feature = "derive_clone", derive(Clone))]
58332#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58333pub struct MessageHeader4 {
58334	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
58335	pub msg_id: String,
58336	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
58337	pub cre_dt_tm: Option<String>,
58338	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqTp", skip_serializing_if = "Option::is_none") )]
58339	pub req_tp: Option<RequestType3Choice>,
58340}
58341
58342impl MessageHeader4 {
58343	pub fn validate(&self) -> Result<(), ValidationError> {
58344		if self.msg_id.chars().count() < 1 {
58345			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
58346		}
58347		if self.msg_id.chars().count() > 35 {
58348			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
58349		}
58350		if let Some(ref val) = self.req_tp { val.validate()? }
58351		Ok(())
58352	}
58353}
58354
58355
58356// MessageHeader6 ...
58357#[cfg_attr(feature = "derive_debug", derive(Debug))]
58358#[cfg_attr(feature = "derive_default", derive(Default))]
58359#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58360#[cfg_attr(feature = "derive_clone", derive(Clone))]
58361#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58362pub struct MessageHeader6 {
58363	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
58364	pub msg_id: String,
58365	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
58366	pub cre_dt_tm: Option<String>,
58367	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizQry", skip_serializing_if = "Option::is_none") )]
58368	pub orgnl_biz_qry: Option<OriginalBusinessQuery1>,
58369	#[cfg_attr( feature = "derive_serde", serde(rename = "QryNm", skip_serializing_if = "Option::is_none") )]
58370	pub qry_nm: Option<String>,
58371	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqTp", skip_serializing_if = "Option::is_none") )]
58372	pub req_tp: Option<RequestType3Choice>,
58373}
58374
58375impl MessageHeader6 {
58376	pub fn validate(&self) -> Result<(), ValidationError> {
58377		if self.msg_id.chars().count() < 1 {
58378			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
58379		}
58380		if self.msg_id.chars().count() > 35 {
58381			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
58382		}
58383		if let Some(ref val) = self.orgnl_biz_qry { val.validate()? }
58384		if let Some(ref val) = self.qry_nm {
58385			if val.chars().count() < 1 {
58386				return Err(ValidationError::new(1001, "qry_nm is shorter than the minimum length of 1".to_string()));
58387			}
58388			if val.chars().count() > 35 {
58389				return Err(ValidationError::new(1002, "qry_nm exceeds the maximum length of 35".to_string()));
58390			}
58391		}
58392		if let Some(ref val) = self.req_tp { val.validate()? }
58393		Ok(())
58394	}
58395}
58396
58397
58398// MessageHeader7 ...
58399#[cfg_attr(feature = "derive_debug", derive(Debug))]
58400#[cfg_attr(feature = "derive_default", derive(Default))]
58401#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58402#[cfg_attr(feature = "derive_clone", derive(Clone))]
58403#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58404pub struct MessageHeader7 {
58405	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
58406	pub msg_id: String,
58407	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
58408	pub cre_dt_tm: Option<String>,
58409	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqTp", skip_serializing_if = "Option::is_none") )]
58410	pub req_tp: Option<RequestType4Choice>,
58411	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizQry", skip_serializing_if = "Option::is_none") )]
58412	pub orgnl_biz_qry: Option<OriginalBusinessQuery1>,
58413	#[cfg_attr( feature = "derive_serde", serde(rename = "QryNm", skip_serializing_if = "Option::is_none") )]
58414	pub qry_nm: Option<String>,
58415}
58416
58417impl MessageHeader7 {
58418	pub fn validate(&self) -> Result<(), ValidationError> {
58419		if self.msg_id.chars().count() < 1 {
58420			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
58421		}
58422		if self.msg_id.chars().count() > 35 {
58423			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
58424		}
58425		if let Some(ref val) = self.req_tp { val.validate()? }
58426		if let Some(ref val) = self.orgnl_biz_qry { val.validate()? }
58427		if let Some(ref val) = self.qry_nm {
58428			if val.chars().count() < 1 {
58429				return Err(ValidationError::new(1001, "qry_nm is shorter than the minimum length of 1".to_string()));
58430			}
58431			if val.chars().count() > 35 {
58432				return Err(ValidationError::new(1002, "qry_nm exceeds the maximum length of 35".to_string()));
58433			}
58434		}
58435		Ok(())
58436	}
58437}
58438
58439
58440// MessageHeader8 ...
58441#[cfg_attr(feature = "derive_debug", derive(Debug))]
58442#[cfg_attr(feature = "derive_default", derive(Default))]
58443#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58444#[cfg_attr(feature = "derive_clone", derive(Clone))]
58445#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58446pub struct MessageHeader8 {
58447	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
58448	pub msg_id: String,
58449	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
58450	pub cre_dt_tm: Option<String>,
58451	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgPgntn", skip_serializing_if = "Option::is_none") )]
58452	pub msg_pgntn: Option<Pagination1>,
58453	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBizQry", skip_serializing_if = "Option::is_none") )]
58454	pub orgnl_biz_qry: Option<OriginalBusinessQuery1>,
58455	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqTp", skip_serializing_if = "Option::is_none") )]
58456	pub req_tp: Option<RequestType4Choice>,
58457	#[cfg_attr( feature = "derive_serde", serde(rename = "QryNm", skip_serializing_if = "Option::is_none") )]
58458	pub qry_nm: Option<String>,
58459}
58460
58461impl MessageHeader8 {
58462	pub fn validate(&self) -> Result<(), ValidationError> {
58463		if self.msg_id.chars().count() < 1 {
58464			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
58465		}
58466		if self.msg_id.chars().count() > 35 {
58467			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
58468		}
58469		if let Some(ref val) = self.msg_pgntn { val.validate()? }
58470		if let Some(ref val) = self.orgnl_biz_qry { val.validate()? }
58471		if let Some(ref val) = self.req_tp { val.validate()? }
58472		if let Some(ref val) = self.qry_nm {
58473			if val.chars().count() < 1 {
58474				return Err(ValidationError::new(1001, "qry_nm is shorter than the minimum length of 1".to_string()));
58475			}
58476			if val.chars().count() > 35 {
58477				return Err(ValidationError::new(1002, "qry_nm exceeds the maximum length of 35".to_string()));
58478			}
58479		}
58480		Ok(())
58481	}
58482}
58483
58484
58485// MessageHeader9 ...
58486#[cfg_attr(feature = "derive_debug", derive(Debug))]
58487#[cfg_attr(feature = "derive_default", derive(Default))]
58488#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58489#[cfg_attr(feature = "derive_clone", derive(Clone))]
58490#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58491pub struct MessageHeader9 {
58492	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
58493	pub msg_id: String,
58494	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
58495	pub cre_dt_tm: Option<String>,
58496	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqTp", skip_serializing_if = "Option::is_none") )]
58497	pub req_tp: Option<RequestType4Choice>,
58498}
58499
58500impl MessageHeader9 {
58501	pub fn validate(&self) -> Result<(), ValidationError> {
58502		if self.msg_id.chars().count() < 1 {
58503			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
58504		}
58505		if self.msg_id.chars().count() > 35 {
58506			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
58507		}
58508		if let Some(ref val) = self.req_tp { val.validate()? }
58509		Ok(())
58510	}
58511}
58512
58513
58514// MessageIdentification1 ...
58515#[cfg_attr(feature = "derive_debug", derive(Debug))]
58516#[cfg_attr(feature = "derive_default", derive(Default))]
58517#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58518#[cfg_attr(feature = "derive_clone", derive(Clone))]
58519#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58520pub struct MessageIdentification1 {
58521	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
58522	pub id: String,
58523	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
58524	pub cre_dt_tm: String,
58525}
58526
58527impl MessageIdentification1 {
58528	pub fn validate(&self) -> Result<(), ValidationError> {
58529		if self.id.chars().count() < 1 {
58530			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
58531		}
58532		if self.id.chars().count() > 35 {
58533			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
58534		}
58535		Ok(())
58536	}
58537}
58538
58539
58540// MessageIdentification2 ...
58541#[cfg_attr(feature = "derive_debug", derive(Debug))]
58542#[cfg_attr(feature = "derive_default", derive(Default))]
58543#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58544#[cfg_attr(feature = "derive_clone", derive(Clone))]
58545#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58546pub struct MessageIdentification2 {
58547	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNmId", skip_serializing_if = "Option::is_none") )]
58548	pub msg_nm_id: Option<String>,
58549	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId", skip_serializing_if = "Option::is_none") )]
58550	pub msg_id: Option<String>,
58551}
58552
58553impl MessageIdentification2 {
58554	pub fn validate(&self) -> Result<(), ValidationError> {
58555		if let Some(ref val) = self.msg_nm_id {
58556			if val.chars().count() < 1 {
58557				return Err(ValidationError::new(1001, "msg_nm_id is shorter than the minimum length of 1".to_string()));
58558			}
58559			if val.chars().count() > 35 {
58560				return Err(ValidationError::new(1002, "msg_nm_id exceeds the maximum length of 35".to_string()));
58561			}
58562		}
58563		if let Some(ref val) = self.msg_id {
58564			if val.chars().count() < 1 {
58565				return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
58566			}
58567			if val.chars().count() > 35 {
58568				return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
58569			}
58570		}
58571		Ok(())
58572	}
58573}
58574
58575
58576// MessageIdentification8 ...
58577#[cfg_attr(feature = "derive_debug", derive(Debug))]
58578#[cfg_attr(feature = "derive_default", derive(Default))]
58579#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58580#[cfg_attr(feature = "derive_clone", derive(Clone))]
58581#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58582pub struct MessageIdentification8 {
58583	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId", skip_serializing_if = "Option::is_none") )]
58584	pub msg_id: Option<String>,
58585	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
58586	pub cre_dt_tm: Option<String>,
58587	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstAgt", skip_serializing_if = "Option::is_none") )]
58588	pub frst_agt: Option<BranchAndFinancialInstitutionIdentification8>,
58589}
58590
58591impl MessageIdentification8 {
58592	pub fn validate(&self) -> Result<(), ValidationError> {
58593		if let Some(ref val) = self.msg_id {
58594			if val.chars().count() < 1 {
58595				return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
58596			}
58597			if val.chars().count() > 35 {
58598				return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
58599			}
58600		}
58601		if let Some(ref val) = self.frst_agt { val.validate()? }
58602		Ok(())
58603	}
58604}
58605
58606
58607// MessageReference ...
58608#[cfg_attr(feature = "derive_debug", derive(Debug))]
58609#[cfg_attr(feature = "derive_default", derive(Default))]
58610#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58611#[cfg_attr(feature = "derive_clone", derive(Clone))]
58612#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58613pub struct MessageReference {
58614	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref") )]
58615	pub ref_attr: String,
58616}
58617
58618impl MessageReference {
58619	pub fn validate(&self) -> Result<(), ValidationError> {
58620		if self.ref_attr.chars().count() < 1 {
58621			return Err(ValidationError::new(1001, "ref_attr is shorter than the minimum length of 1".to_string()));
58622		}
58623		if self.ref_attr.chars().count() > 35 {
58624			return Err(ValidationError::new(1002, "ref_attr exceeds the maximum length of 35".to_string()));
58625		}
58626		Ok(())
58627	}
58628}
58629
58630
58631// MessageReference1 ...
58632#[cfg_attr(feature = "derive_debug", derive(Debug))]
58633#[cfg_attr(feature = "derive_default", derive(Default))]
58634#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58635#[cfg_attr(feature = "derive_clone", derive(Clone))]
58636#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58637pub struct MessageReference1 {
58638	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref") )]
58639	pub ref_attr: String,
58640	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNm", skip_serializing_if = "Option::is_none") )]
58641	pub msg_nm: Option<String>,
58642	#[cfg_attr( feature = "derive_serde", serde(rename = "RefIssr", skip_serializing_if = "Option::is_none") )]
58643	pub ref_issr: Option<PartyIdentification136>,
58644}
58645
58646impl MessageReference1 {
58647	pub fn validate(&self) -> Result<(), ValidationError> {
58648		if self.ref_attr.chars().count() < 1 {
58649			return Err(ValidationError::new(1001, "ref_attr is shorter than the minimum length of 1".to_string()));
58650		}
58651		if self.ref_attr.chars().count() > 35 {
58652			return Err(ValidationError::new(1002, "ref_attr exceeds the maximum length of 35".to_string()));
58653		}
58654		if let Some(ref val) = self.msg_nm {
58655			if val.chars().count() < 1 {
58656				return Err(ValidationError::new(1001, "msg_nm is shorter than the minimum length of 1".to_string()));
58657			}
58658			if val.chars().count() > 35 {
58659				return Err(ValidationError::new(1002, "msg_nm exceeds the maximum length of 35".to_string()));
58660			}
58661		}
58662		if let Some(ref val) = self.ref_issr { val.validate()? }
58663		Ok(())
58664	}
58665}
58666
58667
58668// MessageReportHeader4 ...
58669#[cfg_attr(feature = "derive_debug", derive(Debug))]
58670#[cfg_attr(feature = "derive_default", derive(Default))]
58671#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58672#[cfg_attr(feature = "derive_clone", derive(Clone))]
58673#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58674pub struct MessageReportHeader4 {
58675	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgRptIdr", skip_serializing_if = "Option::is_none") )]
58676	pub msg_rpt_idr: Option<String>,
58677	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgSts", skip_serializing_if = "Option::is_none") )]
58678	pub msg_sts: Option<StatusAdviceReport3>,
58679	#[cfg_attr( feature = "derive_serde", serde(rename = "RcrdSts", skip_serializing_if = "Option::is_none") )]
58680	pub rcrd_sts: Option<Vec<StatusReportRecord3>>,
58681	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
58682	pub splmtry_data: Option<Vec<SupplementaryData1>>,
58683}
58684
58685impl MessageReportHeader4 {
58686	pub fn validate(&self) -> Result<(), ValidationError> {
58687		if let Some(ref val) = self.msg_rpt_idr {
58688			if val.chars().count() < 1 {
58689				return Err(ValidationError::new(1001, "msg_rpt_idr is shorter than the minimum length of 1".to_string()));
58690			}
58691			if val.chars().count() > 140 {
58692				return Err(ValidationError::new(1002, "msg_rpt_idr exceeds the maximum length of 140".to_string()));
58693			}
58694		}
58695		if let Some(ref val) = self.msg_sts { val.validate()? }
58696		if let Some(ref vec) = self.rcrd_sts { for item in vec { item.validate()? } }
58697		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
58698		Ok(())
58699	}
58700}
58701
58702
58703// MetalCommodityNonPrecious1 ...
58704#[cfg_attr(feature = "derive_debug", derive(Debug))]
58705#[cfg_attr(feature = "derive_default", derive(Default))]
58706#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58707#[cfg_attr(feature = "derive_clone", derive(Clone))]
58708#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58709pub struct MetalCommodityNonPrecious1 {
58710	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
58711	pub base_pdct: AssetClassProductType7Code,
58712	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
58713	pub sub_pdct: AssetClassSubProductType15Code,
58714	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct") )]
58715	pub addtl_sub_pdct: AssetClassDetailedSubProductType10Code,
58716}
58717
58718impl MetalCommodityNonPrecious1 {
58719	pub fn validate(&self) -> Result<(), ValidationError> {
58720		self.base_pdct.validate()?;
58721		self.sub_pdct.validate()?;
58722		self.addtl_sub_pdct.validate()?;
58723		Ok(())
58724	}
58725}
58726
58727
58728// MetalCommodityNonPrecious2 ...
58729#[cfg_attr(feature = "derive_debug", derive(Debug))]
58730#[cfg_attr(feature = "derive_default", derive(Default))]
58731#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58732#[cfg_attr(feature = "derive_clone", derive(Clone))]
58733#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58734pub struct MetalCommodityNonPrecious2 {
58735	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
58736	pub base_pdct: AssetClassProductType7Code,
58737	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
58738	pub sub_pdct: Option<AssetClassSubProductType15Code>,
58739	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
58740	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType10Code>,
58741}
58742
58743impl MetalCommodityNonPrecious2 {
58744	pub fn validate(&self) -> Result<(), ValidationError> {
58745		self.base_pdct.validate()?;
58746		if let Some(ref val) = self.sub_pdct { val.validate()? }
58747		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
58748		Ok(())
58749	}
58750}
58751
58752
58753// MetalCommodityPrecious1 ...
58754#[cfg_attr(feature = "derive_debug", derive(Debug))]
58755#[cfg_attr(feature = "derive_default", derive(Default))]
58756#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58757#[cfg_attr(feature = "derive_clone", derive(Clone))]
58758#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58759pub struct MetalCommodityPrecious1 {
58760	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
58761	pub base_pdct: AssetClassProductType7Code,
58762	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
58763	pub sub_pdct: AssetClassSubProductType16Code,
58764	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct") )]
58765	pub addtl_sub_pdct: AssetClassDetailedSubProductType11Code,
58766}
58767
58768impl MetalCommodityPrecious1 {
58769	pub fn validate(&self) -> Result<(), ValidationError> {
58770		self.base_pdct.validate()?;
58771		self.sub_pdct.validate()?;
58772		self.addtl_sub_pdct.validate()?;
58773		Ok(())
58774	}
58775}
58776
58777
58778// MetalCommodityPrecious2 ...
58779#[cfg_attr(feature = "derive_debug", derive(Debug))]
58780#[cfg_attr(feature = "derive_default", derive(Default))]
58781#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58782#[cfg_attr(feature = "derive_clone", derive(Clone))]
58783#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58784pub struct MetalCommodityPrecious2 {
58785	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
58786	pub base_pdct: AssetClassProductType7Code,
58787	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
58788	pub sub_pdct: Option<AssetClassSubProductType16Code>,
58789	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlSubPdct", skip_serializing_if = "Option::is_none") )]
58790	pub addtl_sub_pdct: Option<AssetClassDetailedSubProductType11Code>,
58791}
58792
58793impl MetalCommodityPrecious2 {
58794	pub fn validate(&self) -> Result<(), ValidationError> {
58795		self.base_pdct.validate()?;
58796		if let Some(ref val) = self.sub_pdct { val.validate()? }
58797		if let Some(ref val) = self.addtl_sub_pdct { val.validate()? }
58798		Ok(())
58799	}
58800}
58801
58802
58803// MiFIDClassification1 ...
58804#[cfg_attr(feature = "derive_debug", derive(Debug))]
58805#[cfg_attr(feature = "derive_default", derive(Default))]
58806#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58807#[cfg_attr(feature = "derive_clone", derive(Clone))]
58808#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58809pub struct MiFIDClassification1 {
58810	#[cfg_attr( feature = "derive_serde", serde(rename = "Clssfctn") )]
58811	pub clssfctn: OrderOriginatorEligibility1Code,
58812	#[cfg_attr( feature = "derive_serde", serde(rename = "Nrrtv", skip_serializing_if = "Option::is_none") )]
58813	pub nrrtv: Option<String>,
58814}
58815
58816impl MiFIDClassification1 {
58817	pub fn validate(&self) -> Result<(), ValidationError> {
58818		self.clssfctn.validate()?;
58819		if let Some(ref val) = self.nrrtv {
58820			if val.chars().count() < 1 {
58821				return Err(ValidationError::new(1001, "nrrtv is shorter than the minimum length of 1".to_string()));
58822			}
58823			if val.chars().count() > 350 {
58824				return Err(ValidationError::new(1002, "nrrtv exceeds the maximum length of 350".to_string()));
58825			}
58826		}
58827		Ok(())
58828	}
58829}
58830
58831
58832// MinimumExecutable1 ...
58833#[cfg_attr(feature = "derive_debug", derive(Debug))]
58834#[cfg_attr(feature = "derive_default", derive(Default))]
58835#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58836#[cfg_attr(feature = "derive_clone", derive(Clone))]
58837#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58838pub struct MinimumExecutable1 {
58839	#[cfg_attr( feature = "derive_serde", serde(rename = "Sz", skip_serializing_if = "Option::is_none") )]
58840	pub sz: Option<FinancialInstrumentQuantity25Choice>,
58841	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstExctnOnly", skip_serializing_if = "Option::is_none") )]
58842	pub frst_exctn_only: Option<bool>,
58843}
58844
58845impl MinimumExecutable1 {
58846	pub fn validate(&self) -> Result<(), ValidationError> {
58847		if let Some(ref val) = self.sz { val.validate()? }
58848		Ok(())
58849	}
58850}
58851
58852
58853// MissingCover6 ...
58854#[cfg_attr(feature = "derive_debug", derive(Debug))]
58855#[cfg_attr(feature = "derive_default", derive(Default))]
58856#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58857#[cfg_attr(feature = "derive_clone", derive(Clone))]
58858#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58859pub struct MissingCover6 {
58860	#[cfg_attr( feature = "derive_serde", serde(rename = "MssngCoverInd") )]
58861	pub mssng_cover_ind: bool,
58862	#[cfg_attr( feature = "derive_serde", serde(rename = "CoverCrrctn", skip_serializing_if = "Option::is_none") )]
58863	pub cover_crrctn: Option<SettlementInstruction16>,
58864}
58865
58866impl MissingCover6 {
58867	pub fn validate(&self) -> Result<(), ValidationError> {
58868		if let Some(ref val) = self.cover_crrctn { val.validate()? }
58869		Ok(())
58870	}
58871}
58872
58873
58874// MissingData1Choice ...
58875#[cfg_attr(feature = "derive_debug", derive(Debug))]
58876#[cfg_attr(feature = "derive_default", derive(Default))]
58877#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58878#[cfg_attr(feature = "derive_clone", derive(Clone))]
58879#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58880pub struct MissingData1Choice {
58881	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
58882	pub cd: Option<String>,
58883	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
58884	pub prtry: Option<String>,
58885}
58886
58887impl MissingData1Choice {
58888	pub fn validate(&self) -> Result<(), ValidationError> {
58889		if let Some(ref val) = self.cd {
58890			if val.chars().count() < 1 {
58891				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
58892			}
58893			if val.chars().count() > 4 {
58894				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
58895			}
58896		}
58897		if let Some(ref val) = self.prtry {
58898			if val.chars().count() < 1 {
58899				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
58900			}
58901			if val.chars().count() > 35 {
58902				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
58903			}
58904		}
58905		Ok(())
58906	}
58907}
58908
58909
58910// MissingMarginData2 ...
58911#[cfg_attr(feature = "derive_debug", derive(Debug))]
58912#[cfg_attr(feature = "derive_default", derive(Default))]
58913#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58914#[cfg_attr(feature = "derive_clone", derive(Clone))]
58915#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58916pub struct MissingMarginData2 {
58917	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId") )]
58918	pub ctr_pty_id: CounterpartyData92,
58919	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfOutsdngDerivs") )]
58920	pub nb_of_outsdng_derivs: f64,
58921	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfOutsdngDerivsWthNoMrgnInf") )]
58922	pub nb_of_outsdng_derivs_wth_no_mrgn_inf: f64,
58923	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfOutsdngDerivsWthOutdtdMrgnInf") )]
58924	pub nb_of_outsdng_derivs_wth_outdtd_mrgn_inf: f64,
58925	#[cfg_attr( feature = "derive_serde", serde(rename = "TxDtls", skip_serializing_if = "Option::is_none") )]
58926	pub tx_dtls: Option<Vec<MissingMarginTransactionData2>>,
58927}
58928
58929impl MissingMarginData2 {
58930	pub fn validate(&self) -> Result<(), ValidationError> {
58931		self.ctr_pty_id.validate()?;
58932		if let Some(ref vec) = self.tx_dtls { for item in vec { item.validate()? } }
58933		Ok(())
58934	}
58935}
58936
58937
58938// MissingMarginTransactionData2 ...
58939#[cfg_attr(feature = "derive_debug", derive(Debug))]
58940#[cfg_attr(feature = "derive_default", derive(Default))]
58941#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58942#[cfg_attr(feature = "derive_clone", derive(Clone))]
58943#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58944pub struct MissingMarginTransactionData2 {
58945	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId") )]
58946	pub tx_id: TradeTransactionIdentification24,
58947	#[cfg_attr( feature = "derive_serde", serde(rename = "CollTmStmp", skip_serializing_if = "Option::is_none") )]
58948	pub coll_tm_stmp: Option<String>,
58949}
58950
58951impl MissingMarginTransactionData2 {
58952	pub fn validate(&self) -> Result<(), ValidationError> {
58953		self.tx_id.validate()?;
58954		Ok(())
58955	}
58956}
58957
58958
58959// MissingOrIncorrectData1 ...
58960#[cfg_attr(feature = "derive_debug", derive(Debug))]
58961#[cfg_attr(feature = "derive_default", derive(Default))]
58962#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58963#[cfg_attr(feature = "derive_clone", derive(Clone))]
58964#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58965pub struct MissingOrIncorrectData1 {
58966	#[cfg_attr( feature = "derive_serde", serde(rename = "AMLReq", skip_serializing_if = "Option::is_none") )]
58967	pub aml_req: Option<bool>,
58968	#[cfg_attr( feature = "derive_serde", serde(rename = "MssngInf", skip_serializing_if = "Option::is_none") )]
58969	pub mssng_inf: Option<Vec<UnableToApplyMissing2>>,
58970	#[cfg_attr( feature = "derive_serde", serde(rename = "IncrrctInf", skip_serializing_if = "Option::is_none") )]
58971	pub incrrct_inf: Option<Vec<UnableToApplyIncorrect2>>,
58972}
58973
58974impl MissingOrIncorrectData1 {
58975	pub fn validate(&self) -> Result<(), ValidationError> {
58976		if let Some(ref vec) = self.mssng_inf { for item in vec { item.validate()? } }
58977		if let Some(ref vec) = self.incrrct_inf { for item in vec { item.validate()? } }
58978		Ok(())
58979	}
58980}
58981
58982
58983// MissingValuationsData2 ...
58984#[cfg_attr(feature = "derive_debug", derive(Debug))]
58985#[cfg_attr(feature = "derive_default", derive(Default))]
58986#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
58987#[cfg_attr(feature = "derive_clone", derive(Clone))]
58988#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
58989pub struct MissingValuationsData2 {
58990	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId") )]
58991	pub ctr_pty_id: CounterpartyData92,
58992	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfOutsdngDerivs") )]
58993	pub nb_of_outsdng_derivs: f64,
58994	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfOutsdngDerivsWthNoValtn") )]
58995	pub nb_of_outsdng_derivs_wth_no_valtn: f64,
58996	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfOutsdngDerivsWthOutdtdValtn") )]
58997	pub nb_of_outsdng_derivs_wth_outdtd_valtn: f64,
58998	#[cfg_attr( feature = "derive_serde", serde(rename = "TxDtls", skip_serializing_if = "Option::is_none") )]
58999	pub tx_dtls: Option<Vec<MissingValuationsTransactionData2>>,
59000}
59001
59002impl MissingValuationsData2 {
59003	pub fn validate(&self) -> Result<(), ValidationError> {
59004		self.ctr_pty_id.validate()?;
59005		if let Some(ref vec) = self.tx_dtls { for item in vec { item.validate()? } }
59006		Ok(())
59007	}
59008}
59009
59010
59011// MissingValuationsTransactionData2 ...
59012#[cfg_attr(feature = "derive_debug", derive(Debug))]
59013#[cfg_attr(feature = "derive_default", derive(Default))]
59014#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59015#[cfg_attr(feature = "derive_clone", derive(Clone))]
59016#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59017pub struct MissingValuationsTransactionData2 {
59018	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId") )]
59019	pub tx_id: TradeTransactionIdentification24,
59020	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnAmt", skip_serializing_if = "Option::is_none") )]
59021	pub valtn_amt: Option<AmountAndDirection106>,
59022	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnTmStmp", skip_serializing_if = "Option::is_none") )]
59023	pub valtn_tm_stmp: Option<DateAndDateTime2Choice>,
59024}
59025
59026impl MissingValuationsTransactionData2 {
59027	pub fn validate(&self) -> Result<(), ValidationError> {
59028		self.tx_id.validate()?;
59029		if let Some(ref val) = self.valtn_amt { val.validate()? }
59030		if let Some(ref val) = self.valtn_tm_stmp { val.validate()? }
59031		Ok(())
59032	}
59033}
59034
59035
59036// ModelType1Choice ...
59037#[cfg_attr(feature = "derive_debug", derive(Debug))]
59038#[cfg_attr(feature = "derive_default", derive(Default))]
59039#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59040#[cfg_attr(feature = "derive_clone", derive(Clone))]
59041#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59042pub struct ModelType1Choice {
59043	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
59044	pub cd: Option<ModelType1Code>,
59045	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
59046	pub prtry: Option<GenericIdentification36>,
59047}
59048
59049impl ModelType1Choice {
59050	pub fn validate(&self) -> Result<(), ValidationError> {
59051		if let Some(ref val) = self.cd { val.validate()? }
59052		if let Some(ref val) = self.prtry { val.validate()? }
59053		Ok(())
59054	}
59055}
59056
59057
59058// ModelType1Code ...
59059#[cfg_attr(feature = "derive_debug", derive(Debug))]
59060#[cfg_attr(feature = "derive_default", derive(Default))]
59061#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59062#[cfg_attr(feature = "derive_clone", derive(Clone))]
59063#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59064pub enum ModelType1Code {
59065	#[cfg_attr(feature = "derive_default", default)]
59066	#[cfg_attr( feature = "derive_serde", serde(rename = "EXPS") )]
59067	CodeEXPS,
59068	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
59069	CodeOTHR,
59070	#[cfg_attr( feature = "derive_serde", serde(rename = "ORIA") )]
59071	CodeORIA,
59072	#[cfg_attr( feature = "derive_serde", serde(rename = "SPAN") )]
59073	CodeSPAN,
59074	#[cfg_attr( feature = "derive_serde", serde(rename = "VARI") )]
59075	CodeVARI,
59076	#[cfg_attr( feature = "derive_serde", serde(rename = "SAMO") )]
59077	CodeSAMO,
59078}
59079
59080impl ModelType1Code {
59081	pub fn validate(&self) -> Result<(), ValidationError> {
59082		Ok(())
59083	}
59084}
59085
59086
59087// Modification1Code ...
59088#[cfg_attr(feature = "derive_debug", derive(Debug))]
59089#[cfg_attr(feature = "derive_default", derive(Default))]
59090#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59091#[cfg_attr(feature = "derive_clone", derive(Clone))]
59092#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59093pub enum Modification1Code {
59094	#[cfg_attr(feature = "derive_default", default)]
59095	#[cfg_attr( feature = "derive_serde", serde(rename = "NOCH") )]
59096	CodeNOCH,
59097	#[cfg_attr( feature = "derive_serde", serde(rename = "MODI") )]
59098	CodeMODI,
59099	#[cfg_attr( feature = "derive_serde", serde(rename = "DELE") )]
59100	CodeDELE,
59101	#[cfg_attr( feature = "derive_serde", serde(rename = "ADDD") )]
59102	CodeADDD,
59103}
59104
59105impl Modification1Code {
59106	pub fn validate(&self) -> Result<(), ValidationError> {
59107		Ok(())
59108	}
59109}
59110
59111
59112// ModificationLevel1Code ...
59113#[cfg_attr(feature = "derive_debug", derive(Debug))]
59114#[cfg_attr(feature = "derive_default", derive(Default))]
59115#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59116#[cfg_attr(feature = "derive_clone", derive(Clone))]
59117#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59118pub enum ModificationLevel1Code {
59119	#[cfg_attr(feature = "derive_default", default)]
59120	#[cfg_attr( feature = "derive_serde", serde(rename = "PSTN") )]
59121	CodePSTN,
59122	#[cfg_attr( feature = "derive_serde", serde(rename = "TCTN") )]
59123	CodeTCTN,
59124}
59125
59126impl ModificationLevel1Code {
59127	pub fn validate(&self) -> Result<(), ValidationError> {
59128		Ok(())
59129	}
59130}
59131
59132
59133// ModificationProcessingStatus1Code ...
59134#[cfg_attr(feature = "derive_debug", derive(Debug))]
59135#[cfg_attr(feature = "derive_default", derive(Default))]
59136#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59137#[cfg_attr(feature = "derive_clone", derive(Clone))]
59138#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59139pub enum ModificationProcessingStatus1Code {
59140	#[cfg_attr(feature = "derive_default", default)]
59141	#[cfg_attr( feature = "derive_serde", serde(rename = "PACK") )]
59142	CodePACK,
59143	#[cfg_attr( feature = "derive_serde", serde(rename = "REJT") )]
59144	CodeREJT,
59145	#[cfg_attr( feature = "derive_serde", serde(rename = "MODC") )]
59146	CodeMODC,
59147	#[cfg_attr( feature = "derive_serde", serde(rename = "DEND") )]
59148	CodeDEND,
59149	#[cfg_attr( feature = "derive_serde", serde(rename = "MODP") )]
59150	CodeMODP,
59151	#[cfg_attr( feature = "derive_serde", serde(rename = "REPR") )]
59152	CodeREPR,
59153}
59154
59155impl ModificationProcessingStatus1Code {
59156	pub fn validate(&self) -> Result<(), ValidationError> {
59157		Ok(())
59158	}
59159}
59160
59161
59162// ModificationProcessingStatus9Choice ...
59163#[cfg_attr(feature = "derive_debug", derive(Debug))]
59164#[cfg_attr(feature = "derive_default", derive(Default))]
59165#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59166#[cfg_attr(feature = "derive_clone", derive(Clone))]
59167#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59168pub struct ModificationProcessingStatus9Choice {
59169	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
59170	pub cd: Option<ModificationProcessingStatus1Code>,
59171	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
59172	pub prtry: Option<GenericIdentification30>,
59173}
59174
59175impl ModificationProcessingStatus9Choice {
59176	pub fn validate(&self) -> Result<(), ValidationError> {
59177		if let Some(ref val) = self.cd { val.validate()? }
59178		if let Some(ref val) = self.prtry { val.validate()? }
59179		Ok(())
59180	}
59181}
59182
59183
59184// ModificationScope21 ...
59185#[cfg_attr(feature = "derive_debug", derive(Debug))]
59186#[cfg_attr(feature = "derive_default", derive(Default))]
59187#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59188#[cfg_attr(feature = "derive_clone", derive(Clone))]
59189#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59190pub struct ModificationScope21 {
59191	#[cfg_attr( feature = "derive_serde", serde(rename = "ModScpIndctn") )]
59192	pub mod_scp_indctn: DataModification1Code,
59193	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseAllcn") )]
59194	pub isse_allcn: NewIssueAllocation2,
59195}
59196
59197impl ModificationScope21 {
59198	pub fn validate(&self) -> Result<(), ValidationError> {
59199		self.mod_scp_indctn.validate()?;
59200		self.isse_allcn.validate()?;
59201		Ok(())
59202	}
59203}
59204
59205
59206// ModificationScope27 ...
59207#[cfg_attr(feature = "derive_debug", derive(Debug))]
59208#[cfg_attr(feature = "derive_default", derive(Default))]
59209#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59210#[cfg_attr(feature = "derive_clone", derive(Clone))]
59211#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59212pub struct ModificationScope27 {
59213	#[cfg_attr( feature = "derive_serde", serde(rename = "ModScpIndctn") )]
59214	pub mod_scp_indctn: DataModification2Code,
59215	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrPrflVldtn") )]
59216	pub invstr_prfl_vldtn: PartyProfileInformation5,
59217}
59218
59219impl ModificationScope27 {
59220	pub fn validate(&self) -> Result<(), ValidationError> {
59221		self.mod_scp_indctn.validate()?;
59222		self.invstr_prfl_vldtn.validate()?;
59223		Ok(())
59224	}
59225}
59226
59227
59228// ModificationScope34 ...
59229#[cfg_attr(feature = "derive_debug", derive(Debug))]
59230#[cfg_attr(feature = "derive_default", derive(Default))]
59231#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59232#[cfg_attr(feature = "derive_clone", derive(Clone))]
59233#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59234pub struct ModificationScope34 {
59235	#[cfg_attr( feature = "derive_serde", serde(rename = "ModScpIndctn") )]
59236	pub mod_scp_indctn: DataModification1Code,
59237	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr") )]
59238	pub pstl_adr: PostalAddress21,
59239}
59240
59241impl ModificationScope34 {
59242	pub fn validate(&self) -> Result<(), ValidationError> {
59243		self.mod_scp_indctn.validate()?;
59244		self.pstl_adr.validate()?;
59245		Ok(())
59246	}
59247}
59248
59249
59250// ModificationScope39 ...
59251#[cfg_attr(feature = "derive_debug", derive(Debug))]
59252#[cfg_attr(feature = "derive_default", derive(Default))]
59253#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59254#[cfg_attr(feature = "derive_clone", derive(Clone))]
59255#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59256pub struct ModificationScope39 {
59257	#[cfg_attr( feature = "derive_serde", serde(rename = "ModScpIndctn") )]
59258	pub mod_scp_indctn: DataModification2Code,
59259	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctznsh") )]
59260	pub ctznsh: CitizenshipInformation2,
59261}
59262
59263impl ModificationScope39 {
59264	pub fn validate(&self) -> Result<(), ValidationError> {
59265		self.mod_scp_indctn.validate()?;
59266		self.ctznsh.validate()?;
59267		Ok(())
59268	}
59269}
59270
59271
59272// ModificationScope40 ...
59273#[cfg_attr(feature = "derive_debug", derive(Debug))]
59274#[cfg_attr(feature = "derive_default", derive(Default))]
59275#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59276#[cfg_attr(feature = "derive_clone", derive(Clone))]
59277#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59278pub struct ModificationScope40 {
59279	#[cfg_attr( feature = "derive_serde", serde(rename = "ModScpIndctn") )]
59280	pub mod_scp_indctn: DataModification1Code,
59281	#[cfg_attr( feature = "derive_serde", serde(rename = "Intrmy") )]
59282	pub intrmy: Intermediary46,
59283}
59284
59285impl ModificationScope40 {
59286	pub fn validate(&self) -> Result<(), ValidationError> {
59287		self.mod_scp_indctn.validate()?;
59288		self.intrmy.validate()?;
59289		Ok(())
59290	}
59291}
59292
59293
59294// ModificationScope41 ...
59295#[cfg_attr(feature = "derive_debug", derive(Debug))]
59296#[cfg_attr(feature = "derive_default", derive(Default))]
59297#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59298#[cfg_attr(feature = "derive_clone", derive(Clone))]
59299#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59300pub struct ModificationScope41 {
59301	#[cfg_attr( feature = "derive_serde", serde(rename = "ModScpIndctn") )]
59302	pub mod_scp_indctn: DataModification1Code,
59303	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtPlan") )]
59304	pub invstmt_plan: InvestmentPlan16,
59305}
59306
59307impl ModificationScope41 {
59308	pub fn validate(&self) -> Result<(), ValidationError> {
59309		self.mod_scp_indctn.validate()?;
59310		self.invstmt_plan.validate()?;
59311		Ok(())
59312	}
59313}
59314
59315
59316// ModificationScope42 ...
59317#[cfg_attr(feature = "derive_debug", derive(Debug))]
59318#[cfg_attr(feature = "derive_default", derive(Default))]
59319#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59320#[cfg_attr(feature = "derive_clone", derive(Clone))]
59321#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59322pub struct ModificationScope42 {
59323	#[cfg_attr( feature = "derive_serde", serde(rename = "ModScpIndctn") )]
59324	pub mod_scp_indctn: DataModification2Code,
59325	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmDtls") )]
59326	pub fin_instrm_dtls: FinancialInstrument87,
59327}
59328
59329impl ModificationScope42 {
59330	pub fn validate(&self) -> Result<(), ValidationError> {
59331		self.mod_scp_indctn.validate()?;
59332		self.fin_instrm_dtls.validate()?;
59333		Ok(())
59334	}
59335}
59336
59337
59338// ModificationScope43 ...
59339#[cfg_attr(feature = "derive_debug", derive(Debug))]
59340#[cfg_attr(feature = "derive_default", derive(Default))]
59341#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59342#[cfg_attr(feature = "derive_clone", derive(Clone))]
59343#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59344pub struct ModificationScope43 {
59345	#[cfg_attr( feature = "derive_serde", serde(rename = "ModScpIndctn") )]
59346	pub mod_scp_indctn: DataModification1Code,
59347	#[cfg_attr( feature = "derive_serde", serde(rename = "Plcmnt") )]
59348	pub plcmnt: ReferredAgent3,
59349}
59350
59351impl ModificationScope43 {
59352	pub fn validate(&self) -> Result<(), ValidationError> {
59353		self.mod_scp_indctn.validate()?;
59354		self.plcmnt.validate()?;
59355		Ok(())
59356	}
59357}
59358
59359
59360// ModificationScope44 ...
59361#[cfg_attr(feature = "derive_debug", derive(Debug))]
59362#[cfg_attr(feature = "derive_default", derive(Default))]
59363#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59364#[cfg_attr(feature = "derive_clone", derive(Clone))]
59365#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59366pub struct ModificationScope44 {
59367	#[cfg_attr( feature = "derive_serde", serde(rename = "ModScpIndctn") )]
59368	pub mod_scp_indctn: DataModification1Code,
59369	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcLvlAgrmt") )]
59370	pub svc_lvl_agrmt: DocumentToSend4,
59371}
59372
59373impl ModificationScope44 {
59374	pub fn validate(&self) -> Result<(), ValidationError> {
59375		self.mod_scp_indctn.validate()?;
59376		self.svc_lvl_agrmt.validate()?;
59377		Ok(())
59378	}
59379}
59380
59381
59382// ModificationScope45 ...
59383#[cfg_attr(feature = "derive_debug", derive(Debug))]
59384#[cfg_attr(feature = "derive_default", derive(Default))]
59385#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59386#[cfg_attr(feature = "derive_clone", derive(Clone))]
59387#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59388pub struct ModificationScope45 {
59389	#[cfg_attr( feature = "derive_serde", serde(rename = "ModScpIndctn") )]
59390	pub mod_scp_indctn: DataModification1Code,
59391	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf") )]
59392	pub addtl_inf: Vec<AdditiononalInformation13>,
59393}
59394
59395impl ModificationScope45 {
59396	pub fn validate(&self) -> Result<(), ValidationError> {
59397		self.mod_scp_indctn.validate()?;
59398		for item in &self.addtl_inf { item.validate()? }
59399		Ok(())
59400	}
59401}
59402
59403
59404// ModificationScope46 ...
59405#[cfg_attr(feature = "derive_debug", derive(Debug))]
59406#[cfg_attr(feature = "derive_default", derive(Default))]
59407#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59408#[cfg_attr(feature = "derive_clone", derive(Clone))]
59409#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59410pub struct ModificationScope46 {
59411	#[cfg_attr( feature = "derive_serde", serde(rename = "ModScpIndctn") )]
59412	pub mod_scp_indctn: DataModification1Code,
59413	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrPrfl") )]
59414	pub invstr_prfl: InvestorProfile2,
59415}
59416
59417impl ModificationScope46 {
59418	pub fn validate(&self) -> Result<(), ValidationError> {
59419		self.mod_scp_indctn.validate()?;
59420		self.invstr_prfl.validate()?;
59421		Ok(())
59422	}
59423}
59424
59425
59426// ModificationStatusReason1Choice ...
59427#[cfg_attr(feature = "derive_debug", derive(Debug))]
59428#[cfg_attr(feature = "derive_default", derive(Default))]
59429#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59430#[cfg_attr(feature = "derive_clone", derive(Clone))]
59431#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59432pub struct ModificationStatusReason1Choice {
59433	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
59434	pub cd: Option<String>,
59435	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
59436	pub prtry: Option<String>,
59437}
59438
59439impl ModificationStatusReason1Choice {
59440	pub fn validate(&self) -> Result<(), ValidationError> {
59441		if let Some(ref val) = self.cd {
59442			if val.chars().count() < 1 {
59443				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
59444			}
59445			if val.chars().count() > 4 {
59446				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
59447			}
59448		}
59449		if let Some(ref val) = self.prtry {
59450			if val.chars().count() < 1 {
59451				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
59452			}
59453			if val.chars().count() > 35 {
59454				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
59455			}
59456		}
59457		Ok(())
59458	}
59459}
59460
59461
59462// ModificationStatusReason3 ...
59463#[cfg_attr(feature = "derive_debug", derive(Debug))]
59464#[cfg_attr(feature = "derive_default", derive(Default))]
59465#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59466#[cfg_attr(feature = "derive_clone", derive(Clone))]
59467#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59468pub struct ModificationStatusReason3 {
59469	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
59470	pub orgtr: Option<PartyIdentification272>,
59471	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
59472	pub rsn: Option<ModificationStatusReason1Choice>,
59473	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
59474	pub addtl_inf: Option<Vec<String>>,
59475}
59476
59477impl ModificationStatusReason3 {
59478	pub fn validate(&self) -> Result<(), ValidationError> {
59479		if let Some(ref val) = self.orgtr { val.validate()? }
59480		if let Some(ref val) = self.rsn { val.validate()? }
59481		if let Some(ref vec) = self.addtl_inf {
59482			for item in vec {
59483				if item.chars().count() < 1 {
59484					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
59485				}
59486				if item.chars().count() > 105 {
59487					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
59488				}
59489			}
59490		}
59491		Ok(())
59492	}
59493}
59494
59495
59496// MoneyLaunderingCheck1Choice ...
59497#[cfg_attr(feature = "derive_debug", derive(Debug))]
59498#[cfg_attr(feature = "derive_default", derive(Default))]
59499#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59500#[cfg_attr(feature = "derive_clone", derive(Clone))]
59501#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59502pub struct MoneyLaunderingCheck1Choice {
59503	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
59504	pub cd: Option<MoneyLaunderingCheck1Code>,
59505	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
59506	pub prtry: Option<GenericIdentification47>,
59507}
59508
59509impl MoneyLaunderingCheck1Choice {
59510	pub fn validate(&self) -> Result<(), ValidationError> {
59511		if let Some(ref val) = self.cd { val.validate()? }
59512		if let Some(ref val) = self.prtry { val.validate()? }
59513		Ok(())
59514	}
59515}
59516
59517
59518// MoneyLaunderingCheck1Code ...
59519#[cfg_attr(feature = "derive_debug", derive(Debug))]
59520#[cfg_attr(feature = "derive_default", derive(Default))]
59521#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59522#[cfg_attr(feature = "derive_clone", derive(Clone))]
59523#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59524pub enum MoneyLaunderingCheck1Code {
59525	#[cfg_attr(feature = "derive_default", default)]
59526	#[cfg_attr( feature = "derive_serde", serde(rename = "PASS") )]
59527	CodePASS,
59528	#[cfg_attr( feature = "derive_serde", serde(rename = "NOTC") )]
59529	CodeNOTC,
59530	#[cfg_attr( feature = "derive_serde", serde(rename = "EXEM") )]
59531	CodeEXEM,
59532	#[cfg_attr( feature = "derive_serde", serde(rename = "CLMO") )]
59533	CodeCLMO,
59534	#[cfg_attr( feature = "derive_serde", serde(rename = "AUTH") )]
59535	CodeAUTH,
59536	#[cfg_attr( feature = "derive_serde", serde(rename = "POEP") )]
59537	CodePOEP,
59538}
59539
59540impl MoneyLaunderingCheck1Code {
59541	pub fn validate(&self) -> Result<(), ValidationError> {
59542		Ok(())
59543	}
59544}
59545
59546
59547// MoneyMarketReportHeader1 ...
59548#[cfg_attr(feature = "derive_debug", derive(Debug))]
59549#[cfg_attr(feature = "derive_default", derive(Default))]
59550#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59551#[cfg_attr(feature = "derive_clone", derive(Clone))]
59552#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59553pub struct MoneyMarketReportHeader1 {
59554	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgAgt") )]
59555	pub rptg_agt: String,
59556	#[cfg_attr( feature = "derive_serde", serde(rename = "RefPrd") )]
59557	pub ref_prd: DateTimePeriod1,
59558}
59559
59560impl MoneyMarketReportHeader1 {
59561	pub fn validate(&self) -> Result<(), ValidationError> {
59562		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
59563		if !pattern.is_match(&self.rptg_agt) {
59564			return Err(ValidationError::new(1005, "rptg_agt does not match the required pattern".to_string()));
59565		}
59566		self.ref_prd.validate()?;
59567		Ok(())
59568	}
59569}
59570
59571
59572// MoneyMarketStatusReportHeader1 ...
59573#[cfg_attr(feature = "derive_debug", derive(Debug))]
59574#[cfg_attr(feature = "derive_default", derive(Default))]
59575#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59576#[cfg_attr(feature = "derive_clone", derive(Clone))]
59577#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59578pub struct MoneyMarketStatusReportHeader1 {
59579	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgAgt") )]
59580	pub rptg_agt: String,
59581	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPrd") )]
59582	pub rptg_prd: DateTimePeriod1,
59583	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSts") )]
59584	pub rpt_sts: StatisticalReportingStatus1Code,
59585	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtnRule", skip_serializing_if = "Option::is_none") )]
59586	pub vldtn_rule: Option<Vec<GenericValidationRuleIdentification1>>,
59587}
59588
59589impl MoneyMarketStatusReportHeader1 {
59590	pub fn validate(&self) -> Result<(), ValidationError> {
59591		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
59592		if !pattern.is_match(&self.rptg_agt) {
59593			return Err(ValidationError::new(1005, "rptg_agt does not match the required pattern".to_string()));
59594		}
59595		self.rptg_prd.validate()?;
59596		self.rpt_sts.validate()?;
59597		if let Some(ref vec) = self.vldtn_rule { for item in vec { item.validate()? } }
59598		Ok(())
59599	}
59600}
59601
59602
59603// MoneyMarketTransactionStatus2 ...
59604#[cfg_attr(feature = "derive_debug", derive(Debug))]
59605#[cfg_attr(feature = "derive_default", derive(Default))]
59606#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59607#[cfg_attr(feature = "derive_clone", derive(Clone))]
59608#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59609pub struct MoneyMarketTransactionStatus2 {
59610	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTxIdr", skip_serializing_if = "Option::is_none") )]
59611	pub unq_tx_idr: Option<String>,
59612	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryTxId") )]
59613	pub prtry_tx_id: String,
59614	#[cfg_attr( feature = "derive_serde", serde(rename = "BrnchId", skip_serializing_if = "Option::is_none") )]
59615	pub brnch_id: Option<String>,
59616	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
59617	pub sts: StatisticalReportingStatus2Code,
59618	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtnRule", skip_serializing_if = "Option::is_none") )]
59619	pub vldtn_rule: Option<Vec<GenericValidationRuleIdentification1>>,
59620	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
59621	pub splmtry_data: Option<Vec<SupplementaryData1>>,
59622}
59623
59624impl MoneyMarketTransactionStatus2 {
59625	pub fn validate(&self) -> Result<(), ValidationError> {
59626		if let Some(ref val) = self.unq_tx_idr {
59627			if val.chars().count() < 1 {
59628				return Err(ValidationError::new(1001, "unq_tx_idr is shorter than the minimum length of 1".to_string()));
59629			}
59630			if val.chars().count() > 105 {
59631				return Err(ValidationError::new(1002, "unq_tx_idr exceeds the maximum length of 105".to_string()));
59632			}
59633		}
59634		if self.prtry_tx_id.chars().count() < 1 {
59635			return Err(ValidationError::new(1001, "prtry_tx_id is shorter than the minimum length of 1".to_string()));
59636		}
59637		if self.prtry_tx_id.chars().count() > 105 {
59638			return Err(ValidationError::new(1002, "prtry_tx_id exceeds the maximum length of 105".to_string()));
59639		}
59640		if let Some(ref val) = self.brnch_id {
59641			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
59642			if !pattern.is_match(val) {
59643				return Err(ValidationError::new(1005, "brnch_id does not match the required pattern".to_string()));
59644			}
59645		}
59646		self.sts.validate()?;
59647		if let Some(ref vec) = self.vldtn_rule { for item in vec { item.validate()? } }
59648		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
59649		Ok(())
59650	}
59651}
59652
59653
59654// MoneyMarketTransactionType1Code ...
59655#[cfg_attr(feature = "derive_debug", derive(Debug))]
59656#[cfg_attr(feature = "derive_default", derive(Default))]
59657#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59658#[cfg_attr(feature = "derive_clone", derive(Clone))]
59659#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59660pub enum MoneyMarketTransactionType1Code {
59661	#[cfg_attr(feature = "derive_default", default)]
59662	#[cfg_attr( feature = "derive_serde", serde(rename = "BORR") )]
59663	CodeBORR,
59664	#[cfg_attr( feature = "derive_serde", serde(rename = "LEND") )]
59665	CodeLEND,
59666}
59667
59668impl MoneyMarketTransactionType1Code {
59669	pub fn validate(&self) -> Result<(), ValidationError> {
59670		Ok(())
59671	}
59672}
59673
59674
59675// MonthlyResult1 ...
59676#[cfg_attr(feature = "derive_debug", derive(Debug))]
59677#[cfg_attr(feature = "derive_default", derive(Default))]
59678#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59679#[cfg_attr(feature = "derive_clone", derive(Clone))]
59680#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59681pub struct MonthlyResult1 {
59682	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfObsrvtns") )]
59683	pub nb_of_obsrvtns: f64,
59684	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfXcptns") )]
59685	pub nb_of_xcptns: f64,
59686	#[cfg_attr( feature = "derive_serde", serde(rename = "Cvrg") )]
59687	pub cvrg: f64,
59688	#[cfg_attr( feature = "derive_serde", serde(rename = "LrgstXcptn") )]
59689	pub lrgst_xcptn: ActiveCurrencyAndAmount,
59690	#[cfg_attr( feature = "derive_serde", serde(rename = "AvrgXcptn") )]
59691	pub avrg_xcptn: ActiveCurrencyAndAmount,
59692	#[cfg_attr( feature = "derive_serde", serde(rename = "LrgstXcptnId", skip_serializing_if = "Option::is_none") )]
59693	pub lrgst_xcptn_id: Option<GenericIdentification165>,
59694}
59695
59696impl MonthlyResult1 {
59697	pub fn validate(&self) -> Result<(), ValidationError> {
59698		if self.nb_of_obsrvtns < 1.000000 {
59699			return Err(ValidationError::new(1003, "nb_of_obsrvtns is less than the minimum value of 1.000000".to_string()));
59700		}
59701		if self.nb_of_xcptns < 0.000000 {
59702			return Err(ValidationError::new(1003, "nb_of_xcptns is less than the minimum value of 0.000000".to_string()));
59703		}
59704		self.lrgst_xcptn.validate()?;
59705		self.avrg_xcptn.validate()?;
59706		if let Some(ref val) = self.lrgst_xcptn_id { val.validate()? }
59707		Ok(())
59708	}
59709}
59710
59711
59712// MovementRecord2 ...
59713#[cfg_attr(feature = "derive_debug", derive(Debug))]
59714#[cfg_attr(feature = "derive_default", derive(Default))]
59715#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59716#[cfg_attr(feature = "derive_clone", derive(Clone))]
59717#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59718pub struct MovementRecord2 {
59719	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
59720	pub id: String,
59721	#[cfg_attr( feature = "derive_serde", serde(rename = "SeqNb", skip_serializing_if = "Option::is_none") )]
59722	pub seq_nb: Option<f64>,
59723	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
59724	pub amt: AmountAndDirection5,
59725	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmAgt", skip_serializing_if = "Option::is_none") )]
59726	pub sttlm_agt: Option<PartyIdentification272>,
59727	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmAgtAcct", skip_serializing_if = "Option::is_none") )]
59728	pub sttlm_agt_acct: Option<CashAccount40>,
59729	#[cfg_attr( feature = "derive_serde", serde(rename = "Ptcpt", skip_serializing_if = "Option::is_none") )]
59730	pub ptcpt: Option<PartyIdentification272>,
59731	#[cfg_attr( feature = "derive_serde", serde(rename = "PtcptAcct", skip_serializing_if = "Option::is_none") )]
59732	pub ptcpt_acct: Option<CashAccount40>,
59733	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref", skip_serializing_if = "Option::is_none") )]
59734	pub ref_attr: Option<String>,
59735}
59736
59737impl MovementRecord2 {
59738	pub fn validate(&self) -> Result<(), ValidationError> {
59739		if self.id.chars().count() < 1 {
59740			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
59741		}
59742		if self.id.chars().count() > 35 {
59743			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
59744		}
59745		self.amt.validate()?;
59746		if let Some(ref val) = self.sttlm_agt { val.validate()? }
59747		if let Some(ref val) = self.sttlm_agt_acct { val.validate()? }
59748		if let Some(ref val) = self.ptcpt { val.validate()? }
59749		if let Some(ref val) = self.ptcpt_acct { val.validate()? }
59750		if let Some(ref val) = self.ref_attr {
59751			if val.chars().count() < 1 {
59752				return Err(ValidationError::new(1001, "ref_attr is shorter than the minimum length of 1".to_string()));
59753			}
59754			if val.chars().count() > 35 {
59755				return Err(ValidationError::new(1002, "ref_attr exceeds the maximum length of 35".to_string()));
59756			}
59757		}
59758		Ok(())
59759	}
59760}
59761
59762
59763// MovementReport1 ...
59764#[cfg_attr(feature = "derive_debug", derive(Debug))]
59765#[cfg_attr(feature = "derive_default", derive(Default))]
59766#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59767#[cfg_attr(feature = "derive_clone", derive(Clone))]
59768#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59769pub struct MovementReport1 {
59770	#[cfg_attr( feature = "derive_serde", serde(rename = "QryRef", skip_serializing_if = "Option::is_none") )]
59771	pub qry_ref: Option<String>,
59772	#[cfg_attr( feature = "derive_serde", serde(rename = "RptId", skip_serializing_if = "Option::is_none") )]
59773	pub rpt_id: Option<String>,
59774	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp") )]
59775	pub qry_tp: MovementResponseType1Code,
59776	#[cfg_attr( feature = "derive_serde", serde(rename = "ActvtyInd") )]
59777	pub actvty_ind: bool,
59778}
59779
59780impl MovementReport1 {
59781	pub fn validate(&self) -> Result<(), ValidationError> {
59782		if let Some(ref val) = self.qry_ref {
59783			if val.chars().count() < 1 {
59784				return Err(ValidationError::new(1001, "qry_ref is shorter than the minimum length of 1".to_string()));
59785			}
59786			if val.chars().count() > 35 {
59787				return Err(ValidationError::new(1002, "qry_ref exceeds the maximum length of 35".to_string()));
59788			}
59789		}
59790		if let Some(ref val) = self.rpt_id {
59791			if val.chars().count() < 1 {
59792				return Err(ValidationError::new(1001, "rpt_id is shorter than the minimum length of 1".to_string()));
59793			}
59794			if val.chars().count() > 35 {
59795				return Err(ValidationError::new(1002, "rpt_id exceeds the maximum length of 35".to_string()));
59796			}
59797		}
59798		self.qry_tp.validate()?;
59799		Ok(())
59800	}
59801}
59802
59803
59804// MovementResponseType1Code ...
59805#[cfg_attr(feature = "derive_debug", derive(Debug))]
59806#[cfg_attr(feature = "derive_default", derive(Default))]
59807#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59808#[cfg_attr(feature = "derive_clone", derive(Clone))]
59809#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59810pub enum MovementResponseType1Code {
59811	#[cfg_attr(feature = "derive_default", default)]
59812	#[cfg_attr( feature = "derive_serde", serde(rename = "FULL") )]
59813	CodeFULL,
59814	#[cfg_attr( feature = "derive_serde", serde(rename = "STTS") )]
59815	CodeSTTS,
59816}
59817
59818impl MovementResponseType1Code {
59819	pub fn validate(&self) -> Result<(), ValidationError> {
59820		Ok(())
59821	}
59822}
59823
59824
59825// MultilateralSettlementRequest3 ...
59826#[cfg_attr(feature = "derive_debug", derive(Debug))]
59827#[cfg_attr(feature = "derive_default", derive(Default))]
59828#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59829#[cfg_attr(feature = "derive_clone", derive(Clone))]
59830#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59831pub struct MultilateralSettlementRequest3 {
59832	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId") )]
59833	pub instr_id: String,
59834	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrPrty", skip_serializing_if = "Option::is_none") )]
59835	pub instr_prty: Option<Priority3Code>,
59836	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmTmReq", skip_serializing_if = "Option::is_none") )]
59837	pub sttlm_tm_req: Option<SettlementTimeRequest2>,
59838	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmPrty", skip_serializing_if = "Option::is_none") )]
59839	pub sttlm_prty: Option<Priority3Code>,
59840	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCycl", skip_serializing_if = "Option::is_none") )]
59841	pub sttlm_cycl: Option<String>,
59842	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfMvmntRcrds", skip_serializing_if = "Option::is_none") )]
59843	pub nb_of_mvmnt_rcrds: Option<f64>,
59844	#[cfg_attr( feature = "derive_serde", serde(rename = "MvmntRcrd") )]
59845	pub mvmnt_rcrd: Vec<MovementRecord2>,
59846}
59847
59848impl MultilateralSettlementRequest3 {
59849	pub fn validate(&self) -> Result<(), ValidationError> {
59850		if self.instr_id.chars().count() < 1 {
59851			return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
59852		}
59853		if self.instr_id.chars().count() > 35 {
59854			return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
59855		}
59856		if let Some(ref val) = self.instr_prty { val.validate()? }
59857		if let Some(ref val) = self.sttlm_tm_req { val.validate()? }
59858		if let Some(ref val) = self.sttlm_prty { val.validate()? }
59859		if let Some(ref val) = self.sttlm_cycl {
59860			if val.chars().count() < 1 {
59861				return Err(ValidationError::new(1001, "sttlm_cycl is shorter than the minimum length of 1".to_string()));
59862			}
59863			if val.chars().count() > 35 {
59864				return Err(ValidationError::new(1002, "sttlm_cycl exceeds the maximum length of 35".to_string()));
59865			}
59866		}
59867		for item in &self.mvmnt_rcrd { item.validate()? }
59868		Ok(())
59869	}
59870}
59871
59872
59873// NameAndAddress15 ...
59874#[cfg_attr(feature = "derive_debug", derive(Debug))]
59875#[cfg_attr(feature = "derive_default", derive(Default))]
59876#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59877#[cfg_attr(feature = "derive_clone", derive(Clone))]
59878#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59879pub struct NameAndAddress15 {
59880	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
59881	pub nm: String,
59882	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
59883	pub pstl_adr: Option<PostalAddress21>,
59884}
59885
59886impl NameAndAddress15 {
59887	pub fn validate(&self) -> Result<(), ValidationError> {
59888		if self.nm.chars().count() < 1 {
59889			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
59890		}
59891		if self.nm.chars().count() > 350 {
59892			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
59893		}
59894		if let Some(ref val) = self.pstl_adr { val.validate()? }
59895		Ok(())
59896	}
59897}
59898
59899
59900// NameAndAddress16 ...
59901#[cfg_attr(feature = "derive_debug", derive(Debug))]
59902#[cfg_attr(feature = "derive_default", derive(Default))]
59903#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59904#[cfg_attr(feature = "derive_clone", derive(Clone))]
59905#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59906pub struct NameAndAddress16 {
59907	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
59908	pub nm: String,
59909	#[cfg_attr( feature = "derive_serde", serde(rename = "Adr") )]
59910	pub adr: PostalAddress24,
59911}
59912
59913impl NameAndAddress16 {
59914	pub fn validate(&self) -> Result<(), ValidationError> {
59915		if self.nm.chars().count() < 1 {
59916			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
59917		}
59918		if self.nm.chars().count() > 140 {
59919			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
59920		}
59921		self.adr.validate()?;
59922		Ok(())
59923	}
59924}
59925
59926
59927// NameAndAddress18 ...
59928#[cfg_attr(feature = "derive_debug", derive(Debug))]
59929#[cfg_attr(feature = "derive_default", derive(Default))]
59930#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59931#[cfg_attr(feature = "derive_clone", derive(Clone))]
59932#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59933pub struct NameAndAddress18 {
59934	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
59935	pub nm: String,
59936	#[cfg_attr( feature = "derive_serde", serde(rename = "Adr") )]
59937	pub adr: PostalAddress27,
59938}
59939
59940impl NameAndAddress18 {
59941	pub fn validate(&self) -> Result<(), ValidationError> {
59942		if self.nm.chars().count() < 1 {
59943			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
59944		}
59945		if self.nm.chars().count() > 140 {
59946			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
59947		}
59948		self.adr.validate()?;
59949		Ok(())
59950	}
59951}
59952
59953
59954// NameAndAddress4 ...
59955#[cfg_attr(feature = "derive_debug", derive(Debug))]
59956#[cfg_attr(feature = "derive_default", derive(Default))]
59957#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59958#[cfg_attr(feature = "derive_clone", derive(Clone))]
59959#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59960pub struct NameAndAddress4 {
59961	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
59962	pub nm: Option<String>,
59963	#[cfg_attr( feature = "derive_serde", serde(rename = "Adr") )]
59964	pub adr: PostalAddress1,
59965}
59966
59967impl NameAndAddress4 {
59968	pub fn validate(&self) -> Result<(), ValidationError> {
59969		if let Some(ref val) = self.nm {
59970			if val.chars().count() < 1 {
59971				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
59972			}
59973			if val.chars().count() > 350 {
59974				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
59975			}
59976		}
59977		self.adr.validate()?;
59978		Ok(())
59979	}
59980}
59981
59982
59983// NameAndAddress5 ...
59984#[cfg_attr(feature = "derive_debug", derive(Debug))]
59985#[cfg_attr(feature = "derive_default", derive(Default))]
59986#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
59987#[cfg_attr(feature = "derive_clone", derive(Clone))]
59988#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
59989pub struct NameAndAddress5 {
59990	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
59991	pub nm: String,
59992	#[cfg_attr( feature = "derive_serde", serde(rename = "Adr", skip_serializing_if = "Option::is_none") )]
59993	pub adr: Option<PostalAddress1>,
59994}
59995
59996impl NameAndAddress5 {
59997	pub fn validate(&self) -> Result<(), ValidationError> {
59998		if self.nm.chars().count() < 1 {
59999			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
60000		}
60001		if self.nm.chars().count() > 350 {
60002			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
60003		}
60004		if let Some(ref val) = self.adr { val.validate()? }
60005		Ok(())
60006	}
60007}
60008
60009
60010// NameAndAddress8 ...
60011#[cfg_attr(feature = "derive_debug", derive(Debug))]
60012#[cfg_attr(feature = "derive_default", derive(Default))]
60013#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60014#[cfg_attr(feature = "derive_clone", derive(Clone))]
60015#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60016pub struct NameAndAddress8 {
60017	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
60018	pub nm: String,
60019	#[cfg_attr( feature = "derive_serde", serde(rename = "Adr", skip_serializing_if = "Option::is_none") )]
60020	pub adr: Option<PostalAddress1>,
60021	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrntvIdr", skip_serializing_if = "Option::is_none") )]
60022	pub altrntv_idr: Option<Vec<String>>,
60023}
60024
60025impl NameAndAddress8 {
60026	pub fn validate(&self) -> Result<(), ValidationError> {
60027		if self.nm.chars().count() < 1 {
60028			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
60029		}
60030		if self.nm.chars().count() > 350 {
60031			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
60032		}
60033		if let Some(ref val) = self.adr { val.validate()? }
60034		if let Some(ref vec) = self.altrntv_idr {
60035			for item in vec {
60036				if item.chars().count() < 1 {
60037					return Err(ValidationError::new(1001, "altrntv_idr is shorter than the minimum length of 1".to_string()));
60038				}
60039				if item.chars().count() > 35 {
60040					return Err(ValidationError::new(1002, "altrntv_idr exceeds the maximum length of 35".to_string()));
60041				}
60042			}
60043		}
60044		Ok(())
60045	}
60046}
60047
60048
60049// NameAndLocation1 ...
60050#[cfg_attr(feature = "derive_debug", derive(Debug))]
60051#[cfg_attr(feature = "derive_default", derive(Default))]
60052#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60053#[cfg_attr(feature = "derive_clone", derive(Clone))]
60054#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60055pub struct NameAndLocation1 {
60056	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
60057	pub nm: String,
60058	#[cfg_attr( feature = "derive_serde", serde(rename = "Lctn") )]
60059	pub lctn: String,
60060}
60061
60062impl NameAndLocation1 {
60063	pub fn validate(&self) -> Result<(), ValidationError> {
60064		if self.nm.chars().count() < 1 {
60065			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
60066		}
60067		if self.nm.chars().count() > 70 {
60068			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 70".to_string()));
60069		}
60070		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
60071		if !pattern.is_match(&self.lctn) {
60072			return Err(ValidationError::new(1005, "lctn does not match the required pattern".to_string()));
60073		}
60074		Ok(())
60075	}
60076}
60077
60078
60079// NameModification1 ...
60080#[cfg_attr(feature = "derive_debug", derive(Debug))]
60081#[cfg_attr(feature = "derive_default", derive(Default))]
60082#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60083#[cfg_attr(feature = "derive_clone", derive(Clone))]
60084#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60085pub struct NameModification1 {
60086	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
60087	pub mod_cd: Option<Modification1Code>,
60088	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
60089	pub nm: String,
60090}
60091
60092impl NameModification1 {
60093	pub fn validate(&self) -> Result<(), ValidationError> {
60094		if let Some(ref val) = self.mod_cd { val.validate()? }
60095		if self.nm.chars().count() < 1 {
60096			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
60097		}
60098		if self.nm.chars().count() > 70 {
60099			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 70".to_string()));
60100		}
60101		Ok(())
60102	}
60103}
60104
60105
60106// NamePrefix1Choice ...
60107#[cfg_attr(feature = "derive_debug", derive(Debug))]
60108#[cfg_attr(feature = "derive_default", derive(Default))]
60109#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60110#[cfg_attr(feature = "derive_clone", derive(Clone))]
60111#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60112pub struct NamePrefix1Choice {
60113	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
60114	pub cd: Option<NamePrefix1Code>,
60115	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
60116	pub prtry: Option<GenericIdentification47>,
60117}
60118
60119impl NamePrefix1Choice {
60120	pub fn validate(&self) -> Result<(), ValidationError> {
60121		if let Some(ref val) = self.cd { val.validate()? }
60122		if let Some(ref val) = self.prtry { val.validate()? }
60123		Ok(())
60124	}
60125}
60126
60127
60128// NamePrefix1Code ...
60129#[cfg_attr(feature = "derive_debug", derive(Debug))]
60130#[cfg_attr(feature = "derive_default", derive(Default))]
60131#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60132#[cfg_attr(feature = "derive_clone", derive(Clone))]
60133#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60134pub enum NamePrefix1Code {
60135	#[cfg_attr(feature = "derive_default", default)]
60136	#[cfg_attr( feature = "derive_serde", serde(rename = "DOCT") )]
60137	CodeDOCT,
60138	#[cfg_attr( feature = "derive_serde", serde(rename = "MIST") )]
60139	CodeMIST,
60140	#[cfg_attr( feature = "derive_serde", serde(rename = "MISS") )]
60141	CodeMISS,
60142	#[cfg_attr( feature = "derive_serde", serde(rename = "MADM") )]
60143	CodeMADM,
60144}
60145
60146impl NamePrefix1Code {
60147	pub fn validate(&self) -> Result<(), ValidationError> {
60148		Ok(())
60149	}
60150}
60151
60152
60153// NamePrefix2Code ...
60154#[cfg_attr(feature = "derive_debug", derive(Debug))]
60155#[cfg_attr(feature = "derive_default", derive(Default))]
60156#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60157#[cfg_attr(feature = "derive_clone", derive(Clone))]
60158#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60159pub enum NamePrefix2Code {
60160	#[cfg_attr(feature = "derive_default", default)]
60161	#[cfg_attr( feature = "derive_serde", serde(rename = "DOCT") )]
60162	CodeDOCT,
60163	#[cfg_attr( feature = "derive_serde", serde(rename = "MADM") )]
60164	CodeMADM,
60165	#[cfg_attr( feature = "derive_serde", serde(rename = "MISS") )]
60166	CodeMISS,
60167	#[cfg_attr( feature = "derive_serde", serde(rename = "MIST") )]
60168	CodeMIST,
60169	#[cfg_attr( feature = "derive_serde", serde(rename = "MIKS") )]
60170	CodeMIKS,
60171}
60172
60173impl NamePrefix2Code {
60174	pub fn validate(&self) -> Result<(), ValidationError> {
60175		Ok(())
60176	}
60177}
60178
60179
60180// NamedPosition3 ...
60181#[cfg_attr(feature = "derive_debug", derive(Debug))]
60182#[cfg_attr(feature = "derive_default", derive(Default))]
60183#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60184#[cfg_attr(feature = "derive_clone", derive(Clone))]
60185#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60186pub struct NamedPosition3 {
60187	#[cfg_attr( feature = "derive_serde", serde(rename = "RefDt") )]
60188	pub ref_dt: String,
60189	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlInf", skip_serializing_if = "Option::is_none") )]
60190	pub gnl_inf: Option<Vec<PositionSet16>>,
60191	#[cfg_attr( feature = "derive_serde", serde(rename = "Ln", skip_serializing_if = "Option::is_none") )]
60192	pub ln: Option<Vec<PositionSet17>>,
60193	#[cfg_attr( feature = "derive_serde", serde(rename = "Coll", skip_serializing_if = "Option::is_none") )]
60194	pub coll: Option<Vec<PositionSet18>>,
60195	#[cfg_attr( feature = "derive_serde", serde(rename = "Mrgn", skip_serializing_if = "Option::is_none") )]
60196	pub mrgn: Option<Vec<PositionSet20>>,
60197	#[cfg_attr( feature = "derive_serde", serde(rename = "Reuse", skip_serializing_if = "Option::is_none") )]
60198	pub reuse: Option<Vec<PositionSet19>>,
60199}
60200
60201impl NamedPosition3 {
60202	pub fn validate(&self) -> Result<(), ValidationError> {
60203		if let Some(ref vec) = self.gnl_inf { for item in vec { item.validate()? } }
60204		if let Some(ref vec) = self.ln { for item in vec { item.validate()? } }
60205		if let Some(ref vec) = self.coll { for item in vec { item.validate()? } }
60206		if let Some(ref vec) = self.mrgn { for item in vec { item.validate()? } }
60207		if let Some(ref vec) = self.reuse { for item in vec { item.validate()? } }
60208		Ok(())
60209	}
60210}
60211
60212
60213// NaturalPersonIdentification2 ...
60214#[cfg_attr(feature = "derive_debug", derive(Debug))]
60215#[cfg_attr(feature = "derive_default", derive(Default))]
60216#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60217#[cfg_attr(feature = "derive_clone", derive(Clone))]
60218#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60219pub struct NaturalPersonIdentification2 {
60220	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
60221	pub id: GenericIdentification175,
60222	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
60223	pub nm: Option<String>,
60224	#[cfg_attr( feature = "derive_serde", serde(rename = "Dmcl", skip_serializing_if = "Option::is_none") )]
60225	pub dmcl: Option<String>,
60226}
60227
60228impl NaturalPersonIdentification2 {
60229	pub fn validate(&self) -> Result<(), ValidationError> {
60230		self.id.validate()?;
60231		if let Some(ref val) = self.nm {
60232			if val.chars().count() < 1 {
60233				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
60234			}
60235			if val.chars().count() > 105 {
60236				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 105".to_string()));
60237			}
60238		}
60239		if let Some(ref val) = self.dmcl {
60240			if val.chars().count() < 1 {
60241				return Err(ValidationError::new(1001, "dmcl is shorter than the minimum length of 1".to_string()));
60242			}
60243			if val.chars().count() > 500 {
60244				return Err(ValidationError::new(1002, "dmcl exceeds the maximum length of 500".to_string()));
60245			}
60246		}
60247		Ok(())
60248	}
60249}
60250
60251
60252// NaturalPersonIdentification3 ...
60253#[cfg_attr(feature = "derive_debug", derive(Debug))]
60254#[cfg_attr(feature = "derive_default", derive(Default))]
60255#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60256#[cfg_attr(feature = "derive_clone", derive(Clone))]
60257#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60258pub struct NaturalPersonIdentification3 {
60259	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
60260	pub id: NaturalPersonIdentification2,
60261	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
60262	pub ctry: Option<String>,
60263}
60264
60265impl NaturalPersonIdentification3 {
60266	pub fn validate(&self) -> Result<(), ValidationError> {
60267		self.id.validate()?;
60268		if let Some(ref val) = self.ctry {
60269			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
60270			if !pattern.is_match(val) {
60271				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
60272			}
60273		}
60274		Ok(())
60275	}
60276}
60277
60278
60279// NetCashForecast3 ...
60280#[cfg_attr(feature = "derive_debug", derive(Debug))]
60281#[cfg_attr(feature = "derive_default", derive(Default))]
60282#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60283#[cfg_attr(feature = "derive_clone", derive(Clone))]
60284#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60285pub struct NetCashForecast3 {
60286	#[cfg_attr( feature = "derive_serde", serde(rename = "NetAmt", skip_serializing_if = "Option::is_none") )]
60287	pub net_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
60288	#[cfg_attr( feature = "derive_serde", serde(rename = "NetUnitsNb", skip_serializing_if = "Option::is_none") )]
60289	pub net_units_nb: Option<FinancialInstrumentQuantity1>,
60290	#[cfg_attr( feature = "derive_serde", serde(rename = "FlowDrctn") )]
60291	pub flow_drctn: FlowDirectionType1Code,
60292}
60293
60294impl NetCashForecast3 {
60295	pub fn validate(&self) -> Result<(), ValidationError> {
60296		if let Some(ref val) = self.net_amt { val.validate()? }
60297		if let Some(ref val) = self.net_units_nb { val.validate()? }
60298		self.flow_drctn.validate()?;
60299		Ok(())
60300	}
60301}
60302
60303
60304// NetCashForecast4 ...
60305#[cfg_attr(feature = "derive_debug", derive(Debug))]
60306#[cfg_attr(feature = "derive_default", derive(Default))]
60307#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60308#[cfg_attr(feature = "derive_clone", derive(Clone))]
60309#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60310pub struct NetCashForecast4 {
60311	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSttlmDt") )]
60312	pub csh_sttlm_dt: String,
60313	#[cfg_attr( feature = "derive_serde", serde(rename = "NetAmt", skip_serializing_if = "Option::is_none") )]
60314	pub net_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
60315	#[cfg_attr( feature = "derive_serde", serde(rename = "NetUnitsNb", skip_serializing_if = "Option::is_none") )]
60316	pub net_units_nb: Option<FinancialInstrumentQuantity1>,
60317	#[cfg_attr( feature = "derive_serde", serde(rename = "FlowDrctn") )]
60318	pub flow_drctn: FlowDirectionType1Code,
60319	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlBal", skip_serializing_if = "Option::is_none") )]
60320	pub addtl_bal: Option<FundBalance1>,
60321}
60322
60323impl NetCashForecast4 {
60324	pub fn validate(&self) -> Result<(), ValidationError> {
60325		if let Some(ref val) = self.net_amt { val.validate()? }
60326		if let Some(ref val) = self.net_units_nb { val.validate()? }
60327		self.flow_drctn.validate()?;
60328		if let Some(ref val) = self.addtl_bal { val.validate()? }
60329		Ok(())
60330	}
60331}
60332
60333
60334// NetCashForecast5 ...
60335#[cfg_attr(feature = "derive_debug", derive(Debug))]
60336#[cfg_attr(feature = "derive_default", derive(Default))]
60337#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60338#[cfg_attr(feature = "derive_clone", derive(Clone))]
60339#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60340pub struct NetCashForecast5 {
60341	#[cfg_attr( feature = "derive_serde", serde(rename = "CshSttlmDt", skip_serializing_if = "Option::is_none") )]
60342	pub csh_sttlm_dt: Option<String>,
60343	#[cfg_attr( feature = "derive_serde", serde(rename = "NetAmt", skip_serializing_if = "Option::is_none") )]
60344	pub net_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
60345	#[cfg_attr( feature = "derive_serde", serde(rename = "NetUnitsNb", skip_serializing_if = "Option::is_none") )]
60346	pub net_units_nb: Option<FinancialInstrumentQuantity1>,
60347	#[cfg_attr( feature = "derive_serde", serde(rename = "FlowDrctn") )]
60348	pub flow_drctn: FlowDirectionType1Code,
60349}
60350
60351impl NetCashForecast5 {
60352	pub fn validate(&self) -> Result<(), ValidationError> {
60353		if let Some(ref val) = self.net_amt { val.validate()? }
60354		if let Some(ref val) = self.net_units_nb { val.validate()? }
60355		self.flow_drctn.validate()?;
60356		Ok(())
60357	}
60358}
60359
60360
60361// NetObligation2 ...
60362#[cfg_attr(feature = "derive_debug", derive(Debug))]
60363#[cfg_attr(feature = "derive_default", derive(Default))]
60364#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60365#[cfg_attr(feature = "derive_clone", derive(Clone))]
60366#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60367pub struct NetObligation2 {
60368	#[cfg_attr( feature = "derive_serde", serde(rename = "OblgtnId") )]
60369	pub oblgtn_id: String,
60370	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
60371	pub amt: ActiveCurrencyAndAmount,
60372	#[cfg_attr( feature = "derive_serde", serde(rename = "PtcptNetgId") )]
60373	pub ptcpt_netg_id: NettingIdentification2Choice,
60374	#[cfg_attr( feature = "derive_serde", serde(rename = "OblgtnDrctn") )]
60375	pub oblgtn_drctn: PaymentReceipt1Code,
60376	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyNetgId") )]
60377	pub ctr_pty_netg_id: NettingIdentification2Choice,
60378	#[cfg_attr( feature = "derive_serde", serde(rename = "NetSvcCtrPtyId", skip_serializing_if = "Option::is_none") )]
60379	pub net_svc_ctr_pty_id: Option<PartyIdentification242Choice>,
60380	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtySttlmInstrs", skip_serializing_if = "Option::is_none") )]
60381	pub ctr_pty_sttlm_instrs: Option<SettlementParties120>,
60382	#[cfg_attr( feature = "derive_serde", serde(rename = "TxsNb", skip_serializing_if = "Option::is_none") )]
60383	pub txs_nb: Option<String>,
60384}
60385
60386impl NetObligation2 {
60387	pub fn validate(&self) -> Result<(), ValidationError> {
60388		if self.oblgtn_id.chars().count() < 1 {
60389			return Err(ValidationError::new(1001, "oblgtn_id is shorter than the minimum length of 1".to_string()));
60390		}
60391		if self.oblgtn_id.chars().count() > 35 {
60392			return Err(ValidationError::new(1002, "oblgtn_id exceeds the maximum length of 35".to_string()));
60393		}
60394		self.amt.validate()?;
60395		self.ptcpt_netg_id.validate()?;
60396		self.oblgtn_drctn.validate()?;
60397		self.ctr_pty_netg_id.validate()?;
60398		if let Some(ref val) = self.net_svc_ctr_pty_id { val.validate()? }
60399		if let Some(ref val) = self.ctr_pty_sttlm_instrs { val.validate()? }
60400		if let Some(ref val) = self.txs_nb {
60401			let pattern = Regex::new("[0-9]{1,10}").unwrap();
60402			if !pattern.is_match(val) {
60403				return Err(ValidationError::new(1005, "txs_nb does not match the required pattern".to_string()));
60404			}
60405		}
60406		Ok(())
60407	}
60408}
60409
60410
60411// NetReportData2 ...
60412#[cfg_attr(feature = "derive_debug", derive(Debug))]
60413#[cfg_attr(feature = "derive_default", derive(Default))]
60414#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60415#[cfg_attr(feature = "derive_clone", derive(Clone))]
60416#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60417pub struct NetReportData2 {
60418	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
60419	pub msg_id: String,
60420	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
60421	pub cre_dt_tm: String,
60422	#[cfg_attr( feature = "derive_serde", serde(rename = "NetgCutOffTm") )]
60423	pub netg_cut_off_tm: String,
60424	#[cfg_attr( feature = "derive_serde", serde(rename = "RptDt") )]
60425	pub rpt_dt: String,
60426	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt") )]
60427	pub val_dt: String,
60428	#[cfg_attr( feature = "derive_serde", serde(rename = "RptTp", skip_serializing_if = "Option::is_none") )]
60429	pub rpt_tp: Option<String>,
60430	#[cfg_attr( feature = "derive_serde", serde(rename = "NetRptSvcr", skip_serializing_if = "Option::is_none") )]
60431	pub net_rpt_svcr: Option<PartyIdentification242Choice>,
60432	#[cfg_attr( feature = "derive_serde", serde(rename = "NetSvcTp", skip_serializing_if = "Option::is_none") )]
60433	pub net_svc_tp: Option<String>,
60434	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgPgntn", skip_serializing_if = "Option::is_none") )]
60435	pub msg_pgntn: Option<Pagination1>,
60436}
60437
60438impl NetReportData2 {
60439	pub fn validate(&self) -> Result<(), ValidationError> {
60440		if self.msg_id.chars().count() < 1 {
60441			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
60442		}
60443		if self.msg_id.chars().count() > 35 {
60444			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
60445		}
60446		if let Some(ref val) = self.rpt_tp {
60447			if val.chars().count() < 1 {
60448				return Err(ValidationError::new(1001, "rpt_tp is shorter than the minimum length of 1".to_string()));
60449			}
60450			if val.chars().count() > 35 {
60451				return Err(ValidationError::new(1002, "rpt_tp exceeds the maximum length of 35".to_string()));
60452			}
60453		}
60454		if let Some(ref val) = self.net_rpt_svcr { val.validate()? }
60455		if let Some(ref val) = self.net_svc_tp {
60456			if val.chars().count() < 1 {
60457				return Err(ValidationError::new(1001, "net_svc_tp is shorter than the minimum length of 1".to_string()));
60458			}
60459			if val.chars().count() > 35 {
60460				return Err(ValidationError::new(1002, "net_svc_tp exceeds the maximum length of 35".to_string()));
60461			}
60462		}
60463		if let Some(ref val) = self.msg_pgntn { val.validate()? }
60464		Ok(())
60465	}
60466}
60467
60468
60469// NettingCutOff2 ...
60470#[cfg_attr(feature = "derive_debug", derive(Debug))]
60471#[cfg_attr(feature = "derive_default", derive(Default))]
60472#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60473#[cfg_attr(feature = "derive_clone", derive(Clone))]
60474#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60475pub struct NettingCutOff2 {
60476	#[cfg_attr( feature = "derive_serde", serde(rename = "NetgId") )]
60477	pub netg_id: NettingIdentification2Choice,
60478	#[cfg_attr( feature = "derive_serde", serde(rename = "NewCutOff") )]
60479	pub new_cut_off: Vec<CutOff1>,
60480}
60481
60482impl NettingCutOff2 {
60483	pub fn validate(&self) -> Result<(), ValidationError> {
60484		self.netg_id.validate()?;
60485		for item in &self.new_cut_off { item.validate()? }
60486		Ok(())
60487	}
60488}
60489
60490
60491// NettingCutOffReportData2 ...
60492#[cfg_attr(feature = "derive_debug", derive(Debug))]
60493#[cfg_attr(feature = "derive_default", derive(Default))]
60494#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60495#[cfg_attr(feature = "derive_clone", derive(Clone))]
60496#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60497pub struct NettingCutOffReportData2 {
60498	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
60499	pub msg_id: String,
60500	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
60501	pub cre_dt_tm: String,
60502	#[cfg_attr( feature = "derive_serde", serde(rename = "RptTp") )]
60503	pub rpt_tp: String,
60504	#[cfg_attr( feature = "derive_serde", serde(rename = "ActvtnDt") )]
60505	pub actvtn_dt: String,
60506	#[cfg_attr( feature = "derive_serde", serde(rename = "NetSvcPtcptId", skip_serializing_if = "Option::is_none") )]
60507	pub net_svc_ptcpt_id: Option<PartyIdentification242Choice>,
60508	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSvcr", skip_serializing_if = "Option::is_none") )]
60509	pub rpt_svcr: Option<PartyIdentification242Choice>,
60510	#[cfg_attr( feature = "derive_serde", serde(rename = "NetSvcTp", skip_serializing_if = "Option::is_none") )]
60511	pub net_svc_tp: Option<String>,
60512	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgPgntn", skip_serializing_if = "Option::is_none") )]
60513	pub msg_pgntn: Option<Pagination1>,
60514}
60515
60516impl NettingCutOffReportData2 {
60517	pub fn validate(&self) -> Result<(), ValidationError> {
60518		if self.msg_id.chars().count() < 1 {
60519			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
60520		}
60521		if self.msg_id.chars().count() > 35 {
60522			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
60523		}
60524		if self.rpt_tp.chars().count() < 1 {
60525			return Err(ValidationError::new(1001, "rpt_tp is shorter than the minimum length of 1".to_string()));
60526		}
60527		if self.rpt_tp.chars().count() > 4 {
60528			return Err(ValidationError::new(1002, "rpt_tp exceeds the maximum length of 4".to_string()));
60529		}
60530		if let Some(ref val) = self.net_svc_ptcpt_id { val.validate()? }
60531		if let Some(ref val) = self.rpt_svcr { val.validate()? }
60532		if let Some(ref val) = self.net_svc_tp {
60533			if val.chars().count() < 1 {
60534				return Err(ValidationError::new(1001, "net_svc_tp is shorter than the minimum length of 1".to_string()));
60535			}
60536			if val.chars().count() > 35 {
60537				return Err(ValidationError::new(1002, "net_svc_tp exceeds the maximum length of 35".to_string()));
60538			}
60539		}
60540		if let Some(ref val) = self.msg_pgntn { val.validate()? }
60541		Ok(())
60542	}
60543}
60544
60545
60546// NettingIdentification2Choice ...
60547#[cfg_attr(feature = "derive_debug", derive(Debug))]
60548#[cfg_attr(feature = "derive_default", derive(Default))]
60549#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60550#[cfg_attr(feature = "derive_clone", derive(Clone))]
60551#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60552pub struct NettingIdentification2Choice {
60553	#[cfg_attr( feature = "derive_serde", serde(rename = "TradPty", skip_serializing_if = "Option::is_none") )]
60554	pub trad_pty: Option<PartyIdentification242Choice>,
60555	#[cfg_attr( feature = "derive_serde", serde(rename = "NetgGrpId", skip_serializing_if = "Option::is_none") )]
60556	pub netg_grp_id: Option<String>,
60557}
60558
60559impl NettingIdentification2Choice {
60560	pub fn validate(&self) -> Result<(), ValidationError> {
60561		if let Some(ref val) = self.trad_pty { val.validate()? }
60562		if let Some(ref val) = self.netg_grp_id {
60563			if val.chars().count() < 1 {
60564				return Err(ValidationError::new(1001, "netg_grp_id is shorter than the minimum length of 1".to_string()));
60565			}
60566			if val.chars().count() > 35 {
60567				return Err(ValidationError::new(1002, "netg_grp_id exceeds the maximum length of 35".to_string()));
60568			}
60569		}
60570		Ok(())
60571	}
60572}
60573
60574
60575// NewAccount4 ...
60576#[cfg_attr(feature = "derive_debug", derive(Debug))]
60577#[cfg_attr(feature = "derive_default", derive(Default))]
60578#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60579#[cfg_attr(feature = "derive_clone", derive(Clone))]
60580#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60581pub struct NewAccount4 {
60582	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct") )]
60583	pub acct: CashAccount43,
60584	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctPty") )]
60585	pub acct_pty: Vec<IndividualPerson44>,
60586	#[cfg_attr( feature = "derive_serde", serde(rename = "Org", skip_serializing_if = "Option::is_none") )]
60587	pub org: Option<Organisation43>,
60588}
60589
60590impl NewAccount4 {
60591	pub fn validate(&self) -> Result<(), ValidationError> {
60592		self.acct.validate()?;
60593		for item in &self.acct_pty { item.validate()? }
60594		if let Some(ref val) = self.org { val.validate()? }
60595		Ok(())
60596	}
60597}
60598
60599
60600// NewIssueAllocation2 ...
60601#[cfg_attr(feature = "derive_debug", derive(Debug))]
60602#[cfg_attr(feature = "derive_default", derive(Default))]
60603#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60604#[cfg_attr(feature = "derive_clone", derive(Clone))]
60605#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60606pub struct NewIssueAllocation2 {
60607	#[cfg_attr( feature = "derive_serde", serde(rename = "Rstrctd") )]
60608	pub rstrctd: bool,
60609	#[cfg_attr( feature = "derive_serde", serde(rename = "XmptPrsnRsn", skip_serializing_if = "Option::is_none") )]
60610	pub xmpt_prsn_rsn: Option<String>,
60611	#[cfg_attr( feature = "derive_serde", serde(rename = "DeMnms", skip_serializing_if = "Option::is_none") )]
60612	pub de_mnms: Option<DeMinimus1Choice>,
60613}
60614
60615impl NewIssueAllocation2 {
60616	pub fn validate(&self) -> Result<(), ValidationError> {
60617		if let Some(ref val) = self.xmpt_prsn_rsn {
60618			if val.chars().count() < 1 {
60619				return Err(ValidationError::new(1001, "xmpt_prsn_rsn is shorter than the minimum length of 1".to_string()));
60620			}
60621			if val.chars().count() > 350 {
60622				return Err(ValidationError::new(1002, "xmpt_prsn_rsn exceeds the maximum length of 350".to_string()));
60623			}
60624		}
60625		if let Some(ref val) = self.de_mnms { val.validate()? }
60626		Ok(())
60627	}
60628}
60629
60630
60631// NewOrderReport2 ...
60632#[cfg_attr(feature = "derive_debug", derive(Debug))]
60633#[cfg_attr(feature = "derive_default", derive(Default))]
60634#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60635#[cfg_attr(feature = "derive_clone", derive(Clone))]
60636#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60637pub struct NewOrderReport2 {
60638	#[cfg_attr( feature = "derive_serde", serde(rename = "RptId") )]
60639	pub rpt_id: String,
60640	#[cfg_attr( feature = "derive_serde", serde(rename = "Ordr") )]
60641	pub ordr: Vec<OrderData3>,
60642}
60643
60644impl NewOrderReport2 {
60645	pub fn validate(&self) -> Result<(), ValidationError> {
60646		if self.rpt_id.chars().count() < 1 {
60647			return Err(ValidationError::new(1001, "rpt_id is shorter than the minimum length of 1".to_string()));
60648		}
60649		if self.rpt_id.chars().count() > 140 {
60650			return Err(ValidationError::new(1002, "rpt_id exceeds the maximum length of 140".to_string()));
60651		}
60652		for item in &self.ordr { item.validate()? }
60653		Ok(())
60654	}
60655}
60656
60657
60658// NoCriteria1Code ...
60659#[cfg_attr(feature = "derive_debug", derive(Debug))]
60660#[cfg_attr(feature = "derive_default", derive(Default))]
60661#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60662#[cfg_attr(feature = "derive_clone", derive(Clone))]
60663#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60664pub enum NoCriteria1Code {
60665	#[cfg_attr(feature = "derive_default", default)]
60666	#[cfg_attr( feature = "derive_serde", serde(rename = "NOCR") )]
60667	CodeNOCR,
60668}
60669
60670impl NoCriteria1Code {
60671	pub fn validate(&self) -> Result<(), ValidationError> {
60672		Ok(())
60673	}
60674}
60675
60676
60677// NoReasonCode ...
60678#[cfg_attr(feature = "derive_debug", derive(Debug))]
60679#[cfg_attr(feature = "derive_default", derive(Default))]
60680#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60681#[cfg_attr(feature = "derive_clone", derive(Clone))]
60682#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60683pub enum NoReasonCode {
60684	#[cfg_attr(feature = "derive_default", default)]
60685	#[cfg_attr( feature = "derive_serde", serde(rename = "NORE") )]
60686	CodeNORE,
60687}
60688
60689impl NoReasonCode {
60690	pub fn validate(&self) -> Result<(), ValidationError> {
60691		Ok(())
60692	}
60693}
60694
60695
60696// NonClearingReason2 ...
60697#[cfg_attr(feature = "derive_debug", derive(Debug))]
60698#[cfg_attr(feature = "derive_default", derive(Default))]
60699#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60700#[cfg_attr(feature = "derive_clone", derive(Clone))]
60701#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60702pub struct NonClearingReason2 {
60703	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrXmptnXcptn") )]
60704	pub clr_xmptn_xcptn: Vec<ClearingExemptionException1Code>,
60705	#[cfg_attr( feature = "derive_serde", serde(rename = "NonClrRsnInf", skip_serializing_if = "Option::is_none") )]
60706	pub non_clr_rsn_inf: Option<String>,
60707}
60708
60709impl NonClearingReason2 {
60710	pub fn validate(&self) -> Result<(), ValidationError> {
60711		for item in &self.clr_xmptn_xcptn { item.validate()? }
60712		if let Some(ref val) = self.non_clr_rsn_inf {
60713			if val.chars().count() < 1 {
60714				return Err(ValidationError::new(1001, "non_clr_rsn_inf is shorter than the minimum length of 1".to_string()));
60715			}
60716			if val.chars().count() > 350 {
60717				return Err(ValidationError::new(1002, "non_clr_rsn_inf exceeds the maximum length of 350".to_string()));
60718			}
60719		}
60720		Ok(())
60721	}
60722}
60723
60724
60725// NonEquityAssetClass1Code ...
60726#[cfg_attr(feature = "derive_debug", derive(Debug))]
60727#[cfg_attr(feature = "derive_default", derive(Default))]
60728#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60729#[cfg_attr(feature = "derive_clone", derive(Clone))]
60730#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60731pub enum NonEquityAssetClass1Code {
60732	#[cfg_attr(feature = "derive_default", default)]
60733	#[cfg_attr( feature = "derive_serde", serde(rename = "SDRV") )]
60734	CodeSDRV,
60735	#[cfg_attr( feature = "derive_serde", serde(rename = "IRDV") )]
60736	CodeIRDV,
60737	#[cfg_attr( feature = "derive_serde", serde(rename = "FEXD") )]
60738	CodeFEXD,
60739	#[cfg_attr( feature = "derive_serde", serde(rename = "EQDV") )]
60740	CodeEQDV,
60741	#[cfg_attr( feature = "derive_serde", serde(rename = "EADV") )]
60742	CodeEADV,
60743	#[cfg_attr( feature = "derive_serde", serde(rename = "EMAL") )]
60744	CodeEMAL,
60745	#[cfg_attr( feature = "derive_serde", serde(rename = "CRDV") )]
60746	CodeCRDV,
60747	#[cfg_attr( feature = "derive_serde", serde(rename = "CFDS") )]
60748	CodeCFDS,
60749	#[cfg_attr( feature = "derive_serde", serde(rename = "COMD") )]
60750	CodeCOMD,
60751	#[cfg_attr( feature = "derive_serde", serde(rename = "C10D") )]
60752	CodeC10D,
60753	#[cfg_attr( feature = "derive_serde", serde(rename = "BOND") )]
60754	CodeBOND,
60755	#[cfg_attr( feature = "derive_serde", serde(rename = "ETCS") )]
60756	CodeETCS,
60757	#[cfg_attr( feature = "derive_serde", serde(rename = "ETNS") )]
60758	CodeETNS,
60759	#[cfg_attr( feature = "derive_serde", serde(rename = "SFPS") )]
60760	CodeSFPS,
60761}
60762
60763impl NonEquityAssetClass1Code {
60764	pub fn validate(&self) -> Result<(), ValidationError> {
60765		Ok(())
60766	}
60767}
60768
60769
60770// NonEquityInstrumentReportingClassification1Code ...
60771#[cfg_attr(feature = "derive_debug", derive(Debug))]
60772#[cfg_attr(feature = "derive_default", derive(Default))]
60773#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60774#[cfg_attr(feature = "derive_clone", derive(Clone))]
60775#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60776pub enum NonEquityInstrumentReportingClassification1Code {
60777	#[cfg_attr(feature = "derive_default", default)]
60778	#[cfg_attr( feature = "derive_serde", serde(rename = "SFPS") )]
60779	CodeSFPS,
60780	#[cfg_attr( feature = "derive_serde", serde(rename = "SDRV") )]
60781	CodeSDRV,
60782	#[cfg_attr( feature = "derive_serde", serde(rename = "DERV") )]
60783	CodeDERV,
60784	#[cfg_attr( feature = "derive_serde", serde(rename = "EMAL") )]
60785	CodeEMAL,
60786	#[cfg_attr( feature = "derive_serde", serde(rename = "BOND") )]
60787	CodeBOND,
60788	#[cfg_attr( feature = "derive_serde", serde(rename = "ETCS") )]
60789	CodeETCS,
60790	#[cfg_attr( feature = "derive_serde", serde(rename = "ETNS") )]
60791	CodeETNS,
60792}
60793
60794impl NonEquityInstrumentReportingClassification1Code {
60795	pub fn validate(&self) -> Result<(), ValidationError> {
60796		Ok(())
60797	}
60798}
60799
60800
60801// NonEquitySubClass1 ...
60802#[cfg_attr(feature = "derive_debug", derive(Debug))]
60803#[cfg_attr(feature = "derive_default", derive(Default))]
60804#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60805#[cfg_attr(feature = "derive_clone", derive(Clone))]
60806#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60807pub struct NonEquitySubClass1 {
60808	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
60809	pub desc: Option<String>,
60810	#[cfg_attr( feature = "derive_serde", serde(rename = "SgmttnCrit") )]
60811	pub sgmttn_crit: Vec<NonEquitySubClassSegmentationCriterion1>,
60812}
60813
60814impl NonEquitySubClass1 {
60815	pub fn validate(&self) -> Result<(), ValidationError> {
60816		if let Some(ref val) = self.desc {
60817			if val.chars().count() < 1 {
60818				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
60819			}
60820			if val.chars().count() > 1000 {
60821				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 1000".to_string()));
60822			}
60823		}
60824		for item in &self.sgmttn_crit { item.validate()? }
60825		Ok(())
60826	}
60827}
60828
60829
60830// NonEquitySubClassSegmentationCriteria1Code ...
60831#[cfg_attr(feature = "derive_debug", derive(Debug))]
60832#[cfg_attr(feature = "derive_default", derive(Default))]
60833#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60834#[cfg_attr(feature = "derive_clone", derive(Clone))]
60835#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60836pub enum NonEquitySubClassSegmentationCriteria1Code {
60837	#[cfg_attr(feature = "derive_default", default)]
60838	#[cfg_attr( feature = "derive_serde", serde(rename = "ASCL") )]
60839	CodeASCL,
60840	#[cfg_attr( feature = "derive_serde", serde(rename = "BSPD") )]
60841	CodeBSPD,
60842	#[cfg_attr( feature = "derive_serde", serde(rename = "CNC1") )]
60843	CodeCNC1,
60844	#[cfg_attr( feature = "derive_serde", serde(rename = "CNC2") )]
60845	CodeCNC2,
60846	#[cfg_attr( feature = "derive_serde", serde(rename = "NCCO") )]
60847	CodeNCCO,
60848	#[cfg_attr( feature = "derive_serde", serde(rename = "CTYP") )]
60849	CodeCTYP,
60850	#[cfg_attr( feature = "derive_serde", serde(rename = "NCCR") )]
60851	CodeNCCR,
60852	#[cfg_attr( feature = "derive_serde", serde(rename = "DCSL") )]
60853	CodeDCSL,
60854	#[cfg_attr( feature = "derive_serde", serde(rename = "DTYP") )]
60855	CodeDTYP,
60856	#[cfg_attr( feature = "derive_serde", serde(rename = "EQUT") )]
60857	CodeEQUT,
60858	#[cfg_attr( feature = "derive_serde", serde(rename = "FNC1") )]
60859	CodeFNC1,
60860	#[cfg_attr( feature = "derive_serde", serde(rename = "FNC2") )]
60861	CodeFNC2,
60862	#[cfg_attr( feature = "derive_serde", serde(rename = "FSPD") )]
60863	CodeFSPD,
60864	#[cfg_attr( feature = "derive_serde", serde(rename = "IIND") )]
60865	CodeIIND,
60866	#[cfg_attr( feature = "derive_serde", serde(rename = "IRTC") )]
60867	CodeIRTC,
60868	#[cfg_attr( feature = "derive_serde", serde(rename = "INC1") )]
60869	CodeINC1,
60870	#[cfg_attr( feature = "derive_serde", serde(rename = "INC2") )]
60871	CodeINC2,
60872	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN") )]
60873	CodeISIN,
60874	#[cfg_attr( feature = "derive_serde", serde(rename = "TTMO") )]
60875	CodeTTMO,
60876	#[cfg_attr( feature = "derive_serde", serde(rename = "PRMT") )]
60877	CodePRMT,
60878	#[cfg_attr( feature = "derive_serde", serde(rename = "SSRF") )]
60879	CodeSSRF,
60880	#[cfg_attr( feature = "derive_serde", serde(rename = "ISPT") )]
60881	CodeISPT,
60882	#[cfg_attr( feature = "derive_serde", serde(rename = "SRTC") )]
60883	CodeSRTC,
60884	#[cfg_attr( feature = "derive_serde", serde(rename = "SACL") )]
60885	CodeSACL,
60886	#[cfg_attr( feature = "derive_serde", serde(rename = "SBPD") )]
60887	CodeSBPD,
60888	#[cfg_attr( feature = "derive_serde", serde(rename = "TTMS") )]
60889	CodeTTMS,
60890	#[cfg_attr( feature = "derive_serde", serde(rename = "NCSW") )]
60891	CodeNCSW,
60892	#[cfg_attr( feature = "derive_serde", serde(rename = "TTMB") )]
60893	CodeTTMB,
60894	#[cfg_attr( feature = "derive_serde", serde(rename = "IOUB") )]
60895	CodeIOUB,
60896	#[cfg_attr( feature = "derive_serde", serde(rename = "TOUB") )]
60897	CodeTOUB,
60898	#[cfg_attr( feature = "derive_serde", serde(rename = "UISC") )]
60899	CodeUISC,
60900	#[cfg_attr( feature = "derive_serde", serde(rename = "UIDX") )]
60901	CodeUIDX,
60902	#[cfg_attr( feature = "derive_serde", serde(rename = "UINS") )]
60903	CodeUINS,
60904	#[cfg_attr( feature = "derive_serde", serde(rename = "UIRT") )]
60905	CodeUIRT,
60906	#[cfg_attr( feature = "derive_serde", serde(rename = "REOU") )]
60907	CodeREOU,
60908	#[cfg_attr( feature = "derive_serde", serde(rename = "UTYP") )]
60909	CodeUTYP,
60910}
60911
60912impl NonEquitySubClassSegmentationCriteria1Code {
60913	pub fn validate(&self) -> Result<(), ValidationError> {
60914		Ok(())
60915	}
60916}
60917
60918
60919// NonEquitySubClassSegmentationCriterion1 ...
60920#[cfg_attr(feature = "derive_debug", derive(Debug))]
60921#[cfg_attr(feature = "derive_default", derive(Default))]
60922#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60923#[cfg_attr(feature = "derive_clone", derive(Clone))]
60924#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60925pub struct NonEquitySubClassSegmentationCriterion1 {
60926	#[cfg_attr( feature = "derive_serde", serde(rename = "CritNm") )]
60927	pub crit_nm: NonEquitySubClassSegmentationCriteria1Code,
60928	#[cfg_attr( feature = "derive_serde", serde(rename = "CritVal") )]
60929	pub crit_val: String,
60930}
60931
60932impl NonEquitySubClassSegmentationCriterion1 {
60933	pub fn validate(&self) -> Result<(), ValidationError> {
60934		self.crit_nm.validate()?;
60935		if self.crit_val.chars().count() < 1 {
60936			return Err(ValidationError::new(1001, "crit_val is shorter than the minimum length of 1".to_string()));
60937		}
60938		if self.crit_val.chars().count() > 1000 {
60939			return Err(ValidationError::new(1002, "crit_val exceeds the maximum length of 1000".to_string()));
60940		}
60941		Ok(())
60942	}
60943}
60944
60945
60946// NonFinancialInstitutionSector10 ...
60947#[cfg_attr(feature = "derive_debug", derive(Debug))]
60948#[cfg_attr(feature = "derive_default", derive(Default))]
60949#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60950#[cfg_attr(feature = "derive_clone", derive(Clone))]
60951#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60952pub struct NonFinancialInstitutionSector10 {
60953	#[cfg_attr( feature = "derive_serde", serde(rename = "Sctr") )]
60954	pub sctr: Vec<GenericIdentification175>,
60955	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrThrshld", skip_serializing_if = "Option::is_none") )]
60956	pub clr_thrshld: Option<bool>,
60957	#[cfg_attr( feature = "derive_serde", serde(rename = "DrctlyLkdActvty", skip_serializing_if = "Option::is_none") )]
60958	pub drctly_lkd_actvty: Option<bool>,
60959	#[cfg_attr( feature = "derive_serde", serde(rename = "FdrlInstn", skip_serializing_if = "Option::is_none") )]
60960	pub fdrl_instn: Option<bool>,
60961}
60962
60963impl NonFinancialInstitutionSector10 {
60964	pub fn validate(&self) -> Result<(), ValidationError> {
60965		for item in &self.sctr { item.validate()? }
60966		Ok(())
60967	}
60968}
60969
60970
60971// NonFinancialPartySector1Code ...
60972#[cfg_attr(feature = "derive_debug", derive(Debug))]
60973#[cfg_attr(feature = "derive_default", derive(Default))]
60974#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
60975#[cfg_attr(feature = "derive_clone", derive(Clone))]
60976#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
60977pub enum NonFinancialPartySector1Code {
60978	#[cfg_attr(feature = "derive_default", default)]
60979	#[cfg_attr( feature = "derive_serde", serde(rename = "WTER") )]
60980	CodeWTER,
60981	#[cfg_attr( feature = "derive_serde", serde(rename = "MING") )]
60982	CodeMING,
60983	#[cfg_attr( feature = "derive_serde", serde(rename = "MAFG") )]
60984	CodeMAFG,
60985	#[cfg_attr( feature = "derive_serde", serde(rename = "SPLY") )]
60986	CodeSPLY,
60987	#[cfg_attr( feature = "derive_serde", serde(rename = "CSTR") )]
60988	CodeCSTR,
60989	#[cfg_attr( feature = "derive_serde", serde(rename = "AGRI") )]
60990	CodeAGRI,
60991	#[cfg_attr( feature = "derive_serde", serde(rename = "ACAF") )]
60992	CodeACAF,
60993	#[cfg_attr( feature = "derive_serde", serde(rename = "EDUC") )]
60994	CodeEDUC,
60995	#[cfg_attr( feature = "derive_serde", serde(rename = "AEAR") )]
60996	CodeAEAR,
60997	#[cfg_attr( feature = "derive_serde", serde(rename = "FINA") )]
60998	CodeFINA,
60999	#[cfg_attr( feature = "derive_serde", serde(rename = "HHSW") )]
61000	CodeHHSW,
61001	#[cfg_attr( feature = "derive_serde", serde(rename = "INCO") )]
61002	CodeINCO,
61003	#[cfg_attr( feature = "derive_serde", serde(rename = "WRRM") )]
61004	CodeWRRM,
61005	#[cfg_attr( feature = "derive_serde", serde(rename = "OTSA") )]
61006	CodeOTSA,
61007	#[cfg_attr( feature = "derive_serde", serde(rename = "PSTA") )]
61008	CodePSTA,
61009	#[cfg_attr( feature = "derive_serde", serde(rename = "PADS") )]
61010	CodePADS,
61011	#[cfg_attr( feature = "derive_serde", serde(rename = "RESA") )]
61012	CodeRESA,
61013	#[cfg_attr( feature = "derive_serde", serde(rename = "TRAS") )]
61014	CodeTRAS,
61015	#[cfg_attr( feature = "derive_serde", serde(rename = "ASSA") )]
61016	CodeASSA,
61017	#[cfg_attr( feature = "derive_serde", serde(rename = "AHAE") )]
61018	CodeAHAE,
61019	#[cfg_attr( feature = "derive_serde", serde(rename = "AEOB") )]
61020	CodeAEOB,
61021}
61022
61023impl NonFinancialPartySector1Code {
61024	pub fn validate(&self) -> Result<(), ValidationError> {
61025		Ok(())
61026	}
61027}
61028
61029
61030// NonTradingDayReason1Code ...
61031#[cfg_attr(feature = "derive_debug", derive(Debug))]
61032#[cfg_attr(feature = "derive_default", derive(Default))]
61033#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61034#[cfg_attr(feature = "derive_clone", derive(Clone))]
61035#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61036pub enum NonTradingDayReason1Code {
61037	#[cfg_attr(feature = "derive_default", default)]
61038	#[cfg_attr( feature = "derive_serde", serde(rename = "THOL") )]
61039	CodeTHOL,
61040	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
61041	CodeOTHR,
61042	#[cfg_attr( feature = "derive_serde", serde(rename = "HALF") )]
61043	CodeHALF,
61044	#[cfg_attr( feature = "derive_serde", serde(rename = "PHOL") )]
61045	CodePHOL,
61046	#[cfg_attr( feature = "derive_serde", serde(rename = "BHOL") )]
61047	CodeBHOL,
61048	#[cfg_attr( feature = "derive_serde", serde(rename = "WKND") )]
61049	CodeWKND,
61050}
61051
61052impl NonTradingDayReason1Code {
61053	pub fn validate(&self) -> Result<(), ValidationError> {
61054		Ok(())
61055	}
61056}
61057
61058
61059// NotApplicable1Code ...
61060#[cfg_attr(feature = "derive_debug", derive(Debug))]
61061#[cfg_attr(feature = "derive_default", derive(Default))]
61062#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61063#[cfg_attr(feature = "derive_clone", derive(Clone))]
61064#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61065pub enum NotApplicable1Code {
61066	#[cfg_attr(feature = "derive_default", default)]
61067	#[cfg_attr( feature = "derive_serde", serde(rename = "NOAP") )]
61068	CodeNOAP,
61069}
61070
61071impl NotApplicable1Code {
61072	pub fn validate(&self) -> Result<(), ValidationError> {
61073		Ok(())
61074	}
61075}
61076
61077
61078// NotAvailable1Code ...
61079#[cfg_attr(feature = "derive_debug", derive(Debug))]
61080#[cfg_attr(feature = "derive_default", derive(Default))]
61081#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61082#[cfg_attr(feature = "derive_clone", derive(Clone))]
61083#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61084pub enum NotAvailable1Code {
61085	#[cfg_attr(feature = "derive_default", default)]
61086	#[cfg_attr( feature = "derive_serde", serde(rename = "NTAV") )]
61087	CodeNTAV,
61088}
61089
61090impl NotAvailable1Code {
61091	pub fn validate(&self) -> Result<(), ValidationError> {
61092		Ok(())
61093	}
61094}
61095
61096
61097// NotReported1Code ...
61098#[cfg_attr(feature = "derive_debug", derive(Debug))]
61099#[cfg_attr(feature = "derive_default", derive(Default))]
61100#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61101#[cfg_attr(feature = "derive_clone", derive(Clone))]
61102#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61103pub enum NotReported1Code {
61104	#[cfg_attr(feature = "derive_default", default)]
61105	#[cfg_attr( feature = "derive_serde", serde(rename = "NORP") )]
61106	CodeNORP,
61107}
61108
61109impl NotReported1Code {
61110	pub fn validate(&self) -> Result<(), ValidationError> {
61111		Ok(())
61112	}
61113}
61114
61115
61116// Notification2 ...
61117#[cfg_attr(feature = "derive_debug", derive(Debug))]
61118#[cfg_attr(feature = "derive_default", derive(Default))]
61119#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61120#[cfg_attr(feature = "derive_clone", derive(Clone))]
61121#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61122pub struct Notification2 {
61123	#[cfg_attr( feature = "derive_serde", serde(rename = "NtfctnTp") )]
61124	pub ntfctn_tp: String,
61125	#[cfg_attr( feature = "derive_serde", serde(rename = "Reqrd") )]
61126	pub reqrd: bool,
61127	#[cfg_attr( feature = "derive_serde", serde(rename = "DstrbtnTp", skip_serializing_if = "Option::is_none") )]
61128	pub dstrbtn_tp: Option<InformationDistribution1Choice>,
61129}
61130
61131impl Notification2 {
61132	pub fn validate(&self) -> Result<(), ValidationError> {
61133		if self.ntfctn_tp.chars().count() < 1 {
61134			return Err(ValidationError::new(1001, "ntfctn_tp is shorter than the minimum length of 1".to_string()));
61135		}
61136		if self.ntfctn_tp.chars().count() > 35 {
61137			return Err(ValidationError::new(1002, "ntfctn_tp exceeds the maximum length of 35".to_string()));
61138		}
61139		if let Some(ref val) = self.dstrbtn_tp { val.validate()? }
61140		Ok(())
61141	}
61142}
61143
61144
61145// NotificationCancellationReason1Choice ...
61146#[cfg_attr(feature = "derive_debug", derive(Debug))]
61147#[cfg_attr(feature = "derive_default", derive(Default))]
61148#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61149#[cfg_attr(feature = "derive_clone", derive(Clone))]
61150#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61151pub struct NotificationCancellationReason1Choice {
61152	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
61153	pub cd: Option<String>,
61154	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
61155	pub prtry: Option<String>,
61156}
61157
61158impl NotificationCancellationReason1Choice {
61159	pub fn validate(&self) -> Result<(), ValidationError> {
61160		if let Some(ref val) = self.cd {
61161			if val.chars().count() < 1 {
61162				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
61163			}
61164			if val.chars().count() > 4 {
61165				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
61166			}
61167		}
61168		if let Some(ref val) = self.prtry {
61169			if val.chars().count() < 1 {
61170				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
61171			}
61172			if val.chars().count() > 35 {
61173				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
61174			}
61175		}
61176		Ok(())
61177	}
61178}
61179
61180
61181// NotificationCancellationReason2 ...
61182#[cfg_attr(feature = "derive_debug", derive(Debug))]
61183#[cfg_attr(feature = "derive_default", derive(Default))]
61184#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61185#[cfg_attr(feature = "derive_clone", derive(Clone))]
61186#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61187pub struct NotificationCancellationReason2 {
61188	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
61189	pub orgtr: Option<PartyIdentification272>,
61190	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
61191	pub rsn: Option<NotificationCancellationReason1Choice>,
61192	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
61193	pub addtl_inf: Option<Vec<String>>,
61194}
61195
61196impl NotificationCancellationReason2 {
61197	pub fn validate(&self) -> Result<(), ValidationError> {
61198		if let Some(ref val) = self.orgtr { val.validate()? }
61199		if let Some(ref val) = self.rsn { val.validate()? }
61200		if let Some(ref vec) = self.addtl_inf {
61201			for item in vec {
61202				if item.chars().count() < 1 {
61203					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
61204				}
61205				if item.chars().count() > 105 {
61206					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
61207				}
61208			}
61209		}
61210		Ok(())
61211	}
61212}
61213
61214
61215// NotificationItem9 ...
61216#[cfg_attr(feature = "derive_debug", derive(Debug))]
61217#[cfg_attr(feature = "derive_default", derive(Default))]
61218#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61219#[cfg_attr(feature = "derive_clone", derive(Clone))]
61220#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61221pub struct NotificationItem9 {
61222	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
61223	pub id: String,
61224	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId", skip_serializing_if = "Option::is_none") )]
61225	pub end_to_end_id: Option<String>,
61226	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
61227	pub uetr: Option<String>,
61228	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
61229	pub acct: Option<CashAccount40>,
61230	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
61231	pub acct_ownr: Option<Party50Choice>,
61232	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
61233	pub acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
61234	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdAcct", skip_serializing_if = "Option::is_none") )]
61235	pub rltd_acct: Option<CashAccount40>,
61236	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
61237	pub amt: ActiveOrHistoricCurrencyAndAmount,
61238	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdValDt", skip_serializing_if = "Option::is_none") )]
61239	pub xpctd_val_dt: Option<String>,
61240	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
61241	pub dbtr: Option<Party50Choice>,
61242	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
61243	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
61244	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt", skip_serializing_if = "Option::is_none") )]
61245	pub intrmy_agt: Option<BranchAndFinancialInstitutionIdentification8>,
61246	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
61247	pub purp: Option<Purpose2Choice>,
61248	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdRmtInf", skip_serializing_if = "Option::is_none") )]
61249	pub rltd_rmt_inf: Option<RemittanceLocation8>,
61250	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
61251	pub rmt_inf: Option<RemittanceInformation22>,
61252	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygAllcn", skip_serializing_if = "Option::is_none") )]
61253	pub undrlyg_allcn: Option<Vec<TransactionAllocation1>>,
61254}
61255
61256impl NotificationItem9 {
61257	pub fn validate(&self) -> Result<(), ValidationError> {
61258		if self.id.chars().count() < 1 {
61259			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
61260		}
61261		if self.id.chars().count() > 35 {
61262			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
61263		}
61264		if let Some(ref val) = self.end_to_end_id {
61265			if val.chars().count() < 1 {
61266				return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
61267			}
61268			if val.chars().count() > 35 {
61269				return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
61270			}
61271		}
61272		if let Some(ref val) = self.uetr {
61273			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
61274			if !pattern.is_match(val) {
61275				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
61276			}
61277		}
61278		if let Some(ref val) = self.acct { val.validate()? }
61279		if let Some(ref val) = self.acct_ownr { val.validate()? }
61280		if let Some(ref val) = self.acct_svcr { val.validate()? }
61281		if let Some(ref val) = self.rltd_acct { val.validate()? }
61282		self.amt.validate()?;
61283		if let Some(ref val) = self.dbtr { val.validate()? }
61284		if let Some(ref val) = self.dbtr_agt { val.validate()? }
61285		if let Some(ref val) = self.intrmy_agt { val.validate()? }
61286		if let Some(ref val) = self.purp { val.validate()? }
61287		if let Some(ref val) = self.rltd_rmt_inf { val.validate()? }
61288		if let Some(ref val) = self.rmt_inf { val.validate()? }
61289		if let Some(ref vec) = self.undrlyg_allcn { for item in vec { item.validate()? } }
61290		Ok(())
61291	}
61292}
61293
61294
61295// NotificationLocationData1 ...
61296#[cfg_attr(feature = "derive_debug", derive(Debug))]
61297#[cfg_attr(feature = "derive_default", derive(Default))]
61298#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61299#[cfg_attr(feature = "derive_clone", derive(Clone))]
61300#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61301pub struct NotificationLocationData1 {
61302	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtd") )]
61303	pub mtd: InvestigationLocationMethod1Code,
61304	#[cfg_attr( feature = "derive_serde", serde(rename = "ElctrncAdr", skip_serializing_if = "Option::is_none") )]
61305	pub elctrnc_adr: Option<String>,
61306	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
61307	pub pstl_adr: Option<NameAndAddress18>,
61308}
61309
61310impl NotificationLocationData1 {
61311	pub fn validate(&self) -> Result<(), ValidationError> {
61312		self.mtd.validate()?;
61313		if let Some(ref val) = self.elctrnc_adr {
61314			if val.chars().count() < 1 {
61315				return Err(ValidationError::new(1001, "elctrnc_adr is shorter than the minimum length of 1".to_string()));
61316			}
61317			if val.chars().count() > 2048 {
61318				return Err(ValidationError::new(1002, "elctrnc_adr exceeds the maximum length of 2048".to_string()));
61319			}
61320		}
61321		if let Some(ref val) = self.pstl_adr { val.validate()? }
61322		Ok(())
61323	}
61324}
61325
61326
61327// NotificationStatus3Code ...
61328#[cfg_attr(feature = "derive_debug", derive(Debug))]
61329#[cfg_attr(feature = "derive_default", derive(Default))]
61330#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61331#[cfg_attr(feature = "derive_clone", derive(Clone))]
61332#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61333pub enum NotificationStatus3Code {
61334	#[cfg_attr(feature = "derive_default", default)]
61335	#[cfg_attr( feature = "derive_serde", serde(rename = "RCBD") )]
61336	CodeRCBD,
61337	#[cfg_attr( feature = "derive_serde", serde(rename = "RCVD") )]
61338	CodeRCVD,
61339	#[cfg_attr( feature = "derive_serde", serde(rename = "NRCD") )]
61340	CodeNRCD,
61341}
61342
61343impl NotificationStatus3Code {
61344	pub fn validate(&self) -> Result<(), ValidationError> {
61345		Ok(())
61346	}
61347}
61348
61349
61350// NotificationSubType1Choice ...
61351#[cfg_attr(feature = "derive_debug", derive(Debug))]
61352#[cfg_attr(feature = "derive_default", derive(Default))]
61353#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61354#[cfg_attr(feature = "derive_clone", derive(Clone))]
61355#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61356pub struct NotificationSubType1Choice {
61357	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
61358	pub cd: Option<String>,
61359	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
61360	pub prtry: Option<String>,
61361}
61362
61363impl NotificationSubType1Choice {
61364	pub fn validate(&self) -> Result<(), ValidationError> {
61365		if let Some(ref val) = self.prtry {
61366			if val.chars().count() < 1 {
61367				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
61368			}
61369			if val.chars().count() > 35 {
61370				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
61371			}
61372		}
61373		Ok(())
61374	}
61375}
61376
61377
61378// NotificationType1Choice ...
61379#[cfg_attr(feature = "derive_debug", derive(Debug))]
61380#[cfg_attr(feature = "derive_default", derive(Default))]
61381#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61382#[cfg_attr(feature = "derive_clone", derive(Clone))]
61383#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61384pub struct NotificationType1Choice {
61385	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
61386	pub cd: Option<String>,
61387	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
61388	pub prtry: Option<String>,
61389}
61390
61391impl NotificationType1Choice {
61392	pub fn validate(&self) -> Result<(), ValidationError> {
61393		if let Some(ref val) = self.cd {
61394			if val.chars().count() < 1 {
61395				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
61396			}
61397			if val.chars().count() > 4 {
61398				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
61399			}
61400		}
61401		if let Some(ref val) = self.prtry {
61402			if val.chars().count() < 1 {
61403				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
61404			}
61405			if val.chars().count() > 35 {
61406				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
61407			}
61408		}
61409		Ok(())
61410	}
61411}
61412
61413
61414// NotionalAmount5 ...
61415#[cfg_attr(feature = "derive_debug", derive(Debug))]
61416#[cfg_attr(feature = "derive_default", derive(Default))]
61417#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61418#[cfg_attr(feature = "derive_clone", derive(Clone))]
61419#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61420pub struct NotionalAmount5 {
61421	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
61422	pub amt: Option<AmountAndDirection106>,
61423	#[cfg_attr( feature = "derive_serde", serde(rename = "SchdlPrd", skip_serializing_if = "Option::is_none") )]
61424	pub schdl_prd: Option<Vec<Schedule11>>,
61425}
61426
61427impl NotionalAmount5 {
61428	pub fn validate(&self) -> Result<(), ValidationError> {
61429		if let Some(ref val) = self.amt { val.validate()? }
61430		if let Some(ref vec) = self.schdl_prd { for item in vec { item.validate()? } }
61431		Ok(())
61432	}
61433}
61434
61435
61436// NotionalAmount6 ...
61437#[cfg_attr(feature = "derive_debug", derive(Debug))]
61438#[cfg_attr(feature = "derive_default", derive(Default))]
61439#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61440#[cfg_attr(feature = "derive_clone", derive(Clone))]
61441#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61442pub struct NotionalAmount6 {
61443	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
61444	pub amt: Option<AmountAndDirection106>,
61445	#[cfg_attr( feature = "derive_serde", serde(rename = "SchdlPrd", skip_serializing_if = "Option::is_none") )]
61446	pub schdl_prd: Option<Vec<Schedule11>>,
61447	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
61448	pub ccy: Option<String>,
61449}
61450
61451impl NotionalAmount6 {
61452	pub fn validate(&self) -> Result<(), ValidationError> {
61453		if let Some(ref val) = self.amt { val.validate()? }
61454		if let Some(ref vec) = self.schdl_prd { for item in vec { item.validate()? } }
61455		if let Some(ref val) = self.ccy {
61456			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
61457			if !pattern.is_match(val) {
61458				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
61459			}
61460		}
61461		Ok(())
61462	}
61463}
61464
61465
61466// NotionalAmount7 ...
61467#[cfg_attr(feature = "derive_debug", derive(Debug))]
61468#[cfg_attr(feature = "derive_default", derive(Default))]
61469#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61470#[cfg_attr(feature = "derive_clone", derive(Clone))]
61471#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61472pub struct NotionalAmount7 {
61473	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
61474	pub amt: Option<ActiveOrHistoricCurrencyAnd19DecimalAmount>,
61475	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtInFct", skip_serializing_if = "Option::is_none") )]
61476	pub amt_in_fct: Option<Vec<ActiveOrHistoricCurrencyAnd19DecimalAmount>>,
61477	#[cfg_attr( feature = "derive_serde", serde(rename = "WghtdAvrgDlta", skip_serializing_if = "Option::is_none") )]
61478	pub wghtd_avrg_dlta: Option<f64>,
61479}
61480
61481impl NotionalAmount7 {
61482	pub fn validate(&self) -> Result<(), ValidationError> {
61483		if let Some(ref val) = self.amt { val.validate()? }
61484		if let Some(ref vec) = self.amt_in_fct { for item in vec { item.validate()? } }
61485		Ok(())
61486	}
61487}
61488
61489
61490// NotionalAmountLegs5 ...
61491#[cfg_attr(feature = "derive_debug", derive(Debug))]
61492#[cfg_attr(feature = "derive_default", derive(Default))]
61493#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61494#[cfg_attr(feature = "derive_clone", derive(Clone))]
61495#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61496pub struct NotionalAmountLegs5 {
61497	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstLeg", skip_serializing_if = "Option::is_none") )]
61498	pub frst_leg: Option<NotionalAmount5>,
61499	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndLeg", skip_serializing_if = "Option::is_none") )]
61500	pub scnd_leg: Option<NotionalAmount6>,
61501}
61502
61503impl NotionalAmountLegs5 {
61504	pub fn validate(&self) -> Result<(), ValidationError> {
61505		if let Some(ref val) = self.frst_leg { val.validate()? }
61506		if let Some(ref val) = self.scnd_leg { val.validate()? }
61507		Ok(())
61508	}
61509}
61510
61511
61512// NotionalAmountLegs6 ...
61513#[cfg_attr(feature = "derive_debug", derive(Debug))]
61514#[cfg_attr(feature = "derive_default", derive(Default))]
61515#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61516#[cfg_attr(feature = "derive_clone", derive(Clone))]
61517#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61518pub struct NotionalAmountLegs6 {
61519	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstLeg", skip_serializing_if = "Option::is_none") )]
61520	pub frst_leg: Option<NotionalAmount7>,
61521	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndLeg", skip_serializing_if = "Option::is_none") )]
61522	pub scnd_leg: Option<NotionalAmount7>,
61523}
61524
61525impl NotionalAmountLegs6 {
61526	pub fn validate(&self) -> Result<(), ValidationError> {
61527		if let Some(ref val) = self.frst_leg { val.validate()? }
61528		if let Some(ref val) = self.scnd_leg { val.validate()? }
61529		Ok(())
61530	}
61531}
61532
61533
61534// NotionalOrUnitBased1Choice ...
61535#[cfg_attr(feature = "derive_debug", derive(Debug))]
61536#[cfg_attr(feature = "derive_default", derive(Default))]
61537#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61538#[cfg_attr(feature = "derive_clone", derive(Clone))]
61539#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61540pub struct NotionalOrUnitBased1Choice {
61541	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
61542	pub cd: Option<NotionalOrUnitBased1Code>,
61543	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
61544	pub prtry: Option<GenericIdentification47>,
61545}
61546
61547impl NotionalOrUnitBased1Choice {
61548	pub fn validate(&self) -> Result<(), ValidationError> {
61549		if let Some(ref val) = self.cd { val.validate()? }
61550		if let Some(ref val) = self.prtry { val.validate()? }
61551		Ok(())
61552	}
61553}
61554
61555
61556// NotionalOrUnitBased1Code ...
61557#[cfg_attr(feature = "derive_debug", derive(Debug))]
61558#[cfg_attr(feature = "derive_default", derive(Default))]
61559#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61560#[cfg_attr(feature = "derive_clone", derive(Clone))]
61561#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61562pub enum NotionalOrUnitBased1Code {
61563	#[cfg_attr(feature = "derive_default", default)]
61564	#[cfg_attr( feature = "derive_serde", serde(rename = "UNIT") )]
61565	CodeUNIT,
61566	#[cfg_attr( feature = "derive_serde", serde(rename = "NOTI") )]
61567	CodeNOTI,
61568}
61569
61570impl NotionalOrUnitBased1Code {
61571	pub fn validate(&self) -> Result<(), ValidationError> {
61572		Ok(())
61573	}
61574}
61575
61576
61577// NotionalQuantity9 ...
61578#[cfg_attr(feature = "derive_debug", derive(Debug))]
61579#[cfg_attr(feature = "derive_default", derive(Default))]
61580#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61581#[cfg_attr(feature = "derive_clone", derive(Clone))]
61582#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61583pub struct NotionalQuantity9 {
61584	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlQty", skip_serializing_if = "Option::is_none") )]
61585	pub ttl_qty: Option<f64>,
61586	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitOfMeasr", skip_serializing_if = "Option::is_none") )]
61587	pub unit_of_measr: Option<UnitOfMeasure8Choice>,
61588	#[cfg_attr( feature = "derive_serde", serde(rename = "Dtls", skip_serializing_if = "Option::is_none") )]
61589	pub dtls: Option<QuantityOrTerm1Choice>,
61590}
61591
61592impl NotionalQuantity9 {
61593	pub fn validate(&self) -> Result<(), ValidationError> {
61594		if let Some(ref val) = self.unit_of_measr { val.validate()? }
61595		if let Some(ref val) = self.dtls { val.validate()? }
61596		Ok(())
61597	}
61598}
61599
61600
61601// NotionalQuantityLegs5 ...
61602#[cfg_attr(feature = "derive_debug", derive(Debug))]
61603#[cfg_attr(feature = "derive_default", derive(Default))]
61604#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61605#[cfg_attr(feature = "derive_clone", derive(Clone))]
61606#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61607pub struct NotionalQuantityLegs5 {
61608	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstLeg", skip_serializing_if = "Option::is_none") )]
61609	pub frst_leg: Option<NotionalQuantity9>,
61610	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndLeg", skip_serializing_if = "Option::is_none") )]
61611	pub scnd_leg: Option<NotionalQuantity9>,
61612}
61613
61614impl NotionalQuantityLegs5 {
61615	pub fn validate(&self) -> Result<(), ValidationError> {
61616		if let Some(ref val) = self.frst_leg { val.validate()? }
61617		if let Some(ref val) = self.scnd_leg { val.validate()? }
61618		Ok(())
61619	}
61620}
61621
61622
61623// NovationStatus1Code ...
61624#[cfg_attr(feature = "derive_debug", derive(Debug))]
61625#[cfg_attr(feature = "derive_default", derive(Default))]
61626#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61627#[cfg_attr(feature = "derive_clone", derive(Clone))]
61628#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61629pub enum NovationStatus1Code {
61630	#[cfg_attr(feature = "derive_default", default)]
61631	#[cfg_attr( feature = "derive_serde", serde(rename = "NONO") )]
61632	CodeNONO,
61633	#[cfg_attr( feature = "derive_serde", serde(rename = "NOVA") )]
61634	CodeNOVA,
61635}
61636
61637impl NovationStatus1Code {
61638	pub fn validate(&self) -> Result<(), ValidationError> {
61639		Ok(())
61640	}
61641}
61642
61643
61644// Number3Choice ...
61645#[cfg_attr(feature = "derive_debug", derive(Debug))]
61646#[cfg_attr(feature = "derive_default", derive(Default))]
61647#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61648#[cfg_attr(feature = "derive_clone", derive(Clone))]
61649#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61650pub struct Number3Choice {
61651	#[cfg_attr( feature = "derive_serde", serde(rename = "Shrt", skip_serializing_if = "Option::is_none") )]
61652	pub shrt: Option<String>,
61653	#[cfg_attr( feature = "derive_serde", serde(rename = "Lng", skip_serializing_if = "Option::is_none") )]
61654	pub lng: Option<String>,
61655}
61656
61657impl Number3Choice {
61658	pub fn validate(&self) -> Result<(), ValidationError> {
61659		if let Some(ref val) = self.shrt {
61660			let pattern = Regex::new("[0-9]{3}").unwrap();
61661			if !pattern.is_match(val) {
61662				return Err(ValidationError::new(1005, "shrt does not match the required pattern".to_string()));
61663			}
61664		}
61665		if let Some(ref val) = self.lng {
61666			let pattern = Regex::new("[0-9]{5}").unwrap();
61667			if !pattern.is_match(val) {
61668				return Err(ValidationError::new(1005, "lng does not match the required pattern".to_string()));
61669			}
61670		}
61671		Ok(())
61672	}
61673}
61674
61675
61676// NumberAndSumOfTransactions1 ...
61677#[cfg_attr(feature = "derive_debug", derive(Debug))]
61678#[cfg_attr(feature = "derive_default", derive(Default))]
61679#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61680#[cfg_attr(feature = "derive_clone", derive(Clone))]
61681#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61682pub struct NumberAndSumOfTransactions1 {
61683	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfNtries", skip_serializing_if = "Option::is_none") )]
61684	pub nb_of_ntries: Option<String>,
61685	#[cfg_attr( feature = "derive_serde", serde(rename = "Sum", skip_serializing_if = "Option::is_none") )]
61686	pub sum: Option<f64>,
61687}
61688
61689impl NumberAndSumOfTransactions1 {
61690	pub fn validate(&self) -> Result<(), ValidationError> {
61691		if let Some(ref val) = self.nb_of_ntries {
61692			let pattern = Regex::new("[0-9]{1,15}").unwrap();
61693			if !pattern.is_match(val) {
61694				return Err(ValidationError::new(1005, "nb_of_ntries does not match the required pattern".to_string()));
61695			}
61696		}
61697		Ok(())
61698	}
61699}
61700
61701
61702// NumberAndSumOfTransactions2 ...
61703#[cfg_attr(feature = "derive_debug", derive(Debug))]
61704#[cfg_attr(feature = "derive_default", derive(Default))]
61705#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61706#[cfg_attr(feature = "derive_clone", derive(Clone))]
61707#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61708pub struct NumberAndSumOfTransactions2 {
61709	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfNtries", skip_serializing_if = "Option::is_none") )]
61710	pub nb_of_ntries: Option<String>,
61711	#[cfg_attr( feature = "derive_serde", serde(rename = "Sum", skip_serializing_if = "Option::is_none") )]
61712	pub sum: Option<f64>,
61713	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNetNtryAmt", skip_serializing_if = "Option::is_none") )]
61714	pub ttl_net_ntry_amt: Option<f64>,
61715	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
61716	pub cdt_dbt_ind: Option<CreditDebitCode>,
61717}
61718
61719impl NumberAndSumOfTransactions2 {
61720	pub fn validate(&self) -> Result<(), ValidationError> {
61721		if let Some(ref val) = self.nb_of_ntries {
61722			let pattern = Regex::new("[0-9]{1,15}").unwrap();
61723			if !pattern.is_match(val) {
61724				return Err(ValidationError::new(1005, "nb_of_ntries does not match the required pattern".to_string()));
61725			}
61726		}
61727		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
61728		Ok(())
61729	}
61730}
61731
61732
61733// NumberAndSumOfTransactions4 ...
61734#[cfg_attr(feature = "derive_debug", derive(Debug))]
61735#[cfg_attr(feature = "derive_default", derive(Default))]
61736#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61737#[cfg_attr(feature = "derive_clone", derive(Clone))]
61738#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61739pub struct NumberAndSumOfTransactions4 {
61740	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfNtries", skip_serializing_if = "Option::is_none") )]
61741	pub nb_of_ntries: Option<String>,
61742	#[cfg_attr( feature = "derive_serde", serde(rename = "Sum", skip_serializing_if = "Option::is_none") )]
61743	pub sum: Option<f64>,
61744	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNetNtry", skip_serializing_if = "Option::is_none") )]
61745	pub ttl_net_ntry: Option<AmountAndDirection35>,
61746}
61747
61748impl NumberAndSumOfTransactions4 {
61749	pub fn validate(&self) -> Result<(), ValidationError> {
61750		if let Some(ref val) = self.nb_of_ntries {
61751			let pattern = Regex::new("[0-9]{1,15}").unwrap();
61752			if !pattern.is_match(val) {
61753				return Err(ValidationError::new(1005, "nb_of_ntries does not match the required pattern".to_string()));
61754			}
61755		}
61756		if let Some(ref val) = self.ttl_net_ntry { val.validate()? }
61757		Ok(())
61758	}
61759}
61760
61761
61762// NumberAndVolume2 ...
61763#[cfg_attr(feature = "derive_debug", derive(Debug))]
61764#[cfg_attr(feature = "derive_default", derive(Default))]
61765#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61766#[cfg_attr(feature = "derive_clone", derive(Clone))]
61767#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61768pub struct NumberAndVolume2 {
61769	#[cfg_attr( feature = "derive_serde", serde(rename = "Nb") )]
61770	pub nb: f64,
61771	#[cfg_attr( feature = "derive_serde", serde(rename = "Vol") )]
61772	pub vol: ActiveOrHistoricCurrencyAndAmount,
61773}
61774
61775impl NumberAndVolume2 {
61776	pub fn validate(&self) -> Result<(), ValidationError> {
61777		self.vol.validate()?;
61778		Ok(())
61779	}
61780}
61781
61782
61783// NumberCount1Choice ...
61784#[cfg_attr(feature = "derive_debug", derive(Debug))]
61785#[cfg_attr(feature = "derive_default", derive(Default))]
61786#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61787#[cfg_attr(feature = "derive_clone", derive(Clone))]
61788#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61789pub struct NumberCount1Choice {
61790	#[cfg_attr( feature = "derive_serde", serde(rename = "CurInstrNb", skip_serializing_if = "Option::is_none") )]
61791	pub cur_instr_nb: Option<String>,
61792	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNb", skip_serializing_if = "Option::is_none") )]
61793	pub ttl_nb: Option<TotalNumber1>,
61794}
61795
61796impl NumberCount1Choice {
61797	pub fn validate(&self) -> Result<(), ValidationError> {
61798		if let Some(ref val) = self.cur_instr_nb {
61799			let pattern = Regex::new("[0-9]{3}").unwrap();
61800			if !pattern.is_match(val) {
61801				return Err(ValidationError::new(1005, "cur_instr_nb does not match the required pattern".to_string()));
61802			}
61803		}
61804		if let Some(ref val) = self.ttl_nb { val.validate()? }
61805		Ok(())
61806	}
61807}
61808
61809
61810// NumberModification1 ...
61811#[cfg_attr(feature = "derive_debug", derive(Debug))]
61812#[cfg_attr(feature = "derive_default", derive(Default))]
61813#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61814#[cfg_attr(feature = "derive_clone", derive(Clone))]
61815#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61816pub struct NumberModification1 {
61817	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
61818	pub mod_cd: Option<Modification1Code>,
61819	#[cfg_attr( feature = "derive_serde", serde(rename = "Nb") )]
61820	pub nb: String,
61821}
61822
61823impl NumberModification1 {
61824	pub fn validate(&self) -> Result<(), ValidationError> {
61825		if let Some(ref val) = self.mod_cd { val.validate()? }
61826		let pattern = Regex::new("[0-9]{1,5}").unwrap();
61827		if !pattern.is_match(&self.nb) {
61828			return Err(ValidationError::new(1005, "nb does not match the required pattern".to_string()));
61829		}
61830		Ok(())
61831	}
61832}
61833
61834
61835// NumberOfCancellationsPerStatus1 ...
61836#[cfg_attr(feature = "derive_debug", derive(Debug))]
61837#[cfg_attr(feature = "derive_default", derive(Default))]
61838#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61839#[cfg_attr(feature = "derive_clone", derive(Clone))]
61840#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61841pub struct NumberOfCancellationsPerStatus1 {
61842	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldNbOfTxs") )]
61843	pub dtld_nb_of_txs: String,
61844	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldSts") )]
61845	pub dtld_sts: CancellationIndividualStatus1Code,
61846	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldCtrlSum", skip_serializing_if = "Option::is_none") )]
61847	pub dtld_ctrl_sum: Option<f64>,
61848}
61849
61850impl NumberOfCancellationsPerStatus1 {
61851	pub fn validate(&self) -> Result<(), ValidationError> {
61852		let pattern = Regex::new("[0-9]{1,15}").unwrap();
61853		if !pattern.is_match(&self.dtld_nb_of_txs) {
61854			return Err(ValidationError::new(1005, "dtld_nb_of_txs does not match the required pattern".to_string()));
61855		}
61856		self.dtld_sts.validate()?;
61857		Ok(())
61858	}
61859}
61860
61861
61862// NumberOfRecordsPerStatus1 ...
61863#[cfg_attr(feature = "derive_debug", derive(Debug))]
61864#[cfg_attr(feature = "derive_default", derive(Default))]
61865#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61866#[cfg_attr(feature = "derive_clone", derive(Clone))]
61867#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61868pub struct NumberOfRecordsPerStatus1 {
61869	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldNbOfRcrds") )]
61870	pub dtld_nb_of_rcrds: String,
61871	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldSts") )]
61872	pub dtld_sts: ReportingRecordStatus1Code,
61873}
61874
61875impl NumberOfRecordsPerStatus1 {
61876	pub fn validate(&self) -> Result<(), ValidationError> {
61877		let pattern = Regex::new("[0-9]{1,15}").unwrap();
61878		if !pattern.is_match(&self.dtld_nb_of_rcrds) {
61879			return Err(ValidationError::new(1005, "dtld_nb_of_rcrds does not match the required pattern".to_string()));
61880		}
61881		self.dtld_sts.validate()?;
61882		Ok(())
61883	}
61884}
61885
61886
61887// NumberOfReportsPerStatus4 ...
61888#[cfg_attr(feature = "derive_debug", derive(Debug))]
61889#[cfg_attr(feature = "derive_default", derive(Default))]
61890#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61891#[cfg_attr(feature = "derive_clone", derive(Clone))]
61892#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61893pub struct NumberOfReportsPerStatus4 {
61894	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldNbOfRpts") )]
61895	pub dtld_nb_of_rpts: String,
61896	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldSts") )]
61897	pub dtld_sts: PairedReconciled3Code,
61898}
61899
61900impl NumberOfReportsPerStatus4 {
61901	pub fn validate(&self) -> Result<(), ValidationError> {
61902		let pattern = Regex::new("[0-9]{1,15}").unwrap();
61903		if !pattern.is_match(&self.dtld_nb_of_rpts) {
61904			return Err(ValidationError::new(1005, "dtld_nb_of_rpts does not match the required pattern".to_string()));
61905		}
61906		self.dtld_sts.validate()?;
61907		Ok(())
61908	}
61909}
61910
61911
61912// NumberOfTransactionsPerStatus1 ...
61913#[cfg_attr(feature = "derive_debug", derive(Debug))]
61914#[cfg_attr(feature = "derive_default", derive(Default))]
61915#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61916#[cfg_attr(feature = "derive_clone", derive(Clone))]
61917#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61918pub struct NumberOfTransactionsPerStatus1 {
61919	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldNbOfTxs") )]
61920	pub dtld_nb_of_txs: String,
61921	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldSts") )]
61922	pub dtld_sts: TransactionIndividualStatus1Code,
61923	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldCtrlSum", skip_serializing_if = "Option::is_none") )]
61924	pub dtld_ctrl_sum: Option<f64>,
61925}
61926
61927impl NumberOfTransactionsPerStatus1 {
61928	pub fn validate(&self) -> Result<(), ValidationError> {
61929		let pattern = Regex::new("[0-9]{1,15}").unwrap();
61930		if !pattern.is_match(&self.dtld_nb_of_txs) {
61931			return Err(ValidationError::new(1005, "dtld_nb_of_txs does not match the required pattern".to_string()));
61932		}
61933		self.dtld_sts.validate()?;
61934		Ok(())
61935	}
61936}
61937
61938
61939// NumberOfTransactionsPerStatus5 ...
61940#[cfg_attr(feature = "derive_debug", derive(Debug))]
61941#[cfg_attr(feature = "derive_default", derive(Default))]
61942#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61943#[cfg_attr(feature = "derive_clone", derive(Clone))]
61944#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61945pub struct NumberOfTransactionsPerStatus5 {
61946	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldNbOfTxs") )]
61947	pub dtld_nb_of_txs: String,
61948	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldSts") )]
61949	pub dtld_sts: String,
61950	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldCtrlSum", skip_serializing_if = "Option::is_none") )]
61951	pub dtld_ctrl_sum: Option<f64>,
61952}
61953
61954impl NumberOfTransactionsPerStatus5 {
61955	pub fn validate(&self) -> Result<(), ValidationError> {
61956		let pattern = Regex::new("[0-9]{1,15}").unwrap();
61957		if !pattern.is_match(&self.dtld_nb_of_txs) {
61958			return Err(ValidationError::new(1005, "dtld_nb_of_txs does not match the required pattern".to_string()));
61959		}
61960		if self.dtld_sts.chars().count() < 1 {
61961			return Err(ValidationError::new(1001, "dtld_sts is shorter than the minimum length of 1".to_string()));
61962		}
61963		if self.dtld_sts.chars().count() > 4 {
61964			return Err(ValidationError::new(1002, "dtld_sts exceeds the maximum length of 4".to_string()));
61965		}
61966		Ok(())
61967	}
61968}
61969
61970
61971// NumberOfTransactionsPerValidationRule5 ...
61972#[cfg_attr(feature = "derive_debug", derive(Debug))]
61973#[cfg_attr(feature = "derive_default", derive(Default))]
61974#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
61975#[cfg_attr(feature = "derive_clone", derive(Clone))]
61976#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
61977pub struct NumberOfTransactionsPerValidationRule5 {
61978	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldNb") )]
61979	pub dtld_nb: String,
61980	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSts") )]
61981	pub rpt_sts: Vec<RejectionReason45>,
61982}
61983
61984impl NumberOfTransactionsPerValidationRule5 {
61985	pub fn validate(&self) -> Result<(), ValidationError> {
61986		let pattern = Regex::new("[0-9]{1,15}").unwrap();
61987		if !pattern.is_match(&self.dtld_nb) {
61988			return Err(ValidationError::new(1005, "dtld_nb does not match the required pattern".to_string()));
61989		}
61990		for item in &self.rpt_sts { item.validate()? }
61991		Ok(())
61992	}
61993}
61994
61995
61996// NumberOfTransactionsPerValidationRule6 ...
61997#[cfg_attr(feature = "derive_debug", derive(Debug))]
61998#[cfg_attr(feature = "derive_default", derive(Default))]
61999#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62000#[cfg_attr(feature = "derive_clone", derive(Clone))]
62001#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62002pub struct NumberOfTransactionsPerValidationRule6 {
62003	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldNb") )]
62004	pub dtld_nb: String,
62005	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSts") )]
62006	pub rpt_sts: Vec<RejectionReason70>,
62007}
62008
62009impl NumberOfTransactionsPerValidationRule6 {
62010	pub fn validate(&self) -> Result<(), ValidationError> {
62011		let pattern = Regex::new("[0-9]{1,15}").unwrap();
62012		if !pattern.is_match(&self.dtld_nb) {
62013			return Err(ValidationError::new(1005, "dtld_nb does not match the required pattern".to_string()));
62014		}
62015		for item in &self.rpt_sts { item.validate()? }
62016		Ok(())
62017	}
62018}
62019
62020
62021// OnLineCapability1Code ...
62022#[cfg_attr(feature = "derive_debug", derive(Debug))]
62023#[cfg_attr(feature = "derive_default", derive(Default))]
62024#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62025#[cfg_attr(feature = "derive_clone", derive(Clone))]
62026#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62027pub enum OnLineCapability1Code {
62028	#[cfg_attr(feature = "derive_default", default)]
62029	#[cfg_attr( feature = "derive_serde", serde(rename = "OFLN") )]
62030	CodeOFLN,
62031	#[cfg_attr( feature = "derive_serde", serde(rename = "ONLN") )]
62032	CodeONLN,
62033	#[cfg_attr( feature = "derive_serde", serde(rename = "SMON") )]
62034	CodeSMON,
62035}
62036
62037impl OnLineCapability1Code {
62038	pub fn validate(&self) -> Result<(), ValidationError> {
62039		Ok(())
62040	}
62041}
62042
62043
62044// OpenInterest1 ...
62045#[cfg_attr(feature = "derive_debug", derive(Debug))]
62046#[cfg_attr(feature = "derive_default", derive(Default))]
62047#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62048#[cfg_attr(feature = "derive_clone", derive(Clone))]
62049#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62050pub struct OpenInterest1 {
62051	#[cfg_attr( feature = "derive_serde", serde(rename = "GrssNtnlAmt") )]
62052	pub grss_ntnl_amt: ActiveCurrencyAnd24Amount,
62053	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfLots", skip_serializing_if = "Option::is_none") )]
62054	pub nb_of_lots: Option<f64>,
62055}
62056
62057impl OpenInterest1 {
62058	pub fn validate(&self) -> Result<(), ValidationError> {
62059		self.grss_ntnl_amt.validate()?;
62060		if let Some(ref val) = self.nb_of_lots {
62061			if *val < 1.000000 {
62062				return Err(ValidationError::new(1003, "nb_of_lots is less than the minimum value of 1.000000".to_string()));
62063			}
62064		}
62065		Ok(())
62066	}
62067}
62068
62069
62070// Operation1Code ...
62071#[cfg_attr(feature = "derive_debug", derive(Debug))]
62072#[cfg_attr(feature = "derive_default", derive(Default))]
62073#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62074#[cfg_attr(feature = "derive_clone", derive(Clone))]
62075#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62076pub enum Operation1Code {
62077	#[cfg_attr(feature = "derive_default", default)]
62078	#[cfg_attr( feature = "derive_serde", serde(rename = "TILL") )]
62079	CodeTILL,
62080	#[cfg_attr( feature = "derive_serde", serde(rename = "ORRR") )]
62081	CodeORRR,
62082	#[cfg_attr( feature = "derive_serde", serde(rename = "ANDD") )]
62083	CodeANDD,
62084}
62085
62086impl Operation1Code {
62087	pub fn validate(&self) -> Result<(), ValidationError> {
62088		Ok(())
62089	}
62090}
62091
62092
62093// Operation3Code ...
62094#[cfg_attr(feature = "derive_debug", derive(Debug))]
62095#[cfg_attr(feature = "derive_default", derive(Default))]
62096#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62097#[cfg_attr(feature = "derive_clone", derive(Clone))]
62098#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62099pub enum Operation3Code {
62100	#[cfg_attr(feature = "derive_default", default)]
62101	#[cfg_attr( feature = "derive_serde", serde(rename = "ANDD") )]
62102	CodeANDD,
62103	#[cfg_attr( feature = "derive_serde", serde(rename = "ORRR") )]
62104	CodeORRR,
62105}
62106
62107impl Operation3Code {
62108	pub fn validate(&self) -> Result<(), ValidationError> {
62109		Ok(())
62110	}
62111}
62112
62113
62114// OperationMandate6 ...
62115#[cfg_attr(feature = "derive_debug", derive(Debug))]
62116#[cfg_attr(feature = "derive_default", derive(Default))]
62117#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62118#[cfg_attr(feature = "derive_clone", derive(Clone))]
62119#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62120pub struct OperationMandate6 {
62121	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
62122	pub mod_cd: Option<Modification1Code>,
62123	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
62124	pub id: String,
62125	#[cfg_attr( feature = "derive_serde", serde(rename = "AplblChanl") )]
62126	pub aplbl_chanl: Vec<Channel2Choice>,
62127	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqrdSgntrNb") )]
62128	pub reqrd_sgntr_nb: String,
62129	#[cfg_attr( feature = "derive_serde", serde(rename = "SgntrOrdrInd") )]
62130	pub sgntr_ordr_ind: bool,
62131	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtHldr", skip_serializing_if = "Option::is_none") )]
62132	pub mndt_hldr: Option<Vec<PartyAndAuthorisation6>>,
62133	#[cfg_attr( feature = "derive_serde", serde(rename = "BkOpr") )]
62134	pub bk_opr: Vec<BankTransactionCodeStructure4>,
62135	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
62136	pub start_dt: Option<String>,
62137	#[cfg_attr( feature = "derive_serde", serde(rename = "EndDt", skip_serializing_if = "Option::is_none") )]
62138	pub end_dt: Option<String>,
62139}
62140
62141impl OperationMandate6 {
62142	pub fn validate(&self) -> Result<(), ValidationError> {
62143		if let Some(ref val) = self.mod_cd { val.validate()? }
62144		if self.id.chars().count() < 1 {
62145			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
62146		}
62147		if self.id.chars().count() > 35 {
62148			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
62149		}
62150		for item in &self.aplbl_chanl { item.validate()? }
62151		let pattern = Regex::new("[\\+]{0,1}[0-9]{1,15}").unwrap();
62152		if !pattern.is_match(&self.reqrd_sgntr_nb) {
62153			return Err(ValidationError::new(1005, "reqrd_sgntr_nb does not match the required pattern".to_string()));
62154		}
62155		if let Some(ref vec) = self.mndt_hldr { for item in vec { item.validate()? } }
62156		for item in &self.bk_opr { item.validate()? }
62157		Ok(())
62158	}
62159}
62160
62161
62162// OperationMandate7 ...
62163#[cfg_attr(feature = "derive_debug", derive(Debug))]
62164#[cfg_attr(feature = "derive_default", derive(Default))]
62165#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62166#[cfg_attr(feature = "derive_clone", derive(Clone))]
62167#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62168pub struct OperationMandate7 {
62169	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
62170	pub id: String,
62171	#[cfg_attr( feature = "derive_serde", serde(rename = "AplblChanl") )]
62172	pub aplbl_chanl: Vec<Channel2Choice>,
62173	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqrdSgntrNb") )]
62174	pub reqrd_sgntr_nb: String,
62175	#[cfg_attr( feature = "derive_serde", serde(rename = "SgntrOrdrInd") )]
62176	pub sgntr_ordr_ind: bool,
62177	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtHldr", skip_serializing_if = "Option::is_none") )]
62178	pub mndt_hldr: Option<Vec<PartyAndAuthorisation7>>,
62179	#[cfg_attr( feature = "derive_serde", serde(rename = "BkOpr") )]
62180	pub bk_opr: Vec<BankTransactionCodeStructure4>,
62181	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
62182	pub start_dt: Option<String>,
62183	#[cfg_attr( feature = "derive_serde", serde(rename = "EndDt", skip_serializing_if = "Option::is_none") )]
62184	pub end_dt: Option<String>,
62185}
62186
62187impl OperationMandate7 {
62188	pub fn validate(&self) -> Result<(), ValidationError> {
62189		if self.id.chars().count() < 1 {
62190			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
62191		}
62192		if self.id.chars().count() > 35 {
62193			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
62194		}
62195		for item in &self.aplbl_chanl { item.validate()? }
62196		let pattern = Regex::new("[\\+]{0,1}[0-9]{1,15}").unwrap();
62197		if !pattern.is_match(&self.reqrd_sgntr_nb) {
62198			return Err(ValidationError::new(1005, "reqrd_sgntr_nb does not match the required pattern".to_string()));
62199		}
62200		if let Some(ref vec) = self.mndt_hldr { for item in vec { item.validate()? } }
62201		for item in &self.bk_opr { item.validate()? }
62202		Ok(())
62203	}
62204}
62205
62206
62207// OperationalStatus1Code ...
62208#[cfg_attr(feature = "derive_debug", derive(Debug))]
62209#[cfg_attr(feature = "derive_default", derive(Default))]
62210#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62211#[cfg_attr(feature = "derive_clone", derive(Clone))]
62212#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62213pub enum OperationalStatus1Code {
62214	#[cfg_attr(feature = "derive_default", default)]
62215	#[cfg_attr( feature = "derive_serde", serde(rename = "ENAB") )]
62216	CodeENAB,
62217	#[cfg_attr( feature = "derive_serde", serde(rename = "SPEC") )]
62218	CodeSPEC,
62219}
62220
62221impl OperationalStatus1Code {
62222	pub fn validate(&self) -> Result<(), ValidationError> {
62223		Ok(())
62224	}
62225}
62226
62227
62228// Operator1Code ...
62229#[cfg_attr(feature = "derive_debug", derive(Debug))]
62230#[cfg_attr(feature = "derive_default", derive(Default))]
62231#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62232#[cfg_attr(feature = "derive_clone", derive(Clone))]
62233#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62234pub enum Operator1Code {
62235	#[cfg_attr(feature = "derive_default", default)]
62236	#[cfg_attr( feature = "derive_serde", serde(rename = "SMAL") )]
62237	CodeSMAL,
62238	#[cfg_attr( feature = "derive_serde", serde(rename = "SMEQ") )]
62239	CodeSMEQ,
62240	#[cfg_attr( feature = "derive_serde", serde(rename = "GREA") )]
62241	CodeGREA,
62242	#[cfg_attr( feature = "derive_serde", serde(rename = "GREQ") )]
62243	CodeGREQ,
62244	#[cfg_attr( feature = "derive_serde", serde(rename = "EQAL") )]
62245	CodeEQAL,
62246}
62247
62248impl Operator1Code {
62249	pub fn validate(&self) -> Result<(), ValidationError> {
62250		Ok(())
62251	}
62252}
62253
62254
62255// Option12 ...
62256#[cfg_attr(feature = "derive_debug", derive(Debug))]
62257#[cfg_attr(feature = "derive_default", derive(Default))]
62258#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62259#[cfg_attr(feature = "derive_clone", derive(Clone))]
62260#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62261pub struct Option12 {
62262	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
62263	pub tp: OptionType1Code,
62264	#[cfg_attr( feature = "derive_serde", serde(rename = "DtOrPrd") )]
62265	pub dt_or_prd: OptionDateOrPeriod1Choice,
62266}
62267
62268impl Option12 {
62269	pub fn validate(&self) -> Result<(), ValidationError> {
62270		self.tp.validate()?;
62271		self.dt_or_prd.validate()?;
62272		Ok(())
62273	}
62274}
62275
62276
62277// Option14 ...
62278#[cfg_attr(feature = "derive_debug", derive(Debug))]
62279#[cfg_attr(feature = "derive_default", derive(Default))]
62280#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62281#[cfg_attr(feature = "derive_clone", derive(Clone))]
62282#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62283pub struct Option14 {
62284	#[cfg_attr( feature = "derive_serde", serde(rename = "XprtnStyle") )]
62285	pub xprtn_style: Vec<OptionStyle5Code>,
62286	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnStyle", skip_serializing_if = "Option::is_none") )]
62287	pub optn_style: Option<ExoticOptionStyle1Code>,
62288	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnTp", skip_serializing_if = "Option::is_none") )]
62289	pub optn_tp: Option<OptionType1Code>,
62290	#[cfg_attr( feature = "derive_serde", serde(rename = "BrrrInd", skip_serializing_if = "Option::is_none") )]
62291	pub brrr_ind: Option<bool>,
62292	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtTp", skip_serializing_if = "Option::is_none") )]
62293	pub evt_tp: Option<OptionEvent2>,
62294}
62295
62296impl Option14 {
62297	pub fn validate(&self) -> Result<(), ValidationError> {
62298		for item in &self.xprtn_style { item.validate()? }
62299		if let Some(ref val) = self.optn_style { val.validate()? }
62300		if let Some(ref val) = self.optn_tp { val.validate()? }
62301		if let Some(ref val) = self.evt_tp { val.validate()? }
62302		Ok(())
62303	}
62304}
62305
62306
62307// Option15 ...
62308#[cfg_attr(feature = "derive_debug", derive(Debug))]
62309#[cfg_attr(feature = "derive_default", derive(Default))]
62310#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62311#[cfg_attr(feature = "derive_clone", derive(Clone))]
62312#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62313pub struct Option15 {
62314	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnSttlmStyle", skip_serializing_if = "Option::is_none") )]
62315	pub optn_sttlm_style: Option<SettleStyle2Choice>,
62316	#[cfg_attr( feature = "derive_serde", serde(rename = "ConvsDt", skip_serializing_if = "Option::is_none") )]
62317	pub convs_dt: Option<String>,
62318	#[cfg_attr( feature = "derive_serde", serde(rename = "StrkPric", skip_serializing_if = "Option::is_none") )]
62319	pub strk_pric: Option<Price8>,
62320	#[cfg_attr( feature = "derive_serde", serde(rename = "MinExrcblQty", skip_serializing_if = "Option::is_none") )]
62321	pub min_exrcbl_qty: Option<FinancialInstrumentQuantity1Choice>,
62322	#[cfg_attr( feature = "derive_serde", serde(rename = "ConvsPrd", skip_serializing_if = "Option::is_none") )]
62323	pub convs_prd: Option<DateTimePeriod1Choice>,
62324	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnStyle", skip_serializing_if = "Option::is_none") )]
62325	pub optn_style: Option<OptionStyle1Choice>,
62326	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnTp", skip_serializing_if = "Option::is_none") )]
62327	pub optn_tp: Option<OptionType8Choice>,
62328	#[cfg_attr( feature = "derive_serde", serde(rename = "StrkVal", skip_serializing_if = "Option::is_none") )]
62329	pub strk_val: Option<f64>,
62330	#[cfg_attr( feature = "derive_serde", serde(rename = "StrkMltplr", skip_serializing_if = "Option::is_none") )]
62331	pub strk_mltplr: Option<f64>,
62332	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrmAssgnmtMtd", skip_serializing_if = "Option::is_none") )]
62333	pub instrm_assgnmt_mtd: Option<AssignmentMethod2Choice>,
62334	#[cfg_attr( feature = "derive_serde", serde(rename = "VrsnNb", skip_serializing_if = "Option::is_none") )]
62335	pub vrsn_nb: Option<f64>,
62336	#[cfg_attr( feature = "derive_serde", serde(rename = "XpryLctn", skip_serializing_if = "Option::is_none") )]
62337	pub xpry_lctn: Option<String>,
62338	#[cfg_attr( feature = "derive_serde", serde(rename = "Stdstn", skip_serializing_if = "Option::is_none") )]
62339	pub stdstn: Option<Standardisation3Choice>,
62340	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgPtyRole", skip_serializing_if = "Option::is_none") )]
62341	pub tradg_pty_role: Option<OptionParty3Choice>,
62342	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctSz", skip_serializing_if = "Option::is_none") )]
62343	pub ctrct_sz: Option<f64>,
62344	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlUndrlygAttrbts", skip_serializing_if = "Option::is_none") )]
62345	pub addtl_undrlyg_attrbts: Option<Vec<UnderlyingAttributes4>>,
62346}
62347
62348impl Option15 {
62349	pub fn validate(&self) -> Result<(), ValidationError> {
62350		if let Some(ref val) = self.optn_sttlm_style { val.validate()? }
62351		if let Some(ref val) = self.strk_pric { val.validate()? }
62352		if let Some(ref val) = self.min_exrcbl_qty { val.validate()? }
62353		if let Some(ref val) = self.convs_prd { val.validate()? }
62354		if let Some(ref val) = self.optn_style { val.validate()? }
62355		if let Some(ref val) = self.optn_tp { val.validate()? }
62356		if let Some(ref val) = self.instrm_assgnmt_mtd { val.validate()? }
62357		if let Some(ref val) = self.xpry_lctn {
62358			if val.chars().count() < 1 {
62359				return Err(ValidationError::new(1001, "xpry_lctn is shorter than the minimum length of 1".to_string()));
62360			}
62361			if val.chars().count() > 4 {
62362				return Err(ValidationError::new(1002, "xpry_lctn exceeds the maximum length of 4".to_string()));
62363			}
62364			let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
62365			if !pattern.is_match(val) {
62366				return Err(ValidationError::new(1005, "xpry_lctn does not match the required pattern".to_string()));
62367			}
62368		}
62369		if let Some(ref val) = self.stdstn { val.validate()? }
62370		if let Some(ref val) = self.tradg_pty_role { val.validate()? }
62371		if let Some(ref vec) = self.addtl_undrlyg_attrbts { for item in vec { item.validate()? } }
62372		Ok(())
62373	}
62374}
62375
62376
62377// OptionBarrierLevel1Choice ...
62378#[cfg_attr(feature = "derive_debug", derive(Debug))]
62379#[cfg_attr(feature = "derive_default", derive(Default))]
62380#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62381#[cfg_attr(feature = "derive_clone", derive(Clone))]
62382#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62383pub struct OptionBarrierLevel1Choice {
62384	#[cfg_attr( feature = "derive_serde", serde(rename = "Sngl", skip_serializing_if = "Option::is_none") )]
62385	pub sngl: Option<SecuritiesTransactionPrice23Choice>,
62386	#[cfg_attr( feature = "derive_serde", serde(rename = "Mltpl", skip_serializing_if = "Option::is_none") )]
62387	pub mltpl: Option<OptionMultipleBarrierLevels1>,
62388}
62389
62390impl OptionBarrierLevel1Choice {
62391	pub fn validate(&self) -> Result<(), ValidationError> {
62392		if let Some(ref val) = self.sngl { val.validate()? }
62393		if let Some(ref val) = self.mltpl { val.validate()? }
62394		Ok(())
62395	}
62396}
62397
62398
62399// OptionDateOrPeriod1Choice ...
62400#[cfg_attr(feature = "derive_debug", derive(Debug))]
62401#[cfg_attr(feature = "derive_default", derive(Default))]
62402#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62403#[cfg_attr(feature = "derive_clone", derive(Clone))]
62404#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62405pub struct OptionDateOrPeriod1Choice {
62406	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlstExrcDt", skip_serializing_if = "Option::is_none") )]
62407	pub earlst_exrc_dt: Option<String>,
62408	#[cfg_attr( feature = "derive_serde", serde(rename = "NtcePrd", skip_serializing_if = "Option::is_none") )]
62409	pub ntce_prd: Option<f64>,
62410}
62411
62412impl OptionDateOrPeriod1Choice {
62413	pub fn validate(&self) -> Result<(), ValidationError> {
62414		Ok(())
62415	}
62416}
62417
62418
62419// OptionEvent2 ...
62420#[cfg_attr(feature = "derive_debug", derive(Debug))]
62421#[cfg_attr(feature = "derive_default", derive(Default))]
62422#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62423#[cfg_attr(feature = "derive_clone", derive(Clone))]
62424#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62425pub struct OptionEvent2 {
62426	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
62427	pub tp: OptionEventType1Choice,
62428	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc") )]
62429	pub desc: String,
62430}
62431
62432impl OptionEvent2 {
62433	pub fn validate(&self) -> Result<(), ValidationError> {
62434		self.tp.validate()?;
62435		if self.desc.chars().count() < 1 {
62436			return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
62437		}
62438		if self.desc.chars().count() > 35 {
62439			return Err(ValidationError::new(1002, "desc exceeds the maximum length of 35".to_string()));
62440		}
62441		Ok(())
62442	}
62443}
62444
62445
62446// OptionEventType1Choice ...
62447#[cfg_attr(feature = "derive_debug", derive(Debug))]
62448#[cfg_attr(feature = "derive_default", derive(Default))]
62449#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62450#[cfg_attr(feature = "derive_clone", derive(Clone))]
62451#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62452pub struct OptionEventType1Choice {
62453	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
62454	pub cd: Option<OptionEventType1Code>,
62455	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
62456	pub prtry: Option<GenericIdentification36>,
62457}
62458
62459impl OptionEventType1Choice {
62460	pub fn validate(&self) -> Result<(), ValidationError> {
62461		if let Some(ref val) = self.cd { val.validate()? }
62462		if let Some(ref val) = self.prtry { val.validate()? }
62463		Ok(())
62464	}
62465}
62466
62467
62468// OptionEventType1Code ...
62469#[cfg_attr(feature = "derive_debug", derive(Debug))]
62470#[cfg_attr(feature = "derive_default", derive(Default))]
62471#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62472#[cfg_attr(feature = "derive_clone", derive(Clone))]
62473#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62474pub enum OptionEventType1Code {
62475	#[cfg_attr(feature = "derive_default", default)]
62476	#[cfg_attr( feature = "derive_serde", serde(rename = "CLST") )]
62477	CodeCLST,
62478	#[cfg_attr( feature = "derive_serde", serde(rename = "CONF") )]
62479	CodeCONF,
62480	#[cfg_attr( feature = "derive_serde", serde(rename = "KNIN") )]
62481	CodeKNIN,
62482	#[cfg_attr( feature = "derive_serde", serde(rename = "KNOC") )]
62483	CodeKNOC,
62484	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
62485	CodeOTHR,
62486	#[cfg_attr( feature = "derive_serde", serde(rename = "TRIG") )]
62487	CodeTRIG,
62488}
62489
62490impl OptionEventType1Code {
62491	pub fn validate(&self) -> Result<(), ValidationError> {
62492		Ok(())
62493	}
62494}
62495
62496
62497// OptionMultipleBarrierLevels1 ...
62498#[cfg_attr(feature = "derive_debug", derive(Debug))]
62499#[cfg_attr(feature = "derive_default", derive(Default))]
62500#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62501#[cfg_attr(feature = "derive_clone", derive(Clone))]
62502#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62503pub struct OptionMultipleBarrierLevels1 {
62504	#[cfg_attr( feature = "derive_serde", serde(rename = "LwrLvl") )]
62505	pub lwr_lvl: SecuritiesTransactionPrice23Choice,
62506	#[cfg_attr( feature = "derive_serde", serde(rename = "UpperLvl") )]
62507	pub upper_lvl: SecuritiesTransactionPrice23Choice,
62508}
62509
62510impl OptionMultipleBarrierLevels1 {
62511	pub fn validate(&self) -> Result<(), ValidationError> {
62512		self.lwr_lvl.validate()?;
62513		self.upper_lvl.validate()?;
62514		Ok(())
62515	}
62516}
62517
62518
62519// OptionOrSwaption11 ...
62520#[cfg_attr(feature = "derive_debug", derive(Debug))]
62521#[cfg_attr(feature = "derive_default", derive(Default))]
62522#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62523#[cfg_attr(feature = "derive_clone", derive(Clone))]
62524#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62525pub struct OptionOrSwaption11 {
62526	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
62527	pub tp: Option<OptionType2Code>,
62528	#[cfg_attr( feature = "derive_serde", serde(rename = "MbddTp", skip_serializing_if = "Option::is_none") )]
62529	pub mbdd_tp: Option<EmbeddedType1Code>,
62530	#[cfg_attr( feature = "derive_serde", serde(rename = "ExrcStyle", skip_serializing_if = "Option::is_none") )]
62531	pub exrc_style: Option<Vec<OptionStyle6Code>>,
62532	#[cfg_attr( feature = "derive_serde", serde(rename = "ExrcDt", skip_serializing_if = "Option::is_none") )]
62533	pub exrc_dt: Option<ExerciseDate1Choice>,
62534	#[cfg_attr( feature = "derive_serde", serde(rename = "StrkPric", skip_serializing_if = "Option::is_none") )]
62535	pub strk_pric: Option<SecuritiesTransactionPrice17Choice>,
62536	#[cfg_attr( feature = "derive_serde", serde(rename = "StrkPricSchdl", skip_serializing_if = "Option::is_none") )]
62537	pub strk_pric_schdl: Option<Vec<Schedule4>>,
62538	#[cfg_attr( feature = "derive_serde", serde(rename = "CallAmt", skip_serializing_if = "Option::is_none") )]
62539	pub call_amt: Option<ActiveOrHistoricCurrencyAnd19DecimalAmount>,
62540	#[cfg_attr( feature = "derive_serde", serde(rename = "PutAmt", skip_serializing_if = "Option::is_none") )]
62541	pub put_amt: Option<ActiveOrHistoricCurrencyAnd19DecimalAmount>,
62542	#[cfg_attr( feature = "derive_serde", serde(rename = "PrmAmt", skip_serializing_if = "Option::is_none") )]
62543	pub prm_amt: Option<ActiveOrHistoricCurrencyAnd19DecimalAmount>,
62544	#[cfg_attr( feature = "derive_serde", serde(rename = "PrmPmtDt", skip_serializing_if = "Option::is_none") )]
62545	pub prm_pmt_dt: Option<String>,
62546	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDtOfUndrlyg", skip_serializing_if = "Option::is_none") )]
62547	pub mtrty_dt_of_undrlyg: Option<String>,
62548	#[cfg_attr( feature = "derive_serde", serde(rename = "BrrrLvls", skip_serializing_if = "Option::is_none") )]
62549	pub brrr_lvls: Option<OptionBarrierLevel1Choice>,
62550}
62551
62552impl OptionOrSwaption11 {
62553	pub fn validate(&self) -> Result<(), ValidationError> {
62554		if let Some(ref val) = self.tp { val.validate()? }
62555		if let Some(ref val) = self.mbdd_tp { val.validate()? }
62556		if let Some(ref vec) = self.exrc_style { for item in vec { item.validate()? } }
62557		if let Some(ref val) = self.exrc_dt { val.validate()? }
62558		if let Some(ref val) = self.strk_pric { val.validate()? }
62559		if let Some(ref vec) = self.strk_pric_schdl { for item in vec { item.validate()? } }
62560		if let Some(ref val) = self.call_amt { val.validate()? }
62561		if let Some(ref val) = self.put_amt { val.validate()? }
62562		if let Some(ref val) = self.prm_amt { val.validate()? }
62563		if let Some(ref val) = self.brrr_lvls { val.validate()? }
62564		Ok(())
62565	}
62566}
62567
62568
62569// OptionParty1Code ...
62570#[cfg_attr(feature = "derive_debug", derive(Debug))]
62571#[cfg_attr(feature = "derive_default", derive(Default))]
62572#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62573#[cfg_attr(feature = "derive_clone", derive(Clone))]
62574#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62575pub enum OptionParty1Code {
62576	#[cfg_attr(feature = "derive_default", default)]
62577	#[cfg_attr( feature = "derive_serde", serde(rename = "SLLR") )]
62578	CodeSLLR,
62579	#[cfg_attr( feature = "derive_serde", serde(rename = "BYER") )]
62580	CodeBYER,
62581}
62582
62583impl OptionParty1Code {
62584	pub fn validate(&self) -> Result<(), ValidationError> {
62585		Ok(())
62586	}
62587}
62588
62589
62590// OptionParty3Choice ...
62591#[cfg_attr(feature = "derive_debug", derive(Debug))]
62592#[cfg_attr(feature = "derive_default", derive(Default))]
62593#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62594#[cfg_attr(feature = "derive_clone", derive(Clone))]
62595#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62596pub struct OptionParty3Choice {
62597	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
62598	pub cd: Option<Vec<OptionParty1Code>>,
62599	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
62600	pub prtry: Option<GenericIdentification30>,
62601}
62602
62603impl OptionParty3Choice {
62604	pub fn validate(&self) -> Result<(), ValidationError> {
62605		if let Some(ref vec) = self.cd { for item in vec { item.validate()? } }
62606		if let Some(ref val) = self.prtry { val.validate()? }
62607		Ok(())
62608	}
62609}
62610
62611
62612// OptionParty3Code ...
62613#[cfg_attr(feature = "derive_debug", derive(Debug))]
62614#[cfg_attr(feature = "derive_default", derive(Default))]
62615#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62616#[cfg_attr(feature = "derive_clone", derive(Clone))]
62617#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62618pub enum OptionParty3Code {
62619	#[cfg_attr(feature = "derive_default", default)]
62620	#[cfg_attr( feature = "derive_serde", serde(rename = "MAKE") )]
62621	CodeMAKE,
62622	#[cfg_attr( feature = "derive_serde", serde(rename = "TAKE") )]
62623	CodeTAKE,
62624}
62625
62626impl OptionParty3Code {
62627	pub fn validate(&self) -> Result<(), ValidationError> {
62628		Ok(())
62629	}
62630}
62631
62632
62633// OptionStyle1Choice ...
62634#[cfg_attr(feature = "derive_debug", derive(Debug))]
62635#[cfg_attr(feature = "derive_default", derive(Default))]
62636#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62637#[cfg_attr(feature = "derive_clone", derive(Clone))]
62638#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62639pub struct OptionStyle1Choice {
62640	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
62641	pub cd: Option<OptionStyle1Code>,
62642	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
62643	pub prtry: Option<GenericIdentification13>,
62644}
62645
62646impl OptionStyle1Choice {
62647	pub fn validate(&self) -> Result<(), ValidationError> {
62648		if let Some(ref val) = self.cd { val.validate()? }
62649		if let Some(ref val) = self.prtry { val.validate()? }
62650		Ok(())
62651	}
62652}
62653
62654
62655// OptionStyle1Code ...
62656#[cfg_attr(feature = "derive_debug", derive(Debug))]
62657#[cfg_attr(feature = "derive_default", derive(Default))]
62658#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62659#[cfg_attr(feature = "derive_clone", derive(Clone))]
62660#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62661pub enum OptionStyle1Code {
62662	#[cfg_attr(feature = "derive_default", default)]
62663	#[cfg_attr( feature = "derive_serde", serde(rename = "AMER") )]
62664	CodeAMER,
62665	#[cfg_attr( feature = "derive_serde", serde(rename = "EURO") )]
62666	CodeEURO,
62667	#[cfg_attr( feature = "derive_serde", serde(rename = "BERM") )]
62668	CodeBERM,
62669	#[cfg_attr( feature = "derive_serde", serde(rename = "ASIA") )]
62670	CodeASIA,
62671	#[cfg_attr( feature = "derive_serde", serde(rename = "CANA") )]
62672	CodeCANA,
62673}
62674
62675impl OptionStyle1Code {
62676	pub fn validate(&self) -> Result<(), ValidationError> {
62677		Ok(())
62678	}
62679}
62680
62681
62682// OptionStyle5Code ...
62683#[cfg_attr(feature = "derive_debug", derive(Debug))]
62684#[cfg_attr(feature = "derive_default", derive(Default))]
62685#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62686#[cfg_attr(feature = "derive_clone", derive(Clone))]
62687#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62688pub enum OptionStyle5Code {
62689	#[cfg_attr(feature = "derive_default", default)]
62690	#[cfg_attr( feature = "derive_serde", serde(rename = "AMER") )]
62691	CodeAMER,
62692	#[cfg_attr( feature = "derive_serde", serde(rename = "ASIA") )]
62693	CodeASIA,
62694	#[cfg_attr( feature = "derive_serde", serde(rename = "BERM") )]
62695	CodeBERM,
62696	#[cfg_attr( feature = "derive_serde", serde(rename = "EURO") )]
62697	CodeEURO,
62698}
62699
62700impl OptionStyle5Code {
62701	pub fn validate(&self) -> Result<(), ValidationError> {
62702		Ok(())
62703	}
62704}
62705
62706
62707// OptionStyle6Code ...
62708#[cfg_attr(feature = "derive_debug", derive(Debug))]
62709#[cfg_attr(feature = "derive_default", derive(Default))]
62710#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62711#[cfg_attr(feature = "derive_clone", derive(Clone))]
62712#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62713pub enum OptionStyle6Code {
62714	#[cfg_attr(feature = "derive_default", default)]
62715	#[cfg_attr( feature = "derive_serde", serde(rename = "EURO") )]
62716	CodeEURO,
62717	#[cfg_attr( feature = "derive_serde", serde(rename = "BERM") )]
62718	CodeBERM,
62719	#[cfg_attr( feature = "derive_serde", serde(rename = "ASIA") )]
62720	CodeASIA,
62721	#[cfg_attr( feature = "derive_serde", serde(rename = "AMER") )]
62722	CodeAMER,
62723}
62724
62725impl OptionStyle6Code {
62726	pub fn validate(&self) -> Result<(), ValidationError> {
62727		Ok(())
62728	}
62729}
62730
62731
62732// OptionStyle7Code ...
62733#[cfg_attr(feature = "derive_debug", derive(Debug))]
62734#[cfg_attr(feature = "derive_default", derive(Default))]
62735#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62736#[cfg_attr(feature = "derive_clone", derive(Clone))]
62737#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62738pub enum OptionStyle7Code {
62739	#[cfg_attr(feature = "derive_default", default)]
62740	#[cfg_attr( feature = "derive_serde", serde(rename = "AMER") )]
62741	CodeAMER,
62742	#[cfg_attr( feature = "derive_serde", serde(rename = "ASIA") )]
62743	CodeASIA,
62744	#[cfg_attr( feature = "derive_serde", serde(rename = "BERM") )]
62745	CodeBERM,
62746	#[cfg_attr( feature = "derive_serde", serde(rename = "EURO") )]
62747	CodeEURO,
62748	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
62749	CodeOTHR,
62750}
62751
62752impl OptionStyle7Code {
62753	pub fn validate(&self) -> Result<(), ValidationError> {
62754		Ok(())
62755	}
62756}
62757
62758
62759// OptionType1Code ...
62760#[cfg_attr(feature = "derive_debug", derive(Debug))]
62761#[cfg_attr(feature = "derive_default", derive(Default))]
62762#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62763#[cfg_attr(feature = "derive_clone", derive(Clone))]
62764#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62765pub enum OptionType1Code {
62766	#[cfg_attr(feature = "derive_default", default)]
62767	#[cfg_attr( feature = "derive_serde", serde(rename = "CALL") )]
62768	CodeCALL,
62769	#[cfg_attr( feature = "derive_serde", serde(rename = "PUTO") )]
62770	CodePUTO,
62771}
62772
62773impl OptionType1Code {
62774	pub fn validate(&self) -> Result<(), ValidationError> {
62775		Ok(())
62776	}
62777}
62778
62779
62780// OptionType2Code ...
62781#[cfg_attr(feature = "derive_debug", derive(Debug))]
62782#[cfg_attr(feature = "derive_default", derive(Default))]
62783#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62784#[cfg_attr(feature = "derive_clone", derive(Clone))]
62785#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62786pub enum OptionType2Code {
62787	#[cfg_attr(feature = "derive_default", default)]
62788	#[cfg_attr( feature = "derive_serde", serde(rename = "CALL") )]
62789	CodeCALL,
62790	#[cfg_attr( feature = "derive_serde", serde(rename = "PUTO") )]
62791	CodePUTO,
62792	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
62793	CodeOTHR,
62794}
62795
62796impl OptionType2Code {
62797	pub fn validate(&self) -> Result<(), ValidationError> {
62798		Ok(())
62799	}
62800}
62801
62802
62803// OptionType8Choice ...
62804#[cfg_attr(feature = "derive_debug", derive(Debug))]
62805#[cfg_attr(feature = "derive_default", derive(Default))]
62806#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62807#[cfg_attr(feature = "derive_clone", derive(Clone))]
62808#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62809pub struct OptionType8Choice {
62810	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
62811	pub cd: Option<Vec<OptionType1Code>>,
62812	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
62813	pub prtry: Option<GenericIdentification30>,
62814}
62815
62816impl OptionType8Choice {
62817	pub fn validate(&self) -> Result<(), ValidationError> {
62818		if let Some(ref vec) = self.cd { for item in vec { item.validate()? } }
62819		if let Some(ref val) = self.prtry { val.validate()? }
62820		Ok(())
62821	}
62822}
62823
62824
62825// OrderClassification2 ...
62826#[cfg_attr(feature = "derive_debug", derive(Debug))]
62827#[cfg_attr(feature = "derive_default", derive(Default))]
62828#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62829#[cfg_attr(feature = "derive_clone", derive(Clone))]
62830#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62831pub struct OrderClassification2 {
62832	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrTp", skip_serializing_if = "Option::is_none") )]
62833	pub ordr_tp: Option<String>,
62834	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrTpClssfctn", skip_serializing_if = "Option::is_none") )]
62835	pub ordr_tp_clssfctn: Option<OrderType3Code>,
62836}
62837
62838impl OrderClassification2 {
62839	pub fn validate(&self) -> Result<(), ValidationError> {
62840		if let Some(ref val) = self.ordr_tp {
62841			if val.chars().count() < 1 {
62842				return Err(ValidationError::new(1001, "ordr_tp is shorter than the minimum length of 1".to_string()));
62843			}
62844			if val.chars().count() > 50 {
62845				return Err(ValidationError::new(1002, "ordr_tp exceeds the maximum length of 50".to_string()));
62846			}
62847		}
62848		if let Some(ref val) = self.ordr_tp_clssfctn { val.validate()? }
62849		Ok(())
62850	}
62851}
62852
62853
62854// OrderData3 ...
62855#[cfg_attr(feature = "derive_debug", derive(Debug))]
62856#[cfg_attr(feature = "derive_default", derive(Default))]
62857#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62858#[cfg_attr(feature = "derive_clone", derive(Clone))]
62859#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62860pub struct OrderData3 {
62861	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrIdData") )]
62862	pub ordr_id_data: OrderIdentification2,
62863	#[cfg_attr( feature = "derive_serde", serde(rename = "AuctnData", skip_serializing_if = "Option::is_none") )]
62864	pub auctn_data: Option<AuctionData2>,
62865	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrData", skip_serializing_if = "Option::is_none") )]
62866	pub ordr_data: Option<OrderData4>,
62867}
62868
62869impl OrderData3 {
62870	pub fn validate(&self) -> Result<(), ValidationError> {
62871		self.ordr_id_data.validate()?;
62872		if let Some(ref val) = self.auctn_data { val.validate()? }
62873		if let Some(ref val) = self.ordr_data { val.validate()? }
62874		Ok(())
62875	}
62876}
62877
62878
62879// OrderData4 ...
62880#[cfg_attr(feature = "derive_debug", derive(Debug))]
62881#[cfg_attr(feature = "derive_default", derive(Default))]
62882#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62883#[cfg_attr(feature = "derive_clone", derive(Clone))]
62884#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62885pub struct OrderData4 {
62886	#[cfg_attr( feature = "derive_serde", serde(rename = "SubmitgNtty", skip_serializing_if = "Option::is_none") )]
62887	pub submitg_ntty: Option<String>,
62888	#[cfg_attr( feature = "derive_serde", serde(rename = "DrctElctrncAccs", skip_serializing_if = "Option::is_none") )]
62889	pub drct_elctrnc_accs: Option<bool>,
62890	#[cfg_attr( feature = "derive_serde", serde(rename = "ClntId", skip_serializing_if = "Option::is_none") )]
62891	pub clnt_id: Option<PersonOrOrganisation4Choice>,
62892	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtDcsnPrsn", skip_serializing_if = "Option::is_none") )]
62893	pub invstmt_dcsn_prsn: Option<ExecutingParty2Choice>,
62894	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctgPrsn", skip_serializing_if = "Option::is_none") )]
62895	pub exctg_prsn: Option<ExecutingParty2Choice>,
62896	#[cfg_attr( feature = "derive_serde", serde(rename = "NonExctgBrkr", skip_serializing_if = "Option::is_none") )]
62897	pub non_exctg_brkr: Option<String>,
62898	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgCpcty", skip_serializing_if = "Option::is_none") )]
62899	pub tradg_cpcty: Option<RegulatoryTradingCapacity1Code>,
62900	#[cfg_attr( feature = "derive_serde", serde(rename = "LqdtyPrvsnActvty", skip_serializing_if = "Option::is_none") )]
62901	pub lqdty_prvsn_actvty: Option<bool>,
62902	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrClssfctn", skip_serializing_if = "Option::is_none") )]
62903	pub ordr_clssfctn: Option<OrderClassification2>,
62904	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrPrics", skip_serializing_if = "Option::is_none") )]
62905	pub ordr_prics: Option<OrderPriceData2>,
62906	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrData", skip_serializing_if = "Option::is_none") )]
62907	pub instr_data: Option<OrderInstructionData2>,
62908	#[cfg_attr( feature = "derive_serde", serde(rename = "TxData", skip_serializing_if = "Option::is_none") )]
62909	pub tx_data: Option<TransactionData3>,
62910}
62911
62912impl OrderData4 {
62913	pub fn validate(&self) -> Result<(), ValidationError> {
62914		if let Some(ref val) = self.submitg_ntty {
62915			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
62916			if !pattern.is_match(val) {
62917				return Err(ValidationError::new(1005, "submitg_ntty does not match the required pattern".to_string()));
62918			}
62919		}
62920		if let Some(ref val) = self.clnt_id { val.validate()? }
62921		if let Some(ref val) = self.invstmt_dcsn_prsn { val.validate()? }
62922		if let Some(ref val) = self.exctg_prsn { val.validate()? }
62923		if let Some(ref val) = self.non_exctg_brkr {
62924			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
62925			if !pattern.is_match(val) {
62926				return Err(ValidationError::new(1005, "non_exctg_brkr does not match the required pattern".to_string()));
62927			}
62928		}
62929		if let Some(ref val) = self.tradg_cpcty { val.validate()? }
62930		if let Some(ref val) = self.ordr_clssfctn { val.validate()? }
62931		if let Some(ref val) = self.ordr_prics { val.validate()? }
62932		if let Some(ref val) = self.instr_data { val.validate()? }
62933		if let Some(ref val) = self.tx_data { val.validate()? }
62934		Ok(())
62935	}
62936}
62937
62938
62939// OrderDesk1 ...
62940#[cfg_attr(feature = "derive_debug", derive(Debug))]
62941#[cfg_attr(feature = "derive_default", derive(Default))]
62942#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62943#[cfg_attr(feature = "derive_clone", derive(Clone))]
62944#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62945pub struct OrderDesk1 {
62946	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrDsk", skip_serializing_if = "Option::is_none") )]
62947	pub ordr_dsk: Option<ContactAttributes5>,
62948	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsrDts", skip_serializing_if = "Option::is_none") )]
62949	pub clsr_dts: Option<Vec<String>>,
62950	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
62951	pub addtl_inf: Option<Vec<AdditionalInformation15>>,
62952}
62953
62954impl OrderDesk1 {
62955	pub fn validate(&self) -> Result<(), ValidationError> {
62956		if let Some(ref val) = self.ordr_dsk { val.validate()? }
62957		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
62958		Ok(())
62959	}
62960}
62961
62962
62963// OrderEventType1Choice ...
62964#[cfg_attr(feature = "derive_debug", derive(Debug))]
62965#[cfg_attr(feature = "derive_default", derive(Default))]
62966#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62967#[cfg_attr(feature = "derive_clone", derive(Clone))]
62968#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62969pub struct OrderEventType1Choice {
62970	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
62971	pub cd: Option<OrderEventType1Code>,
62972	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
62973	pub prtry: Option<GenericIdentification30>,
62974}
62975
62976impl OrderEventType1Choice {
62977	pub fn validate(&self) -> Result<(), ValidationError> {
62978		if let Some(ref val) = self.cd { val.validate()? }
62979		if let Some(ref val) = self.prtry { val.validate()? }
62980		Ok(())
62981	}
62982}
62983
62984
62985// OrderEventType1Code ...
62986#[cfg_attr(feature = "derive_debug", derive(Debug))]
62987#[cfg_attr(feature = "derive_default", derive(Default))]
62988#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
62989#[cfg_attr(feature = "derive_clone", derive(Clone))]
62990#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
62991pub enum OrderEventType1Code {
62992	#[cfg_attr(feature = "derive_default", default)]
62993	#[cfg_attr( feature = "derive_serde", serde(rename = "CAME") )]
62994	CodeCAME,
62995	#[cfg_attr( feature = "derive_serde", serde(rename = "CAMO") )]
62996	CodeCAMO,
62997	#[cfg_attr( feature = "derive_serde", serde(rename = "CHME") )]
62998	CodeCHME,
62999	#[cfg_attr( feature = "derive_serde", serde(rename = "CHMO") )]
63000	CodeCHMO,
63001	#[cfg_attr( feature = "derive_serde", serde(rename = "EXPI") )]
63002	CodeEXPI,
63003	#[cfg_attr( feature = "derive_serde", serde(rename = "FILL") )]
63004	CodeFILL,
63005	#[cfg_attr( feature = "derive_serde", serde(rename = "NEWO") )]
63006	CodeNEWO,
63007	#[cfg_attr( feature = "derive_serde", serde(rename = "PARF") )]
63008	CodePARF,
63009	#[cfg_attr( feature = "derive_serde", serde(rename = "REMA") )]
63010	CodeREMA,
63011	#[cfg_attr( feature = "derive_serde", serde(rename = "REMO") )]
63012	CodeREMO,
63013	#[cfg_attr( feature = "derive_serde", serde(rename = "REMH") )]
63014	CodeREMH,
63015	#[cfg_attr( feature = "derive_serde", serde(rename = "REME") )]
63016	CodeREME,
63017	#[cfg_attr( feature = "derive_serde", serde(rename = "TRIG") )]
63018	CodeTRIG,
63019	#[cfg_attr( feature = "derive_serde", serde(rename = "RFQS") )]
63020	CodeRFQS,
63021	#[cfg_attr( feature = "derive_serde", serde(rename = "RFQR") )]
63022	CodeRFQR,
63023}
63024
63025impl OrderEventType1Code {
63026	pub fn validate(&self) -> Result<(), ValidationError> {
63027		Ok(())
63028	}
63029}
63030
63031
63032// OrderIdentification2 ...
63033#[cfg_attr(feature = "derive_debug", derive(Debug))]
63034#[cfg_attr(feature = "derive_default", derive(Default))]
63035#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63036#[cfg_attr(feature = "derive_clone", derive(Clone))]
63037#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63038pub struct OrderIdentification2 {
63039	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrBookId") )]
63040	pub ordr_book_id: String,
63041	#[cfg_attr( feature = "derive_serde", serde(rename = "SeqNb") )]
63042	pub seq_nb: f64,
63043	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
63044	pub prty: Option<OrderPriority1>,
63045	#[cfg_attr( feature = "derive_serde", serde(rename = "TmStmp") )]
63046	pub tm_stmp: String,
63047	#[cfg_attr( feature = "derive_serde", serde(rename = "TradVn") )]
63048	pub trad_vn: String,
63049	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrm") )]
63050	pub fin_instrm: FinancialInstrument99Choice,
63051	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrId", skip_serializing_if = "Option::is_none") )]
63052	pub ordr_id: Option<String>,
63053	#[cfg_attr( feature = "derive_serde", serde(rename = "DtOfRct", skip_serializing_if = "Option::is_none") )]
63054	pub dt_of_rct: Option<String>,
63055	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtyPrd", skip_serializing_if = "Option::is_none") )]
63056	pub vldty_prd: Option<ValidityPeriod1Choice>,
63057	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrRstrctn", skip_serializing_if = "Option::is_none") )]
63058	pub ordr_rstrctn: Option<Vec<OrderRestriction1Choice>>,
63059	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtyDtTm", skip_serializing_if = "Option::is_none") )]
63060	pub vldty_dt_tm: Option<String>,
63061	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtTp", skip_serializing_if = "Option::is_none") )]
63062	pub evt_tp: Option<OrderEventType1Choice>,
63063}
63064
63065impl OrderIdentification2 {
63066	pub fn validate(&self) -> Result<(), ValidationError> {
63067		if self.ordr_book_id.chars().count() < 1 {
63068			return Err(ValidationError::new(1001, "ordr_book_id is shorter than the minimum length of 1".to_string()));
63069		}
63070		if self.ordr_book_id.chars().count() > 35 {
63071			return Err(ValidationError::new(1002, "ordr_book_id exceeds the maximum length of 35".to_string()));
63072		}
63073		if self.seq_nb < 1.000000 {
63074			return Err(ValidationError::new(1003, "seq_nb is less than the minimum value of 1.000000".to_string()));
63075		}
63076		if let Some(ref val) = self.prty { val.validate()? }
63077		let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
63078		if !pattern.is_match(&self.trad_vn) {
63079			return Err(ValidationError::new(1005, "trad_vn does not match the required pattern".to_string()));
63080		}
63081		self.fin_instrm.validate()?;
63082		if let Some(ref val) = self.ordr_id {
63083			if val.chars().count() < 1 {
63084				return Err(ValidationError::new(1001, "ordr_id is shorter than the minimum length of 1".to_string()));
63085			}
63086			if val.chars().count() > 50 {
63087				return Err(ValidationError::new(1002, "ordr_id exceeds the maximum length of 50".to_string()));
63088			}
63089		}
63090		if let Some(ref val) = self.vldty_prd { val.validate()? }
63091		if let Some(ref vec) = self.ordr_rstrctn { for item in vec { item.validate()? } }
63092		if let Some(ref val) = self.evt_tp { val.validate()? }
63093		Ok(())
63094	}
63095}
63096
63097
63098// OrderInstructionData2 ...
63099#[cfg_attr(feature = "derive_debug", derive(Debug))]
63100#[cfg_attr(feature = "derive_default", derive(Default))]
63101#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63102#[cfg_attr(feature = "derive_clone", derive(Clone))]
63103#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63104pub struct OrderInstructionData2 {
63105	#[cfg_attr( feature = "derive_serde", serde(rename = "BuySellInd", skip_serializing_if = "Option::is_none") )]
63106	pub buy_sell_ind: Option<Side6Code>,
63107	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrVldtySts", skip_serializing_if = "Option::is_none") )]
63108	pub ordr_vldty_sts: Option<OrderStatus10Code>,
63109	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrSts", skip_serializing_if = "Option::is_none") )]
63110	pub ordr_sts: Option<Vec<OrderStatus11Code>>,
63111	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlQty", skip_serializing_if = "Option::is_none") )]
63112	pub initl_qty: Option<FinancialInstrumentQuantity25Choice>,
63113	#[cfg_attr( feature = "derive_serde", serde(rename = "RmngQty", skip_serializing_if = "Option::is_none") )]
63114	pub rmng_qty: Option<FinancialInstrumentQuantity25Choice>,
63115	#[cfg_attr( feature = "derive_serde", serde(rename = "DispdQty", skip_serializing_if = "Option::is_none") )]
63116	pub dispd_qty: Option<FinancialInstrumentQuantity25Choice>,
63117	#[cfg_attr( feature = "derive_serde", serde(rename = "MinAccptblQty", skip_serializing_if = "Option::is_none") )]
63118	pub min_accptbl_qty: Option<FinancialInstrumentQuantity25Choice>,
63119	#[cfg_attr( feature = "derive_serde", serde(rename = "MinExctbl", skip_serializing_if = "Option::is_none") )]
63120	pub min_exctbl: Option<MinimumExecutable1>,
63121	#[cfg_attr( feature = "derive_serde", serde(rename = "PssvOnlyInd", skip_serializing_if = "Option::is_none") )]
63122	pub pssv_only_ind: Option<bool>,
63123	#[cfg_attr( feature = "derive_serde", serde(rename = "SlfExctnPrvntn", skip_serializing_if = "Option::is_none") )]
63124	pub slf_exctn_prvntn: Option<bool>,
63125	#[cfg_attr( feature = "derive_serde", serde(rename = "RtgStrtgy", skip_serializing_if = "Option::is_none") )]
63126	pub rtg_strtgy: Option<String>,
63127}
63128
63129impl OrderInstructionData2 {
63130	pub fn validate(&self) -> Result<(), ValidationError> {
63131		if let Some(ref val) = self.buy_sell_ind { val.validate()? }
63132		if let Some(ref val) = self.ordr_vldty_sts { val.validate()? }
63133		if let Some(ref vec) = self.ordr_sts { for item in vec { item.validate()? } }
63134		if let Some(ref val) = self.initl_qty { val.validate()? }
63135		if let Some(ref val) = self.rmng_qty { val.validate()? }
63136		if let Some(ref val) = self.dispd_qty { val.validate()? }
63137		if let Some(ref val) = self.min_accptbl_qty { val.validate()? }
63138		if let Some(ref val) = self.min_exctbl { val.validate()? }
63139		if let Some(ref val) = self.rtg_strtgy {
63140			if val.chars().count() < 1 {
63141				return Err(ValidationError::new(1001, "rtg_strtgy is shorter than the minimum length of 1".to_string()));
63142			}
63143			if val.chars().count() > 50 {
63144				return Err(ValidationError::new(1002, "rtg_strtgy exceeds the maximum length of 50".to_string()));
63145			}
63146		}
63147		Ok(())
63148	}
63149}
63150
63151
63152// OrderOriginatorEligibility1Code ...
63153#[cfg_attr(feature = "derive_debug", derive(Debug))]
63154#[cfg_attr(feature = "derive_default", derive(Default))]
63155#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63156#[cfg_attr(feature = "derive_clone", derive(Clone))]
63157#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63158pub enum OrderOriginatorEligibility1Code {
63159	#[cfg_attr(feature = "derive_default", default)]
63160	#[cfg_attr( feature = "derive_serde", serde(rename = "ELIG") )]
63161	CodeELIG,
63162	#[cfg_attr( feature = "derive_serde", serde(rename = "RETL") )]
63163	CodeRETL,
63164	#[cfg_attr( feature = "derive_serde", serde(rename = "PROF") )]
63165	CodePROF,
63166}
63167
63168impl OrderOriginatorEligibility1Code {
63169	pub fn validate(&self) -> Result<(), ValidationError> {
63170		Ok(())
63171	}
63172}
63173
63174
63175// OrderPriceData2 ...
63176#[cfg_attr(feature = "derive_debug", derive(Debug))]
63177#[cfg_attr(feature = "derive_default", derive(Default))]
63178#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63179#[cfg_attr(feature = "derive_clone", derive(Clone))]
63180#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63181pub struct OrderPriceData2 {
63182	#[cfg_attr( feature = "derive_serde", serde(rename = "LmtPric", skip_serializing_if = "Option::is_none") )]
63183	pub lmt_pric: Option<SecuritiesTransactionPrice2Choice>,
63184	#[cfg_attr( feature = "derive_serde", serde(rename = "StopPric", skip_serializing_if = "Option::is_none") )]
63185	pub stop_pric: Option<SecuritiesTransactionPrice2Choice>,
63186	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlLmtPric", skip_serializing_if = "Option::is_none") )]
63187	pub addtl_lmt_pric: Option<SecuritiesTransactionPrice2Choice>,
63188	#[cfg_attr( feature = "derive_serde", serde(rename = "PggdPric", skip_serializing_if = "Option::is_none") )]
63189	pub pggd_pric: Option<SecuritiesTransactionPrice2Choice>,
63190	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyScndLeg", skip_serializing_if = "Option::is_none") )]
63191	pub ccy_scnd_leg: Option<String>,
63192}
63193
63194impl OrderPriceData2 {
63195	pub fn validate(&self) -> Result<(), ValidationError> {
63196		if let Some(ref val) = self.lmt_pric { val.validate()? }
63197		if let Some(ref val) = self.stop_pric { val.validate()? }
63198		if let Some(ref val) = self.addtl_lmt_pric { val.validate()? }
63199		if let Some(ref val) = self.pggd_pric { val.validate()? }
63200		if let Some(ref val) = self.ccy_scnd_leg {
63201			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
63202			if !pattern.is_match(val) {
63203				return Err(ValidationError::new(1005, "ccy_scnd_leg does not match the required pattern".to_string()));
63204			}
63205		}
63206		Ok(())
63207	}
63208}
63209
63210
63211// OrderPriority1 ...
63212#[cfg_attr(feature = "derive_debug", derive(Debug))]
63213#[cfg_attr(feature = "derive_default", derive(Default))]
63214#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63215#[cfg_attr(feature = "derive_clone", derive(Clone))]
63216#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63217pub struct OrderPriority1 {
63218	#[cfg_attr( feature = "derive_serde", serde(rename = "TmStmp", skip_serializing_if = "Option::is_none") )]
63219	pub tm_stmp: Option<String>,
63220	#[cfg_attr( feature = "derive_serde", serde(rename = "Sz", skip_serializing_if = "Option::is_none") )]
63221	pub sz: Option<f64>,
63222}
63223
63224impl OrderPriority1 {
63225	pub fn validate(&self) -> Result<(), ValidationError> {
63226		if let Some(ref val) = self.sz {
63227			if *val < 1.000000 {
63228				return Err(ValidationError::new(1003, "sz is less than the minimum value of 1.000000".to_string()));
63229			}
63230		}
63231		Ok(())
63232	}
63233}
63234
63235
63236// OrderQuantityType2Code ...
63237#[cfg_attr(feature = "derive_debug", derive(Debug))]
63238#[cfg_attr(feature = "derive_default", derive(Default))]
63239#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63240#[cfg_attr(feature = "derive_clone", derive(Clone))]
63241#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63242pub enum OrderQuantityType2Code {
63243	#[cfg_attr(feature = "derive_default", default)]
63244	#[cfg_attr( feature = "derive_serde", serde(rename = "UNIT") )]
63245	CodeUNIT,
63246	#[cfg_attr( feature = "derive_serde", serde(rename = "CASH") )]
63247	CodeCASH,
63248}
63249
63250impl OrderQuantityType2Code {
63251	pub fn validate(&self) -> Result<(), ValidationError> {
63252		Ok(())
63253	}
63254}
63255
63256
63257// OrderReport2Choice ...
63258#[cfg_attr(feature = "derive_debug", derive(Debug))]
63259#[cfg_attr(feature = "derive_default", derive(Default))]
63260#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63261#[cfg_attr(feature = "derive_clone", derive(Clone))]
63262#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63263pub struct OrderReport2Choice {
63264	#[cfg_attr( feature = "derive_serde", serde(rename = "New", skip_serializing_if = "Option::is_none") )]
63265	pub new: Option<NewOrderReport2>,
63266	#[cfg_attr( feature = "derive_serde", serde(rename = "Cxl", skip_serializing_if = "Option::is_none") )]
63267	pub cxl: Option<CancelOrderReport1>,
63268}
63269
63270impl OrderReport2Choice {
63271	pub fn validate(&self) -> Result<(), ValidationError> {
63272		if let Some(ref val) = self.new { val.validate()? }
63273		if let Some(ref val) = self.cxl { val.validate()? }
63274		Ok(())
63275	}
63276}
63277
63278
63279// OrderRestriction1Choice ...
63280#[cfg_attr(feature = "derive_debug", derive(Debug))]
63281#[cfg_attr(feature = "derive_default", derive(Default))]
63282#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63283#[cfg_attr(feature = "derive_clone", derive(Clone))]
63284#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63285pub struct OrderRestriction1Choice {
63286	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrRstrctnCd", skip_serializing_if = "Option::is_none") )]
63287	pub ordr_rstrctn_cd: Option<OrderRestrictionType1Code>,
63288	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
63289	pub prtry: Option<GenericIdentification30>,
63290}
63291
63292impl OrderRestriction1Choice {
63293	pub fn validate(&self) -> Result<(), ValidationError> {
63294		if let Some(ref val) = self.ordr_rstrctn_cd { val.validate()? }
63295		if let Some(ref val) = self.prtry { val.validate()? }
63296		Ok(())
63297	}
63298}
63299
63300
63301// OrderRestrictionType1Code ...
63302#[cfg_attr(feature = "derive_debug", derive(Debug))]
63303#[cfg_attr(feature = "derive_default", derive(Default))]
63304#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63305#[cfg_attr(feature = "derive_clone", derive(Clone))]
63306#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63307pub enum OrderRestrictionType1Code {
63308	#[cfg_attr(feature = "derive_default", default)]
63309	#[cfg_attr( feature = "derive_serde", serde(rename = "SESR") )]
63310	CodeSESR,
63311	#[cfg_attr( feature = "derive_serde", serde(rename = "VFAR") )]
63312	CodeVFAR,
63313	#[cfg_attr( feature = "derive_serde", serde(rename = "VFCR") )]
63314	CodeVFCR,
63315}
63316
63317impl OrderRestrictionType1Code {
63318	pub fn validate(&self) -> Result<(), ValidationError> {
63319		Ok(())
63320	}
63321}
63322
63323
63324// OrderStatus10Code ...
63325#[cfg_attr(feature = "derive_debug", derive(Debug))]
63326#[cfg_attr(feature = "derive_default", derive(Default))]
63327#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63328#[cfg_attr(feature = "derive_clone", derive(Clone))]
63329#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63330pub enum OrderStatus10Code {
63331	#[cfg_attr(feature = "derive_default", default)]
63332	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTI") )]
63333	CodeACTI,
63334	#[cfg_attr( feature = "derive_serde", serde(rename = "INAC") )]
63335	CodeINAC,
63336	#[cfg_attr( feature = "derive_serde", serde(rename = "SUSP") )]
63337	CodeSUSP,
63338}
63339
63340impl OrderStatus10Code {
63341	pub fn validate(&self) -> Result<(), ValidationError> {
63342		Ok(())
63343	}
63344}
63345
63346
63347// OrderStatus11Code ...
63348#[cfg_attr(feature = "derive_debug", derive(Debug))]
63349#[cfg_attr(feature = "derive_default", derive(Default))]
63350#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63351#[cfg_attr(feature = "derive_clone", derive(Clone))]
63352#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63353pub enum OrderStatus11Code {
63354	#[cfg_attr(feature = "derive_default", default)]
63355	#[cfg_attr( feature = "derive_serde", serde(rename = "FIRM") )]
63356	CodeFIRM,
63357	#[cfg_attr( feature = "derive_serde", serde(rename = "IMPL") )]
63358	CodeIMPL,
63359	#[cfg_attr( feature = "derive_serde", serde(rename = "INDI") )]
63360	CodeINDI,
63361	#[cfg_attr( feature = "derive_serde", serde(rename = "ROUT") )]
63362	CodeROUT,
63363}
63364
63365impl OrderStatus11Code {
63366	pub fn validate(&self) -> Result<(), ValidationError> {
63367		Ok(())
63368	}
63369}
63370
63371
63372// OrderType3Code ...
63373#[cfg_attr(feature = "derive_debug", derive(Debug))]
63374#[cfg_attr(feature = "derive_default", derive(Default))]
63375#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63376#[cfg_attr(feature = "derive_clone", derive(Clone))]
63377#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63378pub enum OrderType3Code {
63379	#[cfg_attr(feature = "derive_default", default)]
63380	#[cfg_attr( feature = "derive_serde", serde(rename = "LMTO") )]
63381	CodeLMTO,
63382	#[cfg_attr( feature = "derive_serde", serde(rename = "STOP") )]
63383	CodeSTOP,
63384}
63385
63386impl OrderType3Code {
63387	pub fn validate(&self) -> Result<(), ValidationError> {
63388		Ok(())
63389	}
63390}
63391
63392
63393// Organisation23 ...
63394#[cfg_attr(feature = "derive_debug", derive(Debug))]
63395#[cfg_attr(feature = "derive_default", derive(Default))]
63396#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63397#[cfg_attr(feature = "derive_clone", derive(Clone))]
63398#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63399pub struct Organisation23 {
63400	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
63401	pub nm: String,
63402	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtNm", skip_serializing_if = "Option::is_none") )]
63403	pub shrt_nm: Option<String>,
63404	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr") )]
63405	pub pstl_adr: Vec<PostalAddress21>,
63406}
63407
63408impl Organisation23 {
63409	pub fn validate(&self) -> Result<(), ValidationError> {
63410		if self.nm.chars().count() < 1 {
63411			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
63412		}
63413		if self.nm.chars().count() > 350 {
63414			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
63415		}
63416		if let Some(ref val) = self.shrt_nm {
63417			if val.chars().count() < 1 {
63418				return Err(ValidationError::new(1001, "shrt_nm is shorter than the minimum length of 1".to_string()));
63419			}
63420			if val.chars().count() > 35 {
63421				return Err(ValidationError::new(1002, "shrt_nm exceeds the maximum length of 35".to_string()));
63422			}
63423		}
63424		for item in &self.pstl_adr { item.validate()? }
63425		Ok(())
63426	}
63427}
63428
63429
63430// Organisation38 ...
63431#[cfg_attr(feature = "derive_debug", derive(Debug))]
63432#[cfg_attr(feature = "derive_default", derive(Default))]
63433#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63434#[cfg_attr(feature = "derive_clone", derive(Clone))]
63435#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63436pub struct Organisation38 {
63437	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
63438	pub nm: String,
63439	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
63440	pub id: Option<PartyIdentification177Choice>,
63441	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
63442	pub purp: Option<String>,
63443	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxtnCtry", skip_serializing_if = "Option::is_none") )]
63444	pub taxtn_ctry: Option<String>,
63445	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnCtry", skip_serializing_if = "Option::is_none") )]
63446	pub regn_ctry: Option<String>,
63447	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnDt", skip_serializing_if = "Option::is_none") )]
63448	pub regn_dt: Option<String>,
63449	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxIdNb", skip_serializing_if = "Option::is_none") )]
63450	pub tax_id_nb: Option<String>,
63451	#[cfg_attr( feature = "derive_serde", serde(rename = "NtlRegnNb", skip_serializing_if = "Option::is_none") )]
63452	pub ntl_regn_nb: Option<String>,
63453	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr") )]
63454	pub pstl_adr: Vec<PostalAddress3>,
63455	#[cfg_attr( feature = "derive_serde", serde(rename = "PmryComAdr", skip_serializing_if = "Option::is_none") )]
63456	pub pmry_com_adr: Option<CommunicationAddress3>,
63457	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndryComAdr", skip_serializing_if = "Option::is_none") )]
63458	pub scndry_com_adr: Option<CommunicationAddress3>,
63459}
63460
63461impl Organisation38 {
63462	pub fn validate(&self) -> Result<(), ValidationError> {
63463		if self.nm.chars().count() < 1 {
63464			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
63465		}
63466		if self.nm.chars().count() > 140 {
63467			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
63468		}
63469		if let Some(ref val) = self.id { val.validate()? }
63470		if let Some(ref val) = self.purp {
63471			if val.chars().count() < 1 {
63472				return Err(ValidationError::new(1001, "purp is shorter than the minimum length of 1".to_string()));
63473			}
63474			if val.chars().count() > 35 {
63475				return Err(ValidationError::new(1002, "purp exceeds the maximum length of 35".to_string()));
63476			}
63477		}
63478		if let Some(ref val) = self.taxtn_ctry {
63479			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
63480			if !pattern.is_match(val) {
63481				return Err(ValidationError::new(1005, "taxtn_ctry does not match the required pattern".to_string()));
63482			}
63483		}
63484		if let Some(ref val) = self.regn_ctry {
63485			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
63486			if !pattern.is_match(val) {
63487				return Err(ValidationError::new(1005, "regn_ctry does not match the required pattern".to_string()));
63488			}
63489		}
63490		if let Some(ref val) = self.tax_id_nb {
63491			if val.chars().count() < 1 {
63492				return Err(ValidationError::new(1001, "tax_id_nb is shorter than the minimum length of 1".to_string()));
63493			}
63494			if val.chars().count() > 35 {
63495				return Err(ValidationError::new(1002, "tax_id_nb exceeds the maximum length of 35".to_string()));
63496			}
63497		}
63498		if let Some(ref val) = self.ntl_regn_nb {
63499			if val.chars().count() < 1 {
63500				return Err(ValidationError::new(1001, "ntl_regn_nb is shorter than the minimum length of 1".to_string()));
63501			}
63502			if val.chars().count() > 35 {
63503				return Err(ValidationError::new(1002, "ntl_regn_nb exceeds the maximum length of 35".to_string()));
63504			}
63505		}
63506		for item in &self.pstl_adr { item.validate()? }
63507		if let Some(ref val) = self.pmry_com_adr { val.validate()? }
63508		if let Some(ref val) = self.scndry_com_adr { val.validate()? }
63509		Ok(())
63510	}
63511}
63512
63513
63514// Organisation39 ...
63515#[cfg_attr(feature = "derive_debug", derive(Debug))]
63516#[cfg_attr(feature = "derive_default", derive(Default))]
63517#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63518#[cfg_attr(feature = "derive_clone", derive(Clone))]
63519#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63520pub struct Organisation39 {
63521	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
63522	pub nm: Option<String>,
63523	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtNm", skip_serializing_if = "Option::is_none") )]
63524	pub shrt_nm: Option<String>,
63525	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
63526	pub id: Option<PartyIdentification177Choice>,
63527	#[cfg_attr( feature = "derive_serde", serde(rename = "LglNttyIdr", skip_serializing_if = "Option::is_none") )]
63528	pub lgl_ntty_idr: Option<String>,
63529	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
63530	pub purp: Option<String>,
63531	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnCtry", skip_serializing_if = "Option::is_none") )]
63532	pub regn_ctry: Option<String>,
63533	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnDt", skip_serializing_if = "Option::is_none") )]
63534	pub regn_dt: Option<String>,
63535	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
63536	pub pstl_adr: Option<Vec<PostalAddress21>>,
63537	#[cfg_attr( feature = "derive_serde", serde(rename = "TpOfOrg", skip_serializing_if = "Option::is_none") )]
63538	pub tp_of_org: Option<OrganisationType1Choice>,
63539	#[cfg_attr( feature = "derive_serde", serde(rename = "PlcOfListg", skip_serializing_if = "Option::is_none") )]
63540	pub plc_of_listg: Option<Vec<String>>,
63541}
63542
63543impl Organisation39 {
63544	pub fn validate(&self) -> Result<(), ValidationError> {
63545		if let Some(ref val) = self.nm {
63546			if val.chars().count() < 1 {
63547				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
63548			}
63549			if val.chars().count() > 350 {
63550				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
63551			}
63552		}
63553		if let Some(ref val) = self.shrt_nm {
63554			if val.chars().count() < 1 {
63555				return Err(ValidationError::new(1001, "shrt_nm is shorter than the minimum length of 1".to_string()));
63556			}
63557			if val.chars().count() > 35 {
63558				return Err(ValidationError::new(1002, "shrt_nm exceeds the maximum length of 35".to_string()));
63559			}
63560		}
63561		if let Some(ref val) = self.id { val.validate()? }
63562		if let Some(ref val) = self.lgl_ntty_idr {
63563			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
63564			if !pattern.is_match(val) {
63565				return Err(ValidationError::new(1005, "lgl_ntty_idr does not match the required pattern".to_string()));
63566			}
63567		}
63568		if let Some(ref val) = self.purp {
63569			if val.chars().count() < 1 {
63570				return Err(ValidationError::new(1001, "purp is shorter than the minimum length of 1".to_string()));
63571			}
63572			if val.chars().count() > 35 {
63573				return Err(ValidationError::new(1002, "purp exceeds the maximum length of 35".to_string()));
63574			}
63575		}
63576		if let Some(ref val) = self.regn_ctry {
63577			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
63578			if !pattern.is_match(val) {
63579				return Err(ValidationError::new(1005, "regn_ctry does not match the required pattern".to_string()));
63580			}
63581		}
63582		if let Some(ref vec) = self.pstl_adr { for item in vec { item.validate()? } }
63583		if let Some(ref val) = self.tp_of_org { val.validate()? }
63584		if let Some(ref vec) = self.plc_of_listg {
63585			for item in vec {
63586				let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
63587				if !pattern.is_match(&item) {
63588					return Err(ValidationError::new(1005, "plc_of_listg does not match the required pattern".to_string()));
63589				}
63590			}
63591		}
63592		Ok(())
63593	}
63594}
63595
63596
63597// Organisation40 ...
63598#[cfg_attr(feature = "derive_debug", derive(Debug))]
63599#[cfg_attr(feature = "derive_default", derive(Default))]
63600#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63601#[cfg_attr(feature = "derive_clone", derive(Clone))]
63602#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63603pub struct Organisation40 {
63604	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
63605	pub nm: Option<String>,
63606	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtNm", skip_serializing_if = "Option::is_none") )]
63607	pub shrt_nm: Option<String>,
63608	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
63609	pub id: Option<PartyIdentification177Choice>,
63610	#[cfg_attr( feature = "derive_serde", serde(rename = "LglNttyIdr", skip_serializing_if = "Option::is_none") )]
63611	pub lgl_ntty_idr: Option<String>,
63612	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
63613	pub purp: Option<String>,
63614	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnCtry", skip_serializing_if = "Option::is_none") )]
63615	pub regn_ctry: Option<String>,
63616	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnDt", skip_serializing_if = "Option::is_none") )]
63617	pub regn_dt: Option<String>,
63618	#[cfg_attr( feature = "derive_serde", serde(rename = "ModfdPstlAdr", skip_serializing_if = "Option::is_none") )]
63619	pub modfd_pstl_adr: Option<Vec<ModificationScope34>>,
63620	#[cfg_attr( feature = "derive_serde", serde(rename = "TpOfOrg", skip_serializing_if = "Option::is_none") )]
63621	pub tp_of_org: Option<OrganisationType1Choice>,
63622	#[cfg_attr( feature = "derive_serde", serde(rename = "PlcOfListg", skip_serializing_if = "Option::is_none") )]
63623	pub plc_of_listg: Option<Vec<String>>,
63624}
63625
63626impl Organisation40 {
63627	pub fn validate(&self) -> Result<(), ValidationError> {
63628		if let Some(ref val) = self.nm {
63629			if val.chars().count() < 1 {
63630				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
63631			}
63632			if val.chars().count() > 350 {
63633				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
63634			}
63635		}
63636		if let Some(ref val) = self.shrt_nm {
63637			if val.chars().count() < 1 {
63638				return Err(ValidationError::new(1001, "shrt_nm is shorter than the minimum length of 1".to_string()));
63639			}
63640			if val.chars().count() > 35 {
63641				return Err(ValidationError::new(1002, "shrt_nm exceeds the maximum length of 35".to_string()));
63642			}
63643		}
63644		if let Some(ref val) = self.id { val.validate()? }
63645		if let Some(ref val) = self.lgl_ntty_idr {
63646			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
63647			if !pattern.is_match(val) {
63648				return Err(ValidationError::new(1005, "lgl_ntty_idr does not match the required pattern".to_string()));
63649			}
63650		}
63651		if let Some(ref val) = self.purp {
63652			if val.chars().count() < 1 {
63653				return Err(ValidationError::new(1001, "purp is shorter than the minimum length of 1".to_string()));
63654			}
63655			if val.chars().count() > 35 {
63656				return Err(ValidationError::new(1002, "purp exceeds the maximum length of 35".to_string()));
63657			}
63658		}
63659		if let Some(ref val) = self.regn_ctry {
63660			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
63661			if !pattern.is_match(val) {
63662				return Err(ValidationError::new(1005, "regn_ctry does not match the required pattern".to_string()));
63663			}
63664		}
63665		if let Some(ref vec) = self.modfd_pstl_adr { for item in vec { item.validate()? } }
63666		if let Some(ref val) = self.tp_of_org { val.validate()? }
63667		if let Some(ref vec) = self.plc_of_listg {
63668			for item in vec {
63669				let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
63670				if !pattern.is_match(&item) {
63671					return Err(ValidationError::new(1005, "plc_of_listg does not match the required pattern".to_string()));
63672				}
63673			}
63674		}
63675		Ok(())
63676	}
63677}
63678
63679
63680// Organisation42 ...
63681#[cfg_attr(feature = "derive_debug", derive(Debug))]
63682#[cfg_attr(feature = "derive_default", derive(Default))]
63683#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63684#[cfg_attr(feature = "derive_clone", derive(Clone))]
63685#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63686pub struct Organisation42 {
63687	#[cfg_attr( feature = "derive_serde", serde(rename = "FullLglNm") )]
63688	pub full_lgl_nm: String,
63689	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgNm", skip_serializing_if = "Option::is_none") )]
63690	pub tradg_nm: Option<String>,
63691	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfOpr") )]
63692	pub ctry_of_opr: String,
63693	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnDt", skip_serializing_if = "Option::is_none") )]
63694	pub regn_dt: Option<String>,
63695	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlAdr", skip_serializing_if = "Option::is_none") )]
63696	pub oprl_adr: Option<PostalAddress27>,
63697	#[cfg_attr( feature = "derive_serde", serde(rename = "BizAdr", skip_serializing_if = "Option::is_none") )]
63698	pub biz_adr: Option<PostalAddress27>,
63699	#[cfg_attr( feature = "derive_serde", serde(rename = "LglAdr") )]
63700	pub lgl_adr: PostalAddress27,
63701	#[cfg_attr( feature = "derive_serde", serde(rename = "BllgAdr", skip_serializing_if = "Option::is_none") )]
63702	pub bllg_adr: Option<PostalAddress27>,
63703	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgId") )]
63704	pub org_id: OrganisationIdentification39,
63705	#[cfg_attr( feature = "derive_serde", serde(rename = "RprtvOffcr", skip_serializing_if = "Option::is_none") )]
63706	pub rprtv_offcr: Option<Vec<PartyIdentification274>>,
63707	#[cfg_attr( feature = "derive_serde", serde(rename = "TrsrMgr", skip_serializing_if = "Option::is_none") )]
63708	pub trsr_mgr: Option<PartyIdentification274>,
63709	#[cfg_attr( feature = "derive_serde", serde(rename = "MainMndtHldr", skip_serializing_if = "Option::is_none") )]
63710	pub main_mndt_hldr: Option<Vec<PartyIdentification274>>,
63711	#[cfg_attr( feature = "derive_serde", serde(rename = "Sndr", skip_serializing_if = "Option::is_none") )]
63712	pub sndr: Option<Vec<PartyIdentification274>>,
63713	#[cfg_attr( feature = "derive_serde", serde(rename = "LglRprtv", skip_serializing_if = "Option::is_none") )]
63714	pub lgl_rprtv: Option<Vec<PartyIdentification274>>,
63715}
63716
63717impl Organisation42 {
63718	pub fn validate(&self) -> Result<(), ValidationError> {
63719		if self.full_lgl_nm.chars().count() < 1 {
63720			return Err(ValidationError::new(1001, "full_lgl_nm is shorter than the minimum length of 1".to_string()));
63721		}
63722		if self.full_lgl_nm.chars().count() > 350 {
63723			return Err(ValidationError::new(1002, "full_lgl_nm exceeds the maximum length of 350".to_string()));
63724		}
63725		if let Some(ref val) = self.tradg_nm {
63726			if val.chars().count() < 1 {
63727				return Err(ValidationError::new(1001, "tradg_nm is shorter than the minimum length of 1".to_string()));
63728			}
63729			if val.chars().count() > 350 {
63730				return Err(ValidationError::new(1002, "tradg_nm exceeds the maximum length of 350".to_string()));
63731			}
63732		}
63733		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
63734		if !pattern.is_match(&self.ctry_of_opr) {
63735			return Err(ValidationError::new(1005, "ctry_of_opr does not match the required pattern".to_string()));
63736		}
63737		if let Some(ref val) = self.oprl_adr { val.validate()? }
63738		if let Some(ref val) = self.biz_adr { val.validate()? }
63739		self.lgl_adr.validate()?;
63740		if let Some(ref val) = self.bllg_adr { val.validate()? }
63741		self.org_id.validate()?;
63742		if let Some(ref vec) = self.rprtv_offcr { for item in vec { item.validate()? } }
63743		if let Some(ref val) = self.trsr_mgr { val.validate()? }
63744		if let Some(ref vec) = self.main_mndt_hldr { for item in vec { item.validate()? } }
63745		if let Some(ref vec) = self.sndr { for item in vec { item.validate()? } }
63746		if let Some(ref vec) = self.lgl_rprtv { for item in vec { item.validate()? } }
63747		Ok(())
63748	}
63749}
63750
63751
63752// Organisation43 ...
63753#[cfg_attr(feature = "derive_debug", derive(Debug))]
63754#[cfg_attr(feature = "derive_default", derive(Default))]
63755#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63756#[cfg_attr(feature = "derive_clone", derive(Clone))]
63757#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63758pub struct Organisation43 {
63759	#[cfg_attr( feature = "derive_serde", serde(rename = "FullLglNm") )]
63760	pub full_lgl_nm: String,
63761	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgNm", skip_serializing_if = "Option::is_none") )]
63762	pub tradg_nm: Option<String>,
63763	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgLglSts", skip_serializing_if = "Option::is_none") )]
63764	pub org_lgl_sts: Option<OrganisationLegalStatus1Code>,
63765	#[cfg_attr( feature = "derive_serde", serde(rename = "EstblishdDt", skip_serializing_if = "Option::is_none") )]
63766	pub estblishd_dt: Option<String>,
63767	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnNb", skip_serializing_if = "Option::is_none") )]
63768	pub regn_nb: Option<String>,
63769	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnCtry", skip_serializing_if = "Option::is_none") )]
63770	pub regn_ctry: Option<String>,
63771	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnDt", skip_serializing_if = "Option::is_none") )]
63772	pub regn_dt: Option<String>,
63773	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxtnIdNb", skip_serializing_if = "Option::is_none") )]
63774	pub taxtn_id_nb: Option<String>,
63775	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxtnCtry", skip_serializing_if = "Option::is_none") )]
63776	pub taxtn_ctry: Option<String>,
63777	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfOpr", skip_serializing_if = "Option::is_none") )]
63778	pub ctry_of_opr: Option<String>,
63779	#[cfg_attr( feature = "derive_serde", serde(rename = "BrdRsltnInd", skip_serializing_if = "Option::is_none") )]
63780	pub brd_rsltn_ind: Option<bool>,
63781	#[cfg_attr( feature = "derive_serde", serde(rename = "BizAdr", skip_serializing_if = "Option::is_none") )]
63782	pub biz_adr: Option<PostalAddress27>,
63783	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlAdr", skip_serializing_if = "Option::is_none") )]
63784	pub oprl_adr: Option<PostalAddress27>,
63785	#[cfg_attr( feature = "derive_serde", serde(rename = "LglAdr", skip_serializing_if = "Option::is_none") )]
63786	pub lgl_adr: Option<PostalAddress27>,
63787	#[cfg_attr( feature = "derive_serde", serde(rename = "RprtvOffcr", skip_serializing_if = "Option::is_none") )]
63788	pub rprtv_offcr: Option<Vec<PartyIdentification272>>,
63789	#[cfg_attr( feature = "derive_serde", serde(rename = "TrsrMgr", skip_serializing_if = "Option::is_none") )]
63790	pub trsr_mgr: Option<PartyIdentification272>,
63791	#[cfg_attr( feature = "derive_serde", serde(rename = "MainMndtHldr", skip_serializing_if = "Option::is_none") )]
63792	pub main_mndt_hldr: Option<Vec<PartyIdentification272>>,
63793	#[cfg_attr( feature = "derive_serde", serde(rename = "Sndr", skip_serializing_if = "Option::is_none") )]
63794	pub sndr: Option<Vec<PartyIdentification272>>,
63795}
63796
63797impl Organisation43 {
63798	pub fn validate(&self) -> Result<(), ValidationError> {
63799		if self.full_lgl_nm.chars().count() < 1 {
63800			return Err(ValidationError::new(1001, "full_lgl_nm is shorter than the minimum length of 1".to_string()));
63801		}
63802		if self.full_lgl_nm.chars().count() > 350 {
63803			return Err(ValidationError::new(1002, "full_lgl_nm exceeds the maximum length of 350".to_string()));
63804		}
63805		if let Some(ref val) = self.tradg_nm {
63806			if val.chars().count() < 1 {
63807				return Err(ValidationError::new(1001, "tradg_nm is shorter than the minimum length of 1".to_string()));
63808			}
63809			if val.chars().count() > 350 {
63810				return Err(ValidationError::new(1002, "tradg_nm exceeds the maximum length of 350".to_string()));
63811			}
63812		}
63813		if let Some(ref val) = self.org_lgl_sts { val.validate()? }
63814		if let Some(ref val) = self.regn_nb {
63815			if val.chars().count() < 1 {
63816				return Err(ValidationError::new(1001, "regn_nb is shorter than the minimum length of 1".to_string()));
63817			}
63818			if val.chars().count() > 70 {
63819				return Err(ValidationError::new(1002, "regn_nb exceeds the maximum length of 70".to_string()));
63820			}
63821		}
63822		if let Some(ref val) = self.regn_ctry {
63823			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
63824			if !pattern.is_match(val) {
63825				return Err(ValidationError::new(1005, "regn_ctry does not match the required pattern".to_string()));
63826			}
63827		}
63828		if let Some(ref val) = self.taxtn_id_nb {
63829			if val.chars().count() < 1 {
63830				return Err(ValidationError::new(1001, "taxtn_id_nb is shorter than the minimum length of 1".to_string()));
63831			}
63832			if val.chars().count() > 35 {
63833				return Err(ValidationError::new(1002, "taxtn_id_nb exceeds the maximum length of 35".to_string()));
63834			}
63835		}
63836		if let Some(ref val) = self.taxtn_ctry {
63837			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
63838			if !pattern.is_match(val) {
63839				return Err(ValidationError::new(1005, "taxtn_ctry does not match the required pattern".to_string()));
63840			}
63841		}
63842		if let Some(ref val) = self.ctry_of_opr {
63843			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
63844			if !pattern.is_match(val) {
63845				return Err(ValidationError::new(1005, "ctry_of_opr does not match the required pattern".to_string()));
63846			}
63847		}
63848		if let Some(ref val) = self.biz_adr { val.validate()? }
63849		if let Some(ref val) = self.oprl_adr { val.validate()? }
63850		if let Some(ref val) = self.lgl_adr { val.validate()? }
63851		if let Some(ref vec) = self.rprtv_offcr { for item in vec { item.validate()? } }
63852		if let Some(ref val) = self.trsr_mgr { val.validate()? }
63853		if let Some(ref vec) = self.main_mndt_hldr { for item in vec { item.validate()? } }
63854		if let Some(ref vec) = self.sndr { for item in vec { item.validate()? } }
63855		Ok(())
63856	}
63857}
63858
63859
63860// Organisation44 ...
63861#[cfg_attr(feature = "derive_debug", derive(Debug))]
63862#[cfg_attr(feature = "derive_default", derive(Default))]
63863#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63864#[cfg_attr(feature = "derive_clone", derive(Clone))]
63865#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63866pub struct Organisation44 {
63867	#[cfg_attr( feature = "derive_serde", serde(rename = "FullLglNm", skip_serializing_if = "Option::is_none") )]
63868	pub full_lgl_nm: Option<String>,
63869	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgId") )]
63870	pub org_id: OrganisationIdentification39,
63871}
63872
63873impl Organisation44 {
63874	pub fn validate(&self) -> Result<(), ValidationError> {
63875		if let Some(ref val) = self.full_lgl_nm {
63876			if val.chars().count() < 1 {
63877				return Err(ValidationError::new(1001, "full_lgl_nm is shorter than the minimum length of 1".to_string()));
63878			}
63879			if val.chars().count() > 350 {
63880				return Err(ValidationError::new(1002, "full_lgl_nm exceeds the maximum length of 350".to_string()));
63881			}
63882		}
63883		self.org_id.validate()?;
63884		Ok(())
63885	}
63886}
63887
63888
63889// OrganisationIdentification15Choice ...
63890#[cfg_attr(feature = "derive_debug", derive(Debug))]
63891#[cfg_attr(feature = "derive_default", derive(Default))]
63892#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63893#[cfg_attr(feature = "derive_clone", derive(Clone))]
63894#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63895pub struct OrganisationIdentification15Choice {
63896	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
63897	pub lei: Option<String>,
63898	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
63899	pub othr: Option<OrganisationIdentification38>,
63900	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
63901	pub any_bic: Option<String>,
63902}
63903
63904impl OrganisationIdentification15Choice {
63905	pub fn validate(&self) -> Result<(), ValidationError> {
63906		if let Some(ref val) = self.lei {
63907			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
63908			if !pattern.is_match(val) {
63909				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
63910			}
63911		}
63912		if let Some(ref val) = self.othr { val.validate()? }
63913		if let Some(ref val) = self.any_bic {
63914			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
63915			if !pattern.is_match(val) {
63916				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
63917			}
63918		}
63919		Ok(())
63920	}
63921}
63922
63923
63924// OrganisationIdentification28 ...
63925#[cfg_attr(feature = "derive_debug", derive(Debug))]
63926#[cfg_attr(feature = "derive_default", derive(Default))]
63927#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63928#[cfg_attr(feature = "derive_clone", derive(Clone))]
63929#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63930pub struct OrganisationIdentification28 {
63931	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
63932	pub nm: Option<String>,
63933	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
63934	pub pstl_adr: Option<PostalAddress6>,
63935	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
63936	pub id: Option<OrganisationIdentification8>,
63937	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfRes", skip_serializing_if = "Option::is_none") )]
63938	pub ctry_of_res: Option<String>,
63939	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctDtls") )]
63940	pub ctct_dtls: ContactDetails2,
63941}
63942
63943impl OrganisationIdentification28 {
63944	pub fn validate(&self) -> Result<(), ValidationError> {
63945		if let Some(ref val) = self.nm {
63946			if val.chars().count() < 1 {
63947				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
63948			}
63949			if val.chars().count() > 140 {
63950				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
63951			}
63952		}
63953		if let Some(ref val) = self.pstl_adr { val.validate()? }
63954		if let Some(ref val) = self.id { val.validate()? }
63955		if let Some(ref val) = self.ctry_of_res {
63956			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
63957			if !pattern.is_match(val) {
63958				return Err(ValidationError::new(1005, "ctry_of_res does not match the required pattern".to_string()));
63959			}
63960		}
63961		self.ctct_dtls.validate()?;
63962		Ok(())
63963	}
63964}
63965
63966
63967// OrganisationIdentification29 ...
63968#[cfg_attr(feature = "derive_debug", derive(Debug))]
63969#[cfg_attr(feature = "derive_default", derive(Default))]
63970#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
63971#[cfg_attr(feature = "derive_clone", derive(Clone))]
63972#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
63973pub struct OrganisationIdentification29 {
63974	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
63975	pub any_bic: Option<String>,
63976	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
63977	pub lei: Option<String>,
63978	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
63979	pub othr: Option<Vec<GenericOrganisationIdentification1>>,
63980}
63981
63982impl OrganisationIdentification29 {
63983	pub fn validate(&self) -> Result<(), ValidationError> {
63984		if let Some(ref val) = self.any_bic {
63985			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
63986			if !pattern.is_match(val) {
63987				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
63988			}
63989		}
63990		if let Some(ref val) = self.lei {
63991			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
63992			if !pattern.is_match(val) {
63993				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
63994			}
63995		}
63996		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
63997		Ok(())
63998	}
63999}
64000
64001
64002// OrganisationIdentification38 ...
64003#[cfg_attr(feature = "derive_debug", derive(Debug))]
64004#[cfg_attr(feature = "derive_default", derive(Default))]
64005#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64006#[cfg_attr(feature = "derive_clone", derive(Clone))]
64007#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64008pub struct OrganisationIdentification38 {
64009	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
64010	pub id: GenericIdentification175,
64011	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
64012	pub nm: Option<String>,
64013	#[cfg_attr( feature = "derive_serde", serde(rename = "Dmcl", skip_serializing_if = "Option::is_none") )]
64014	pub dmcl: Option<String>,
64015}
64016
64017impl OrganisationIdentification38 {
64018	pub fn validate(&self) -> Result<(), ValidationError> {
64019		self.id.validate()?;
64020		if let Some(ref val) = self.nm {
64021			if val.chars().count() < 1 {
64022				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
64023			}
64024			if val.chars().count() > 105 {
64025				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 105".to_string()));
64026			}
64027		}
64028		if let Some(ref val) = self.dmcl {
64029			if val.chars().count() < 1 {
64030				return Err(ValidationError::new(1001, "dmcl is shorter than the minimum length of 1".to_string()));
64031			}
64032			if val.chars().count() > 500 {
64033				return Err(ValidationError::new(1002, "dmcl exceeds the maximum length of 500".to_string()));
64034			}
64035		}
64036		Ok(())
64037	}
64038}
64039
64040
64041// OrganisationIdentification39 ...
64042#[cfg_attr(feature = "derive_debug", derive(Debug))]
64043#[cfg_attr(feature = "derive_default", derive(Default))]
64044#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64045#[cfg_attr(feature = "derive_clone", derive(Clone))]
64046#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64047pub struct OrganisationIdentification39 {
64048	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
64049	pub any_bic: Option<String>,
64050	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
64051	pub lei: Option<String>,
64052	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
64053	pub othr: Option<Vec<GenericOrganisationIdentification3>>,
64054}
64055
64056impl OrganisationIdentification39 {
64057	pub fn validate(&self) -> Result<(), ValidationError> {
64058		if let Some(ref val) = self.any_bic {
64059			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
64060			if !pattern.is_match(val) {
64061				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
64062			}
64063		}
64064		if let Some(ref val) = self.lei {
64065			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
64066			if !pattern.is_match(val) {
64067				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
64068			}
64069		}
64070		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
64071		Ok(())
64072	}
64073}
64074
64075
64076// OrganisationIdentification40 ...
64077#[cfg_attr(feature = "derive_debug", derive(Debug))]
64078#[cfg_attr(feature = "derive_default", derive(Default))]
64079#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64080#[cfg_attr(feature = "derive_clone", derive(Clone))]
64081#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64082pub struct OrganisationIdentification40 {
64083	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
64084	pub any_bic: Option<String>,
64085	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
64086	pub lei: Option<String>,
64087	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailAdr", skip_serializing_if = "Option::is_none") )]
64088	pub email_adr: Option<String>,
64089	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
64090	pub othr: Option<Vec<GenericOrganisationIdentification3>>,
64091}
64092
64093impl OrganisationIdentification40 {
64094	pub fn validate(&self) -> Result<(), ValidationError> {
64095		if let Some(ref val) = self.any_bic {
64096			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
64097			if !pattern.is_match(val) {
64098				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
64099			}
64100		}
64101		if let Some(ref val) = self.lei {
64102			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
64103			if !pattern.is_match(val) {
64104				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
64105			}
64106		}
64107		if let Some(ref val) = self.email_adr {
64108			if val.chars().count() < 1 {
64109				return Err(ValidationError::new(1001, "email_adr is shorter than the minimum length of 1".to_string()));
64110			}
64111			if val.chars().count() > 256 {
64112				return Err(ValidationError::new(1002, "email_adr exceeds the maximum length of 256".to_string()));
64113			}
64114		}
64115		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
64116		Ok(())
64117	}
64118}
64119
64120
64121// OrganisationIdentification8 ...
64122#[cfg_attr(feature = "derive_debug", derive(Debug))]
64123#[cfg_attr(feature = "derive_default", derive(Default))]
64124#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64125#[cfg_attr(feature = "derive_clone", derive(Clone))]
64126#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64127pub struct OrganisationIdentification8 {
64128	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
64129	pub any_bic: Option<String>,
64130	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
64131	pub othr: Option<Vec<GenericOrganisationIdentification1>>,
64132}
64133
64134impl OrganisationIdentification8 {
64135	pub fn validate(&self) -> Result<(), ValidationError> {
64136		if let Some(ref val) = self.any_bic {
64137			let pattern = Regex::new("[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}").unwrap();
64138			if !pattern.is_match(val) {
64139				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
64140			}
64141		}
64142		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
64143		Ok(())
64144	}
64145}
64146
64147
64148// OrganisationIdentificationSchemeName1Choice ...
64149#[cfg_attr(feature = "derive_debug", derive(Debug))]
64150#[cfg_attr(feature = "derive_default", derive(Default))]
64151#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64152#[cfg_attr(feature = "derive_clone", derive(Clone))]
64153#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64154pub struct OrganisationIdentificationSchemeName1Choice {
64155	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
64156	pub cd: Option<String>,
64157	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
64158	pub prtry: Option<String>,
64159}
64160
64161impl OrganisationIdentificationSchemeName1Choice {
64162	pub fn validate(&self) -> Result<(), ValidationError> {
64163		if let Some(ref val) = self.cd {
64164			if val.chars().count() < 1 {
64165				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
64166			}
64167			if val.chars().count() > 4 {
64168				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
64169			}
64170		}
64171		if let Some(ref val) = self.prtry {
64172			if val.chars().count() < 1 {
64173				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
64174			}
64175			if val.chars().count() > 35 {
64176				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
64177			}
64178		}
64179		Ok(())
64180	}
64181}
64182
64183
64184// OrganisationLegalStatus1Code ...
64185#[cfg_attr(feature = "derive_debug", derive(Debug))]
64186#[cfg_attr(feature = "derive_default", derive(Default))]
64187#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64188#[cfg_attr(feature = "derive_clone", derive(Clone))]
64189#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64190pub enum OrganisationLegalStatus1Code {
64191	#[cfg_attr(feature = "derive_default", default)]
64192	#[cfg_attr( feature = "derive_serde", serde(rename = "CIOC") )]
64193	CodeCIOC,
64194	#[cfg_attr( feature = "derive_serde", serde(rename = "CHAR") )]
64195	CodeCHAR,
64196	#[cfg_attr( feature = "derive_serde", serde(rename = "CICC") )]
64197	CodeCICC,
64198	#[cfg_attr( feature = "derive_serde", serde(rename = "GENP") )]
64199	CodeGENP,
64200	#[cfg_attr( feature = "derive_serde", serde(rename = "IAPS") )]
64201	CodeIAPS,
64202	#[cfg_attr( feature = "derive_serde", serde(rename = "LLPP") )]
64203	CodeLLPP,
64204	#[cfg_attr( feature = "derive_serde", serde(rename = "PCLG") )]
64205	CodePCLG,
64206	#[cfg_attr( feature = "derive_serde", serde(rename = "LIMP") )]
64207	CodeLIMP,
64208	#[cfg_attr( feature = "derive_serde", serde(rename = "PCLS") )]
64209	CodePCLS,
64210	#[cfg_attr( feature = "derive_serde", serde(rename = "PCLC") )]
64211	CodePCLC,
64212	#[cfg_attr( feature = "derive_serde", serde(rename = "SOLE") )]
64213	CodeSOLE,
64214	#[cfg_attr( feature = "derive_serde", serde(rename = "UNLC") )]
64215	CodeUNLC,
64216	#[cfg_attr( feature = "derive_serde", serde(rename = "UNLT") )]
64217	CodeUNLT,
64218}
64219
64220impl OrganisationLegalStatus1Code {
64221	pub fn validate(&self) -> Result<(), ValidationError> {
64222		Ok(())
64223	}
64224}
64225
64226
64227// OrganisationModification3 ...
64228#[cfg_attr(feature = "derive_debug", derive(Debug))]
64229#[cfg_attr(feature = "derive_default", derive(Default))]
64230#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64231#[cfg_attr(feature = "derive_clone", derive(Clone))]
64232#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64233pub struct OrganisationModification3 {
64234	#[cfg_attr( feature = "derive_serde", serde(rename = "FullLglNm") )]
64235	pub full_lgl_nm: FullLegalNameModification1,
64236	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgNm", skip_serializing_if = "Option::is_none") )]
64237	pub tradg_nm: Option<TradingNameModification1>,
64238	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfOpr") )]
64239	pub ctry_of_opr: String,
64240	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnDt", skip_serializing_if = "Option::is_none") )]
64241	pub regn_dt: Option<String>,
64242	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlAdr", skip_serializing_if = "Option::is_none") )]
64243	pub oprl_adr: Option<AddressModification3>,
64244	#[cfg_attr( feature = "derive_serde", serde(rename = "BizAdr", skip_serializing_if = "Option::is_none") )]
64245	pub biz_adr: Option<AddressModification3>,
64246	#[cfg_attr( feature = "derive_serde", serde(rename = "LglAdr") )]
64247	pub lgl_adr: AddressModification3,
64248	#[cfg_attr( feature = "derive_serde", serde(rename = "BllgAdr", skip_serializing_if = "Option::is_none") )]
64249	pub bllg_adr: Option<AddressModification3>,
64250	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgId") )]
64251	pub org_id: OrganisationIdentification39,
64252	#[cfg_attr( feature = "derive_serde", serde(rename = "RprtvOffcr", skip_serializing_if = "Option::is_none") )]
64253	pub rprtv_offcr: Option<Vec<PartyModification3>>,
64254	#[cfg_attr( feature = "derive_serde", serde(rename = "TrsrMgr", skip_serializing_if = "Option::is_none") )]
64255	pub trsr_mgr: Option<PartyModification3>,
64256	#[cfg_attr( feature = "derive_serde", serde(rename = "MainMndtHldr", skip_serializing_if = "Option::is_none") )]
64257	pub main_mndt_hldr: Option<Vec<PartyModification3>>,
64258	#[cfg_attr( feature = "derive_serde", serde(rename = "Sndr", skip_serializing_if = "Option::is_none") )]
64259	pub sndr: Option<Vec<PartyModification3>>,
64260	#[cfg_attr( feature = "derive_serde", serde(rename = "LglRprtv", skip_serializing_if = "Option::is_none") )]
64261	pub lgl_rprtv: Option<Vec<PartyModification3>>,
64262}
64263
64264impl OrganisationModification3 {
64265	pub fn validate(&self) -> Result<(), ValidationError> {
64266		self.full_lgl_nm.validate()?;
64267		if let Some(ref val) = self.tradg_nm { val.validate()? }
64268		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
64269		if !pattern.is_match(&self.ctry_of_opr) {
64270			return Err(ValidationError::new(1005, "ctry_of_opr does not match the required pattern".to_string()));
64271		}
64272		if let Some(ref val) = self.oprl_adr { val.validate()? }
64273		if let Some(ref val) = self.biz_adr { val.validate()? }
64274		self.lgl_adr.validate()?;
64275		if let Some(ref val) = self.bllg_adr { val.validate()? }
64276		self.org_id.validate()?;
64277		if let Some(ref vec) = self.rprtv_offcr { for item in vec { item.validate()? } }
64278		if let Some(ref val) = self.trsr_mgr { val.validate()? }
64279		if let Some(ref vec) = self.main_mndt_hldr { for item in vec { item.validate()? } }
64280		if let Some(ref vec) = self.sndr { for item in vec { item.validate()? } }
64281		if let Some(ref vec) = self.lgl_rprtv { for item in vec { item.validate()? } }
64282		Ok(())
64283	}
64284}
64285
64286
64287// OrganisationType1Choice ...
64288#[cfg_attr(feature = "derive_debug", derive(Debug))]
64289#[cfg_attr(feature = "derive_default", derive(Default))]
64290#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64291#[cfg_attr(feature = "derive_clone", derive(Clone))]
64292#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64293pub struct OrganisationType1Choice {
64294	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
64295	pub cd: Option<OrganisationType1Code>,
64296	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
64297	pub prtry: Option<GenericIdentification47>,
64298}
64299
64300impl OrganisationType1Choice {
64301	pub fn validate(&self) -> Result<(), ValidationError> {
64302		if let Some(ref val) = self.cd { val.validate()? }
64303		if let Some(ref val) = self.prtry { val.validate()? }
64304		Ok(())
64305	}
64306}
64307
64308
64309// OrganisationType1Code ...
64310#[cfg_attr(feature = "derive_debug", derive(Debug))]
64311#[cfg_attr(feature = "derive_default", derive(Default))]
64312#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64313#[cfg_attr(feature = "derive_clone", derive(Clone))]
64314#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64315pub enum OrganisationType1Code {
64316	#[cfg_attr(feature = "derive_default", default)]
64317	#[cfg_attr( feature = "derive_serde", serde(rename = "IFUN") )]
64318	CodeIFUN,
64319	#[cfg_attr( feature = "derive_serde", serde(rename = "PRIV") )]
64320	CodePRIV,
64321	#[cfg_attr( feature = "derive_serde", serde(rename = "PUBL") )]
64322	CodePUBL,
64323	#[cfg_attr( feature = "derive_serde", serde(rename = "PFUN") )]
64324	CodePFUN,
64325}
64326
64327impl OrganisationType1Code {
64328	pub fn validate(&self) -> Result<(), ValidationError> {
64329		Ok(())
64330	}
64331}
64332
64333
64334// OrganisationType2 ...
64335#[cfg_attr(feature = "derive_debug", derive(Debug))]
64336#[cfg_attr(feature = "derive_default", derive(Default))]
64337#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64338#[cfg_attr(feature = "derive_clone", derive(Clone))]
64339#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64340pub struct OrganisationType2 {
64341	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
64342	pub any_bic: Option<bool>,
64343	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
64344	pub lei: Option<bool>,
64345	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailAdr", skip_serializing_if = "Option::is_none") )]
64346	pub email_adr: Option<bool>,
64347	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
64348	pub othr: Option<Vec<GenericOrganisationType1>>,
64349}
64350
64351impl OrganisationType2 {
64352	pub fn validate(&self) -> Result<(), ValidationError> {
64353		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
64354		Ok(())
64355	}
64356}
64357
64358
64359// OriginalActivation3Choice ...
64360#[cfg_attr(feature = "derive_debug", derive(Debug))]
64361#[cfg_attr(feature = "derive_default", derive(Default))]
64362#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64363#[cfg_attr(feature = "derive_clone", derive(Clone))]
64364#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64365pub struct OriginalActivation3Choice {
64366	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlDbtrId", skip_serializing_if = "Option::is_none") )]
64367	pub orgnl_dbtr_id: Option<Party53Choice>,
64368	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlActvtnData", skip_serializing_if = "Option::is_none") )]
64369	pub orgnl_actvtn_data: Option<DebtorActivation5>,
64370}
64371
64372impl OriginalActivation3Choice {
64373	pub fn validate(&self) -> Result<(), ValidationError> {
64374		if let Some(ref val) = self.orgnl_dbtr_id { val.validate()? }
64375		if let Some(ref val) = self.orgnl_actvtn_data { val.validate()? }
64376		Ok(())
64377	}
64378}
64379
64380
64381// OriginalAndCurrentQuantities1 ...
64382#[cfg_attr(feature = "derive_debug", derive(Debug))]
64383#[cfg_attr(feature = "derive_default", derive(Default))]
64384#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64385#[cfg_attr(feature = "derive_clone", derive(Clone))]
64386#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64387pub struct OriginalAndCurrentQuantities1 {
64388	#[cfg_attr( feature = "derive_serde", serde(rename = "FaceAmt") )]
64389	pub face_amt: f64,
64390	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtsdVal") )]
64391	pub amtsd_val: f64,
64392}
64393
64394impl OriginalAndCurrentQuantities1 {
64395	pub fn validate(&self) -> Result<(), ValidationError> {
64396		Ok(())
64397	}
64398}
64399
64400
64401// OriginalBusinessInstruction1 ...
64402#[cfg_attr(feature = "derive_debug", derive(Debug))]
64403#[cfg_attr(feature = "derive_default", derive(Default))]
64404#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64405#[cfg_attr(feature = "derive_clone", derive(Clone))]
64406#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64407pub struct OriginalBusinessInstruction1 {
64408	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
64409	pub msg_id: String,
64410	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNmId", skip_serializing_if = "Option::is_none") )]
64411	pub msg_nm_id: Option<String>,
64412	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
64413	pub cre_dt_tm: Option<String>,
64414}
64415
64416impl OriginalBusinessInstruction1 {
64417	pub fn validate(&self) -> Result<(), ValidationError> {
64418		if self.msg_id.chars().count() < 1 {
64419			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
64420		}
64421		if self.msg_id.chars().count() > 35 {
64422			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
64423		}
64424		if let Some(ref val) = self.msg_nm_id {
64425			if val.chars().count() < 1 {
64426				return Err(ValidationError::new(1001, "msg_nm_id is shorter than the minimum length of 1".to_string()));
64427			}
64428			if val.chars().count() > 35 {
64429				return Err(ValidationError::new(1002, "msg_nm_id exceeds the maximum length of 35".to_string()));
64430			}
64431		}
64432		Ok(())
64433	}
64434}
64435
64436
64437// OriginalBusinessQuery1 ...
64438#[cfg_attr(feature = "derive_debug", derive(Debug))]
64439#[cfg_attr(feature = "derive_default", derive(Default))]
64440#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64441#[cfg_attr(feature = "derive_clone", derive(Clone))]
64442#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64443pub struct OriginalBusinessQuery1 {
64444	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
64445	pub msg_id: String,
64446	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNmId", skip_serializing_if = "Option::is_none") )]
64447	pub msg_nm_id: Option<String>,
64448	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
64449	pub cre_dt_tm: Option<String>,
64450}
64451
64452impl OriginalBusinessQuery1 {
64453	pub fn validate(&self) -> Result<(), ValidationError> {
64454		if self.msg_id.chars().count() < 1 {
64455			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
64456		}
64457		if self.msg_id.chars().count() > 35 {
64458			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
64459		}
64460		if let Some(ref val) = self.msg_nm_id {
64461			if val.chars().count() < 1 {
64462				return Err(ValidationError::new(1001, "msg_nm_id is shorter than the minimum length of 1".to_string()));
64463			}
64464			if val.chars().count() > 35 {
64465				return Err(ValidationError::new(1002, "msg_nm_id exceeds the maximum length of 35".to_string()));
64466			}
64467		}
64468		Ok(())
64469	}
64470}
64471
64472
64473// OriginalEnrolment3Choice ...
64474#[cfg_attr(feature = "derive_debug", derive(Debug))]
64475#[cfg_attr(feature = "derive_default", derive(Default))]
64476#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64477#[cfg_attr(feature = "derive_clone", derive(Clone))]
64478#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64479pub struct OriginalEnrolment3Choice {
64480	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCdtrId", skip_serializing_if = "Option::is_none") )]
64481	pub orgnl_cdtr_id: Option<Party53Choice>,
64482	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEnrlmntData", skip_serializing_if = "Option::is_none") )]
64483	pub orgnl_enrlmnt_data: Option<CreditorEnrolment5>,
64484}
64485
64486impl OriginalEnrolment3Choice {
64487	pub fn validate(&self) -> Result<(), ValidationError> {
64488		if let Some(ref val) = self.orgnl_cdtr_id { val.validate()? }
64489		if let Some(ref val) = self.orgnl_enrlmnt_data { val.validate()? }
64490		Ok(())
64491	}
64492}
64493
64494
64495// OriginalGroupHeader17 ...
64496#[cfg_attr(feature = "derive_debug", derive(Debug))]
64497#[cfg_attr(feature = "derive_default", derive(Default))]
64498#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64499#[cfg_attr(feature = "derive_clone", derive(Clone))]
64500#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64501pub struct OriginalGroupHeader17 {
64502	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
64503	pub orgnl_msg_id: String,
64504	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgNmId") )]
64505	pub orgnl_msg_nm_id: String,
64506	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCreDtTm", skip_serializing_if = "Option::is_none") )]
64507	pub orgnl_cre_dt_tm: Option<String>,
64508	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNbOfTxs", skip_serializing_if = "Option::is_none") )]
64509	pub orgnl_nb_of_txs: Option<String>,
64510	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCtrlSum", skip_serializing_if = "Option::is_none") )]
64511	pub orgnl_ctrl_sum: Option<f64>,
64512	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpSts", skip_serializing_if = "Option::is_none") )]
64513	pub grp_sts: Option<String>,
64514	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsnInf", skip_serializing_if = "Option::is_none") )]
64515	pub sts_rsn_inf: Option<Vec<StatusReasonInformation12>>,
64516	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxsPerSts", skip_serializing_if = "Option::is_none") )]
64517	pub nb_of_txs_per_sts: Option<Vec<NumberOfTransactionsPerStatus5>>,
64518}
64519
64520impl OriginalGroupHeader17 {
64521	pub fn validate(&self) -> Result<(), ValidationError> {
64522		if self.orgnl_msg_id.chars().count() < 1 {
64523			return Err(ValidationError::new(1001, "orgnl_msg_id is shorter than the minimum length of 1".to_string()));
64524		}
64525		if self.orgnl_msg_id.chars().count() > 35 {
64526			return Err(ValidationError::new(1002, "orgnl_msg_id exceeds the maximum length of 35".to_string()));
64527		}
64528		if self.orgnl_msg_nm_id.chars().count() < 1 {
64529			return Err(ValidationError::new(1001, "orgnl_msg_nm_id is shorter than the minimum length of 1".to_string()));
64530		}
64531		if self.orgnl_msg_nm_id.chars().count() > 35 {
64532			return Err(ValidationError::new(1002, "orgnl_msg_nm_id exceeds the maximum length of 35".to_string()));
64533		}
64534		if let Some(ref val) = self.orgnl_nb_of_txs {
64535			let pattern = Regex::new("[0-9]{1,15}").unwrap();
64536			if !pattern.is_match(val) {
64537				return Err(ValidationError::new(1005, "orgnl_nb_of_txs does not match the required pattern".to_string()));
64538			}
64539		}
64540		if let Some(ref val) = self.grp_sts {
64541			if val.chars().count() < 1 {
64542				return Err(ValidationError::new(1001, "grp_sts is shorter than the minimum length of 1".to_string()));
64543			}
64544			if val.chars().count() > 4 {
64545				return Err(ValidationError::new(1002, "grp_sts exceeds the maximum length of 4".to_string()));
64546			}
64547		}
64548		if let Some(ref vec) = self.sts_rsn_inf { for item in vec { item.validate()? } }
64549		if let Some(ref vec) = self.nb_of_txs_per_sts { for item in vec { item.validate()? } }
64550		Ok(())
64551	}
64552}
64553
64554
64555// OriginalGroupHeader19 ...
64556#[cfg_attr(feature = "derive_debug", derive(Debug))]
64557#[cfg_attr(feature = "derive_default", derive(Default))]
64558#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64559#[cfg_attr(feature = "derive_clone", derive(Clone))]
64560#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64561pub struct OriginalGroupHeader19 {
64562	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
64563	pub orgnl_msg_id: String,
64564	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgNmId") )]
64565	pub orgnl_msg_nm_id: String,
64566	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCreDtTm", skip_serializing_if = "Option::is_none") )]
64567	pub orgnl_cre_dt_tm: Option<String>,
64568	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrRsnInf", skip_serializing_if = "Option::is_none") )]
64569	pub rtr_rsn_inf: Option<Vec<PaymentReturnReason7>>,
64570}
64571
64572impl OriginalGroupHeader19 {
64573	pub fn validate(&self) -> Result<(), ValidationError> {
64574		if self.orgnl_msg_id.chars().count() < 1 {
64575			return Err(ValidationError::new(1001, "orgnl_msg_id is shorter than the minimum length of 1".to_string()));
64576		}
64577		if self.orgnl_msg_id.chars().count() > 35 {
64578			return Err(ValidationError::new(1002, "orgnl_msg_id exceeds the maximum length of 35".to_string()));
64579		}
64580		if self.orgnl_msg_nm_id.chars().count() < 1 {
64581			return Err(ValidationError::new(1001, "orgnl_msg_nm_id is shorter than the minimum length of 1".to_string()));
64582		}
64583		if self.orgnl_msg_nm_id.chars().count() > 35 {
64584			return Err(ValidationError::new(1002, "orgnl_msg_nm_id exceeds the maximum length of 35".to_string()));
64585		}
64586		if let Some(ref vec) = self.rtr_rsn_inf { for item in vec { item.validate()? } }
64587		Ok(())
64588	}
64589}
64590
64591
64592// OriginalGroupHeader20 ...
64593#[cfg_attr(feature = "derive_debug", derive(Debug))]
64594#[cfg_attr(feature = "derive_default", derive(Default))]
64595#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64596#[cfg_attr(feature = "derive_clone", derive(Clone))]
64597#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64598pub struct OriginalGroupHeader20 {
64599	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
64600	pub orgnl_msg_id: String,
64601	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgNmId") )]
64602	pub orgnl_msg_nm_id: String,
64603	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCreDtTm", skip_serializing_if = "Option::is_none") )]
64604	pub orgnl_cre_dt_tm: Option<String>,
64605	#[cfg_attr( feature = "derive_serde", serde(rename = "RvslRsnInf", skip_serializing_if = "Option::is_none") )]
64606	pub rvsl_rsn_inf: Option<Vec<PaymentReversalReason10>>,
64607}
64608
64609impl OriginalGroupHeader20 {
64610	pub fn validate(&self) -> Result<(), ValidationError> {
64611		if self.orgnl_msg_id.chars().count() < 1 {
64612			return Err(ValidationError::new(1001, "orgnl_msg_id is shorter than the minimum length of 1".to_string()));
64613		}
64614		if self.orgnl_msg_id.chars().count() > 35 {
64615			return Err(ValidationError::new(1002, "orgnl_msg_id exceeds the maximum length of 35".to_string()));
64616		}
64617		if self.orgnl_msg_nm_id.chars().count() < 1 {
64618			return Err(ValidationError::new(1001, "orgnl_msg_nm_id is shorter than the minimum length of 1".to_string()));
64619		}
64620		if self.orgnl_msg_nm_id.chars().count() > 35 {
64621			return Err(ValidationError::new(1002, "orgnl_msg_nm_id exceeds the maximum length of 35".to_string()));
64622		}
64623		if let Some(ref vec) = self.rvsl_rsn_inf { for item in vec { item.validate()? } }
64624		Ok(())
64625	}
64626}
64627
64628
64629// OriginalGroupHeader21 ...
64630#[cfg_attr(feature = "derive_debug", derive(Debug))]
64631#[cfg_attr(feature = "derive_default", derive(Default))]
64632#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64633#[cfg_attr(feature = "derive_clone", derive(Clone))]
64634#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64635pub struct OriginalGroupHeader21 {
64636	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpCxlId", skip_serializing_if = "Option::is_none") )]
64637	pub grp_cxl_id: Option<String>,
64638	#[cfg_attr( feature = "derive_serde", serde(rename = "Case", skip_serializing_if = "Option::is_none") )]
64639	pub case: Option<Case6>,
64640	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
64641	pub orgnl_msg_id: String,
64642	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgNmId") )]
64643	pub orgnl_msg_nm_id: String,
64644	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCreDtTm", skip_serializing_if = "Option::is_none") )]
64645	pub orgnl_cre_dt_tm: Option<String>,
64646	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs", skip_serializing_if = "Option::is_none") )]
64647	pub nb_of_txs: Option<String>,
64648	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
64649	pub ctrl_sum: Option<f64>,
64650	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpCxl", skip_serializing_if = "Option::is_none") )]
64651	pub grp_cxl: Option<bool>,
64652	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlRsnInf", skip_serializing_if = "Option::is_none") )]
64653	pub cxl_rsn_inf: Option<Vec<PaymentCancellationReason6>>,
64654}
64655
64656impl OriginalGroupHeader21 {
64657	pub fn validate(&self) -> Result<(), ValidationError> {
64658		if let Some(ref val) = self.grp_cxl_id {
64659			if val.chars().count() < 1 {
64660				return Err(ValidationError::new(1001, "grp_cxl_id is shorter than the minimum length of 1".to_string()));
64661			}
64662			if val.chars().count() > 35 {
64663				return Err(ValidationError::new(1002, "grp_cxl_id exceeds the maximum length of 35".to_string()));
64664			}
64665		}
64666		if let Some(ref val) = self.case { val.validate()? }
64667		if self.orgnl_msg_id.chars().count() < 1 {
64668			return Err(ValidationError::new(1001, "orgnl_msg_id is shorter than the minimum length of 1".to_string()));
64669		}
64670		if self.orgnl_msg_id.chars().count() > 35 {
64671			return Err(ValidationError::new(1002, "orgnl_msg_id exceeds the maximum length of 35".to_string()));
64672		}
64673		if self.orgnl_msg_nm_id.chars().count() < 1 {
64674			return Err(ValidationError::new(1001, "orgnl_msg_nm_id is shorter than the minimum length of 1".to_string()));
64675		}
64676		if self.orgnl_msg_nm_id.chars().count() > 35 {
64677			return Err(ValidationError::new(1002, "orgnl_msg_nm_id exceeds the maximum length of 35".to_string()));
64678		}
64679		if let Some(ref val) = self.nb_of_txs {
64680			let pattern = Regex::new("[0-9]{1,15}").unwrap();
64681			if !pattern.is_match(val) {
64682				return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
64683			}
64684		}
64685		if let Some(ref vec) = self.cxl_rsn_inf { for item in vec { item.validate()? } }
64686		Ok(())
64687	}
64688}
64689
64690
64691// OriginalGroupHeader22 ...
64692#[cfg_attr(feature = "derive_debug", derive(Debug))]
64693#[cfg_attr(feature = "derive_default", derive(Default))]
64694#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64695#[cfg_attr(feature = "derive_clone", derive(Clone))]
64696#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64697pub struct OriginalGroupHeader22 {
64698	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
64699	pub orgnl_msg_id: String,
64700	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgNmId") )]
64701	pub orgnl_msg_nm_id: String,
64702	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCreDtTm", skip_serializing_if = "Option::is_none") )]
64703	pub orgnl_cre_dt_tm: Option<String>,
64704	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNbOfTxs", skip_serializing_if = "Option::is_none") )]
64705	pub orgnl_nb_of_txs: Option<String>,
64706	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCtrlSum", skip_serializing_if = "Option::is_none") )]
64707	pub orgnl_ctrl_sum: Option<f64>,
64708	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpSts", skip_serializing_if = "Option::is_none") )]
64709	pub grp_sts: Option<String>,
64710	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsnInf", skip_serializing_if = "Option::is_none") )]
64711	pub sts_rsn_inf: Option<Vec<StatusReasonInformation14>>,
64712	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxsPerSts", skip_serializing_if = "Option::is_none") )]
64713	pub nb_of_txs_per_sts: Option<Vec<NumberOfTransactionsPerStatus5>>,
64714}
64715
64716impl OriginalGroupHeader22 {
64717	pub fn validate(&self) -> Result<(), ValidationError> {
64718		if self.orgnl_msg_id.chars().count() < 1 {
64719			return Err(ValidationError::new(1001, "orgnl_msg_id is shorter than the minimum length of 1".to_string()));
64720		}
64721		if self.orgnl_msg_id.chars().count() > 35 {
64722			return Err(ValidationError::new(1002, "orgnl_msg_id exceeds the maximum length of 35".to_string()));
64723		}
64724		if self.orgnl_msg_nm_id.chars().count() < 1 {
64725			return Err(ValidationError::new(1001, "orgnl_msg_nm_id is shorter than the minimum length of 1".to_string()));
64726		}
64727		if self.orgnl_msg_nm_id.chars().count() > 35 {
64728			return Err(ValidationError::new(1002, "orgnl_msg_nm_id exceeds the maximum length of 35".to_string()));
64729		}
64730		if let Some(ref val) = self.orgnl_nb_of_txs {
64731			let pattern = Regex::new("[0-9]{1,15}").unwrap();
64732			if !pattern.is_match(val) {
64733				return Err(ValidationError::new(1005, "orgnl_nb_of_txs does not match the required pattern".to_string()));
64734			}
64735		}
64736		if let Some(ref val) = self.grp_sts {
64737			if val.chars().count() < 1 {
64738				return Err(ValidationError::new(1001, "grp_sts is shorter than the minimum length of 1".to_string()));
64739			}
64740			if val.chars().count() > 4 {
64741				return Err(ValidationError::new(1002, "grp_sts exceeds the maximum length of 4".to_string()));
64742			}
64743		}
64744		if let Some(ref vec) = self.sts_rsn_inf { for item in vec { item.validate()? } }
64745		if let Some(ref vec) = self.nb_of_txs_per_sts { for item in vec { item.validate()? } }
64746		Ok(())
64747	}
64748}
64749
64750
64751// OriginalGroupHeader23 ...
64752#[cfg_attr(feature = "derive_debug", derive(Debug))]
64753#[cfg_attr(feature = "derive_default", derive(Default))]
64754#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64755#[cfg_attr(feature = "derive_clone", derive(Clone))]
64756#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64757pub struct OriginalGroupHeader23 {
64758	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpCxlId", skip_serializing_if = "Option::is_none") )]
64759	pub orgnl_grp_cxl_id: Option<String>,
64760	#[cfg_attr( feature = "derive_serde", serde(rename = "RslvdCase", skip_serializing_if = "Option::is_none") )]
64761	pub rslvd_case: Option<Case6>,
64762	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
64763	pub orgnl_msg_id: String,
64764	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgNmId") )]
64765	pub orgnl_msg_nm_id: String,
64766	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCreDtTm", skip_serializing_if = "Option::is_none") )]
64767	pub orgnl_cre_dt_tm: Option<String>,
64768	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNbOfTxs", skip_serializing_if = "Option::is_none") )]
64769	pub orgnl_nb_of_txs: Option<String>,
64770	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCtrlSum", skip_serializing_if = "Option::is_none") )]
64771	pub orgnl_ctrl_sum: Option<f64>,
64772	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpCxlSts", skip_serializing_if = "Option::is_none") )]
64773	pub grp_cxl_sts: Option<GroupCancellationStatus1Code>,
64774	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlStsRsnInf", skip_serializing_if = "Option::is_none") )]
64775	pub cxl_sts_rsn_inf: Option<Vec<CancellationStatusReason5>>,
64776	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxsPerCxlSts", skip_serializing_if = "Option::is_none") )]
64777	pub nb_of_txs_per_cxl_sts: Option<Vec<NumberOfTransactionsPerStatus1>>,
64778}
64779
64780impl OriginalGroupHeader23 {
64781	pub fn validate(&self) -> Result<(), ValidationError> {
64782		if let Some(ref val) = self.orgnl_grp_cxl_id {
64783			if val.chars().count() < 1 {
64784				return Err(ValidationError::new(1001, "orgnl_grp_cxl_id is shorter than the minimum length of 1".to_string()));
64785			}
64786			if val.chars().count() > 35 {
64787				return Err(ValidationError::new(1002, "orgnl_grp_cxl_id exceeds the maximum length of 35".to_string()));
64788			}
64789		}
64790		if let Some(ref val) = self.rslvd_case { val.validate()? }
64791		if self.orgnl_msg_id.chars().count() < 1 {
64792			return Err(ValidationError::new(1001, "orgnl_msg_id is shorter than the minimum length of 1".to_string()));
64793		}
64794		if self.orgnl_msg_id.chars().count() > 35 {
64795			return Err(ValidationError::new(1002, "orgnl_msg_id exceeds the maximum length of 35".to_string()));
64796		}
64797		if self.orgnl_msg_nm_id.chars().count() < 1 {
64798			return Err(ValidationError::new(1001, "orgnl_msg_nm_id is shorter than the minimum length of 1".to_string()));
64799		}
64800		if self.orgnl_msg_nm_id.chars().count() > 35 {
64801			return Err(ValidationError::new(1002, "orgnl_msg_nm_id exceeds the maximum length of 35".to_string()));
64802		}
64803		if let Some(ref val) = self.orgnl_nb_of_txs {
64804			let pattern = Regex::new("[0-9]{1,15}").unwrap();
64805			if !pattern.is_match(val) {
64806				return Err(ValidationError::new(1005, "orgnl_nb_of_txs does not match the required pattern".to_string()));
64807			}
64808		}
64809		if let Some(ref val) = self.grp_cxl_sts { val.validate()? }
64810		if let Some(ref vec) = self.cxl_sts_rsn_inf { for item in vec { item.validate()? } }
64811		if let Some(ref vec) = self.nb_of_txs_per_cxl_sts { for item in vec { item.validate()? } }
64812		Ok(())
64813	}
64814}
64815
64816
64817// OriginalGroupInformation27 ...
64818#[cfg_attr(feature = "derive_debug", derive(Debug))]
64819#[cfg_attr(feature = "derive_default", derive(Default))]
64820#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64821#[cfg_attr(feature = "derive_clone", derive(Clone))]
64822#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64823pub struct OriginalGroupInformation27 {
64824	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
64825	pub orgnl_msg_id: String,
64826	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgNmId") )]
64827	pub orgnl_msg_nm_id: String,
64828	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCreDtTm", skip_serializing_if = "Option::is_none") )]
64829	pub orgnl_cre_dt_tm: Option<String>,
64830	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNbOfTxs", skip_serializing_if = "Option::is_none") )]
64831	pub orgnl_nb_of_txs: Option<String>,
64832	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCtrlSum", skip_serializing_if = "Option::is_none") )]
64833	pub orgnl_ctrl_sum: Option<f64>,
64834}
64835
64836impl OriginalGroupInformation27 {
64837	pub fn validate(&self) -> Result<(), ValidationError> {
64838		if self.orgnl_msg_id.chars().count() < 1 {
64839			return Err(ValidationError::new(1001, "orgnl_msg_id is shorter than the minimum length of 1".to_string()));
64840		}
64841		if self.orgnl_msg_id.chars().count() > 35 {
64842			return Err(ValidationError::new(1002, "orgnl_msg_id exceeds the maximum length of 35".to_string()));
64843		}
64844		if self.orgnl_msg_nm_id.chars().count() < 1 {
64845			return Err(ValidationError::new(1001, "orgnl_msg_nm_id is shorter than the minimum length of 1".to_string()));
64846		}
64847		if self.orgnl_msg_nm_id.chars().count() > 35 {
64848			return Err(ValidationError::new(1002, "orgnl_msg_nm_id exceeds the maximum length of 35".to_string()));
64849		}
64850		if let Some(ref val) = self.orgnl_nb_of_txs {
64851			let pattern = Regex::new("[0-9]{1,15}").unwrap();
64852			if !pattern.is_match(val) {
64853				return Err(ValidationError::new(1005, "orgnl_nb_of_txs does not match the required pattern".to_string()));
64854			}
64855		}
64856		Ok(())
64857	}
64858}
64859
64860
64861// OriginalGroupInformation29 ...
64862#[cfg_attr(feature = "derive_debug", derive(Debug))]
64863#[cfg_attr(feature = "derive_default", derive(Default))]
64864#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64865#[cfg_attr(feature = "derive_clone", derive(Clone))]
64866#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64867pub struct OriginalGroupInformation29 {
64868	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
64869	pub orgnl_msg_id: String,
64870	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgNmId") )]
64871	pub orgnl_msg_nm_id: String,
64872	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCreDtTm", skip_serializing_if = "Option::is_none") )]
64873	pub orgnl_cre_dt_tm: Option<String>,
64874}
64875
64876impl OriginalGroupInformation29 {
64877	pub fn validate(&self) -> Result<(), ValidationError> {
64878		if self.orgnl_msg_id.chars().count() < 1 {
64879			return Err(ValidationError::new(1001, "orgnl_msg_id is shorter than the minimum length of 1".to_string()));
64880		}
64881		if self.orgnl_msg_id.chars().count() > 35 {
64882			return Err(ValidationError::new(1002, "orgnl_msg_id exceeds the maximum length of 35".to_string()));
64883		}
64884		if self.orgnl_msg_nm_id.chars().count() < 1 {
64885			return Err(ValidationError::new(1001, "orgnl_msg_nm_id is shorter than the minimum length of 1".to_string()));
64886		}
64887		if self.orgnl_msg_nm_id.chars().count() > 35 {
64888			return Err(ValidationError::new(1002, "orgnl_msg_nm_id exceeds the maximum length of 35".to_string()));
64889		}
64890		Ok(())
64891	}
64892}
64893
64894
64895// OriginalGroupInformation32 ...
64896#[cfg_attr(feature = "derive_debug", derive(Debug))]
64897#[cfg_attr(feature = "derive_default", derive(Default))]
64898#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64899#[cfg_attr(feature = "derive_clone", derive(Clone))]
64900#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64901pub struct OriginalGroupInformation32 {
64902	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
64903	pub orgnl_msg_id: String,
64904	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgNmId") )]
64905	pub orgnl_msg_nm_id: String,
64906	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCreDtTm", skip_serializing_if = "Option::is_none") )]
64907	pub orgnl_cre_dt_tm: Option<String>,
64908	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNbOfTxs", skip_serializing_if = "Option::is_none") )]
64909	pub orgnl_nb_of_txs: Option<String>,
64910	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCtrlSum", skip_serializing_if = "Option::is_none") )]
64911	pub orgnl_ctrl_sum: Option<f64>,
64912	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpSts", skip_serializing_if = "Option::is_none") )]
64913	pub grp_sts: Option<String>,
64914	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsnInf", skip_serializing_if = "Option::is_none") )]
64915	pub sts_rsn_inf: Option<Vec<StatusReasonInformation14>>,
64916	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxsPerSts", skip_serializing_if = "Option::is_none") )]
64917	pub nb_of_txs_per_sts: Option<Vec<NumberOfTransactionsPerStatus5>>,
64918}
64919
64920impl OriginalGroupInformation32 {
64921	pub fn validate(&self) -> Result<(), ValidationError> {
64922		if self.orgnl_msg_id.chars().count() < 1 {
64923			return Err(ValidationError::new(1001, "orgnl_msg_id is shorter than the minimum length of 1".to_string()));
64924		}
64925		if self.orgnl_msg_id.chars().count() > 35 {
64926			return Err(ValidationError::new(1002, "orgnl_msg_id exceeds the maximum length of 35".to_string()));
64927		}
64928		if self.orgnl_msg_nm_id.chars().count() < 1 {
64929			return Err(ValidationError::new(1001, "orgnl_msg_nm_id is shorter than the minimum length of 1".to_string()));
64930		}
64931		if self.orgnl_msg_nm_id.chars().count() > 35 {
64932			return Err(ValidationError::new(1002, "orgnl_msg_nm_id exceeds the maximum length of 35".to_string()));
64933		}
64934		if let Some(ref val) = self.orgnl_nb_of_txs {
64935			let pattern = Regex::new("[0-9]{1,15}").unwrap();
64936			if !pattern.is_match(val) {
64937				return Err(ValidationError::new(1005, "orgnl_nb_of_txs does not match the required pattern".to_string()));
64938			}
64939		}
64940		if let Some(ref val) = self.grp_sts {
64941			if val.chars().count() < 1 {
64942				return Err(ValidationError::new(1001, "grp_sts is shorter than the minimum length of 1".to_string()));
64943			}
64944			if val.chars().count() > 4 {
64945				return Err(ValidationError::new(1002, "grp_sts exceeds the maximum length of 4".to_string()));
64946			}
64947		}
64948		if let Some(ref vec) = self.sts_rsn_inf { for item in vec { item.validate()? } }
64949		if let Some(ref vec) = self.nb_of_txs_per_sts { for item in vec { item.validate()? } }
64950		Ok(())
64951	}
64952}
64953
64954
64955// OriginalItem8 ...
64956#[cfg_attr(feature = "derive_debug", derive(Debug))]
64957#[cfg_attr(feature = "derive_default", derive(Default))]
64958#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
64959#[cfg_attr(feature = "derive_clone", derive(Clone))]
64960#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
64961pub struct OriginalItem8 {
64962	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlItmId") )]
64963	pub orgnl_itm_id: String,
64964	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
64965	pub orgnl_end_to_end_id: Option<String>,
64966	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
64967	pub uetr: Option<String>,
64968	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
64969	pub amt: ActiveOrHistoricCurrencyAndAmount,
64970	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdValDt", skip_serializing_if = "Option::is_none") )]
64971	pub xpctd_val_dt: Option<String>,
64972	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlItmRef", skip_serializing_if = "Option::is_none") )]
64973	pub orgnl_itm_ref: Option<OriginalItemReference7>,
64974}
64975
64976impl OriginalItem8 {
64977	pub fn validate(&self) -> Result<(), ValidationError> {
64978		if self.orgnl_itm_id.chars().count() < 1 {
64979			return Err(ValidationError::new(1001, "orgnl_itm_id is shorter than the minimum length of 1".to_string()));
64980		}
64981		if self.orgnl_itm_id.chars().count() > 35 {
64982			return Err(ValidationError::new(1002, "orgnl_itm_id exceeds the maximum length of 35".to_string()));
64983		}
64984		if let Some(ref val) = self.orgnl_end_to_end_id {
64985			if val.chars().count() < 1 {
64986				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
64987			}
64988			if val.chars().count() > 35 {
64989				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
64990			}
64991		}
64992		if let Some(ref val) = self.uetr {
64993			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
64994			if !pattern.is_match(val) {
64995				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
64996			}
64997		}
64998		self.amt.validate()?;
64999		if let Some(ref val) = self.orgnl_itm_ref { val.validate()? }
65000		Ok(())
65001	}
65002}
65003
65004
65005// OriginalItemAndStatus8 ...
65006#[cfg_attr(feature = "derive_debug", derive(Debug))]
65007#[cfg_attr(feature = "derive_default", derive(Default))]
65008#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65009#[cfg_attr(feature = "derive_clone", derive(Clone))]
65010#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65011pub struct OriginalItemAndStatus8 {
65012	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlItmId") )]
65013	pub orgnl_itm_id: String,
65014	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
65015	pub orgnl_end_to_end_id: Option<String>,
65016	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
65017	pub orgnl_uetr: Option<String>,
65018	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
65019	pub amt: ActiveOrHistoricCurrencyAndAmount,
65020	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdValDt", skip_serializing_if = "Option::is_none") )]
65021	pub xpctd_val_dt: Option<String>,
65022	#[cfg_attr( feature = "derive_serde", serde(rename = "ItmSts") )]
65023	pub itm_sts: NotificationStatus3Code,
65024	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlStsInf", skip_serializing_if = "Option::is_none") )]
65025	pub addtl_sts_inf: Option<String>,
65026	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlItmRef", skip_serializing_if = "Option::is_none") )]
65027	pub orgnl_itm_ref: Option<OriginalItemReference7>,
65028}
65029
65030impl OriginalItemAndStatus8 {
65031	pub fn validate(&self) -> Result<(), ValidationError> {
65032		if self.orgnl_itm_id.chars().count() < 1 {
65033			return Err(ValidationError::new(1001, "orgnl_itm_id is shorter than the minimum length of 1".to_string()));
65034		}
65035		if self.orgnl_itm_id.chars().count() > 35 {
65036			return Err(ValidationError::new(1002, "orgnl_itm_id exceeds the maximum length of 35".to_string()));
65037		}
65038		if let Some(ref val) = self.orgnl_end_to_end_id {
65039			if val.chars().count() < 1 {
65040				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
65041			}
65042			if val.chars().count() > 35 {
65043				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
65044			}
65045		}
65046		if let Some(ref val) = self.orgnl_uetr {
65047			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
65048			if !pattern.is_match(val) {
65049				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
65050			}
65051		}
65052		self.amt.validate()?;
65053		self.itm_sts.validate()?;
65054		if let Some(ref val) = self.addtl_sts_inf {
65055			if val.chars().count() < 1 {
65056				return Err(ValidationError::new(1001, "addtl_sts_inf is shorter than the minimum length of 1".to_string()));
65057			}
65058			if val.chars().count() > 105 {
65059				return Err(ValidationError::new(1002, "addtl_sts_inf exceeds the maximum length of 105".to_string()));
65060			}
65061		}
65062		if let Some(ref val) = self.orgnl_itm_ref { val.validate()? }
65063		Ok(())
65064	}
65065}
65066
65067
65068// OriginalItemReference7 ...
65069#[cfg_attr(feature = "derive_debug", derive(Debug))]
65070#[cfg_attr(feature = "derive_default", derive(Default))]
65071#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65072#[cfg_attr(feature = "derive_clone", derive(Clone))]
65073#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65074pub struct OriginalItemReference7 {
65075	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
65076	pub acct: Option<CashAccount40>,
65077	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
65078	pub acct_ownr: Option<Party50Choice>,
65079	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
65080	pub acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
65081	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdAcct", skip_serializing_if = "Option::is_none") )]
65082	pub rltd_acct: Option<CashAccount40>,
65083	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
65084	pub dbtr: Option<Party50Choice>,
65085	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
65086	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
65087	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt", skip_serializing_if = "Option::is_none") )]
65088	pub intrmy_agt: Option<BranchAndFinancialInstitutionIdentification8>,
65089	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
65090	pub purp: Option<Purpose2Choice>,
65091	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdRmtInf", skip_serializing_if = "Option::is_none") )]
65092	pub rltd_rmt_inf: Option<RemittanceLocation8>,
65093	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
65094	pub rmt_inf: Option<RemittanceInformation22>,
65095}
65096
65097impl OriginalItemReference7 {
65098	pub fn validate(&self) -> Result<(), ValidationError> {
65099		if let Some(ref val) = self.acct { val.validate()? }
65100		if let Some(ref val) = self.acct_ownr { val.validate()? }
65101		if let Some(ref val) = self.acct_svcr { val.validate()? }
65102		if let Some(ref val) = self.rltd_acct { val.validate()? }
65103		if let Some(ref val) = self.dbtr { val.validate()? }
65104		if let Some(ref val) = self.dbtr_agt { val.validate()? }
65105		if let Some(ref val) = self.intrmy_agt { val.validate()? }
65106		if let Some(ref val) = self.purp { val.validate()? }
65107		if let Some(ref val) = self.rltd_rmt_inf { val.validate()? }
65108		if let Some(ref val) = self.rmt_inf { val.validate()? }
65109		Ok(())
65110	}
65111}
65112
65113
65114// OriginalMandate10Choice ...
65115#[cfg_attr(feature = "derive_debug", derive(Debug))]
65116#[cfg_attr(feature = "derive_default", derive(Default))]
65117#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65118#[cfg_attr(feature = "derive_clone", derive(Clone))]
65119#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65120pub struct OriginalMandate10Choice {
65121	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMndtId", skip_serializing_if = "Option::is_none") )]
65122	pub orgnl_mndt_id: Option<String>,
65123	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMndt", skip_serializing_if = "Option::is_none") )]
65124	pub orgnl_mndt: Option<Mandate20>,
65125}
65126
65127impl OriginalMandate10Choice {
65128	pub fn validate(&self) -> Result<(), ValidationError> {
65129		if let Some(ref val) = self.orgnl_mndt_id {
65130			if val.chars().count() < 1 {
65131				return Err(ValidationError::new(1001, "orgnl_mndt_id is shorter than the minimum length of 1".to_string()));
65132			}
65133			if val.chars().count() > 35 {
65134				return Err(ValidationError::new(1002, "orgnl_mndt_id exceeds the maximum length of 35".to_string()));
65135			}
65136		}
65137		if let Some(ref val) = self.orgnl_mndt { val.validate()? }
65138		Ok(())
65139	}
65140}
65141
65142
65143// OriginalMandate11Choice ...
65144#[cfg_attr(feature = "derive_debug", derive(Debug))]
65145#[cfg_attr(feature = "derive_default", derive(Default))]
65146#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65147#[cfg_attr(feature = "derive_clone", derive(Clone))]
65148#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65149pub struct OriginalMandate11Choice {
65150	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMndtId", skip_serializing_if = "Option::is_none") )]
65151	pub orgnl_mndt_id: Option<String>,
65152	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMndt", skip_serializing_if = "Option::is_none") )]
65153	pub orgnl_mndt: Option<Mandate22>,
65154}
65155
65156impl OriginalMandate11Choice {
65157	pub fn validate(&self) -> Result<(), ValidationError> {
65158		if let Some(ref val) = self.orgnl_mndt_id {
65159			if val.chars().count() < 1 {
65160				return Err(ValidationError::new(1001, "orgnl_mndt_id is shorter than the minimum length of 1".to_string()));
65161			}
65162			if val.chars().count() > 35 {
65163				return Err(ValidationError::new(1002, "orgnl_mndt_id exceeds the maximum length of 35".to_string()));
65164			}
65165		}
65166		if let Some(ref val) = self.orgnl_mndt { val.validate()? }
65167		Ok(())
65168	}
65169}
65170
65171
65172// OriginalMessage6 ...
65173#[cfg_attr(feature = "derive_debug", derive(Debug))]
65174#[cfg_attr(feature = "derive_default", derive(Default))]
65175#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65176#[cfg_attr(feature = "derive_clone", derive(Clone))]
65177#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65178pub struct OriginalMessage6 {
65179	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlSndr", skip_serializing_if = "Option::is_none") )]
65180	pub orgnl_sndr: Option<Party50Choice>,
65181	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
65182	pub orgnl_msg_id: String,
65183	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgNmId") )]
65184	pub orgnl_msg_nm_id: String,
65185	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCreDtTm", skip_serializing_if = "Option::is_none") )]
65186	pub orgnl_cre_dt_tm: Option<String>,
65187	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPackgId", skip_serializing_if = "Option::is_none") )]
65188	pub orgnl_packg_id: Option<String>,
65189	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlRcrdId") )]
65190	pub orgnl_rcrd_id: String,
65191}
65192
65193impl OriginalMessage6 {
65194	pub fn validate(&self) -> Result<(), ValidationError> {
65195		if let Some(ref val) = self.orgnl_sndr { val.validate()? }
65196		if self.orgnl_msg_id.chars().count() < 1 {
65197			return Err(ValidationError::new(1001, "orgnl_msg_id is shorter than the minimum length of 1".to_string()));
65198		}
65199		if self.orgnl_msg_id.chars().count() > 35 {
65200			return Err(ValidationError::new(1002, "orgnl_msg_id exceeds the maximum length of 35".to_string()));
65201		}
65202		if self.orgnl_msg_nm_id.chars().count() < 1 {
65203			return Err(ValidationError::new(1001, "orgnl_msg_nm_id is shorter than the minimum length of 1".to_string()));
65204		}
65205		if self.orgnl_msg_nm_id.chars().count() > 35 {
65206			return Err(ValidationError::new(1002, "orgnl_msg_nm_id exceeds the maximum length of 35".to_string()));
65207		}
65208		if let Some(ref val) = self.orgnl_packg_id {
65209			if val.chars().count() < 1 {
65210				return Err(ValidationError::new(1001, "orgnl_packg_id is shorter than the minimum length of 1".to_string()));
65211			}
65212			if val.chars().count() > 35 {
65213				return Err(ValidationError::new(1002, "orgnl_packg_id exceeds the maximum length of 35".to_string()));
65214			}
65215		}
65216		if self.orgnl_rcrd_id.chars().count() < 1 {
65217			return Err(ValidationError::new(1001, "orgnl_rcrd_id is shorter than the minimum length of 1".to_string()));
65218		}
65219		if self.orgnl_rcrd_id.chars().count() > 35 {
65220			return Err(ValidationError::new(1002, "orgnl_rcrd_id exceeds the maximum length of 35".to_string()));
65221		}
65222		Ok(())
65223	}
65224}
65225
65226
65227// OriginalMessage7 ...
65228#[cfg_attr(feature = "derive_debug", derive(Debug))]
65229#[cfg_attr(feature = "derive_default", derive(Default))]
65230#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65231#[cfg_attr(feature = "derive_clone", derive(Clone))]
65232#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65233pub struct OriginalMessage7 {
65234	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlSndr", skip_serializing_if = "Option::is_none") )]
65235	pub orgnl_sndr: Option<Party50Choice>,
65236	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
65237	pub orgnl_msg_id: String,
65238	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgNmId") )]
65239	pub orgnl_msg_nm_id: String,
65240	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCreDtTm", skip_serializing_if = "Option::is_none") )]
65241	pub orgnl_cre_dt_tm: Option<String>,
65242}
65243
65244impl OriginalMessage7 {
65245	pub fn validate(&self) -> Result<(), ValidationError> {
65246		if let Some(ref val) = self.orgnl_sndr { val.validate()? }
65247		if self.orgnl_msg_id.chars().count() < 1 {
65248			return Err(ValidationError::new(1001, "orgnl_msg_id is shorter than the minimum length of 1".to_string()));
65249		}
65250		if self.orgnl_msg_id.chars().count() > 35 {
65251			return Err(ValidationError::new(1002, "orgnl_msg_id exceeds the maximum length of 35".to_string()));
65252		}
65253		if self.orgnl_msg_nm_id.chars().count() < 1 {
65254			return Err(ValidationError::new(1001, "orgnl_msg_nm_id is shorter than the minimum length of 1".to_string()));
65255		}
65256		if self.orgnl_msg_nm_id.chars().count() > 35 {
65257			return Err(ValidationError::new(1002, "orgnl_msg_nm_id exceeds the maximum length of 35".to_string()));
65258		}
65259		Ok(())
65260	}
65261}
65262
65263
65264// OriginalMessageAndIssuer1 ...
65265#[cfg_attr(feature = "derive_debug", derive(Debug))]
65266#[cfg_attr(feature = "derive_default", derive(Default))]
65267#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65268#[cfg_attr(feature = "derive_clone", derive(Clone))]
65269#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65270pub struct OriginalMessageAndIssuer1 {
65271	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
65272	pub msg_id: String,
65273	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNmId", skip_serializing_if = "Option::is_none") )]
65274	pub msg_nm_id: Option<String>,
65275	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgtrNm", skip_serializing_if = "Option::is_none") )]
65276	pub orgtr_nm: Option<String>,
65277}
65278
65279impl OriginalMessageAndIssuer1 {
65280	pub fn validate(&self) -> Result<(), ValidationError> {
65281		if self.msg_id.chars().count() < 1 {
65282			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
65283		}
65284		if self.msg_id.chars().count() > 35 {
65285			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
65286		}
65287		if let Some(ref val) = self.msg_nm_id {
65288			if val.chars().count() < 1 {
65289				return Err(ValidationError::new(1001, "msg_nm_id is shorter than the minimum length of 1".to_string()));
65290			}
65291			if val.chars().count() > 35 {
65292				return Err(ValidationError::new(1002, "msg_nm_id exceeds the maximum length of 35".to_string()));
65293			}
65294		}
65295		if let Some(ref val) = self.orgtr_nm {
65296			if val.chars().count() < 1 {
65297				return Err(ValidationError::new(1001, "orgtr_nm is shorter than the minimum length of 1".to_string()));
65298			}
65299			if val.chars().count() > 70 {
65300				return Err(ValidationError::new(1002, "orgtr_nm exceeds the maximum length of 70".to_string()));
65301			}
65302		}
65303		Ok(())
65304	}
65305}
65306
65307
65308// OriginalMessageInformation1 ...
65309#[cfg_attr(feature = "derive_debug", derive(Debug))]
65310#[cfg_attr(feature = "derive_default", derive(Default))]
65311#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65312#[cfg_attr(feature = "derive_clone", derive(Clone))]
65313#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65314pub struct OriginalMessageInformation1 {
65315	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
65316	pub msg_id: String,
65317	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNmId") )]
65318	pub msg_nm_id: String,
65319	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
65320	pub cre_dt_tm: Option<String>,
65321}
65322
65323impl OriginalMessageInformation1 {
65324	pub fn validate(&self) -> Result<(), ValidationError> {
65325		if self.msg_id.chars().count() < 1 {
65326			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
65327		}
65328		if self.msg_id.chars().count() > 35 {
65329			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
65330		}
65331		if self.msg_nm_id.chars().count() < 1 {
65332			return Err(ValidationError::new(1001, "msg_nm_id is shorter than the minimum length of 1".to_string()));
65333		}
65334		if self.msg_nm_id.chars().count() > 35 {
65335			return Err(ValidationError::new(1002, "msg_nm_id exceeds the maximum length of 35".to_string()));
65336		}
65337		Ok(())
65338	}
65339}
65340
65341
65342// OriginalNotification15 ...
65343#[cfg_attr(feature = "derive_debug", derive(Debug))]
65344#[cfg_attr(feature = "derive_default", derive(Default))]
65345#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65346#[cfg_attr(feature = "derive_clone", derive(Clone))]
65347#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65348pub struct OriginalNotification15 {
65349	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
65350	pub orgnl_msg_id: String,
65351	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCreDtTm", skip_serializing_if = "Option::is_none") )]
65352	pub orgnl_cre_dt_tm: Option<String>,
65353	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNtfctnId") )]
65354	pub orgnl_ntfctn_id: String,
65355	#[cfg_attr( feature = "derive_serde", serde(rename = "NtfctnSts", skip_serializing_if = "Option::is_none") )]
65356	pub ntfctn_sts: Option<NotificationStatus3Code>,
65357	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlStsInf", skip_serializing_if = "Option::is_none") )]
65358	pub addtl_sts_inf: Option<String>,
65359	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNtfctnRef", skip_serializing_if = "Option::is_none") )]
65360	pub orgnl_ntfctn_ref: Option<Vec<OriginalNotificationReference13>>,
65361}
65362
65363impl OriginalNotification15 {
65364	pub fn validate(&self) -> Result<(), ValidationError> {
65365		if self.orgnl_msg_id.chars().count() < 1 {
65366			return Err(ValidationError::new(1001, "orgnl_msg_id is shorter than the minimum length of 1".to_string()));
65367		}
65368		if self.orgnl_msg_id.chars().count() > 35 {
65369			return Err(ValidationError::new(1002, "orgnl_msg_id exceeds the maximum length of 35".to_string()));
65370		}
65371		if self.orgnl_ntfctn_id.chars().count() < 1 {
65372			return Err(ValidationError::new(1001, "orgnl_ntfctn_id is shorter than the minimum length of 1".to_string()));
65373		}
65374		if self.orgnl_ntfctn_id.chars().count() > 35 {
65375			return Err(ValidationError::new(1002, "orgnl_ntfctn_id exceeds the maximum length of 35".to_string()));
65376		}
65377		if let Some(ref val) = self.ntfctn_sts { val.validate()? }
65378		if let Some(ref val) = self.addtl_sts_inf {
65379			if val.chars().count() < 1 {
65380				return Err(ValidationError::new(1001, "addtl_sts_inf is shorter than the minimum length of 1".to_string()));
65381			}
65382			if val.chars().count() > 140 {
65383				return Err(ValidationError::new(1002, "addtl_sts_inf exceeds the maximum length of 140".to_string()));
65384			}
65385		}
65386		if let Some(ref vec) = self.orgnl_ntfctn_ref { for item in vec { item.validate()? } }
65387		Ok(())
65388	}
65389}
65390
65391
65392// OriginalNotification16 ...
65393#[cfg_attr(feature = "derive_debug", derive(Debug))]
65394#[cfg_attr(feature = "derive_default", derive(Default))]
65395#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65396#[cfg_attr(feature = "derive_clone", derive(Clone))]
65397#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65398pub struct OriginalNotification16 {
65399	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
65400	pub orgnl_msg_id: String,
65401	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCreDtTm", skip_serializing_if = "Option::is_none") )]
65402	pub orgnl_cre_dt_tm: Option<String>,
65403	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNtfctnId") )]
65404	pub orgnl_ntfctn_id: String,
65405	#[cfg_attr( feature = "derive_serde", serde(rename = "NtfctnCxl", skip_serializing_if = "Option::is_none") )]
65406	pub ntfctn_cxl: Option<bool>,
65407	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNtfctnRef", skip_serializing_if = "Option::is_none") )]
65408	pub orgnl_ntfctn_ref: Option<Vec<OriginalNotificationReference14>>,
65409}
65410
65411impl OriginalNotification16 {
65412	pub fn validate(&self) -> Result<(), ValidationError> {
65413		if self.orgnl_msg_id.chars().count() < 1 {
65414			return Err(ValidationError::new(1001, "orgnl_msg_id is shorter than the minimum length of 1".to_string()));
65415		}
65416		if self.orgnl_msg_id.chars().count() > 35 {
65417			return Err(ValidationError::new(1002, "orgnl_msg_id exceeds the maximum length of 35".to_string()));
65418		}
65419		if self.orgnl_ntfctn_id.chars().count() < 1 {
65420			return Err(ValidationError::new(1001, "orgnl_ntfctn_id is shorter than the minimum length of 1".to_string()));
65421		}
65422		if self.orgnl_ntfctn_id.chars().count() > 35 {
65423			return Err(ValidationError::new(1002, "orgnl_ntfctn_id exceeds the maximum length of 35".to_string()));
65424		}
65425		if let Some(ref vec) = self.orgnl_ntfctn_ref { for item in vec { item.validate()? } }
65426		Ok(())
65427	}
65428}
65429
65430
65431// OriginalNotificationReference13 ...
65432#[cfg_attr(feature = "derive_debug", derive(Debug))]
65433#[cfg_attr(feature = "derive_default", derive(Default))]
65434#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65435#[cfg_attr(feature = "derive_clone", derive(Clone))]
65436#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65437pub struct OriginalNotificationReference13 {
65438	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
65439	pub acct: Option<CashAccount40>,
65440	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
65441	pub acct_ownr: Option<Party50Choice>,
65442	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
65443	pub acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
65444	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdAcct", skip_serializing_if = "Option::is_none") )]
65445	pub rltd_acct: Option<CashAccount40>,
65446	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlAmt", skip_serializing_if = "Option::is_none") )]
65447	pub ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
65448	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdValDt", skip_serializing_if = "Option::is_none") )]
65449	pub xpctd_val_dt: Option<String>,
65450	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
65451	pub dbtr: Option<Party50Choice>,
65452	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
65453	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
65454	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt", skip_serializing_if = "Option::is_none") )]
65455	pub intrmy_agt: Option<BranchAndFinancialInstitutionIdentification8>,
65456	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlItmAndSts") )]
65457	pub orgnl_itm_and_sts: Vec<OriginalItemAndStatus8>,
65458}
65459
65460impl OriginalNotificationReference13 {
65461	pub fn validate(&self) -> Result<(), ValidationError> {
65462		if let Some(ref val) = self.acct { val.validate()? }
65463		if let Some(ref val) = self.acct_ownr { val.validate()? }
65464		if let Some(ref val) = self.acct_svcr { val.validate()? }
65465		if let Some(ref val) = self.rltd_acct { val.validate()? }
65466		if let Some(ref val) = self.ttl_amt { val.validate()? }
65467		if let Some(ref val) = self.dbtr { val.validate()? }
65468		if let Some(ref val) = self.dbtr_agt { val.validate()? }
65469		if let Some(ref val) = self.intrmy_agt { val.validate()? }
65470		for item in &self.orgnl_itm_and_sts { item.validate()? }
65471		Ok(())
65472	}
65473}
65474
65475
65476// OriginalNotificationReference14 ...
65477#[cfg_attr(feature = "derive_debug", derive(Debug))]
65478#[cfg_attr(feature = "derive_default", derive(Default))]
65479#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65480#[cfg_attr(feature = "derive_clone", derive(Clone))]
65481#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65482pub struct OriginalNotificationReference14 {
65483	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
65484	pub acct: Option<CashAccount40>,
65485	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
65486	pub acct_ownr: Option<Party50Choice>,
65487	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
65488	pub acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
65489	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdAcct", skip_serializing_if = "Option::is_none") )]
65490	pub rltd_acct: Option<CashAccount40>,
65491	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlAmt", skip_serializing_if = "Option::is_none") )]
65492	pub ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
65493	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdValDt", skip_serializing_if = "Option::is_none") )]
65494	pub xpctd_val_dt: Option<String>,
65495	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
65496	pub dbtr: Option<Party50Choice>,
65497	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
65498	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
65499	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt", skip_serializing_if = "Option::is_none") )]
65500	pub intrmy_agt: Option<BranchAndFinancialInstitutionIdentification8>,
65501	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlItm") )]
65502	pub orgnl_itm: Vec<OriginalItem8>,
65503}
65504
65505impl OriginalNotificationReference14 {
65506	pub fn validate(&self) -> Result<(), ValidationError> {
65507		if let Some(ref val) = self.acct { val.validate()? }
65508		if let Some(ref val) = self.acct_ownr { val.validate()? }
65509		if let Some(ref val) = self.acct_svcr { val.validate()? }
65510		if let Some(ref val) = self.rltd_acct { val.validate()? }
65511		if let Some(ref val) = self.ttl_amt { val.validate()? }
65512		if let Some(ref val) = self.dbtr { val.validate()? }
65513		if let Some(ref val) = self.dbtr_agt { val.validate()? }
65514		if let Some(ref val) = self.intrmy_agt { val.validate()? }
65515		for item in &self.orgnl_itm { item.validate()? }
65516		Ok(())
65517	}
65518}
65519
65520
65521// OriginalPaymentInformation10 ...
65522#[cfg_attr(feature = "derive_debug", derive(Debug))]
65523#[cfg_attr(feature = "derive_default", derive(Default))]
65524#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65525#[cfg_attr(feature = "derive_clone", derive(Clone))]
65526#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65527pub struct OriginalPaymentInformation10 {
65528	#[cfg_attr( feature = "derive_serde", serde(rename = "Refs") )]
65529	pub refs: TransactionReferences8,
65530	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
65531	pub pmt_tp_inf: Option<PaymentTypeInformation26>,
65532	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
65533	pub amt: Option<AmountType3Choice>,
65534	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRateInf", skip_serializing_if = "Option::is_none") )]
65535	pub xchg_rate_inf: Option<ExchangeRate1>,
65536	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
65537	pub reqd_exctn_dt: Option<DateAndDateTime2Choice>,
65538	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdColltnDt", skip_serializing_if = "Option::is_none") )]
65539	pub reqd_colltn_dt: Option<String>,
65540	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
65541	pub dbtr: Option<PartyIdentification272>,
65542	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
65543	pub dbtr_acct: Option<CashAccount40>,
65544	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
65545	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
65546	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
65547	pub cdtr: Option<PartyIdentification272>,
65548	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
65549	pub cdtr_acct: Option<CashAccount40>,
65550	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
65551	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
65552}
65553
65554impl OriginalPaymentInformation10 {
65555	pub fn validate(&self) -> Result<(), ValidationError> {
65556		self.refs.validate()?;
65557		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
65558		if let Some(ref val) = self.amt { val.validate()? }
65559		if let Some(ref val) = self.xchg_rate_inf { val.validate()? }
65560		if let Some(ref val) = self.reqd_exctn_dt { val.validate()? }
65561		if let Some(ref val) = self.dbtr { val.validate()? }
65562		if let Some(ref val) = self.dbtr_acct { val.validate()? }
65563		if let Some(ref val) = self.dbtr_agt { val.validate()? }
65564		if let Some(ref val) = self.cdtr { val.validate()? }
65565		if let Some(ref val) = self.cdtr_acct { val.validate()? }
65566		if let Some(ref val) = self.cdtr_agt { val.validate()? }
65567		Ok(())
65568	}
65569}
65570
65571
65572// OriginalPaymentInstruction47 ...
65573#[cfg_attr(feature = "derive_debug", derive(Debug))]
65574#[cfg_attr(feature = "derive_default", derive(Default))]
65575#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65576#[cfg_attr(feature = "derive_clone", derive(Clone))]
65577#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65578pub struct OriginalPaymentInstruction47 {
65579	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPmtInfId") )]
65580	pub orgnl_pmt_inf_id: String,
65581	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNbOfTxs", skip_serializing_if = "Option::is_none") )]
65582	pub orgnl_nb_of_txs: Option<String>,
65583	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCtrlSum", skip_serializing_if = "Option::is_none") )]
65584	pub orgnl_ctrl_sum: Option<f64>,
65585	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfSts", skip_serializing_if = "Option::is_none") )]
65586	pub pmt_inf_sts: Option<String>,
65587	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsnInf", skip_serializing_if = "Option::is_none") )]
65588	pub sts_rsn_inf: Option<Vec<StatusReasonInformation14>>,
65589	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxsPerSts", skip_serializing_if = "Option::is_none") )]
65590	pub nb_of_txs_per_sts: Option<Vec<NumberOfTransactionsPerStatus5>>,
65591	#[cfg_attr( feature = "derive_serde", serde(rename = "TxInfAndSts", skip_serializing_if = "Option::is_none") )]
65592	pub tx_inf_and_sts: Option<Vec<PaymentTransaction150>>,
65593}
65594
65595impl OriginalPaymentInstruction47 {
65596	pub fn validate(&self) -> Result<(), ValidationError> {
65597		if self.orgnl_pmt_inf_id.chars().count() < 1 {
65598			return Err(ValidationError::new(1001, "orgnl_pmt_inf_id is shorter than the minimum length of 1".to_string()));
65599		}
65600		if self.orgnl_pmt_inf_id.chars().count() > 35 {
65601			return Err(ValidationError::new(1002, "orgnl_pmt_inf_id exceeds the maximum length of 35".to_string()));
65602		}
65603		if let Some(ref val) = self.orgnl_nb_of_txs {
65604			let pattern = Regex::new("[0-9]{1,15}").unwrap();
65605			if !pattern.is_match(val) {
65606				return Err(ValidationError::new(1005, "orgnl_nb_of_txs does not match the required pattern".to_string()));
65607			}
65608		}
65609		if let Some(ref val) = self.pmt_inf_sts {
65610			if val.chars().count() < 1 {
65611				return Err(ValidationError::new(1001, "pmt_inf_sts is shorter than the minimum length of 1".to_string()));
65612			}
65613			if val.chars().count() > 4 {
65614				return Err(ValidationError::new(1002, "pmt_inf_sts exceeds the maximum length of 4".to_string()));
65615			}
65616		}
65617		if let Some(ref vec) = self.sts_rsn_inf { for item in vec { item.validate()? } }
65618		if let Some(ref vec) = self.nb_of_txs_per_sts { for item in vec { item.validate()? } }
65619		if let Some(ref vec) = self.tx_inf_and_sts { for item in vec { item.validate()? } }
65620		Ok(())
65621	}
65622}
65623
65624
65625// OriginalPaymentInstruction48 ...
65626#[cfg_attr(feature = "derive_debug", derive(Debug))]
65627#[cfg_attr(feature = "derive_default", derive(Default))]
65628#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65629#[cfg_attr(feature = "derive_clone", derive(Clone))]
65630#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65631pub struct OriginalPaymentInstruction48 {
65632	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPmtInfCxlId", skip_serializing_if = "Option::is_none") )]
65633	pub orgnl_pmt_inf_cxl_id: Option<String>,
65634	#[cfg_attr( feature = "derive_serde", serde(rename = "RslvdCase", skip_serializing_if = "Option::is_none") )]
65635	pub rslvd_case: Option<Case6>,
65636	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPmtInfId") )]
65637	pub orgnl_pmt_inf_id: String,
65638	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
65639	pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
65640	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNbOfTxs", skip_serializing_if = "Option::is_none") )]
65641	pub orgnl_nb_of_txs: Option<String>,
65642	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCtrlSum", skip_serializing_if = "Option::is_none") )]
65643	pub orgnl_ctrl_sum: Option<f64>,
65644	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfCxlSts", skip_serializing_if = "Option::is_none") )]
65645	pub pmt_inf_cxl_sts: Option<GroupCancellationStatus1Code>,
65646	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlStsRsnInf", skip_serializing_if = "Option::is_none") )]
65647	pub cxl_sts_rsn_inf: Option<Vec<CancellationStatusReason5>>,
65648	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxsPerCxlSts", skip_serializing_if = "Option::is_none") )]
65649	pub nb_of_txs_per_cxl_sts: Option<Vec<NumberOfCancellationsPerStatus1>>,
65650	#[cfg_attr( feature = "derive_serde", serde(rename = "TxInfAndSts", skip_serializing_if = "Option::is_none") )]
65651	pub tx_inf_and_sts: Option<Vec<PaymentTransaction153>>,
65652}
65653
65654impl OriginalPaymentInstruction48 {
65655	pub fn validate(&self) -> Result<(), ValidationError> {
65656		if let Some(ref val) = self.orgnl_pmt_inf_cxl_id {
65657			if val.chars().count() < 1 {
65658				return Err(ValidationError::new(1001, "orgnl_pmt_inf_cxl_id is shorter than the minimum length of 1".to_string()));
65659			}
65660			if val.chars().count() > 35 {
65661				return Err(ValidationError::new(1002, "orgnl_pmt_inf_cxl_id exceeds the maximum length of 35".to_string()));
65662			}
65663		}
65664		if let Some(ref val) = self.rslvd_case { val.validate()? }
65665		if self.orgnl_pmt_inf_id.chars().count() < 1 {
65666			return Err(ValidationError::new(1001, "orgnl_pmt_inf_id is shorter than the minimum length of 1".to_string()));
65667		}
65668		if self.orgnl_pmt_inf_id.chars().count() > 35 {
65669			return Err(ValidationError::new(1002, "orgnl_pmt_inf_id exceeds the maximum length of 35".to_string()));
65670		}
65671		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
65672		if let Some(ref val) = self.orgnl_nb_of_txs {
65673			let pattern = Regex::new("[0-9]{1,15}").unwrap();
65674			if !pattern.is_match(val) {
65675				return Err(ValidationError::new(1005, "orgnl_nb_of_txs does not match the required pattern".to_string()));
65676			}
65677		}
65678		if let Some(ref val) = self.pmt_inf_cxl_sts { val.validate()? }
65679		if let Some(ref vec) = self.cxl_sts_rsn_inf { for item in vec { item.validate()? } }
65680		if let Some(ref vec) = self.nb_of_txs_per_cxl_sts { for item in vec { item.validate()? } }
65681		if let Some(ref vec) = self.tx_inf_and_sts { for item in vec { item.validate()? } }
65682		Ok(())
65683	}
65684}
65685
65686
65687// OriginalPaymentInstruction49 ...
65688#[cfg_attr(feature = "derive_debug", derive(Debug))]
65689#[cfg_attr(feature = "derive_default", derive(Default))]
65690#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65691#[cfg_attr(feature = "derive_clone", derive(Clone))]
65692#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65693pub struct OriginalPaymentInstruction49 {
65694	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtCxlId", skip_serializing_if = "Option::is_none") )]
65695	pub pmt_cxl_id: Option<String>,
65696	#[cfg_attr( feature = "derive_serde", serde(rename = "Case", skip_serializing_if = "Option::is_none") )]
65697	pub case: Option<Case6>,
65698	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPmtInfId") )]
65699	pub orgnl_pmt_inf_id: String,
65700	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
65701	pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
65702	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs", skip_serializing_if = "Option::is_none") )]
65703	pub nb_of_txs: Option<String>,
65704	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
65705	pub ctrl_sum: Option<f64>,
65706	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfCxl", skip_serializing_if = "Option::is_none") )]
65707	pub pmt_inf_cxl: Option<bool>,
65708	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlRsnInf", skip_serializing_if = "Option::is_none") )]
65709	pub cxl_rsn_inf: Option<Vec<PaymentCancellationReason6>>,
65710	#[cfg_attr( feature = "derive_serde", serde(rename = "TxInf", skip_serializing_if = "Option::is_none") )]
65711	pub tx_inf: Option<Vec<PaymentTransaction154>>,
65712}
65713
65714impl OriginalPaymentInstruction49 {
65715	pub fn validate(&self) -> Result<(), ValidationError> {
65716		if let Some(ref val) = self.pmt_cxl_id {
65717			if val.chars().count() < 1 {
65718				return Err(ValidationError::new(1001, "pmt_cxl_id is shorter than the minimum length of 1".to_string()));
65719			}
65720			if val.chars().count() > 35 {
65721				return Err(ValidationError::new(1002, "pmt_cxl_id exceeds the maximum length of 35".to_string()));
65722			}
65723		}
65724		if let Some(ref val) = self.case { val.validate()? }
65725		if self.orgnl_pmt_inf_id.chars().count() < 1 {
65726			return Err(ValidationError::new(1001, "orgnl_pmt_inf_id is shorter than the minimum length of 1".to_string()));
65727		}
65728		if self.orgnl_pmt_inf_id.chars().count() > 35 {
65729			return Err(ValidationError::new(1002, "orgnl_pmt_inf_id exceeds the maximum length of 35".to_string()));
65730		}
65731		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
65732		if let Some(ref val) = self.nb_of_txs {
65733			let pattern = Regex::new("[0-9]{1,15}").unwrap();
65734			if !pattern.is_match(val) {
65735				return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
65736			}
65737		}
65738		if let Some(ref vec) = self.cxl_rsn_inf { for item in vec { item.validate()? } }
65739		if let Some(ref vec) = self.tx_inf { for item in vec { item.validate()? } }
65740		Ok(())
65741	}
65742}
65743
65744
65745// OriginalPaymentInstruction50 ...
65746#[cfg_attr(feature = "derive_debug", derive(Debug))]
65747#[cfg_attr(feature = "derive_default", derive(Default))]
65748#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65749#[cfg_attr(feature = "derive_clone", derive(Clone))]
65750#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65751pub struct OriginalPaymentInstruction50 {
65752	#[cfg_attr( feature = "derive_serde", serde(rename = "RvslPmtInfId", skip_serializing_if = "Option::is_none") )]
65753	pub rvsl_pmt_inf_id: Option<String>,
65754	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPmtInfId") )]
65755	pub orgnl_pmt_inf_id: String,
65756	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNbOfTxs", skip_serializing_if = "Option::is_none") )]
65757	pub orgnl_nb_of_txs: Option<String>,
65758	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCtrlSum", skip_serializing_if = "Option::is_none") )]
65759	pub orgnl_ctrl_sum: Option<f64>,
65760	#[cfg_attr( feature = "derive_serde", serde(rename = "BtchBookg", skip_serializing_if = "Option::is_none") )]
65761	pub btch_bookg: Option<bool>,
65762	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfRvsl", skip_serializing_if = "Option::is_none") )]
65763	pub pmt_inf_rvsl: Option<bool>,
65764	#[cfg_attr( feature = "derive_serde", serde(rename = "RvslRsnInf", skip_serializing_if = "Option::is_none") )]
65765	pub rvsl_rsn_inf: Option<Vec<PaymentReversalReason10>>,
65766	#[cfg_attr( feature = "derive_serde", serde(rename = "TxInf", skip_serializing_if = "Option::is_none") )]
65767	pub tx_inf: Option<Vec<PaymentTransaction156>>,
65768}
65769
65770impl OriginalPaymentInstruction50 {
65771	pub fn validate(&self) -> Result<(), ValidationError> {
65772		if let Some(ref val) = self.rvsl_pmt_inf_id {
65773			if val.chars().count() < 1 {
65774				return Err(ValidationError::new(1001, "rvsl_pmt_inf_id is shorter than the minimum length of 1".to_string()));
65775			}
65776			if val.chars().count() > 35 {
65777				return Err(ValidationError::new(1002, "rvsl_pmt_inf_id exceeds the maximum length of 35".to_string()));
65778			}
65779		}
65780		if self.orgnl_pmt_inf_id.chars().count() < 1 {
65781			return Err(ValidationError::new(1001, "orgnl_pmt_inf_id is shorter than the minimum length of 1".to_string()));
65782		}
65783		if self.orgnl_pmt_inf_id.chars().count() > 35 {
65784			return Err(ValidationError::new(1002, "orgnl_pmt_inf_id exceeds the maximum length of 35".to_string()));
65785		}
65786		if let Some(ref val) = self.orgnl_nb_of_txs {
65787			let pattern = Regex::new("[0-9]{1,15}").unwrap();
65788			if !pattern.is_match(val) {
65789				return Err(ValidationError::new(1005, "orgnl_nb_of_txs does not match the required pattern".to_string()));
65790			}
65791		}
65792		if let Some(ref vec) = self.rvsl_rsn_inf { for item in vec { item.validate()? } }
65793		if let Some(ref vec) = self.tx_inf { for item in vec { item.validate()? } }
65794		Ok(())
65795	}
65796}
65797
65798
65799// OriginalPaymentInstruction51 ...
65800#[cfg_attr(feature = "derive_debug", derive(Debug))]
65801#[cfg_attr(feature = "derive_default", derive(Default))]
65802#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65803#[cfg_attr(feature = "derive_clone", derive(Clone))]
65804#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65805pub struct OriginalPaymentInstruction51 {
65806	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPmtInfId") )]
65807	pub orgnl_pmt_inf_id: String,
65808	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNbOfTxs", skip_serializing_if = "Option::is_none") )]
65809	pub orgnl_nb_of_txs: Option<String>,
65810	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCtrlSum", skip_serializing_if = "Option::is_none") )]
65811	pub orgnl_ctrl_sum: Option<f64>,
65812	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfSts", skip_serializing_if = "Option::is_none") )]
65813	pub pmt_inf_sts: Option<String>,
65814	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsnInf", skip_serializing_if = "Option::is_none") )]
65815	pub sts_rsn_inf: Option<Vec<StatusReasonInformation14>>,
65816	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxsPerSts", skip_serializing_if = "Option::is_none") )]
65817	pub nb_of_txs_per_sts: Option<Vec<NumberOfTransactionsPerStatus5>>,
65818	#[cfg_attr( feature = "derive_serde", serde(rename = "TxInfAndSts", skip_serializing_if = "Option::is_none") )]
65819	pub tx_inf_and_sts: Option<Vec<PaymentTransaction160>>,
65820}
65821
65822impl OriginalPaymentInstruction51 {
65823	pub fn validate(&self) -> Result<(), ValidationError> {
65824		if self.orgnl_pmt_inf_id.chars().count() < 1 {
65825			return Err(ValidationError::new(1001, "orgnl_pmt_inf_id is shorter than the minimum length of 1".to_string()));
65826		}
65827		if self.orgnl_pmt_inf_id.chars().count() > 35 {
65828			return Err(ValidationError::new(1002, "orgnl_pmt_inf_id exceeds the maximum length of 35".to_string()));
65829		}
65830		if let Some(ref val) = self.orgnl_nb_of_txs {
65831			let pattern = Regex::new("[0-9]{1,15}").unwrap();
65832			if !pattern.is_match(val) {
65833				return Err(ValidationError::new(1005, "orgnl_nb_of_txs does not match the required pattern".to_string()));
65834			}
65835		}
65836		if let Some(ref val) = self.pmt_inf_sts {
65837			if val.chars().count() < 1 {
65838				return Err(ValidationError::new(1001, "pmt_inf_sts is shorter than the minimum length of 1".to_string()));
65839			}
65840			if val.chars().count() > 4 {
65841				return Err(ValidationError::new(1002, "pmt_inf_sts exceeds the maximum length of 4".to_string()));
65842			}
65843		}
65844		if let Some(ref vec) = self.sts_rsn_inf { for item in vec { item.validate()? } }
65845		if let Some(ref vec) = self.nb_of_txs_per_sts { for item in vec { item.validate()? } }
65846		if let Some(ref vec) = self.tx_inf_and_sts { for item in vec { item.validate()? } }
65847		Ok(())
65848	}
65849}
65850
65851
65852// OriginalReportStatistics3 ...
65853#[cfg_attr(feature = "derive_debug", derive(Debug))]
65854#[cfg_attr(feature = "derive_default", derive(Default))]
65855#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65856#[cfg_attr(feature = "derive_clone", derive(Clone))]
65857#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65858pub struct OriginalReportStatistics3 {
65859	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfRcrds") )]
65860	pub ttl_nb_of_rcrds: String,
65861	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfRcrdsPerSts") )]
65862	pub nb_of_rcrds_per_sts: Vec<NumberOfRecordsPerStatus1>,
65863}
65864
65865impl OriginalReportStatistics3 {
65866	pub fn validate(&self) -> Result<(), ValidationError> {
65867		let pattern = Regex::new("[0-9]{1,15}").unwrap();
65868		if !pattern.is_match(&self.ttl_nb_of_rcrds) {
65869			return Err(ValidationError::new(1005, "ttl_nb_of_rcrds does not match the required pattern".to_string()));
65870		}
65871		for item in &self.nb_of_rcrds_per_sts { item.validate()? }
65872		Ok(())
65873	}
65874}
65875
65876
65877// OriginalTransactionReference35 ...
65878#[cfg_attr(feature = "derive_debug", derive(Debug))]
65879#[cfg_attr(feature = "derive_default", derive(Default))]
65880#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65881#[cfg_attr(feature = "derive_clone", derive(Clone))]
65882#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65883pub struct OriginalTransactionReference35 {
65884	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
65885	pub intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
65886	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
65887	pub amt: Option<AmountType4Choice>,
65888	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
65889	pub intr_bk_sttlm_dt: Option<String>,
65890	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdColltnDt", skip_serializing_if = "Option::is_none") )]
65891	pub reqd_colltn_dt: Option<String>,
65892	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
65893	pub reqd_exctn_dt: Option<DateAndDateTime2Choice>,
65894	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrSchmeId", skip_serializing_if = "Option::is_none") )]
65895	pub cdtr_schme_id: Option<PartyIdentification135>,
65896	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInf", skip_serializing_if = "Option::is_none") )]
65897	pub sttlm_inf: Option<SettlementInstruction11>,
65898	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
65899	pub pmt_tp_inf: Option<PaymentTypeInformation27>,
65900	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMtd", skip_serializing_if = "Option::is_none") )]
65901	pub pmt_mtd: Option<PaymentMethod4Code>,
65902	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtRltdInf", skip_serializing_if = "Option::is_none") )]
65903	pub mndt_rltd_inf: Option<MandateRelatedData2Choice>,
65904	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
65905	pub rmt_inf: Option<RemittanceInformation21>,
65906	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
65907	pub ultmt_dbtr: Option<Party40Choice>,
65908	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
65909	pub dbtr: Option<Party40Choice>,
65910	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
65911	pub dbtr_acct: Option<CashAccount40>,
65912	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
65913	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
65914	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
65915	pub dbtr_agt_acct: Option<CashAccount40>,
65916	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
65917	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
65918	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
65919	pub cdtr_agt_acct: Option<CashAccount40>,
65920	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
65921	pub cdtr: Option<Party40Choice>,
65922	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
65923	pub cdtr_acct: Option<CashAccount40>,
65924	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
65925	pub ultmt_cdtr: Option<Party40Choice>,
65926	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
65927	pub purp: Option<Purpose2Choice>,
65928}
65929
65930impl OriginalTransactionReference35 {
65931	pub fn validate(&self) -> Result<(), ValidationError> {
65932		if let Some(ref val) = self.intr_bk_sttlm_amt { val.validate()? }
65933		if let Some(ref val) = self.amt { val.validate()? }
65934		if let Some(ref val) = self.reqd_exctn_dt { val.validate()? }
65935		if let Some(ref val) = self.cdtr_schme_id { val.validate()? }
65936		if let Some(ref val) = self.sttlm_inf { val.validate()? }
65937		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
65938		if let Some(ref val) = self.pmt_mtd { val.validate()? }
65939		if let Some(ref val) = self.mndt_rltd_inf { val.validate()? }
65940		if let Some(ref val) = self.rmt_inf { val.validate()? }
65941		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
65942		if let Some(ref val) = self.dbtr { val.validate()? }
65943		if let Some(ref val) = self.dbtr_acct { val.validate()? }
65944		if let Some(ref val) = self.dbtr_agt { val.validate()? }
65945		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
65946		if let Some(ref val) = self.cdtr_agt { val.validate()? }
65947		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
65948		if let Some(ref val) = self.cdtr { val.validate()? }
65949		if let Some(ref val) = self.cdtr_acct { val.validate()? }
65950		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
65951		if let Some(ref val) = self.purp { val.validate()? }
65952		Ok(())
65953	}
65954}
65955
65956
65957// OriginalTransactionReference40 ...
65958#[cfg_attr(feature = "derive_debug", derive(Debug))]
65959#[cfg_attr(feature = "derive_default", derive(Default))]
65960#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
65961#[cfg_attr(feature = "derive_clone", derive(Clone))]
65962#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
65963pub struct OriginalTransactionReference40 {
65964	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
65965	pub amt: Option<AmountType4Choice>,
65966	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
65967	pub reqd_exctn_dt: Option<DateAndDateTime2Choice>,
65968	#[cfg_attr( feature = "derive_serde", serde(rename = "XpryDt", skip_serializing_if = "Option::is_none") )]
65969	pub xpry_dt: Option<DateAndDateTime2Choice>,
65970	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtCond", skip_serializing_if = "Option::is_none") )]
65971	pub pmt_cond: Option<PaymentCondition2>,
65972	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
65973	pub pmt_tp_inf: Option<PaymentTypeInformation29>,
65974	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMtd", skip_serializing_if = "Option::is_none") )]
65975	pub pmt_mtd: Option<PaymentMethod4Code>,
65976	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtRltdInf", skip_serializing_if = "Option::is_none") )]
65977	pub mndt_rltd_inf: Option<CreditTransferMandateData1>,
65978	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
65979	pub rmt_inf: Option<RemittanceInformation22>,
65980	#[cfg_attr( feature = "derive_serde", serde(rename = "NclsdFile", skip_serializing_if = "Option::is_none") )]
65981	pub nclsd_file: Option<Vec<Document15>>,
65982	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
65983	pub ultmt_dbtr: Option<PartyIdentification272>,
65984	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
65985	pub dbtr: Option<PartyIdentification272>,
65986	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
65987	pub dbtr_acct: Option<CashAccount40>,
65988	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
65989	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
65990	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
65991	pub dbtr_agt_acct: Option<CashAccount40>,
65992	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt") )]
65993	pub cdtr_agt: BranchAndFinancialInstitutionIdentification8,
65994	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
65995	pub cdtr_agt_acct: Option<CashAccount40>,
65996	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
65997	pub cdtr: PartyIdentification272,
65998	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
65999	pub cdtr_acct: Option<CashAccount40>,
66000	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
66001	pub ultmt_cdtr: Option<PartyIdentification272>,
66002}
66003
66004impl OriginalTransactionReference40 {
66005	pub fn validate(&self) -> Result<(), ValidationError> {
66006		if let Some(ref val) = self.amt { val.validate()? }
66007		if let Some(ref val) = self.reqd_exctn_dt { val.validate()? }
66008		if let Some(ref val) = self.xpry_dt { val.validate()? }
66009		if let Some(ref val) = self.pmt_cond { val.validate()? }
66010		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
66011		if let Some(ref val) = self.pmt_mtd { val.validate()? }
66012		if let Some(ref val) = self.mndt_rltd_inf { val.validate()? }
66013		if let Some(ref val) = self.rmt_inf { val.validate()? }
66014		if let Some(ref vec) = self.nclsd_file { for item in vec { item.validate()? } }
66015		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
66016		if let Some(ref val) = self.dbtr { val.validate()? }
66017		if let Some(ref val) = self.dbtr_acct { val.validate()? }
66018		if let Some(ref val) = self.dbtr_agt { val.validate()? }
66019		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
66020		self.cdtr_agt.validate()?;
66021		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
66022		self.cdtr.validate()?;
66023		if let Some(ref val) = self.cdtr_acct { val.validate()? }
66024		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
66025		Ok(())
66026	}
66027}
66028
66029
66030// OriginalTransactionReference41 ...
66031#[cfg_attr(feature = "derive_debug", derive(Debug))]
66032#[cfg_attr(feature = "derive_default", derive(Default))]
66033#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66034#[cfg_attr(feature = "derive_clone", derive(Clone))]
66035#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66036pub struct OriginalTransactionReference41 {
66037	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
66038	pub intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
66039	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
66040	pub amt: Option<AmountType4Choice>,
66041	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
66042	pub intr_bk_sttlm_dt: Option<String>,
66043	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdColltnDt", skip_serializing_if = "Option::is_none") )]
66044	pub reqd_colltn_dt: Option<String>,
66045	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
66046	pub reqd_exctn_dt: Option<DateAndDateTime2Choice>,
66047	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrSchmeId", skip_serializing_if = "Option::is_none") )]
66048	pub cdtr_schme_id: Option<PartyIdentification272>,
66049	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInf", skip_serializing_if = "Option::is_none") )]
66050	pub sttlm_inf: Option<SettlementInstruction15>,
66051	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
66052	pub pmt_tp_inf: Option<PaymentTypeInformation27>,
66053	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMtd", skip_serializing_if = "Option::is_none") )]
66054	pub pmt_mtd: Option<PaymentMethod4Code>,
66055	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtRltdInf", skip_serializing_if = "Option::is_none") )]
66056	pub mndt_rltd_inf: Option<MandateRelatedData3Choice>,
66057	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
66058	pub rmt_inf: Option<RemittanceInformation22>,
66059	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
66060	pub ultmt_dbtr: Option<Party50Choice>,
66061	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
66062	pub dbtr: Option<Party50Choice>,
66063	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
66064	pub dbtr_acct: Option<CashAccount40>,
66065	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
66066	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
66067	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
66068	pub dbtr_agt_acct: Option<CashAccount40>,
66069	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
66070	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
66071	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
66072	pub cdtr_agt_acct: Option<CashAccount40>,
66073	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
66074	pub cdtr: Option<Party50Choice>,
66075	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
66076	pub cdtr_acct: Option<CashAccount40>,
66077	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
66078	pub ultmt_cdtr: Option<Party50Choice>,
66079	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
66080	pub purp: Option<Purpose2Choice>,
66081	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygCstmrCdtTrf", skip_serializing_if = "Option::is_none") )]
66082	pub undrlyg_cstmr_cdt_trf: Option<CreditTransferTransaction63>,
66083}
66084
66085impl OriginalTransactionReference41 {
66086	pub fn validate(&self) -> Result<(), ValidationError> {
66087		if let Some(ref val) = self.intr_bk_sttlm_amt { val.validate()? }
66088		if let Some(ref val) = self.amt { val.validate()? }
66089		if let Some(ref val) = self.reqd_exctn_dt { val.validate()? }
66090		if let Some(ref val) = self.cdtr_schme_id { val.validate()? }
66091		if let Some(ref val) = self.sttlm_inf { val.validate()? }
66092		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
66093		if let Some(ref val) = self.pmt_mtd { val.validate()? }
66094		if let Some(ref val) = self.mndt_rltd_inf { val.validate()? }
66095		if let Some(ref val) = self.rmt_inf { val.validate()? }
66096		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
66097		if let Some(ref val) = self.dbtr { val.validate()? }
66098		if let Some(ref val) = self.dbtr_acct { val.validate()? }
66099		if let Some(ref val) = self.dbtr_agt { val.validate()? }
66100		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
66101		if let Some(ref val) = self.cdtr_agt { val.validate()? }
66102		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
66103		if let Some(ref val) = self.cdtr { val.validate()? }
66104		if let Some(ref val) = self.cdtr_acct { val.validate()? }
66105		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
66106		if let Some(ref val) = self.purp { val.validate()? }
66107		if let Some(ref val) = self.undrlyg_cstmr_cdt_trf { val.validate()? }
66108		Ok(())
66109	}
66110}
66111
66112
66113// OriginalTransactionReference42 ...
66114#[cfg_attr(feature = "derive_debug", derive(Debug))]
66115#[cfg_attr(feature = "derive_default", derive(Default))]
66116#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66117#[cfg_attr(feature = "derive_clone", derive(Clone))]
66118#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66119pub struct OriginalTransactionReference42 {
66120	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
66121	pub intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
66122	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
66123	pub amt: Option<AmountType4Choice>,
66124	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
66125	pub intr_bk_sttlm_dt: Option<String>,
66126	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdColltnDt", skip_serializing_if = "Option::is_none") )]
66127	pub reqd_colltn_dt: Option<String>,
66128	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
66129	pub reqd_exctn_dt: Option<DateAndDateTime2Choice>,
66130	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrSchmeId", skip_serializing_if = "Option::is_none") )]
66131	pub cdtr_schme_id: Option<PartyIdentification272>,
66132	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInf", skip_serializing_if = "Option::is_none") )]
66133	pub sttlm_inf: Option<SettlementInstruction15>,
66134	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
66135	pub pmt_tp_inf: Option<PaymentTypeInformation27>,
66136	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMtd", skip_serializing_if = "Option::is_none") )]
66137	pub pmt_mtd: Option<PaymentMethod4Code>,
66138	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtRltdInf", skip_serializing_if = "Option::is_none") )]
66139	pub mndt_rltd_inf: Option<MandateRelatedData3Choice>,
66140	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
66141	pub rmt_inf: Option<RemittanceInformation22>,
66142	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
66143	pub ultmt_dbtr: Option<Party50Choice>,
66144	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
66145	pub dbtr: Option<Party50Choice>,
66146	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
66147	pub dbtr_acct: Option<CashAccount40>,
66148	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
66149	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
66150	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
66151	pub dbtr_agt_acct: Option<CashAccount40>,
66152	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
66153	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
66154	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
66155	pub cdtr_agt_acct: Option<CashAccount40>,
66156	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
66157	pub cdtr: Option<Party50Choice>,
66158	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
66159	pub cdtr_acct: Option<CashAccount40>,
66160	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
66161	pub ultmt_cdtr: Option<Party50Choice>,
66162	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
66163	pub purp: Option<Purpose2Choice>,
66164}
66165
66166impl OriginalTransactionReference42 {
66167	pub fn validate(&self) -> Result<(), ValidationError> {
66168		if let Some(ref val) = self.intr_bk_sttlm_amt { val.validate()? }
66169		if let Some(ref val) = self.amt { val.validate()? }
66170		if let Some(ref val) = self.reqd_exctn_dt { val.validate()? }
66171		if let Some(ref val) = self.cdtr_schme_id { val.validate()? }
66172		if let Some(ref val) = self.sttlm_inf { val.validate()? }
66173		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
66174		if let Some(ref val) = self.pmt_mtd { val.validate()? }
66175		if let Some(ref val) = self.mndt_rltd_inf { val.validate()? }
66176		if let Some(ref val) = self.rmt_inf { val.validate()? }
66177		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
66178		if let Some(ref val) = self.dbtr { val.validate()? }
66179		if let Some(ref val) = self.dbtr_acct { val.validate()? }
66180		if let Some(ref val) = self.dbtr_agt { val.validate()? }
66181		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
66182		if let Some(ref val) = self.cdtr_agt { val.validate()? }
66183		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
66184		if let Some(ref val) = self.cdtr { val.validate()? }
66185		if let Some(ref val) = self.cdtr_acct { val.validate()? }
66186		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
66187		if let Some(ref val) = self.purp { val.validate()? }
66188		Ok(())
66189	}
66190}
66191
66192
66193// OriginalTransactionReference43 ...
66194#[cfg_attr(feature = "derive_debug", derive(Debug))]
66195#[cfg_attr(feature = "derive_default", derive(Default))]
66196#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66197#[cfg_attr(feature = "derive_clone", derive(Clone))]
66198#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66199pub struct OriginalTransactionReference43 {
66200	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId", skip_serializing_if = "Option::is_none") )]
66201	pub msg_id: Option<String>,
66202	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNmId", skip_serializing_if = "Option::is_none") )]
66203	pub msg_nm_id: Option<String>,
66204	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
66205	pub cre_dt_tm: Option<String>,
66206	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTx", skip_serializing_if = "Option::is_none") )]
66207	pub orgnl_tx: Option<Vec<PaymentIdentification15>>,
66208}
66209
66210impl OriginalTransactionReference43 {
66211	pub fn validate(&self) -> Result<(), ValidationError> {
66212		if let Some(ref val) = self.msg_id {
66213			if val.chars().count() < 1 {
66214				return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
66215			}
66216			if val.chars().count() > 35 {
66217				return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
66218			}
66219		}
66220		if let Some(ref val) = self.msg_nm_id {
66221			if val.chars().count() < 1 {
66222				return Err(ValidationError::new(1001, "msg_nm_id is shorter than the minimum length of 1".to_string()));
66223			}
66224			if val.chars().count() > 35 {
66225				return Err(ValidationError::new(1002, "msg_nm_id exceeds the maximum length of 35".to_string()));
66226			}
66227		}
66228		if let Some(ref vec) = self.orgnl_tx { for item in vec { item.validate()? } }
66229		Ok(())
66230	}
66231}
66232
66233
66234// OtherAccountStatus1 ...
66235#[cfg_attr(feature = "derive_debug", derive(Debug))]
66236#[cfg_attr(feature = "derive_default", derive(Default))]
66237#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66238#[cfg_attr(feature = "derive_clone", derive(Clone))]
66239#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66240pub struct OtherAccountStatus1 {
66241	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
66242	pub sts: GenericIdentification36,
66243	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
66244	pub rsn: Option<GenericIdentification36>,
66245}
66246
66247impl OtherAccountStatus1 {
66248	pub fn validate(&self) -> Result<(), ValidationError> {
66249		self.sts.validate()?;
66250		if let Some(ref val) = self.rsn { val.validate()? }
66251		Ok(())
66252	}
66253}
66254
66255
66256// OtherC10CommodityDeliverable2 ...
66257#[cfg_attr(feature = "derive_debug", derive(Debug))]
66258#[cfg_attr(feature = "derive_default", derive(Default))]
66259#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66260#[cfg_attr(feature = "derive_clone", derive(Clone))]
66261#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66262pub struct OtherC10CommodityDeliverable2 {
66263	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
66264	pub base_pdct: AssetClassProductType11Code,
66265	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
66266	pub sub_pdct: Option<AssetClassSubProductType47Code>,
66267}
66268
66269impl OtherC10CommodityDeliverable2 {
66270	pub fn validate(&self) -> Result<(), ValidationError> {
66271		self.base_pdct.validate()?;
66272		if let Some(ref val) = self.sub_pdct { val.validate()? }
66273		Ok(())
66274	}
66275}
66276
66277
66278// OtherC10CommodityNonDeliverable2 ...
66279#[cfg_attr(feature = "derive_debug", derive(Debug))]
66280#[cfg_attr(feature = "derive_default", derive(Default))]
66281#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66282#[cfg_attr(feature = "derive_clone", derive(Clone))]
66283#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66284pub struct OtherC10CommodityNonDeliverable2 {
66285	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
66286	pub base_pdct: AssetClassProductType11Code,
66287	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
66288	pub sub_pdct: Option<AssetClassSubProductType48Code>,
66289}
66290
66291impl OtherC10CommodityNonDeliverable2 {
66292	pub fn validate(&self) -> Result<(), ValidationError> {
66293		self.base_pdct.validate()?;
66294		if let Some(ref val) = self.sub_pdct { val.validate()? }
66295		Ok(())
66296	}
66297}
66298
66299
66300// OtherContact1 ...
66301#[cfg_attr(feature = "derive_debug", derive(Debug))]
66302#[cfg_attr(feature = "derive_default", derive(Default))]
66303#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66304#[cfg_attr(feature = "derive_clone", derive(Clone))]
66305#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66306pub struct OtherContact1 {
66307	#[cfg_attr( feature = "derive_serde", serde(rename = "ChanlTp") )]
66308	pub chanl_tp: String,
66309	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
66310	pub id: Option<String>,
66311}
66312
66313impl OtherContact1 {
66314	pub fn validate(&self) -> Result<(), ValidationError> {
66315		if self.chanl_tp.chars().count() < 1 {
66316			return Err(ValidationError::new(1001, "chanl_tp is shorter than the minimum length of 1".to_string()));
66317		}
66318		if self.chanl_tp.chars().count() > 4 {
66319			return Err(ValidationError::new(1002, "chanl_tp exceeds the maximum length of 4".to_string()));
66320		}
66321		if let Some(ref val) = self.id {
66322			if val.chars().count() < 1 {
66323				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
66324			}
66325			if val.chars().count() > 128 {
66326				return Err(ValidationError::new(1002, "id exceeds the maximum length of 128".to_string()));
66327			}
66328		}
66329		Ok(())
66330	}
66331}
66332
66333
66334// OtherDistributionStrategy1 ...
66335#[cfg_attr(feature = "derive_debug", derive(Debug))]
66336#[cfg_attr(feature = "derive_default", derive(Default))]
66337#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66338#[cfg_attr(feature = "derive_clone", derive(Clone))]
66339#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66340pub struct OtherDistributionStrategy1 {
66341	#[cfg_attr( feature = "derive_serde", serde(rename = "DstrbtnStrtgyTp", skip_serializing_if = "Option::is_none") )]
66342	pub dstrbtn_strtgy_tp: Option<String>,
66343	#[cfg_attr( feature = "derive_serde", serde(rename = "Trgt", skip_serializing_if = "Option::is_none") )]
66344	pub trgt: Option<DistributionStrategy1Choice>,
66345	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
66346	pub addtl_inf: Option<AdditionalInformation15>,
66347}
66348
66349impl OtherDistributionStrategy1 {
66350	pub fn validate(&self) -> Result<(), ValidationError> {
66351		if let Some(ref val) = self.dstrbtn_strtgy_tp {
66352			if val.chars().count() < 1 {
66353				return Err(ValidationError::new(1001, "dstrbtn_strtgy_tp is shorter than the minimum length of 1".to_string()));
66354			}
66355			if val.chars().count() > 35 {
66356				return Err(ValidationError::new(1002, "dstrbtn_strtgy_tp exceeds the maximum length of 35".to_string()));
66357			}
66358		}
66359		if let Some(ref val) = self.trgt { val.validate()? }
66360		if let Some(ref val) = self.addtl_inf { val.validate()? }
66361		Ok(())
66362	}
66363}
66364
66365
66366// OtherIdentification1 ...
66367#[cfg_attr(feature = "derive_debug", derive(Debug))]
66368#[cfg_attr(feature = "derive_default", derive(Default))]
66369#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66370#[cfg_attr(feature = "derive_clone", derive(Clone))]
66371#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66372pub struct OtherIdentification1 {
66373	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
66374	pub id: String,
66375	#[cfg_attr( feature = "derive_serde", serde(rename = "Sfx", skip_serializing_if = "Option::is_none") )]
66376	pub sfx: Option<String>,
66377	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
66378	pub tp: IdentificationSource3Choice,
66379}
66380
66381impl OtherIdentification1 {
66382	pub fn validate(&self) -> Result<(), ValidationError> {
66383		if self.id.chars().count() < 1 {
66384			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
66385		}
66386		if self.id.chars().count() > 35 {
66387			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
66388		}
66389		if let Some(ref val) = self.sfx {
66390			if val.chars().count() < 1 {
66391				return Err(ValidationError::new(1001, "sfx is shorter than the minimum length of 1".to_string()));
66392			}
66393			if val.chars().count() > 16 {
66394				return Err(ValidationError::new(1002, "sfx exceeds the maximum length of 16".to_string()));
66395			}
66396		}
66397		self.tp.validate()?;
66398		Ok(())
66399	}
66400}
66401
66402
66403// OtherIdentification1Choice ...
66404#[cfg_attr(feature = "derive_debug", derive(Debug))]
66405#[cfg_attr(feature = "derive_default", derive(Default))]
66406#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66407#[cfg_attr(feature = "derive_clone", derive(Clone))]
66408#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66409pub struct OtherIdentification1Choice {
66410	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
66411	pub cd: Option<PersonIdentificationType5Code>,
66412	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
66413	pub prtry: Option<GenericIdentification47>,
66414}
66415
66416impl OtherIdentification1Choice {
66417	pub fn validate(&self) -> Result<(), ValidationError> {
66418		if let Some(ref val) = self.cd { val.validate()? }
66419		if let Some(ref val) = self.prtry { val.validate()? }
66420		Ok(())
66421	}
66422}
66423
66424
66425// OtherIdentification3Choice ...
66426#[cfg_attr(feature = "derive_debug", derive(Debug))]
66427#[cfg_attr(feature = "derive_default", derive(Default))]
66428#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66429#[cfg_attr(feature = "derive_clone", derive(Clone))]
66430#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66431pub struct OtherIdentification3Choice {
66432	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
66433	pub cd: Option<PartyIdentificationType7Code>,
66434	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
66435	pub prtry: Option<GenericIdentification47>,
66436}
66437
66438impl OtherIdentification3Choice {
66439	pub fn validate(&self) -> Result<(), ValidationError> {
66440		if let Some(ref val) = self.cd { val.validate()? }
66441		if let Some(ref val) = self.prtry { val.validate()? }
66442		Ok(())
66443	}
66444}
66445
66446
66447// OtherIdentification4 ...
66448#[cfg_attr(feature = "derive_debug", derive(Debug))]
66449#[cfg_attr(feature = "derive_default", derive(Default))]
66450#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66451#[cfg_attr(feature = "derive_clone", derive(Clone))]
66452#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66453pub struct OtherIdentification4 {
66454	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
66455	pub id: String,
66456	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
66457	pub tp: IdentificationSource5Choice,
66458}
66459
66460impl OtherIdentification4 {
66461	pub fn validate(&self) -> Result<(), ValidationError> {
66462		if self.id.chars().count() < 1 {
66463			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
66464		}
66465		if self.id.chars().count() > 35 {
66466			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
66467		}
66468		self.tp.validate()?;
66469		Ok(())
66470	}
66471}
66472
66473
66474// OtherInvestment1 ...
66475#[cfg_attr(feature = "derive_debug", derive(Debug))]
66476#[cfg_attr(feature = "derive_default", derive(Default))]
66477#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66478#[cfg_attr(feature = "derive_clone", derive(Clone))]
66479#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66480pub struct OtherInvestment1 {
66481	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc") )]
66482	pub desc: String,
66483	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
66484	pub amt: ActiveCurrencyAndAmount,
66485}
66486
66487impl OtherInvestment1 {
66488	pub fn validate(&self) -> Result<(), ValidationError> {
66489		if self.desc.chars().count() < 1 {
66490			return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
66491		}
66492		if self.desc.chars().count() > 140 {
66493			return Err(ValidationError::new(1002, "desc exceeds the maximum length of 140".to_string()));
66494		}
66495		self.amt.validate()?;
66496		Ok(())
66497	}
66498}
66499
66500
66501// OtherInvestmentNeed1 ...
66502#[cfg_attr(feature = "derive_debug", derive(Debug))]
66503#[cfg_attr(feature = "derive_default", derive(Default))]
66504#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66505#[cfg_attr(feature = "derive_clone", derive(Clone))]
66506#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66507pub struct OtherInvestmentNeed1 {
66508	#[cfg_attr( feature = "derive_serde", serde(rename = "ClntObjctvsAndNeedsTp", skip_serializing_if = "Option::is_none") )]
66509	pub clnt_objctvs_and_needs_tp: Option<String>,
66510	#[cfg_attr( feature = "derive_serde", serde(rename = "Trgt", skip_serializing_if = "Option::is_none") )]
66511	pub trgt: Option<TargetMarket1Choice>,
66512	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
66513	pub addtl_inf: Option<AdditionalInformation15>,
66514}
66515
66516impl OtherInvestmentNeed1 {
66517	pub fn validate(&self) -> Result<(), ValidationError> {
66518		if let Some(ref val) = self.clnt_objctvs_and_needs_tp {
66519			if val.chars().count() < 1 {
66520				return Err(ValidationError::new(1001, "clnt_objctvs_and_needs_tp is shorter than the minimum length of 1".to_string()));
66521			}
66522			if val.chars().count() > 35 {
66523				return Err(ValidationError::new(1002, "clnt_objctvs_and_needs_tp exceeds the maximum length of 35".to_string()));
66524			}
66525		}
66526		if let Some(ref val) = self.trgt { val.validate()? }
66527		if let Some(ref val) = self.addtl_inf { val.validate()? }
66528		Ok(())
66529	}
66530}
66531
66532
66533// OtherPayment5 ...
66534#[cfg_attr(feature = "derive_debug", derive(Debug))]
66535#[cfg_attr(feature = "derive_default", derive(Default))]
66536#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66537#[cfg_attr(feature = "derive_clone", derive(Clone))]
66538#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66539pub struct OtherPayment5 {
66540	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtAmt", skip_serializing_if = "Option::is_none") )]
66541	pub pmt_amt: Option<AmountAndDirection106>,
66542	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTp", skip_serializing_if = "Option::is_none") )]
66543	pub pmt_tp: Option<PaymentType5Choice>,
66544	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtDt", skip_serializing_if = "Option::is_none") )]
66545	pub pmt_dt: Option<String>,
66546	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtPyer", skip_serializing_if = "Option::is_none") )]
66547	pub pmt_pyer: Option<PartyIdentification236Choice>,
66548	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtRcvr", skip_serializing_if = "Option::is_none") )]
66549	pub pmt_rcvr: Option<PartyIdentification236Choice>,
66550}
66551
66552impl OtherPayment5 {
66553	pub fn validate(&self) -> Result<(), ValidationError> {
66554		if let Some(ref val) = self.pmt_amt { val.validate()? }
66555		if let Some(ref val) = self.pmt_tp { val.validate()? }
66556		if let Some(ref val) = self.pmt_pyer { val.validate()? }
66557		if let Some(ref val) = self.pmt_rcvr { val.validate()? }
66558		Ok(())
66559	}
66560}
66561
66562
66563// OtherPayment6 ...
66564#[cfg_attr(feature = "derive_debug", derive(Debug))]
66565#[cfg_attr(feature = "derive_default", derive(Default))]
66566#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66567#[cfg_attr(feature = "derive_clone", derive(Clone))]
66568#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66569pub struct OtherPayment6 {
66570	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtCcy", skip_serializing_if = "Option::is_none") )]
66571	pub pmt_ccy: Option<String>,
66572	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTp", skip_serializing_if = "Option::is_none") )]
66573	pub pmt_tp: Option<PaymentType5Choice>,
66574	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtDt", skip_serializing_if = "Option::is_none") )]
66575	pub pmt_dt: Option<String>,
66576	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtPyer", skip_serializing_if = "Option::is_none") )]
66577	pub pmt_pyer: Option<PartyIdentification236Choice>,
66578	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtRcvr", skip_serializing_if = "Option::is_none") )]
66579	pub pmt_rcvr: Option<PartyIdentification236Choice>,
66580}
66581
66582impl OtherPayment6 {
66583	pub fn validate(&self) -> Result<(), ValidationError> {
66584		if let Some(ref val) = self.pmt_ccy {
66585			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
66586			if !pattern.is_match(val) {
66587				return Err(ValidationError::new(1005, "pmt_ccy does not match the required pattern".to_string()));
66588			}
66589		}
66590		if let Some(ref val) = self.pmt_tp { val.validate()? }
66591		if let Some(ref val) = self.pmt_pyer { val.validate()? }
66592		if let Some(ref val) = self.pmt_rcvr { val.validate()? }
66593		Ok(())
66594	}
66595}
66596
66597
66598// OtherReviewRelatedToValueAndOrChargesUKType1Code ...
66599#[cfg_attr(feature = "derive_debug", derive(Debug))]
66600#[cfg_attr(feature = "derive_default", derive(Default))]
66601#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66602#[cfg_attr(feature = "derive_clone", derive(Clone))]
66603#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66604pub enum OtherReviewRelatedToValueAndOrChargesUKType1Code {
66605	#[cfg_attr(feature = "derive_default", default)]
66606	#[cfg_attr( feature = "derive_serde", serde(rename = "REVA") )]
66607	CodeREVA,
66608	#[cfg_attr( feature = "derive_serde", serde(rename = "REVO") )]
66609	CodeREVO,
66610}
66611
66612impl OtherReviewRelatedToValueAndOrChargesUKType1Code {
66613	pub fn validate(&self) -> Result<(), ValidationError> {
66614		Ok(())
66615	}
66616}
66617
66618
66619// OtherTargetMarket1 ...
66620#[cfg_attr(feature = "derive_debug", derive(Debug))]
66621#[cfg_attr(feature = "derive_default", derive(Default))]
66622#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66623#[cfg_attr(feature = "derive_clone", derive(Clone))]
66624#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66625pub struct OtherTargetMarket1 {
66626	#[cfg_attr( feature = "derive_serde", serde(rename = "TrgtMktTp") )]
66627	pub trgt_mkt_tp: String,
66628	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
66629	pub addtl_inf: Option<AdditionalInformation15>,
66630}
66631
66632impl OtherTargetMarket1 {
66633	pub fn validate(&self) -> Result<(), ValidationError> {
66634		if self.trgt_mkt_tp.chars().count() < 1 {
66635			return Err(ValidationError::new(1001, "trgt_mkt_tp is shorter than the minimum length of 1".to_string()));
66636		}
66637		if self.trgt_mkt_tp.chars().count() > 350 {
66638			return Err(ValidationError::new(1002, "trgt_mkt_tp exceeds the maximum length of 350".to_string()));
66639		}
66640		if let Some(ref val) = self.addtl_inf { val.validate()? }
66641		Ok(())
66642	}
66643}
66644
66645
66646// OtherTargetMarketInvestor1 ...
66647#[cfg_attr(feature = "derive_debug", derive(Debug))]
66648#[cfg_attr(feature = "derive_default", derive(Default))]
66649#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66650#[cfg_attr(feature = "derive_clone", derive(Clone))]
66651#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66652pub struct OtherTargetMarketInvestor1 {
66653	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrTp", skip_serializing_if = "Option::is_none") )]
66654	pub invstr_tp: Option<String>,
66655	#[cfg_attr( feature = "derive_serde", serde(rename = "Trgt", skip_serializing_if = "Option::is_none") )]
66656	pub trgt: Option<TargetMarket3Choice>,
66657	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
66658	pub addtl_inf: Option<AdditionalInformation15>,
66659}
66660
66661impl OtherTargetMarketInvestor1 {
66662	pub fn validate(&self) -> Result<(), ValidationError> {
66663		if let Some(ref val) = self.invstr_tp {
66664			if val.chars().count() < 1 {
66665				return Err(ValidationError::new(1001, "invstr_tp is shorter than the minimum length of 1".to_string()));
66666			}
66667			if val.chars().count() > 35 {
66668				return Err(ValidationError::new(1002, "invstr_tp exceeds the maximum length of 35".to_string()));
66669			}
66670		}
66671		if let Some(ref val) = self.trgt { val.validate()? }
66672		if let Some(ref val) = self.addtl_inf { val.validate()? }
66673		Ok(())
66674	}
66675}
66676
66677
66678// OtherTargetMarketInvestorKnowledge1 ...
66679#[cfg_attr(feature = "derive_debug", derive(Debug))]
66680#[cfg_attr(feature = "derive_default", derive(Default))]
66681#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66682#[cfg_attr(feature = "derive_clone", derive(Clone))]
66683#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66684pub struct OtherTargetMarketInvestorKnowledge1 {
66685	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrKnwldgTp", skip_serializing_if = "Option::is_none") )]
66686	pub invstr_knwldg_tp: Option<String>,
66687	#[cfg_attr( feature = "derive_serde", serde(rename = "Trgt", skip_serializing_if = "Option::is_none") )]
66688	pub trgt: Option<TargetMarket1Choice>,
66689	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
66690	pub addtl_inf: Option<AdditionalInformation15>,
66691}
66692
66693impl OtherTargetMarketInvestorKnowledge1 {
66694	pub fn validate(&self) -> Result<(), ValidationError> {
66695		if let Some(ref val) = self.invstr_knwldg_tp {
66696			if val.chars().count() < 1 {
66697				return Err(ValidationError::new(1001, "invstr_knwldg_tp is shorter than the minimum length of 1".to_string()));
66698			}
66699			if val.chars().count() > 35 {
66700				return Err(ValidationError::new(1002, "invstr_knwldg_tp exceeds the maximum length of 35".to_string()));
66701			}
66702		}
66703		if let Some(ref val) = self.trgt { val.validate()? }
66704		if let Some(ref val) = self.addtl_inf { val.validate()? }
66705		Ok(())
66706	}
66707}
66708
66709
66710// OtherTargetMarketLossBearing1 ...
66711#[cfg_attr(feature = "derive_debug", derive(Debug))]
66712#[cfg_attr(feature = "derive_default", derive(Default))]
66713#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66714#[cfg_attr(feature = "derive_clone", derive(Clone))]
66715#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66716pub struct OtherTargetMarketLossBearing1 {
66717	#[cfg_attr( feature = "derive_serde", serde(rename = "AbltyToBearLossesTp", skip_serializing_if = "Option::is_none") )]
66718	pub ablty_to_bear_losses_tp: Option<String>,
66719	#[cfg_attr( feature = "derive_serde", serde(rename = "Trgt", skip_serializing_if = "Option::is_none") )]
66720	pub trgt: Option<TargetMarket1Choice>,
66721	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
66722	pub addtl_inf: Option<AdditionalInformation15>,
66723}
66724
66725impl OtherTargetMarketLossBearing1 {
66726	pub fn validate(&self) -> Result<(), ValidationError> {
66727		if let Some(ref val) = self.ablty_to_bear_losses_tp {
66728			if val.chars().count() < 1 {
66729				return Err(ValidationError::new(1001, "ablty_to_bear_losses_tp is shorter than the minimum length of 1".to_string()));
66730			}
66731			if val.chars().count() > 35 {
66732				return Err(ValidationError::new(1002, "ablty_to_bear_losses_tp exceeds the maximum length of 35".to_string()));
66733			}
66734		}
66735		if let Some(ref val) = self.trgt { val.validate()? }
66736		if let Some(ref val) = self.addtl_inf { val.validate()? }
66737		Ok(())
66738	}
66739}
66740
66741
66742// OtherTargetMarketRiskTolerance1 ...
66743#[cfg_attr(feature = "derive_debug", derive(Debug))]
66744#[cfg_attr(feature = "derive_default", derive(Default))]
66745#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66746#[cfg_attr(feature = "derive_clone", derive(Clone))]
66747#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66748pub struct OtherTargetMarketRiskTolerance1 {
66749	#[cfg_attr( feature = "derive_serde", serde(rename = "RskTlrnceTp", skip_serializing_if = "Option::is_none") )]
66750	pub rsk_tlrnce_tp: Option<String>,
66751	#[cfg_attr( feature = "derive_serde", serde(rename = "Trgt", skip_serializing_if = "Option::is_none") )]
66752	pub trgt: Option<TargetMarket1Choice>,
66753	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
66754	pub addtl_inf: Option<AdditionalInformation15>,
66755}
66756
66757impl OtherTargetMarketRiskTolerance1 {
66758	pub fn validate(&self) -> Result<(), ValidationError> {
66759		if let Some(ref val) = self.rsk_tlrnce_tp {
66760			if val.chars().count() < 1 {
66761				return Err(ValidationError::new(1001, "rsk_tlrnce_tp is shorter than the minimum length of 1".to_string()));
66762			}
66763			if val.chars().count() > 35 {
66764				return Err(ValidationError::new(1002, "rsk_tlrnce_tp exceeds the maximum length of 35".to_string()));
66765			}
66766		}
66767		if let Some(ref val) = self.trgt { val.validate()? }
66768		if let Some(ref val) = self.addtl_inf { val.validate()? }
66769		Ok(())
66770	}
66771}
66772
66773
66774// OutcomeOfCOLLAssessmentOfValueUKType1Code ...
66775#[cfg_attr(feature = "derive_debug", derive(Debug))]
66776#[cfg_attr(feature = "derive_default", derive(Default))]
66777#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66778#[cfg_attr(feature = "derive_clone", derive(Clone))]
66779#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66780pub enum OutcomeOfCOLLAssessmentOfValueUKType1Code {
66781	#[cfg_attr(feature = "derive_default", default)]
66782	#[cfg_attr( feature = "derive_serde", serde(rename = "COL1") )]
66783	CodeCOL1,
66784	#[cfg_attr( feature = "derive_serde", serde(rename = "COL2") )]
66785	CodeCOL2,
66786}
66787
66788impl OutcomeOfCOLLAssessmentOfValueUKType1Code {
66789	pub fn validate(&self) -> Result<(), ValidationError> {
66790		Ok(())
66791	}
66792}
66793
66794
66795// OutcomeOfPRINValueAssessmentOrReviewUKType1Code ...
66796#[cfg_attr(feature = "derive_debug", derive(Debug))]
66797#[cfg_attr(feature = "derive_default", derive(Default))]
66798#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66799#[cfg_attr(feature = "derive_clone", derive(Clone))]
66800#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66801pub enum OutcomeOfPRINValueAssessmentOrReviewUKType1Code {
66802	#[cfg_attr(feature = "derive_default", default)]
66803	#[cfg_attr( feature = "derive_serde", serde(rename = "PRI2") )]
66804	CodePRI2,
66805	#[cfg_attr( feature = "derive_serde", serde(rename = "PRI1") )]
66806	CodePRI1,
66807}
66808
66809impl OutcomeOfPRINValueAssessmentOrReviewUKType1Code {
66810	pub fn validate(&self) -> Result<(), ValidationError> {
66811		Ok(())
66812	}
66813}
66814
66815
66816// OvernightIndexSwap4Choice ...
66817#[cfg_attr(feature = "derive_debug", derive(Debug))]
66818#[cfg_attr(feature = "derive_default", derive(Default))]
66819#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66820#[cfg_attr(feature = "derive_clone", derive(Clone))]
66821#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66822pub struct OvernightIndexSwap4Choice {
66823	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
66824	pub data_set_actn: Option<ReportPeriodActivity3Code>,
66825	#[cfg_attr( feature = "derive_serde", serde(rename = "Tx", skip_serializing_if = "Option::is_none") )]
66826	pub tx: Option<Vec<OvernightIndexSwapTransaction4>>,
66827}
66828
66829impl OvernightIndexSwap4Choice {
66830	pub fn validate(&self) -> Result<(), ValidationError> {
66831		if let Some(ref val) = self.data_set_actn { val.validate()? }
66832		if let Some(ref vec) = self.tx { for item in vec { item.validate()? } }
66833		Ok(())
66834	}
66835}
66836
66837
66838// OvernightIndexSwapTransaction4 ...
66839#[cfg_attr(feature = "derive_debug", derive(Debug))]
66840#[cfg_attr(feature = "derive_default", derive(Default))]
66841#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66842#[cfg_attr(feature = "derive_clone", derive(Clone))]
66843#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66844pub struct OvernightIndexSwapTransaction4 {
66845	#[cfg_attr( feature = "derive_serde", serde(rename = "RptdTxSts") )]
66846	pub rptd_tx_sts: TransactionOperationType1Code,
66847	#[cfg_attr( feature = "derive_serde", serde(rename = "NvtnSts", skip_serializing_if = "Option::is_none") )]
66848	pub nvtn_sts: Option<NovationStatus1Code>,
66849	#[cfg_attr( feature = "derive_serde", serde(rename = "BrnchId", skip_serializing_if = "Option::is_none") )]
66850	pub brnch_id: Option<String>,
66851	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTxIdr", skip_serializing_if = "Option::is_none") )]
66852	pub unq_tx_idr: Option<String>,
66853	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryTxId") )]
66854	pub prtry_tx_id: String,
66855	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdPrtryTxId", skip_serializing_if = "Option::is_none") )]
66856	pub rltd_prtry_tx_id: Option<String>,
66857	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyPrtryTxId", skip_serializing_if = "Option::is_none") )]
66858	pub ctr_pty_prtry_tx_id: Option<String>,
66859	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId") )]
66860	pub ctr_pty_id: CounterpartyIdentification3Choice,
66861	#[cfg_attr( feature = "derive_serde", serde(rename = "TradDt") )]
66862	pub trad_dt: DateAndDateTimeChoice,
66863	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt") )]
66864	pub start_dt: String,
66865	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt") )]
66866	pub mtrty_dt: String,
66867	#[cfg_attr( feature = "derive_serde", serde(rename = "FxdIntrstRate") )]
66868	pub fxd_intrst_rate: f64,
66869	#[cfg_attr( feature = "derive_serde", serde(rename = "TxTp") )]
66870	pub tx_tp: OvernightIndexSwapType1Code,
66871	#[cfg_attr( feature = "derive_serde", serde(rename = "TxNmnlAmt") )]
66872	pub tx_nmnl_amt: ActiveCurrencyAndAmount,
66873	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
66874	pub splmtry_data: Option<Vec<SupplementaryData1>>,
66875}
66876
66877impl OvernightIndexSwapTransaction4 {
66878	pub fn validate(&self) -> Result<(), ValidationError> {
66879		self.rptd_tx_sts.validate()?;
66880		if let Some(ref val) = self.nvtn_sts { val.validate()? }
66881		if let Some(ref val) = self.brnch_id {
66882			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
66883			if !pattern.is_match(val) {
66884				return Err(ValidationError::new(1005, "brnch_id does not match the required pattern".to_string()));
66885			}
66886		}
66887		if let Some(ref val) = self.unq_tx_idr {
66888			if val.chars().count() < 1 {
66889				return Err(ValidationError::new(1001, "unq_tx_idr is shorter than the minimum length of 1".to_string()));
66890			}
66891			if val.chars().count() > 105 {
66892				return Err(ValidationError::new(1002, "unq_tx_idr exceeds the maximum length of 105".to_string()));
66893			}
66894		}
66895		if self.prtry_tx_id.chars().count() < 1 {
66896			return Err(ValidationError::new(1001, "prtry_tx_id is shorter than the minimum length of 1".to_string()));
66897		}
66898		if self.prtry_tx_id.chars().count() > 105 {
66899			return Err(ValidationError::new(1002, "prtry_tx_id exceeds the maximum length of 105".to_string()));
66900		}
66901		if let Some(ref val) = self.rltd_prtry_tx_id {
66902			if val.chars().count() < 1 {
66903				return Err(ValidationError::new(1001, "rltd_prtry_tx_id is shorter than the minimum length of 1".to_string()));
66904			}
66905			if val.chars().count() > 105 {
66906				return Err(ValidationError::new(1002, "rltd_prtry_tx_id exceeds the maximum length of 105".to_string()));
66907			}
66908		}
66909		if let Some(ref val) = self.ctr_pty_prtry_tx_id {
66910			if val.chars().count() < 1 {
66911				return Err(ValidationError::new(1001, "ctr_pty_prtry_tx_id is shorter than the minimum length of 1".to_string()));
66912			}
66913			if val.chars().count() > 105 {
66914				return Err(ValidationError::new(1002, "ctr_pty_prtry_tx_id exceeds the maximum length of 105".to_string()));
66915			}
66916		}
66917		self.ctr_pty_id.validate()?;
66918		self.trad_dt.validate()?;
66919		self.tx_tp.validate()?;
66920		self.tx_nmnl_amt.validate()?;
66921		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
66922		Ok(())
66923	}
66924}
66925
66926
66927// OvernightIndexSwapType1Code ...
66928#[cfg_attr(feature = "derive_debug", derive(Debug))]
66929#[cfg_attr(feature = "derive_default", derive(Default))]
66930#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66931#[cfg_attr(feature = "derive_clone", derive(Clone))]
66932#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66933pub enum OvernightIndexSwapType1Code {
66934	#[cfg_attr(feature = "derive_default", default)]
66935	#[cfg_attr( feature = "derive_serde", serde(rename = "PAID") )]
66936	CodePAID,
66937	#[cfg_attr( feature = "derive_serde", serde(rename = "RECE") )]
66938	CodeRECE,
66939}
66940
66941impl OvernightIndexSwapType1Code {
66942	pub fn validate(&self) -> Result<(), ValidationError> {
66943		Ok(())
66944	}
66945}
66946
66947
66948// OwnerIdentification3Choice ...
66949#[cfg_attr(feature = "derive_debug", derive(Debug))]
66950#[cfg_attr(feature = "derive_default", derive(Default))]
66951#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66952#[cfg_attr(feature = "derive_clone", derive(Clone))]
66953#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66954pub struct OwnerIdentification3Choice {
66955	#[cfg_attr( feature = "derive_serde", serde(rename = "IndvOwnrId", skip_serializing_if = "Option::is_none") )]
66956	pub indv_ownr_id: Option<IndividualPersonIdentification2Choice>,
66957	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgOwnrId", skip_serializing_if = "Option::is_none") )]
66958	pub org_ownr_id: Option<PartyIdentification139>,
66959}
66960
66961impl OwnerIdentification3Choice {
66962	pub fn validate(&self) -> Result<(), ValidationError> {
66963		if let Some(ref val) = self.indv_ownr_id { val.validate()? }
66964		if let Some(ref val) = self.org_ownr_id { val.validate()? }
66965		Ok(())
66966	}
66967}
66968
66969
66970// OwnershipBeneficiaryRate1 ...
66971#[cfg_attr(feature = "derive_debug", derive(Debug))]
66972#[cfg_attr(feature = "derive_default", derive(Default))]
66973#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
66974#[cfg_attr(feature = "derive_clone", derive(Clone))]
66975#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
66976pub struct OwnershipBeneficiaryRate1 {
66977	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
66978	pub rate: Option<f64>,
66979	#[cfg_attr( feature = "derive_serde", serde(rename = "Frctn", skip_serializing_if = "Option::is_none") )]
66980	pub frctn: Option<String>,
66981}
66982
66983impl OwnershipBeneficiaryRate1 {
66984	pub fn validate(&self) -> Result<(), ValidationError> {
66985		if let Some(ref val) = self.frctn {
66986			if val.chars().count() < 1 {
66987				return Err(ValidationError::new(1001, "frctn is shorter than the minimum length of 1".to_string()));
66988			}
66989			if val.chars().count() > 35 {
66990				return Err(ValidationError::new(1002, "frctn exceeds the maximum length of 35".to_string()));
66991			}
66992		}
66993		Ok(())
66994	}
66995}
66996
66997
66998// OwnershipType2Choice ...
66999#[cfg_attr(feature = "derive_debug", derive(Debug))]
67000#[cfg_attr(feature = "derive_default", derive(Default))]
67001#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67002#[cfg_attr(feature = "derive_clone", derive(Clone))]
67003#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67004pub struct OwnershipType2Choice {
67005	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
67006	pub cd: Option<AccountOwnershipType4Code>,
67007	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
67008	pub prtry: Option<GenericIdentification47>,
67009}
67010
67011impl OwnershipType2Choice {
67012	pub fn validate(&self) -> Result<(), ValidationError> {
67013		if let Some(ref val) = self.cd { val.validate()? }
67014		if let Some(ref val) = self.prtry { val.validate()? }
67015		Ok(())
67016	}
67017}
67018
67019
67020// POIComponentType1Code ...
67021#[cfg_attr(feature = "derive_debug", derive(Debug))]
67022#[cfg_attr(feature = "derive_default", derive(Default))]
67023#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67024#[cfg_attr(feature = "derive_clone", derive(Clone))]
67025#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67026pub enum POIComponentType1Code {
67027	#[cfg_attr(feature = "derive_default", default)]
67028	#[cfg_attr( feature = "derive_serde", serde(rename = "SOFT") )]
67029	CodeSOFT,
67030	#[cfg_attr( feature = "derive_serde", serde(rename = "EMVK") )]
67031	CodeEMVK,
67032	#[cfg_attr( feature = "derive_serde", serde(rename = "EMVO") )]
67033	CodeEMVO,
67034	#[cfg_attr( feature = "derive_serde", serde(rename = "MRIT") )]
67035	CodeMRIT,
67036	#[cfg_attr( feature = "derive_serde", serde(rename = "CHIT") )]
67037	CodeCHIT,
67038	#[cfg_attr( feature = "derive_serde", serde(rename = "SECM") )]
67039	CodeSECM,
67040	#[cfg_attr( feature = "derive_serde", serde(rename = "PEDV") )]
67041	CodePEDV,
67042}
67043
67044impl POIComponentType1Code {
67045	pub fn validate(&self) -> Result<(), ValidationError> {
67046		Ok(())
67047	}
67048}
67049
67050
67051// PTRREvent2 ...
67052#[cfg_attr(feature = "derive_debug", derive(Debug))]
67053#[cfg_attr(feature = "derive_default", derive(Default))]
67054#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67055#[cfg_attr(feature = "derive_clone", derive(Clone))]
67056#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67057pub struct PTRREvent2 {
67058	#[cfg_attr( feature = "derive_serde", serde(rename = "Tchnq") )]
67059	pub tchnq: RiskReductionService1Code,
67060	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcPrvdr", skip_serializing_if = "Option::is_none") )]
67061	pub svc_prvdr: Option<OrganisationIdentification15Choice>,
67062}
67063
67064impl PTRREvent2 {
67065	pub fn validate(&self) -> Result<(), ValidationError> {
67066		self.tchnq.validate()?;
67067		if let Some(ref val) = self.svc_prvdr { val.validate()? }
67068		Ok(())
67069	}
67070}
67071
67072
67073// PTRREvent3 ...
67074#[cfg_attr(feature = "derive_debug", derive(Debug))]
67075#[cfg_attr(feature = "derive_default", derive(Default))]
67076#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67077#[cfg_attr(feature = "derive_clone", derive(Clone))]
67078#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67079pub struct PTRREvent3 {
67080	#[cfg_attr( feature = "derive_serde", serde(rename = "Tchnq", skip_serializing_if = "Option::is_none") )]
67081	pub tchnq: Option<RiskReductionService1Code>,
67082	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcPrvdr", skip_serializing_if = "Option::is_none") )]
67083	pub svc_prvdr: Option<OrganisationIdentification15Choice>,
67084}
67085
67086impl PTRREvent3 {
67087	pub fn validate(&self) -> Result<(), ValidationError> {
67088		if let Some(ref val) = self.tchnq { val.validate()? }
67089		if let Some(ref val) = self.svc_prvdr { val.validate()? }
67090		Ok(())
67091	}
67092}
67093
67094
67095// Package4 ...
67096#[cfg_attr(feature = "derive_debug", derive(Debug))]
67097#[cfg_attr(feature = "derive_default", derive(Default))]
67098#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67099#[cfg_attr(feature = "derive_clone", derive(Clone))]
67100#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67101pub struct Package4 {
67102	#[cfg_attr( feature = "derive_serde", serde(rename = "CmplxTradId", skip_serializing_if = "Option::is_none") )]
67103	pub cmplx_trad_id: Option<String>,
67104	#[cfg_attr( feature = "derive_serde", serde(rename = "FxSwpLkId", skip_serializing_if = "Option::is_none") )]
67105	pub fx_swp_lk_id: Option<String>,
67106	#[cfg_attr( feature = "derive_serde", serde(rename = "Pric", skip_serializing_if = "Option::is_none") )]
67107	pub pric: Option<SecuritiesTransactionPrice17Choice>,
67108	#[cfg_attr( feature = "derive_serde", serde(rename = "Sprd", skip_serializing_if = "Option::is_none") )]
67109	pub sprd: Option<SecuritiesTransactionPrice20Choice>,
67110}
67111
67112impl Package4 {
67113	pub fn validate(&self) -> Result<(), ValidationError> {
67114		if let Some(ref val) = self.cmplx_trad_id {
67115			if val.chars().count() < 1 {
67116				return Err(ValidationError::new(1001, "cmplx_trad_id is shorter than the minimum length of 1".to_string()));
67117			}
67118			if val.chars().count() > 100 {
67119				return Err(ValidationError::new(1002, "cmplx_trad_id exceeds the maximum length of 100".to_string()));
67120			}
67121		}
67122		if let Some(ref val) = self.fx_swp_lk_id {
67123			if val.chars().count() < 1 {
67124				return Err(ValidationError::new(1001, "fx_swp_lk_id is shorter than the minimum length of 1".to_string()));
67125			}
67126			if val.chars().count() > 100 {
67127				return Err(ValidationError::new(1002, "fx_swp_lk_id exceeds the maximum length of 100".to_string()));
67128			}
67129		}
67130		if let Some(ref val) = self.pric { val.validate()? }
67131		if let Some(ref val) = self.sprd { val.validate()? }
67132		Ok(())
67133	}
67134}
67135
67136
67137// Pagination ...
67138#[cfg_attr(feature = "derive_debug", derive(Debug))]
67139#[cfg_attr(feature = "derive_default", derive(Default))]
67140#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67141#[cfg_attr(feature = "derive_clone", derive(Clone))]
67142#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67143pub struct Pagination {
67144	#[cfg_attr( feature = "derive_serde", serde(rename = "PgNb") )]
67145	pub pg_nb: String,
67146	#[cfg_attr( feature = "derive_serde", serde(rename = "LastPgInd") )]
67147	pub last_pg_ind: bool,
67148}
67149
67150impl Pagination {
67151	pub fn validate(&self) -> Result<(), ValidationError> {
67152		let pattern = Regex::new("[0-9]{1,5}").unwrap();
67153		if !pattern.is_match(&self.pg_nb) {
67154			return Err(ValidationError::new(1005, "pg_nb does not match the required pattern".to_string()));
67155		}
67156		Ok(())
67157	}
67158}
67159
67160
67161// Pagination1 ...
67162#[cfg_attr(feature = "derive_debug", derive(Debug))]
67163#[cfg_attr(feature = "derive_default", derive(Default))]
67164#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67165#[cfg_attr(feature = "derive_clone", derive(Clone))]
67166#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67167pub struct Pagination1 {
67168	#[cfg_attr( feature = "derive_serde", serde(rename = "PgNb") )]
67169	pub pg_nb: String,
67170	#[cfg_attr( feature = "derive_serde", serde(rename = "LastPgInd") )]
67171	pub last_pg_ind: bool,
67172}
67173
67174impl Pagination1 {
67175	pub fn validate(&self) -> Result<(), ValidationError> {
67176		let pattern = Regex::new("[0-9]{1,5}").unwrap();
67177		if !pattern.is_match(&self.pg_nb) {
67178			return Err(ValidationError::new(1005, "pg_nb does not match the required pattern".to_string()));
67179		}
67180		Ok(())
67181	}
67182}
67183
67184
67185// PairedReconciled3Code ...
67186#[cfg_attr(feature = "derive_debug", derive(Debug))]
67187#[cfg_attr(feature = "derive_default", derive(Default))]
67188#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67189#[cfg_attr(feature = "derive_clone", derive(Clone))]
67190#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67191pub enum PairedReconciled3Code {
67192	#[cfg_attr(feature = "derive_default", default)]
67193	#[cfg_attr( feature = "derive_serde", serde(rename = "CLRC") )]
67194	CodeCLRC,
67195	#[cfg_attr( feature = "derive_serde", serde(rename = "LNRC") )]
67196	CodeLNRC,
67197	#[cfg_attr( feature = "derive_serde", serde(rename = "PARD") )]
67198	CodePARD,
67199	#[cfg_attr( feature = "derive_serde", serde(rename = "RECO") )]
67200	CodeRECO,
67201	#[cfg_attr( feature = "derive_serde", serde(rename = "UNPR") )]
67202	CodeUNPR,
67203}
67204
67205impl PairedReconciled3Code {
67206	pub fn validate(&self) -> Result<(), ValidationError> {
67207		Ok(())
67208	}
67209}
67210
67211
67212// PairingStatus1Code ...
67213#[cfg_attr(feature = "derive_debug", derive(Debug))]
67214#[cfg_attr(feature = "derive_default", derive(Default))]
67215#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67216#[cfg_attr(feature = "derive_clone", derive(Clone))]
67217#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67218pub enum PairingStatus1Code {
67219	#[cfg_attr(feature = "derive_default", default)]
67220	#[cfg_attr( feature = "derive_serde", serde(rename = "PARD") )]
67221	CodePARD,
67222	#[cfg_attr( feature = "derive_serde", serde(rename = "UNPR") )]
67223	CodeUNPR,
67224}
67225
67226impl PairingStatus1Code {
67227	pub fn validate(&self) -> Result<(), ValidationError> {
67228		Ok(())
67229	}
67230}
67231
67232
67233// PaperCommodityContainerBoard1 ...
67234#[cfg_attr(feature = "derive_debug", derive(Debug))]
67235#[cfg_attr(feature = "derive_default", derive(Default))]
67236#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67237#[cfg_attr(feature = "derive_clone", derive(Clone))]
67238#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67239pub struct PaperCommodityContainerBoard1 {
67240	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
67241	pub base_pdct: AssetClassProductType8Code,
67242	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
67243	pub sub_pdct: Option<AssetClassSubProductType35Code>,
67244}
67245
67246impl PaperCommodityContainerBoard1 {
67247	pub fn validate(&self) -> Result<(), ValidationError> {
67248		self.base_pdct.validate()?;
67249		if let Some(ref val) = self.sub_pdct { val.validate()? }
67250		Ok(())
67251	}
67252}
67253
67254
67255// PaperCommodityContainerBoard2 ...
67256#[cfg_attr(feature = "derive_debug", derive(Debug))]
67257#[cfg_attr(feature = "derive_default", derive(Default))]
67258#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67259#[cfg_attr(feature = "derive_clone", derive(Clone))]
67260#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67261pub struct PaperCommodityContainerBoard2 {
67262	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
67263	pub base_pdct: AssetClassProductType8Code,
67264	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
67265	pub sub_pdct: Option<AssetClassSubProductType35Code>,
67266}
67267
67268impl PaperCommodityContainerBoard2 {
67269	pub fn validate(&self) -> Result<(), ValidationError> {
67270		self.base_pdct.validate()?;
67271		if let Some(ref val) = self.sub_pdct { val.validate()? }
67272		Ok(())
67273	}
67274}
67275
67276
67277// PaperCommodityNewsprint1 ...
67278#[cfg_attr(feature = "derive_debug", derive(Debug))]
67279#[cfg_attr(feature = "derive_default", derive(Default))]
67280#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67281#[cfg_attr(feature = "derive_clone", derive(Clone))]
67282#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67283pub struct PaperCommodityNewsprint1 {
67284	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
67285	pub base_pdct: AssetClassProductType8Code,
67286	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
67287	pub sub_pdct: Option<AssetClassSubProductType36Code>,
67288}
67289
67290impl PaperCommodityNewsprint1 {
67291	pub fn validate(&self) -> Result<(), ValidationError> {
67292		self.base_pdct.validate()?;
67293		if let Some(ref val) = self.sub_pdct { val.validate()? }
67294		Ok(())
67295	}
67296}
67297
67298
67299// PaperCommodityNewsprint2 ...
67300#[cfg_attr(feature = "derive_debug", derive(Debug))]
67301#[cfg_attr(feature = "derive_default", derive(Default))]
67302#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67303#[cfg_attr(feature = "derive_clone", derive(Clone))]
67304#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67305pub struct PaperCommodityNewsprint2 {
67306	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
67307	pub base_pdct: AssetClassProductType8Code,
67308	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
67309	pub sub_pdct: Option<AssetClassSubProductType36Code>,
67310}
67311
67312impl PaperCommodityNewsprint2 {
67313	pub fn validate(&self) -> Result<(), ValidationError> {
67314		self.base_pdct.validate()?;
67315		if let Some(ref val) = self.sub_pdct { val.validate()? }
67316		Ok(())
67317	}
67318}
67319
67320
67321// PaperCommodityOther1 ...
67322#[cfg_attr(feature = "derive_debug", derive(Debug))]
67323#[cfg_attr(feature = "derive_default", derive(Default))]
67324#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67325#[cfg_attr(feature = "derive_clone", derive(Clone))]
67326#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67327pub struct PaperCommodityOther1 {
67328	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
67329	pub base_pdct: AssetClassProductType8Code,
67330	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
67331	pub sub_pdct: Option<AssetClassSubProductType49Code>,
67332}
67333
67334impl PaperCommodityOther1 {
67335	pub fn validate(&self) -> Result<(), ValidationError> {
67336		self.base_pdct.validate()?;
67337		if let Some(ref val) = self.sub_pdct { val.validate()? }
67338		Ok(())
67339	}
67340}
67341
67342
67343// PaperCommodityPulp1 ...
67344#[cfg_attr(feature = "derive_debug", derive(Debug))]
67345#[cfg_attr(feature = "derive_default", derive(Default))]
67346#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67347#[cfg_attr(feature = "derive_clone", derive(Clone))]
67348#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67349pub struct PaperCommodityPulp1 {
67350	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
67351	pub base_pdct: AssetClassProductType8Code,
67352	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
67353	pub sub_pdct: Option<AssetClassSubProductType37Code>,
67354}
67355
67356impl PaperCommodityPulp1 {
67357	pub fn validate(&self) -> Result<(), ValidationError> {
67358		self.base_pdct.validate()?;
67359		if let Some(ref val) = self.sub_pdct { val.validate()? }
67360		Ok(())
67361	}
67362}
67363
67364
67365// PaperCommodityPulp2 ...
67366#[cfg_attr(feature = "derive_debug", derive(Debug))]
67367#[cfg_attr(feature = "derive_default", derive(Default))]
67368#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67369#[cfg_attr(feature = "derive_clone", derive(Clone))]
67370#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67371pub struct PaperCommodityPulp2 {
67372	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
67373	pub base_pdct: AssetClassProductType8Code,
67374	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
67375	pub sub_pdct: Option<AssetClassSubProductType37Code>,
67376}
67377
67378impl PaperCommodityPulp2 {
67379	pub fn validate(&self) -> Result<(), ValidationError> {
67380		self.base_pdct.validate()?;
67381		if let Some(ref val) = self.sub_pdct { val.validate()? }
67382		Ok(())
67383	}
67384}
67385
67386
67387// PaperCommodityRecoveredPaper1 ...
67388#[cfg_attr(feature = "derive_debug", derive(Debug))]
67389#[cfg_attr(feature = "derive_default", derive(Default))]
67390#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67391#[cfg_attr(feature = "derive_clone", derive(Clone))]
67392#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67393pub struct PaperCommodityRecoveredPaper1 {
67394	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
67395	pub base_pdct: AssetClassProductType8Code,
67396	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
67397	pub sub_pdct: Option<AssetClassSubProductType38Code>,
67398}
67399
67400impl PaperCommodityRecoveredPaper1 {
67401	pub fn validate(&self) -> Result<(), ValidationError> {
67402		self.base_pdct.validate()?;
67403		if let Some(ref val) = self.sub_pdct { val.validate()? }
67404		Ok(())
67405	}
67406}
67407
67408
67409// PaperCommodityRecoveredPaper2 ...
67410#[cfg_attr(feature = "derive_debug", derive(Debug))]
67411#[cfg_attr(feature = "derive_default", derive(Default))]
67412#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67413#[cfg_attr(feature = "derive_clone", derive(Clone))]
67414#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67415pub struct PaperCommodityRecoveredPaper2 {
67416	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
67417	pub base_pdct: AssetClassProductType8Code,
67418	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
67419	pub sub_pdct: Option<AssetClassSubProductType49Code>,
67420}
67421
67422impl PaperCommodityRecoveredPaper2 {
67423	pub fn validate(&self) -> Result<(), ValidationError> {
67424		self.base_pdct.validate()?;
67425		if let Some(ref val) = self.sub_pdct { val.validate()? }
67426		Ok(())
67427	}
67428}
67429
67430
67431// PaperCommodityRecoveredPaper3 ...
67432#[cfg_attr(feature = "derive_debug", derive(Debug))]
67433#[cfg_attr(feature = "derive_default", derive(Default))]
67434#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67435#[cfg_attr(feature = "derive_clone", derive(Clone))]
67436#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67437pub struct PaperCommodityRecoveredPaper3 {
67438	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
67439	pub base_pdct: AssetClassProductType8Code,
67440	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
67441	pub sub_pdct: Option<AssetClassSubProductType50Code>,
67442}
67443
67444impl PaperCommodityRecoveredPaper3 {
67445	pub fn validate(&self) -> Result<(), ValidationError> {
67446		self.base_pdct.validate()?;
67447		if let Some(ref val) = self.sub_pdct { val.validate()? }
67448		Ok(())
67449	}
67450}
67451
67452
67453// ParentCashAccount5 ...
67454#[cfg_attr(feature = "derive_debug", derive(Debug))]
67455#[cfg_attr(feature = "derive_default", derive(Default))]
67456#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67457#[cfg_attr(feature = "derive_clone", derive(Clone))]
67458#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67459pub struct ParentCashAccount5 {
67460	#[cfg_attr( feature = "derive_serde", serde(rename = "Lvl", skip_serializing_if = "Option::is_none") )]
67461	pub lvl: Option<AccountLevel1Code>,
67462	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
67463	pub id: CashAccount40,
67464	#[cfg_attr( feature = "derive_serde", serde(rename = "Svcr", skip_serializing_if = "Option::is_none") )]
67465	pub svcr: Option<BranchAndFinancialInstitutionIdentification8>,
67466}
67467
67468impl ParentCashAccount5 {
67469	pub fn validate(&self) -> Result<(), ValidationError> {
67470		if let Some(ref val) = self.lvl { val.validate()? }
67471		self.id.validate()?;
67472		if let Some(ref val) = self.svcr { val.validate()? }
67473		Ok(())
67474	}
67475}
67476
67477
67478// PartialSettlement2Code ...
67479#[cfg_attr(feature = "derive_debug", derive(Debug))]
67480#[cfg_attr(feature = "derive_default", derive(Default))]
67481#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67482#[cfg_attr(feature = "derive_clone", derive(Clone))]
67483#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67484pub enum PartialSettlement2Code {
67485	#[cfg_attr(feature = "derive_default", default)]
67486	#[cfg_attr( feature = "derive_serde", serde(rename = "PAIN") )]
67487	CodePAIN,
67488	#[cfg_attr( feature = "derive_serde", serde(rename = "PARC") )]
67489	CodePARC,
67490}
67491
67492impl PartialSettlement2Code {
67493	pub fn validate(&self) -> Result<(), ValidationError> {
67494		Ok(())
67495	}
67496}
67497
67498
67499// Party11Choice ...
67500#[cfg_attr(feature = "derive_debug", derive(Debug))]
67501#[cfg_attr(feature = "derive_default", derive(Default))]
67502#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67503#[cfg_attr(feature = "derive_clone", derive(Clone))]
67504#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67505pub struct Party11Choice {
67506	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgId", skip_serializing_if = "Option::is_none") )]
67507	pub org_id: Option<OrganisationIdentification8>,
67508	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvtId", skip_serializing_if = "Option::is_none") )]
67509	pub prvt_id: Option<PersonIdentification5>,
67510}
67511
67512impl Party11Choice {
67513	pub fn validate(&self) -> Result<(), ValidationError> {
67514		if let Some(ref val) = self.org_id { val.validate()? }
67515		if let Some(ref val) = self.prvt_id { val.validate()? }
67516		Ok(())
67517	}
67518}
67519
67520
67521// Party38Choice ...
67522#[cfg_attr(feature = "derive_debug", derive(Debug))]
67523#[cfg_attr(feature = "derive_default", derive(Default))]
67524#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67525#[cfg_attr(feature = "derive_clone", derive(Clone))]
67526#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67527pub struct Party38Choice {
67528	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgId", skip_serializing_if = "Option::is_none") )]
67529	pub org_id: Option<OrganisationIdentification29>,
67530	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvtId", skip_serializing_if = "Option::is_none") )]
67531	pub prvt_id: Option<PersonIdentification13>,
67532}
67533
67534impl Party38Choice {
67535	pub fn validate(&self) -> Result<(), ValidationError> {
67536		if let Some(ref val) = self.org_id { val.validate()? }
67537		if let Some(ref val) = self.prvt_id { val.validate()? }
67538		Ok(())
67539	}
67540}
67541
67542
67543// Party40Choice ...
67544#[cfg_attr(feature = "derive_debug", derive(Debug))]
67545#[cfg_attr(feature = "derive_default", derive(Default))]
67546#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67547#[cfg_attr(feature = "derive_clone", derive(Clone))]
67548#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67549pub struct Party40Choice {
67550	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty", skip_serializing_if = "Option::is_none") )]
67551	pub pty: Option<PartyIdentification135>,
67552	#[cfg_attr( feature = "derive_serde", serde(rename = "Agt", skip_serializing_if = "Option::is_none") )]
67553	pub agt: Option<BranchAndFinancialInstitutionIdentification6>,
67554}
67555
67556impl Party40Choice {
67557	pub fn validate(&self) -> Result<(), ValidationError> {
67558		if let Some(ref val) = self.pty { val.validate()? }
67559		if let Some(ref val) = self.agt { val.validate()? }
67560		Ok(())
67561	}
67562}
67563
67564
67565// Party44Choice ...
67566#[cfg_attr(feature = "derive_debug", derive(Debug))]
67567#[cfg_attr(feature = "derive_default", derive(Default))]
67568#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67569#[cfg_attr(feature = "derive_clone", derive(Clone))]
67570#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67571pub struct Party44Choice {
67572	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgId", skip_serializing_if = "Option::is_none") )]
67573	pub org_id: Option<PartyIdentification135>,
67574	#[cfg_attr( feature = "derive_serde", serde(rename = "FIId", skip_serializing_if = "Option::is_none") )]
67575	pub fi_id: Option<BranchAndFinancialInstitutionIdentification6>,
67576}
67577
67578impl Party44Choice {
67579	pub fn validate(&self) -> Result<(), ValidationError> {
67580		if let Some(ref val) = self.org_id { val.validate()? }
67581		if let Some(ref val) = self.fi_id { val.validate()? }
67582		Ok(())
67583	}
67584}
67585
67586
67587// Party47Choice ...
67588#[cfg_attr(feature = "derive_debug", derive(Debug))]
67589#[cfg_attr(feature = "derive_default", derive(Default))]
67590#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67591#[cfg_attr(feature = "derive_clone", derive(Clone))]
67592#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67593pub struct Party47Choice {
67594	#[cfg_attr( feature = "derive_serde", serde(rename = "Org", skip_serializing_if = "Option::is_none") )]
67595	pub org: Option<Organisation39>,
67596	#[cfg_attr( feature = "derive_serde", serde(rename = "IndvPrsn", skip_serializing_if = "Option::is_none") )]
67597	pub indv_prsn: Option<IndividualPerson37>,
67598}
67599
67600impl Party47Choice {
67601	pub fn validate(&self) -> Result<(), ValidationError> {
67602		if let Some(ref val) = self.org { val.validate()? }
67603		if let Some(ref val) = self.indv_prsn { val.validate()? }
67604		Ok(())
67605	}
67606}
67607
67608
67609// Party48Choice ...
67610#[cfg_attr(feature = "derive_debug", derive(Debug))]
67611#[cfg_attr(feature = "derive_default", derive(Default))]
67612#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67613#[cfg_attr(feature = "derive_clone", derive(Clone))]
67614#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67615pub struct Party48Choice {
67616	#[cfg_attr( feature = "derive_serde", serde(rename = "Org", skip_serializing_if = "Option::is_none") )]
67617	pub org: Option<Organisation40>,
67618	#[cfg_attr( feature = "derive_serde", serde(rename = "IndvPrsn", skip_serializing_if = "Option::is_none") )]
67619	pub indv_prsn: Option<IndividualPerson38>,
67620}
67621
67622impl Party48Choice {
67623	pub fn validate(&self) -> Result<(), ValidationError> {
67624		if let Some(ref val) = self.org { val.validate()? }
67625		if let Some(ref val) = self.indv_prsn { val.validate()? }
67626		Ok(())
67627	}
67628}
67629
67630
67631// Party50Choice ...
67632#[cfg_attr(feature = "derive_debug", derive(Debug))]
67633#[cfg_attr(feature = "derive_default", derive(Default))]
67634#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67635#[cfg_attr(feature = "derive_clone", derive(Clone))]
67636#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67637pub struct Party50Choice {
67638	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty", skip_serializing_if = "Option::is_none") )]
67639	pub pty: Option<PartyIdentification272>,
67640	#[cfg_attr( feature = "derive_serde", serde(rename = "Agt", skip_serializing_if = "Option::is_none") )]
67641	pub agt: Option<BranchAndFinancialInstitutionIdentification8>,
67642}
67643
67644impl Party50Choice {
67645	pub fn validate(&self) -> Result<(), ValidationError> {
67646		if let Some(ref val) = self.pty { val.validate()? }
67647		if let Some(ref val) = self.agt { val.validate()? }
67648		Ok(())
67649	}
67650}
67651
67652
67653// Party51Choice ...
67654#[cfg_attr(feature = "derive_debug", derive(Debug))]
67655#[cfg_attr(feature = "derive_default", derive(Default))]
67656#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67657#[cfg_attr(feature = "derive_clone", derive(Clone))]
67658#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67659pub struct Party51Choice {
67660	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgId", skip_serializing_if = "Option::is_none") )]
67661	pub org_id: Option<PartyIdentification272>,
67662	#[cfg_attr( feature = "derive_serde", serde(rename = "FIId", skip_serializing_if = "Option::is_none") )]
67663	pub fi_id: Option<BranchAndFinancialInstitutionIdentification8>,
67664}
67665
67666impl Party51Choice {
67667	pub fn validate(&self) -> Result<(), ValidationError> {
67668		if let Some(ref val) = self.org_id { val.validate()? }
67669		if let Some(ref val) = self.fi_id { val.validate()? }
67670		Ok(())
67671	}
67672}
67673
67674
67675// Party52Choice ...
67676#[cfg_attr(feature = "derive_debug", derive(Debug))]
67677#[cfg_attr(feature = "derive_default", derive(Default))]
67678#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67679#[cfg_attr(feature = "derive_clone", derive(Clone))]
67680#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67681pub struct Party52Choice {
67682	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgId", skip_serializing_if = "Option::is_none") )]
67683	pub org_id: Option<OrganisationIdentification39>,
67684	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvtId", skip_serializing_if = "Option::is_none") )]
67685	pub prvt_id: Option<PersonIdentification18>,
67686}
67687
67688impl Party52Choice {
67689	pub fn validate(&self) -> Result<(), ValidationError> {
67690		if let Some(ref val) = self.org_id { val.validate()? }
67691		if let Some(ref val) = self.prvt_id { val.validate()? }
67692		Ok(())
67693	}
67694}
67695
67696
67697// Party53Choice ...
67698#[cfg_attr(feature = "derive_debug", derive(Debug))]
67699#[cfg_attr(feature = "derive_default", derive(Default))]
67700#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67701#[cfg_attr(feature = "derive_clone", derive(Clone))]
67702#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67703pub struct Party53Choice {
67704	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgId", skip_serializing_if = "Option::is_none") )]
67705	pub org_id: Option<OrganisationIdentification40>,
67706	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvtId", skip_serializing_if = "Option::is_none") )]
67707	pub prvt_id: Option<PersonIdentification20>,
67708}
67709
67710impl Party53Choice {
67711	pub fn validate(&self) -> Result<(), ValidationError> {
67712		if let Some(ref val) = self.org_id { val.validate()? }
67713		if let Some(ref val) = self.prvt_id { val.validate()? }
67714		Ok(())
67715	}
67716}
67717
67718
67719// Party56Choice ...
67720#[cfg_attr(feature = "derive_debug", derive(Debug))]
67721#[cfg_attr(feature = "derive_default", derive(Default))]
67722#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67723#[cfg_attr(feature = "derive_clone", derive(Clone))]
67724#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67725pub struct Party56Choice {
67726	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgId", skip_serializing_if = "Option::is_none") )]
67727	pub org_id: Option<OrganisationIdentification39>,
67728	#[cfg_attr( feature = "derive_serde", serde(rename = "FIId", skip_serializing_if = "Option::is_none") )]
67729	pub fi_id: Option<FinancialInstitutionIdentification19>,
67730}
67731
67732impl Party56Choice {
67733	pub fn validate(&self) -> Result<(), ValidationError> {
67734		if let Some(ref val) = self.org_id { val.validate()? }
67735		if let Some(ref val) = self.fi_id { val.validate()? }
67736		Ok(())
67737	}
67738}
67739
67740
67741// PartyAndAuthorisation6 ...
67742#[cfg_attr(feature = "derive_debug", derive(Debug))]
67743#[cfg_attr(feature = "derive_default", derive(Default))]
67744#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67745#[cfg_attr(feature = "derive_clone", derive(Clone))]
67746#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67747pub struct PartyAndAuthorisation6 {
67748	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
67749	pub mod_cd: Option<Modification1Code>,
67750	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyOrGrp") )]
67751	pub pty_or_grp: PartyOrGroup3Choice,
67752	#[cfg_attr( feature = "derive_serde", serde(rename = "SgntrOrdr", skip_serializing_if = "Option::is_none") )]
67753	pub sgntr_ordr: Option<String>,
67754	#[cfg_attr( feature = "derive_serde", serde(rename = "Authstn") )]
67755	pub authstn: Authorisation2,
67756}
67757
67758impl PartyAndAuthorisation6 {
67759	pub fn validate(&self) -> Result<(), ValidationError> {
67760		if let Some(ref val) = self.mod_cd { val.validate()? }
67761		self.pty_or_grp.validate()?;
67762		if let Some(ref val) = self.sgntr_ordr {
67763			let pattern = Regex::new("[\\+]{0,1}[0-9]{1,15}").unwrap();
67764			if !pattern.is_match(val) {
67765				return Err(ValidationError::new(1005, "sgntr_ordr does not match the required pattern".to_string()));
67766			}
67767		}
67768		self.authstn.validate()?;
67769		Ok(())
67770	}
67771}
67772
67773
67774// PartyAndAuthorisation7 ...
67775#[cfg_attr(feature = "derive_debug", derive(Debug))]
67776#[cfg_attr(feature = "derive_default", derive(Default))]
67777#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67778#[cfg_attr(feature = "derive_clone", derive(Clone))]
67779#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67780pub struct PartyAndAuthorisation7 {
67781	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyOrGrp") )]
67782	pub pty_or_grp: PartyOrGroup3Choice,
67783	#[cfg_attr( feature = "derive_serde", serde(rename = "SgntrOrdr", skip_serializing_if = "Option::is_none") )]
67784	pub sgntr_ordr: Option<String>,
67785	#[cfg_attr( feature = "derive_serde", serde(rename = "Authstn") )]
67786	pub authstn: Authorisation2,
67787}
67788
67789impl PartyAndAuthorisation7 {
67790	pub fn validate(&self) -> Result<(), ValidationError> {
67791		self.pty_or_grp.validate()?;
67792		if let Some(ref val) = self.sgntr_ordr {
67793			let pattern = Regex::new("[\\+]{0,1}[0-9]{1,15}").unwrap();
67794			if !pattern.is_match(val) {
67795				return Err(ValidationError::new(1005, "sgntr_ordr does not match the required pattern".to_string()));
67796			}
67797		}
67798		self.authstn.validate()?;
67799		Ok(())
67800	}
67801}
67802
67803
67804// PartyAndCertificate6 ...
67805#[cfg_attr(feature = "derive_debug", derive(Debug))]
67806#[cfg_attr(feature = "derive_default", derive(Default))]
67807#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67808#[cfg_attr(feature = "derive_clone", derive(Clone))]
67809#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67810pub struct PartyAndCertificate6 {
67811	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty") )]
67812	pub pty: PartyIdentification272,
67813	#[cfg_attr( feature = "derive_serde", serde(rename = "Cert", skip_serializing_if = "Option::is_none") )]
67814	pub cert: Option<String>,
67815}
67816
67817impl PartyAndCertificate6 {
67818	pub fn validate(&self) -> Result<(), ValidationError> {
67819		self.pty.validate()?;
67820		if let Some(ref val) = self.cert {
67821			if val.chars().count() < 1 {
67822				return Err(ValidationError::new(1001, "cert is shorter than the minimum length of 1".to_string()));
67823			}
67824			if val.chars().count() > 10240 {
67825				return Err(ValidationError::new(1002, "cert exceeds the maximum length of 10240".to_string()));
67826			}
67827		}
67828		Ok(())
67829	}
67830}
67831
67832
67833// PartyAndCertificate7 ...
67834#[cfg_attr(feature = "derive_debug", derive(Debug))]
67835#[cfg_attr(feature = "derive_default", derive(Default))]
67836#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67837#[cfg_attr(feature = "derive_clone", derive(Clone))]
67838#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67839pub struct PartyAndCertificate7 {
67840	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
67841	pub mod_cd: Option<Modification1Code>,
67842	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty") )]
67843	pub pty: PartyIdentification272,
67844	#[cfg_attr( feature = "derive_serde", serde(rename = "Cert", skip_serializing_if = "Option::is_none") )]
67845	pub cert: Option<String>,
67846}
67847
67848impl PartyAndCertificate7 {
67849	pub fn validate(&self) -> Result<(), ValidationError> {
67850		if let Some(ref val) = self.mod_cd { val.validate()? }
67851		self.pty.validate()?;
67852		if let Some(ref val) = self.cert {
67853			if val.chars().count() < 1 {
67854				return Err(ValidationError::new(1001, "cert is shorter than the minimum length of 1".to_string()));
67855			}
67856			if val.chars().count() > 10240 {
67857				return Err(ValidationError::new(1002, "cert exceeds the maximum length of 10240".to_string()));
67858			}
67859		}
67860		Ok(())
67861	}
67862}
67863
67864
67865// PartyAndSignature3 ...
67866#[cfg_attr(feature = "derive_debug", derive(Debug))]
67867#[cfg_attr(feature = "derive_default", derive(Default))]
67868#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67869#[cfg_attr(feature = "derive_clone", derive(Clone))]
67870#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67871pub struct PartyAndSignature3 {
67872	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty") )]
67873	pub pty: PartyIdentification135,
67874	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgntr") )]
67875	pub sgntr: SkipPayload,
67876}
67877
67878impl PartyAndSignature3 {
67879	pub fn validate(&self) -> Result<(), ValidationError> {
67880		self.pty.validate()?;
67881		self.sgntr.validate()?;
67882		Ok(())
67883	}
67884}
67885
67886
67887// PartyAndSignature4 ...
67888#[cfg_attr(feature = "derive_debug", derive(Debug))]
67889#[cfg_attr(feature = "derive_default", derive(Default))]
67890#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67891#[cfg_attr(feature = "derive_clone", derive(Clone))]
67892#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67893pub struct PartyAndSignature4 {
67894	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty") )]
67895	pub pty: PartyIdentification272,
67896	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgntr") )]
67897	pub sgntr: SkipPayload,
67898}
67899
67900impl PartyAndSignature4 {
67901	pub fn validate(&self) -> Result<(), ValidationError> {
67902		self.pty.validate()?;
67903		self.sgntr.validate()?;
67904		Ok(())
67905	}
67906}
67907
67908
67909// PartyAuditTrail2 ...
67910#[cfg_attr(feature = "derive_debug", derive(Debug))]
67911#[cfg_attr(feature = "derive_default", derive(Default))]
67912#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67913#[cfg_attr(feature = "derive_clone", derive(Clone))]
67914#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67915pub struct PartyAuditTrail2 {
67916	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcrd") )]
67917	pub rcrd: Vec<UpdateLogPartyRecord2Choice>,
67918	#[cfg_attr( feature = "derive_serde", serde(rename = "OprTmStmp") )]
67919	pub opr_tm_stmp: String,
67920	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgUsr") )]
67921	pub instg_usr: String,
67922	#[cfg_attr( feature = "derive_serde", serde(rename = "ApprvgUsr", skip_serializing_if = "Option::is_none") )]
67923	pub apprvg_usr: Option<String>,
67924}
67925
67926impl PartyAuditTrail2 {
67927	pub fn validate(&self) -> Result<(), ValidationError> {
67928		for item in &self.rcrd { item.validate()? }
67929		if self.instg_usr.chars().count() < 1 {
67930			return Err(ValidationError::new(1001, "instg_usr is shorter than the minimum length of 1".to_string()));
67931		}
67932		if self.instg_usr.chars().count() > 256 {
67933			return Err(ValidationError::new(1002, "instg_usr exceeds the maximum length of 256".to_string()));
67934		}
67935		if let Some(ref val) = self.apprvg_usr {
67936			if val.chars().count() < 1 {
67937				return Err(ValidationError::new(1001, "apprvg_usr is shorter than the minimum length of 1".to_string()));
67938			}
67939			if val.chars().count() > 256 {
67940				return Err(ValidationError::new(1002, "apprvg_usr exceeds the maximum length of 256".to_string()));
67941			}
67942		}
67943		Ok(())
67944	}
67945}
67946
67947
67948// PartyAuditTrailOrError3Choice ...
67949#[cfg_attr(feature = "derive_debug", derive(Debug))]
67950#[cfg_attr(feature = "derive_default", derive(Default))]
67951#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67952#[cfg_attr(feature = "derive_clone", derive(Clone))]
67953#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67954pub struct PartyAuditTrailOrError3Choice {
67955	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyAudtTrlRpt", skip_serializing_if = "Option::is_none") )]
67956	pub pty_audt_trl_rpt: Option<Vec<PartyAuditTrailReport4>>,
67957	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
67958	pub oprl_err: Option<Vec<ErrorHandling5>>,
67959}
67960
67961impl PartyAuditTrailOrError3Choice {
67962	pub fn validate(&self) -> Result<(), ValidationError> {
67963		if let Some(ref vec) = self.pty_audt_trl_rpt { for item in vec { item.validate()? } }
67964		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
67965		Ok(())
67966	}
67967}
67968
67969
67970// PartyAuditTrailOrError4Choice ...
67971#[cfg_attr(feature = "derive_debug", derive(Debug))]
67972#[cfg_attr(feature = "derive_default", derive(Default))]
67973#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67974#[cfg_attr(feature = "derive_clone", derive(Clone))]
67975#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67976pub struct PartyAuditTrailOrError4Choice {
67977	#[cfg_attr( feature = "derive_serde", serde(rename = "AudtTrl", skip_serializing_if = "Option::is_none") )]
67978	pub audt_trl: Option<Vec<PartyAuditTrail2>>,
67979	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
67980	pub biz_err: Option<Vec<ErrorHandling5>>,
67981}
67982
67983impl PartyAuditTrailOrError4Choice {
67984	pub fn validate(&self) -> Result<(), ValidationError> {
67985		if let Some(ref vec) = self.audt_trl { for item in vec { item.validate()? } }
67986		if let Some(ref vec) = self.biz_err { for item in vec { item.validate()? } }
67987		Ok(())
67988	}
67989}
67990
67991
67992// PartyAuditTrailReport4 ...
67993#[cfg_attr(feature = "derive_debug", derive(Debug))]
67994#[cfg_attr(feature = "derive_default", derive(Default))]
67995#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
67996#[cfg_attr(feature = "derive_clone", derive(Clone))]
67997#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
67998pub struct PartyAuditTrailReport4 {
67999	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyAudtTrlOrErr") )]
68000	pub pty_audt_trl_or_err: PartyAuditTrailOrError4Choice,
68001	#[cfg_attr( feature = "derive_serde", serde(rename = "DtPrd", skip_serializing_if = "Option::is_none") )]
68002	pub dt_prd: Option<DatePeriod3Choice>,
68003	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId") )]
68004	pub pty_id: SystemPartyIdentification8,
68005}
68006
68007impl PartyAuditTrailReport4 {
68008	pub fn validate(&self) -> Result<(), ValidationError> {
68009		self.pty_audt_trl_or_err.validate()?;
68010		if let Some(ref val) = self.dt_prd { val.validate()? }
68011		self.pty_id.validate()?;
68012		Ok(())
68013	}
68014}
68015
68016
68017// PartyAuditTrailSearchCriteria2 ...
68018#[cfg_attr(feature = "derive_debug", derive(Debug))]
68019#[cfg_attr(feature = "derive_default", derive(Default))]
68020#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68021#[cfg_attr(feature = "derive_clone", derive(Clone))]
68022#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68023pub struct PartyAuditTrailSearchCriteria2 {
68024	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId", skip_serializing_if = "Option::is_none") )]
68025	pub pty_id: Option<SystemPartyIdentification8>,
68026	#[cfg_attr( feature = "derive_serde", serde(rename = "DtPrd", skip_serializing_if = "Option::is_none") )]
68027	pub dt_prd: Option<DatePeriodSearch1Choice>,
68028}
68029
68030impl PartyAuditTrailSearchCriteria2 {
68031	pub fn validate(&self) -> Result<(), ValidationError> {
68032		if let Some(ref val) = self.pty_id { val.validate()? }
68033		if let Some(ref val) = self.dt_prd { val.validate()? }
68034		Ok(())
68035	}
68036}
68037
68038
68039// PartyCancellation1 ...
68040#[cfg_attr(feature = "derive_debug", derive(Debug))]
68041#[cfg_attr(feature = "derive_default", derive(Default))]
68042#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68043#[cfg_attr(feature = "derive_clone", derive(Clone))]
68044#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68045pub struct PartyCancellation1 {
68046	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
68047	pub tech_rcrd_id: Option<String>,
68048	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
68049	pub id: PartyIdentification136,
68050	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
68051	pub splmtry_data: Option<Vec<SupplementaryData1>>,
68052}
68053
68054impl PartyCancellation1 {
68055	pub fn validate(&self) -> Result<(), ValidationError> {
68056		if let Some(ref val) = self.tech_rcrd_id {
68057			if val.chars().count() < 1 {
68058				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
68059			}
68060			if val.chars().count() > 35 {
68061				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
68062			}
68063		}
68064		self.id.validate()?;
68065		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
68066		Ok(())
68067	}
68068}
68069
68070
68071// PartyDataReturnCriteria2 ...
68072#[cfg_attr(feature = "derive_debug", derive(Debug))]
68073#[cfg_attr(feature = "derive_default", derive(Default))]
68074#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68075#[cfg_attr(feature = "derive_clone", derive(Clone))]
68076#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68077pub struct PartyDataReturnCriteria2 {
68078	#[cfg_attr( feature = "derive_serde", serde(rename = "OpngDt", skip_serializing_if = "Option::is_none") )]
68079	pub opng_dt: Option<bool>,
68080	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
68081	pub clsg_dt: Option<bool>,
68082	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
68083	pub tp: Option<bool>,
68084	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId", skip_serializing_if = "Option::is_none") )]
68085	pub pty_id: Option<bool>,
68086	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnsblPtyId", skip_serializing_if = "Option::is_none") )]
68087	pub rspnsbl_pty_id: Option<bool>,
68088	#[cfg_attr( feature = "derive_serde", serde(rename = "RstrctnId", skip_serializing_if = "Option::is_none") )]
68089	pub rstrctn_id: Option<bool>,
68090	#[cfg_attr( feature = "derive_serde", serde(rename = "RstrctdOnDt", skip_serializing_if = "Option::is_none") )]
68091	pub rstrctd_on_dt: Option<bool>,
68092	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
68093	pub nm: Option<bool>,
68094	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtNm", skip_serializing_if = "Option::is_none") )]
68095	pub shrt_nm: Option<bool>,
68096	#[cfg_attr( feature = "derive_serde", serde(rename = "Adr", skip_serializing_if = "Option::is_none") )]
68097	pub adr: Option<bool>,
68098	#[cfg_attr( feature = "derive_serde", serde(rename = "TechAdr", skip_serializing_if = "Option::is_none") )]
68099	pub tech_adr: Option<bool>,
68100	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctDtls", skip_serializing_if = "Option::is_none") )]
68101	pub ctct_dtls: Option<bool>,
68102	#[cfg_attr( feature = "derive_serde", serde(rename = "ResTp", skip_serializing_if = "Option::is_none") )]
68103	pub res_tp: Option<bool>,
68104	#[cfg_attr( feature = "derive_serde", serde(rename = "LckSts", skip_serializing_if = "Option::is_none") )]
68105	pub lck_sts: Option<bool>,
68106	#[cfg_attr( feature = "derive_serde", serde(rename = "MktSpcfcAttr", skip_serializing_if = "Option::is_none") )]
68107	pub mkt_spcfc_attr: Option<bool>,
68108}
68109
68110impl PartyDataReturnCriteria2 {
68111	pub fn validate(&self) -> Result<(), ValidationError> {
68112		Ok(())
68113	}
68114}
68115
68116
68117// PartyDataSearchCriteria2 ...
68118#[cfg_attr(feature = "derive_debug", derive(Debug))]
68119#[cfg_attr(feature = "derive_default", derive(Default))]
68120#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68121#[cfg_attr(feature = "derive_clone", derive(Clone))]
68122#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68123pub struct PartyDataSearchCriteria2 {
68124	#[cfg_attr( feature = "derive_serde", serde(rename = "OpngDt", skip_serializing_if = "Option::is_none") )]
68125	pub opng_dt: Option<DatePeriodSearch1Choice>,
68126	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
68127	pub clsg_dt: Option<DatePeriodSearch1Choice>,
68128	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
68129	pub tp: Option<SystemPartyType1Choice>,
68130	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnsblPtyId", skip_serializing_if = "Option::is_none") )]
68131	pub rspnsbl_pty_id: Option<PartyIdentification136>,
68132	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId", skip_serializing_if = "Option::is_none") )]
68133	pub pty_id: Option<PartyIdentification136>,
68134	#[cfg_attr( feature = "derive_serde", serde(rename = "RstrctnId", skip_serializing_if = "Option::is_none") )]
68135	pub rstrctn_id: Option<String>,
68136	#[cfg_attr( feature = "derive_serde", serde(rename = "RstrctnIsseDt", skip_serializing_if = "Option::is_none") )]
68137	pub rstrctn_isse_dt: Option<DateAndDateTimeSearch4Choice>,
68138	#[cfg_attr( feature = "derive_serde", serde(rename = "ResTp", skip_serializing_if = "Option::is_none") )]
68139	pub res_tp: Option<ResidenceType1Code>,
68140	#[cfg_attr( feature = "derive_serde", serde(rename = "LckSts", skip_serializing_if = "Option::is_none") )]
68141	pub lck_sts: Option<PartyLockStatus1>,
68142}
68143
68144impl PartyDataSearchCriteria2 {
68145	pub fn validate(&self) -> Result<(), ValidationError> {
68146		if let Some(ref val) = self.opng_dt { val.validate()? }
68147		if let Some(ref val) = self.clsg_dt { val.validate()? }
68148		if let Some(ref val) = self.tp { val.validate()? }
68149		if let Some(ref val) = self.rspnsbl_pty_id { val.validate()? }
68150		if let Some(ref val) = self.pty_id { val.validate()? }
68151		if let Some(ref val) = self.rstrctn_id {
68152			if val.chars().count() < 1 {
68153				return Err(ValidationError::new(1001, "rstrctn_id is shorter than the minimum length of 1".to_string()));
68154			}
68155			if val.chars().count() > 35 {
68156				return Err(ValidationError::new(1002, "rstrctn_id exceeds the maximum length of 35".to_string()));
68157			}
68158		}
68159		if let Some(ref val) = self.rstrctn_isse_dt { val.validate()? }
68160		if let Some(ref val) = self.res_tp { val.validate()? }
68161		if let Some(ref val) = self.lck_sts { val.validate()? }
68162		Ok(())
68163	}
68164}
68165
68166
68167// PartyDetail1 ...
68168#[cfg_attr(feature = "derive_debug", derive(Debug))]
68169#[cfg_attr(feature = "derive_default", derive(Default))]
68170#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68171#[cfg_attr(feature = "derive_clone", derive(Clone))]
68172#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68173pub struct PartyDetail1 {
68174	#[cfg_attr( feature = "derive_serde", serde(rename = "FullNm", skip_serializing_if = "Option::is_none") )]
68175	pub full_nm: Option<String>,
68176	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
68177	pub ctry: Option<String>,
68178	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyTp") )]
68179	pub pty_tp: String,
68180	#[cfg_attr( feature = "derive_serde", serde(rename = "SprvsgAuthrty") )]
68181	pub sprvsg_authrty: SupervisingAuthorityIdentification1Choice,
68182	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
68183	pub pstl_adr: Option<PostalAddress6>,
68184	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctct", skip_serializing_if = "Option::is_none") )]
68185	pub ctct: Option<CommunicationAddress7>,
68186	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmnt", skip_serializing_if = "Option::is_none") )]
68187	pub cmnt: Option<String>,
68188}
68189
68190impl PartyDetail1 {
68191	pub fn validate(&self) -> Result<(), ValidationError> {
68192		if let Some(ref val) = self.full_nm {
68193			if val.chars().count() < 1 {
68194				return Err(ValidationError::new(1001, "full_nm is shorter than the minimum length of 1".to_string()));
68195			}
68196			if val.chars().count() > 350 {
68197				return Err(ValidationError::new(1002, "full_nm exceeds the maximum length of 350".to_string()));
68198			}
68199		}
68200		if let Some(ref val) = self.ctry {
68201			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
68202			if !pattern.is_match(val) {
68203				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
68204			}
68205		}
68206		if self.pty_tp.chars().count() < 1 {
68207			return Err(ValidationError::new(1001, "pty_tp is shorter than the minimum length of 1".to_string()));
68208		}
68209		if self.pty_tp.chars().count() > 10 {
68210			return Err(ValidationError::new(1002, "pty_tp exceeds the maximum length of 10".to_string()));
68211		}
68212		self.sprvsg_authrty.validate()?;
68213		if let Some(ref val) = self.pstl_adr { val.validate()? }
68214		if let Some(ref val) = self.ctct { val.validate()? }
68215		if let Some(ref val) = self.cmnt {
68216			if val.chars().count() < 1 {
68217				return Err(ValidationError::new(1001, "cmnt is shorter than the minimum length of 1".to_string()));
68218			}
68219			if val.chars().count() > 20000 {
68220				return Err(ValidationError::new(1002, "cmnt exceeds the maximum length of 20000".to_string()));
68221			}
68222		}
68223		Ok(())
68224	}
68225}
68226
68227
68228// PartyExceptionType1Code ...
68229#[cfg_attr(feature = "derive_debug", derive(Debug))]
68230#[cfg_attr(feature = "derive_default", derive(Default))]
68231#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68232#[cfg_attr(feature = "derive_clone", derive(Clone))]
68233#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68234pub enum PartyExceptionType1Code {
68235	#[cfg_attr(feature = "derive_default", default)]
68236	#[cfg_attr( feature = "derive_serde", serde(rename = "AGGR") )]
68237	CodeAGGR,
68238	#[cfg_attr( feature = "derive_serde", serde(rename = "PNAL") )]
68239	CodePNAL,
68240}
68241
68242impl PartyExceptionType1Code {
68243	pub fn validate(&self) -> Result<(), ValidationError> {
68244		Ok(())
68245	}
68246}
68247
68248
68249// PartyIdentification116 ...
68250#[cfg_attr(feature = "derive_debug", derive(Debug))]
68251#[cfg_attr(feature = "derive_default", derive(Default))]
68252#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68253#[cfg_attr(feature = "derive_clone", derive(Clone))]
68254#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68255pub struct PartyIdentification116 {
68256	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId") )]
68257	pub pty_id: OrganisationIdentification28,
68258	#[cfg_attr( feature = "derive_serde", serde(rename = "LglOrg", skip_serializing_if = "Option::is_none") )]
68259	pub lgl_org: Option<LegalOrganisation1>,
68260	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxPty", skip_serializing_if = "Option::is_none") )]
68261	pub tax_pty: Option<TaxParty1>,
68262}
68263
68264impl PartyIdentification116 {
68265	pub fn validate(&self) -> Result<(), ValidationError> {
68266		self.pty_id.validate()?;
68267		if let Some(ref val) = self.lgl_org { val.validate()? }
68268		if let Some(ref val) = self.tax_pty { val.validate()? }
68269		Ok(())
68270	}
68271}
68272
68273
68274// PartyIdentification118Choice ...
68275#[cfg_attr(feature = "derive_debug", derive(Debug))]
68276#[cfg_attr(feature = "derive_default", derive(Default))]
68277#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68278#[cfg_attr(feature = "derive_clone", derive(Clone))]
68279#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68280pub struct PartyIdentification118Choice {
68281	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
68282	pub lei: Option<String>,
68283	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
68284	pub prtry: Option<GenericIdentification168>,
68285}
68286
68287impl PartyIdentification118Choice {
68288	pub fn validate(&self) -> Result<(), ValidationError> {
68289		if let Some(ref val) = self.lei {
68290			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
68291			if !pattern.is_match(val) {
68292				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
68293			}
68294		}
68295		if let Some(ref val) = self.prtry { val.validate()? }
68296		Ok(())
68297	}
68298}
68299
68300
68301// PartyIdentification120Choice ...
68302#[cfg_attr(feature = "derive_debug", derive(Debug))]
68303#[cfg_attr(feature = "derive_default", derive(Default))]
68304#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68305#[cfg_attr(feature = "derive_clone", derive(Clone))]
68306#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68307pub struct PartyIdentification120Choice {
68308	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
68309	pub any_bic: Option<String>,
68310	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryId", skip_serializing_if = "Option::is_none") )]
68311	pub prtry_id: Option<GenericIdentification36>,
68312	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none") )]
68313	pub nm_and_adr: Option<NameAndAddress5>,
68314}
68315
68316impl PartyIdentification120Choice {
68317	pub fn validate(&self) -> Result<(), ValidationError> {
68318		if let Some(ref val) = self.any_bic {
68319			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
68320			if !pattern.is_match(val) {
68321				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
68322			}
68323		}
68324		if let Some(ref val) = self.prtry_id { val.validate()? }
68325		if let Some(ref val) = self.nm_and_adr { val.validate()? }
68326		Ok(())
68327	}
68328}
68329
68330
68331// PartyIdentification121Choice ...
68332#[cfg_attr(feature = "derive_debug", derive(Debug))]
68333#[cfg_attr(feature = "derive_default", derive(Default))]
68334#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68335#[cfg_attr(feature = "derive_clone", derive(Clone))]
68336#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68337pub struct PartyIdentification121Choice {
68338	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
68339	pub any_bic: Option<String>,
68340	#[cfg_attr( feature = "derive_serde", serde(rename = "LglNttyIdr", skip_serializing_if = "Option::is_none") )]
68341	pub lgl_ntty_idr: Option<String>,
68342	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none") )]
68343	pub nm_and_adr: Option<NameAndAddress5>,
68344	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryId", skip_serializing_if = "Option::is_none") )]
68345	pub prtry_id: Option<GenericIdentification1>,
68346}
68347
68348impl PartyIdentification121Choice {
68349	pub fn validate(&self) -> Result<(), ValidationError> {
68350		if let Some(ref val) = self.any_bic {
68351			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
68352			if !pattern.is_match(val) {
68353				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
68354			}
68355		}
68356		if let Some(ref val) = self.lgl_ntty_idr {
68357			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
68358			if !pattern.is_match(val) {
68359				return Err(ValidationError::new(1005, "lgl_ntty_idr does not match the required pattern".to_string()));
68360			}
68361		}
68362		if let Some(ref val) = self.nm_and_adr { val.validate()? }
68363		if let Some(ref val) = self.prtry_id { val.validate()? }
68364		Ok(())
68365	}
68366}
68367
68368
68369// PartyIdentification125Choice ...
68370#[cfg_attr(feature = "derive_debug", derive(Debug))]
68371#[cfg_attr(feature = "derive_default", derive(Default))]
68372#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68373#[cfg_attr(feature = "derive_clone", derive(Clone))]
68374#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68375pub struct PartyIdentification125Choice {
68376	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
68377	pub any_bic: Option<String>,
68378	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryId", skip_serializing_if = "Option::is_none") )]
68379	pub prtry_id: Option<GenericIdentification1>,
68380	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none") )]
68381	pub nm_and_adr: Option<NameAndAddress5>,
68382}
68383
68384impl PartyIdentification125Choice {
68385	pub fn validate(&self) -> Result<(), ValidationError> {
68386		if let Some(ref val) = self.any_bic {
68387			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
68388			if !pattern.is_match(val) {
68389				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
68390			}
68391		}
68392		if let Some(ref val) = self.prtry_id { val.validate()? }
68393		if let Some(ref val) = self.nm_and_adr { val.validate()? }
68394		Ok(())
68395	}
68396}
68397
68398
68399// PartyIdentification127Choice ...
68400#[cfg_attr(feature = "derive_debug", derive(Debug))]
68401#[cfg_attr(feature = "derive_default", derive(Default))]
68402#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68403#[cfg_attr(feature = "derive_clone", derive(Clone))]
68404#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68405pub struct PartyIdentification127Choice {
68406	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
68407	pub any_bic: Option<String>,
68408	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryId", skip_serializing_if = "Option::is_none") )]
68409	pub prtry_id: Option<GenericIdentification36>,
68410}
68411
68412impl PartyIdentification127Choice {
68413	pub fn validate(&self) -> Result<(), ValidationError> {
68414		if let Some(ref val) = self.any_bic {
68415			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
68416			if !pattern.is_match(val) {
68417				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
68418			}
68419		}
68420		if let Some(ref val) = self.prtry_id { val.validate()? }
68421		Ok(())
68422	}
68423}
68424
68425
68426// PartyIdentification135 ...
68427#[cfg_attr(feature = "derive_debug", derive(Debug))]
68428#[cfg_attr(feature = "derive_default", derive(Default))]
68429#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68430#[cfg_attr(feature = "derive_clone", derive(Clone))]
68431#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68432pub struct PartyIdentification135 {
68433	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
68434	pub nm: Option<String>,
68435	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
68436	pub pstl_adr: Option<PostalAddress24>,
68437	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
68438	pub id: Option<Party38Choice>,
68439	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfRes", skip_serializing_if = "Option::is_none") )]
68440	pub ctry_of_res: Option<String>,
68441	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctDtls", skip_serializing_if = "Option::is_none") )]
68442	pub ctct_dtls: Option<Contact4>,
68443}
68444
68445impl PartyIdentification135 {
68446	pub fn validate(&self) -> Result<(), ValidationError> {
68447		if let Some(ref val) = self.nm {
68448			if val.chars().count() < 1 {
68449				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
68450			}
68451			if val.chars().count() > 140 {
68452				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
68453			}
68454		}
68455		if let Some(ref val) = self.pstl_adr { val.validate()? }
68456		if let Some(ref val) = self.id { val.validate()? }
68457		if let Some(ref val) = self.ctry_of_res {
68458			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
68459			if !pattern.is_match(val) {
68460				return Err(ValidationError::new(1005, "ctry_of_res does not match the required pattern".to_string()));
68461			}
68462		}
68463		if let Some(ref val) = self.ctct_dtls { val.validate()? }
68464		Ok(())
68465	}
68466}
68467
68468
68469// PartyIdentification136 ...
68470#[cfg_attr(feature = "derive_debug", derive(Debug))]
68471#[cfg_attr(feature = "derive_default", derive(Default))]
68472#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68473#[cfg_attr(feature = "derive_clone", derive(Clone))]
68474#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68475pub struct PartyIdentification136 {
68476	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
68477	pub id: PartyIdentification120Choice,
68478	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
68479	pub lei: Option<String>,
68480}
68481
68482impl PartyIdentification136 {
68483	pub fn validate(&self) -> Result<(), ValidationError> {
68484		self.id.validate()?;
68485		if let Some(ref val) = self.lei {
68486			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
68487			if !pattern.is_match(val) {
68488				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
68489			}
68490		}
68491		Ok(())
68492	}
68493}
68494
68495
68496// PartyIdentification139 ...
68497#[cfg_attr(feature = "derive_debug", derive(Debug))]
68498#[cfg_attr(feature = "derive_default", derive(Default))]
68499#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68500#[cfg_attr(feature = "derive_clone", derive(Clone))]
68501#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68502pub struct PartyIdentification139 {
68503	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty") )]
68504	pub pty: PartyIdentification125Choice,
68505	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
68506	pub lei: Option<String>,
68507}
68508
68509impl PartyIdentification139 {
68510	pub fn validate(&self) -> Result<(), ValidationError> {
68511		self.pty.validate()?;
68512		if let Some(ref val) = self.lei {
68513			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
68514			if !pattern.is_match(val) {
68515				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
68516			}
68517		}
68518		Ok(())
68519	}
68520}
68521
68522
68523// PartyIdentification177Choice ...
68524#[cfg_attr(feature = "derive_debug", derive(Debug))]
68525#[cfg_attr(feature = "derive_default", derive(Default))]
68526#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68527#[cfg_attr(feature = "derive_clone", derive(Clone))]
68528#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68529pub struct PartyIdentification177Choice {
68530	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
68531	pub any_bic: Option<String>,
68532	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryId", skip_serializing_if = "Option::is_none") )]
68533	pub prtry_id: Option<GenericIdentification1>,
68534}
68535
68536impl PartyIdentification177Choice {
68537	pub fn validate(&self) -> Result<(), ValidationError> {
68538		if let Some(ref val) = self.any_bic {
68539			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
68540			if !pattern.is_match(val) {
68541				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
68542			}
68543		}
68544		if let Some(ref val) = self.prtry_id { val.validate()? }
68545		Ok(())
68546	}
68547}
68548
68549
68550// PartyIdentification182Choice ...
68551#[cfg_attr(feature = "derive_debug", derive(Debug))]
68552#[cfg_attr(feature = "derive_default", derive(Default))]
68553#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68554#[cfg_attr(feature = "derive_clone", derive(Clone))]
68555#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68556pub struct PartyIdentification182Choice {
68557	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
68558	pub any_bic: Option<String>,
68559	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryId", skip_serializing_if = "Option::is_none") )]
68560	pub prtry_id: Option<GenericIdentification1>,
68561	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none") )]
68562	pub nm_and_adr: Option<NameAndAddress15>,
68563	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxIdNb", skip_serializing_if = "Option::is_none") )]
68564	pub tax_id_nb: Option<String>,
68565	#[cfg_attr( feature = "derive_serde", serde(rename = "NtlRegnNb", skip_serializing_if = "Option::is_none") )]
68566	pub ntl_regn_nb: Option<String>,
68567}
68568
68569impl PartyIdentification182Choice {
68570	pub fn validate(&self) -> Result<(), ValidationError> {
68571		if let Some(ref val) = self.any_bic {
68572			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
68573			if !pattern.is_match(val) {
68574				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
68575			}
68576		}
68577		if let Some(ref val) = self.prtry_id { val.validate()? }
68578		if let Some(ref val) = self.nm_and_adr { val.validate()? }
68579		if let Some(ref val) = self.tax_id_nb {
68580			if val.chars().count() < 1 {
68581				return Err(ValidationError::new(1001, "tax_id_nb is shorter than the minimum length of 1".to_string()));
68582			}
68583			if val.chars().count() > 35 {
68584				return Err(ValidationError::new(1002, "tax_id_nb exceeds the maximum length of 35".to_string()));
68585			}
68586		}
68587		if let Some(ref val) = self.ntl_regn_nb {
68588			if val.chars().count() < 1 {
68589				return Err(ValidationError::new(1001, "ntl_regn_nb is shorter than the minimum length of 1".to_string()));
68590			}
68591			if val.chars().count() > 35 {
68592				return Err(ValidationError::new(1002, "ntl_regn_nb exceeds the maximum length of 35".to_string()));
68593			}
68594		}
68595		Ok(())
68596	}
68597}
68598
68599
68600// PartyIdentification220 ...
68601#[cfg_attr(feature = "derive_debug", derive(Debug))]
68602#[cfg_attr(feature = "derive_default", derive(Default))]
68603#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68604#[cfg_attr(feature = "derive_clone", derive(Clone))]
68605#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68606pub struct PartyIdentification220 {
68607	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
68608	pub id: Option<PartyIdentification182Choice>,
68609	#[cfg_attr( feature = "derive_serde", serde(rename = "LglNttyIdr", skip_serializing_if = "Option::is_none") )]
68610	pub lgl_ntty_idr: Option<String>,
68611}
68612
68613impl PartyIdentification220 {
68614	pub fn validate(&self) -> Result<(), ValidationError> {
68615		if let Some(ref val) = self.id { val.validate()? }
68616		if let Some(ref val) = self.lgl_ntty_idr {
68617			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
68618			if !pattern.is_match(val) {
68619				return Err(ValidationError::new(1005, "lgl_ntty_idr does not match the required pattern".to_string()));
68620			}
68621		}
68622		Ok(())
68623	}
68624}
68625
68626
68627// PartyIdentification236Choice ...
68628#[cfg_attr(feature = "derive_debug", derive(Debug))]
68629#[cfg_attr(feature = "derive_default", derive(Default))]
68630#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68631#[cfg_attr(feature = "derive_clone", derive(Clone))]
68632#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68633pub struct PartyIdentification236Choice {
68634	#[cfg_attr( feature = "derive_serde", serde(rename = "Lgl", skip_serializing_if = "Option::is_none") )]
68635	pub lgl: Option<OrganisationIdentification15Choice>,
68636	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntrl", skip_serializing_if = "Option::is_none") )]
68637	pub ntrl: Option<NaturalPersonIdentification2>,
68638}
68639
68640impl PartyIdentification236Choice {
68641	pub fn validate(&self) -> Result<(), ValidationError> {
68642		if let Some(ref val) = self.lgl { val.validate()? }
68643		if let Some(ref val) = self.ntrl { val.validate()? }
68644		Ok(())
68645	}
68646}
68647
68648
68649// PartyIdentification242Choice ...
68650#[cfg_attr(feature = "derive_debug", derive(Debug))]
68651#[cfg_attr(feature = "derive_default", derive(Default))]
68652#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68653#[cfg_attr(feature = "derive_clone", derive(Clone))]
68654#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68655pub struct PartyIdentification242Choice {
68656	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none") )]
68657	pub nm_and_adr: Option<NameAndAddress8>,
68658	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
68659	pub any_bic: Option<PartyIdentification265>,
68660	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId", skip_serializing_if = "Option::is_none") )]
68661	pub pty_id: Option<PartyIdentification266>,
68662}
68663
68664impl PartyIdentification242Choice {
68665	pub fn validate(&self) -> Result<(), ValidationError> {
68666		if let Some(ref val) = self.nm_and_adr { val.validate()? }
68667		if let Some(ref val) = self.any_bic { val.validate()? }
68668		if let Some(ref val) = self.pty_id { val.validate()? }
68669		Ok(())
68670	}
68671}
68672
68673
68674// PartyIdentification248Choice ...
68675#[cfg_attr(feature = "derive_debug", derive(Debug))]
68676#[cfg_attr(feature = "derive_default", derive(Default))]
68677#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68678#[cfg_attr(feature = "derive_clone", derive(Clone))]
68679#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68680pub struct PartyIdentification248Choice {
68681	#[cfg_attr( feature = "derive_serde", serde(rename = "Lgl", skip_serializing_if = "Option::is_none") )]
68682	pub lgl: Option<LegalPersonIdentification1>,
68683	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntrl", skip_serializing_if = "Option::is_none") )]
68684	pub ntrl: Option<NaturalPersonIdentification3>,
68685}
68686
68687impl PartyIdentification248Choice {
68688	pub fn validate(&self) -> Result<(), ValidationError> {
68689		if let Some(ref val) = self.lgl { val.validate()? }
68690		if let Some(ref val) = self.ntrl { val.validate()? }
68691		Ok(())
68692	}
68693}
68694
68695
68696// PartyIdentification265 ...
68697#[cfg_attr(feature = "derive_debug", derive(Debug))]
68698#[cfg_attr(feature = "derive_default", derive(Default))]
68699#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68700#[cfg_attr(feature = "derive_clone", derive(Clone))]
68701#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68702pub struct PartyIdentification265 {
68703	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC") )]
68704	pub any_bic: String,
68705	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrntvIdr", skip_serializing_if = "Option::is_none") )]
68706	pub altrntv_idr: Option<Vec<String>>,
68707}
68708
68709impl PartyIdentification265 {
68710	pub fn validate(&self) -> Result<(), ValidationError> {
68711		let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
68712		if !pattern.is_match(&self.any_bic) {
68713			return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
68714		}
68715		if let Some(ref vec) = self.altrntv_idr {
68716			for item in vec {
68717				if item.chars().count() < 1 {
68718					return Err(ValidationError::new(1001, "altrntv_idr is shorter than the minimum length of 1".to_string()));
68719				}
68720				if item.chars().count() > 35 {
68721					return Err(ValidationError::new(1002, "altrntv_idr exceeds the maximum length of 35".to_string()));
68722				}
68723			}
68724		}
68725		Ok(())
68726	}
68727}
68728
68729
68730// PartyIdentification266 ...
68731#[cfg_attr(feature = "derive_debug", derive(Debug))]
68732#[cfg_attr(feature = "derive_default", derive(Default))]
68733#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68734#[cfg_attr(feature = "derive_clone", derive(Clone))]
68735#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68736pub struct PartyIdentification266 {
68737	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyNm", skip_serializing_if = "Option::is_none") )]
68738	pub pty_nm: Option<String>,
68739	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
68740	pub any_bic: Option<PartyIdentification265>,
68741	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctNb", skip_serializing_if = "Option::is_none") )]
68742	pub acct_nb: Option<String>,
68743	#[cfg_attr( feature = "derive_serde", serde(rename = "Adr", skip_serializing_if = "Option::is_none") )]
68744	pub adr: Option<String>,
68745	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysId", skip_serializing_if = "Option::is_none") )]
68746	pub clr_sys_id: Option<ClearingSystemIdentification2Choice>,
68747	#[cfg_attr( feature = "derive_serde", serde(rename = "LglNttyIdr", skip_serializing_if = "Option::is_none") )]
68748	pub lgl_ntty_idr: Option<String>,
68749}
68750
68751impl PartyIdentification266 {
68752	pub fn validate(&self) -> Result<(), ValidationError> {
68753		if let Some(ref val) = self.pty_nm {
68754			if val.chars().count() < 1 {
68755				return Err(ValidationError::new(1001, "pty_nm is shorter than the minimum length of 1".to_string()));
68756			}
68757			if val.chars().count() > 34 {
68758				return Err(ValidationError::new(1002, "pty_nm exceeds the maximum length of 34".to_string()));
68759			}
68760		}
68761		if let Some(ref val) = self.any_bic { val.validate()? }
68762		if let Some(ref val) = self.acct_nb {
68763			if val.chars().count() < 1 {
68764				return Err(ValidationError::new(1001, "acct_nb is shorter than the minimum length of 1".to_string()));
68765			}
68766			if val.chars().count() > 34 {
68767				return Err(ValidationError::new(1002, "acct_nb exceeds the maximum length of 34".to_string()));
68768			}
68769		}
68770		if let Some(ref val) = self.adr {
68771			if val.chars().count() < 1 {
68772				return Err(ValidationError::new(1001, "adr is shorter than the minimum length of 1".to_string()));
68773			}
68774			if val.chars().count() > 105 {
68775				return Err(ValidationError::new(1002, "adr exceeds the maximum length of 105".to_string()));
68776			}
68777		}
68778		if let Some(ref val) = self.clr_sys_id { val.validate()? }
68779		if let Some(ref val) = self.lgl_ntty_idr {
68780			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
68781			if !pattern.is_match(val) {
68782				return Err(ValidationError::new(1005, "lgl_ntty_idr does not match the required pattern".to_string()));
68783			}
68784		}
68785		Ok(())
68786	}
68787}
68788
68789
68790// PartyIdentification272 ...
68791#[cfg_attr(feature = "derive_debug", derive(Debug))]
68792#[cfg_attr(feature = "derive_default", derive(Default))]
68793#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68794#[cfg_attr(feature = "derive_clone", derive(Clone))]
68795#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68796pub struct PartyIdentification272 {
68797	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
68798	pub nm: Option<String>,
68799	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
68800	pub pstl_adr: Option<PostalAddress27>,
68801	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
68802	pub id: Option<Party52Choice>,
68803	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfRes", skip_serializing_if = "Option::is_none") )]
68804	pub ctry_of_res: Option<String>,
68805	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctDtls", skip_serializing_if = "Option::is_none") )]
68806	pub ctct_dtls: Option<Contact13>,
68807}
68808
68809impl PartyIdentification272 {
68810	pub fn validate(&self) -> Result<(), ValidationError> {
68811		if let Some(ref val) = self.nm {
68812			if val.chars().count() < 1 {
68813				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
68814			}
68815			if val.chars().count() > 140 {
68816				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
68817			}
68818		}
68819		if let Some(ref val) = self.pstl_adr { val.validate()? }
68820		if let Some(ref val) = self.id { val.validate()? }
68821		if let Some(ref val) = self.ctry_of_res {
68822			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
68823			if !pattern.is_match(val) {
68824				return Err(ValidationError::new(1005, "ctry_of_res does not match the required pattern".to_string()));
68825			}
68826		}
68827		if let Some(ref val) = self.ctct_dtls { val.validate()? }
68828		Ok(())
68829	}
68830}
68831
68832
68833// PartyIdentification273 ...
68834#[cfg_attr(feature = "derive_debug", derive(Debug))]
68835#[cfg_attr(feature = "derive_default", derive(Default))]
68836#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68837#[cfg_attr(feature = "derive_clone", derive(Clone))]
68838#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68839pub struct PartyIdentification273 {
68840	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
68841	pub nm: String,
68842	#[cfg_attr( feature = "derive_serde", serde(rename = "LglNm", skip_serializing_if = "Option::is_none") )]
68843	pub lgl_nm: Option<String>,
68844	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
68845	pub pstl_adr: Option<PostalAddress27>,
68846	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
68847	pub id: Party56Choice,
68848	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfRes", skip_serializing_if = "Option::is_none") )]
68849	pub ctry_of_res: Option<String>,
68850	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctDtls", skip_serializing_if = "Option::is_none") )]
68851	pub ctct_dtls: Option<Contact13>,
68852}
68853
68854impl PartyIdentification273 {
68855	pub fn validate(&self) -> Result<(), ValidationError> {
68856		if self.nm.chars().count() < 1 {
68857			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
68858		}
68859		if self.nm.chars().count() > 140 {
68860			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
68861		}
68862		if let Some(ref val) = self.lgl_nm {
68863			if val.chars().count() < 1 {
68864				return Err(ValidationError::new(1001, "lgl_nm is shorter than the minimum length of 1".to_string()));
68865			}
68866			if val.chars().count() > 140 {
68867				return Err(ValidationError::new(1002, "lgl_nm exceeds the maximum length of 140".to_string()));
68868			}
68869		}
68870		if let Some(ref val) = self.pstl_adr { val.validate()? }
68871		self.id.validate()?;
68872		if let Some(ref val) = self.ctry_of_res {
68873			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
68874			if !pattern.is_match(val) {
68875				return Err(ValidationError::new(1005, "ctry_of_res does not match the required pattern".to_string()));
68876			}
68877		}
68878		if let Some(ref val) = self.ctct_dtls { val.validate()? }
68879		Ok(())
68880	}
68881}
68882
68883
68884// PartyIdentification274 ...
68885#[cfg_attr(feature = "derive_debug", derive(Debug))]
68886#[cfg_attr(feature = "derive_default", derive(Default))]
68887#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68888#[cfg_attr(feature = "derive_clone", derive(Clone))]
68889#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68890pub struct PartyIdentification274 {
68891	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
68892	pub nm: Option<String>,
68893	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
68894	pub pstl_adr: Option<PostalAddress27>,
68895	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
68896	pub id: Option<PersonIdentification18>,
68897	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfRes", skip_serializing_if = "Option::is_none") )]
68898	pub ctry_of_res: Option<String>,
68899	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctDtls", skip_serializing_if = "Option::is_none") )]
68900	pub ctct_dtls: Option<Contact13>,
68901}
68902
68903impl PartyIdentification274 {
68904	pub fn validate(&self) -> Result<(), ValidationError> {
68905		if let Some(ref val) = self.nm {
68906			if val.chars().count() < 1 {
68907				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
68908			}
68909			if val.chars().count() > 140 {
68910				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
68911			}
68912		}
68913		if let Some(ref val) = self.pstl_adr { val.validate()? }
68914		if let Some(ref val) = self.id { val.validate()? }
68915		if let Some(ref val) = self.ctry_of_res {
68916			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
68917			if !pattern.is_match(val) {
68918				return Err(ValidationError::new(1005, "ctry_of_res does not match the required pattern".to_string()));
68919			}
68920		}
68921		if let Some(ref val) = self.ctct_dtls { val.validate()? }
68922		Ok(())
68923	}
68924}
68925
68926
68927// PartyIdentification2Choice ...
68928#[cfg_attr(feature = "derive_debug", derive(Debug))]
68929#[cfg_attr(feature = "derive_default", derive(Default))]
68930#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68931#[cfg_attr(feature = "derive_clone", derive(Clone))]
68932#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68933pub struct PartyIdentification2Choice {
68934	#[cfg_attr( feature = "derive_serde", serde(rename = "BICOrBEI", skip_serializing_if = "Option::is_none") )]
68935	pub bic_or_bei: Option<String>,
68936	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryId", skip_serializing_if = "Option::is_none") )]
68937	pub prtry_id: Option<GenericIdentification1>,
68938	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none") )]
68939	pub nm_and_adr: Option<NameAndAddress5>,
68940}
68941
68942impl PartyIdentification2Choice {
68943	pub fn validate(&self) -> Result<(), ValidationError> {
68944		if let Some(ref val) = self.bic_or_bei {
68945			let pattern = Regex::new("[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}").unwrap();
68946			if !pattern.is_match(val) {
68947				return Err(ValidationError::new(1005, "bic_or_bei does not match the required pattern".to_string()));
68948			}
68949		}
68950		if let Some(ref val) = self.prtry_id { val.validate()? }
68951		if let Some(ref val) = self.nm_and_adr { val.validate()? }
68952		Ok(())
68953	}
68954}
68955
68956
68957// PartyIdentification43 ...
68958#[cfg_attr(feature = "derive_debug", derive(Debug))]
68959#[cfg_attr(feature = "derive_default", derive(Default))]
68960#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
68961#[cfg_attr(feature = "derive_clone", derive(Clone))]
68962#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
68963pub struct PartyIdentification43 {
68964	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
68965	pub nm: Option<String>,
68966	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
68967	pub pstl_adr: Option<PostalAddress6>,
68968	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
68969	pub id: Option<Party11Choice>,
68970	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfRes", skip_serializing_if = "Option::is_none") )]
68971	pub ctry_of_res: Option<String>,
68972	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctDtls", skip_serializing_if = "Option::is_none") )]
68973	pub ctct_dtls: Option<ContactDetails2>,
68974}
68975
68976impl PartyIdentification43 {
68977	pub fn validate(&self) -> Result<(), ValidationError> {
68978		if let Some(ref val) = self.nm {
68979			if val.chars().count() < 1 {
68980				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
68981			}
68982			if val.chars().count() > 140 {
68983				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
68984			}
68985		}
68986		if let Some(ref val) = self.pstl_adr { val.validate()? }
68987		if let Some(ref val) = self.id { val.validate()? }
68988		if let Some(ref val) = self.ctry_of_res {
68989			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
68990			if !pattern.is_match(val) {
68991				return Err(ValidationError::new(1005, "ctry_of_res does not match the required pattern".to_string()));
68992			}
68993		}
68994		if let Some(ref val) = self.ctct_dtls { val.validate()? }
68995		Ok(())
68996	}
68997}
68998
68999
69000// PartyIdentification44 ...
69001#[cfg_attr(feature = "derive_debug", derive(Debug))]
69002#[cfg_attr(feature = "derive_default", derive(Default))]
69003#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69004#[cfg_attr(feature = "derive_clone", derive(Clone))]
69005#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69006pub struct PartyIdentification44 {
69007	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC") )]
69008	pub any_bic: String,
69009	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrntvIdr", skip_serializing_if = "Option::is_none") )]
69010	pub altrntv_idr: Option<Vec<String>>,
69011}
69012
69013impl PartyIdentification44 {
69014	pub fn validate(&self) -> Result<(), ValidationError> {
69015		let pattern = Regex::new("[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}").unwrap();
69016		if !pattern.is_match(&self.any_bic) {
69017			return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
69018		}
69019		if let Some(ref vec) = self.altrntv_idr {
69020			for item in vec {
69021				if item.chars().count() < 1 {
69022					return Err(ValidationError::new(1001, "altrntv_idr is shorter than the minimum length of 1".to_string()));
69023				}
69024				if item.chars().count() > 35 {
69025					return Err(ValidationError::new(1002, "altrntv_idr exceeds the maximum length of 35".to_string()));
69026				}
69027			}
69028		}
69029		Ok(())
69030	}
69031}
69032
69033
69034// PartyIdentification59 ...
69035#[cfg_attr(feature = "derive_debug", derive(Debug))]
69036#[cfg_attr(feature = "derive_default", derive(Default))]
69037#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69038#[cfg_attr(feature = "derive_clone", derive(Clone))]
69039#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69040pub struct PartyIdentification59 {
69041	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyNm", skip_serializing_if = "Option::is_none") )]
69042	pub pty_nm: Option<String>,
69043	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
69044	pub any_bic: Option<PartyIdentification44>,
69045	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctNb", skip_serializing_if = "Option::is_none") )]
69046	pub acct_nb: Option<String>,
69047	#[cfg_attr( feature = "derive_serde", serde(rename = "Adr", skip_serializing_if = "Option::is_none") )]
69048	pub adr: Option<String>,
69049	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysId", skip_serializing_if = "Option::is_none") )]
69050	pub clr_sys_id: Option<ClearingSystemIdentification2Choice>,
69051	#[cfg_attr( feature = "derive_serde", serde(rename = "LglNttyIdr", skip_serializing_if = "Option::is_none") )]
69052	pub lgl_ntty_idr: Option<String>,
69053}
69054
69055impl PartyIdentification59 {
69056	pub fn validate(&self) -> Result<(), ValidationError> {
69057		if let Some(ref val) = self.pty_nm {
69058			if val.chars().count() < 1 {
69059				return Err(ValidationError::new(1001, "pty_nm is shorter than the minimum length of 1".to_string()));
69060			}
69061			if val.chars().count() > 34 {
69062				return Err(ValidationError::new(1002, "pty_nm exceeds the maximum length of 34".to_string()));
69063			}
69064		}
69065		if let Some(ref val) = self.any_bic { val.validate()? }
69066		if let Some(ref val) = self.acct_nb {
69067			if val.chars().count() < 1 {
69068				return Err(ValidationError::new(1001, "acct_nb is shorter than the minimum length of 1".to_string()));
69069			}
69070			if val.chars().count() > 34 {
69071				return Err(ValidationError::new(1002, "acct_nb exceeds the maximum length of 34".to_string()));
69072			}
69073		}
69074		if let Some(ref val) = self.adr {
69075			if val.chars().count() < 1 {
69076				return Err(ValidationError::new(1001, "adr is shorter than the minimum length of 1".to_string()));
69077			}
69078			if val.chars().count() > 105 {
69079				return Err(ValidationError::new(1002, "adr exceeds the maximum length of 105".to_string()));
69080			}
69081		}
69082		if let Some(ref val) = self.clr_sys_id { val.validate()? }
69083		if let Some(ref val) = self.lgl_ntty_idr {
69084			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
69085			if !pattern.is_match(val) {
69086				return Err(ValidationError::new(1005, "lgl_ntty_idr does not match the required pattern".to_string()));
69087			}
69088		}
69089		Ok(())
69090	}
69091}
69092
69093
69094// PartyIdentification62 ...
69095#[cfg_attr(feature = "derive_debug", derive(Debug))]
69096#[cfg_attr(feature = "derive_default", derive(Default))]
69097#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69098#[cfg_attr(feature = "derive_clone", derive(Clone))]
69099#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69100pub struct PartyIdentification62 {
69101	#[cfg_attr( feature = "derive_serde", serde(rename = "BICFI", skip_serializing_if = "Option::is_none") )]
69102	pub bicfi: Option<String>,
69103	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryId", skip_serializing_if = "Option::is_none") )]
69104	pub prtry_id: Option<GenericIdentification1>,
69105	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none") )]
69106	pub nm_and_adr: Option<NameAndAddress5>,
69107}
69108
69109impl PartyIdentification62 {
69110	pub fn validate(&self) -> Result<(), ValidationError> {
69111		if let Some(ref val) = self.bicfi {
69112			let pattern = Regex::new("[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}").unwrap();
69113			if !pattern.is_match(val) {
69114				return Err(ValidationError::new(1005, "bicfi does not match the required pattern".to_string()));
69115			}
69116		}
69117		if let Some(ref val) = self.prtry_id { val.validate()? }
69118		if let Some(ref val) = self.nm_and_adr { val.validate()? }
69119		Ok(())
69120	}
69121}
69122
69123
69124// PartyIdentification63 ...
69125#[cfg_attr(feature = "derive_debug", derive(Debug))]
69126#[cfg_attr(feature = "derive_default", derive(Default))]
69127#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69128#[cfg_attr(feature = "derive_clone", derive(Clone))]
69129#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69130pub struct PartyIdentification63 {
69131	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId") )]
69132	pub pty_id: PartyIdentification75Choice,
69133	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgId", skip_serializing_if = "Option::is_none") )]
69134	pub prcg_id: Option<String>,
69135}
69136
69137impl PartyIdentification63 {
69138	pub fn validate(&self) -> Result<(), ValidationError> {
69139		self.pty_id.validate()?;
69140		if let Some(ref val) = self.prcg_id {
69141			if val.chars().count() < 1 {
69142				return Err(ValidationError::new(1001, "prcg_id is shorter than the minimum length of 1".to_string()));
69143			}
69144			if val.chars().count() > 35 {
69145				return Err(ValidationError::new(1002, "prcg_id exceeds the maximum length of 35".to_string()));
69146			}
69147		}
69148		Ok(())
69149	}
69150}
69151
69152
69153// PartyIdentification64 ...
69154#[cfg_attr(feature = "derive_debug", derive(Debug))]
69155#[cfg_attr(feature = "derive_default", derive(Default))]
69156#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69157#[cfg_attr(feature = "derive_clone", derive(Clone))]
69158#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69159pub struct PartyIdentification64 {
69160	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
69161	pub any_bic: Option<String>,
69162	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryId", skip_serializing_if = "Option::is_none") )]
69163	pub prtry_id: Option<GenericIdentification1>,
69164	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none") )]
69165	pub nm_and_adr: Option<NameAndAddress5>,
69166}
69167
69168impl PartyIdentification64 {
69169	pub fn validate(&self) -> Result<(), ValidationError> {
69170		if let Some(ref val) = self.any_bic {
69171			let pattern = Regex::new("[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}").unwrap();
69172			if !pattern.is_match(val) {
69173				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
69174			}
69175		}
69176		if let Some(ref val) = self.prtry_id { val.validate()? }
69177		if let Some(ref val) = self.nm_and_adr { val.validate()? }
69178		Ok(())
69179	}
69180}
69181
69182
69183// PartyIdentification71Choice ...
69184#[cfg_attr(feature = "derive_debug", derive(Debug))]
69185#[cfg_attr(feature = "derive_default", derive(Default))]
69186#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69187#[cfg_attr(feature = "derive_clone", derive(Clone))]
69188#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69189pub struct PartyIdentification71Choice {
69190	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
69191	pub any_bic: Option<String>,
69192	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryId", skip_serializing_if = "Option::is_none") )]
69193	pub prtry_id: Option<GenericIdentification36>,
69194	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none") )]
69195	pub nm_and_adr: Option<NameAndAddress5>,
69196}
69197
69198impl PartyIdentification71Choice {
69199	pub fn validate(&self) -> Result<(), ValidationError> {
69200		if let Some(ref val) = self.any_bic {
69201			let pattern = Regex::new("[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}").unwrap();
69202			if !pattern.is_match(val) {
69203				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
69204			}
69205		}
69206		if let Some(ref val) = self.prtry_id { val.validate()? }
69207		if let Some(ref val) = self.nm_and_adr { val.validate()? }
69208		Ok(())
69209	}
69210}
69211
69212
69213// PartyIdentification72 ...
69214#[cfg_attr(feature = "derive_debug", derive(Debug))]
69215#[cfg_attr(feature = "derive_default", derive(Default))]
69216#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69217#[cfg_attr(feature = "derive_clone", derive(Clone))]
69218#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69219pub struct PartyIdentification72 {
69220	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId") )]
69221	pub pty_id: PartyIdentification43,
69222	#[cfg_attr( feature = "derive_serde", serde(rename = "LglOrg", skip_serializing_if = "Option::is_none") )]
69223	pub lgl_org: Option<LegalOrganisation1>,
69224	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxPty", skip_serializing_if = "Option::is_none") )]
69225	pub tax_pty: Option<TaxParty1>,
69226}
69227
69228impl PartyIdentification72 {
69229	pub fn validate(&self) -> Result<(), ValidationError> {
69230		self.pty_id.validate()?;
69231		if let Some(ref val) = self.lgl_org { val.validate()? }
69232		if let Some(ref val) = self.tax_pty { val.validate()? }
69233		Ok(())
69234	}
69235}
69236
69237
69238// PartyIdentification73Choice ...
69239#[cfg_attr(feature = "derive_debug", derive(Debug))]
69240#[cfg_attr(feature = "derive_default", derive(Default))]
69241#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69242#[cfg_attr(feature = "derive_clone", derive(Clone))]
69243#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69244pub struct PartyIdentification73Choice {
69245	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none") )]
69246	pub nm_and_adr: Option<NameAndAddress8>,
69247	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
69248	pub any_bic: Option<PartyIdentification44>,
69249	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId", skip_serializing_if = "Option::is_none") )]
69250	pub pty_id: Option<PartyIdentification59>,
69251}
69252
69253impl PartyIdentification73Choice {
69254	pub fn validate(&self) -> Result<(), ValidationError> {
69255		if let Some(ref val) = self.nm_and_adr { val.validate()? }
69256		if let Some(ref val) = self.any_bic { val.validate()? }
69257		if let Some(ref val) = self.pty_id { val.validate()? }
69258		Ok(())
69259	}
69260}
69261
69262
69263// PartyIdentification75Choice ...
69264#[cfg_attr(feature = "derive_debug", derive(Debug))]
69265#[cfg_attr(feature = "derive_default", derive(Default))]
69266#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69267#[cfg_attr(feature = "derive_clone", derive(Clone))]
69268#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69269pub struct PartyIdentification75Choice {
69270	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
69271	pub any_bic: Option<String>,
69272	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none") )]
69273	pub nm_and_adr: Option<NameAndAddress5>,
69274	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
69275	pub ctry: Option<String>,
69276}
69277
69278impl PartyIdentification75Choice {
69279	pub fn validate(&self) -> Result<(), ValidationError> {
69280		if let Some(ref val) = self.any_bic {
69281			let pattern = Regex::new("[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}").unwrap();
69282			if !pattern.is_match(val) {
69283				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
69284			}
69285		}
69286		if let Some(ref val) = self.nm_and_adr { val.validate()? }
69287		if let Some(ref val) = self.ctry {
69288			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
69289			if !pattern.is_match(val) {
69290				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
69291			}
69292		}
69293		Ok(())
69294	}
69295}
69296
69297
69298// PartyIdentification76 ...
69299#[cfg_attr(feature = "derive_debug", derive(Debug))]
69300#[cfg_attr(feature = "derive_default", derive(Default))]
69301#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69302#[cfg_attr(feature = "derive_clone", derive(Clone))]
69303#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69304pub struct PartyIdentification76 {
69305	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
69306	pub id: PersonOrOrganisation1Choice,
69307	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfBrnch", skip_serializing_if = "Option::is_none") )]
69308	pub ctry_of_brnch: Option<String>,
69309}
69310
69311impl PartyIdentification76 {
69312	pub fn validate(&self) -> Result<(), ValidationError> {
69313		self.id.validate()?;
69314		if let Some(ref val) = self.ctry_of_brnch {
69315			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
69316			if !pattern.is_match(val) {
69317				return Err(ValidationError::new(1005, "ctry_of_brnch does not match the required pattern".to_string()));
69318			}
69319		}
69320		Ok(())
69321	}
69322}
69323
69324
69325// PartyIdentification79 ...
69326#[cfg_attr(feature = "derive_debug", derive(Debug))]
69327#[cfg_attr(feature = "derive_default", derive(Default))]
69328#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69329#[cfg_attr(feature = "derive_clone", derive(Clone))]
69330#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69331pub struct PartyIdentification79 {
69332	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr") )]
69333	pub acct_ownr: Vec<PartyIdentification76>,
69334	#[cfg_attr( feature = "derive_serde", serde(rename = "DcsnMakr", skip_serializing_if = "Option::is_none") )]
69335	pub dcsn_makr: Option<Vec<PersonOrOrganisation2Choice>>,
69336}
69337
69338impl PartyIdentification79 {
69339	pub fn validate(&self) -> Result<(), ValidationError> {
69340		for item in &self.acct_ownr { item.validate()? }
69341		if let Some(ref vec) = self.dcsn_makr { for item in vec { item.validate()? } }
69342		Ok(())
69343	}
69344}
69345
69346
69347// PartyIdentification99Choice ...
69348#[cfg_attr(feature = "derive_debug", derive(Debug))]
69349#[cfg_attr(feature = "derive_default", derive(Default))]
69350#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69351#[cfg_attr(feature = "derive_clone", derive(Clone))]
69352#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69353pub struct PartyIdentification99Choice {
69354	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none") )]
69355	pub nm_and_adr: Option<NameAndAddress8>,
69356	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
69357	pub any_bic: Option<PartyIdentification44>,
69358}
69359
69360impl PartyIdentification99Choice {
69361	pub fn validate(&self) -> Result<(), ValidationError> {
69362		if let Some(ref val) = self.nm_and_adr { val.validate()? }
69363		if let Some(ref val) = self.any_bic { val.validate()? }
69364		Ok(())
69365	}
69366}
69367
69368
69369// PartyIdentificationAndAccount95 ...
69370#[cfg_attr(feature = "derive_debug", derive(Debug))]
69371#[cfg_attr(feature = "derive_default", derive(Default))]
69372#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69373#[cfg_attr(feature = "derive_clone", derive(Clone))]
69374#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69375pub struct PartyIdentificationAndAccount95 {
69376	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId") )]
69377	pub pty_id: PartyIdentification71Choice,
69378	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
69379	pub acct_id: Option<SecuritiesAccount22>,
69380	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgId", skip_serializing_if = "Option::is_none") )]
69381	pub prcg_id: Option<String>,
69382}
69383
69384impl PartyIdentificationAndAccount95 {
69385	pub fn validate(&self) -> Result<(), ValidationError> {
69386		self.pty_id.validate()?;
69387		if let Some(ref val) = self.acct_id { val.validate()? }
69388		if let Some(ref val) = self.prcg_id {
69389			if val.chars().count() < 1 {
69390				return Err(ValidationError::new(1001, "prcg_id is shorter than the minimum length of 1".to_string()));
69391			}
69392			if val.chars().count() > 35 {
69393				return Err(ValidationError::new(1002, "prcg_id exceeds the maximum length of 35".to_string()));
69394			}
69395		}
69396		Ok(())
69397	}
69398}
69399
69400
69401// PartyIdentificationAndAccount96 ...
69402#[cfg_attr(feature = "derive_debug", derive(Debug))]
69403#[cfg_attr(feature = "derive_default", derive(Default))]
69404#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69405#[cfg_attr(feature = "derive_clone", derive(Clone))]
69406#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69407pub struct PartyIdentificationAndAccount96 {
69408	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId") )]
69409	pub pty_id: PartyIdentification64,
69410	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId") )]
69411	pub acct_id: AccountIdentification26,
69412}
69413
69414impl PartyIdentificationAndAccount96 {
69415	pub fn validate(&self) -> Result<(), ValidationError> {
69416		self.pty_id.validate()?;
69417		self.acct_id.validate()?;
69418		Ok(())
69419	}
69420}
69421
69422
69423// PartyIdentificationAndAccount97 ...
69424#[cfg_attr(feature = "derive_debug", derive(Debug))]
69425#[cfg_attr(feature = "derive_default", derive(Default))]
69426#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69427#[cfg_attr(feature = "derive_clone", derive(Clone))]
69428#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69429pub struct PartyIdentificationAndAccount97 {
69430	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId") )]
69431	pub pty_id: PartyIdentification62,
69432	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
69433	pub acct_id: Option<AccountIdentification26>,
69434}
69435
69436impl PartyIdentificationAndAccount97 {
69437	pub fn validate(&self) -> Result<(), ValidationError> {
69438		self.pty_id.validate()?;
69439		if let Some(ref val) = self.acct_id { val.validate()? }
69440		Ok(())
69441	}
69442}
69443
69444
69445// PartyIdentificationType7Code ...
69446#[cfg_attr(feature = "derive_debug", derive(Debug))]
69447#[cfg_attr(feature = "derive_default", derive(Default))]
69448#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69449#[cfg_attr(feature = "derive_clone", derive(Clone))]
69450#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69451pub enum PartyIdentificationType7Code {
69452	#[cfg_attr(feature = "derive_default", default)]
69453	#[cfg_attr( feature = "derive_serde", serde(rename = "ATIN") )]
69454	CodeATIN,
69455	#[cfg_attr( feature = "derive_serde", serde(rename = "IDCD") )]
69456	CodeIDCD,
69457	#[cfg_attr( feature = "derive_serde", serde(rename = "NRIN") )]
69458	CodeNRIN,
69459	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
69460	CodeOTHR,
69461	#[cfg_attr( feature = "derive_serde", serde(rename = "PASS") )]
69462	CodePASS,
69463	#[cfg_attr( feature = "derive_serde", serde(rename = "POCD") )]
69464	CodePOCD,
69465	#[cfg_attr( feature = "derive_serde", serde(rename = "SOCS") )]
69466	CodeSOCS,
69467	#[cfg_attr( feature = "derive_serde", serde(rename = "SRSA") )]
69468	CodeSRSA,
69469	#[cfg_attr( feature = "derive_serde", serde(rename = "GUNL") )]
69470	CodeGUNL,
69471	#[cfg_attr( feature = "derive_serde", serde(rename = "GTIN") )]
69472	CodeGTIN,
69473	#[cfg_attr( feature = "derive_serde", serde(rename = "ITIN") )]
69474	CodeITIN,
69475	#[cfg_attr( feature = "derive_serde", serde(rename = "CPFA") )]
69476	CodeCPFA,
69477	#[cfg_attr( feature = "derive_serde", serde(rename = "AREG") )]
69478	CodeAREG,
69479	#[cfg_attr( feature = "derive_serde", serde(rename = "DRLC") )]
69480	CodeDRLC,
69481	#[cfg_attr( feature = "derive_serde", serde(rename = "EMID") )]
69482	CodeEMID,
69483	#[cfg_attr( feature = "derive_serde", serde(rename = "NINV") )]
69484	CodeNINV,
69485	#[cfg_attr( feature = "derive_serde", serde(rename = "INCL") )]
69486	CodeINCL,
69487	#[cfg_attr( feature = "derive_serde", serde(rename = "GIIN") )]
69488	CodeGIIN,
69489}
69490
69491impl PartyIdentificationType7Code {
69492	pub fn validate(&self) -> Result<(), ValidationError> {
69493		Ok(())
69494	}
69495}
69496
69497
69498// PartyLockStatus1 ...
69499#[cfg_attr(feature = "derive_debug", derive(Debug))]
69500#[cfg_attr(feature = "derive_default", derive(Default))]
69501#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69502#[cfg_attr(feature = "derive_clone", derive(Clone))]
69503#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69504pub struct PartyLockStatus1 {
69505	#[cfg_attr( feature = "derive_serde", serde(rename = "VldFr", skip_serializing_if = "Option::is_none") )]
69506	pub vld_fr: Option<String>,
69507	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
69508	pub sts: LockStatus1Code,
69509	#[cfg_attr( feature = "derive_serde", serde(rename = "LckRsn", skip_serializing_if = "Option::is_none") )]
69510	pub lck_rsn: Option<Vec<String>>,
69511}
69512
69513impl PartyLockStatus1 {
69514	pub fn validate(&self) -> Result<(), ValidationError> {
69515		self.sts.validate()?;
69516		if let Some(ref vec) = self.lck_rsn {
69517			for item in vec {
69518				if item.chars().count() < 1 {
69519					return Err(ValidationError::new(1001, "lck_rsn is shorter than the minimum length of 1".to_string()));
69520				}
69521				if item.chars().count() > 35 {
69522					return Err(ValidationError::new(1002, "lck_rsn exceeds the maximum length of 35".to_string()));
69523				}
69524			}
69525		}
69526		Ok(())
69527	}
69528}
69529
69530
69531// PartyModification3 ...
69532#[cfg_attr(feature = "derive_debug", derive(Debug))]
69533#[cfg_attr(feature = "derive_default", derive(Default))]
69534#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69535#[cfg_attr(feature = "derive_clone", derive(Clone))]
69536#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69537pub struct PartyModification3 {
69538	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
69539	pub mod_cd: Option<Modification1Code>,
69540	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId") )]
69541	pub pty_id: PartyIdentification274,
69542}
69543
69544impl PartyModification3 {
69545	pub fn validate(&self) -> Result<(), ValidationError> {
69546		if let Some(ref val) = self.mod_cd { val.validate()? }
69547		self.pty_id.validate()?;
69548		Ok(())
69549	}
69550}
69551
69552
69553// PartyName3 ...
69554#[cfg_attr(feature = "derive_debug", derive(Debug))]
69555#[cfg_attr(feature = "derive_default", derive(Default))]
69556#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69557#[cfg_attr(feature = "derive_clone", derive(Clone))]
69558#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69559pub struct PartyName3 {
69560	#[cfg_attr( feature = "derive_serde", serde(rename = "VldFr", skip_serializing_if = "Option::is_none") )]
69561	pub vld_fr: Option<String>,
69562	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
69563	pub nm: Option<String>,
69564	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtNm", skip_serializing_if = "Option::is_none") )]
69565	pub shrt_nm: Option<String>,
69566}
69567
69568impl PartyName3 {
69569	pub fn validate(&self) -> Result<(), ValidationError> {
69570		if let Some(ref val) = self.nm {
69571			if val.chars().count() < 1 {
69572				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
69573			}
69574			if val.chars().count() > 350 {
69575				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
69576			}
69577		}
69578		if let Some(ref val) = self.shrt_nm {
69579			if val.chars().count() < 1 {
69580				return Err(ValidationError::new(1001, "shrt_nm is shorter than the minimum length of 1".to_string()));
69581			}
69582			if val.chars().count() > 35 {
69583				return Err(ValidationError::new(1002, "shrt_nm exceeds the maximum length of 35".to_string()));
69584			}
69585		}
69586		Ok(())
69587	}
69588}
69589
69590
69591// PartyName4 ...
69592#[cfg_attr(feature = "derive_debug", derive(Debug))]
69593#[cfg_attr(feature = "derive_default", derive(Default))]
69594#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69595#[cfg_attr(feature = "derive_clone", derive(Clone))]
69596#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69597pub struct PartyName4 {
69598	#[cfg_attr( feature = "derive_serde", serde(rename = "VldFr", skip_serializing_if = "Option::is_none") )]
69599	pub vld_fr: Option<String>,
69600	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
69601	pub nm: String,
69602	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtNm", skip_serializing_if = "Option::is_none") )]
69603	pub shrt_nm: Option<String>,
69604}
69605
69606impl PartyName4 {
69607	pub fn validate(&self) -> Result<(), ValidationError> {
69608		if self.nm.chars().count() < 1 {
69609			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
69610		}
69611		if self.nm.chars().count() > 350 {
69612			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
69613		}
69614		if let Some(ref val) = self.shrt_nm {
69615			if val.chars().count() < 1 {
69616				return Err(ValidationError::new(1001, "shrt_nm is shorter than the minimum length of 1".to_string()));
69617			}
69618			if val.chars().count() > 35 {
69619				return Err(ValidationError::new(1002, "shrt_nm exceeds the maximum length of 35".to_string()));
69620			}
69621		}
69622		Ok(())
69623	}
69624}
69625
69626
69627// PartyNatureType1Code ...
69628#[cfg_attr(feature = "derive_debug", derive(Debug))]
69629#[cfg_attr(feature = "derive_default", derive(Default))]
69630#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69631#[cfg_attr(feature = "derive_clone", derive(Clone))]
69632#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69633pub enum PartyNatureType1Code {
69634	#[cfg_attr(feature = "derive_default", default)]
69635	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
69636	CodeOTHR,
69637	#[cfg_attr( feature = "derive_serde", serde(rename = "NFIN") )]
69638	CodeNFIN,
69639	#[cfg_attr( feature = "derive_serde", serde(rename = "FIIN") )]
69640	CodeFIIN,
69641	#[cfg_attr( feature = "derive_serde", serde(rename = "CCPS") )]
69642	CodeCCPS,
69643}
69644
69645impl PartyNatureType1Code {
69646	pub fn validate(&self) -> Result<(), ValidationError> {
69647		Ok(())
69648	}
69649}
69650
69651
69652// PartyOrBusinessError4Choice ...
69653#[cfg_attr(feature = "derive_debug", derive(Debug))]
69654#[cfg_attr(feature = "derive_default", derive(Default))]
69655#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69656#[cfg_attr(feature = "derive_clone", derive(Clone))]
69657#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69658pub struct PartyOrBusinessError4Choice {
69659	#[cfg_attr( feature = "derive_serde", serde(rename = "SysPty", skip_serializing_if = "Option::is_none") )]
69660	pub sys_pty: Option<SystemParty6>,
69661	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
69662	pub biz_err: Option<Vec<ErrorHandling4>>,
69663}
69664
69665impl PartyOrBusinessError4Choice {
69666	pub fn validate(&self) -> Result<(), ValidationError> {
69667		if let Some(ref val) = self.sys_pty { val.validate()? }
69668		if let Some(ref vec) = self.biz_err { for item in vec { item.validate()? } }
69669		Ok(())
69670	}
69671}
69672
69673
69674// PartyOrCurrency1Choice ...
69675#[cfg_attr(feature = "derive_debug", derive(Debug))]
69676#[cfg_attr(feature = "derive_default", derive(Default))]
69677#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69678#[cfg_attr(feature = "derive_clone", derive(Clone))]
69679#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69680pub struct PartyOrCurrency1Choice {
69681	#[cfg_attr( feature = "derive_serde", serde(rename = "Dpstry", skip_serializing_if = "Option::is_none") )]
69682	pub dpstry: Option<PartyIdentification63>,
69683	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcy", skip_serializing_if = "Option::is_none") )]
69684	pub sttlm_ccy: Option<String>,
69685}
69686
69687impl PartyOrCurrency1Choice {
69688	pub fn validate(&self) -> Result<(), ValidationError> {
69689		if let Some(ref val) = self.dpstry { val.validate()? }
69690		if let Some(ref val) = self.sttlm_ccy {
69691			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
69692			if !pattern.is_match(val) {
69693				return Err(ValidationError::new(1005, "sttlm_ccy does not match the required pattern".to_string()));
69694			}
69695		}
69696		Ok(())
69697	}
69698}
69699
69700
69701// PartyOrGroup3Choice ...
69702#[cfg_attr(feature = "derive_debug", derive(Debug))]
69703#[cfg_attr(feature = "derive_default", derive(Default))]
69704#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69705#[cfg_attr(feature = "derive_clone", derive(Clone))]
69706#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69707pub struct PartyOrGroup3Choice {
69708	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpId", skip_serializing_if = "Option::is_none") )]
69709	pub grp_id: Option<String>,
69710	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty", skip_serializing_if = "Option::is_none") )]
69711	pub pty: Option<PartyAndCertificate6>,
69712}
69713
69714impl PartyOrGroup3Choice {
69715	pub fn validate(&self) -> Result<(), ValidationError> {
69716		if let Some(ref val) = self.grp_id {
69717			if val.chars().count() < 1 {
69718				return Err(ValidationError::new(1001, "grp_id is shorter than the minimum length of 1".to_string()));
69719			}
69720			if val.chars().count() > 4 {
69721				return Err(ValidationError::new(1002, "grp_id exceeds the maximum length of 4".to_string()));
69722			}
69723			let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
69724			if !pattern.is_match(val) {
69725				return Err(ValidationError::new(1005, "grp_id does not match the required pattern".to_string()));
69726			}
69727		}
69728		if let Some(ref val) = self.pty { val.validate()? }
69729		Ok(())
69730	}
69731}
69732
69733
69734// PartyOrOperationalError4Choice ...
69735#[cfg_attr(feature = "derive_debug", derive(Debug))]
69736#[cfg_attr(feature = "derive_default", derive(Default))]
69737#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69738#[cfg_attr(feature = "derive_clone", derive(Clone))]
69739#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69740pub struct PartyOrOperationalError4Choice {
69741	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyRpt", skip_serializing_if = "Option::is_none") )]
69742	pub pty_rpt: Option<Vec<PartyReport4>>,
69743	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
69744	pub oprl_err: Option<Vec<ErrorHandling5>>,
69745}
69746
69747impl PartyOrOperationalError4Choice {
69748	pub fn validate(&self) -> Result<(), ValidationError> {
69749		if let Some(ref vec) = self.pty_rpt { for item in vec { item.validate()? } }
69750		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
69751		Ok(())
69752	}
69753}
69754
69755
69756// PartyProfileInformation5 ...
69757#[cfg_attr(feature = "derive_debug", derive(Debug))]
69758#[cfg_attr(feature = "derive_default", derive(Default))]
69759#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69760#[cfg_attr(feature = "derive_clone", derive(Clone))]
69761#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69762pub struct PartyProfileInformation5 {
69763	#[cfg_attr( feature = "derive_serde", serde(rename = "CertfctnInd", skip_serializing_if = "Option::is_none") )]
69764	pub certfctn_ind: Option<bool>,
69765	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtngPty", skip_serializing_if = "Option::is_none") )]
69766	pub vldtng_pty: Option<String>,
69767	#[cfg_attr( feature = "derive_serde", serde(rename = "ChckngPty", skip_serializing_if = "Option::is_none") )]
69768	pub chckng_pty: Option<String>,
69769	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnsblPty", skip_serializing_if = "Option::is_none") )]
69770	pub rspnsbl_pty: Option<String>,
69771	#[cfg_attr( feature = "derive_serde", serde(rename = "CertTp", skip_serializing_if = "Option::is_none") )]
69772	pub cert_tp: Option<CertificationType1Choice>,
69773	#[cfg_attr( feature = "derive_serde", serde(rename = "ChckngDt", skip_serializing_if = "Option::is_none") )]
69774	pub chckng_dt: Option<String>,
69775	#[cfg_attr( feature = "derive_serde", serde(rename = "ChckngFrqcy", skip_serializing_if = "Option::is_none") )]
69776	pub chckng_frqcy: Option<EventFrequency1Code>,
69777	#[cfg_attr( feature = "derive_serde", serde(rename = "NxtRvsnDt", skip_serializing_if = "Option::is_none") )]
69778	pub nxt_rvsn_dt: Option<String>,
69779	#[cfg_attr( feature = "derive_serde", serde(rename = "SlryRg", skip_serializing_if = "Option::is_none") )]
69780	pub slry_rg: Option<String>,
69781	#[cfg_attr( feature = "derive_serde", serde(rename = "SrcOfWlth", skip_serializing_if = "Option::is_none") )]
69782	pub src_of_wlth: Option<String>,
69783	#[cfg_attr( feature = "derive_serde", serde(rename = "CstmrCndctClssfctn", skip_serializing_if = "Option::is_none") )]
69784	pub cstmr_cndct_clssfctn: Option<CustomerConductClassification1Choice>,
69785	#[cfg_attr( feature = "derive_serde", serde(rename = "RskLvl", skip_serializing_if = "Option::is_none") )]
69786	pub rsk_lvl: Option<RiskLevel2Choice>,
69787	#[cfg_attr( feature = "derive_serde", serde(rename = "KnowYourCstmrChckTp", skip_serializing_if = "Option::is_none") )]
69788	pub know_your_cstmr_chck_tp: Option<KYCCheckType1Choice>,
69789	#[cfg_attr( feature = "derive_serde", serde(rename = "KnowYourCstmrDBChck", skip_serializing_if = "Option::is_none") )]
69790	pub know_your_cstmr_db_chck: Option<DataBaseCheck1>,
69791}
69792
69793impl PartyProfileInformation5 {
69794	pub fn validate(&self) -> Result<(), ValidationError> {
69795		if let Some(ref val) = self.vldtng_pty {
69796			if val.chars().count() < 1 {
69797				return Err(ValidationError::new(1001, "vldtng_pty is shorter than the minimum length of 1".to_string()));
69798			}
69799			if val.chars().count() > 140 {
69800				return Err(ValidationError::new(1002, "vldtng_pty exceeds the maximum length of 140".to_string()));
69801			}
69802		}
69803		if let Some(ref val) = self.chckng_pty {
69804			if val.chars().count() < 1 {
69805				return Err(ValidationError::new(1001, "chckng_pty is shorter than the minimum length of 1".to_string()));
69806			}
69807			if val.chars().count() > 140 {
69808				return Err(ValidationError::new(1002, "chckng_pty exceeds the maximum length of 140".to_string()));
69809			}
69810		}
69811		if let Some(ref val) = self.rspnsbl_pty {
69812			if val.chars().count() < 1 {
69813				return Err(ValidationError::new(1001, "rspnsbl_pty is shorter than the minimum length of 1".to_string()));
69814			}
69815			if val.chars().count() > 140 {
69816				return Err(ValidationError::new(1002, "rspnsbl_pty exceeds the maximum length of 140".to_string()));
69817			}
69818		}
69819		if let Some(ref val) = self.cert_tp { val.validate()? }
69820		if let Some(ref val) = self.chckng_frqcy { val.validate()? }
69821		if let Some(ref val) = self.slry_rg {
69822			if val.chars().count() < 1 {
69823				return Err(ValidationError::new(1001, "slry_rg is shorter than the minimum length of 1".to_string()));
69824			}
69825			if val.chars().count() > 35 {
69826				return Err(ValidationError::new(1002, "slry_rg exceeds the maximum length of 35".to_string()));
69827			}
69828		}
69829		if let Some(ref val) = self.src_of_wlth {
69830			if val.chars().count() < 1 {
69831				return Err(ValidationError::new(1001, "src_of_wlth is shorter than the minimum length of 1".to_string()));
69832			}
69833			if val.chars().count() > 140 {
69834				return Err(ValidationError::new(1002, "src_of_wlth exceeds the maximum length of 140".to_string()));
69835			}
69836		}
69837		if let Some(ref val) = self.cstmr_cndct_clssfctn { val.validate()? }
69838		if let Some(ref val) = self.rsk_lvl { val.validate()? }
69839		if let Some(ref val) = self.know_your_cstmr_chck_tp { val.validate()? }
69840		if let Some(ref val) = self.know_your_cstmr_db_chck { val.validate()? }
69841		Ok(())
69842	}
69843}
69844
69845
69846// PartyReferenceDataChange3 ...
69847#[cfg_attr(feature = "derive_debug", derive(Debug))]
69848#[cfg_attr(feature = "derive_default", derive(Default))]
69849#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69850#[cfg_attr(feature = "derive_clone", derive(Clone))]
69851#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69852pub struct PartyReferenceDataChange3 {
69853	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId") )]
69854	pub pty_id: SystemPartyIdentification8,
69855	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcrd") )]
69856	pub rcrd: Vec<UpdateLogPartyRecord2Choice>,
69857	#[cfg_attr( feature = "derive_serde", serde(rename = "OprTmStmp") )]
69858	pub opr_tm_stmp: String,
69859}
69860
69861impl PartyReferenceDataChange3 {
69862	pub fn validate(&self) -> Result<(), ValidationError> {
69863		self.pty_id.validate()?;
69864		for item in &self.rcrd { item.validate()? }
69865		Ok(())
69866	}
69867}
69868
69869
69870// PartyReport1Choice ...
69871#[cfg_attr(feature = "derive_debug", derive(Debug))]
69872#[cfg_attr(feature = "derive_default", derive(Default))]
69873#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69874#[cfg_attr(feature = "derive_clone", derive(Clone))]
69875#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69876pub struct PartyReport1Choice {
69877	#[cfg_attr( feature = "derive_serde", serde(rename = "Upd", skip_serializing_if = "Option::is_none") )]
69878	pub upd: Option<PartyUpdate1>,
69879	#[cfg_attr( feature = "derive_serde", serde(rename = "Cxl", skip_serializing_if = "Option::is_none") )]
69880	pub cxl: Option<PartyCancellation1>,
69881}
69882
69883impl PartyReport1Choice {
69884	pub fn validate(&self) -> Result<(), ValidationError> {
69885		if let Some(ref val) = self.upd { val.validate()? }
69886		if let Some(ref val) = self.cxl { val.validate()? }
69887		Ok(())
69888	}
69889}
69890
69891
69892// PartyReport4 ...
69893#[cfg_attr(feature = "derive_debug", derive(Debug))]
69894#[cfg_attr(feature = "derive_default", derive(Default))]
69895#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69896#[cfg_attr(feature = "derive_clone", derive(Clone))]
69897#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69898pub struct PartyReport4 {
69899	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId") )]
69900	pub pty_id: SystemPartyIdentification8,
69901	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyOrErr") )]
69902	pub pty_or_err: PartyOrBusinessError4Choice,
69903}
69904
69905impl PartyReport4 {
69906	pub fn validate(&self) -> Result<(), ValidationError> {
69907		self.pty_id.validate()?;
69908		self.pty_or_err.validate()?;
69909		Ok(())
69910	}
69911}
69912
69913
69914// PartyRole1Code ...
69915#[cfg_attr(feature = "derive_debug", derive(Debug))]
69916#[cfg_attr(feature = "derive_default", derive(Default))]
69917#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69918#[cfg_attr(feature = "derive_clone", derive(Clone))]
69919#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69920pub enum PartyRole1Code {
69921	#[cfg_attr(feature = "derive_default", default)]
69922	#[cfg_attr( feature = "derive_serde", serde(rename = "CUST") )]
69923	CodeCUST,
69924	#[cfg_attr( feature = "derive_serde", serde(rename = "INVS") )]
69925	CodeINVS,
69926}
69927
69928impl PartyRole1Code {
69929	pub fn validate(&self) -> Result<(), ValidationError> {
69930		Ok(())
69931	}
69932}
69933
69934
69935// PartyRole2Choice ...
69936#[cfg_attr(feature = "derive_debug", derive(Debug))]
69937#[cfg_attr(feature = "derive_default", derive(Default))]
69938#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69939#[cfg_attr(feature = "derive_clone", derive(Clone))]
69940#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69941pub struct PartyRole2Choice {
69942	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
69943	pub cd: Option<InvestmentFundRole6Code>,
69944	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
69945	pub prtry: Option<GenericIdentification47>,
69946}
69947
69948impl PartyRole2Choice {
69949	pub fn validate(&self) -> Result<(), ValidationError> {
69950		if let Some(ref val) = self.cd { val.validate()? }
69951		if let Some(ref val) = self.prtry { val.validate()? }
69952		Ok(())
69953	}
69954}
69955
69956
69957// PartyRole4Choice ...
69958#[cfg_attr(feature = "derive_debug", derive(Debug))]
69959#[cfg_attr(feature = "derive_default", derive(Default))]
69960#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69961#[cfg_attr(feature = "derive_clone", derive(Clone))]
69962#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69963pub struct PartyRole4Choice {
69964	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
69965	pub cd: Option<InvestmentFundRole7Code>,
69966	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
69967	pub prtry: Option<GenericIdentification47>,
69968}
69969
69970impl PartyRole4Choice {
69971	pub fn validate(&self) -> Result<(), ValidationError> {
69972		if let Some(ref val) = self.cd { val.validate()? }
69973		if let Some(ref val) = self.prtry { val.validate()? }
69974		Ok(())
69975	}
69976}
69977
69978
69979// PartyRole5Choice ...
69980#[cfg_attr(feature = "derive_debug", derive(Debug))]
69981#[cfg_attr(feature = "derive_default", derive(Default))]
69982#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
69983#[cfg_attr(feature = "derive_clone", derive(Clone))]
69984#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
69985pub struct PartyRole5Choice {
69986	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
69987	pub cd: Option<PartyRole1Code>,
69988	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
69989	pub prtry: Option<GenericIdentification47>,
69990}
69991
69992impl PartyRole5Choice {
69993	pub fn validate(&self) -> Result<(), ValidationError> {
69994		if let Some(ref val) = self.cd { val.validate()? }
69995		if let Some(ref val) = self.prtry { val.validate()? }
69996		Ok(())
69997	}
69998}
69999
70000
70001// PartyStatement3 ...
70002#[cfg_attr(feature = "derive_debug", derive(Debug))]
70003#[cfg_attr(feature = "derive_default", derive(Default))]
70004#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70005#[cfg_attr(feature = "derive_clone", derive(Clone))]
70006#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70007pub struct PartyStatement3 {
70008	#[cfg_attr( feature = "derive_serde", serde(rename = "SysDt") )]
70009	pub sys_dt: String,
70010	#[cfg_attr( feature = "derive_serde", serde(rename = "Chng", skip_serializing_if = "Option::is_none") )]
70011	pub chng: Option<Vec<PartyReferenceDataChange3>>,
70012}
70013
70014impl PartyStatement3 {
70015	pub fn validate(&self) -> Result<(), ValidationError> {
70016		if let Some(ref vec) = self.chng { for item in vec { item.validate()? } }
70017		Ok(())
70018	}
70019}
70020
70021
70022// PartyStatus2 ...
70023#[cfg_attr(feature = "derive_debug", derive(Debug))]
70024#[cfg_attr(feature = "derive_default", derive(Default))]
70025#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70026#[cfg_attr(feature = "derive_clone", derive(Clone))]
70027#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70028pub struct PartyStatus2 {
70029	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
70030	pub sts: Status6Code,
70031	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsn", skip_serializing_if = "Option::is_none") )]
70032	pub sts_rsn: Option<Vec<StatusReasonInformation10>>,
70033	#[cfg_attr( feature = "derive_serde", serde(rename = "SysPtyId", skip_serializing_if = "Option::is_none") )]
70034	pub sys_pty_id: Option<SystemPartyIdentification8>,
70035}
70036
70037impl PartyStatus2 {
70038	pub fn validate(&self) -> Result<(), ValidationError> {
70039		self.sts.validate()?;
70040		if let Some(ref vec) = self.sts_rsn { for item in vec { item.validate()? } }
70041		if let Some(ref val) = self.sys_pty_id { val.validate()? }
70042		Ok(())
70043	}
70044}
70045
70046
70047// PartyType3Code ...
70048#[cfg_attr(feature = "derive_debug", derive(Debug))]
70049#[cfg_attr(feature = "derive_default", derive(Default))]
70050#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70051#[cfg_attr(feature = "derive_clone", derive(Clone))]
70052#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70053pub enum PartyType3Code {
70054	#[cfg_attr(feature = "derive_default", default)]
70055	#[cfg_attr( feature = "derive_serde", serde(rename = "OPOI") )]
70056	CodeOPOI,
70057	#[cfg_attr( feature = "derive_serde", serde(rename = "MERC") )]
70058	CodeMERC,
70059	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCP") )]
70060	CodeACCP,
70061	#[cfg_attr( feature = "derive_serde", serde(rename = "ITAG") )]
70062	CodeITAG,
70063	#[cfg_attr( feature = "derive_serde", serde(rename = "ACQR") )]
70064	CodeACQR,
70065	#[cfg_attr( feature = "derive_serde", serde(rename = "CISS") )]
70066	CodeCISS,
70067	#[cfg_attr( feature = "derive_serde", serde(rename = "DLIS") )]
70068	CodeDLIS,
70069}
70070
70071impl PartyType3Code {
70072	pub fn validate(&self) -> Result<(), ValidationError> {
70073		Ok(())
70074	}
70075}
70076
70077
70078// PartyType4Code ...
70079#[cfg_attr(feature = "derive_debug", derive(Debug))]
70080#[cfg_attr(feature = "derive_default", derive(Default))]
70081#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70082#[cfg_attr(feature = "derive_clone", derive(Clone))]
70083#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70084pub enum PartyType4Code {
70085	#[cfg_attr(feature = "derive_default", default)]
70086	#[cfg_attr( feature = "derive_serde", serde(rename = "MERC") )]
70087	CodeMERC,
70088	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCP") )]
70089	CodeACCP,
70090	#[cfg_attr( feature = "derive_serde", serde(rename = "ITAG") )]
70091	CodeITAG,
70092	#[cfg_attr( feature = "derive_serde", serde(rename = "ACQR") )]
70093	CodeACQR,
70094	#[cfg_attr( feature = "derive_serde", serde(rename = "CISS") )]
70095	CodeCISS,
70096	#[cfg_attr( feature = "derive_serde", serde(rename = "TAXH") )]
70097	CodeTAXH,
70098}
70099
70100impl PartyType4Code {
70101	pub fn validate(&self) -> Result<(), ValidationError> {
70102		Ok(())
70103	}
70104}
70105
70106
70107// PartyUpdate1 ...
70108#[cfg_attr(feature = "derive_debug", derive(Debug))]
70109#[cfg_attr(feature = "derive_default", derive(Default))]
70110#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70111#[cfg_attr(feature = "derive_clone", derive(Clone))]
70112#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70113pub struct PartyUpdate1 {
70114	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
70115	pub tech_rcrd_id: Option<String>,
70116	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
70117	pub id: PartyIdentification136,
70118	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsId", skip_serializing_if = "Option::is_none") )]
70119	pub prvs_id: Option<PartyIdentification136>,
70120	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr") )]
70121	pub othr: PartyDetail1,
70122	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
70123	pub sts: Vec<StatusDetail1>,
70124	#[cfg_attr( feature = "derive_serde", serde(rename = "TechVldtyPrd", skip_serializing_if = "Option::is_none") )]
70125	pub tech_vldty_prd: Option<Period4Choice>,
70126	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
70127	pub splmtry_data: Option<Vec<SupplementaryData1>>,
70128}
70129
70130impl PartyUpdate1 {
70131	pub fn validate(&self) -> Result<(), ValidationError> {
70132		if let Some(ref val) = self.tech_rcrd_id {
70133			if val.chars().count() < 1 {
70134				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
70135			}
70136			if val.chars().count() > 35 {
70137				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
70138			}
70139		}
70140		self.id.validate()?;
70141		if let Some(ref val) = self.prvs_id { val.validate()? }
70142		self.othr.validate()?;
70143		for item in &self.sts { item.validate()? }
70144		if let Some(ref val) = self.tech_vldty_prd { val.validate()? }
70145		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
70146		Ok(())
70147	}
70148}
70149
70150
70151// PassiveOrAgressiveType1Code ...
70152#[cfg_attr(feature = "derive_debug", derive(Debug))]
70153#[cfg_attr(feature = "derive_default", derive(Default))]
70154#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70155#[cfg_attr(feature = "derive_clone", derive(Clone))]
70156#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70157pub enum PassiveOrAgressiveType1Code {
70158	#[cfg_attr(feature = "derive_default", default)]
70159	#[cfg_attr( feature = "derive_serde", serde(rename = "AGRE") )]
70160	CodeAGRE,
70161	#[cfg_attr( feature = "derive_serde", serde(rename = "PASV") )]
70162	CodePASV,
70163}
70164
70165impl PassiveOrAgressiveType1Code {
70166	pub fn validate(&self) -> Result<(), ValidationError> {
70167		Ok(())
70168	}
70169}
70170
70171
70172// PayInCallItem ...
70173#[cfg_attr(feature = "derive_debug", derive(Debug))]
70174#[cfg_attr(feature = "derive_default", derive(Default))]
70175#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70176#[cfg_attr(feature = "derive_clone", derive(Clone))]
70177#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70178pub struct PayInCallItem {
70179	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
70180	pub amt: ActiveOrHistoricCurrencyAndAmount,
70181}
70182
70183impl PayInCallItem {
70184	pub fn validate(&self) -> Result<(), ValidationError> {
70185		self.amt.validate()?;
70186		Ok(())
70187	}
70188}
70189
70190
70191// PayInFactors1 ...
70192#[cfg_attr(feature = "derive_debug", derive(Debug))]
70193#[cfg_attr(feature = "derive_default", derive(Default))]
70194#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70195#[cfg_attr(feature = "derive_clone", derive(Clone))]
70196#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70197pub struct PayInFactors1 {
70198	#[cfg_attr( feature = "derive_serde", serde(rename = "AggtShrtPosLmt") )]
70199	pub aggt_shrt_pos_lmt: ActiveCurrencyAndAmount,
70200	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyFctrs") )]
70201	pub ccy_fctrs: Vec<CurrencyFactors1>,
70202}
70203
70204impl PayInFactors1 {
70205	pub fn validate(&self) -> Result<(), ValidationError> {
70206		self.aggt_shrt_pos_lmt.validate()?;
70207		for item in &self.ccy_fctrs { item.validate()? }
70208		Ok(())
70209	}
70210}
70211
70212
70213// PayInScheduleItems1 ...
70214#[cfg_attr(feature = "derive_debug", derive(Debug))]
70215#[cfg_attr(feature = "derive_default", derive(Default))]
70216#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70217#[cfg_attr(feature = "derive_clone", derive(Clone))]
70218#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70219pub struct PayInScheduleItems1 {
70220	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
70221	pub amt: ActiveCurrencyAndAmount,
70222	#[cfg_attr( feature = "derive_serde", serde(rename = "Ddln") )]
70223	pub ddln: String,
70224}
70225
70226impl PayInScheduleItems1 {
70227	pub fn validate(&self) -> Result<(), ValidationError> {
70228		self.amt.validate()?;
70229		Ok(())
70230	}
70231}
70232
70233
70234// PayloadData2 ...
70235#[cfg_attr(feature = "derive_debug", derive(Debug))]
70236#[cfg_attr(feature = "derive_default", derive(Default))]
70237#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70238#[cfg_attr(feature = "derive_clone", derive(Clone))]
70239#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70240pub struct PayloadData2 {
70241	#[cfg_attr( feature = "derive_serde", serde(rename = "PyldIdr") )]
70242	pub pyld_idr: String,
70243	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtAndTm") )]
70244	pub cre_dt_and_tm: String,
70245	#[cfg_attr( feature = "derive_serde", serde(rename = "PssblDplctFlg", skip_serializing_if = "Option::is_none") )]
70246	pub pssbl_dplct_flg: Option<bool>,
70247}
70248
70249impl PayloadData2 {
70250	pub fn validate(&self) -> Result<(), ValidationError> {
70251		if self.pyld_idr.chars().count() < 1 {
70252			return Err(ValidationError::new(1001, "pyld_idr is shorter than the minimum length of 1".to_string()));
70253		}
70254		if self.pyld_idr.chars().count() > 35 {
70255			return Err(ValidationError::new(1002, "pyld_idr exceeds the maximum length of 35".to_string()));
70256		}
70257		Ok(())
70258	}
70259}
70260
70261
70262// PayloadDescription2 ...
70263#[cfg_attr(feature = "derive_debug", derive(Debug))]
70264#[cfg_attr(feature = "derive_default", derive(Default))]
70265#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70266#[cfg_attr(feature = "derive_clone", derive(Clone))]
70267#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70268pub struct PayloadDescription2 {
70269	#[cfg_attr( feature = "derive_serde", serde(rename = "PyldData") )]
70270	pub pyld_data: PayloadData2,
70271	#[cfg_attr( feature = "derive_serde", serde(rename = "ApplSpcfcs", skip_serializing_if = "Option::is_none") )]
70272	pub appl_spcfcs: Option<ApplicationSpecifics1>,
70273	#[cfg_attr( feature = "derive_serde", serde(rename = "PyldTp") )]
70274	pub pyld_tp: String,
70275	#[cfg_attr( feature = "derive_serde", serde(rename = "MnfstData", skip_serializing_if = "Option::is_none") )]
70276	pub mnfst_data: Option<Vec<ManifestData2>>,
70277}
70278
70279impl PayloadDescription2 {
70280	pub fn validate(&self) -> Result<(), ValidationError> {
70281		self.pyld_data.validate()?;
70282		if let Some(ref val) = self.appl_spcfcs { val.validate()? }
70283		if self.pyld_tp.chars().count() < 1 {
70284			return Err(ValidationError::new(1001, "pyld_tp is shorter than the minimum length of 1".to_string()));
70285		}
70286		if self.pyld_tp.chars().count() > 256 {
70287			return Err(ValidationError::new(1002, "pyld_tp exceeds the maximum length of 256".to_string()));
70288		}
70289		if let Some(ref vec) = self.mnfst_data { for item in vec { item.validate()? } }
70290		Ok(())
70291	}
70292}
70293
70294
70295// PaymentAccount4 ...
70296#[cfg_attr(feature = "derive_debug", derive(Debug))]
70297#[cfg_attr(feature = "derive_default", derive(Default))]
70298#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70299#[cfg_attr(feature = "derive_clone", derive(Clone))]
70300#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70301pub struct PaymentAccount4 {
70302	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
70303	pub ccy: String,
70304	#[cfg_attr( feature = "derive_serde", serde(rename = "NetPmt") )]
70305	pub net_pmt: AmountAndDirection86,
70306	#[cfg_attr( feature = "derive_serde", serde(rename = "GrssCdts") )]
70307	pub grss_cdts: f64,
70308	#[cfg_attr( feature = "derive_serde", serde(rename = "GrssDbts") )]
70309	pub grss_dbts: f64,
70310	#[cfg_attr( feature = "derive_serde", serde(rename = "LatePmtConf") )]
70311	pub late_pmt_conf: String,
70312}
70313
70314impl PaymentAccount4 {
70315	pub fn validate(&self) -> Result<(), ValidationError> {
70316		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
70317		if !pattern.is_match(&self.ccy) {
70318			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
70319		}
70320		self.net_pmt.validate()?;
70321		let pattern = Regex::new("[0-9]{1,10}").unwrap();
70322		if !pattern.is_match(&self.late_pmt_conf) {
70323			return Err(ValidationError::new(1005, "late_pmt_conf does not match the required pattern".to_string()));
70324		}
70325		Ok(())
70326	}
70327}
70328
70329
70330// PaymentCancellationReason6 ...
70331#[cfg_attr(feature = "derive_debug", derive(Debug))]
70332#[cfg_attr(feature = "derive_default", derive(Default))]
70333#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70334#[cfg_attr(feature = "derive_clone", derive(Clone))]
70335#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70336pub struct PaymentCancellationReason6 {
70337	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
70338	pub orgtr: Option<PartyIdentification272>,
70339	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
70340	pub rsn: Option<CancellationReason33Choice>,
70341	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
70342	pub addtl_inf: Option<Vec<String>>,
70343}
70344
70345impl PaymentCancellationReason6 {
70346	pub fn validate(&self) -> Result<(), ValidationError> {
70347		if let Some(ref val) = self.orgtr { val.validate()? }
70348		if let Some(ref val) = self.rsn { val.validate()? }
70349		if let Some(ref vec) = self.addtl_inf {
70350			for item in vec {
70351				if item.chars().count() < 1 {
70352					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
70353				}
70354				if item.chars().count() > 105 {
70355					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
70356				}
70357			}
70358		}
70359		Ok(())
70360	}
70361}
70362
70363
70364// PaymentCard29 ...
70365#[cfg_attr(feature = "derive_debug", derive(Debug))]
70366#[cfg_attr(feature = "derive_default", derive(Default))]
70367#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70368#[cfg_attr(feature = "derive_clone", derive(Clone))]
70369#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70370pub struct PaymentCard29 {
70371	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
70372	pub tp: CardType1Code,
70373	#[cfg_attr( feature = "derive_serde", serde(rename = "Nb") )]
70374	pub nb: String,
70375	#[cfg_attr( feature = "derive_serde", serde(rename = "HldrNm") )]
70376	pub hldr_nm: String,
70377	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
70378	pub start_dt: Option<String>,
70379	#[cfg_attr( feature = "derive_serde", serde(rename = "XpryDt") )]
70380	pub xpry_dt: String,
70381	#[cfg_attr( feature = "derive_serde", serde(rename = "CardIssrNm", skip_serializing_if = "Option::is_none") )]
70382	pub card_issr_nm: Option<String>,
70383	#[cfg_attr( feature = "derive_serde", serde(rename = "CardIssrId", skip_serializing_if = "Option::is_none") )]
70384	pub card_issr_id: Option<PartyIdentification125Choice>,
70385	#[cfg_attr( feature = "derive_serde", serde(rename = "SctyCd", skip_serializing_if = "Option::is_none") )]
70386	pub scty_cd: Option<String>,
70387	#[cfg_attr( feature = "derive_serde", serde(rename = "SeqNb", skip_serializing_if = "Option::is_none") )]
70388	pub seq_nb: Option<String>,
70389}
70390
70391impl PaymentCard29 {
70392	pub fn validate(&self) -> Result<(), ValidationError> {
70393		self.tp.validate()?;
70394		if self.nb.chars().count() < 1 {
70395			return Err(ValidationError::new(1001, "nb is shorter than the minimum length of 1".to_string()));
70396		}
70397		if self.nb.chars().count() > 35 {
70398			return Err(ValidationError::new(1002, "nb exceeds the maximum length of 35".to_string()));
70399		}
70400		if self.hldr_nm.chars().count() < 1 {
70401			return Err(ValidationError::new(1001, "hldr_nm is shorter than the minimum length of 1".to_string()));
70402		}
70403		if self.hldr_nm.chars().count() > 35 {
70404			return Err(ValidationError::new(1002, "hldr_nm exceeds the maximum length of 35".to_string()));
70405		}
70406		if let Some(ref val) = self.card_issr_nm {
70407			if val.chars().count() < 1 {
70408				return Err(ValidationError::new(1001, "card_issr_nm is shorter than the minimum length of 1".to_string()));
70409			}
70410			if val.chars().count() > 35 {
70411				return Err(ValidationError::new(1002, "card_issr_nm exceeds the maximum length of 35".to_string()));
70412			}
70413		}
70414		if let Some(ref val) = self.card_issr_id { val.validate()? }
70415		if let Some(ref val) = self.scty_cd {
70416			if val.chars().count() < 1 {
70417				return Err(ValidationError::new(1001, "scty_cd is shorter than the minimum length of 1".to_string()));
70418			}
70419			if val.chars().count() > 35 {
70420				return Err(ValidationError::new(1002, "scty_cd exceeds the maximum length of 35".to_string()));
70421			}
70422		}
70423		if let Some(ref val) = self.seq_nb {
70424			if val.chars().count() < 1 {
70425				return Err(ValidationError::new(1001, "seq_nb is shorter than the minimum length of 1".to_string()));
70426			}
70427			if val.chars().count() > 3 {
70428				return Err(ValidationError::new(1002, "seq_nb exceeds the maximum length of 3".to_string()));
70429			}
70430		}
70431		Ok(())
70432	}
70433}
70434
70435
70436// PaymentCard4 ...
70437#[cfg_attr(feature = "derive_debug", derive(Debug))]
70438#[cfg_attr(feature = "derive_default", derive(Default))]
70439#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70440#[cfg_attr(feature = "derive_clone", derive(Clone))]
70441#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70442pub struct PaymentCard4 {
70443	#[cfg_attr( feature = "derive_serde", serde(rename = "PlainCardData", skip_serializing_if = "Option::is_none") )]
70444	pub plain_card_data: Option<PlainCardData1>,
70445	#[cfg_attr( feature = "derive_serde", serde(rename = "CardCtryCd", skip_serializing_if = "Option::is_none") )]
70446	pub card_ctry_cd: Option<String>,
70447	#[cfg_attr( feature = "derive_serde", serde(rename = "CardBrnd", skip_serializing_if = "Option::is_none") )]
70448	pub card_brnd: Option<GenericIdentification1>,
70449	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlCardData", skip_serializing_if = "Option::is_none") )]
70450	pub addtl_card_data: Option<String>,
70451}
70452
70453impl PaymentCard4 {
70454	pub fn validate(&self) -> Result<(), ValidationError> {
70455		if let Some(ref val) = self.plain_card_data { val.validate()? }
70456		if let Some(ref val) = self.card_ctry_cd {
70457			let pattern = Regex::new("[0-9]{3}").unwrap();
70458			if !pattern.is_match(val) {
70459				return Err(ValidationError::new(1005, "card_ctry_cd does not match the required pattern".to_string()));
70460			}
70461		}
70462		if let Some(ref val) = self.card_brnd { val.validate()? }
70463		if let Some(ref val) = self.addtl_card_data {
70464			if val.chars().count() < 1 {
70465				return Err(ValidationError::new(1001, "addtl_card_data is shorter than the minimum length of 1".to_string()));
70466			}
70467			if val.chars().count() > 70 {
70468				return Err(ValidationError::new(1002, "addtl_card_data exceeds the maximum length of 70".to_string()));
70469			}
70470		}
70471		Ok(())
70472	}
70473}
70474
70475
70476// PaymentCommon6 ...
70477#[cfg_attr(feature = "derive_debug", derive(Debug))]
70478#[cfg_attr(feature = "derive_default", derive(Default))]
70479#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70480#[cfg_attr(feature = "derive_clone", derive(Clone))]
70481#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70482pub struct PaymentCommon6 {
70483	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtFr", skip_serializing_if = "Option::is_none") )]
70484	pub pmt_fr: Option<System3>,
70485	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTo", skip_serializing_if = "Option::is_none") )]
70486	pub pmt_to: Option<System3>,
70487	#[cfg_attr( feature = "derive_serde", serde(rename = "CmonSts", skip_serializing_if = "Option::is_none") )]
70488	pub cmon_sts: Option<Vec<PaymentStatus6>>,
70489	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
70490	pub reqd_exctn_dt: Option<DateAndDateTime2Choice>,
70491	#[cfg_attr( feature = "derive_serde", serde(rename = "NtryDt", skip_serializing_if = "Option::is_none") )]
70492	pub ntry_dt: Option<DateAndDateTime2Choice>,
70493	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
70494	pub cdt_dbt_ind: Option<CreditDebitCode>,
70495	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMtd", skip_serializing_if = "Option::is_none") )]
70496	pub pmt_mtd: Option<PaymentOrigin1Choice>,
70497}
70498
70499impl PaymentCommon6 {
70500	pub fn validate(&self) -> Result<(), ValidationError> {
70501		if let Some(ref val) = self.pmt_fr { val.validate()? }
70502		if let Some(ref val) = self.pmt_to { val.validate()? }
70503		if let Some(ref vec) = self.cmon_sts { for item in vec { item.validate()? } }
70504		if let Some(ref val) = self.reqd_exctn_dt { val.validate()? }
70505		if let Some(ref val) = self.ntry_dt { val.validate()? }
70506		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
70507		if let Some(ref val) = self.pmt_mtd { val.validate()? }
70508		Ok(())
70509	}
70510}
70511
70512
70513// PaymentComplementaryInformation11 ...
70514#[cfg_attr(feature = "derive_debug", derive(Debug))]
70515#[cfg_attr(feature = "derive_default", derive(Default))]
70516#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70517#[cfg_attr(feature = "derive_clone", derive(Clone))]
70518#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70519pub struct PaymentComplementaryInformation11 {
70520	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
70521	pub instr_id: Option<String>,
70522	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId", skip_serializing_if = "Option::is_none") )]
70523	pub end_to_end_id: Option<String>,
70524	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
70525	pub tx_id: Option<String>,
70526	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
70527	pub pmt_tp_inf: Option<PaymentTypeInformation27>,
70528	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
70529	pub reqd_exctn_dt: Option<DateAndDateTime2Choice>,
70530	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdColltnDt", skip_serializing_if = "Option::is_none") )]
70531	pub reqd_colltn_dt: Option<String>,
70532	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
70533	pub intr_bk_sttlm_dt: Option<String>,
70534	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
70535	pub amt: Option<AmountType4Choice>,
70536	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
70537	pub intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
70538	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr", skip_serializing_if = "Option::is_none") )]
70539	pub chrg_br: Option<ChargeBearerType1Code>,
70540	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
70541	pub ultmt_dbtr: Option<PartyIdentification272>,
70542	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
70543	pub dbtr: Option<PartyIdentification272>,
70544	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
70545	pub dbtr_acct: Option<CashAccount40>,
70546	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
70547	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
70548	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
70549	pub dbtr_agt_acct: Option<CashAccount40>,
70550	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInf", skip_serializing_if = "Option::is_none") )]
70551	pub sttlm_inf: Option<SettlementInstruction15>,
70552	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1", skip_serializing_if = "Option::is_none") )]
70553	pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
70554	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1Acct", skip_serializing_if = "Option::is_none") )]
70555	pub intrmy_agt1_acct: Option<CashAccount40>,
70556	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2", skip_serializing_if = "Option::is_none") )]
70557	pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
70558	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2Acct", skip_serializing_if = "Option::is_none") )]
70559	pub intrmy_agt2_acct: Option<CashAccount40>,
70560	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3", skip_serializing_if = "Option::is_none") )]
70561	pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
70562	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3Acct", skip_serializing_if = "Option::is_none") )]
70563	pub intrmy_agt3_acct: Option<CashAccount40>,
70564	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
70565	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
70566	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
70567	pub cdtr_agt_acct: Option<CashAccount40>,
70568	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
70569	pub cdtr: Option<PartyIdentification272>,
70570	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
70571	pub cdtr_acct: Option<CashAccount40>,
70572	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
70573	pub ultmt_cdtr: Option<PartyIdentification272>,
70574	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
70575	pub purp: Option<Purpose2Choice>,
70576	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForDbtrAgt", skip_serializing_if = "Option::is_none") )]
70577	pub instr_for_dbtr_agt: Option<String>,
70578	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt1", skip_serializing_if = "Option::is_none") )]
70579	pub prvs_instg_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
70580	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt1Acct", skip_serializing_if = "Option::is_none") )]
70581	pub prvs_instg_agt1_acct: Option<CashAccount40>,
70582	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt2", skip_serializing_if = "Option::is_none") )]
70583	pub prvs_instg_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
70584	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt2Acct", skip_serializing_if = "Option::is_none") )]
70585	pub prvs_instg_agt2_acct: Option<CashAccount40>,
70586	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt3", skip_serializing_if = "Option::is_none") )]
70587	pub prvs_instg_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
70588	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt3Acct", skip_serializing_if = "Option::is_none") )]
70589	pub prvs_instg_agt3_acct: Option<CashAccount40>,
70590	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForNxtAgt", skip_serializing_if = "Option::is_none") )]
70591	pub instr_for_nxt_agt: Option<Vec<InstructionForNextAgent1>>,
70592	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForCdtrAgt", skip_serializing_if = "Option::is_none") )]
70593	pub instr_for_cdtr_agt: Option<Vec<InstructionForCreditorAgent3>>,
70594	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdRmtInf", skip_serializing_if = "Option::is_none") )]
70595	pub rltd_rmt_inf: Option<Vec<RemittanceLocation8>>,
70596	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
70597	pub rmt_inf: Option<RemittanceInformation22>,
70598}
70599
70600impl PaymentComplementaryInformation11 {
70601	pub fn validate(&self) -> Result<(), ValidationError> {
70602		if let Some(ref val) = self.instr_id {
70603			if val.chars().count() < 1 {
70604				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
70605			}
70606			if val.chars().count() > 35 {
70607				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
70608			}
70609		}
70610		if let Some(ref val) = self.end_to_end_id {
70611			if val.chars().count() < 1 {
70612				return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
70613			}
70614			if val.chars().count() > 35 {
70615				return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
70616			}
70617		}
70618		if let Some(ref val) = self.tx_id {
70619			if val.chars().count() < 1 {
70620				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
70621			}
70622			if val.chars().count() > 35 {
70623				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
70624			}
70625		}
70626		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
70627		if let Some(ref val) = self.reqd_exctn_dt { val.validate()? }
70628		if let Some(ref val) = self.amt { val.validate()? }
70629		if let Some(ref val) = self.intr_bk_sttlm_amt { val.validate()? }
70630		if let Some(ref val) = self.chrg_br { val.validate()? }
70631		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
70632		if let Some(ref val) = self.dbtr { val.validate()? }
70633		if let Some(ref val) = self.dbtr_acct { val.validate()? }
70634		if let Some(ref val) = self.dbtr_agt { val.validate()? }
70635		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
70636		if let Some(ref val) = self.sttlm_inf { val.validate()? }
70637		if let Some(ref val) = self.intrmy_agt1 { val.validate()? }
70638		if let Some(ref val) = self.intrmy_agt1_acct { val.validate()? }
70639		if let Some(ref val) = self.intrmy_agt2 { val.validate()? }
70640		if let Some(ref val) = self.intrmy_agt2_acct { val.validate()? }
70641		if let Some(ref val) = self.intrmy_agt3 { val.validate()? }
70642		if let Some(ref val) = self.intrmy_agt3_acct { val.validate()? }
70643		if let Some(ref val) = self.cdtr_agt { val.validate()? }
70644		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
70645		if let Some(ref val) = self.cdtr { val.validate()? }
70646		if let Some(ref val) = self.cdtr_acct { val.validate()? }
70647		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
70648		if let Some(ref val) = self.purp { val.validate()? }
70649		if let Some(ref val) = self.instr_for_dbtr_agt {
70650			if val.chars().count() < 1 {
70651				return Err(ValidationError::new(1001, "instr_for_dbtr_agt is shorter than the minimum length of 1".to_string()));
70652			}
70653			if val.chars().count() > 140 {
70654				return Err(ValidationError::new(1002, "instr_for_dbtr_agt exceeds the maximum length of 140".to_string()));
70655			}
70656		}
70657		if let Some(ref val) = self.prvs_instg_agt1 { val.validate()? }
70658		if let Some(ref val) = self.prvs_instg_agt1_acct { val.validate()? }
70659		if let Some(ref val) = self.prvs_instg_agt2 { val.validate()? }
70660		if let Some(ref val) = self.prvs_instg_agt2_acct { val.validate()? }
70661		if let Some(ref val) = self.prvs_instg_agt3 { val.validate()? }
70662		if let Some(ref val) = self.prvs_instg_agt3_acct { val.validate()? }
70663		if let Some(ref vec) = self.instr_for_nxt_agt { for item in vec { item.validate()? } }
70664		if let Some(ref vec) = self.instr_for_cdtr_agt { for item in vec { item.validate()? } }
70665		if let Some(ref vec) = self.rltd_rmt_inf { for item in vec { item.validate()? } }
70666		if let Some(ref val) = self.rmt_inf { val.validate()? }
70667		Ok(())
70668	}
70669}
70670
70671
70672// PaymentCondition2 ...
70673#[cfg_attr(feature = "derive_debug", derive(Debug))]
70674#[cfg_attr(feature = "derive_default", derive(Default))]
70675#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70676#[cfg_attr(feature = "derive_clone", derive(Clone))]
70677#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70678pub struct PaymentCondition2 {
70679	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtModAllwd", skip_serializing_if = "Option::is_none") )]
70680	pub amt_mod_allwd: Option<bool>,
70681	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlyPmtAllwd", skip_serializing_if = "Option::is_none") )]
70682	pub early_pmt_allwd: Option<bool>,
70683	#[cfg_attr( feature = "derive_serde", serde(rename = "DelyPnlty", skip_serializing_if = "Option::is_none") )]
70684	pub dely_pnlty: Option<String>,
70685	#[cfg_attr( feature = "derive_serde", serde(rename = "ImdtPmtRbt", skip_serializing_if = "Option::is_none") )]
70686	pub imdt_pmt_rbt: Option<AmountOrRate1Choice>,
70687	#[cfg_attr( feature = "derive_serde", serde(rename = "GrntedPmtReqd", skip_serializing_if = "Option::is_none") )]
70688	pub grnted_pmt_reqd: Option<bool>,
70689}
70690
70691impl PaymentCondition2 {
70692	pub fn validate(&self) -> Result<(), ValidationError> {
70693		if let Some(ref val) = self.dely_pnlty {
70694			if val.chars().count() < 1 {
70695				return Err(ValidationError::new(1001, "dely_pnlty is shorter than the minimum length of 1".to_string()));
70696			}
70697			if val.chars().count() > 140 {
70698				return Err(ValidationError::new(1002, "dely_pnlty exceeds the maximum length of 140".to_string()));
70699			}
70700		}
70701		if let Some(ref val) = self.imdt_pmt_rbt { val.validate()? }
70702		Ok(())
70703	}
70704}
70705
70706
70707// PaymentConditionStatus2 ...
70708#[cfg_attr(feature = "derive_debug", derive(Debug))]
70709#[cfg_attr(feature = "derive_default", derive(Default))]
70710#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70711#[cfg_attr(feature = "derive_clone", derive(Clone))]
70712#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70713pub struct PaymentConditionStatus2 {
70714	#[cfg_attr( feature = "derive_serde", serde(rename = "AccptdAmt", skip_serializing_if = "Option::is_none") )]
70715	pub accptd_amt: Option<ActiveCurrencyAndAmount>,
70716	#[cfg_attr( feature = "derive_serde", serde(rename = "GrntedPmt", skip_serializing_if = "Option::is_none") )]
70717	pub grnted_pmt: Option<bool>,
70718	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlyPmt", skip_serializing_if = "Option::is_none") )]
70719	pub early_pmt: Option<bool>,
70720}
70721
70722impl PaymentConditionStatus2 {
70723	pub fn validate(&self) -> Result<(), ValidationError> {
70724		if let Some(ref val) = self.accptd_amt { val.validate()? }
70725		Ok(())
70726	}
70727}
70728
70729
70730// PaymentContext3 ...
70731#[cfg_attr(feature = "derive_debug", derive(Debug))]
70732#[cfg_attr(feature = "derive_default", derive(Default))]
70733#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70734#[cfg_attr(feature = "derive_clone", derive(Clone))]
70735#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70736pub struct PaymentContext3 {
70737	#[cfg_attr( feature = "derive_serde", serde(rename = "CardPres", skip_serializing_if = "Option::is_none") )]
70738	pub card_pres: Option<bool>,
70739	#[cfg_attr( feature = "derive_serde", serde(rename = "CrdhldrPres", skip_serializing_if = "Option::is_none") )]
70740	pub crdhldr_pres: Option<bool>,
70741	#[cfg_attr( feature = "derive_serde", serde(rename = "OnLineCntxt", skip_serializing_if = "Option::is_none") )]
70742	pub on_line_cntxt: Option<bool>,
70743	#[cfg_attr( feature = "derive_serde", serde(rename = "AttndncCntxt", skip_serializing_if = "Option::is_none") )]
70744	pub attndnc_cntxt: Option<AttendanceContext1Code>,
70745	#[cfg_attr( feature = "derive_serde", serde(rename = "TxEnvt", skip_serializing_if = "Option::is_none") )]
70746	pub tx_envt: Option<TransactionEnvironment1Code>,
70747	#[cfg_attr( feature = "derive_serde", serde(rename = "TxChanl", skip_serializing_if = "Option::is_none") )]
70748	pub tx_chanl: Option<TransactionChannel1Code>,
70749	#[cfg_attr( feature = "derive_serde", serde(rename = "AttndntMsgCpbl", skip_serializing_if = "Option::is_none") )]
70750	pub attndnt_msg_cpbl: Option<bool>,
70751	#[cfg_attr( feature = "derive_serde", serde(rename = "AttndntLang", skip_serializing_if = "Option::is_none") )]
70752	pub attndnt_lang: Option<String>,
70753	#[cfg_attr( feature = "derive_serde", serde(rename = "CardDataNtryMd") )]
70754	pub card_data_ntry_md: CardDataReading1Code,
70755	#[cfg_attr( feature = "derive_serde", serde(rename = "FllbckInd", skip_serializing_if = "Option::is_none") )]
70756	pub fllbck_ind: Option<bool>,
70757	#[cfg_attr( feature = "derive_serde", serde(rename = "AuthntcnMtd", skip_serializing_if = "Option::is_none") )]
70758	pub authntcn_mtd: Option<CardholderAuthentication2>,
70759}
70760
70761impl PaymentContext3 {
70762	pub fn validate(&self) -> Result<(), ValidationError> {
70763		if let Some(ref val) = self.attndnc_cntxt { val.validate()? }
70764		if let Some(ref val) = self.tx_envt { val.validate()? }
70765		if let Some(ref val) = self.tx_chanl { val.validate()? }
70766		if let Some(ref val) = self.attndnt_lang {
70767			let pattern = Regex::new("[a-z]{2,2}").unwrap();
70768			if !pattern.is_match(val) {
70769				return Err(ValidationError::new(1005, "attndnt_lang does not match the required pattern".to_string()));
70770			}
70771		}
70772		self.card_data_ntry_md.validate()?;
70773		if let Some(ref val) = self.authntcn_mtd { val.validate()? }
70774		Ok(())
70775	}
70776}
70777
70778
70779// PaymentIdentification13 ...
70780#[cfg_attr(feature = "derive_debug", derive(Debug))]
70781#[cfg_attr(feature = "derive_default", derive(Default))]
70782#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70783#[cfg_attr(feature = "derive_clone", derive(Clone))]
70784#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70785pub struct PaymentIdentification13 {
70786	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
70787	pub instr_id: Option<String>,
70788	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId") )]
70789	pub end_to_end_id: String,
70790	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
70791	pub tx_id: Option<String>,
70792	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
70793	pub uetr: Option<String>,
70794	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysRef", skip_serializing_if = "Option::is_none") )]
70795	pub clr_sys_ref: Option<String>,
70796}
70797
70798impl PaymentIdentification13 {
70799	pub fn validate(&self) -> Result<(), ValidationError> {
70800		if let Some(ref val) = self.instr_id {
70801			if val.chars().count() < 1 {
70802				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
70803			}
70804			if val.chars().count() > 35 {
70805				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
70806			}
70807		}
70808		if self.end_to_end_id.chars().count() < 1 {
70809			return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
70810		}
70811		if self.end_to_end_id.chars().count() > 35 {
70812			return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
70813		}
70814		if let Some(ref val) = self.tx_id {
70815			if val.chars().count() < 1 {
70816				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
70817			}
70818			if val.chars().count() > 35 {
70819				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
70820			}
70821		}
70822		if let Some(ref val) = self.uetr {
70823			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
70824			if !pattern.is_match(val) {
70825				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
70826			}
70827		}
70828		if let Some(ref val) = self.clr_sys_ref {
70829			if val.chars().count() < 1 {
70830				return Err(ValidationError::new(1001, "clr_sys_ref is shorter than the minimum length of 1".to_string()));
70831			}
70832			if val.chars().count() > 35 {
70833				return Err(ValidationError::new(1002, "clr_sys_ref exceeds the maximum length of 35".to_string()));
70834			}
70835		}
70836		Ok(())
70837	}
70838}
70839
70840
70841// PaymentIdentification15 ...
70842#[cfg_attr(feature = "derive_debug", derive(Debug))]
70843#[cfg_attr(feature = "derive_default", derive(Default))]
70844#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70845#[cfg_attr(feature = "derive_clone", derive(Clone))]
70846#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70847pub struct PaymentIdentification15 {
70848	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
70849	pub instr_id: Option<String>,
70850	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId") )]
70851	pub end_to_end_id: String,
70852	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
70853	pub tx_id: Option<String>,
70854	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
70855	pub uetr: Option<String>,
70856	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysRef", skip_serializing_if = "Option::is_none") )]
70857	pub clr_sys_ref: Option<String>,
70858	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstAgt", skip_serializing_if = "Option::is_none") )]
70859	pub frst_agt: Option<BranchAndFinancialInstitutionIdentification8>,
70860}
70861
70862impl PaymentIdentification15 {
70863	pub fn validate(&self) -> Result<(), ValidationError> {
70864		if let Some(ref val) = self.instr_id {
70865			if val.chars().count() < 1 {
70866				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
70867			}
70868			if val.chars().count() > 35 {
70869				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
70870			}
70871		}
70872		if self.end_to_end_id.chars().count() < 1 {
70873			return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
70874		}
70875		if self.end_to_end_id.chars().count() > 35 {
70876			return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
70877		}
70878		if let Some(ref val) = self.tx_id {
70879			if val.chars().count() < 1 {
70880				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
70881			}
70882			if val.chars().count() > 35 {
70883				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
70884			}
70885		}
70886		if let Some(ref val) = self.uetr {
70887			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
70888			if !pattern.is_match(val) {
70889				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
70890			}
70891		}
70892		if let Some(ref val) = self.clr_sys_ref {
70893			if val.chars().count() < 1 {
70894				return Err(ValidationError::new(1001, "clr_sys_ref is shorter than the minimum length of 1".to_string()));
70895			}
70896			if val.chars().count() > 35 {
70897				return Err(ValidationError::new(1002, "clr_sys_ref exceeds the maximum length of 35".to_string()));
70898			}
70899		}
70900		if let Some(ref val) = self.frst_agt { val.validate()? }
70901		Ok(())
70902	}
70903}
70904
70905
70906// PaymentIdentification6 ...
70907#[cfg_attr(feature = "derive_debug", derive(Debug))]
70908#[cfg_attr(feature = "derive_default", derive(Default))]
70909#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70910#[cfg_attr(feature = "derive_clone", derive(Clone))]
70911#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70912pub struct PaymentIdentification6 {
70913	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
70914	pub instr_id: Option<String>,
70915	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId") )]
70916	pub end_to_end_id: String,
70917	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
70918	pub uetr: Option<String>,
70919}
70920
70921impl PaymentIdentification6 {
70922	pub fn validate(&self) -> Result<(), ValidationError> {
70923		if let Some(ref val) = self.instr_id {
70924			if val.chars().count() < 1 {
70925				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
70926			}
70927			if val.chars().count() > 35 {
70928				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
70929			}
70930		}
70931		if self.end_to_end_id.chars().count() < 1 {
70932			return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
70933		}
70934		if self.end_to_end_id.chars().count() > 35 {
70935			return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
70936		}
70937		if let Some(ref val) = self.uetr {
70938			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
70939			if !pattern.is_match(val) {
70940				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
70941			}
70942		}
70943		Ok(())
70944	}
70945}
70946
70947
70948// PaymentIdentification8 ...
70949#[cfg_attr(feature = "derive_debug", derive(Debug))]
70950#[cfg_attr(feature = "derive_default", derive(Default))]
70951#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
70952#[cfg_attr(feature = "derive_clone", derive(Clone))]
70953#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
70954pub struct PaymentIdentification8 {
70955	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
70956	pub instr_id: Option<String>,
70957	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId") )]
70958	pub end_to_end_id: String,
70959	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
70960	pub tx_id: Option<String>,
70961	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
70962	pub uetr: Option<String>,
70963}
70964
70965impl PaymentIdentification8 {
70966	pub fn validate(&self) -> Result<(), ValidationError> {
70967		if let Some(ref val) = self.instr_id {
70968			if val.chars().count() < 1 {
70969				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
70970			}
70971			if val.chars().count() > 35 {
70972				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
70973			}
70974		}
70975		if self.end_to_end_id.chars().count() < 1 {
70976			return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
70977		}
70978		if self.end_to_end_id.chars().count() > 35 {
70979			return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
70980		}
70981		if let Some(ref val) = self.tx_id {
70982			if val.chars().count() < 1 {
70983				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
70984			}
70985			if val.chars().count() > 35 {
70986				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
70987			}
70988		}
70989		if let Some(ref val) = self.uetr {
70990			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
70991			if !pattern.is_match(val) {
70992				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
70993			}
70994		}
70995		Ok(())
70996	}
70997}
70998
70999
71000// PaymentIdentification8Choice ...
71001#[cfg_attr(feature = "derive_debug", derive(Debug))]
71002#[cfg_attr(feature = "derive_default", derive(Default))]
71003#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71004#[cfg_attr(feature = "derive_clone", derive(Clone))]
71005#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71006pub struct PaymentIdentification8Choice {
71007	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
71008	pub tx_id: Option<String>,
71009	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
71010	pub uetr: Option<String>,
71011	#[cfg_attr( feature = "derive_serde", serde(rename = "QId", skip_serializing_if = "Option::is_none") )]
71012	pub q_id: Option<QueueTransactionIdentification1>,
71013	#[cfg_attr( feature = "derive_serde", serde(rename = "LngBizId", skip_serializing_if = "Option::is_none") )]
71014	pub lng_biz_id: Option<LongPaymentIdentification4>,
71015	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtBizId", skip_serializing_if = "Option::is_none") )]
71016	pub shrt_biz_id: Option<ShortPaymentIdentification4>,
71017	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryId", skip_serializing_if = "Option::is_none") )]
71018	pub prtry_id: Option<String>,
71019}
71020
71021impl PaymentIdentification8Choice {
71022	pub fn validate(&self) -> Result<(), ValidationError> {
71023		if let Some(ref val) = self.tx_id {
71024			if val.chars().count() < 1 {
71025				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
71026			}
71027			if val.chars().count() > 35 {
71028				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
71029			}
71030		}
71031		if let Some(ref val) = self.uetr {
71032			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
71033			if !pattern.is_match(val) {
71034				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
71035			}
71036		}
71037		if let Some(ref val) = self.q_id { val.validate()? }
71038		if let Some(ref val) = self.lng_biz_id { val.validate()? }
71039		if let Some(ref val) = self.shrt_biz_id { val.validate()? }
71040		if let Some(ref val) = self.prtry_id {
71041			if val.chars().count() < 1 {
71042				return Err(ValidationError::new(1001, "prtry_id is shorter than the minimum length of 1".to_string()));
71043			}
71044			if val.chars().count() > 70 {
71045				return Err(ValidationError::new(1002, "prtry_id exceeds the maximum length of 70".to_string()));
71046			}
71047		}
71048		Ok(())
71049	}
71050}
71051
71052
71053// PaymentInitiationSource1 ...
71054#[cfg_attr(feature = "derive_debug", derive(Debug))]
71055#[cfg_attr(feature = "derive_default", derive(Default))]
71056#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71057#[cfg_attr(feature = "derive_clone", derive(Clone))]
71058#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71059pub struct PaymentInitiationSource1 {
71060	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
71061	pub nm: String,
71062	#[cfg_attr( feature = "derive_serde", serde(rename = "Prvdr", skip_serializing_if = "Option::is_none") )]
71063	pub prvdr: Option<String>,
71064	#[cfg_attr( feature = "derive_serde", serde(rename = "Vrsn", skip_serializing_if = "Option::is_none") )]
71065	pub vrsn: Option<String>,
71066}
71067
71068impl PaymentInitiationSource1 {
71069	pub fn validate(&self) -> Result<(), ValidationError> {
71070		if self.nm.chars().count() < 1 {
71071			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
71072		}
71073		if self.nm.chars().count() > 140 {
71074			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
71075		}
71076		if let Some(ref val) = self.prvdr {
71077			if val.chars().count() < 1 {
71078				return Err(ValidationError::new(1001, "prvdr is shorter than the minimum length of 1".to_string()));
71079			}
71080			if val.chars().count() > 35 {
71081				return Err(ValidationError::new(1002, "prvdr exceeds the maximum length of 35".to_string()));
71082			}
71083		}
71084		if let Some(ref val) = self.vrsn {
71085			if val.chars().count() < 1 {
71086				return Err(ValidationError::new(1001, "vrsn is shorter than the minimum length of 1".to_string()));
71087			}
71088			if val.chars().count() > 35 {
71089				return Err(ValidationError::new(1002, "vrsn exceeds the maximum length of 35".to_string()));
71090			}
71091		}
71092		Ok(())
71093	}
71094}
71095
71096
71097// PaymentInstruction13 ...
71098#[cfg_attr(feature = "derive_debug", derive(Debug))]
71099#[cfg_attr(feature = "derive_default", derive(Default))]
71100#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71101#[cfg_attr(feature = "derive_clone", derive(Clone))]
71102#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71103pub struct PaymentInstruction13 {
71104	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDtTm", skip_serializing_if = "Option::is_none") )]
71105	pub reqd_exctn_dt_tm: Option<String>,
71106	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTp", skip_serializing_if = "Option::is_none") )]
71107	pub pmt_tp: Option<PaymentType4Choice>,
71108}
71109
71110impl PaymentInstruction13 {
71111	pub fn validate(&self) -> Result<(), ValidationError> {
71112		if let Some(ref val) = self.pmt_tp { val.validate()? }
71113		Ok(())
71114	}
71115}
71116
71117
71118// PaymentInstruction33 ...
71119#[cfg_attr(feature = "derive_debug", derive(Debug))]
71120#[cfg_attr(feature = "derive_default", derive(Default))]
71121#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71122#[cfg_attr(feature = "derive_clone", derive(Clone))]
71123#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71124pub struct PaymentInstruction33 {
71125	#[cfg_attr( feature = "derive_serde", serde(rename = "Instr", skip_serializing_if = "Option::is_none") )]
71126	pub instr: Option<Instruction1Code>,
71127	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
71128	pub tp: Option<PaymentType4Choice>,
71129	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
71130	pub prty: Option<Priority1Choice>,
71131	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgVldtyTm", skip_serializing_if = "Option::is_none") )]
71132	pub prcg_vldty_tm: Option<DateTimePeriod1Choice>,
71133}
71134
71135impl PaymentInstruction33 {
71136	pub fn validate(&self) -> Result<(), ValidationError> {
71137		if let Some(ref val) = self.instr { val.validate()? }
71138		if let Some(ref val) = self.tp { val.validate()? }
71139		if let Some(ref val) = self.prty { val.validate()? }
71140		if let Some(ref val) = self.prcg_vldty_tm { val.validate()? }
71141		Ok(())
71142	}
71143}
71144
71145
71146// PaymentInstruction43 ...
71147#[cfg_attr(feature = "derive_debug", derive(Debug))]
71148#[cfg_attr(feature = "derive_default", derive(Default))]
71149#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71150#[cfg_attr(feature = "derive_clone", derive(Clone))]
71151#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71152pub struct PaymentInstruction43 {
71153	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfId") )]
71154	pub pmt_inf_id: String,
71155	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMtd") )]
71156	pub pmt_mtd: PaymentMethod3Code,
71157	#[cfg_attr( feature = "derive_serde", serde(rename = "BtchBookg", skip_serializing_if = "Option::is_none") )]
71158	pub btch_bookg: Option<bool>,
71159	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs", skip_serializing_if = "Option::is_none") )]
71160	pub nb_of_txs: Option<String>,
71161	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
71162	pub ctrl_sum: Option<f64>,
71163	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
71164	pub pmt_tp_inf: Option<PaymentTypeInformation26>,
71165	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt") )]
71166	pub reqd_exctn_dt: String,
71167	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolgAdjstmntDt", skip_serializing_if = "Option::is_none") )]
71168	pub poolg_adjstmnt_dt: Option<String>,
71169	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr") )]
71170	pub dbtr: PartyIdentification272,
71171	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct") )]
71172	pub dbtr_acct: CashAccount40,
71173	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt") )]
71174	pub dbtr_agt: BranchAndFinancialInstitutionIdentification8,
71175	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
71176	pub dbtr_agt_acct: Option<CashAccount40>,
71177	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForDbtrAgt", skip_serializing_if = "Option::is_none") )]
71178	pub instr_for_dbtr_agt: Option<String>,
71179	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
71180	pub ultmt_dbtr: Option<PartyIdentification272>,
71181	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr", skip_serializing_if = "Option::is_none") )]
71182	pub chrg_br: Option<ChargeBearerType1Code>,
71183	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcct", skip_serializing_if = "Option::is_none") )]
71184	pub chrgs_acct: Option<CashAccount40>,
71185	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgt", skip_serializing_if = "Option::is_none") )]
71186	pub chrgs_acct_agt: Option<BranchAndFinancialInstitutionIdentification8>,
71187	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtTrfTxInf") )]
71188	pub cdt_trf_tx_inf: Vec<CreditTransferTransaction59>,
71189}
71190
71191impl PaymentInstruction43 {
71192	pub fn validate(&self) -> Result<(), ValidationError> {
71193		if self.pmt_inf_id.chars().count() < 1 {
71194			return Err(ValidationError::new(1001, "pmt_inf_id is shorter than the minimum length of 1".to_string()));
71195		}
71196		if self.pmt_inf_id.chars().count() > 35 {
71197			return Err(ValidationError::new(1002, "pmt_inf_id exceeds the maximum length of 35".to_string()));
71198		}
71199		self.pmt_mtd.validate()?;
71200		if let Some(ref val) = self.nb_of_txs {
71201			let pattern = Regex::new("[0-9]{1,15}").unwrap();
71202			if !pattern.is_match(val) {
71203				return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
71204			}
71205		}
71206		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
71207		self.dbtr.validate()?;
71208		self.dbtr_acct.validate()?;
71209		self.dbtr_agt.validate()?;
71210		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
71211		if let Some(ref val) = self.instr_for_dbtr_agt {
71212			if val.chars().count() < 1 {
71213				return Err(ValidationError::new(1001, "instr_for_dbtr_agt is shorter than the minimum length of 1".to_string()));
71214			}
71215			if val.chars().count() > 140 {
71216				return Err(ValidationError::new(1002, "instr_for_dbtr_agt exceeds the maximum length of 140".to_string()));
71217			}
71218		}
71219		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
71220		if let Some(ref val) = self.chrg_br { val.validate()? }
71221		if let Some(ref val) = self.chrgs_acct { val.validate()? }
71222		if let Some(ref val) = self.chrgs_acct_agt { val.validate()? }
71223		for item in &self.cdt_trf_tx_inf { item.validate()? }
71224		Ok(())
71225	}
71226}
71227
71228
71229// PaymentInstruction44 ...
71230#[cfg_attr(feature = "derive_debug", derive(Debug))]
71231#[cfg_attr(feature = "derive_default", derive(Default))]
71232#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71233#[cfg_attr(feature = "derive_clone", derive(Clone))]
71234#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71235pub struct PaymentInstruction44 {
71236	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfId") )]
71237	pub pmt_inf_id: String,
71238	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMtd") )]
71239	pub pmt_mtd: PaymentMethod3Code,
71240	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdAdvcTp", skip_serializing_if = "Option::is_none") )]
71241	pub reqd_advc_tp: Option<AdviceType1>,
71242	#[cfg_attr( feature = "derive_serde", serde(rename = "BtchBookg", skip_serializing_if = "Option::is_none") )]
71243	pub btch_bookg: Option<bool>,
71244	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs", skip_serializing_if = "Option::is_none") )]
71245	pub nb_of_txs: Option<String>,
71246	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
71247	pub ctrl_sum: Option<f64>,
71248	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
71249	pub pmt_tp_inf: Option<PaymentTypeInformation26>,
71250	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt") )]
71251	pub reqd_exctn_dt: DateAndDateTime2Choice,
71252	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolgAdjstmntDt", skip_serializing_if = "Option::is_none") )]
71253	pub poolg_adjstmnt_dt: Option<String>,
71254	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr") )]
71255	pub dbtr: PartyIdentification272,
71256	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct") )]
71257	pub dbtr_acct: CashAccount40,
71258	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt") )]
71259	pub dbtr_agt: BranchAndFinancialInstitutionIdentification8,
71260	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
71261	pub dbtr_agt_acct: Option<CashAccount40>,
71262	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForDbtrAgt", skip_serializing_if = "Option::is_none") )]
71263	pub instr_for_dbtr_agt: Option<String>,
71264	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
71265	pub ultmt_dbtr: Option<PartyIdentification272>,
71266	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr", skip_serializing_if = "Option::is_none") )]
71267	pub chrg_br: Option<ChargeBearerType1Code>,
71268	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcct", skip_serializing_if = "Option::is_none") )]
71269	pub chrgs_acct: Option<CashAccount40>,
71270	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgt", skip_serializing_if = "Option::is_none") )]
71271	pub chrgs_acct_agt: Option<BranchAndFinancialInstitutionIdentification8>,
71272	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtTrfTxInf") )]
71273	pub cdt_trf_tx_inf: Vec<CreditTransferTransaction61>,
71274}
71275
71276impl PaymentInstruction44 {
71277	pub fn validate(&self) -> Result<(), ValidationError> {
71278		if self.pmt_inf_id.chars().count() < 1 {
71279			return Err(ValidationError::new(1001, "pmt_inf_id is shorter than the minimum length of 1".to_string()));
71280		}
71281		if self.pmt_inf_id.chars().count() > 35 {
71282			return Err(ValidationError::new(1002, "pmt_inf_id exceeds the maximum length of 35".to_string()));
71283		}
71284		self.pmt_mtd.validate()?;
71285		if let Some(ref val) = self.reqd_advc_tp { val.validate()? }
71286		if let Some(ref val) = self.nb_of_txs {
71287			let pattern = Regex::new("[0-9]{1,15}").unwrap();
71288			if !pattern.is_match(val) {
71289				return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
71290			}
71291		}
71292		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
71293		self.reqd_exctn_dt.validate()?;
71294		self.dbtr.validate()?;
71295		self.dbtr_acct.validate()?;
71296		self.dbtr_agt.validate()?;
71297		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
71298		if let Some(ref val) = self.instr_for_dbtr_agt {
71299			if val.chars().count() < 1 {
71300				return Err(ValidationError::new(1001, "instr_for_dbtr_agt is shorter than the minimum length of 1".to_string()));
71301			}
71302			if val.chars().count() > 140 {
71303				return Err(ValidationError::new(1002, "instr_for_dbtr_agt exceeds the maximum length of 140".to_string()));
71304			}
71305		}
71306		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
71307		if let Some(ref val) = self.chrg_br { val.validate()? }
71308		if let Some(ref val) = self.chrgs_acct { val.validate()? }
71309		if let Some(ref val) = self.chrgs_acct_agt { val.validate()? }
71310		for item in &self.cdt_trf_tx_inf { item.validate()? }
71311		Ok(())
71312	}
71313}
71314
71315
71316// PaymentInstruction45 ...
71317#[cfg_attr(feature = "derive_debug", derive(Debug))]
71318#[cfg_attr(feature = "derive_default", derive(Default))]
71319#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71320#[cfg_attr(feature = "derive_clone", derive(Clone))]
71321#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71322pub struct PaymentInstruction45 {
71323	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfId") )]
71324	pub pmt_inf_id: String,
71325	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMtd") )]
71326	pub pmt_mtd: PaymentMethod2Code,
71327	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdAdvcTp", skip_serializing_if = "Option::is_none") )]
71328	pub reqd_advc_tp: Option<AdviceType1>,
71329	#[cfg_attr( feature = "derive_serde", serde(rename = "BtchBookg", skip_serializing_if = "Option::is_none") )]
71330	pub btch_bookg: Option<bool>,
71331	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs", skip_serializing_if = "Option::is_none") )]
71332	pub nb_of_txs: Option<String>,
71333	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
71334	pub ctrl_sum: Option<f64>,
71335	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
71336	pub pmt_tp_inf: Option<PaymentTypeInformation29>,
71337	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdColltnDt") )]
71338	pub reqd_colltn_dt: String,
71339	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
71340	pub cdtr: PartyIdentification272,
71341	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct") )]
71342	pub cdtr_acct: CashAccount40,
71343	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt") )]
71344	pub cdtr_agt: BranchAndFinancialInstitutionIdentification8,
71345	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
71346	pub cdtr_agt_acct: Option<CashAccount40>,
71347	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
71348	pub ultmt_cdtr: Option<PartyIdentification272>,
71349	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr", skip_serializing_if = "Option::is_none") )]
71350	pub chrg_br: Option<ChargeBearerType1Code>,
71351	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcct", skip_serializing_if = "Option::is_none") )]
71352	pub chrgs_acct: Option<CashAccount40>,
71353	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAcctAgt", skip_serializing_if = "Option::is_none") )]
71354	pub chrgs_acct_agt: Option<BranchAndFinancialInstitutionIdentification8>,
71355	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrSchmeId", skip_serializing_if = "Option::is_none") )]
71356	pub cdtr_schme_id: Option<PartyIdentification272>,
71357	#[cfg_attr( feature = "derive_serde", serde(rename = "DrctDbtTxInf") )]
71358	pub drct_dbt_tx_inf: Vec<DirectDebitTransactionInformation32>,
71359}
71360
71361impl PaymentInstruction45 {
71362	pub fn validate(&self) -> Result<(), ValidationError> {
71363		if self.pmt_inf_id.chars().count() < 1 {
71364			return Err(ValidationError::new(1001, "pmt_inf_id is shorter than the minimum length of 1".to_string()));
71365		}
71366		if self.pmt_inf_id.chars().count() > 35 {
71367			return Err(ValidationError::new(1002, "pmt_inf_id exceeds the maximum length of 35".to_string()));
71368		}
71369		self.pmt_mtd.validate()?;
71370		if let Some(ref val) = self.reqd_advc_tp { val.validate()? }
71371		if let Some(ref val) = self.nb_of_txs {
71372			let pattern = Regex::new("[0-9]{1,15}").unwrap();
71373			if !pattern.is_match(val) {
71374				return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
71375			}
71376		}
71377		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
71378		self.cdtr.validate()?;
71379		self.cdtr_acct.validate()?;
71380		self.cdtr_agt.validate()?;
71381		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
71382		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
71383		if let Some(ref val) = self.chrg_br { val.validate()? }
71384		if let Some(ref val) = self.chrgs_acct { val.validate()? }
71385		if let Some(ref val) = self.chrgs_acct_agt { val.validate()? }
71386		if let Some(ref val) = self.cdtr_schme_id { val.validate()? }
71387		for item in &self.drct_dbt_tx_inf { item.validate()? }
71388		Ok(())
71389	}
71390}
71391
71392
71393// PaymentInstruction46 ...
71394#[cfg_attr(feature = "derive_debug", derive(Debug))]
71395#[cfg_attr(feature = "derive_default", derive(Default))]
71396#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71397#[cfg_attr(feature = "derive_clone", derive(Clone))]
71398#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71399pub struct PaymentInstruction46 {
71400	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfId", skip_serializing_if = "Option::is_none") )]
71401	pub pmt_inf_id: Option<String>,
71402	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMtd") )]
71403	pub pmt_mtd: PaymentMethod7Code,
71404	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdAdvcTp", skip_serializing_if = "Option::is_none") )]
71405	pub reqd_advc_tp: Option<AdviceType1>,
71406	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
71407	pub pmt_tp_inf: Option<PaymentTypeInformation29>,
71408	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
71409	pub reqd_exctn_dt: Option<DateAndDateTime2Choice>,
71410	#[cfg_attr( feature = "derive_serde", serde(rename = "XpryDt", skip_serializing_if = "Option::is_none") )]
71411	pub xpry_dt: Option<DateAndDateTime2Choice>,
71412	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtCond", skip_serializing_if = "Option::is_none") )]
71413	pub pmt_cond: Option<PaymentCondition2>,
71414	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr") )]
71415	pub dbtr: PartyIdentification272,
71416	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
71417	pub dbtr_acct: Option<CashAccount40>,
71418	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt") )]
71419	pub dbtr_agt: BranchAndFinancialInstitutionIdentification8,
71420	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
71421	pub dbtr_agt_acct: Option<CashAccount40>,
71422	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
71423	pub ultmt_dbtr: Option<PartyIdentification272>,
71424	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr", skip_serializing_if = "Option::is_none") )]
71425	pub chrg_br: Option<ChargeBearerType1Code>,
71426	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtTrfTx") )]
71427	pub cdt_trf_tx: Vec<CreditTransferTransaction65>,
71428}
71429
71430impl PaymentInstruction46 {
71431	pub fn validate(&self) -> Result<(), ValidationError> {
71432		if let Some(ref val) = self.pmt_inf_id {
71433			if val.chars().count() < 1 {
71434				return Err(ValidationError::new(1001, "pmt_inf_id is shorter than the minimum length of 1".to_string()));
71435			}
71436			if val.chars().count() > 35 {
71437				return Err(ValidationError::new(1002, "pmt_inf_id exceeds the maximum length of 35".to_string()));
71438			}
71439		}
71440		self.pmt_mtd.validate()?;
71441		if let Some(ref val) = self.reqd_advc_tp { val.validate()? }
71442		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
71443		if let Some(ref val) = self.reqd_exctn_dt { val.validate()? }
71444		if let Some(ref val) = self.xpry_dt { val.validate()? }
71445		if let Some(ref val) = self.pmt_cond { val.validate()? }
71446		self.dbtr.validate()?;
71447		if let Some(ref val) = self.dbtr_acct { val.validate()? }
71448		self.dbtr_agt.validate()?;
71449		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
71450		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
71451		if let Some(ref val) = self.chrg_br { val.validate()? }
71452		for item in &self.cdt_trf_tx { item.validate()? }
71453		Ok(())
71454	}
71455}
71456
71457
71458// PaymentInstruction47 ...
71459#[cfg_attr(feature = "derive_debug", derive(Debug))]
71460#[cfg_attr(feature = "derive_default", derive(Default))]
71461#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71462#[cfg_attr(feature = "derive_clone", derive(Clone))]
71463#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71464pub struct PaymentInstruction47 {
71465	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId", skip_serializing_if = "Option::is_none") )]
71466	pub msg_id: Option<String>,
71467	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
71468	pub reqd_exctn_dt: Option<DateAndDateTime2Choice>,
71469	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
71470	pub sts: Option<Vec<PaymentStatus6>>,
71471	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAmt", skip_serializing_if = "Option::is_none") )]
71472	pub instd_amt: Option<Amount3Choice>,
71473	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
71474	pub intr_bk_sttlm_amt: Option<Amount2Choice>,
71475	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
71476	pub purp: Option<String>,
71477	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMtd", skip_serializing_if = "Option::is_none") )]
71478	pub pmt_mtd: Option<PaymentOrigin1Choice>,
71479	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
71480	pub prty: Option<Priority1Choice>,
71481	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgVldtyTm", skip_serializing_if = "Option::is_none") )]
71482	pub prcg_vldty_tm: Option<DateTimePeriod1Choice>,
71483	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrCpy", skip_serializing_if = "Option::is_none") )]
71484	pub instr_cpy: Option<String>,
71485	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
71486	pub tp: Option<PaymentType4Choice>,
71487	#[cfg_attr( feature = "derive_serde", serde(rename = "GnrtdOrdr", skip_serializing_if = "Option::is_none") )]
71488	pub gnrtd_ordr: Option<bool>,
71489	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
71490	pub tx_id: Option<String>,
71491	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
71492	pub intr_bk_sttlm_dt: Option<String>,
71493	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId", skip_serializing_if = "Option::is_none") )]
71494	pub end_to_end_id: Option<String>,
71495	#[cfg_attr( feature = "derive_serde", serde(rename = "Pties", skip_serializing_if = "Option::is_none") )]
71496	pub pties: Option<PaymentTransactionParty4>,
71497}
71498
71499impl PaymentInstruction47 {
71500	pub fn validate(&self) -> Result<(), ValidationError> {
71501		if let Some(ref val) = self.msg_id {
71502			if val.chars().count() < 1 {
71503				return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
71504			}
71505			if val.chars().count() > 35 {
71506				return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
71507			}
71508		}
71509		if let Some(ref val) = self.reqd_exctn_dt { val.validate()? }
71510		if let Some(ref vec) = self.sts { for item in vec { item.validate()? } }
71511		if let Some(ref val) = self.instd_amt { val.validate()? }
71512		if let Some(ref val) = self.intr_bk_sttlm_amt { val.validate()? }
71513		if let Some(ref val) = self.purp {
71514			if val.chars().count() < 1 {
71515				return Err(ValidationError::new(1001, "purp is shorter than the minimum length of 1".to_string()));
71516			}
71517			if val.chars().count() > 10 {
71518				return Err(ValidationError::new(1002, "purp exceeds the maximum length of 10".to_string()));
71519			}
71520		}
71521		if let Some(ref val) = self.pmt_mtd { val.validate()? }
71522		if let Some(ref val) = self.prty { val.validate()? }
71523		if let Some(ref val) = self.prcg_vldty_tm { val.validate()? }
71524		if let Some(ref val) = self.instr_cpy {
71525			if val.chars().count() < 1 {
71526				return Err(ValidationError::new(1001, "instr_cpy is shorter than the minimum length of 1".to_string()));
71527			}
71528			if val.chars().count() > 20000 {
71529				return Err(ValidationError::new(1002, "instr_cpy exceeds the maximum length of 20000".to_string()));
71530			}
71531		}
71532		if let Some(ref val) = self.tp { val.validate()? }
71533		if let Some(ref val) = self.tx_id {
71534			if val.chars().count() < 1 {
71535				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
71536			}
71537			if val.chars().count() > 35 {
71538				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
71539			}
71540		}
71541		if let Some(ref val) = self.end_to_end_id {
71542			if val.chars().count() < 1 {
71543				return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
71544			}
71545			if val.chars().count() > 35 {
71546				return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
71547			}
71548		}
71549		if let Some(ref val) = self.pties { val.validate()? }
71550		Ok(())
71551	}
71552}
71553
71554
71555// PaymentInstrument16 ...
71556#[cfg_attr(feature = "derive_debug", derive(Debug))]
71557#[cfg_attr(feature = "derive_default", derive(Default))]
71558#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71559#[cfg_attr(feature = "derive_clone", derive(Clone))]
71560#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71561pub struct PaymentInstrument16 {
71562	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrTp") )]
71563	pub ordr_tp: FundOrderType5Choice,
71564	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrmTp") )]
71565	pub instrm_tp: FundPaymentType1Choice,
71566	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
71567	pub addtl_inf: Option<Vec<AdditionalInformation15>>,
71568}
71569
71570impl PaymentInstrument16 {
71571	pub fn validate(&self) -> Result<(), ValidationError> {
71572		self.ordr_tp.validate()?;
71573		self.instrm_tp.validate()?;
71574		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
71575		Ok(())
71576	}
71577}
71578
71579
71580// PaymentInstrument17 ...
71581#[cfg_attr(feature = "derive_debug", derive(Debug))]
71582#[cfg_attr(feature = "derive_default", derive(Default))]
71583#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71584#[cfg_attr(feature = "derive_clone", derive(Clone))]
71585#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71586pub struct PaymentInstrument17 {
71587	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcy") )]
71588	pub sttlm_ccy: String,
71589	#[cfg_attr( feature = "derive_serde", serde(rename = "DvddPctg", skip_serializing_if = "Option::is_none") )]
71590	pub dvdd_pctg: Option<f64>,
71591	#[cfg_attr( feature = "derive_serde", serde(rename = "SbcptPmtInstrm", skip_serializing_if = "Option::is_none") )]
71592	pub sbcpt_pmt_instrm: Option<PaymentInstrument24Choice>,
71593	#[cfg_attr( feature = "derive_serde", serde(rename = "RedPmtInstrm", skip_serializing_if = "Option::is_none") )]
71594	pub red_pmt_instrm: Option<PaymentInstrument19Choice>,
71595	#[cfg_attr( feature = "derive_serde", serde(rename = "DvddPmtInstrm", skip_serializing_if = "Option::is_none") )]
71596	pub dvdd_pmt_instrm: Option<PaymentInstrument19Choice>,
71597	#[cfg_attr( feature = "derive_serde", serde(rename = "SvgsPlanPmtInstrm", skip_serializing_if = "Option::is_none") )]
71598	pub svgs_plan_pmt_instrm: Option<PaymentInstrument24Choice>,
71599	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstPmtInstrm", skip_serializing_if = "Option::is_none") )]
71600	pub intrst_pmt_instrm: Option<PaymentInstrument19Choice>,
71601}
71602
71603impl PaymentInstrument17 {
71604	pub fn validate(&self) -> Result<(), ValidationError> {
71605		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
71606		if !pattern.is_match(&self.sttlm_ccy) {
71607			return Err(ValidationError::new(1005, "sttlm_ccy does not match the required pattern".to_string()));
71608		}
71609		if let Some(ref val) = self.dvdd_pctg {
71610			if *val < 0.000000 {
71611				return Err(ValidationError::new(1003, "dvdd_pctg is less than the minimum value of 0.000000".to_string()));
71612			}
71613			if *val > 100.000000 {
71614				return Err(ValidationError::new(1004, "dvdd_pctg exceeds the maximum value of 100.000000".to_string()));
71615			}
71616		}
71617		if let Some(ref val) = self.sbcpt_pmt_instrm { val.validate()? }
71618		if let Some(ref val) = self.red_pmt_instrm { val.validate()? }
71619		if let Some(ref val) = self.dvdd_pmt_instrm { val.validate()? }
71620		if let Some(ref val) = self.svgs_plan_pmt_instrm { val.validate()? }
71621		if let Some(ref val) = self.intrst_pmt_instrm { val.validate()? }
71622		Ok(())
71623	}
71624}
71625
71626
71627// PaymentInstrument19Choice ...
71628#[cfg_attr(feature = "derive_debug", derive(Debug))]
71629#[cfg_attr(feature = "derive_default", derive(Default))]
71630#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71631#[cfg_attr(feature = "derive_clone", derive(Clone))]
71632#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71633pub struct PaymentInstrument19Choice {
71634	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqDtls", skip_serializing_if = "Option::is_none") )]
71635	pub chq_dtls: Option<Cheque4>,
71636	#[cfg_attr( feature = "derive_serde", serde(rename = "BkrsDrftDtls", skip_serializing_if = "Option::is_none") )]
71637	pub bkrs_drft_dtls: Option<Cheque4>,
71638}
71639
71640impl PaymentInstrument19Choice {
71641	pub fn validate(&self) -> Result<(), ValidationError> {
71642		if let Some(ref val) = self.chq_dtls { val.validate()? }
71643		if let Some(ref val) = self.bkrs_drft_dtls { val.validate()? }
71644		Ok(())
71645	}
71646}
71647
71648
71649// PaymentInstrument1Code ...
71650#[cfg_attr(feature = "derive_debug", derive(Debug))]
71651#[cfg_attr(feature = "derive_default", derive(Default))]
71652#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71653#[cfg_attr(feature = "derive_clone", derive(Clone))]
71654#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71655pub enum PaymentInstrument1Code {
71656	#[cfg_attr(feature = "derive_default", default)]
71657	#[cfg_attr( feature = "derive_serde", serde(rename = "BDT") )]
71658	CodeBDT,
71659	#[cfg_attr( feature = "derive_serde", serde(rename = "BCT") )]
71660	CodeBCT,
71661	#[cfg_attr( feature = "derive_serde", serde(rename = "CDT") )]
71662	CodeCDT,
71663	#[cfg_attr( feature = "derive_serde", serde(rename = "CCT") )]
71664	CodeCCT,
71665	#[cfg_attr( feature = "derive_serde", serde(rename = "CHK") )]
71666	CodeCHK,
71667	#[cfg_attr( feature = "derive_serde", serde(rename = "BKT") )]
71668	CodeBKT,
71669	#[cfg_attr( feature = "derive_serde", serde(rename = "DCP") )]
71670	CodeDCP,
71671	#[cfg_attr( feature = "derive_serde", serde(rename = "CCP") )]
71672	CodeCCP,
71673	#[cfg_attr( feature = "derive_serde", serde(rename = "RTI") )]
71674	CodeRTI,
71675	#[cfg_attr( feature = "derive_serde", serde(rename = "CAN") )]
71676	CodeCAN,
71677}
71678
71679impl PaymentInstrument1Code {
71680	pub fn validate(&self) -> Result<(), ValidationError> {
71681		Ok(())
71682	}
71683}
71684
71685
71686// PaymentInstrument24Choice ...
71687#[cfg_attr(feature = "derive_debug", derive(Debug))]
71688#[cfg_attr(feature = "derive_default", derive(Default))]
71689#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71690#[cfg_attr(feature = "derive_clone", derive(Clone))]
71691#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71692pub struct PaymentInstrument24Choice {
71693	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtCardDtls", skip_serializing_if = "Option::is_none") )]
71694	pub pmt_card_dtls: Option<PaymentCard29>,
71695	#[cfg_attr( feature = "derive_serde", serde(rename = "DrctDbtDtls", skip_serializing_if = "Option::is_none") )]
71696	pub drct_dbt_dtls: Option<DirectDebitMandate7>,
71697	#[cfg_attr( feature = "derive_serde", serde(rename = "Chq", skip_serializing_if = "Option::is_none") )]
71698	pub chq: Option<bool>,
71699	#[cfg_attr( feature = "derive_serde", serde(rename = "BkrsDrft", skip_serializing_if = "Option::is_none") )]
71700	pub bkrs_drft: Option<bool>,
71701}
71702
71703impl PaymentInstrument24Choice {
71704	pub fn validate(&self) -> Result<(), ValidationError> {
71705		if let Some(ref val) = self.pmt_card_dtls { val.validate()? }
71706		if let Some(ref val) = self.drct_dbt_dtls { val.validate()? }
71707		Ok(())
71708	}
71709}
71710
71711
71712// PaymentInstrumentType1 ...
71713#[cfg_attr(feature = "derive_debug", derive(Debug))]
71714#[cfg_attr(feature = "derive_default", derive(Default))]
71715#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71716#[cfg_attr(feature = "derive_clone", derive(Clone))]
71717#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71718pub struct PaymentInstrumentType1 {
71719	#[cfg_attr( feature = "derive_serde", serde(rename = "CardNb") )]
71720	pub card_nb: String,
71721	#[cfg_attr( feature = "derive_serde", serde(rename = "AuthrtyReqTp") )]
71722	pub authrty_req_tp: Vec<AuthorityRequestType1>,
71723	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
71724	pub addtl_inf: Option<String>,
71725}
71726
71727impl PaymentInstrumentType1 {
71728	pub fn validate(&self) -> Result<(), ValidationError> {
71729		let pattern = Regex::new("[0-9]{8,28}").unwrap();
71730		if !pattern.is_match(&self.card_nb) {
71731			return Err(ValidationError::new(1005, "card_nb does not match the required pattern".to_string()));
71732		}
71733		for item in &self.authrty_req_tp { item.validate()? }
71734		if let Some(ref val) = self.addtl_inf {
71735			if val.chars().count() < 1 {
71736				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
71737			}
71738			if val.chars().count() > 500 {
71739				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 500".to_string()));
71740			}
71741		}
71742		Ok(())
71743	}
71744}
71745
71746
71747// PaymentMethod2Code ...
71748#[cfg_attr(feature = "derive_debug", derive(Debug))]
71749#[cfg_attr(feature = "derive_default", derive(Default))]
71750#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71751#[cfg_attr(feature = "derive_clone", derive(Clone))]
71752#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71753pub enum PaymentMethod2Code {
71754	#[cfg_attr(feature = "derive_default", default)]
71755	#[cfg_attr( feature = "derive_serde", serde(rename = "DD") )]
71756	CodeDD,
71757}
71758
71759impl PaymentMethod2Code {
71760	pub fn validate(&self) -> Result<(), ValidationError> {
71761		Ok(())
71762	}
71763}
71764
71765
71766// PaymentMethod3Code ...
71767#[cfg_attr(feature = "derive_debug", derive(Debug))]
71768#[cfg_attr(feature = "derive_default", derive(Default))]
71769#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71770#[cfg_attr(feature = "derive_clone", derive(Clone))]
71771#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71772pub enum PaymentMethod3Code {
71773	#[cfg_attr(feature = "derive_default", default)]
71774	#[cfg_attr( feature = "derive_serde", serde(rename = "CHK") )]
71775	CodeCHK,
71776	#[cfg_attr( feature = "derive_serde", serde(rename = "TRF") )]
71777	CodeTRF,
71778	#[cfg_attr( feature = "derive_serde", serde(rename = "TRA") )]
71779	CodeTRA,
71780}
71781
71782impl PaymentMethod3Code {
71783	pub fn validate(&self) -> Result<(), ValidationError> {
71784		Ok(())
71785	}
71786}
71787
71788
71789// PaymentMethod4Code ...
71790#[cfg_attr(feature = "derive_debug", derive(Debug))]
71791#[cfg_attr(feature = "derive_default", derive(Default))]
71792#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71793#[cfg_attr(feature = "derive_clone", derive(Clone))]
71794#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71795pub enum PaymentMethod4Code {
71796	#[cfg_attr(feature = "derive_default", default)]
71797	#[cfg_attr( feature = "derive_serde", serde(rename = "CHK") )]
71798	CodeCHK,
71799	#[cfg_attr( feature = "derive_serde", serde(rename = "TRF") )]
71800	CodeTRF,
71801	#[cfg_attr( feature = "derive_serde", serde(rename = "DD") )]
71802	CodeDD,
71803	#[cfg_attr( feature = "derive_serde", serde(rename = "TRA") )]
71804	CodeTRA,
71805}
71806
71807impl PaymentMethod4Code {
71808	pub fn validate(&self) -> Result<(), ValidationError> {
71809		Ok(())
71810	}
71811}
71812
71813
71814// PaymentMethod7Code ...
71815#[cfg_attr(feature = "derive_debug", derive(Debug))]
71816#[cfg_attr(feature = "derive_default", derive(Default))]
71817#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71818#[cfg_attr(feature = "derive_clone", derive(Clone))]
71819#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71820pub enum PaymentMethod7Code {
71821	#[cfg_attr(feature = "derive_default", default)]
71822	#[cfg_attr( feature = "derive_serde", serde(rename = "CHK") )]
71823	CodeCHK,
71824	#[cfg_attr( feature = "derive_serde", serde(rename = "TRF") )]
71825	CodeTRF,
71826}
71827
71828impl PaymentMethod7Code {
71829	pub fn validate(&self) -> Result<(), ValidationError> {
71830		Ok(())
71831	}
71832}
71833
71834
71835// PaymentOrigin1Choice ...
71836#[cfg_attr(feature = "derive_debug", derive(Debug))]
71837#[cfg_attr(feature = "derive_default", derive(Default))]
71838#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71839#[cfg_attr(feature = "derive_clone", derive(Clone))]
71840#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71841pub struct PaymentOrigin1Choice {
71842	#[cfg_attr( feature = "derive_serde", serde(rename = "FINMT", skip_serializing_if = "Option::is_none") )]
71843	pub finmt: Option<String>,
71844	#[cfg_attr( feature = "derive_serde", serde(rename = "XMLMsgNm", skip_serializing_if = "Option::is_none") )]
71845	pub xml_msg_nm: Option<String>,
71846	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
71847	pub prtry: Option<String>,
71848	#[cfg_attr( feature = "derive_serde", serde(rename = "Instrm", skip_serializing_if = "Option::is_none") )]
71849	pub instrm: Option<PaymentInstrument1Code>,
71850}
71851
71852impl PaymentOrigin1Choice {
71853	pub fn validate(&self) -> Result<(), ValidationError> {
71854		if let Some(ref val) = self.finmt {
71855			let pattern = Regex::new("[0-9]{1,3}").unwrap();
71856			if !pattern.is_match(val) {
71857				return Err(ValidationError::new(1005, "finmt does not match the required pattern".to_string()));
71858			}
71859		}
71860		if let Some(ref val) = self.xml_msg_nm {
71861			if val.chars().count() < 1 {
71862				return Err(ValidationError::new(1001, "xml_msg_nm is shorter than the minimum length of 1".to_string()));
71863			}
71864			if val.chars().count() > 35 {
71865				return Err(ValidationError::new(1002, "xml_msg_nm exceeds the maximum length of 35".to_string()));
71866			}
71867		}
71868		if let Some(ref val) = self.prtry {
71869			if val.chars().count() < 1 {
71870				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
71871			}
71872			if val.chars().count() > 35 {
71873				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
71874			}
71875		}
71876		if let Some(ref val) = self.instrm { val.validate()? }
71877		Ok(())
71878	}
71879}
71880
71881
71882// PaymentReceipt1Code ...
71883#[cfg_attr(feature = "derive_debug", derive(Debug))]
71884#[cfg_attr(feature = "derive_default", derive(Default))]
71885#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71886#[cfg_attr(feature = "derive_clone", derive(Clone))]
71887#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71888pub enum PaymentReceipt1Code {
71889	#[cfg_attr(feature = "derive_default", default)]
71890	#[cfg_attr( feature = "derive_serde", serde(rename = "PAYM") )]
71891	CodePAYM,
71892	#[cfg_attr( feature = "derive_serde", serde(rename = "RECE") )]
71893	CodeRECE,
71894	#[cfg_attr( feature = "derive_serde", serde(rename = "NONE") )]
71895	CodeNONE,
71896}
71897
71898impl PaymentReceipt1Code {
71899	pub fn validate(&self) -> Result<(), ValidationError> {
71900		Ok(())
71901	}
71902}
71903
71904
71905// PaymentReturnCriteria4 ...
71906#[cfg_attr(feature = "derive_debug", derive(Debug))]
71907#[cfg_attr(feature = "derive_default", derive(Default))]
71908#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71909#[cfg_attr(feature = "derive_clone", derive(Clone))]
71910#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71911pub struct PaymentReturnCriteria4 {
71912	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgIdInd", skip_serializing_if = "Option::is_none") )]
71913	pub msg_id_ind: Option<bool>,
71914	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDtInd", skip_serializing_if = "Option::is_none") )]
71915	pub reqd_exctn_dt_ind: Option<bool>,
71916	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrInd", skip_serializing_if = "Option::is_none") )]
71917	pub instr_ind: Option<bool>,
71918	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrStsRtrCrit", skip_serializing_if = "Option::is_none") )]
71919	pub instr_sts_rtr_crit: Option<InstructionStatusReturnCriteria1>,
71920	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAmtInd", skip_serializing_if = "Option::is_none") )]
71921	pub instd_amt_ind: Option<bool>,
71922	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
71923	pub cdt_dbt_ind: Option<bool>,
71924	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmtInd", skip_serializing_if = "Option::is_none") )]
71925	pub intr_bk_sttlm_amt_ind: Option<bool>,
71926	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtyInd", skip_serializing_if = "Option::is_none") )]
71927	pub prty_ind: Option<bool>,
71928	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgVldtyTmInd", skip_serializing_if = "Option::is_none") )]
71929	pub prcg_vldty_tm_ind: Option<bool>,
71930	#[cfg_attr( feature = "derive_serde", serde(rename = "PurpInd", skip_serializing_if = "Option::is_none") )]
71931	pub purp_ind: Option<bool>,
71932	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrCpyInd", skip_serializing_if = "Option::is_none") )]
71933	pub instr_cpy_ind: Option<bool>,
71934	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMTInd", skip_serializing_if = "Option::is_none") )]
71935	pub pmt_mt_ind: Option<bool>,
71936	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInd", skip_serializing_if = "Option::is_none") )]
71937	pub pmt_tp_ind: Option<bool>,
71938	#[cfg_attr( feature = "derive_serde", serde(rename = "TxIdInd", skip_serializing_if = "Option::is_none") )]
71939	pub tx_id_ind: Option<bool>,
71940	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDtInd", skip_serializing_if = "Option::is_none") )]
71941	pub intr_bk_sttlm_dt_ind: Option<bool>,
71942	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndIdInd", skip_serializing_if = "Option::is_none") )]
71943	pub end_to_end_id_ind: Option<bool>,
71944	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMtdInd", skip_serializing_if = "Option::is_none") )]
71945	pub pmt_mtd_ind: Option<bool>,
71946	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrInd", skip_serializing_if = "Option::is_none") )]
71947	pub dbtr_ind: Option<bool>,
71948	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtInd", skip_serializing_if = "Option::is_none") )]
71949	pub dbtr_agt_ind: Option<bool>,
71950	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgRmbrsmntAgtInd", skip_serializing_if = "Option::is_none") )]
71951	pub instg_rmbrsmnt_agt_ind: Option<bool>,
71952	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdRmbrsmntAgtInd", skip_serializing_if = "Option::is_none") )]
71953	pub instd_rmbrsmnt_agt_ind: Option<bool>,
71954	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyInd", skip_serializing_if = "Option::is_none") )]
71955	pub intrmy_ind: Option<bool>,
71956	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtInd", skip_serializing_if = "Option::is_none") )]
71957	pub cdtr_agt_ind: Option<bool>,
71958	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrInd", skip_serializing_if = "Option::is_none") )]
71959	pub cdtr_ind: Option<bool>,
71960}
71961
71962impl PaymentReturnCriteria4 {
71963	pub fn validate(&self) -> Result<(), ValidationError> {
71964		if let Some(ref val) = self.instr_sts_rtr_crit { val.validate()? }
71965		Ok(())
71966	}
71967}
71968
71969
71970// PaymentReturnReason7 ...
71971#[cfg_attr(feature = "derive_debug", derive(Debug))]
71972#[cfg_attr(feature = "derive_default", derive(Default))]
71973#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
71974#[cfg_attr(feature = "derive_clone", derive(Clone))]
71975#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
71976pub struct PaymentReturnReason7 {
71977	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
71978	pub orgtr: Option<PartyIdentification272>,
71979	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
71980	pub rsn: Option<ReturnReason5Choice>,
71981	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
71982	pub addtl_inf: Option<Vec<String>>,
71983}
71984
71985impl PaymentReturnReason7 {
71986	pub fn validate(&self) -> Result<(), ValidationError> {
71987		if let Some(ref val) = self.orgtr { val.validate()? }
71988		if let Some(ref val) = self.rsn { val.validate()? }
71989		if let Some(ref vec) = self.addtl_inf {
71990			for item in vec {
71991				if item.chars().count() < 1 {
71992					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
71993				}
71994				if item.chars().count() > 105 {
71995					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
71996				}
71997			}
71998		}
71999		Ok(())
72000	}
72001}
72002
72003
72004// PaymentReturnReason8 ...
72005#[cfg_attr(feature = "derive_debug", derive(Debug))]
72006#[cfg_attr(feature = "derive_default", derive(Default))]
72007#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72008#[cfg_attr(feature = "derive_clone", derive(Clone))]
72009#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72010pub struct PaymentReturnReason8 {
72011	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlBkTxCd", skip_serializing_if = "Option::is_none") )]
72012	pub orgnl_bk_tx_cd: Option<BankTransactionCodeStructure4>,
72013	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
72014	pub orgtr: Option<PartyIdentification272>,
72015	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
72016	pub rsn: Option<ReturnReason5Choice>,
72017	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
72018	pub addtl_inf: Option<Vec<String>>,
72019}
72020
72021impl PaymentReturnReason8 {
72022	pub fn validate(&self) -> Result<(), ValidationError> {
72023		if let Some(ref val) = self.orgnl_bk_tx_cd { val.validate()? }
72024		if let Some(ref val) = self.orgtr { val.validate()? }
72025		if let Some(ref val) = self.rsn { val.validate()? }
72026		if let Some(ref vec) = self.addtl_inf {
72027			for item in vec {
72028				if item.chars().count() < 1 {
72029					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
72030				}
72031				if item.chars().count() > 105 {
72032					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
72033				}
72034			}
72035		}
72036		Ok(())
72037	}
72038}
72039
72040
72041// PaymentReversalReason10 ...
72042#[cfg_attr(feature = "derive_debug", derive(Debug))]
72043#[cfg_attr(feature = "derive_default", derive(Default))]
72044#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72045#[cfg_attr(feature = "derive_clone", derive(Clone))]
72046#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72047pub struct PaymentReversalReason10 {
72048	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
72049	pub orgtr: Option<PartyIdentification272>,
72050	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
72051	pub rsn: Option<ReversalReason4Choice>,
72052	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
72053	pub addtl_inf: Option<Vec<String>>,
72054}
72055
72056impl PaymentReversalReason10 {
72057	pub fn validate(&self) -> Result<(), ValidationError> {
72058		if let Some(ref val) = self.orgtr { val.validate()? }
72059		if let Some(ref val) = self.rsn { val.validate()? }
72060		if let Some(ref vec) = self.addtl_inf {
72061			for item in vec {
72062				if item.chars().count() < 1 {
72063					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
72064				}
72065				if item.chars().count() > 105 {
72066					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
72067				}
72068			}
72069		}
72070		Ok(())
72071	}
72072}
72073
72074
72075// PaymentRole1Choice ...
72076#[cfg_attr(feature = "derive_debug", derive(Debug))]
72077#[cfg_attr(feature = "derive_default", derive(Default))]
72078#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72079#[cfg_attr(feature = "derive_clone", derive(Clone))]
72080#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72081pub struct PaymentRole1Choice {
72082	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
72083	pub cd: Option<String>,
72084	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
72085	pub prtry: Option<String>,
72086}
72087
72088impl PaymentRole1Choice {
72089	pub fn validate(&self) -> Result<(), ValidationError> {
72090		if let Some(ref val) = self.cd {
72091			if val.chars().count() < 1 {
72092				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
72093			}
72094			if val.chars().count() > 4 {
72095				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
72096			}
72097		}
72098		if let Some(ref val) = self.prtry {
72099			if val.chars().count() < 1 {
72100				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
72101			}
72102			if val.chars().count() > 35 {
72103				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
72104			}
72105		}
72106		Ok(())
72107	}
72108}
72109
72110
72111// PaymentRole1Code ...
72112#[cfg_attr(feature = "derive_debug", derive(Debug))]
72113#[cfg_attr(feature = "derive_default", derive(Default))]
72114#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72115#[cfg_attr(feature = "derive_clone", derive(Clone))]
72116#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72117pub enum PaymentRole1Code {
72118	#[cfg_attr(feature = "derive_default", default)]
72119	#[cfg_attr( feature = "derive_serde", serde(rename = "LQMG") )]
72120	CodeLQMG,
72121	#[cfg_attr( feature = "derive_serde", serde(rename = "LMMG") )]
72122	CodeLMMG,
72123	#[cfg_attr( feature = "derive_serde", serde(rename = "PYMG") )]
72124	CodePYMG,
72125	#[cfg_attr( feature = "derive_serde", serde(rename = "REDR") )]
72126	CodeREDR,
72127	#[cfg_attr( feature = "derive_serde", serde(rename = "BKMG") )]
72128	CodeBKMG,
72129	#[cfg_attr( feature = "derive_serde", serde(rename = "STMG") )]
72130	CodeSTMG,
72131}
72132
72133impl PaymentRole1Code {
72134	pub fn validate(&self) -> Result<(), ValidationError> {
72135		Ok(())
72136	}
72137}
72138
72139
72140// PaymentSchedule1 ...
72141#[cfg_attr(feature = "derive_debug", derive(Debug))]
72142#[cfg_attr(feature = "derive_default", derive(Default))]
72143#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72144#[cfg_attr(feature = "derive_clone", derive(Clone))]
72145#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72146pub struct PaymentSchedule1 {
72147	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtSchdlId", skip_serializing_if = "Option::is_none") )]
72148	pub pmt_schdl_id: Option<String>,
72149	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
72150	pub amt: Option<ActiveCurrencyAndAmount>,
72151	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdDt", skip_serializing_if = "Option::is_none") )]
72152	pub xpctd_dt: Option<String>,
72153	#[cfg_attr( feature = "derive_serde", serde(rename = "DueDt", skip_serializing_if = "Option::is_none") )]
72154	pub due_dt: Option<String>,
72155	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
72156	pub addtl_inf: Option<String>,
72157}
72158
72159impl PaymentSchedule1 {
72160	pub fn validate(&self) -> Result<(), ValidationError> {
72161		if let Some(ref val) = self.pmt_schdl_id {
72162			if val.chars().count() < 1 {
72163				return Err(ValidationError::new(1001, "pmt_schdl_id is shorter than the minimum length of 1".to_string()));
72164			}
72165			if val.chars().count() > 35 {
72166				return Err(ValidationError::new(1002, "pmt_schdl_id exceeds the maximum length of 35".to_string()));
72167			}
72168		}
72169		if let Some(ref val) = self.amt { val.validate()? }
72170		if let Some(ref val) = self.addtl_inf {
72171			if val.chars().count() < 1 {
72172				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
72173			}
72174			if val.chars().count() > 1025 {
72175				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 1025".to_string()));
72176			}
72177		}
72178		Ok(())
72179	}
72180}
72181
72182
72183// PaymentScheduleType2Choice ...
72184#[cfg_attr(feature = "derive_debug", derive(Debug))]
72185#[cfg_attr(feature = "derive_default", derive(Default))]
72186#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72187#[cfg_attr(feature = "derive_clone", derive(Clone))]
72188#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72189pub struct PaymentScheduleType2Choice {
72190	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
72191	pub cd: Option<PaymentScheduleType2Code>,
72192	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
72193	pub prtry: Option<String>,
72194}
72195
72196impl PaymentScheduleType2Choice {
72197	pub fn validate(&self) -> Result<(), ValidationError> {
72198		if let Some(ref val) = self.cd { val.validate()? }
72199		if let Some(ref val) = self.prtry {
72200			if val.chars().count() < 1 {
72201				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
72202			}
72203			if val.chars().count() > 35 {
72204				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
72205			}
72206		}
72207		Ok(())
72208	}
72209}
72210
72211
72212// PaymentScheduleType2Code ...
72213#[cfg_attr(feature = "derive_debug", derive(Debug))]
72214#[cfg_attr(feature = "derive_default", derive(Default))]
72215#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72216#[cfg_attr(feature = "derive_clone", derive(Clone))]
72217#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72218pub enum PaymentScheduleType2Code {
72219	#[cfg_attr(feature = "derive_default", default)]
72220	#[cfg_attr( feature = "derive_serde", serde(rename = "CNTR") )]
72221	CodeCNTR,
72222	#[cfg_attr( feature = "derive_serde", serde(rename = "ESTM") )]
72223	CodeESTM,
72224	#[cfg_attr( feature = "derive_serde", serde(rename = "BOTH") )]
72225	CodeBOTH,
72226}
72227
72228impl PaymentScheduleType2Code {
72229	pub fn validate(&self) -> Result<(), ValidationError> {
72230		Ok(())
72231	}
72232}
72233
72234
72235// PaymentSearch10 ...
72236#[cfg_attr(feature = "derive_debug", derive(Debug))]
72237#[cfg_attr(feature = "derive_default", derive(Default))]
72238#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72239#[cfg_attr(feature = "derive_clone", derive(Clone))]
72240#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72241pub struct PaymentSearch10 {
72242	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId", skip_serializing_if = "Option::is_none") )]
72243	pub msg_id: Option<Vec<String>>,
72244	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
72245	pub reqd_exctn_dt: Option<Vec<DateAndDateTimeSearch3Choice>>,
72246	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtId", skip_serializing_if = "Option::is_none") )]
72247	pub pmt_id: Option<Vec<PaymentIdentification8Choice>>,
72248	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
72249	pub sts: Option<Vec<InstructionStatusSearch5>>,
72250	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAmt", skip_serializing_if = "Option::is_none") )]
72251	pub instd_amt: Option<Vec<ActiveOrHistoricAmountRange2Choice>>,
72252	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAmtCcy", skip_serializing_if = "Option::is_none") )]
72253	pub instd_amt_ccy: Option<Vec<String>>,
72254	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
72255	pub cdt_dbt_ind: Option<CreditDebitCode>,
72256	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
72257	pub intr_bk_sttlm_amt: Option<Vec<ActiveAmountRange3Choice>>,
72258	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmtCcy", skip_serializing_if = "Option::is_none") )]
72259	pub intr_bk_sttlm_amt_ccy: Option<Vec<String>>,
72260	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtMtd", skip_serializing_if = "Option::is_none") )]
72261	pub pmt_mtd: Option<Vec<PaymentOrigin1Choice>>,
72262	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTp", skip_serializing_if = "Option::is_none") )]
72263	pub pmt_tp: Option<Vec<PaymentType4Choice>>,
72264	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
72265	pub prty: Option<Vec<Priority1Choice>>,
72266	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgVldtyTm", skip_serializing_if = "Option::is_none") )]
72267	pub prcg_vldty_tm: Option<Vec<DateTimePeriod1Choice>>,
72268	#[cfg_attr( feature = "derive_serde", serde(rename = "Instr", skip_serializing_if = "Option::is_none") )]
72269	pub instr: Option<Vec<Instruction1Code>>,
72270	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
72271	pub tx_id: Option<Vec<String>>,
72272	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
72273	pub uetr: Option<Vec<String>>,
72274	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
72275	pub intr_bk_sttlm_dt: Option<Vec<String>>,
72276	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId", skip_serializing_if = "Option::is_none") )]
72277	pub end_to_end_id: Option<Vec<String>>,
72278	#[cfg_attr( feature = "derive_serde", serde(rename = "Pties", skip_serializing_if = "Option::is_none") )]
72279	pub pties: Option<PaymentTransactionParty4>,
72280}
72281
72282impl PaymentSearch10 {
72283	pub fn validate(&self) -> Result<(), ValidationError> {
72284		if let Some(ref vec) = self.msg_id {
72285			for item in vec {
72286				if item.chars().count() < 1 {
72287					return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
72288				}
72289				if item.chars().count() > 35 {
72290					return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
72291				}
72292			}
72293		}
72294		if let Some(ref vec) = self.reqd_exctn_dt { for item in vec { item.validate()? } }
72295		if let Some(ref vec) = self.pmt_id { for item in vec { item.validate()? } }
72296		if let Some(ref vec) = self.sts { for item in vec { item.validate()? } }
72297		if let Some(ref vec) = self.instd_amt { for item in vec { item.validate()? } }
72298		if let Some(ref vec) = self.instd_amt_ccy {
72299			for item in vec {
72300				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
72301				if !pattern.is_match(&item) {
72302					return Err(ValidationError::new(1005, "instd_amt_ccy does not match the required pattern".to_string()));
72303				}
72304			}
72305		}
72306		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
72307		if let Some(ref vec) = self.intr_bk_sttlm_amt { for item in vec { item.validate()? } }
72308		if let Some(ref vec) = self.intr_bk_sttlm_amt_ccy {
72309			for item in vec {
72310				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
72311				if !pattern.is_match(&item) {
72312					return Err(ValidationError::new(1005, "intr_bk_sttlm_amt_ccy does not match the required pattern".to_string()));
72313				}
72314			}
72315		}
72316		if let Some(ref vec) = self.pmt_mtd { for item in vec { item.validate()? } }
72317		if let Some(ref vec) = self.pmt_tp { for item in vec { item.validate()? } }
72318		if let Some(ref vec) = self.prty { for item in vec { item.validate()? } }
72319		if let Some(ref vec) = self.prcg_vldty_tm { for item in vec { item.validate()? } }
72320		if let Some(ref vec) = self.instr { for item in vec { item.validate()? } }
72321		if let Some(ref vec) = self.tx_id {
72322			for item in vec {
72323				if item.chars().count() < 1 {
72324					return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
72325				}
72326				if item.chars().count() > 35 {
72327					return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
72328				}
72329			}
72330		}
72331		if let Some(ref vec) = self.uetr {
72332			for item in vec {
72333				let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
72334				if !pattern.is_match(&item) {
72335					return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
72336				}
72337			}
72338		}
72339		if let Some(ref vec) = self.end_to_end_id {
72340			for item in vec {
72341				if item.chars().count() < 1 {
72342					return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
72343				}
72344				if item.chars().count() > 35 {
72345					return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
72346				}
72347			}
72348		}
72349		if let Some(ref val) = self.pties { val.validate()? }
72350		Ok(())
72351	}
72352}
72353
72354
72355// PaymentStatus6 ...
72356#[cfg_attr(feature = "derive_debug", derive(Debug))]
72357#[cfg_attr(feature = "derive_default", derive(Default))]
72358#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72359#[cfg_attr(feature = "derive_clone", derive(Clone))]
72360#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72361pub struct PaymentStatus6 {
72362	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
72363	pub cd: Option<PaymentStatusCode6Choice>,
72364	#[cfg_attr( feature = "derive_serde", serde(rename = "DtTm", skip_serializing_if = "Option::is_none") )]
72365	pub dt_tm: Option<DateAndDateTime2Choice>,
72366	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
72367	pub rsn: Option<Vec<PaymentStatusReason1Choice>>,
72368}
72369
72370impl PaymentStatus6 {
72371	pub fn validate(&self) -> Result<(), ValidationError> {
72372		if let Some(ref val) = self.cd { val.validate()? }
72373		if let Some(ref val) = self.dt_tm { val.validate()? }
72374		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
72375		Ok(())
72376	}
72377}
72378
72379
72380// PaymentStatusCode6Choice ...
72381#[cfg_attr(feature = "derive_debug", derive(Debug))]
72382#[cfg_attr(feature = "derive_default", derive(Default))]
72383#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72384#[cfg_attr(feature = "derive_clone", derive(Clone))]
72385#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72386pub struct PaymentStatusCode6Choice {
72387	#[cfg_attr( feature = "derive_serde", serde(rename = "Pdg", skip_serializing_if = "Option::is_none") )]
72388	pub pdg: Option<PendingStatus4Code>,
72389	#[cfg_attr( feature = "derive_serde", serde(rename = "Fnl", skip_serializing_if = "Option::is_none") )]
72390	pub fnl: Option<FinalStatus1Code>,
72391	#[cfg_attr( feature = "derive_serde", serde(rename = "RTGS", skip_serializing_if = "Option::is_none") )]
72392	pub rtgs: Option<String>,
72393	#[cfg_attr( feature = "derive_serde", serde(rename = "Sttlm", skip_serializing_if = "Option::is_none") )]
72394	pub sttlm: Option<String>,
72395	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
72396	pub prtry: Option<String>,
72397}
72398
72399impl PaymentStatusCode6Choice {
72400	pub fn validate(&self) -> Result<(), ValidationError> {
72401		if let Some(ref val) = self.pdg { val.validate()? }
72402		if let Some(ref val) = self.fnl { val.validate()? }
72403		if let Some(ref val) = self.rtgs {
72404			if val.chars().count() < 1 {
72405				return Err(ValidationError::new(1001, "rtgs is shorter than the minimum length of 1".to_string()));
72406			}
72407			if val.chars().count() > 4 {
72408				return Err(ValidationError::new(1002, "rtgs exceeds the maximum length of 4".to_string()));
72409			}
72410			let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
72411			if !pattern.is_match(val) {
72412				return Err(ValidationError::new(1005, "rtgs does not match the required pattern".to_string()));
72413			}
72414		}
72415		if let Some(ref val) = self.sttlm {
72416			if val.chars().count() < 1 {
72417				return Err(ValidationError::new(1001, "sttlm is shorter than the minimum length of 1".to_string()));
72418			}
72419			if val.chars().count() > 4 {
72420				return Err(ValidationError::new(1002, "sttlm exceeds the maximum length of 4".to_string()));
72421			}
72422			let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
72423			if !pattern.is_match(val) {
72424				return Err(ValidationError::new(1005, "sttlm does not match the required pattern".to_string()));
72425			}
72426		}
72427		if let Some(ref val) = self.prtry {
72428			if val.chars().count() < 1 {
72429				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
72430			}
72431			if val.chars().count() > 35 {
72432				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
72433			}
72434		}
72435		Ok(())
72436	}
72437}
72438
72439
72440// PaymentStatusCodeSearch2Choice ...
72441#[cfg_attr(feature = "derive_debug", derive(Debug))]
72442#[cfg_attr(feature = "derive_default", derive(Default))]
72443#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72444#[cfg_attr(feature = "derive_clone", derive(Clone))]
72445#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72446pub struct PaymentStatusCodeSearch2Choice {
72447	#[cfg_attr( feature = "derive_serde", serde(rename = "PdgSts", skip_serializing_if = "Option::is_none") )]
72448	pub pdg_sts: Option<PendingStatus4Code>,
72449	#[cfg_attr( feature = "derive_serde", serde(rename = "FnlSts", skip_serializing_if = "Option::is_none") )]
72450	pub fnl_sts: Option<FinalStatusCode>,
72451	#[cfg_attr( feature = "derive_serde", serde(rename = "PdgAndFnlSts", skip_serializing_if = "Option::is_none") )]
72452	pub pdg_and_fnl_sts: Option<CashPaymentStatus2Code>,
72453}
72454
72455impl PaymentStatusCodeSearch2Choice {
72456	pub fn validate(&self) -> Result<(), ValidationError> {
72457		if let Some(ref val) = self.pdg_sts { val.validate()? }
72458		if let Some(ref val) = self.fnl_sts { val.validate()? }
72459		if let Some(ref val) = self.pdg_and_fnl_sts { val.validate()? }
72460		Ok(())
72461	}
72462}
72463
72464
72465// PaymentStatusReason1Choice ...
72466#[cfg_attr(feature = "derive_debug", derive(Debug))]
72467#[cfg_attr(feature = "derive_default", derive(Default))]
72468#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72469#[cfg_attr(feature = "derive_clone", derive(Clone))]
72470#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72471pub struct PaymentStatusReason1Choice {
72472	#[cfg_attr( feature = "derive_serde", serde(rename = "Umtchd", skip_serializing_if = "Option::is_none") )]
72473	pub umtchd: Option<UnmatchedStatusReason1Code>,
72474	#[cfg_attr( feature = "derive_serde", serde(rename = "Canc", skip_serializing_if = "Option::is_none") )]
72475	pub canc: Option<CancelledStatusReason1Code>,
72476	#[cfg_attr( feature = "derive_serde", serde(rename = "Sspd", skip_serializing_if = "Option::is_none") )]
72477	pub sspd: Option<SuspendedStatusReason1Code>,
72478	#[cfg_attr( feature = "derive_serde", serde(rename = "PdgFlngSttlm", skip_serializing_if = "Option::is_none") )]
72479	pub pdg_flng_sttlm: Option<PendingFailingSettlement1Code>,
72480	#[cfg_attr( feature = "derive_serde", serde(rename = "PdgSttlm", skip_serializing_if = "Option::is_none") )]
72481	pub pdg_sttlm: Option<PendingSettlement2Code>,
72482	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryRjctn", skip_serializing_if = "Option::is_none") )]
72483	pub prtry_rjctn: Option<ProprietaryStatusJustification2>,
72484	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
72485	pub prtry: Option<String>,
72486}
72487
72488impl PaymentStatusReason1Choice {
72489	pub fn validate(&self) -> Result<(), ValidationError> {
72490		if let Some(ref val) = self.umtchd { val.validate()? }
72491		if let Some(ref val) = self.canc { val.validate()? }
72492		if let Some(ref val) = self.sspd { val.validate()? }
72493		if let Some(ref val) = self.pdg_flng_sttlm { val.validate()? }
72494		if let Some(ref val) = self.pdg_sttlm { val.validate()? }
72495		if let Some(ref val) = self.prtry_rjctn { val.validate()? }
72496		if let Some(ref val) = self.prtry {
72497			if val.chars().count() < 1 {
72498				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
72499			}
72500			if val.chars().count() > 35 {
72501				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
72502			}
72503		}
72504		Ok(())
72505	}
72506}
72507
72508
72509// PaymentTransaction130 ...
72510#[cfg_attr(feature = "derive_debug", derive(Debug))]
72511#[cfg_attr(feature = "derive_default", derive(Default))]
72512#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72513#[cfg_attr(feature = "derive_clone", derive(Clone))]
72514#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72515pub struct PaymentTransaction130 {
72516	#[cfg_attr( feature = "derive_serde", serde(rename = "StsId", skip_serializing_if = "Option::is_none") )]
72517	pub sts_id: Option<String>,
72518	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
72519	pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
72520	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
72521	pub orgnl_instr_id: Option<String>,
72522	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
72523	pub orgnl_end_to_end_id: Option<String>,
72524	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxId", skip_serializing_if = "Option::is_none") )]
72525	pub orgnl_tx_id: Option<String>,
72526	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
72527	pub orgnl_uetr: Option<String>,
72528	#[cfg_attr( feature = "derive_serde", serde(rename = "TxSts", skip_serializing_if = "Option::is_none") )]
72529	pub tx_sts: Option<String>,
72530	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsnInf", skip_serializing_if = "Option::is_none") )]
72531	pub sts_rsn_inf: Option<Vec<StatusReasonInformation12>>,
72532	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsInf", skip_serializing_if = "Option::is_none") )]
72533	pub chrgs_inf: Option<Vec<Charges7>>,
72534	#[cfg_attr( feature = "derive_serde", serde(rename = "AccptncDtTm", skip_serializing_if = "Option::is_none") )]
72535	pub accptnc_dt_tm: Option<String>,
72536	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvIntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
72537	pub fctv_intr_bk_sttlm_dt: Option<DateAndDateTime2Choice>,
72538	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrRef", skip_serializing_if = "Option::is_none") )]
72539	pub acct_svcr_ref: Option<String>,
72540	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysRef", skip_serializing_if = "Option::is_none") )]
72541	pub clr_sys_ref: Option<String>,
72542	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
72543	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification6>,
72544	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
72545	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification6>,
72546	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
72547	pub orgnl_tx_ref: Option<OriginalTransactionReference35>,
72548	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
72549	pub splmtry_data: Option<Vec<SupplementaryData1>>,
72550}
72551
72552impl PaymentTransaction130 {
72553	pub fn validate(&self) -> Result<(), ValidationError> {
72554		if let Some(ref val) = self.sts_id {
72555			if val.chars().count() < 1 {
72556				return Err(ValidationError::new(1001, "sts_id is shorter than the minimum length of 1".to_string()));
72557			}
72558			if val.chars().count() > 35 {
72559				return Err(ValidationError::new(1002, "sts_id exceeds the maximum length of 35".to_string()));
72560			}
72561		}
72562		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
72563		if let Some(ref val) = self.orgnl_instr_id {
72564			if val.chars().count() < 1 {
72565				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
72566			}
72567			if val.chars().count() > 35 {
72568				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
72569			}
72570		}
72571		if let Some(ref val) = self.orgnl_end_to_end_id {
72572			if val.chars().count() < 1 {
72573				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
72574			}
72575			if val.chars().count() > 35 {
72576				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
72577			}
72578		}
72579		if let Some(ref val) = self.orgnl_tx_id {
72580			if val.chars().count() < 1 {
72581				return Err(ValidationError::new(1001, "orgnl_tx_id is shorter than the minimum length of 1".to_string()));
72582			}
72583			if val.chars().count() > 35 {
72584				return Err(ValidationError::new(1002, "orgnl_tx_id exceeds the maximum length of 35".to_string()));
72585			}
72586		}
72587		if let Some(ref val) = self.orgnl_uetr {
72588			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
72589			if !pattern.is_match(val) {
72590				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
72591			}
72592		}
72593		if let Some(ref val) = self.tx_sts {
72594			if val.chars().count() < 1 {
72595				return Err(ValidationError::new(1001, "tx_sts is shorter than the minimum length of 1".to_string()));
72596			}
72597			if val.chars().count() > 4 {
72598				return Err(ValidationError::new(1002, "tx_sts exceeds the maximum length of 4".to_string()));
72599			}
72600		}
72601		if let Some(ref vec) = self.sts_rsn_inf { for item in vec { item.validate()? } }
72602		if let Some(ref vec) = self.chrgs_inf { for item in vec { item.validate()? } }
72603		if let Some(ref val) = self.fctv_intr_bk_sttlm_dt { val.validate()? }
72604		if let Some(ref val) = self.acct_svcr_ref {
72605			if val.chars().count() < 1 {
72606				return Err(ValidationError::new(1001, "acct_svcr_ref is shorter than the minimum length of 1".to_string()));
72607			}
72608			if val.chars().count() > 35 {
72609				return Err(ValidationError::new(1002, "acct_svcr_ref exceeds the maximum length of 35".to_string()));
72610			}
72611		}
72612		if let Some(ref val) = self.clr_sys_ref {
72613			if val.chars().count() < 1 {
72614				return Err(ValidationError::new(1001, "clr_sys_ref is shorter than the minimum length of 1".to_string()));
72615			}
72616			if val.chars().count() > 35 {
72617				return Err(ValidationError::new(1002, "clr_sys_ref exceeds the maximum length of 35".to_string()));
72618			}
72619		}
72620		if let Some(ref val) = self.instg_agt { val.validate()? }
72621		if let Some(ref val) = self.instd_agt { val.validate()? }
72622		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
72623		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
72624		Ok(())
72625	}
72626}
72627
72628
72629// PaymentTransaction149 ...
72630#[cfg_attr(feature = "derive_debug", derive(Debug))]
72631#[cfg_attr(feature = "derive_default", derive(Default))]
72632#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72633#[cfg_attr(feature = "derive_clone", derive(Clone))]
72634#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72635pub struct PaymentTransaction149 {
72636	#[cfg_attr( feature = "derive_serde", serde(rename = "RvslId", skip_serializing_if = "Option::is_none") )]
72637	pub rvsl_id: Option<String>,
72638	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
72639	pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
72640	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
72641	pub orgnl_instr_id: Option<String>,
72642	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
72643	pub orgnl_end_to_end_id: Option<String>,
72644	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxId", skip_serializing_if = "Option::is_none") )]
72645	pub orgnl_tx_id: Option<String>,
72646	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
72647	pub orgnl_uetr: Option<String>,
72648	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlClrSysRef", skip_serializing_if = "Option::is_none") )]
72649	pub orgnl_clr_sys_ref: Option<String>,
72650	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
72651	pub orgnl_intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
72652	#[cfg_attr( feature = "derive_serde", serde(rename = "RvsdIntrBkSttlmAmt") )]
72653	pub rvsd_intr_bk_sttlm_amt: ActiveCurrencyAndAmount,
72654	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
72655	pub intr_bk_sttlm_dt: Option<String>,
72656	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmPrty", skip_serializing_if = "Option::is_none") )]
72657	pub sttlm_prty: Option<Priority3Code>,
72658	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmTmIndctn", skip_serializing_if = "Option::is_none") )]
72659	pub sttlm_tm_indctn: Option<SettlementDateTimeIndication1>,
72660	#[cfg_attr( feature = "derive_serde", serde(rename = "RvsdInstdAmt", skip_serializing_if = "Option::is_none") )]
72661	pub rvsd_instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
72662	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate", skip_serializing_if = "Option::is_none") )]
72663	pub xchg_rate: Option<f64>,
72664	#[cfg_attr( feature = "derive_serde", serde(rename = "CompstnAmt", skip_serializing_if = "Option::is_none") )]
72665	pub compstn_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
72666	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr", skip_serializing_if = "Option::is_none") )]
72667	pub chrg_br: Option<ChargeBearerType1Code>,
72668	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsInf", skip_serializing_if = "Option::is_none") )]
72669	pub chrgs_inf: Option<Vec<Charges16>>,
72670	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
72671	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
72672	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
72673	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
72674	#[cfg_attr( feature = "derive_serde", serde(rename = "RvslRsnInf", skip_serializing_if = "Option::is_none") )]
72675	pub rvsl_rsn_inf: Option<Vec<PaymentReversalReason10>>,
72676	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
72677	pub orgnl_tx_ref: Option<OriginalTransactionReference42>,
72678	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
72679	pub splmtry_data: Option<Vec<SupplementaryData1>>,
72680}
72681
72682impl PaymentTransaction149 {
72683	pub fn validate(&self) -> Result<(), ValidationError> {
72684		if let Some(ref val) = self.rvsl_id {
72685			if val.chars().count() < 1 {
72686				return Err(ValidationError::new(1001, "rvsl_id is shorter than the minimum length of 1".to_string()));
72687			}
72688			if val.chars().count() > 35 {
72689				return Err(ValidationError::new(1002, "rvsl_id exceeds the maximum length of 35".to_string()));
72690			}
72691		}
72692		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
72693		if let Some(ref val) = self.orgnl_instr_id {
72694			if val.chars().count() < 1 {
72695				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
72696			}
72697			if val.chars().count() > 35 {
72698				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
72699			}
72700		}
72701		if let Some(ref val) = self.orgnl_end_to_end_id {
72702			if val.chars().count() < 1 {
72703				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
72704			}
72705			if val.chars().count() > 35 {
72706				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
72707			}
72708		}
72709		if let Some(ref val) = self.orgnl_tx_id {
72710			if val.chars().count() < 1 {
72711				return Err(ValidationError::new(1001, "orgnl_tx_id is shorter than the minimum length of 1".to_string()));
72712			}
72713			if val.chars().count() > 35 {
72714				return Err(ValidationError::new(1002, "orgnl_tx_id exceeds the maximum length of 35".to_string()));
72715			}
72716		}
72717		if let Some(ref val) = self.orgnl_uetr {
72718			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
72719			if !pattern.is_match(val) {
72720				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
72721			}
72722		}
72723		if let Some(ref val) = self.orgnl_clr_sys_ref {
72724			if val.chars().count() < 1 {
72725				return Err(ValidationError::new(1001, "orgnl_clr_sys_ref is shorter than the minimum length of 1".to_string()));
72726			}
72727			if val.chars().count() > 35 {
72728				return Err(ValidationError::new(1002, "orgnl_clr_sys_ref exceeds the maximum length of 35".to_string()));
72729			}
72730		}
72731		if let Some(ref val) = self.orgnl_intr_bk_sttlm_amt { val.validate()? }
72732		self.rvsd_intr_bk_sttlm_amt.validate()?;
72733		if let Some(ref val) = self.sttlm_prty { val.validate()? }
72734		if let Some(ref val) = self.sttlm_tm_indctn { val.validate()? }
72735		if let Some(ref val) = self.rvsd_instd_amt { val.validate()? }
72736		if let Some(ref val) = self.compstn_amt { val.validate()? }
72737		if let Some(ref val) = self.chrg_br { val.validate()? }
72738		if let Some(ref vec) = self.chrgs_inf { for item in vec { item.validate()? } }
72739		if let Some(ref val) = self.instg_agt { val.validate()? }
72740		if let Some(ref val) = self.instd_agt { val.validate()? }
72741		if let Some(ref vec) = self.rvsl_rsn_inf { for item in vec { item.validate()? } }
72742		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
72743		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
72744		Ok(())
72745	}
72746}
72747
72748
72749// PaymentTransaction150 ...
72750#[cfg_attr(feature = "derive_debug", derive(Debug))]
72751#[cfg_attr(feature = "derive_default", derive(Default))]
72752#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72753#[cfg_attr(feature = "derive_clone", derive(Clone))]
72754#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72755pub struct PaymentTransaction150 {
72756	#[cfg_attr( feature = "derive_serde", serde(rename = "StsId", skip_serializing_if = "Option::is_none") )]
72757	pub sts_id: Option<String>,
72758	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
72759	pub orgnl_instr_id: Option<String>,
72760	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
72761	pub orgnl_end_to_end_id: Option<String>,
72762	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
72763	pub orgnl_uetr: Option<String>,
72764	#[cfg_attr( feature = "derive_serde", serde(rename = "TxSts", skip_serializing_if = "Option::is_none") )]
72765	pub tx_sts: Option<String>,
72766	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsnInf", skip_serializing_if = "Option::is_none") )]
72767	pub sts_rsn_inf: Option<Vec<StatusReasonInformation14>>,
72768	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtCondSts", skip_serializing_if = "Option::is_none") )]
72769	pub pmt_cond_sts: Option<PaymentConditionStatus2>,
72770	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsInf", skip_serializing_if = "Option::is_none") )]
72771	pub chrgs_inf: Option<Vec<Charges16>>,
72772	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrDcsnDtTm", skip_serializing_if = "Option::is_none") )]
72773	pub dbtr_dcsn_dt_tm: Option<String>,
72774	#[cfg_attr( feature = "derive_serde", serde(rename = "AccptncDtTm", skip_serializing_if = "Option::is_none") )]
72775	pub accptnc_dt_tm: Option<String>,
72776	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrRef", skip_serializing_if = "Option::is_none") )]
72777	pub acct_svcr_ref: Option<String>,
72778	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysRef", skip_serializing_if = "Option::is_none") )]
72779	pub clr_sys_ref: Option<String>,
72780	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
72781	pub orgnl_tx_ref: Option<OriginalTransactionReference40>,
72782	#[cfg_attr( feature = "derive_serde", serde(rename = "NclsdFile", skip_serializing_if = "Option::is_none") )]
72783	pub nclsd_file: Option<Vec<Document15>>,
72784	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
72785	pub splmtry_data: Option<Vec<SupplementaryData1>>,
72786}
72787
72788impl PaymentTransaction150 {
72789	pub fn validate(&self) -> Result<(), ValidationError> {
72790		if let Some(ref val) = self.sts_id {
72791			if val.chars().count() < 1 {
72792				return Err(ValidationError::new(1001, "sts_id is shorter than the minimum length of 1".to_string()));
72793			}
72794			if val.chars().count() > 35 {
72795				return Err(ValidationError::new(1002, "sts_id exceeds the maximum length of 35".to_string()));
72796			}
72797		}
72798		if let Some(ref val) = self.orgnl_instr_id {
72799			if val.chars().count() < 1 {
72800				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
72801			}
72802			if val.chars().count() > 35 {
72803				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
72804			}
72805		}
72806		if let Some(ref val) = self.orgnl_end_to_end_id {
72807			if val.chars().count() < 1 {
72808				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
72809			}
72810			if val.chars().count() > 35 {
72811				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
72812			}
72813		}
72814		if let Some(ref val) = self.orgnl_uetr {
72815			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
72816			if !pattern.is_match(val) {
72817				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
72818			}
72819		}
72820		if let Some(ref val) = self.tx_sts {
72821			if val.chars().count() < 1 {
72822				return Err(ValidationError::new(1001, "tx_sts is shorter than the minimum length of 1".to_string()));
72823			}
72824			if val.chars().count() > 4 {
72825				return Err(ValidationError::new(1002, "tx_sts exceeds the maximum length of 4".to_string()));
72826			}
72827		}
72828		if let Some(ref vec) = self.sts_rsn_inf { for item in vec { item.validate()? } }
72829		if let Some(ref val) = self.pmt_cond_sts { val.validate()? }
72830		if let Some(ref vec) = self.chrgs_inf { for item in vec { item.validate()? } }
72831		if let Some(ref val) = self.acct_svcr_ref {
72832			if val.chars().count() < 1 {
72833				return Err(ValidationError::new(1001, "acct_svcr_ref is shorter than the minimum length of 1".to_string()));
72834			}
72835			if val.chars().count() > 35 {
72836				return Err(ValidationError::new(1002, "acct_svcr_ref exceeds the maximum length of 35".to_string()));
72837			}
72838		}
72839		if let Some(ref val) = self.clr_sys_ref {
72840			if val.chars().count() < 1 {
72841				return Err(ValidationError::new(1001, "clr_sys_ref is shorter than the minimum length of 1".to_string()));
72842			}
72843			if val.chars().count() > 35 {
72844				return Err(ValidationError::new(1002, "clr_sys_ref exceeds the maximum length of 35".to_string()));
72845			}
72846		}
72847		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
72848		if let Some(ref vec) = self.nclsd_file { for item in vec { item.validate()? } }
72849		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
72850		Ok(())
72851	}
72852}
72853
72854
72855// PaymentTransaction152 ...
72856#[cfg_attr(feature = "derive_debug", derive(Debug))]
72857#[cfg_attr(feature = "derive_default", derive(Default))]
72858#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72859#[cfg_attr(feature = "derive_clone", derive(Clone))]
72860#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72861pub struct PaymentTransaction152 {
72862	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlStsId", skip_serializing_if = "Option::is_none") )]
72863	pub cxl_sts_id: Option<String>,
72864	#[cfg_attr( feature = "derive_serde", serde(rename = "RslvdCase", skip_serializing_if = "Option::is_none") )]
72865	pub rslvd_case: Option<Case6>,
72866	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
72867	pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
72868	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
72869	pub orgnl_instr_id: Option<String>,
72870	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
72871	pub orgnl_end_to_end_id: Option<String>,
72872	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxId", skip_serializing_if = "Option::is_none") )]
72873	pub orgnl_tx_id: Option<String>,
72874	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlClrSysRef", skip_serializing_if = "Option::is_none") )]
72875	pub orgnl_clr_sys_ref: Option<String>,
72876	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
72877	pub orgnl_uetr: Option<String>,
72878	#[cfg_attr( feature = "derive_serde", serde(rename = "TxCxlSts", skip_serializing_if = "Option::is_none") )]
72879	pub tx_cxl_sts: Option<CancellationIndividualStatus1Code>,
72880	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlStsRsnInf", skip_serializing_if = "Option::is_none") )]
72881	pub cxl_sts_rsn_inf: Option<Vec<CancellationStatusReason5>>,
72882	#[cfg_attr( feature = "derive_serde", serde(rename = "RsltnRltdInf", skip_serializing_if = "Option::is_none") )]
72883	pub rsltn_rltd_inf: Option<ResolutionData5>,
72884	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
72885	pub orgnl_intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
72886	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
72887	pub orgnl_intr_bk_sttlm_dt: Option<String>,
72888	#[cfg_attr( feature = "derive_serde", serde(rename = "Assgnr", skip_serializing_if = "Option::is_none") )]
72889	pub assgnr: Option<Party50Choice>,
72890	#[cfg_attr( feature = "derive_serde", serde(rename = "Assgne", skip_serializing_if = "Option::is_none") )]
72891	pub assgne: Option<Party50Choice>,
72892	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
72893	pub orgnl_tx_ref: Option<OriginalTransactionReference42>,
72894}
72895
72896impl PaymentTransaction152 {
72897	pub fn validate(&self) -> Result<(), ValidationError> {
72898		if let Some(ref val) = self.cxl_sts_id {
72899			if val.chars().count() < 1 {
72900				return Err(ValidationError::new(1001, "cxl_sts_id is shorter than the minimum length of 1".to_string()));
72901			}
72902			if val.chars().count() > 35 {
72903				return Err(ValidationError::new(1002, "cxl_sts_id exceeds the maximum length of 35".to_string()));
72904			}
72905		}
72906		if let Some(ref val) = self.rslvd_case { val.validate()? }
72907		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
72908		if let Some(ref val) = self.orgnl_instr_id {
72909			if val.chars().count() < 1 {
72910				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
72911			}
72912			if val.chars().count() > 35 {
72913				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
72914			}
72915		}
72916		if let Some(ref val) = self.orgnl_end_to_end_id {
72917			if val.chars().count() < 1 {
72918				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
72919			}
72920			if val.chars().count() > 35 {
72921				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
72922			}
72923		}
72924		if let Some(ref val) = self.orgnl_tx_id {
72925			if val.chars().count() < 1 {
72926				return Err(ValidationError::new(1001, "orgnl_tx_id is shorter than the minimum length of 1".to_string()));
72927			}
72928			if val.chars().count() > 35 {
72929				return Err(ValidationError::new(1002, "orgnl_tx_id exceeds the maximum length of 35".to_string()));
72930			}
72931		}
72932		if let Some(ref val) = self.orgnl_clr_sys_ref {
72933			if val.chars().count() < 1 {
72934				return Err(ValidationError::new(1001, "orgnl_clr_sys_ref is shorter than the minimum length of 1".to_string()));
72935			}
72936			if val.chars().count() > 35 {
72937				return Err(ValidationError::new(1002, "orgnl_clr_sys_ref exceeds the maximum length of 35".to_string()));
72938			}
72939		}
72940		if let Some(ref val) = self.orgnl_uetr {
72941			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
72942			if !pattern.is_match(val) {
72943				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
72944			}
72945		}
72946		if let Some(ref val) = self.tx_cxl_sts { val.validate()? }
72947		if let Some(ref vec) = self.cxl_sts_rsn_inf { for item in vec { item.validate()? } }
72948		if let Some(ref val) = self.rsltn_rltd_inf { val.validate()? }
72949		if let Some(ref val) = self.orgnl_intr_bk_sttlm_amt { val.validate()? }
72950		if let Some(ref val) = self.assgnr { val.validate()? }
72951		if let Some(ref val) = self.assgne { val.validate()? }
72952		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
72953		Ok(())
72954	}
72955}
72956
72957
72958// PaymentTransaction153 ...
72959#[cfg_attr(feature = "derive_debug", derive(Debug))]
72960#[cfg_attr(feature = "derive_default", derive(Default))]
72961#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
72962#[cfg_attr(feature = "derive_clone", derive(Clone))]
72963#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
72964pub struct PaymentTransaction153 {
72965	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlStsId", skip_serializing_if = "Option::is_none") )]
72966	pub cxl_sts_id: Option<String>,
72967	#[cfg_attr( feature = "derive_serde", serde(rename = "RslvdCase", skip_serializing_if = "Option::is_none") )]
72968	pub rslvd_case: Option<Case6>,
72969	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
72970	pub orgnl_instr_id: Option<String>,
72971	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
72972	pub orgnl_end_to_end_id: Option<String>,
72973	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
72974	pub uetr: Option<String>,
72975	#[cfg_attr( feature = "derive_serde", serde(rename = "TxCxlSts", skip_serializing_if = "Option::is_none") )]
72976	pub tx_cxl_sts: Option<CancellationIndividualStatus1Code>,
72977	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlStsRsnInf", skip_serializing_if = "Option::is_none") )]
72978	pub cxl_sts_rsn_inf: Option<Vec<CancellationStatusReason5>>,
72979	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstdAmt", skip_serializing_if = "Option::is_none") )]
72980	pub orgnl_instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
72981	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlReqdExctnDt", skip_serializing_if = "Option::is_none") )]
72982	pub orgnl_reqd_exctn_dt: Option<DateAndDateTime2Choice>,
72983	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlReqdColltnDt", skip_serializing_if = "Option::is_none") )]
72984	pub orgnl_reqd_colltn_dt: Option<String>,
72985	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
72986	pub orgnl_tx_ref: Option<OriginalTransactionReference42>,
72987}
72988
72989impl PaymentTransaction153 {
72990	pub fn validate(&self) -> Result<(), ValidationError> {
72991		if let Some(ref val) = self.cxl_sts_id {
72992			if val.chars().count() < 1 {
72993				return Err(ValidationError::new(1001, "cxl_sts_id is shorter than the minimum length of 1".to_string()));
72994			}
72995			if val.chars().count() > 35 {
72996				return Err(ValidationError::new(1002, "cxl_sts_id exceeds the maximum length of 35".to_string()));
72997			}
72998		}
72999		if let Some(ref val) = self.rslvd_case { val.validate()? }
73000		if let Some(ref val) = self.orgnl_instr_id {
73001			if val.chars().count() < 1 {
73002				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
73003			}
73004			if val.chars().count() > 35 {
73005				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
73006			}
73007		}
73008		if let Some(ref val) = self.orgnl_end_to_end_id {
73009			if val.chars().count() < 1 {
73010				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
73011			}
73012			if val.chars().count() > 35 {
73013				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
73014			}
73015		}
73016		if let Some(ref val) = self.uetr {
73017			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
73018			if !pattern.is_match(val) {
73019				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
73020			}
73021		}
73022		if let Some(ref val) = self.tx_cxl_sts { val.validate()? }
73023		if let Some(ref vec) = self.cxl_sts_rsn_inf { for item in vec { item.validate()? } }
73024		if let Some(ref val) = self.orgnl_instd_amt { val.validate()? }
73025		if let Some(ref val) = self.orgnl_reqd_exctn_dt { val.validate()? }
73026		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
73027		Ok(())
73028	}
73029}
73030
73031
73032// PaymentTransaction154 ...
73033#[cfg_attr(feature = "derive_debug", derive(Debug))]
73034#[cfg_attr(feature = "derive_default", derive(Default))]
73035#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
73036#[cfg_attr(feature = "derive_clone", derive(Clone))]
73037#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
73038pub struct PaymentTransaction154 {
73039	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlId", skip_serializing_if = "Option::is_none") )]
73040	pub cxl_id: Option<String>,
73041	#[cfg_attr( feature = "derive_serde", serde(rename = "Case", skip_serializing_if = "Option::is_none") )]
73042	pub case: Option<Case6>,
73043	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
73044	pub orgnl_instr_id: Option<String>,
73045	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
73046	pub orgnl_end_to_end_id: Option<String>,
73047	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
73048	pub orgnl_uetr: Option<String>,
73049	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstdAmt", skip_serializing_if = "Option::is_none") )]
73050	pub orgnl_instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
73051	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlReqdExctnDt", skip_serializing_if = "Option::is_none") )]
73052	pub orgnl_reqd_exctn_dt: Option<DateAndDateTime2Choice>,
73053	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlReqdColltnDt", skip_serializing_if = "Option::is_none") )]
73054	pub orgnl_reqd_colltn_dt: Option<String>,
73055	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlRsnInf", skip_serializing_if = "Option::is_none") )]
73056	pub cxl_rsn_inf: Option<Vec<PaymentCancellationReason6>>,
73057	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
73058	pub orgnl_tx_ref: Option<OriginalTransactionReference42>,
73059	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
73060	pub splmtry_data: Option<Vec<SupplementaryData1>>,
73061}
73062
73063impl PaymentTransaction154 {
73064	pub fn validate(&self) -> Result<(), ValidationError> {
73065		if let Some(ref val) = self.cxl_id {
73066			if val.chars().count() < 1 {
73067				return Err(ValidationError::new(1001, "cxl_id is shorter than the minimum length of 1".to_string()));
73068			}
73069			if val.chars().count() > 35 {
73070				return Err(ValidationError::new(1002, "cxl_id exceeds the maximum length of 35".to_string()));
73071			}
73072		}
73073		if let Some(ref val) = self.case { val.validate()? }
73074		if let Some(ref val) = self.orgnl_instr_id {
73075			if val.chars().count() < 1 {
73076				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
73077			}
73078			if val.chars().count() > 35 {
73079				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
73080			}
73081		}
73082		if let Some(ref val) = self.orgnl_end_to_end_id {
73083			if val.chars().count() < 1 {
73084				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
73085			}
73086			if val.chars().count() > 35 {
73087				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
73088			}
73089		}
73090		if let Some(ref val) = self.orgnl_uetr {
73091			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
73092			if !pattern.is_match(val) {
73093				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
73094			}
73095		}
73096		if let Some(ref val) = self.orgnl_instd_amt { val.validate()? }
73097		if let Some(ref val) = self.orgnl_reqd_exctn_dt { val.validate()? }
73098		if let Some(ref vec) = self.cxl_rsn_inf { for item in vec { item.validate()? } }
73099		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
73100		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
73101		Ok(())
73102	}
73103}
73104
73105
73106// PaymentTransaction155 ...
73107#[cfg_attr(feature = "derive_debug", derive(Debug))]
73108#[cfg_attr(feature = "derive_default", derive(Default))]
73109#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
73110#[cfg_attr(feature = "derive_clone", derive(Clone))]
73111#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
73112pub struct PaymentTransaction155 {
73113	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlId", skip_serializing_if = "Option::is_none") )]
73114	pub cxl_id: Option<String>,
73115	#[cfg_attr( feature = "derive_serde", serde(rename = "Case", skip_serializing_if = "Option::is_none") )]
73116	pub case: Option<Case6>,
73117	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
73118	pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
73119	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
73120	pub orgnl_instr_id: Option<String>,
73121	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
73122	pub orgnl_end_to_end_id: Option<String>,
73123	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxId", skip_serializing_if = "Option::is_none") )]
73124	pub orgnl_tx_id: Option<String>,
73125	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
73126	pub orgnl_uetr: Option<String>,
73127	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlClrSysRef", skip_serializing_if = "Option::is_none") )]
73128	pub orgnl_clr_sys_ref: Option<String>,
73129	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
73130	pub orgnl_intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
73131	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
73132	pub orgnl_intr_bk_sttlm_dt: Option<String>,
73133	#[cfg_attr( feature = "derive_serde", serde(rename = "Assgnr", skip_serializing_if = "Option::is_none") )]
73134	pub assgnr: Option<BranchAndFinancialInstitutionIdentification8>,
73135	#[cfg_attr( feature = "derive_serde", serde(rename = "Assgne", skip_serializing_if = "Option::is_none") )]
73136	pub assgne: Option<BranchAndFinancialInstitutionIdentification8>,
73137	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlRsnInf", skip_serializing_if = "Option::is_none") )]
73138	pub cxl_rsn_inf: Option<Vec<PaymentCancellationReason6>>,
73139	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
73140	pub orgnl_tx_ref: Option<OriginalTransactionReference42>,
73141	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
73142	pub splmtry_data: Option<Vec<SupplementaryData1>>,
73143}
73144
73145impl PaymentTransaction155 {
73146	pub fn validate(&self) -> Result<(), ValidationError> {
73147		if let Some(ref val) = self.cxl_id {
73148			if val.chars().count() < 1 {
73149				return Err(ValidationError::new(1001, "cxl_id is shorter than the minimum length of 1".to_string()));
73150			}
73151			if val.chars().count() > 35 {
73152				return Err(ValidationError::new(1002, "cxl_id exceeds the maximum length of 35".to_string()));
73153			}
73154		}
73155		if let Some(ref val) = self.case { val.validate()? }
73156		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
73157		if let Some(ref val) = self.orgnl_instr_id {
73158			if val.chars().count() < 1 {
73159				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
73160			}
73161			if val.chars().count() > 35 {
73162				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
73163			}
73164		}
73165		if let Some(ref val) = self.orgnl_end_to_end_id {
73166			if val.chars().count() < 1 {
73167				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
73168			}
73169			if val.chars().count() > 35 {
73170				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
73171			}
73172		}
73173		if let Some(ref val) = self.orgnl_tx_id {
73174			if val.chars().count() < 1 {
73175				return Err(ValidationError::new(1001, "orgnl_tx_id is shorter than the minimum length of 1".to_string()));
73176			}
73177			if val.chars().count() > 35 {
73178				return Err(ValidationError::new(1002, "orgnl_tx_id exceeds the maximum length of 35".to_string()));
73179			}
73180		}
73181		if let Some(ref val) = self.orgnl_uetr {
73182			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
73183			if !pattern.is_match(val) {
73184				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
73185			}
73186		}
73187		if let Some(ref val) = self.orgnl_clr_sys_ref {
73188			if val.chars().count() < 1 {
73189				return Err(ValidationError::new(1001, "orgnl_clr_sys_ref is shorter than the minimum length of 1".to_string()));
73190			}
73191			if val.chars().count() > 35 {
73192				return Err(ValidationError::new(1002, "orgnl_clr_sys_ref exceeds the maximum length of 35".to_string()));
73193			}
73194		}
73195		if let Some(ref val) = self.orgnl_intr_bk_sttlm_amt { val.validate()? }
73196		if let Some(ref val) = self.assgnr { val.validate()? }
73197		if let Some(ref val) = self.assgne { val.validate()? }
73198		if let Some(ref vec) = self.cxl_rsn_inf { for item in vec { item.validate()? } }
73199		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
73200		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
73201		Ok(())
73202	}
73203}
73204
73205
73206// PaymentTransaction156 ...
73207#[cfg_attr(feature = "derive_debug", derive(Debug))]
73208#[cfg_attr(feature = "derive_default", derive(Default))]
73209#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
73210#[cfg_attr(feature = "derive_clone", derive(Clone))]
73211#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
73212pub struct PaymentTransaction156 {
73213	#[cfg_attr( feature = "derive_serde", serde(rename = "RvslId", skip_serializing_if = "Option::is_none") )]
73214	pub rvsl_id: Option<String>,
73215	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
73216	pub orgnl_instr_id: Option<String>,
73217	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
73218	pub orgnl_end_to_end_id: Option<String>,
73219	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
73220	pub orgnl_uetr: Option<String>,
73221	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstdAmt", skip_serializing_if = "Option::is_none") )]
73222	pub orgnl_instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
73223	#[cfg_attr( feature = "derive_serde", serde(rename = "RvsdInstdAmt", skip_serializing_if = "Option::is_none") )]
73224	pub rvsd_instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
73225	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr", skip_serializing_if = "Option::is_none") )]
73226	pub chrg_br: Option<ChargeBearerType1Code>,
73227	#[cfg_attr( feature = "derive_serde", serde(rename = "RvslRsnInf", skip_serializing_if = "Option::is_none") )]
73228	pub rvsl_rsn_inf: Option<Vec<PaymentReversalReason10>>,
73229	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
73230	pub orgnl_tx_ref: Option<OriginalTransactionReference42>,
73231	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
73232	pub splmtry_data: Option<Vec<SupplementaryData1>>,
73233}
73234
73235impl PaymentTransaction156 {
73236	pub fn validate(&self) -> Result<(), ValidationError> {
73237		if let Some(ref val) = self.rvsl_id {
73238			if val.chars().count() < 1 {
73239				return Err(ValidationError::new(1001, "rvsl_id is shorter than the minimum length of 1".to_string()));
73240			}
73241			if val.chars().count() > 35 {
73242				return Err(ValidationError::new(1002, "rvsl_id exceeds the maximum length of 35".to_string()));
73243			}
73244		}
73245		if let Some(ref val) = self.orgnl_instr_id {
73246			if val.chars().count() < 1 {
73247				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
73248			}
73249			if val.chars().count() > 35 {
73250				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
73251			}
73252		}
73253		if let Some(ref val) = self.orgnl_end_to_end_id {
73254			if val.chars().count() < 1 {
73255				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
73256			}
73257			if val.chars().count() > 35 {
73258				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
73259			}
73260		}
73261		if let Some(ref val) = self.orgnl_uetr {
73262			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
73263			if !pattern.is_match(val) {
73264				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
73265			}
73266		}
73267		if let Some(ref val) = self.orgnl_instd_amt { val.validate()? }
73268		if let Some(ref val) = self.rvsd_instd_amt { val.validate()? }
73269		if let Some(ref val) = self.chrg_br { val.validate()? }
73270		if let Some(ref vec) = self.rvsl_rsn_inf { for item in vec { item.validate()? } }
73271		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
73272		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
73273		Ok(())
73274	}
73275}
73276
73277
73278// PaymentTransaction157 ...
73279#[cfg_attr(feature = "derive_debug", derive(Debug))]
73280#[cfg_attr(feature = "derive_default", derive(Default))]
73281#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
73282#[cfg_attr(feature = "derive_clone", derive(Clone))]
73283#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
73284pub struct PaymentTransaction157 {
73285	#[cfg_attr( feature = "derive_serde", serde(rename = "ModStsId", skip_serializing_if = "Option::is_none") )]
73286	pub mod_sts_id: Option<String>,
73287	#[cfg_attr( feature = "derive_serde", serde(rename = "RslvdCase", skip_serializing_if = "Option::is_none") )]
73288	pub rslvd_case: Option<Case6>,
73289	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf") )]
73290	pub orgnl_grp_inf: OriginalGroupInformation29,
73291	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPmtInfId", skip_serializing_if = "Option::is_none") )]
73292	pub orgnl_pmt_inf_id: Option<String>,
73293	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
73294	pub orgnl_instr_id: Option<String>,
73295	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
73296	pub orgnl_end_to_end_id: Option<String>,
73297	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxId", skip_serializing_if = "Option::is_none") )]
73298	pub orgnl_tx_id: Option<String>,
73299	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlClrSysRef", skip_serializing_if = "Option::is_none") )]
73300	pub orgnl_clr_sys_ref: Option<String>,
73301	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
73302	pub orgnl_uetr: Option<String>,
73303	#[cfg_attr( feature = "derive_serde", serde(rename = "ModStsRsnInf", skip_serializing_if = "Option::is_none") )]
73304	pub mod_sts_rsn_inf: Option<Vec<ModificationStatusReason3>>,
73305	#[cfg_attr( feature = "derive_serde", serde(rename = "RsltnRltdInf", skip_serializing_if = "Option::is_none") )]
73306	pub rsltn_rltd_inf: Option<ResolutionData5>,
73307	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
73308	pub orgnl_intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
73309	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
73310	pub orgnl_intr_bk_sttlm_dt: Option<String>,
73311	#[cfg_attr( feature = "derive_serde", serde(rename = "Assgnr", skip_serializing_if = "Option::is_none") )]
73312	pub assgnr: Option<Party50Choice>,
73313	#[cfg_attr( feature = "derive_serde", serde(rename = "Assgne", skip_serializing_if = "Option::is_none") )]
73314	pub assgne: Option<Party50Choice>,
73315	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
73316	pub orgnl_tx_ref: Option<OriginalTransactionReference42>,
73317}
73318
73319impl PaymentTransaction157 {
73320	pub fn validate(&self) -> Result<(), ValidationError> {
73321		if let Some(ref val) = self.mod_sts_id {
73322			if val.chars().count() < 1 {
73323				return Err(ValidationError::new(1001, "mod_sts_id is shorter than the minimum length of 1".to_string()));
73324			}
73325			if val.chars().count() > 35 {
73326				return Err(ValidationError::new(1002, "mod_sts_id exceeds the maximum length of 35".to_string()));
73327			}
73328		}
73329		if let Some(ref val) = self.rslvd_case { val.validate()? }
73330		self.orgnl_grp_inf.validate()?;
73331		if let Some(ref val) = self.orgnl_pmt_inf_id {
73332			if val.chars().count() < 1 {
73333				return Err(ValidationError::new(1001, "orgnl_pmt_inf_id is shorter than the minimum length of 1".to_string()));
73334			}
73335			if val.chars().count() > 35 {
73336				return Err(ValidationError::new(1002, "orgnl_pmt_inf_id exceeds the maximum length of 35".to_string()));
73337			}
73338		}
73339		if let Some(ref val) = self.orgnl_instr_id {
73340			if val.chars().count() < 1 {
73341				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
73342			}
73343			if val.chars().count() > 35 {
73344				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
73345			}
73346		}
73347		if let Some(ref val) = self.orgnl_end_to_end_id {
73348			if val.chars().count() < 1 {
73349				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
73350			}
73351			if val.chars().count() > 35 {
73352				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
73353			}
73354		}
73355		if let Some(ref val) = self.orgnl_tx_id {
73356			if val.chars().count() < 1 {
73357				return Err(ValidationError::new(1001, "orgnl_tx_id is shorter than the minimum length of 1".to_string()));
73358			}
73359			if val.chars().count() > 35 {
73360				return Err(ValidationError::new(1002, "orgnl_tx_id exceeds the maximum length of 35".to_string()));
73361			}
73362		}
73363		if let Some(ref val) = self.orgnl_clr_sys_ref {
73364			if val.chars().count() < 1 {
73365				return Err(ValidationError::new(1001, "orgnl_clr_sys_ref is shorter than the minimum length of 1".to_string()));
73366			}
73367			if val.chars().count() > 35 {
73368				return Err(ValidationError::new(1002, "orgnl_clr_sys_ref exceeds the maximum length of 35".to_string()));
73369			}
73370		}
73371		if let Some(ref val) = self.orgnl_uetr {
73372			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
73373			if !pattern.is_match(val) {
73374				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
73375			}
73376		}
73377		if let Some(ref vec) = self.mod_sts_rsn_inf { for item in vec { item.validate()? } }
73378		if let Some(ref val) = self.rsltn_rltd_inf { val.validate()? }
73379		if let Some(ref val) = self.orgnl_intr_bk_sttlm_amt { val.validate()? }
73380		if let Some(ref val) = self.assgnr { val.validate()? }
73381		if let Some(ref val) = self.assgne { val.validate()? }
73382		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
73383		Ok(())
73384	}
73385}
73386
73387
73388// PaymentTransaction158 ...
73389#[cfg_attr(feature = "derive_debug", derive(Debug))]
73390#[cfg_attr(feature = "derive_default", derive(Default))]
73391#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
73392#[cfg_attr(feature = "derive_clone", derive(Clone))]
73393#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
73394pub struct PaymentTransaction158 {
73395	#[cfg_attr( feature = "derive_serde", serde(rename = "StsReqId", skip_serializing_if = "Option::is_none") )]
73396	pub sts_req_id: Option<String>,
73397	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
73398	pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
73399	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
73400	pub orgnl_instr_id: Option<String>,
73401	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
73402	pub orgnl_end_to_end_id: Option<String>,
73403	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxId", skip_serializing_if = "Option::is_none") )]
73404	pub orgnl_tx_id: Option<String>,
73405	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
73406	pub orgnl_uetr: Option<String>,
73407	#[cfg_attr( feature = "derive_serde", serde(rename = "AccptncDtTm", skip_serializing_if = "Option::is_none") )]
73408	pub accptnc_dt_tm: Option<String>,
73409	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysRef", skip_serializing_if = "Option::is_none") )]
73410	pub clr_sys_ref: Option<String>,
73411	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
73412	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
73413	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
73414	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
73415	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
73416	pub orgnl_tx_ref: Option<OriginalTransactionReference42>,
73417	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
73418	pub splmtry_data: Option<Vec<SupplementaryData1>>,
73419}
73420
73421impl PaymentTransaction158 {
73422	pub fn validate(&self) -> Result<(), ValidationError> {
73423		if let Some(ref val) = self.sts_req_id {
73424			if val.chars().count() < 1 {
73425				return Err(ValidationError::new(1001, "sts_req_id is shorter than the minimum length of 1".to_string()));
73426			}
73427			if val.chars().count() > 35 {
73428				return Err(ValidationError::new(1002, "sts_req_id exceeds the maximum length of 35".to_string()));
73429			}
73430		}
73431		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
73432		if let Some(ref val) = self.orgnl_instr_id {
73433			if val.chars().count() < 1 {
73434				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
73435			}
73436			if val.chars().count() > 35 {
73437				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
73438			}
73439		}
73440		if let Some(ref val) = self.orgnl_end_to_end_id {
73441			if val.chars().count() < 1 {
73442				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
73443			}
73444			if val.chars().count() > 35 {
73445				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
73446			}
73447		}
73448		if let Some(ref val) = self.orgnl_tx_id {
73449			if val.chars().count() < 1 {
73450				return Err(ValidationError::new(1001, "orgnl_tx_id is shorter than the minimum length of 1".to_string()));
73451			}
73452			if val.chars().count() > 35 {
73453				return Err(ValidationError::new(1002, "orgnl_tx_id exceeds the maximum length of 35".to_string()));
73454			}
73455		}
73456		if let Some(ref val) = self.orgnl_uetr {
73457			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
73458			if !pattern.is_match(val) {
73459				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
73460			}
73461		}
73462		if let Some(ref val) = self.clr_sys_ref {
73463			if val.chars().count() < 1 {
73464				return Err(ValidationError::new(1001, "clr_sys_ref is shorter than the minimum length of 1".to_string()));
73465			}
73466			if val.chars().count() > 35 {
73467				return Err(ValidationError::new(1002, "clr_sys_ref exceeds the maximum length of 35".to_string()));
73468			}
73469		}
73470		if let Some(ref val) = self.instg_agt { val.validate()? }
73471		if let Some(ref val) = self.instd_agt { val.validate()? }
73472		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
73473		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
73474		Ok(())
73475	}
73476}
73477
73478
73479// PaymentTransaction159 ...
73480#[cfg_attr(feature = "derive_debug", derive(Debug))]
73481#[cfg_attr(feature = "derive_default", derive(Default))]
73482#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
73483#[cfg_attr(feature = "derive_clone", derive(Clone))]
73484#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
73485pub struct PaymentTransaction159 {
73486	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrId", skip_serializing_if = "Option::is_none") )]
73487	pub rtr_id: Option<String>,
73488	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
73489	pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
73490	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
73491	pub orgnl_instr_id: Option<String>,
73492	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
73493	pub orgnl_end_to_end_id: Option<String>,
73494	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxId", skip_serializing_if = "Option::is_none") )]
73495	pub orgnl_tx_id: Option<String>,
73496	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
73497	pub orgnl_uetr: Option<String>,
73498	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlClrSysRef", skip_serializing_if = "Option::is_none") )]
73499	pub orgnl_clr_sys_ref: Option<String>,
73500	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
73501	pub orgnl_intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
73502	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
73503	pub orgnl_intr_bk_sttlm_dt: Option<String>,
73504	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
73505	pub pmt_tp_inf: Option<PaymentTypeInformation28>,
73506	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrdIntrBkSttlmAmt") )]
73507	pub rtrd_intr_bk_sttlm_amt: ActiveCurrencyAndAmount,
73508	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
73509	pub intr_bk_sttlm_dt: Option<String>,
73510	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmPrty", skip_serializing_if = "Option::is_none") )]
73511	pub sttlm_prty: Option<Priority3Code>,
73512	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmTmIndctn", skip_serializing_if = "Option::is_none") )]
73513	pub sttlm_tm_indctn: Option<SettlementDateTimeIndication1>,
73514	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmTmReq", skip_serializing_if = "Option::is_none") )]
73515	pub sttlm_tm_req: Option<SettlementTimeRequest2>,
73516	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrdInstdAmt", skip_serializing_if = "Option::is_none") )]
73517	pub rtrd_instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
73518	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate", skip_serializing_if = "Option::is_none") )]
73519	pub xchg_rate: Option<f64>,
73520	#[cfg_attr( feature = "derive_serde", serde(rename = "CompstnAmt", skip_serializing_if = "Option::is_none") )]
73521	pub compstn_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
73522	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr", skip_serializing_if = "Option::is_none") )]
73523	pub chrg_br: Option<ChargeBearerType1Code>,
73524	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsInf", skip_serializing_if = "Option::is_none") )]
73525	pub chrgs_inf: Option<Vec<Charges16>>,
73526	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysRef", skip_serializing_if = "Option::is_none") )]
73527	pub clr_sys_ref: Option<String>,
73528	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
73529	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
73530	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
73531	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
73532	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrChain", skip_serializing_if = "Option::is_none") )]
73533	pub rtr_chain: Option<TransactionParties11>,
73534	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrRsnInf", skip_serializing_if = "Option::is_none") )]
73535	pub rtr_rsn_inf: Option<Vec<PaymentReturnReason7>>,
73536	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
73537	pub orgnl_tx_ref: Option<OriginalTransactionReference41>,
73538	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
73539	pub splmtry_data: Option<Vec<SupplementaryData1>>,
73540}
73541
73542impl PaymentTransaction159 {
73543	pub fn validate(&self) -> Result<(), ValidationError> {
73544		if let Some(ref val) = self.rtr_id {
73545			if val.chars().count() < 1 {
73546				return Err(ValidationError::new(1001, "rtr_id is shorter than the minimum length of 1".to_string()));
73547			}
73548			if val.chars().count() > 35 {
73549				return Err(ValidationError::new(1002, "rtr_id exceeds the maximum length of 35".to_string()));
73550			}
73551		}
73552		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
73553		if let Some(ref val) = self.orgnl_instr_id {
73554			if val.chars().count() < 1 {
73555				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
73556			}
73557			if val.chars().count() > 35 {
73558				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
73559			}
73560		}
73561		if let Some(ref val) = self.orgnl_end_to_end_id {
73562			if val.chars().count() < 1 {
73563				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
73564			}
73565			if val.chars().count() > 35 {
73566				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
73567			}
73568		}
73569		if let Some(ref val) = self.orgnl_tx_id {
73570			if val.chars().count() < 1 {
73571				return Err(ValidationError::new(1001, "orgnl_tx_id is shorter than the minimum length of 1".to_string()));
73572			}
73573			if val.chars().count() > 35 {
73574				return Err(ValidationError::new(1002, "orgnl_tx_id exceeds the maximum length of 35".to_string()));
73575			}
73576		}
73577		if let Some(ref val) = self.orgnl_uetr {
73578			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
73579			if !pattern.is_match(val) {
73580				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
73581			}
73582		}
73583		if let Some(ref val) = self.orgnl_clr_sys_ref {
73584			if val.chars().count() < 1 {
73585				return Err(ValidationError::new(1001, "orgnl_clr_sys_ref is shorter than the minimum length of 1".to_string()));
73586			}
73587			if val.chars().count() > 35 {
73588				return Err(ValidationError::new(1002, "orgnl_clr_sys_ref exceeds the maximum length of 35".to_string()));
73589			}
73590		}
73591		if let Some(ref val) = self.orgnl_intr_bk_sttlm_amt { val.validate()? }
73592		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
73593		self.rtrd_intr_bk_sttlm_amt.validate()?;
73594		if let Some(ref val) = self.sttlm_prty { val.validate()? }
73595		if let Some(ref val) = self.sttlm_tm_indctn { val.validate()? }
73596		if let Some(ref val) = self.sttlm_tm_req { val.validate()? }
73597		if let Some(ref val) = self.rtrd_instd_amt { val.validate()? }
73598		if let Some(ref val) = self.compstn_amt { val.validate()? }
73599		if let Some(ref val) = self.chrg_br { val.validate()? }
73600		if let Some(ref vec) = self.chrgs_inf { for item in vec { item.validate()? } }
73601		if let Some(ref val) = self.clr_sys_ref {
73602			if val.chars().count() < 1 {
73603				return Err(ValidationError::new(1001, "clr_sys_ref is shorter than the minimum length of 1".to_string()));
73604			}
73605			if val.chars().count() > 35 {
73606				return Err(ValidationError::new(1002, "clr_sys_ref exceeds the maximum length of 35".to_string()));
73607			}
73608		}
73609		if let Some(ref val) = self.instg_agt { val.validate()? }
73610		if let Some(ref val) = self.instd_agt { val.validate()? }
73611		if let Some(ref val) = self.rtr_chain { val.validate()? }
73612		if let Some(ref vec) = self.rtr_rsn_inf { for item in vec { item.validate()? } }
73613		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
73614		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
73615		Ok(())
73616	}
73617}
73618
73619
73620// PaymentTransaction160 ...
73621#[cfg_attr(feature = "derive_debug", derive(Debug))]
73622#[cfg_attr(feature = "derive_default", derive(Default))]
73623#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
73624#[cfg_attr(feature = "derive_clone", derive(Clone))]
73625#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
73626pub struct PaymentTransaction160 {
73627	#[cfg_attr( feature = "derive_serde", serde(rename = "StsId", skip_serializing_if = "Option::is_none") )]
73628	pub sts_id: Option<String>,
73629	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
73630	pub orgnl_instr_id: Option<String>,
73631	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
73632	pub orgnl_end_to_end_id: Option<String>,
73633	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
73634	pub orgnl_uetr: Option<String>,
73635	#[cfg_attr( feature = "derive_serde", serde(rename = "TxSts", skip_serializing_if = "Option::is_none") )]
73636	pub tx_sts: Option<String>,
73637	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsnInf", skip_serializing_if = "Option::is_none") )]
73638	pub sts_rsn_inf: Option<Vec<StatusReasonInformation14>>,
73639	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsInf", skip_serializing_if = "Option::is_none") )]
73640	pub chrgs_inf: Option<Vec<Charges16>>,
73641	#[cfg_attr( feature = "derive_serde", serde(rename = "TrckrData", skip_serializing_if = "Option::is_none") )]
73642	pub trckr_data: Option<TrackerData7>,
73643	#[cfg_attr( feature = "derive_serde", serde(rename = "AccptncDtTm", skip_serializing_if = "Option::is_none") )]
73644	pub accptnc_dt_tm: Option<String>,
73645	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrRef", skip_serializing_if = "Option::is_none") )]
73646	pub acct_svcr_ref: Option<String>,
73647	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysRef", skip_serializing_if = "Option::is_none") )]
73648	pub clr_sys_ref: Option<String>,
73649	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
73650	pub orgnl_tx_ref: Option<OriginalTransactionReference42>,
73651	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
73652	pub splmtry_data: Option<Vec<SupplementaryData1>>,
73653}
73654
73655impl PaymentTransaction160 {
73656	pub fn validate(&self) -> Result<(), ValidationError> {
73657		if let Some(ref val) = self.sts_id {
73658			if val.chars().count() < 1 {
73659				return Err(ValidationError::new(1001, "sts_id is shorter than the minimum length of 1".to_string()));
73660			}
73661			if val.chars().count() > 35 {
73662				return Err(ValidationError::new(1002, "sts_id exceeds the maximum length of 35".to_string()));
73663			}
73664		}
73665		if let Some(ref val) = self.orgnl_instr_id {
73666			if val.chars().count() < 1 {
73667				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
73668			}
73669			if val.chars().count() > 35 {
73670				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
73671			}
73672		}
73673		if let Some(ref val) = self.orgnl_end_to_end_id {
73674			if val.chars().count() < 1 {
73675				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
73676			}
73677			if val.chars().count() > 35 {
73678				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
73679			}
73680		}
73681		if let Some(ref val) = self.orgnl_uetr {
73682			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
73683			if !pattern.is_match(val) {
73684				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
73685			}
73686		}
73687		if let Some(ref val) = self.tx_sts {
73688			if val.chars().count() < 1 {
73689				return Err(ValidationError::new(1001, "tx_sts is shorter than the minimum length of 1".to_string()));
73690			}
73691			if val.chars().count() > 4 {
73692				return Err(ValidationError::new(1002, "tx_sts exceeds the maximum length of 4".to_string()));
73693			}
73694		}
73695		if let Some(ref vec) = self.sts_rsn_inf { for item in vec { item.validate()? } }
73696		if let Some(ref vec) = self.chrgs_inf { for item in vec { item.validate()? } }
73697		if let Some(ref val) = self.trckr_data { val.validate()? }
73698		if let Some(ref val) = self.acct_svcr_ref {
73699			if val.chars().count() < 1 {
73700				return Err(ValidationError::new(1001, "acct_svcr_ref is shorter than the minimum length of 1".to_string()));
73701			}
73702			if val.chars().count() > 35 {
73703				return Err(ValidationError::new(1002, "acct_svcr_ref exceeds the maximum length of 35".to_string()));
73704			}
73705		}
73706		if let Some(ref val) = self.clr_sys_ref {
73707			if val.chars().count() < 1 {
73708				return Err(ValidationError::new(1001, "clr_sys_ref is shorter than the minimum length of 1".to_string()));
73709			}
73710			if val.chars().count() > 35 {
73711				return Err(ValidationError::new(1002, "clr_sys_ref exceeds the maximum length of 35".to_string()));
73712			}
73713		}
73714		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
73715		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
73716		Ok(())
73717	}
73718}
73719
73720
73721// PaymentTransaction161 ...
73722#[cfg_attr(feature = "derive_debug", derive(Debug))]
73723#[cfg_attr(feature = "derive_default", derive(Default))]
73724#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
73725#[cfg_attr(feature = "derive_clone", derive(Clone))]
73726#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
73727pub struct PaymentTransaction161 {
73728	#[cfg_attr( feature = "derive_serde", serde(rename = "StsId", skip_serializing_if = "Option::is_none") )]
73729	pub sts_id: Option<String>,
73730	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
73731	pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
73732	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
73733	pub orgnl_instr_id: Option<String>,
73734	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
73735	pub orgnl_end_to_end_id: Option<String>,
73736	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxId", skip_serializing_if = "Option::is_none") )]
73737	pub orgnl_tx_id: Option<String>,
73738	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
73739	pub orgnl_uetr: Option<String>,
73740	#[cfg_attr( feature = "derive_serde", serde(rename = "TxSts", skip_serializing_if = "Option::is_none") )]
73741	pub tx_sts: Option<String>,
73742	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsnInf", skip_serializing_if = "Option::is_none") )]
73743	pub sts_rsn_inf: Option<Vec<StatusReasonInformation14>>,
73744	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsInf", skip_serializing_if = "Option::is_none") )]
73745	pub chrgs_inf: Option<Vec<Charges16>>,
73746	#[cfg_attr( feature = "derive_serde", serde(rename = "AccptncDtTm", skip_serializing_if = "Option::is_none") )]
73747	pub accptnc_dt_tm: Option<String>,
73748	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgDt", skip_serializing_if = "Option::is_none") )]
73749	pub prcg_dt: Option<DateAndDateTime2Choice>,
73750	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvIntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
73751	pub fctv_intr_bk_sttlm_dt: Option<DateAndDateTime2Choice>,
73752	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrRef", skip_serializing_if = "Option::is_none") )]
73753	pub acct_svcr_ref: Option<String>,
73754	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysRef", skip_serializing_if = "Option::is_none") )]
73755	pub clr_sys_ref: Option<String>,
73756	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
73757	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
73758	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
73759	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
73760	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
73761	pub orgnl_tx_ref: Option<OriginalTransactionReference42>,
73762	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
73763	pub splmtry_data: Option<Vec<SupplementaryData1>>,
73764}
73765
73766impl PaymentTransaction161 {
73767	pub fn validate(&self) -> Result<(), ValidationError> {
73768		if let Some(ref val) = self.sts_id {
73769			if val.chars().count() < 1 {
73770				return Err(ValidationError::new(1001, "sts_id is shorter than the minimum length of 1".to_string()));
73771			}
73772			if val.chars().count() > 35 {
73773				return Err(ValidationError::new(1002, "sts_id exceeds the maximum length of 35".to_string()));
73774			}
73775		}
73776		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
73777		if let Some(ref val) = self.orgnl_instr_id {
73778			if val.chars().count() < 1 {
73779				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
73780			}
73781			if val.chars().count() > 35 {
73782				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
73783			}
73784		}
73785		if let Some(ref val) = self.orgnl_end_to_end_id {
73786			if val.chars().count() < 1 {
73787				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
73788			}
73789			if val.chars().count() > 35 {
73790				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
73791			}
73792		}
73793		if let Some(ref val) = self.orgnl_tx_id {
73794			if val.chars().count() < 1 {
73795				return Err(ValidationError::new(1001, "orgnl_tx_id is shorter than the minimum length of 1".to_string()));
73796			}
73797			if val.chars().count() > 35 {
73798				return Err(ValidationError::new(1002, "orgnl_tx_id exceeds the maximum length of 35".to_string()));
73799			}
73800		}
73801		if let Some(ref val) = self.orgnl_uetr {
73802			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
73803			if !pattern.is_match(val) {
73804				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
73805			}
73806		}
73807		if let Some(ref val) = self.tx_sts {
73808			if val.chars().count() < 1 {
73809				return Err(ValidationError::new(1001, "tx_sts is shorter than the minimum length of 1".to_string()));
73810			}
73811			if val.chars().count() > 4 {
73812				return Err(ValidationError::new(1002, "tx_sts exceeds the maximum length of 4".to_string()));
73813			}
73814		}
73815		if let Some(ref vec) = self.sts_rsn_inf { for item in vec { item.validate()? } }
73816		if let Some(ref vec) = self.chrgs_inf { for item in vec { item.validate()? } }
73817		if let Some(ref val) = self.prcg_dt { val.validate()? }
73818		if let Some(ref val) = self.fctv_intr_bk_sttlm_dt { val.validate()? }
73819		if let Some(ref val) = self.acct_svcr_ref {
73820			if val.chars().count() < 1 {
73821				return Err(ValidationError::new(1001, "acct_svcr_ref is shorter than the minimum length of 1".to_string()));
73822			}
73823			if val.chars().count() > 35 {
73824				return Err(ValidationError::new(1002, "acct_svcr_ref exceeds the maximum length of 35".to_string()));
73825			}
73826		}
73827		if let Some(ref val) = self.clr_sys_ref {
73828			if val.chars().count() < 1 {
73829				return Err(ValidationError::new(1001, "clr_sys_ref is shorter than the minimum length of 1".to_string()));
73830			}
73831			if val.chars().count() > 35 {
73832				return Err(ValidationError::new(1002, "clr_sys_ref exceeds the maximum length of 35".to_string()));
73833			}
73834		}
73835		if let Some(ref val) = self.instg_agt { val.validate()? }
73836		if let Some(ref val) = self.instd_agt { val.validate()? }
73837		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
73838		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
73839		Ok(())
73840	}
73841}
73842
73843
73844// PaymentTransactionParty4 ...
73845#[cfg_attr(feature = "derive_debug", derive(Debug))]
73846#[cfg_attr(feature = "derive_default", derive(Default))]
73847#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
73848#[cfg_attr(feature = "derive_clone", derive(Clone))]
73849#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
73850pub struct PaymentTransactionParty4 {
73851	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
73852	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
73853	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
73854	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
73855	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
73856	pub ultmt_dbtr: Option<Party50Choice>,
73857	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
73858	pub dbtr: Option<Party50Choice>,
73859	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
73860	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
73861	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgRmbrsmntAgt", skip_serializing_if = "Option::is_none") )]
73862	pub instg_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification8>,
73863	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdRmbrsmntAgt", skip_serializing_if = "Option::is_none") )]
73864	pub instd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification8>,
73865	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1", skip_serializing_if = "Option::is_none") )]
73866	pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
73867	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2", skip_serializing_if = "Option::is_none") )]
73868	pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
73869	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3", skip_serializing_if = "Option::is_none") )]
73870	pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
73871	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
73872	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
73873	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
73874	pub cdtr: Option<Party50Choice>,
73875	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
73876	pub ultmt_cdtr: Option<Party50Choice>,
73877}
73878
73879impl PaymentTransactionParty4 {
73880	pub fn validate(&self) -> Result<(), ValidationError> {
73881		if let Some(ref val) = self.instg_agt { val.validate()? }
73882		if let Some(ref val) = self.instd_agt { val.validate()? }
73883		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
73884		if let Some(ref val) = self.dbtr { val.validate()? }
73885		if let Some(ref val) = self.dbtr_agt { val.validate()? }
73886		if let Some(ref val) = self.instg_rmbrsmnt_agt { val.validate()? }
73887		if let Some(ref val) = self.instd_rmbrsmnt_agt { val.validate()? }
73888		if let Some(ref val) = self.intrmy_agt1 { val.validate()? }
73889		if let Some(ref val) = self.intrmy_agt2 { val.validate()? }
73890		if let Some(ref val) = self.intrmy_agt3 { val.validate()? }
73891		if let Some(ref val) = self.cdtr_agt { val.validate()? }
73892		if let Some(ref val) = self.cdtr { val.validate()? }
73893		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
73894		Ok(())
73895	}
73896}
73897
73898
73899// PaymentTransactionStatus1 ...
73900#[cfg_attr(feature = "derive_debug", derive(Debug))]
73901#[cfg_attr(feature = "derive_default", derive(Default))]
73902#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
73903#[cfg_attr(feature = "derive_clone", derive(Clone))]
73904#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
73905pub struct PaymentTransactionStatus1 {
73906	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
73907	pub sts: TransactionStatus1Choice,
73908	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsnInf", skip_serializing_if = "Option::is_none") )]
73909	pub sts_rsn_inf: Option<Vec<StatusReasonInformation12>>,
73910}
73911
73912impl PaymentTransactionStatus1 {
73913	pub fn validate(&self) -> Result<(), ValidationError> {
73914		self.sts.validate()?;
73915		if let Some(ref vec) = self.sts_rsn_inf { for item in vec { item.validate()? } }
73916		Ok(())
73917	}
73918}
73919
73920
73921// PaymentType3Code ...
73922#[cfg_attr(feature = "derive_debug", derive(Debug))]
73923#[cfg_attr(feature = "derive_default", derive(Default))]
73924#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
73925#[cfg_attr(feature = "derive_clone", derive(Clone))]
73926#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
73927pub enum PaymentType3Code {
73928	#[cfg_attr(feature = "derive_default", default)]
73929	#[cfg_attr( feature = "derive_serde", serde(rename = "CBS") )]
73930	CodeCBS,
73931	#[cfg_attr( feature = "derive_serde", serde(rename = "BCK") )]
73932	CodeBCK,
73933	#[cfg_attr( feature = "derive_serde", serde(rename = "BAL") )]
73934	CodeBAL,
73935	#[cfg_attr( feature = "derive_serde", serde(rename = "CLS") )]
73936	CodeCLS,
73937	#[cfg_attr( feature = "derive_serde", serde(rename = "CTR") )]
73938	CodeCTR,
73939	#[cfg_attr( feature = "derive_serde", serde(rename = "CBH") )]
73940	CodeCBH,
73941	#[cfg_attr( feature = "derive_serde", serde(rename = "CBP") )]
73942	CodeCBP,
73943	#[cfg_attr( feature = "derive_serde", serde(rename = "DPG") )]
73944	CodeDPG,
73945	#[cfg_attr( feature = "derive_serde", serde(rename = "DPN") )]
73946	CodeDPN,
73947	#[cfg_attr( feature = "derive_serde", serde(rename = "EXP") )]
73948	CodeEXP,
73949	#[cfg_attr( feature = "derive_serde", serde(rename = "TCH") )]
73950	CodeTCH,
73951	#[cfg_attr( feature = "derive_serde", serde(rename = "LMT") )]
73952	CodeLMT,
73953	#[cfg_attr( feature = "derive_serde", serde(rename = "LIQ") )]
73954	CodeLIQ,
73955	#[cfg_attr( feature = "derive_serde", serde(rename = "DPP") )]
73956	CodeDPP,
73957	#[cfg_attr( feature = "derive_serde", serde(rename = "DPH") )]
73958	CodeDPH,
73959	#[cfg_attr( feature = "derive_serde", serde(rename = "DPS") )]
73960	CodeDPS,
73961	#[cfg_attr( feature = "derive_serde", serde(rename = "STF") )]
73962	CodeSTF,
73963	#[cfg_attr( feature = "derive_serde", serde(rename = "TRP") )]
73964	CodeTRP,
73965	#[cfg_attr( feature = "derive_serde", serde(rename = "TCS") )]
73966	CodeTCS,
73967	#[cfg_attr( feature = "derive_serde", serde(rename = "LOA") )]
73968	CodeLOA,
73969	#[cfg_attr( feature = "derive_serde", serde(rename = "LOR") )]
73970	CodeLOR,
73971	#[cfg_attr( feature = "derive_serde", serde(rename = "TCP") )]
73972	CodeTCP,
73973	#[cfg_attr( feature = "derive_serde", serde(rename = "OND") )]
73974	CodeOND,
73975	#[cfg_attr( feature = "derive_serde", serde(rename = "MGL") )]
73976	CodeMGL,
73977}
73978
73979impl PaymentType3Code {
73980	pub fn validate(&self) -> Result<(), ValidationError> {
73981		Ok(())
73982	}
73983}
73984
73985
73986// PaymentType4Choice ...
73987#[cfg_attr(feature = "derive_debug", derive(Debug))]
73988#[cfg_attr(feature = "derive_default", derive(Default))]
73989#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
73990#[cfg_attr(feature = "derive_clone", derive(Clone))]
73991#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
73992pub struct PaymentType4Choice {
73993	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
73994	pub cd: Option<PaymentType3Code>,
73995	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
73996	pub prtry: Option<String>,
73997}
73998
73999impl PaymentType4Choice {
74000	pub fn validate(&self) -> Result<(), ValidationError> {
74001		if let Some(ref val) = self.cd { val.validate()? }
74002		if let Some(ref val) = self.prtry {
74003			if val.chars().count() < 1 {
74004				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
74005			}
74006			if val.chars().count() > 35 {
74007				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
74008			}
74009		}
74010		Ok(())
74011	}
74012}
74013
74014
74015// PaymentType4Code ...
74016#[cfg_attr(feature = "derive_debug", derive(Debug))]
74017#[cfg_attr(feature = "derive_default", derive(Default))]
74018#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74019#[cfg_attr(feature = "derive_clone", derive(Clone))]
74020#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74021pub enum PaymentType4Code {
74022	#[cfg_attr(feature = "derive_default", default)]
74023	#[cfg_attr( feature = "derive_serde", serde(rename = "UFRO") )]
74024	CodeUFRO,
74025	#[cfg_attr( feature = "derive_serde", serde(rename = "UWIN") )]
74026	CodeUWIN,
74027	#[cfg_attr( feature = "derive_serde", serde(rename = "PEXH") )]
74028	CodePEXH,
74029}
74030
74031impl PaymentType4Code {
74032	pub fn validate(&self) -> Result<(), ValidationError> {
74033		Ok(())
74034	}
74035}
74036
74037
74038// PaymentType5Choice ...
74039#[cfg_attr(feature = "derive_debug", derive(Debug))]
74040#[cfg_attr(feature = "derive_default", derive(Default))]
74041#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74042#[cfg_attr(feature = "derive_clone", derive(Clone))]
74043#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74044pub struct PaymentType5Choice {
74045	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
74046	pub tp: Option<PaymentType4Code>,
74047	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryTp", skip_serializing_if = "Option::is_none") )]
74048	pub prtry_tp: Option<String>,
74049}
74050
74051impl PaymentType5Choice {
74052	pub fn validate(&self) -> Result<(), ValidationError> {
74053		if let Some(ref val) = self.tp { val.validate()? }
74054		if let Some(ref val) = self.prtry_tp {
74055			if val.chars().count() < 1 {
74056				return Err(ValidationError::new(1001, "prtry_tp is shorter than the minimum length of 1".to_string()));
74057			}
74058			if val.chars().count() > 4 {
74059				return Err(ValidationError::new(1002, "prtry_tp exceeds the maximum length of 4".to_string()));
74060			}
74061			let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
74062			if !pattern.is_match(val) {
74063				return Err(ValidationError::new(1005, "prtry_tp does not match the required pattern".to_string()));
74064			}
74065		}
74066		Ok(())
74067	}
74068}
74069
74070
74071// PaymentTypeInformation26 ...
74072#[cfg_attr(feature = "derive_debug", derive(Debug))]
74073#[cfg_attr(feature = "derive_default", derive(Default))]
74074#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74075#[cfg_attr(feature = "derive_clone", derive(Clone))]
74076#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74077pub struct PaymentTypeInformation26 {
74078	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrPrty", skip_serializing_if = "Option::is_none") )]
74079	pub instr_prty: Option<Priority2Code>,
74080	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcLvl", skip_serializing_if = "Option::is_none") )]
74081	pub svc_lvl: Option<Vec<ServiceLevel8Choice>>,
74082	#[cfg_attr( feature = "derive_serde", serde(rename = "LclInstrm", skip_serializing_if = "Option::is_none") )]
74083	pub lcl_instrm: Option<LocalInstrument2Choice>,
74084	#[cfg_attr( feature = "derive_serde", serde(rename = "CtgyPurp", skip_serializing_if = "Option::is_none") )]
74085	pub ctgy_purp: Option<CategoryPurpose1Choice>,
74086}
74087
74088impl PaymentTypeInformation26 {
74089	pub fn validate(&self) -> Result<(), ValidationError> {
74090		if let Some(ref val) = self.instr_prty { val.validate()? }
74091		if let Some(ref vec) = self.svc_lvl { for item in vec { item.validate()? } }
74092		if let Some(ref val) = self.lcl_instrm { val.validate()? }
74093		if let Some(ref val) = self.ctgy_purp { val.validate()? }
74094		Ok(())
74095	}
74096}
74097
74098
74099// PaymentTypeInformation27 ...
74100#[cfg_attr(feature = "derive_debug", derive(Debug))]
74101#[cfg_attr(feature = "derive_default", derive(Default))]
74102#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74103#[cfg_attr(feature = "derive_clone", derive(Clone))]
74104#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74105pub struct PaymentTypeInformation27 {
74106	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrPrty", skip_serializing_if = "Option::is_none") )]
74107	pub instr_prty: Option<Priority2Code>,
74108	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrChanl", skip_serializing_if = "Option::is_none") )]
74109	pub clr_chanl: Option<ClearingChannel2Code>,
74110	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcLvl", skip_serializing_if = "Option::is_none") )]
74111	pub svc_lvl: Option<Vec<ServiceLevel8Choice>>,
74112	#[cfg_attr( feature = "derive_serde", serde(rename = "LclInstrm", skip_serializing_if = "Option::is_none") )]
74113	pub lcl_instrm: Option<LocalInstrument2Choice>,
74114	#[cfg_attr( feature = "derive_serde", serde(rename = "SeqTp", skip_serializing_if = "Option::is_none") )]
74115	pub seq_tp: Option<SequenceType3Code>,
74116	#[cfg_attr( feature = "derive_serde", serde(rename = "CtgyPurp", skip_serializing_if = "Option::is_none") )]
74117	pub ctgy_purp: Option<CategoryPurpose1Choice>,
74118}
74119
74120impl PaymentTypeInformation27 {
74121	pub fn validate(&self) -> Result<(), ValidationError> {
74122		if let Some(ref val) = self.instr_prty { val.validate()? }
74123		if let Some(ref val) = self.clr_chanl { val.validate()? }
74124		if let Some(ref vec) = self.svc_lvl { for item in vec { item.validate()? } }
74125		if let Some(ref val) = self.lcl_instrm { val.validate()? }
74126		if let Some(ref val) = self.seq_tp { val.validate()? }
74127		if let Some(ref val) = self.ctgy_purp { val.validate()? }
74128		Ok(())
74129	}
74130}
74131
74132
74133// PaymentTypeInformation28 ...
74134#[cfg_attr(feature = "derive_debug", derive(Debug))]
74135#[cfg_attr(feature = "derive_default", derive(Default))]
74136#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74137#[cfg_attr(feature = "derive_clone", derive(Clone))]
74138#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74139pub struct PaymentTypeInformation28 {
74140	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrPrty", skip_serializing_if = "Option::is_none") )]
74141	pub instr_prty: Option<Priority2Code>,
74142	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrChanl", skip_serializing_if = "Option::is_none") )]
74143	pub clr_chanl: Option<ClearingChannel2Code>,
74144	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcLvl", skip_serializing_if = "Option::is_none") )]
74145	pub svc_lvl: Option<Vec<ServiceLevel8Choice>>,
74146	#[cfg_attr( feature = "derive_serde", serde(rename = "LclInstrm", skip_serializing_if = "Option::is_none") )]
74147	pub lcl_instrm: Option<LocalInstrument2Choice>,
74148	#[cfg_attr( feature = "derive_serde", serde(rename = "CtgyPurp", skip_serializing_if = "Option::is_none") )]
74149	pub ctgy_purp: Option<CategoryPurpose1Choice>,
74150}
74151
74152impl PaymentTypeInformation28 {
74153	pub fn validate(&self) -> Result<(), ValidationError> {
74154		if let Some(ref val) = self.instr_prty { val.validate()? }
74155		if let Some(ref val) = self.clr_chanl { val.validate()? }
74156		if let Some(ref vec) = self.svc_lvl { for item in vec { item.validate()? } }
74157		if let Some(ref val) = self.lcl_instrm { val.validate()? }
74158		if let Some(ref val) = self.ctgy_purp { val.validate()? }
74159		Ok(())
74160	}
74161}
74162
74163
74164// PaymentTypeInformation29 ...
74165#[cfg_attr(feature = "derive_debug", derive(Debug))]
74166#[cfg_attr(feature = "derive_default", derive(Default))]
74167#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74168#[cfg_attr(feature = "derive_clone", derive(Clone))]
74169#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74170pub struct PaymentTypeInformation29 {
74171	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrPrty", skip_serializing_if = "Option::is_none") )]
74172	pub instr_prty: Option<Priority2Code>,
74173	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcLvl", skip_serializing_if = "Option::is_none") )]
74174	pub svc_lvl: Option<Vec<ServiceLevel8Choice>>,
74175	#[cfg_attr( feature = "derive_serde", serde(rename = "LclInstrm", skip_serializing_if = "Option::is_none") )]
74176	pub lcl_instrm: Option<LocalInstrument2Choice>,
74177	#[cfg_attr( feature = "derive_serde", serde(rename = "SeqTp", skip_serializing_if = "Option::is_none") )]
74178	pub seq_tp: Option<SequenceType3Code>,
74179	#[cfg_attr( feature = "derive_serde", serde(rename = "CtgyPurp", skip_serializing_if = "Option::is_none") )]
74180	pub ctgy_purp: Option<CategoryPurpose1Choice>,
74181}
74182
74183impl PaymentTypeInformation29 {
74184	pub fn validate(&self) -> Result<(), ValidationError> {
74185		if let Some(ref val) = self.instr_prty { val.validate()? }
74186		if let Some(ref vec) = self.svc_lvl { for item in vec { item.validate()? } }
74187		if let Some(ref val) = self.lcl_instrm { val.validate()? }
74188		if let Some(ref val) = self.seq_tp { val.validate()? }
74189		if let Some(ref val) = self.ctgy_purp { val.validate()? }
74190		Ok(())
74191	}
74192}
74193
74194
74195// PendingFailingSettlement1Code ...
74196#[cfg_attr(feature = "derive_debug", derive(Debug))]
74197#[cfg_attr(feature = "derive_default", derive(Default))]
74198#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74199#[cfg_attr(feature = "derive_clone", derive(Clone))]
74200#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74201pub enum PendingFailingSettlement1Code {
74202	#[cfg_attr(feature = "derive_default", default)]
74203	#[cfg_attr( feature = "derive_serde", serde(rename = "AWMO") )]
74204	CodeAWMO,
74205	#[cfg_attr( feature = "derive_serde", serde(rename = "AWSH") )]
74206	CodeAWSH,
74207	#[cfg_attr( feature = "derive_serde", serde(rename = "LAAW") )]
74208	CodeLAAW,
74209	#[cfg_attr( feature = "derive_serde", serde(rename = "DOCY") )]
74210	CodeDOCY,
74211	#[cfg_attr( feature = "derive_serde", serde(rename = "CLAT") )]
74212	CodeCLAT,
74213	#[cfg_attr( feature = "derive_serde", serde(rename = "CERT") )]
74214	CodeCERT,
74215	#[cfg_attr( feature = "derive_serde", serde(rename = "MINO") )]
74216	CodeMINO,
74217	#[cfg_attr( feature = "derive_serde", serde(rename = "PHSE") )]
74218	CodePHSE,
74219	#[cfg_attr( feature = "derive_serde", serde(rename = "SBLO") )]
74220	CodeSBLO,
74221	#[cfg_attr( feature = "derive_serde", serde(rename = "DKNY") )]
74222	CodeDKNY,
74223	#[cfg_attr( feature = "derive_serde", serde(rename = "STCD") )]
74224	CodeSTCD,
74225	#[cfg_attr( feature = "derive_serde", serde(rename = "BENO") )]
74226	CodeBENO,
74227	#[cfg_attr( feature = "derive_serde", serde(rename = "LACK") )]
74228	CodeLACK,
74229	#[cfg_attr( feature = "derive_serde", serde(rename = "LATE") )]
74230	CodeLATE,
74231	#[cfg_attr( feature = "derive_serde", serde(rename = "CANR") )]
74232	CodeCANR,
74233	#[cfg_attr( feature = "derive_serde", serde(rename = "MLAT") )]
74234	CodeMLAT,
74235	#[cfg_attr( feature = "derive_serde", serde(rename = "OBJT") )]
74236	CodeOBJT,
74237	#[cfg_attr( feature = "derive_serde", serde(rename = "DOCC") )]
74238	CodeDOCC,
74239	#[cfg_attr( feature = "derive_serde", serde(rename = "BLOC") )]
74240	CodeBLOC,
74241	#[cfg_attr( feature = "derive_serde", serde(rename = "CHAS") )]
74242	CodeCHAS,
74243	#[cfg_attr( feature = "derive_serde", serde(rename = "NEWI") )]
74244	CodeNEWI,
74245	#[cfg_attr( feature = "derive_serde", serde(rename = "CLAC") )]
74246	CodeCLAC,
74247	#[cfg_attr( feature = "derive_serde", serde(rename = "PART") )]
74248	CodePART,
74249	#[cfg_attr( feature = "derive_serde", serde(rename = "CMON") )]
74250	CodeCMON,
74251	#[cfg_attr( feature = "derive_serde", serde(rename = "COLL") )]
74252	CodeCOLL,
74253	#[cfg_attr( feature = "derive_serde", serde(rename = "DEPO") )]
74254	CodeDEPO,
74255	#[cfg_attr( feature = "derive_serde", serde(rename = "FLIM") )]
74256	CodeFLIM,
74257	#[cfg_attr( feature = "derive_serde", serde(rename = "NOFX") )]
74258	CodeNOFX,
74259	#[cfg_attr( feature = "derive_serde", serde(rename = "INCA") )]
74260	CodeINCA,
74261	#[cfg_attr( feature = "derive_serde", serde(rename = "LINK") )]
74262	CodeLINK,
74263	#[cfg_attr( feature = "derive_serde", serde(rename = "BYIY") )]
74264	CodeBYIY,
74265	#[cfg_attr( feature = "derive_serde", serde(rename = "CAIS") )]
74266	CodeCAIS,
74267	#[cfg_attr( feature = "derive_serde", serde(rename = "LALO") )]
74268	CodeLALO,
74269	#[cfg_attr( feature = "derive_serde", serde(rename = "MONY") )]
74270	CodeMONY,
74271	#[cfg_attr( feature = "derive_serde", serde(rename = "NCON") )]
74272	CodeNCON,
74273	#[cfg_attr( feature = "derive_serde", serde(rename = "YCOL") )]
74274	CodeYCOL,
74275	#[cfg_attr( feature = "derive_serde", serde(rename = "REFS") )]
74276	CodeREFS,
74277	#[cfg_attr( feature = "derive_serde", serde(rename = "SDUT") )]
74278	CodeSDUT,
74279	#[cfg_attr( feature = "derive_serde", serde(rename = "CYCL") )]
74280	CodeCYCL,
74281	#[cfg_attr( feature = "derive_serde", serde(rename = "BATC") )]
74282	CodeBATC,
74283	#[cfg_attr( feature = "derive_serde", serde(rename = "GUAD") )]
74284	CodeGUAD,
74285	#[cfg_attr( feature = "derive_serde", serde(rename = "PREA") )]
74286	CodePREA,
74287	#[cfg_attr( feature = "derive_serde", serde(rename = "GLOB") )]
74288	CodeGLOB,
74289	#[cfg_attr( feature = "derive_serde", serde(rename = "CPEC") )]
74290	CodeCPEC,
74291	#[cfg_attr( feature = "derive_serde", serde(rename = "MUNO") )]
74292	CodeMUNO,
74293}
74294
74295impl PendingFailingSettlement1Code {
74296	pub fn validate(&self) -> Result<(), ValidationError> {
74297		Ok(())
74298	}
74299}
74300
74301
74302// PendingOpeningStatusReason1 ...
74303#[cfg_attr(feature = "derive_debug", derive(Debug))]
74304#[cfg_attr(feature = "derive_default", derive(Default))]
74305#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74306#[cfg_attr(feature = "derive_clone", derive(Clone))]
74307#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74308pub struct PendingOpeningStatusReason1 {
74309	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
74310	pub cd: PendingOpeningStatusReason2Choice,
74311	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
74312	pub addtl_inf: Option<String>,
74313}
74314
74315impl PendingOpeningStatusReason1 {
74316	pub fn validate(&self) -> Result<(), ValidationError> {
74317		self.cd.validate()?;
74318		if let Some(ref val) = self.addtl_inf {
74319			if val.chars().count() < 1 {
74320				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
74321			}
74322			if val.chars().count() > 350 {
74323				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 350".to_string()));
74324			}
74325		}
74326		Ok(())
74327	}
74328}
74329
74330
74331// PendingOpeningStatusReason1Choice ...
74332#[cfg_attr(feature = "derive_debug", derive(Debug))]
74333#[cfg_attr(feature = "derive_default", derive(Default))]
74334#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74335#[cfg_attr(feature = "derive_clone", derive(Clone))]
74336#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74337pub struct PendingOpeningStatusReason1Choice {
74338	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
74339	pub no_spcfd_rsn: Option<NoReasonCode>,
74340	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
74341	pub rsn: Option<Vec<PendingOpeningStatusReason1>>,
74342}
74343
74344impl PendingOpeningStatusReason1Choice {
74345	pub fn validate(&self) -> Result<(), ValidationError> {
74346		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
74347		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
74348		Ok(())
74349	}
74350}
74351
74352
74353// PendingOpeningStatusReason1Code ...
74354#[cfg_attr(feature = "derive_debug", derive(Debug))]
74355#[cfg_attr(feature = "derive_default", derive(Default))]
74356#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74357#[cfg_attr(feature = "derive_clone", derive(Clone))]
74358#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74359pub enum PendingOpeningStatusReason1Code {
74360	#[cfg_attr(feature = "derive_default", default)]
74361	#[cfg_attr( feature = "derive_serde", serde(rename = "ATHR") )]
74362	CodeATHR,
74363	#[cfg_attr( feature = "derive_serde", serde(rename = "ATHP") )]
74364	CodeATHP,
74365	#[cfg_attr( feature = "derive_serde", serde(rename = "FRDM") )]
74366	CodeFRDM,
74367	#[cfg_attr( feature = "derive_serde", serde(rename = "KYCM") )]
74368	CodeKYCM,
74369	#[cfg_attr( feature = "derive_serde", serde(rename = "NOTO") )]
74370	CodeNOTO,
74371	#[cfg_attr( feature = "derive_serde", serde(rename = "REST") )]
74372	CodeREST,
74373	#[cfg_attr( feature = "derive_serde", serde(rename = "RIGH") )]
74374	CodeRIGH,
74375}
74376
74377impl PendingOpeningStatusReason1Code {
74378	pub fn validate(&self) -> Result<(), ValidationError> {
74379		Ok(())
74380	}
74381}
74382
74383
74384// PendingOpeningStatusReason2Choice ...
74385#[cfg_attr(feature = "derive_debug", derive(Debug))]
74386#[cfg_attr(feature = "derive_default", derive(Default))]
74387#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74388#[cfg_attr(feature = "derive_clone", derive(Clone))]
74389#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74390pub struct PendingOpeningStatusReason2Choice {
74391	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
74392	pub cd: Option<PendingOpeningStatusReason1Code>,
74393	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
74394	pub prtry: Option<GenericIdentification36>,
74395}
74396
74397impl PendingOpeningStatusReason2Choice {
74398	pub fn validate(&self) -> Result<(), ValidationError> {
74399		if let Some(ref val) = self.cd { val.validate()? }
74400		if let Some(ref val) = self.prtry { val.validate()? }
74401		Ok(())
74402	}
74403}
74404
74405
74406// PendingProcessingReason8Choice ...
74407#[cfg_attr(feature = "derive_debug", derive(Debug))]
74408#[cfg_attr(feature = "derive_default", derive(Default))]
74409#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74410#[cfg_attr(feature = "derive_clone", derive(Clone))]
74411#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74412pub struct PendingProcessingReason8Choice {
74413	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
74414	pub cd: Option<String>,
74415	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
74416	pub prtry: Option<GenericIdentification36>,
74417}
74418
74419impl PendingProcessingReason8Choice {
74420	pub fn validate(&self) -> Result<(), ValidationError> {
74421		if let Some(ref val) = self.cd {
74422			if val.chars().count() < 1 {
74423				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
74424			}
74425			if val.chars().count() > 4 {
74426				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
74427			}
74428		}
74429		if let Some(ref val) = self.prtry { val.validate()? }
74430		Ok(())
74431	}
74432}
74433
74434
74435// PendingProcessingReason9Choice ...
74436#[cfg_attr(feature = "derive_debug", derive(Debug))]
74437#[cfg_attr(feature = "derive_default", derive(Default))]
74438#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74439#[cfg_attr(feature = "derive_clone", derive(Clone))]
74440#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74441pub struct PendingProcessingReason9Choice {
74442	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
74443	pub no_spcfd_rsn: Option<NoReasonCode>,
74444	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
74445	pub rsn: Option<Vec<PendingProcessingReason8Choice>>,
74446}
74447
74448impl PendingProcessingReason9Choice {
74449	pub fn validate(&self) -> Result<(), ValidationError> {
74450		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
74451		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
74452		Ok(())
74453	}
74454}
74455
74456
74457// PendingProcessingStatusReason1 ...
74458#[cfg_attr(feature = "derive_debug", derive(Debug))]
74459#[cfg_attr(feature = "derive_default", derive(Default))]
74460#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74461#[cfg_attr(feature = "derive_clone", derive(Clone))]
74462#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74463pub struct PendingProcessingStatusReason1 {
74464	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
74465	pub rsn: PendingProcessingReason9Choice,
74466	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
74467	pub addtl_rsn_inf: Option<String>,
74468}
74469
74470impl PendingProcessingStatusReason1 {
74471	pub fn validate(&self) -> Result<(), ValidationError> {
74472		self.rsn.validate()?;
74473		if let Some(ref val) = self.addtl_rsn_inf {
74474			if val.chars().count() < 1 {
74475				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
74476			}
74477			if val.chars().count() > 210 {
74478				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
74479			}
74480		}
74481		Ok(())
74482	}
74483}
74484
74485
74486// PendingReason10Code ...
74487#[cfg_attr(feature = "derive_debug", derive(Debug))]
74488#[cfg_attr(feature = "derive_default", derive(Default))]
74489#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74490#[cfg_attr(feature = "derive_clone", derive(Clone))]
74491#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74492pub enum PendingReason10Code {
74493	#[cfg_attr(feature = "derive_default", default)]
74494	#[cfg_attr( feature = "derive_serde", serde(rename = "AWMO") )]
74495	CodeAWMO,
74496	#[cfg_attr( feature = "derive_serde", serde(rename = "ADEA") )]
74497	CodeADEA,
74498	#[cfg_attr( feature = "derive_serde", serde(rename = "CAIS") )]
74499	CodeCAIS,
74500	#[cfg_attr( feature = "derive_serde", serde(rename = "REFU") )]
74501	CodeREFU,
74502	#[cfg_attr( feature = "derive_serde", serde(rename = "AWSH") )]
74503	CodeAWSH,
74504	#[cfg_attr( feature = "derive_serde", serde(rename = "PHSE") )]
74505	CodePHSE,
74506	#[cfg_attr( feature = "derive_serde", serde(rename = "TAMM") )]
74507	CodeTAMM,
74508	#[cfg_attr( feature = "derive_serde", serde(rename = "DOCY") )]
74509	CodeDOCY,
74510	#[cfg_attr( feature = "derive_serde", serde(rename = "DOCC") )]
74511	CodeDOCC,
74512	#[cfg_attr( feature = "derive_serde", serde(rename = "BLOC") )]
74513	CodeBLOC,
74514	#[cfg_attr( feature = "derive_serde", serde(rename = "CHAS") )]
74515	CodeCHAS,
74516	#[cfg_attr( feature = "derive_serde", serde(rename = "NEWI") )]
74517	CodeNEWI,
74518	#[cfg_attr( feature = "derive_serde", serde(rename = "CLAC") )]
74519	CodeCLAC,
74520	#[cfg_attr( feature = "derive_serde", serde(rename = "MUNO") )]
74521	CodeMUNO,
74522	#[cfg_attr( feature = "derive_serde", serde(rename = "GLOB") )]
74523	CodeGLOB,
74524	#[cfg_attr( feature = "derive_serde", serde(rename = "PREA") )]
74525	CodePREA,
74526	#[cfg_attr( feature = "derive_serde", serde(rename = "PART") )]
74527	CodePART,
74528	#[cfg_attr( feature = "derive_serde", serde(rename = "NMAS") )]
74529	CodeNMAS,
74530	#[cfg_attr( feature = "derive_serde", serde(rename = "NOFX") )]
74531	CodeNOFX,
74532	#[cfg_attr( feature = "derive_serde", serde(rename = "CMON") )]
74533	CodeCMON,
74534	#[cfg_attr( feature = "derive_serde", serde(rename = "YCOL") )]
74535	CodeYCOL,
74536	#[cfg_attr( feature = "derive_serde", serde(rename = "COLL") )]
74537	CodeCOLL,
74538	#[cfg_attr( feature = "derive_serde", serde(rename = "DEPO") )]
74539	CodeDEPO,
74540	#[cfg_attr( feature = "derive_serde", serde(rename = "FLIM") )]
74541	CodeFLIM,
74542	#[cfg_attr( feature = "derive_serde", serde(rename = "INCA") )]
74543	CodeINCA,
74544	#[cfg_attr( feature = "derive_serde", serde(rename = "LINK") )]
74545	CodeLINK,
74546	#[cfg_attr( feature = "derive_serde", serde(rename = "FUTU") )]
74547	CodeFUTU,
74548	#[cfg_attr( feature = "derive_serde", serde(rename = "LACK") )]
74549	CodeLACK,
74550	#[cfg_attr( feature = "derive_serde", serde(rename = "LALO") )]
74551	CodeLALO,
74552	#[cfg_attr( feature = "derive_serde", serde(rename = "MONY") )]
74553	CodeMONY,
74554	#[cfg_attr( feature = "derive_serde", serde(rename = "NCON") )]
74555	CodeNCON,
74556	#[cfg_attr( feature = "derive_serde", serde(rename = "REFS") )]
74557	CodeREFS,
74558	#[cfg_attr( feature = "derive_serde", serde(rename = "SDUT") )]
74559	CodeSDUT,
74560	#[cfg_attr( feature = "derive_serde", serde(rename = "BATC") )]
74561	CodeBATC,
74562	#[cfg_attr( feature = "derive_serde", serde(rename = "CYCL") )]
74563	CodeCYCL,
74564	#[cfg_attr( feature = "derive_serde", serde(rename = "SBLO") )]
74565	CodeSBLO,
74566	#[cfg_attr( feature = "derive_serde", serde(rename = "CPEC") )]
74567	CodeCPEC,
74568	#[cfg_attr( feature = "derive_serde", serde(rename = "MINO") )]
74569	CodeMINO,
74570	#[cfg_attr( feature = "derive_serde", serde(rename = "IAAD") )]
74571	CodeIAAD,
74572	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
74573	CodeOTHR,
74574	#[cfg_attr( feature = "derive_serde", serde(rename = "PHCK") )]
74575	CodePHCK,
74576	#[cfg_attr( feature = "derive_serde", serde(rename = "BENO") )]
74577	CodeBENO,
74578	#[cfg_attr( feature = "derive_serde", serde(rename = "BOTH") )]
74579	CodeBOTH,
74580	#[cfg_attr( feature = "derive_serde", serde(rename = "CLHT") )]
74581	CodeCLHT,
74582	#[cfg_attr( feature = "derive_serde", serde(rename = "DENO") )]
74583	CodeDENO,
74584	#[cfg_attr( feature = "derive_serde", serde(rename = "DISA") )]
74585	CodeDISA,
74586	#[cfg_attr( feature = "derive_serde", serde(rename = "DKNY") )]
74587	CodeDKNY,
74588	#[cfg_attr( feature = "derive_serde", serde(rename = "FROZ") )]
74589	CodeFROZ,
74590	#[cfg_attr( feature = "derive_serde", serde(rename = "LAAW") )]
74591	CodeLAAW,
74592	#[cfg_attr( feature = "derive_serde", serde(rename = "LATE") )]
74593	CodeLATE,
74594	#[cfg_attr( feature = "derive_serde", serde(rename = "LIQU") )]
74595	CodeLIQU,
74596	#[cfg_attr( feature = "derive_serde", serde(rename = "PRCY") )]
74597	CodePRCY,
74598	#[cfg_attr( feature = "derive_serde", serde(rename = "REGT") )]
74599	CodeREGT,
74600	#[cfg_attr( feature = "derive_serde", serde(rename = "SETS") )]
74601	CodeSETS,
74602	#[cfg_attr( feature = "derive_serde", serde(rename = "CERT") )]
74603	CodeCERT,
74604	#[cfg_attr( feature = "derive_serde", serde(rename = "PRSY") )]
74605	CodePRSY,
74606	#[cfg_attr( feature = "derive_serde", serde(rename = "INBC") )]
74607	CodeINBC,
74608}
74609
74610impl PendingReason10Code {
74611	pub fn validate(&self) -> Result<(), ValidationError> {
74612		Ok(())
74613	}
74614}
74615
74616
74617// PendingReason14 ...
74618#[cfg_attr(feature = "derive_debug", derive(Debug))]
74619#[cfg_attr(feature = "derive_default", derive(Default))]
74620#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74621#[cfg_attr(feature = "derive_clone", derive(Clone))]
74622#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74623pub struct PendingReason14 {
74624	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
74625	pub cd: PendingReason26Choice,
74626	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
74627	pub addtl_rsn_inf: Option<String>,
74628}
74629
74630impl PendingReason14 {
74631	pub fn validate(&self) -> Result<(), ValidationError> {
74632		self.cd.validate()?;
74633		if let Some(ref val) = self.addtl_rsn_inf {
74634			if val.chars().count() < 1 {
74635				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
74636			}
74637			if val.chars().count() > 210 {
74638				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
74639			}
74640		}
74641		Ok(())
74642	}
74643}
74644
74645
74646// PendingReason16 ...
74647#[cfg_attr(feature = "derive_debug", derive(Debug))]
74648#[cfg_attr(feature = "derive_default", derive(Default))]
74649#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74650#[cfg_attr(feature = "derive_clone", derive(Clone))]
74651#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74652pub struct PendingReason16 {
74653	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
74654	pub cd: PendingReason28Choice,
74655	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
74656	pub addtl_rsn_inf: Option<String>,
74657}
74658
74659impl PendingReason16 {
74660	pub fn validate(&self) -> Result<(), ValidationError> {
74661		self.cd.validate()?;
74662		if let Some(ref val) = self.addtl_rsn_inf {
74663			if val.chars().count() < 1 {
74664				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
74665			}
74666			if val.chars().count() > 210 {
74667				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
74668			}
74669		}
74670		Ok(())
74671	}
74672}
74673
74674
74675// PendingReason17 ...
74676#[cfg_attr(feature = "derive_debug", derive(Debug))]
74677#[cfg_attr(feature = "derive_default", derive(Default))]
74678#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74679#[cfg_attr(feature = "derive_clone", derive(Clone))]
74680#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74681pub struct PendingReason17 {
74682	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
74683	pub cd: PendingReason30Choice,
74684	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
74685	pub addtl_rsn_inf: Option<String>,
74686}
74687
74688impl PendingReason17 {
74689	pub fn validate(&self) -> Result<(), ValidationError> {
74690		self.cd.validate()?;
74691		if let Some(ref val) = self.addtl_rsn_inf {
74692			if val.chars().count() < 1 {
74693				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
74694			}
74695			if val.chars().count() > 210 {
74696				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
74697			}
74698		}
74699		Ok(())
74700	}
74701}
74702
74703
74704// PendingReason26Choice ...
74705#[cfg_attr(feature = "derive_debug", derive(Debug))]
74706#[cfg_attr(feature = "derive_default", derive(Default))]
74707#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74708#[cfg_attr(feature = "derive_clone", derive(Clone))]
74709#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74710pub struct PendingReason26Choice {
74711	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
74712	pub cd: Option<PendingReason10Code>,
74713	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
74714	pub prtry: Option<GenericIdentification30>,
74715}
74716
74717impl PendingReason26Choice {
74718	pub fn validate(&self) -> Result<(), ValidationError> {
74719		if let Some(ref val) = self.cd { val.validate()? }
74720		if let Some(ref val) = self.prtry { val.validate()? }
74721		Ok(())
74722	}
74723}
74724
74725
74726// PendingReason28Choice ...
74727#[cfg_attr(feature = "derive_debug", derive(Debug))]
74728#[cfg_attr(feature = "derive_default", derive(Default))]
74729#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74730#[cfg_attr(feature = "derive_clone", derive(Clone))]
74731#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74732pub struct PendingReason28Choice {
74733	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
74734	pub cd: Option<PendingReason6Code>,
74735	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
74736	pub prtry: Option<GenericIdentification30>,
74737}
74738
74739impl PendingReason28Choice {
74740	pub fn validate(&self) -> Result<(), ValidationError> {
74741		if let Some(ref val) = self.cd { val.validate()? }
74742		if let Some(ref val) = self.prtry { val.validate()? }
74743		Ok(())
74744	}
74745}
74746
74747
74748// PendingReason30Choice ...
74749#[cfg_attr(feature = "derive_debug", derive(Debug))]
74750#[cfg_attr(feature = "derive_default", derive(Default))]
74751#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74752#[cfg_attr(feature = "derive_clone", derive(Clone))]
74753#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74754pub struct PendingReason30Choice {
74755	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
74756	pub cd: Option<PendingReason9Code>,
74757	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
74758	pub prtry: Option<GenericIdentification30>,
74759}
74760
74761impl PendingReason30Choice {
74762	pub fn validate(&self) -> Result<(), ValidationError> {
74763		if let Some(ref val) = self.cd { val.validate()? }
74764		if let Some(ref val) = self.prtry { val.validate()? }
74765		Ok(())
74766	}
74767}
74768
74769
74770// PendingReason6Code ...
74771#[cfg_attr(feature = "derive_debug", derive(Debug))]
74772#[cfg_attr(feature = "derive_default", derive(Default))]
74773#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74774#[cfg_attr(feature = "derive_clone", derive(Clone))]
74775#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74776pub enum PendingReason6Code {
74777	#[cfg_attr(feature = "derive_default", default)]
74778	#[cfg_attr( feature = "derive_serde", serde(rename = "ADEA") )]
74779	CodeADEA,
74780	#[cfg_attr( feature = "derive_serde", serde(rename = "CONF") )]
74781	CodeCONF,
74782	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
74783	CodeOTHR,
74784	#[cfg_attr( feature = "derive_serde", serde(rename = "CDRG") )]
74785	CodeCDRG,
74786	#[cfg_attr( feature = "derive_serde", serde(rename = "CDCY") )]
74787	CodeCDCY,
74788	#[cfg_attr( feature = "derive_serde", serde(rename = "CDRE") )]
74789	CodeCDRE,
74790}
74791
74792impl PendingReason6Code {
74793	pub fn validate(&self) -> Result<(), ValidationError> {
74794		Ok(())
74795	}
74796}
74797
74798
74799// PendingReason9Code ...
74800#[cfg_attr(feature = "derive_debug", derive(Debug))]
74801#[cfg_attr(feature = "derive_default", derive(Default))]
74802#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74803#[cfg_attr(feature = "derive_clone", derive(Clone))]
74804#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74805pub enum PendingReason9Code {
74806	#[cfg_attr(feature = "derive_default", default)]
74807	#[cfg_attr( feature = "derive_serde", serde(rename = "ADEA") )]
74808	CodeADEA,
74809	#[cfg_attr( feature = "derive_serde", serde(rename = "CONF") )]
74810	CodeCONF,
74811	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
74812	CodeOTHR,
74813	#[cfg_attr( feature = "derive_serde", serde(rename = "CDRG") )]
74814	CodeCDRG,
74815	#[cfg_attr( feature = "derive_serde", serde(rename = "CDCY") )]
74816	CodeCDCY,
74817	#[cfg_attr( feature = "derive_serde", serde(rename = "CDRE") )]
74818	CodeCDRE,
74819	#[cfg_attr( feature = "derive_serde", serde(rename = "CDAC") )]
74820	CodeCDAC,
74821	#[cfg_attr( feature = "derive_serde", serde(rename = "INBC") )]
74822	CodeINBC,
74823}
74824
74825impl PendingReason9Code {
74826	pub fn validate(&self) -> Result<(), ValidationError> {
74827		Ok(())
74828	}
74829}
74830
74831
74832// PendingSettlement2Code ...
74833#[cfg_attr(feature = "derive_debug", derive(Debug))]
74834#[cfg_attr(feature = "derive_default", derive(Default))]
74835#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74836#[cfg_attr(feature = "derive_clone", derive(Clone))]
74837#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74838pub enum PendingSettlement2Code {
74839	#[cfg_attr(feature = "derive_default", default)]
74840	#[cfg_attr( feature = "derive_serde", serde(rename = "AWMO") )]
74841	CodeAWMO,
74842	#[cfg_attr( feature = "derive_serde", serde(rename = "CAIS") )]
74843	CodeCAIS,
74844	#[cfg_attr( feature = "derive_serde", serde(rename = "REFU") )]
74845	CodeREFU,
74846	#[cfg_attr( feature = "derive_serde", serde(rename = "AWSH") )]
74847	CodeAWSH,
74848	#[cfg_attr( feature = "derive_serde", serde(rename = "PHSE") )]
74849	CodePHSE,
74850	#[cfg_attr( feature = "derive_serde", serde(rename = "TAMM") )]
74851	CodeTAMM,
74852	#[cfg_attr( feature = "derive_serde", serde(rename = "DOCY") )]
74853	CodeDOCY,
74854	#[cfg_attr( feature = "derive_serde", serde(rename = "DOCC") )]
74855	CodeDOCC,
74856	#[cfg_attr( feature = "derive_serde", serde(rename = "BLOC") )]
74857	CodeBLOC,
74858	#[cfg_attr( feature = "derive_serde", serde(rename = "CHAS") )]
74859	CodeCHAS,
74860	#[cfg_attr( feature = "derive_serde", serde(rename = "NEWI") )]
74861	CodeNEWI,
74862	#[cfg_attr( feature = "derive_serde", serde(rename = "CLAC") )]
74863	CodeCLAC,
74864	#[cfg_attr( feature = "derive_serde", serde(rename = "MUNO") )]
74865	CodeMUNO,
74866	#[cfg_attr( feature = "derive_serde", serde(rename = "GLOB") )]
74867	CodeGLOB,
74868	#[cfg_attr( feature = "derive_serde", serde(rename = "PREA") )]
74869	CodePREA,
74870	#[cfg_attr( feature = "derive_serde", serde(rename = "GUAD") )]
74871	CodeGUAD,
74872	#[cfg_attr( feature = "derive_serde", serde(rename = "PART") )]
74873	CodePART,
74874	#[cfg_attr( feature = "derive_serde", serde(rename = "NMAS") )]
74875	CodeNMAS,
74876	#[cfg_attr( feature = "derive_serde", serde(rename = "CMON") )]
74877	CodeCMON,
74878	#[cfg_attr( feature = "derive_serde", serde(rename = "YCOL") )]
74879	CodeYCOL,
74880	#[cfg_attr( feature = "derive_serde", serde(rename = "COLL") )]
74881	CodeCOLL,
74882	#[cfg_attr( feature = "derive_serde", serde(rename = "DEPO") )]
74883	CodeDEPO,
74884	#[cfg_attr( feature = "derive_serde", serde(rename = "FLIM") )]
74885	CodeFLIM,
74886	#[cfg_attr( feature = "derive_serde", serde(rename = "NOFX") )]
74887	CodeNOFX,
74888	#[cfg_attr( feature = "derive_serde", serde(rename = "INCA") )]
74889	CodeINCA,
74890	#[cfg_attr( feature = "derive_serde", serde(rename = "LINK") )]
74891	CodeLINK,
74892	#[cfg_attr( feature = "derive_serde", serde(rename = "FUTU") )]
74893	CodeFUTU,
74894	#[cfg_attr( feature = "derive_serde", serde(rename = "LACK") )]
74895	CodeLACK,
74896	#[cfg_attr( feature = "derive_serde", serde(rename = "LALO") )]
74897	CodeLALO,
74898	#[cfg_attr( feature = "derive_serde", serde(rename = "MONY") )]
74899	CodeMONY,
74900	#[cfg_attr( feature = "derive_serde", serde(rename = "NCON") )]
74901	CodeNCON,
74902	#[cfg_attr( feature = "derive_serde", serde(rename = "REFS") )]
74903	CodeREFS,
74904	#[cfg_attr( feature = "derive_serde", serde(rename = "SDUT") )]
74905	CodeSDUT,
74906	#[cfg_attr( feature = "derive_serde", serde(rename = "BATC") )]
74907	CodeBATC,
74908	#[cfg_attr( feature = "derive_serde", serde(rename = "CYCL") )]
74909	CodeCYCL,
74910	#[cfg_attr( feature = "derive_serde", serde(rename = "SBLO") )]
74911	CodeSBLO,
74912	#[cfg_attr( feature = "derive_serde", serde(rename = "CPEC") )]
74913	CodeCPEC,
74914	#[cfg_attr( feature = "derive_serde", serde(rename = "MINO") )]
74915	CodeMINO,
74916	#[cfg_attr( feature = "derive_serde", serde(rename = "PCAP") )]
74917	CodePCAP,
74918}
74919
74920impl PendingSettlement2Code {
74921	pub fn validate(&self) -> Result<(), ValidationError> {
74922		Ok(())
74923	}
74924}
74925
74926
74927// PendingStatus36Choice ...
74928#[cfg_attr(feature = "derive_debug", derive(Debug))]
74929#[cfg_attr(feature = "derive_default", derive(Default))]
74930#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74931#[cfg_attr(feature = "derive_clone", derive(Clone))]
74932#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74933pub struct PendingStatus36Choice {
74934	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
74935	pub no_spcfd_rsn: Option<NoReasonCode>,
74936	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
74937	pub rsn: Option<Vec<PendingReason14>>,
74938}
74939
74940impl PendingStatus36Choice {
74941	pub fn validate(&self) -> Result<(), ValidationError> {
74942		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
74943		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
74944		Ok(())
74945	}
74946}
74947
74948
74949// PendingStatus38Choice ...
74950#[cfg_attr(feature = "derive_debug", derive(Debug))]
74951#[cfg_attr(feature = "derive_default", derive(Default))]
74952#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74953#[cfg_attr(feature = "derive_clone", derive(Clone))]
74954#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74955pub struct PendingStatus38Choice {
74956	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
74957	pub no_spcfd_rsn: Option<NoReasonCode>,
74958	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
74959	pub rsn: Option<Vec<PendingReason16>>,
74960}
74961
74962impl PendingStatus38Choice {
74963	pub fn validate(&self) -> Result<(), ValidationError> {
74964		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
74965		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
74966		Ok(())
74967	}
74968}
74969
74970
74971// PendingStatus39Choice ...
74972#[cfg_attr(feature = "derive_debug", derive(Debug))]
74973#[cfg_attr(feature = "derive_default", derive(Default))]
74974#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74975#[cfg_attr(feature = "derive_clone", derive(Clone))]
74976#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74977pub struct PendingStatus39Choice {
74978	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
74979	pub no_spcfd_rsn: Option<NoReasonCode>,
74980	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
74981	pub rsn: Option<Vec<PendingReason17>>,
74982}
74983
74984impl PendingStatus39Choice {
74985	pub fn validate(&self) -> Result<(), ValidationError> {
74986		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
74987		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
74988		Ok(())
74989	}
74990}
74991
74992
74993// PendingStatus4Code ...
74994#[cfg_attr(feature = "derive_debug", derive(Debug))]
74995#[cfg_attr(feature = "derive_default", derive(Default))]
74996#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
74997#[cfg_attr(feature = "derive_clone", derive(Clone))]
74998#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
74999pub enum PendingStatus4Code {
75000	#[cfg_attr(feature = "derive_default", default)]
75001	#[cfg_attr( feature = "derive_serde", serde(rename = "ACPD") )]
75002	CodeACPD,
75003	#[cfg_attr( feature = "derive_serde", serde(rename = "VALD") )]
75004	CodeVALD,
75005	#[cfg_attr( feature = "derive_serde", serde(rename = "MATD") )]
75006	CodeMATD,
75007	#[cfg_attr( feature = "derive_serde", serde(rename = "AUTD") )]
75008	CodeAUTD,
75009	#[cfg_attr( feature = "derive_serde", serde(rename = "INVD") )]
75010	CodeINVD,
75011	#[cfg_attr( feature = "derive_serde", serde(rename = "UMAC") )]
75012	CodeUMAC,
75013	#[cfg_attr( feature = "derive_serde", serde(rename = "STLE") )]
75014	CodeSTLE,
75015	#[cfg_attr( feature = "derive_serde", serde(rename = "STLM") )]
75016	CodeSTLM,
75017	#[cfg_attr( feature = "derive_serde", serde(rename = "SSPD") )]
75018	CodeSSPD,
75019	#[cfg_attr( feature = "derive_serde", serde(rename = "PCAN") )]
75020	CodePCAN,
75021	#[cfg_attr( feature = "derive_serde", serde(rename = "PSTL") )]
75022	CodePSTL,
75023	#[cfg_attr( feature = "derive_serde", serde(rename = "PFST") )]
75024	CodePFST,
75025	#[cfg_attr( feature = "derive_serde", serde(rename = "SMLR") )]
75026	CodeSMLR,
75027	#[cfg_attr( feature = "derive_serde", serde(rename = "RMLR") )]
75028	CodeRMLR,
75029	#[cfg_attr( feature = "derive_serde", serde(rename = "SRBL") )]
75030	CodeSRBL,
75031	#[cfg_attr( feature = "derive_serde", serde(rename = "AVLB") )]
75032	CodeAVLB,
75033	#[cfg_attr( feature = "derive_serde", serde(rename = "SRML") )]
75034	CodeSRML,
75035}
75036
75037impl PendingStatus4Code {
75038	pub fn validate(&self) -> Result<(), ValidationError> {
75039		Ok(())
75040	}
75041}
75042
75043
75044// PendingStatusAndReason2 ...
75045#[cfg_attr(feature = "derive_debug", derive(Debug))]
75046#[cfg_attr(feature = "derive_default", derive(Default))]
75047#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75048#[cfg_attr(feature = "derive_clone", derive(Clone))]
75049#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75050pub struct PendingStatusAndReason2 {
75051	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgSts", skip_serializing_if = "Option::is_none") )]
75052	pub prcg_sts: Option<Vec<ProcessingStatus66Choice>>,
75053	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmSts", skip_serializing_if = "Option::is_none") )]
75054	pub sttlm_sts: Option<Vec<SettlementStatus16Choice>>,
75055}
75056
75057impl PendingStatusAndReason2 {
75058	pub fn validate(&self) -> Result<(), ValidationError> {
75059		if let Some(ref vec) = self.prcg_sts { for item in vec { item.validate()? } }
75060		if let Some(ref vec) = self.sttlm_sts { for item in vec { item.validate()? } }
75061		Ok(())
75062	}
75063}
75064
75065
75066// PendingStatusReason14 ...
75067#[cfg_attr(feature = "derive_debug", derive(Debug))]
75068#[cfg_attr(feature = "derive_default", derive(Default))]
75069#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75070#[cfg_attr(feature = "derive_clone", derive(Clone))]
75071#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75072pub struct PendingStatusReason14 {
75073	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
75074	pub cd: PendingStatusReason2Choice,
75075	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
75076	pub addtl_inf: Option<String>,
75077}
75078
75079impl PendingStatusReason14 {
75080	pub fn validate(&self) -> Result<(), ValidationError> {
75081		self.cd.validate()?;
75082		if let Some(ref val) = self.addtl_inf {
75083			if val.chars().count() < 1 {
75084				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
75085			}
75086			if val.chars().count() > 350 {
75087				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 350".to_string()));
75088			}
75089		}
75090		Ok(())
75091	}
75092}
75093
75094
75095// PendingStatusReason1Choice ...
75096#[cfg_attr(feature = "derive_debug", derive(Debug))]
75097#[cfg_attr(feature = "derive_default", derive(Default))]
75098#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75099#[cfg_attr(feature = "derive_clone", derive(Clone))]
75100#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75101pub struct PendingStatusReason1Choice {
75102	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
75103	pub no_spcfd_rsn: Option<NoReasonCode>,
75104	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
75105	pub rsn: Option<Vec<PendingStatusReason14>>,
75106}
75107
75108impl PendingStatusReason1Choice {
75109	pub fn validate(&self) -> Result<(), ValidationError> {
75110		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
75111		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
75112		Ok(())
75113	}
75114}
75115
75116
75117// PendingStatusReason1Code ...
75118#[cfg_attr(feature = "derive_debug", derive(Debug))]
75119#[cfg_attr(feature = "derive_default", derive(Default))]
75120#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75121#[cfg_attr(feature = "derive_clone", derive(Clone))]
75122#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75123pub enum PendingStatusReason1Code {
75124	#[cfg_attr(feature = "derive_default", default)]
75125	#[cfg_attr( feature = "derive_serde", serde(rename = "KYCM") )]
75126	CodeKYCM,
75127	#[cfg_attr( feature = "derive_serde", serde(rename = "FRDM") )]
75128	CodeFRDM,
75129	#[cfg_attr( feature = "derive_serde", serde(rename = "RIGH") )]
75130	CodeRIGH,
75131	#[cfg_attr( feature = "derive_serde", serde(rename = "ATHR") )]
75132	CodeATHR,
75133	#[cfg_attr( feature = "derive_serde", serde(rename = "ATHP") )]
75134	CodeATHP,
75135	#[cfg_attr( feature = "derive_serde", serde(rename = "MODI") )]
75136	CodeMODI,
75137}
75138
75139impl PendingStatusReason1Code {
75140	pub fn validate(&self) -> Result<(), ValidationError> {
75141		Ok(())
75142	}
75143}
75144
75145
75146// PendingStatusReason2Choice ...
75147#[cfg_attr(feature = "derive_debug", derive(Debug))]
75148#[cfg_attr(feature = "derive_default", derive(Default))]
75149#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75150#[cfg_attr(feature = "derive_clone", derive(Clone))]
75151#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75152pub struct PendingStatusReason2Choice {
75153	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
75154	pub cd: Option<PendingStatusReason1Code>,
75155	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
75156	pub prtry: Option<GenericIdentification36>,
75157}
75158
75159impl PendingStatusReason2Choice {
75160	pub fn validate(&self) -> Result<(), ValidationError> {
75161		if let Some(ref val) = self.cd { val.validate()? }
75162		if let Some(ref val) = self.prtry { val.validate()? }
75163		Ok(())
75164	}
75165}
75166
75167
75168// PercentageRange1Choice ...
75169#[cfg_attr(feature = "derive_debug", derive(Debug))]
75170#[cfg_attr(feature = "derive_default", derive(Default))]
75171#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75172#[cfg_attr(feature = "derive_clone", derive(Clone))]
75173#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75174pub struct PercentageRange1Choice {
75175	#[cfg_attr( feature = "derive_serde", serde(rename = "Fr", skip_serializing_if = "Option::is_none") )]
75176	pub fr: Option<PercentageRangeBoundary1>,
75177	#[cfg_attr( feature = "derive_serde", serde(rename = "To", skip_serializing_if = "Option::is_none") )]
75178	pub to: Option<PercentageRangeBoundary1>,
75179	#[cfg_attr( feature = "derive_serde", serde(rename = "FrTo", skip_serializing_if = "Option::is_none") )]
75180	pub fr_to: Option<FromToPercentageRange1>,
75181	#[cfg_attr( feature = "derive_serde", serde(rename = "EQ", skip_serializing_if = "Option::is_none") )]
75182	pub eq: Option<f64>,
75183	#[cfg_attr( feature = "derive_serde", serde(rename = "NEQ", skip_serializing_if = "Option::is_none") )]
75184	pub neq: Option<f64>,
75185}
75186
75187impl PercentageRange1Choice {
75188	pub fn validate(&self) -> Result<(), ValidationError> {
75189		if let Some(ref val) = self.fr { val.validate()? }
75190		if let Some(ref val) = self.to { val.validate()? }
75191		if let Some(ref val) = self.fr_to { val.validate()? }
75192		Ok(())
75193	}
75194}
75195
75196
75197// PercentageRangeBoundary1 ...
75198#[cfg_attr(feature = "derive_debug", derive(Debug))]
75199#[cfg_attr(feature = "derive_default", derive(Default))]
75200#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75201#[cfg_attr(feature = "derive_clone", derive(Clone))]
75202#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75203pub struct PercentageRangeBoundary1 {
75204	#[cfg_attr( feature = "derive_serde", serde(rename = "BdryRate") )]
75205	pub bdry_rate: f64,
75206	#[cfg_attr( feature = "derive_serde", serde(rename = "Incl") )]
75207	pub incl: bool,
75208}
75209
75210impl PercentageRangeBoundary1 {
75211	pub fn validate(&self) -> Result<(), ValidationError> {
75212		Ok(())
75213	}
75214}
75215
75216
75217// PerformanceFactors1 ...
75218#[cfg_attr(feature = "derive_debug", derive(Debug))]
75219#[cfg_attr(feature = "derive_default", derive(Default))]
75220#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75221#[cfg_attr(feature = "derive_clone", derive(Clone))]
75222#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75223pub struct PerformanceFactors1 {
75224	#[cfg_attr( feature = "derive_serde", serde(rename = "CorpActnFctr", skip_serializing_if = "Option::is_none") )]
75225	pub corp_actn_fctr: Option<f64>,
75226	#[cfg_attr( feature = "derive_serde", serde(rename = "CmltvCorpActnFctr", skip_serializing_if = "Option::is_none") )]
75227	pub cmltv_corp_actn_fctr: Option<f64>,
75228	#[cfg_attr( feature = "derive_serde", serde(rename = "AcmltnPrd", skip_serializing_if = "Option::is_none") )]
75229	pub acmltn_prd: Option<DatePeriodDetails>,
75230	#[cfg_attr( feature = "derive_serde", serde(rename = "NrmlPrfrmnc", skip_serializing_if = "Option::is_none") )]
75231	pub nrml_prfrmnc: Option<f64>,
75232}
75233
75234impl PerformanceFactors1 {
75235	pub fn validate(&self) -> Result<(), ValidationError> {
75236		if let Some(ref val) = self.acmltn_prd { val.validate()? }
75237		Ok(())
75238	}
75239}
75240
75241
75242// Period11Choice ...
75243#[cfg_attr(feature = "derive_debug", derive(Debug))]
75244#[cfg_attr(feature = "derive_default", derive(Default))]
75245#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75246#[cfg_attr(feature = "derive_clone", derive(Clone))]
75247#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75248pub struct Period11Choice {
75249	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
75250	pub dt: Option<String>,
75251	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDt", skip_serializing_if = "Option::is_none") )]
75252	pub fr_dt: Option<String>,
75253	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDt", skip_serializing_if = "Option::is_none") )]
75254	pub to_dt: Option<String>,
75255	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDt", skip_serializing_if = "Option::is_none") )]
75256	pub fr_to_dt: Option<Period2>,
75257	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDtTm", skip_serializing_if = "Option::is_none") )]
75258	pub fr_to_dt_tm: Option<DateTimePeriod1>,
75259}
75260
75261impl Period11Choice {
75262	pub fn validate(&self) -> Result<(), ValidationError> {
75263		if let Some(ref val) = self.fr_to_dt { val.validate()? }
75264		if let Some(ref val) = self.fr_to_dt_tm { val.validate()? }
75265		Ok(())
75266	}
75267}
75268
75269
75270// Period15 ...
75271#[cfg_attr(feature = "derive_debug", derive(Debug))]
75272#[cfg_attr(feature = "derive_default", derive(Default))]
75273#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75274#[cfg_attr(feature = "derive_clone", derive(Clone))]
75275#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75276pub struct Period15 {
75277	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt") )]
75278	pub start_dt: String,
75279	#[cfg_attr( feature = "derive_serde", serde(rename = "EndDt") )]
75280	pub end_dt: String,
75281}
75282
75283impl Period15 {
75284	pub fn validate(&self) -> Result<(), ValidationError> {
75285		Ok(())
75286	}
75287}
75288
75289
75290// Period2 ...
75291#[cfg_attr(feature = "derive_debug", derive(Debug))]
75292#[cfg_attr(feature = "derive_default", derive(Default))]
75293#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75294#[cfg_attr(feature = "derive_clone", derive(Clone))]
75295#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75296pub struct Period2 {
75297	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDt") )]
75298	pub fr_dt: String,
75299	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDt") )]
75300	pub to_dt: String,
75301}
75302
75303impl Period2 {
75304	pub fn validate(&self) -> Result<(), ValidationError> {
75305		Ok(())
75306	}
75307}
75308
75309
75310// Period4Choice ...
75311#[cfg_attr(feature = "derive_debug", derive(Debug))]
75312#[cfg_attr(feature = "derive_default", derive(Default))]
75313#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75314#[cfg_attr(feature = "derive_clone", derive(Clone))]
75315#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75316pub struct Period4Choice {
75317	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
75318	pub dt: Option<String>,
75319	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDt", skip_serializing_if = "Option::is_none") )]
75320	pub fr_dt: Option<String>,
75321	#[cfg_attr( feature = "derive_serde", serde(rename = "ToDt", skip_serializing_if = "Option::is_none") )]
75322	pub to_dt: Option<String>,
75323	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDtToDt", skip_serializing_if = "Option::is_none") )]
75324	pub fr_dt_to_dt: Option<Period2>,
75325}
75326
75327impl Period4Choice {
75328	pub fn validate(&self) -> Result<(), ValidationError> {
75329		if let Some(ref val) = self.fr_dt_to_dt { val.validate()? }
75330		Ok(())
75331	}
75332}
75333
75334
75335// Period7Choice ...
75336#[cfg_attr(feature = "derive_debug", derive(Debug))]
75337#[cfg_attr(feature = "derive_default", derive(Default))]
75338#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75339#[cfg_attr(feature = "derive_clone", derive(Clone))]
75340#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75341pub struct Period7Choice {
75342	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDtTmToDtTm", skip_serializing_if = "Option::is_none") )]
75343	pub fr_dt_tm_to_dt_tm: Option<DateTimePeriod1>,
75344	#[cfg_attr( feature = "derive_serde", serde(rename = "FrDtToDt", skip_serializing_if = "Option::is_none") )]
75345	pub fr_dt_to_dt: Option<Period2>,
75346}
75347
75348impl Period7Choice {
75349	pub fn validate(&self) -> Result<(), ValidationError> {
75350		if let Some(ref val) = self.fr_dt_tm_to_dt_tm { val.validate()? }
75351		if let Some(ref val) = self.fr_dt_to_dt { val.validate()? }
75352		Ok(())
75353	}
75354}
75355
75356
75357// PersonIdentification10 ...
75358#[cfg_attr(feature = "derive_debug", derive(Debug))]
75359#[cfg_attr(feature = "derive_default", derive(Default))]
75360#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75361#[cfg_attr(feature = "derive_clone", derive(Clone))]
75362#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75363pub struct PersonIdentification10 {
75364	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstNm") )]
75365	pub frst_nm: String,
75366	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
75367	pub nm: String,
75368	#[cfg_attr( feature = "derive_serde", serde(rename = "BirthDt") )]
75369	pub birth_dt: String,
75370	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr") )]
75371	pub othr: GenericPersonIdentification1,
75372}
75373
75374impl PersonIdentification10 {
75375	pub fn validate(&self) -> Result<(), ValidationError> {
75376		if self.frst_nm.chars().count() < 1 {
75377			return Err(ValidationError::new(1001, "frst_nm is shorter than the minimum length of 1".to_string()));
75378		}
75379		if self.frst_nm.chars().count() > 140 {
75380			return Err(ValidationError::new(1002, "frst_nm exceeds the maximum length of 140".to_string()));
75381		}
75382		if self.nm.chars().count() < 1 {
75383			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
75384		}
75385		if self.nm.chars().count() > 140 {
75386			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
75387		}
75388		self.othr.validate()?;
75389		Ok(())
75390	}
75391}
75392
75393
75394// PersonIdentification12 ...
75395#[cfg_attr(feature = "derive_debug", derive(Debug))]
75396#[cfg_attr(feature = "derive_default", derive(Default))]
75397#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75398#[cfg_attr(feature = "derive_clone", derive(Clone))]
75399#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75400pub struct PersonIdentification12 {
75401	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfBrnch") )]
75402	pub ctry_of_brnch: String,
75403	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr") )]
75404	pub othr: GenericPersonIdentification1,
75405}
75406
75407impl PersonIdentification12 {
75408	pub fn validate(&self) -> Result<(), ValidationError> {
75409		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
75410		if !pattern.is_match(&self.ctry_of_brnch) {
75411			return Err(ValidationError::new(1005, "ctry_of_brnch does not match the required pattern".to_string()));
75412		}
75413		self.othr.validate()?;
75414		Ok(())
75415	}
75416}
75417
75418
75419// PersonIdentification13 ...
75420#[cfg_attr(feature = "derive_debug", derive(Debug))]
75421#[cfg_attr(feature = "derive_default", derive(Default))]
75422#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75423#[cfg_attr(feature = "derive_clone", derive(Clone))]
75424#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75425pub struct PersonIdentification13 {
75426	#[cfg_attr( feature = "derive_serde", serde(rename = "DtAndPlcOfBirth", skip_serializing_if = "Option::is_none") )]
75427	pub dt_and_plc_of_birth: Option<DateAndPlaceOfBirth1>,
75428	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
75429	pub othr: Option<Vec<GenericPersonIdentification1>>,
75430}
75431
75432impl PersonIdentification13 {
75433	pub fn validate(&self) -> Result<(), ValidationError> {
75434		if let Some(ref val) = self.dt_and_plc_of_birth { val.validate()? }
75435		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
75436		Ok(())
75437	}
75438}
75439
75440
75441// PersonIdentification18 ...
75442#[cfg_attr(feature = "derive_debug", derive(Debug))]
75443#[cfg_attr(feature = "derive_default", derive(Default))]
75444#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75445#[cfg_attr(feature = "derive_clone", derive(Clone))]
75446#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75447pub struct PersonIdentification18 {
75448	#[cfg_attr( feature = "derive_serde", serde(rename = "DtAndPlcOfBirth", skip_serializing_if = "Option::is_none") )]
75449	pub dt_and_plc_of_birth: Option<DateAndPlaceOfBirth1>,
75450	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
75451	pub othr: Option<Vec<GenericPersonIdentification2>>,
75452}
75453
75454impl PersonIdentification18 {
75455	pub fn validate(&self) -> Result<(), ValidationError> {
75456		if let Some(ref val) = self.dt_and_plc_of_birth { val.validate()? }
75457		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
75458		Ok(())
75459	}
75460}
75461
75462
75463// PersonIdentification20 ...
75464#[cfg_attr(feature = "derive_debug", derive(Debug))]
75465#[cfg_attr(feature = "derive_default", derive(Default))]
75466#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75467#[cfg_attr(feature = "derive_clone", derive(Clone))]
75468#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75469pub struct PersonIdentification20 {
75470	#[cfg_attr( feature = "derive_serde", serde(rename = "DtAndPlcOfBirth", skip_serializing_if = "Option::is_none") )]
75471	pub dt_and_plc_of_birth: Option<DateAndPlaceOfBirth1>,
75472	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailAdr", skip_serializing_if = "Option::is_none") )]
75473	pub email_adr: Option<String>,
75474	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
75475	pub othr: Option<Vec<GenericPersonIdentification2>>,
75476}
75477
75478impl PersonIdentification20 {
75479	pub fn validate(&self) -> Result<(), ValidationError> {
75480		if let Some(ref val) = self.dt_and_plc_of_birth { val.validate()? }
75481		if let Some(ref val) = self.email_adr {
75482			if val.chars().count() < 1 {
75483				return Err(ValidationError::new(1001, "email_adr is shorter than the minimum length of 1".to_string()));
75484			}
75485			if val.chars().count() > 256 {
75486				return Err(ValidationError::new(1002, "email_adr exceeds the maximum length of 256".to_string()));
75487			}
75488		}
75489		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
75490		Ok(())
75491	}
75492}
75493
75494
75495// PersonIdentification5 ...
75496#[cfg_attr(feature = "derive_debug", derive(Debug))]
75497#[cfg_attr(feature = "derive_default", derive(Default))]
75498#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75499#[cfg_attr(feature = "derive_clone", derive(Clone))]
75500#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75501pub struct PersonIdentification5 {
75502	#[cfg_attr( feature = "derive_serde", serde(rename = "DtAndPlcOfBirth", skip_serializing_if = "Option::is_none") )]
75503	pub dt_and_plc_of_birth: Option<DateAndPlaceOfBirth>,
75504	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
75505	pub othr: Option<Vec<GenericPersonIdentification1>>,
75506}
75507
75508impl PersonIdentification5 {
75509	pub fn validate(&self) -> Result<(), ValidationError> {
75510		if let Some(ref val) = self.dt_and_plc_of_birth { val.validate()? }
75511		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
75512		Ok(())
75513	}
75514}
75515
75516
75517// PersonIdentificationSchemeName1Choice ...
75518#[cfg_attr(feature = "derive_debug", derive(Debug))]
75519#[cfg_attr(feature = "derive_default", derive(Default))]
75520#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75521#[cfg_attr(feature = "derive_clone", derive(Clone))]
75522#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75523pub struct PersonIdentificationSchemeName1Choice {
75524	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
75525	pub cd: Option<String>,
75526	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
75527	pub prtry: Option<String>,
75528}
75529
75530impl PersonIdentificationSchemeName1Choice {
75531	pub fn validate(&self) -> Result<(), ValidationError> {
75532		if let Some(ref val) = self.cd {
75533			if val.chars().count() < 1 {
75534				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
75535			}
75536			if val.chars().count() > 4 {
75537				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
75538			}
75539		}
75540		if let Some(ref val) = self.prtry {
75541			if val.chars().count() < 1 {
75542				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
75543			}
75544			if val.chars().count() > 35 {
75545				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
75546			}
75547		}
75548		Ok(())
75549	}
75550}
75551
75552
75553// PersonIdentificationType5Code ...
75554#[cfg_attr(feature = "derive_debug", derive(Debug))]
75555#[cfg_attr(feature = "derive_default", derive(Default))]
75556#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75557#[cfg_attr(feature = "derive_clone", derive(Clone))]
75558#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75559pub enum PersonIdentificationType5Code {
75560	#[cfg_attr(feature = "derive_default", default)]
75561	#[cfg_attr( feature = "derive_serde", serde(rename = "AREG") )]
75562	CodeAREG,
75563	#[cfg_attr( feature = "derive_serde", serde(rename = "CPFA") )]
75564	CodeCPFA,
75565	#[cfg_attr( feature = "derive_serde", serde(rename = "DRLC") )]
75566	CodeDRLC,
75567	#[cfg_attr( feature = "derive_serde", serde(rename = "EMID") )]
75568	CodeEMID,
75569	#[cfg_attr( feature = "derive_serde", serde(rename = "IDCD") )]
75570	CodeIDCD,
75571	#[cfg_attr( feature = "derive_serde", serde(rename = "NRIN") )]
75572	CodeNRIN,
75573	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
75574	CodeOTHR,
75575	#[cfg_attr( feature = "derive_serde", serde(rename = "PASS") )]
75576	CodePASS,
75577	#[cfg_attr( feature = "derive_serde", serde(rename = "POCD") )]
75578	CodePOCD,
75579	#[cfg_attr( feature = "derive_serde", serde(rename = "SOCS") )]
75580	CodeSOCS,
75581	#[cfg_attr( feature = "derive_serde", serde(rename = "SRSA") )]
75582	CodeSRSA,
75583	#[cfg_attr( feature = "derive_serde", serde(rename = "GUNL") )]
75584	CodeGUNL,
75585}
75586
75587impl PersonIdentificationType5Code {
75588	pub fn validate(&self) -> Result<(), ValidationError> {
75589		Ok(())
75590	}
75591}
75592
75593
75594// PersonOrOrganisation1Choice ...
75595#[cfg_attr(feature = "derive_debug", derive(Debug))]
75596#[cfg_attr(feature = "derive_default", derive(Default))]
75597#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75598#[cfg_attr(feature = "derive_clone", derive(Clone))]
75599#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75600pub struct PersonOrOrganisation1Choice {
75601	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
75602	pub lei: Option<String>,
75603	#[cfg_attr( feature = "derive_serde", serde(rename = "MIC", skip_serializing_if = "Option::is_none") )]
75604	pub mic: Option<String>,
75605	#[cfg_attr( feature = "derive_serde", serde(rename = "Prsn", skip_serializing_if = "Option::is_none") )]
75606	pub prsn: Option<PersonIdentification10>,
75607	#[cfg_attr( feature = "derive_serde", serde(rename = "Intl", skip_serializing_if = "Option::is_none") )]
75608	pub intl: Option<InternalPartyRole1Code>,
75609}
75610
75611impl PersonOrOrganisation1Choice {
75612	pub fn validate(&self) -> Result<(), ValidationError> {
75613		if let Some(ref val) = self.lei {
75614			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
75615			if !pattern.is_match(val) {
75616				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
75617			}
75618		}
75619		if let Some(ref val) = self.mic {
75620			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
75621			if !pattern.is_match(val) {
75622				return Err(ValidationError::new(1005, "mic does not match the required pattern".to_string()));
75623			}
75624		}
75625		if let Some(ref val) = self.prsn { val.validate()? }
75626		if let Some(ref val) = self.intl { val.validate()? }
75627		Ok(())
75628	}
75629}
75630
75631
75632// PersonOrOrganisation2Choice ...
75633#[cfg_attr(feature = "derive_debug", derive(Debug))]
75634#[cfg_attr(feature = "derive_default", derive(Default))]
75635#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75636#[cfg_attr(feature = "derive_clone", derive(Clone))]
75637#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75638pub struct PersonOrOrganisation2Choice {
75639	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
75640	pub lei: Option<String>,
75641	#[cfg_attr( feature = "derive_serde", serde(rename = "Prsn", skip_serializing_if = "Option::is_none") )]
75642	pub prsn: Option<PersonIdentification10>,
75643}
75644
75645impl PersonOrOrganisation2Choice {
75646	pub fn validate(&self) -> Result<(), ValidationError> {
75647		if let Some(ref val) = self.lei {
75648			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
75649			if !pattern.is_match(val) {
75650				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
75651			}
75652		}
75653		if let Some(ref val) = self.prsn { val.validate()? }
75654		Ok(())
75655	}
75656}
75657
75658
75659// PersonOrOrganisation4Choice ...
75660#[cfg_attr(feature = "derive_debug", derive(Debug))]
75661#[cfg_attr(feature = "derive_default", derive(Default))]
75662#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75663#[cfg_attr(feature = "derive_clone", derive(Clone))]
75664#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75665pub struct PersonOrOrganisation4Choice {
75666	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
75667	pub lei: Option<String>,
75668	#[cfg_attr( feature = "derive_serde", serde(rename = "Prsn", skip_serializing_if = "Option::is_none") )]
75669	pub prsn: Option<GenericPersonIdentification1>,
75670	#[cfg_attr( feature = "derive_serde", serde(rename = "XcptnId", skip_serializing_if = "Option::is_none") )]
75671	pub xcptn_id: Option<PartyExceptionType1Code>,
75672}
75673
75674impl PersonOrOrganisation4Choice {
75675	pub fn validate(&self) -> Result<(), ValidationError> {
75676		if let Some(ref val) = self.lei {
75677			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
75678			if !pattern.is_match(val) {
75679				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
75680			}
75681		}
75682		if let Some(ref val) = self.prsn { val.validate()? }
75683		if let Some(ref val) = self.xcptn_id { val.validate()? }
75684		Ok(())
75685	}
75686}
75687
75688
75689// PersonType2 ...
75690#[cfg_attr(feature = "derive_debug", derive(Debug))]
75691#[cfg_attr(feature = "derive_default", derive(Default))]
75692#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75693#[cfg_attr(feature = "derive_clone", derive(Clone))]
75694#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75695pub struct PersonType2 {
75696	#[cfg_attr( feature = "derive_serde", serde(rename = "DtAndPlcOfBirth", skip_serializing_if = "Option::is_none") )]
75697	pub dt_and_plc_of_birth: Option<bool>,
75698	#[cfg_attr( feature = "derive_serde", serde(rename = "EmailAdr", skip_serializing_if = "Option::is_none") )]
75699	pub email_adr: Option<bool>,
75700	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
75701	pub othr: Option<Vec<GenericPersonType1>>,
75702}
75703
75704impl PersonType2 {
75705	pub fn validate(&self) -> Result<(), ValidationError> {
75706		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
75707		Ok(())
75708	}
75709}
75710
75711
75712// PersonalInformation1 ...
75713#[cfg_attr(feature = "derive_debug", derive(Debug))]
75714#[cfg_attr(feature = "derive_default", derive(Default))]
75715#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75716#[cfg_attr(feature = "derive_clone", derive(Clone))]
75717#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75718pub struct PersonalInformation1 {
75719	#[cfg_attr( feature = "derive_serde", serde(rename = "NmOfFthr", skip_serializing_if = "Option::is_none") )]
75720	pub nm_of_fthr: Option<String>,
75721	#[cfg_attr( feature = "derive_serde", serde(rename = "MdnNmOfMthr", skip_serializing_if = "Option::is_none") )]
75722	pub mdn_nm_of_mthr: Option<String>,
75723	#[cfg_attr( feature = "derive_serde", serde(rename = "NmOfPrtnr", skip_serializing_if = "Option::is_none") )]
75724	pub nm_of_prtnr: Option<String>,
75725}
75726
75727impl PersonalInformation1 {
75728	pub fn validate(&self) -> Result<(), ValidationError> {
75729		if let Some(ref val) = self.nm_of_fthr {
75730			if val.chars().count() < 1 {
75731				return Err(ValidationError::new(1001, "nm_of_fthr is shorter than the minimum length of 1".to_string()));
75732			}
75733			if val.chars().count() > 35 {
75734				return Err(ValidationError::new(1002, "nm_of_fthr exceeds the maximum length of 35".to_string()));
75735			}
75736		}
75737		if let Some(ref val) = self.mdn_nm_of_mthr {
75738			if val.chars().count() < 1 {
75739				return Err(ValidationError::new(1001, "mdn_nm_of_mthr is shorter than the minimum length of 1".to_string()));
75740			}
75741			if val.chars().count() > 35 {
75742				return Err(ValidationError::new(1002, "mdn_nm_of_mthr exceeds the maximum length of 35".to_string()));
75743			}
75744		}
75745		if let Some(ref val) = self.nm_of_prtnr {
75746			if val.chars().count() < 1 {
75747				return Err(ValidationError::new(1001, "nm_of_prtnr is shorter than the minimum length of 1".to_string()));
75748			}
75749			if val.chars().count() > 35 {
75750				return Err(ValidationError::new(1002, "nm_of_prtnr exceeds the maximum length of 35".to_string()));
75751			}
75752		}
75753		Ok(())
75754	}
75755}
75756
75757
75758// PhysicalTransferType4Code ...
75759#[cfg_attr(feature = "derive_debug", derive(Debug))]
75760#[cfg_attr(feature = "derive_default", derive(Default))]
75761#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75762#[cfg_attr(feature = "derive_clone", derive(Clone))]
75763#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75764pub enum PhysicalTransferType4Code {
75765	#[cfg_attr(feature = "derive_default", default)]
75766	#[cfg_attr( feature = "derive_serde", serde(rename = "PHYS") )]
75767	CodePHYS,
75768	#[cfg_attr( feature = "derive_serde", serde(rename = "OPTL") )]
75769	CodeOPTL,
75770	#[cfg_attr( feature = "derive_serde", serde(rename = "CASH") )]
75771	CodeCASH,
75772}
75773
75774impl PhysicalTransferType4Code {
75775	pub fn validate(&self) -> Result<(), ValidationError> {
75776		Ok(())
75777	}
75778}
75779
75780
75781// PlainCardData1 ...
75782#[cfg_attr(feature = "derive_debug", derive(Debug))]
75783#[cfg_attr(feature = "derive_default", derive(Default))]
75784#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75785#[cfg_attr(feature = "derive_clone", derive(Clone))]
75786#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75787pub struct PlainCardData1 {
75788	#[cfg_attr( feature = "derive_serde", serde(rename = "PAN") )]
75789	pub pan: String,
75790	#[cfg_attr( feature = "derive_serde", serde(rename = "CardSeqNb", skip_serializing_if = "Option::is_none") )]
75791	pub card_seq_nb: Option<String>,
75792	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvDt", skip_serializing_if = "Option::is_none") )]
75793	pub fctv_dt: Option<String>,
75794	#[cfg_attr( feature = "derive_serde", serde(rename = "XpryDt") )]
75795	pub xpry_dt: String,
75796	#[cfg_attr( feature = "derive_serde", serde(rename = "SvcCd", skip_serializing_if = "Option::is_none") )]
75797	pub svc_cd: Option<String>,
75798	#[cfg_attr( feature = "derive_serde", serde(rename = "TrckData", skip_serializing_if = "Option::is_none") )]
75799	pub trck_data: Option<Vec<TrackData1>>,
75800	#[cfg_attr( feature = "derive_serde", serde(rename = "CardSctyCd", skip_serializing_if = "Option::is_none") )]
75801	pub card_scty_cd: Option<CardSecurityInformation1>,
75802}
75803
75804impl PlainCardData1 {
75805	pub fn validate(&self) -> Result<(), ValidationError> {
75806		let pattern = Regex::new("[0-9]{8,28}").unwrap();
75807		if !pattern.is_match(&self.pan) {
75808			return Err(ValidationError::new(1005, "pan does not match the required pattern".to_string()));
75809		}
75810		if let Some(ref val) = self.card_seq_nb {
75811			let pattern = Regex::new("[0-9]{2,3}").unwrap();
75812			if !pattern.is_match(val) {
75813				return Err(ValidationError::new(1005, "card_seq_nb does not match the required pattern".to_string()));
75814			}
75815		}
75816		if let Some(ref val) = self.svc_cd {
75817			let pattern = Regex::new("[0-9]{3}").unwrap();
75818			if !pattern.is_match(val) {
75819				return Err(ValidationError::new(1005, "svc_cd does not match the required pattern".to_string()));
75820			}
75821		}
75822		if let Some(ref vec) = self.trck_data { for item in vec { item.validate()? } }
75823		if let Some(ref val) = self.card_scty_cd { val.validate()? }
75824		Ok(())
75825	}
75826}
75827
75828
75829// PlanStatus1Code ...
75830#[cfg_attr(feature = "derive_debug", derive(Debug))]
75831#[cfg_attr(feature = "derive_default", derive(Default))]
75832#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75833#[cfg_attr(feature = "derive_clone", derive(Clone))]
75834#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75835pub enum PlanStatus1Code {
75836	#[cfg_attr(feature = "derive_default", default)]
75837	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTV") )]
75838	CodeACTV,
75839	#[cfg_attr( feature = "derive_serde", serde(rename = "CLOS") )]
75840	CodeCLOS,
75841	#[cfg_attr( feature = "derive_serde", serde(rename = "SUSP") )]
75842	CodeSUSP,
75843}
75844
75845impl PlanStatus1Code {
75846	pub fn validate(&self) -> Result<(), ValidationError> {
75847		Ok(())
75848	}
75849}
75850
75851
75852// PlanStatus2Choice ...
75853#[cfg_attr(feature = "derive_debug", derive(Debug))]
75854#[cfg_attr(feature = "derive_default", derive(Default))]
75855#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75856#[cfg_attr(feature = "derive_clone", derive(Clone))]
75857#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75858pub struct PlanStatus2Choice {
75859	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
75860	pub cd: Option<PlanStatus1Code>,
75861	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
75862	pub prtry: Option<GenericIdentification47>,
75863}
75864
75865impl PlanStatus2Choice {
75866	pub fn validate(&self) -> Result<(), ValidationError> {
75867		if let Some(ref val) = self.cd { val.validate()? }
75868		if let Some(ref val) = self.prtry { val.validate()? }
75869		Ok(())
75870	}
75871}
75872
75873
75874// PointOfInteraction1 ...
75875#[cfg_attr(feature = "derive_debug", derive(Debug))]
75876#[cfg_attr(feature = "derive_default", derive(Default))]
75877#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75878#[cfg_attr(feature = "derive_clone", derive(Clone))]
75879#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75880pub struct PointOfInteraction1 {
75881	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
75882	pub id: GenericIdentification32,
75883	#[cfg_attr( feature = "derive_serde", serde(rename = "SysNm", skip_serializing_if = "Option::is_none") )]
75884	pub sys_nm: Option<String>,
75885	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpId", skip_serializing_if = "Option::is_none") )]
75886	pub grp_id: Option<String>,
75887	#[cfg_attr( feature = "derive_serde", serde(rename = "Cpblties", skip_serializing_if = "Option::is_none") )]
75888	pub cpblties: Option<PointOfInteractionCapabilities1>,
75889	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmpnt", skip_serializing_if = "Option::is_none") )]
75890	pub cmpnt: Option<Vec<PointOfInteractionComponent1>>,
75891}
75892
75893impl PointOfInteraction1 {
75894	pub fn validate(&self) -> Result<(), ValidationError> {
75895		self.id.validate()?;
75896		if let Some(ref val) = self.sys_nm {
75897			if val.chars().count() < 1 {
75898				return Err(ValidationError::new(1001, "sys_nm is shorter than the minimum length of 1".to_string()));
75899			}
75900			if val.chars().count() > 70 {
75901				return Err(ValidationError::new(1002, "sys_nm exceeds the maximum length of 70".to_string()));
75902			}
75903		}
75904		if let Some(ref val) = self.grp_id {
75905			if val.chars().count() < 1 {
75906				return Err(ValidationError::new(1001, "grp_id is shorter than the minimum length of 1".to_string()));
75907			}
75908			if val.chars().count() > 35 {
75909				return Err(ValidationError::new(1002, "grp_id exceeds the maximum length of 35".to_string()));
75910			}
75911		}
75912		if let Some(ref val) = self.cpblties { val.validate()? }
75913		if let Some(ref vec) = self.cmpnt { for item in vec { item.validate()? } }
75914		Ok(())
75915	}
75916}
75917
75918
75919// PointOfInteractionCapabilities1 ...
75920#[cfg_attr(feature = "derive_debug", derive(Debug))]
75921#[cfg_attr(feature = "derive_default", derive(Default))]
75922#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75923#[cfg_attr(feature = "derive_clone", derive(Clone))]
75924#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75925pub struct PointOfInteractionCapabilities1 {
75926	#[cfg_attr( feature = "derive_serde", serde(rename = "CardRdngCpblties", skip_serializing_if = "Option::is_none") )]
75927	pub card_rdng_cpblties: Option<Vec<CardDataReading1Code>>,
75928	#[cfg_attr( feature = "derive_serde", serde(rename = "CrdhldrVrfctnCpblties", skip_serializing_if = "Option::is_none") )]
75929	pub crdhldr_vrfctn_cpblties: Option<Vec<CardholderVerificationCapability1Code>>,
75930	#[cfg_attr( feature = "derive_serde", serde(rename = "OnLineCpblties", skip_serializing_if = "Option::is_none") )]
75931	pub on_line_cpblties: Option<OnLineCapability1Code>,
75932	#[cfg_attr( feature = "derive_serde", serde(rename = "DispCpblties", skip_serializing_if = "Option::is_none") )]
75933	pub disp_cpblties: Option<Vec<DisplayCapabilities1>>,
75934	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtLineWidth", skip_serializing_if = "Option::is_none") )]
75935	pub prt_line_width: Option<String>,
75936}
75937
75938impl PointOfInteractionCapabilities1 {
75939	pub fn validate(&self) -> Result<(), ValidationError> {
75940		if let Some(ref vec) = self.card_rdng_cpblties { for item in vec { item.validate()? } }
75941		if let Some(ref vec) = self.crdhldr_vrfctn_cpblties { for item in vec { item.validate()? } }
75942		if let Some(ref val) = self.on_line_cpblties { val.validate()? }
75943		if let Some(ref vec) = self.disp_cpblties { for item in vec { item.validate()? } }
75944		if let Some(ref val) = self.prt_line_width {
75945			let pattern = Regex::new("[0-9]{1,3}").unwrap();
75946			if !pattern.is_match(val) {
75947				return Err(ValidationError::new(1005, "prt_line_width does not match the required pattern".to_string()));
75948			}
75949		}
75950		Ok(())
75951	}
75952}
75953
75954
75955// PointOfInteractionComponent1 ...
75956#[cfg_attr(feature = "derive_debug", derive(Debug))]
75957#[cfg_attr(feature = "derive_default", derive(Default))]
75958#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
75959#[cfg_attr(feature = "derive_clone", derive(Clone))]
75960#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
75961pub struct PointOfInteractionComponent1 {
75962	#[cfg_attr( feature = "derive_serde", serde(rename = "POICmpntTp") )]
75963	pub poi_cmpnt_tp: POIComponentType1Code,
75964	#[cfg_attr( feature = "derive_serde", serde(rename = "ManfctrId", skip_serializing_if = "Option::is_none") )]
75965	pub manfctr_id: Option<String>,
75966	#[cfg_attr( feature = "derive_serde", serde(rename = "Mdl", skip_serializing_if = "Option::is_none") )]
75967	pub mdl: Option<String>,
75968	#[cfg_attr( feature = "derive_serde", serde(rename = "VrsnNb", skip_serializing_if = "Option::is_none") )]
75969	pub vrsn_nb: Option<String>,
75970	#[cfg_attr( feature = "derive_serde", serde(rename = "SrlNb", skip_serializing_if = "Option::is_none") )]
75971	pub srl_nb: Option<String>,
75972	#[cfg_attr( feature = "derive_serde", serde(rename = "ApprvlNb", skip_serializing_if = "Option::is_none") )]
75973	pub apprvl_nb: Option<Vec<String>>,
75974}
75975
75976impl PointOfInteractionComponent1 {
75977	pub fn validate(&self) -> Result<(), ValidationError> {
75978		self.poi_cmpnt_tp.validate()?;
75979		if let Some(ref val) = self.manfctr_id {
75980			if val.chars().count() < 1 {
75981				return Err(ValidationError::new(1001, "manfctr_id is shorter than the minimum length of 1".to_string()));
75982			}
75983			if val.chars().count() > 35 {
75984				return Err(ValidationError::new(1002, "manfctr_id exceeds the maximum length of 35".to_string()));
75985			}
75986		}
75987		if let Some(ref val) = self.mdl {
75988			if val.chars().count() < 1 {
75989				return Err(ValidationError::new(1001, "mdl is shorter than the minimum length of 1".to_string()));
75990			}
75991			if val.chars().count() > 35 {
75992				return Err(ValidationError::new(1002, "mdl exceeds the maximum length of 35".to_string()));
75993			}
75994		}
75995		if let Some(ref val) = self.vrsn_nb {
75996			if val.chars().count() < 1 {
75997				return Err(ValidationError::new(1001, "vrsn_nb is shorter than the minimum length of 1".to_string()));
75998			}
75999			if val.chars().count() > 16 {
76000				return Err(ValidationError::new(1002, "vrsn_nb exceeds the maximum length of 16".to_string()));
76001			}
76002		}
76003		if let Some(ref val) = self.srl_nb {
76004			if val.chars().count() < 1 {
76005				return Err(ValidationError::new(1001, "srl_nb is shorter than the minimum length of 1".to_string()));
76006			}
76007			if val.chars().count() > 35 {
76008				return Err(ValidationError::new(1002, "srl_nb exceeds the maximum length of 35".to_string()));
76009			}
76010		}
76011		if let Some(ref vec) = self.apprvl_nb {
76012			for item in vec {
76013				if item.chars().count() < 1 {
76014					return Err(ValidationError::new(1001, "apprvl_nb is shorter than the minimum length of 1".to_string()));
76015				}
76016				if item.chars().count() > 70 {
76017					return Err(ValidationError::new(1002, "apprvl_nb exceeds the maximum length of 70".to_string()));
76018				}
76019			}
76020		}
76021		Ok(())
76022	}
76023}
76024
76025
76026// PoliticalExposureType2Choice ...
76027#[cfg_attr(feature = "derive_debug", derive(Debug))]
76028#[cfg_attr(feature = "derive_default", derive(Default))]
76029#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76030#[cfg_attr(feature = "derive_clone", derive(Clone))]
76031#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76032pub struct PoliticalExposureType2Choice {
76033	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
76034	pub cd: Option<PoliticalExposureType2Code>,
76035	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
76036	pub prtry: Option<GenericIdentification47>,
76037}
76038
76039impl PoliticalExposureType2Choice {
76040	pub fn validate(&self) -> Result<(), ValidationError> {
76041		if let Some(ref val) = self.cd { val.validate()? }
76042		if let Some(ref val) = self.prtry { val.validate()? }
76043		Ok(())
76044	}
76045}
76046
76047
76048// PoliticalExposureType2Code ...
76049#[cfg_attr(feature = "derive_debug", derive(Debug))]
76050#[cfg_attr(feature = "derive_default", derive(Default))]
76051#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76052#[cfg_attr(feature = "derive_clone", derive(Clone))]
76053#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76054pub enum PoliticalExposureType2Code {
76055	#[cfg_attr(feature = "derive_default", default)]
76056	#[cfg_attr( feature = "derive_serde", serde(rename = "NPEX") )]
76057	CodeNPEX,
76058	#[cfg_attr( feature = "derive_serde", serde(rename = "YPEX") )]
76059	CodeYPEX,
76060	#[cfg_attr( feature = "derive_serde", serde(rename = "PEXD") )]
76061	CodePEXD,
76062	#[cfg_attr( feature = "derive_serde", serde(rename = "PEXF") )]
76063	CodePEXF,
76064}
76065
76066impl PoliticalExposureType2Code {
76067	pub fn validate(&self) -> Result<(), ValidationError> {
76068		Ok(())
76069	}
76070}
76071
76072
76073// PoliticallyExposedPerson1 ...
76074#[cfg_attr(feature = "derive_debug", derive(Debug))]
76075#[cfg_attr(feature = "derive_default", derive(Default))]
76076#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76077#[cfg_attr(feature = "derive_clone", derive(Clone))]
76078#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76079pub struct PoliticallyExposedPerson1 {
76080	#[cfg_attr( feature = "derive_serde", serde(rename = "PltclyXpsdPrsnTp") )]
76081	pub pltcly_xpsd_prsn_tp: PoliticalExposureType2Choice,
76082	#[cfg_attr( feature = "derive_serde", serde(rename = "PltclyXpsdPrsnSts", skip_serializing_if = "Option::is_none") )]
76083	pub pltcly_xpsd_prsn_sts: Option<PoliticallyExposedPersonStatus1Choice>,
76084}
76085
76086impl PoliticallyExposedPerson1 {
76087	pub fn validate(&self) -> Result<(), ValidationError> {
76088		self.pltcly_xpsd_prsn_tp.validate()?;
76089		if let Some(ref val) = self.pltcly_xpsd_prsn_sts { val.validate()? }
76090		Ok(())
76091	}
76092}
76093
76094
76095// PoliticallyExposedPersonStatus1Choice ...
76096#[cfg_attr(feature = "derive_debug", derive(Debug))]
76097#[cfg_attr(feature = "derive_default", derive(Default))]
76098#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76099#[cfg_attr(feature = "derive_clone", derive(Clone))]
76100#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76101pub struct PoliticallyExposedPersonStatus1Choice {
76102	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
76103	pub cd: Option<PoliticallyExposedPersonStatus1Code>,
76104	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
76105	pub prtry: Option<GenericIdentification47>,
76106}
76107
76108impl PoliticallyExposedPersonStatus1Choice {
76109	pub fn validate(&self) -> Result<(), ValidationError> {
76110		if let Some(ref val) = self.cd { val.validate()? }
76111		if let Some(ref val) = self.prtry { val.validate()? }
76112		Ok(())
76113	}
76114}
76115
76116
76117// PoliticallyExposedPersonStatus1Code ...
76118#[cfg_attr(feature = "derive_debug", derive(Debug))]
76119#[cfg_attr(feature = "derive_default", derive(Default))]
76120#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76121#[cfg_attr(feature = "derive_clone", derive(Clone))]
76122#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76123pub enum PoliticallyExposedPersonStatus1Code {
76124	#[cfg_attr(feature = "derive_default", default)]
76125	#[cfg_attr( feature = "derive_serde", serde(rename = "PE03") )]
76126	CodePE03,
76127	#[cfg_attr( feature = "derive_serde", serde(rename = "PE01") )]
76128	CodePE01,
76129	#[cfg_attr( feature = "derive_serde", serde(rename = "PE02") )]
76130	CodePE02,
76131}
76132
76133impl PoliticallyExposedPersonStatus1Code {
76134	pub fn validate(&self) -> Result<(), ValidationError> {
76135		Ok(())
76136	}
76137}
76138
76139
76140// PolypropyleneCommodityOther1 ...
76141#[cfg_attr(feature = "derive_debug", derive(Debug))]
76142#[cfg_attr(feature = "derive_default", derive(Default))]
76143#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76144#[cfg_attr(feature = "derive_clone", derive(Clone))]
76145#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76146pub struct PolypropyleneCommodityOther1 {
76147	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
76148	pub base_pdct: AssetClassProductType9Code,
76149	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct") )]
76150	pub sub_pdct: AssetClassSubProductType49Code,
76151}
76152
76153impl PolypropyleneCommodityOther1 {
76154	pub fn validate(&self) -> Result<(), ValidationError> {
76155		self.base_pdct.validate()?;
76156		self.sub_pdct.validate()?;
76157		Ok(())
76158	}
76159}
76160
76161
76162// PolypropyleneCommodityOther2 ...
76163#[cfg_attr(feature = "derive_debug", derive(Debug))]
76164#[cfg_attr(feature = "derive_default", derive(Default))]
76165#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76166#[cfg_attr(feature = "derive_clone", derive(Clone))]
76167#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76168pub struct PolypropyleneCommodityOther2 {
76169	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
76170	pub base_pdct: AssetClassProductType9Code,
76171	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
76172	pub sub_pdct: Option<AssetClassSubProductType49Code>,
76173}
76174
76175impl PolypropyleneCommodityOther2 {
76176	pub fn validate(&self) -> Result<(), ValidationError> {
76177		self.base_pdct.validate()?;
76178		if let Some(ref val) = self.sub_pdct { val.validate()? }
76179		Ok(())
76180	}
76181}
76182
76183
76184// PolypropyleneCommodityPlastic1 ...
76185#[cfg_attr(feature = "derive_debug", derive(Debug))]
76186#[cfg_attr(feature = "derive_default", derive(Default))]
76187#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76188#[cfg_attr(feature = "derive_clone", derive(Clone))]
76189#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76190pub struct PolypropyleneCommodityPlastic1 {
76191	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
76192	pub base_pdct: AssetClassProductType9Code,
76193	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
76194	pub sub_pdct: Option<AssetClassSubProductType18Code>,
76195}
76196
76197impl PolypropyleneCommodityPlastic1 {
76198	pub fn validate(&self) -> Result<(), ValidationError> {
76199		self.base_pdct.validate()?;
76200		if let Some(ref val) = self.sub_pdct { val.validate()? }
76201		Ok(())
76202	}
76203}
76204
76205
76206// PolypropyleneCommodityPlastic2 ...
76207#[cfg_attr(feature = "derive_debug", derive(Debug))]
76208#[cfg_attr(feature = "derive_default", derive(Default))]
76209#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76210#[cfg_attr(feature = "derive_clone", derive(Clone))]
76211#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76212pub struct PolypropyleneCommodityPlastic2 {
76213	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct") )]
76214	pub base_pdct: AssetClassProductType9Code,
76215	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
76216	pub sub_pdct: Option<AssetClassSubProductType18Code>,
76217}
76218
76219impl PolypropyleneCommodityPlastic2 {
76220	pub fn validate(&self) -> Result<(), ValidationError> {
76221		self.base_pdct.validate()?;
76222		if let Some(ref val) = self.sub_pdct { val.validate()? }
76223		Ok(())
76224	}
76225}
76226
76227
76228// PortfolioCode3Choice ...
76229#[cfg_attr(feature = "derive_debug", derive(Debug))]
76230#[cfg_attr(feature = "derive_default", derive(Default))]
76231#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76232#[cfg_attr(feature = "derive_clone", derive(Clone))]
76233#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76234pub struct PortfolioCode3Choice {
76235	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
76236	pub cd: Option<String>,
76237	#[cfg_attr( feature = "derive_serde", serde(rename = "NoPrtfl", skip_serializing_if = "Option::is_none") )]
76238	pub no_prtfl: Option<NotApplicable1Code>,
76239}
76240
76241impl PortfolioCode3Choice {
76242	pub fn validate(&self) -> Result<(), ValidationError> {
76243		if let Some(ref val) = self.cd {
76244			if val.chars().count() < 1 {
76245				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
76246			}
76247			if val.chars().count() > 52 {
76248				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 52".to_string()));
76249			}
76250		}
76251		if let Some(ref val) = self.no_prtfl { val.validate()? }
76252		Ok(())
76253	}
76254}
76255
76256
76257// PortfolioCode5Choice ...
76258#[cfg_attr(feature = "derive_debug", derive(Debug))]
76259#[cfg_attr(feature = "derive_default", derive(Default))]
76260#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76261#[cfg_attr(feature = "derive_clone", derive(Clone))]
76262#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76263pub struct PortfolioCode5Choice {
76264	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtfl", skip_serializing_if = "Option::is_none") )]
76265	pub prtfl: Option<PortfolioIdentification3>,
76266	#[cfg_attr( feature = "derive_serde", serde(rename = "NoPrtfl", skip_serializing_if = "Option::is_none") )]
76267	pub no_prtfl: Option<NotApplicable1Code>,
76268}
76269
76270impl PortfolioCode5Choice {
76271	pub fn validate(&self) -> Result<(), ValidationError> {
76272		if let Some(ref val) = self.prtfl { val.validate()? }
76273		if let Some(ref val) = self.no_prtfl { val.validate()? }
76274		Ok(())
76275	}
76276}
76277
76278
76279// PortfolioIdentification3 ...
76280#[cfg_attr(feature = "derive_debug", derive(Debug))]
76281#[cfg_attr(feature = "derive_default", derive(Default))]
76282#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76283#[cfg_attr(feature = "derive_clone", derive(Clone))]
76284#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76285pub struct PortfolioIdentification3 {
76286	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
76287	pub cd: String,
76288	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtflTxXmptn", skip_serializing_if = "Option::is_none") )]
76289	pub prtfl_tx_xmptn: Option<bool>,
76290}
76291
76292impl PortfolioIdentification3 {
76293	pub fn validate(&self) -> Result<(), ValidationError> {
76294		if self.cd.chars().count() < 1 {
76295			return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
76296		}
76297		if self.cd.chars().count() > 52 {
76298			return Err(ValidationError::new(1002, "cd exceeds the maximum length of 52".to_string()));
76299		}
76300		Ok(())
76301	}
76302}
76303
76304
76305// PortfolioStressTestResult1 ...
76306#[cfg_attr(feature = "derive_debug", derive(Debug))]
76307#[cfg_attr(feature = "derive_default", derive(Default))]
76308#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76309#[cfg_attr(feature = "derive_clone", derive(Clone))]
76310#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76311pub struct PortfolioStressTestResult1 {
76312	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtflId") )]
76313	pub prtfl_id: GenericIdentification165,
76314	#[cfg_attr( feature = "derive_serde", serde(rename = "StrssLoss") )]
76315	pub strss_loss: AmountAndDirection102,
76316	#[cfg_attr( feature = "derive_serde", serde(rename = "RawStrssLoss", skip_serializing_if = "Option::is_none") )]
76317	pub raw_strss_loss: Option<AmountAndDirection102>,
76318	#[cfg_attr( feature = "derive_serde", serde(rename = "Cover1Flg") )]
76319	pub cover1_flg: bool,
76320	#[cfg_attr( feature = "derive_serde", serde(rename = "Cover2Flg") )]
76321	pub cover2_flg: bool,
76322}
76323
76324impl PortfolioStressTestResult1 {
76325	pub fn validate(&self) -> Result<(), ValidationError> {
76326		self.prtfl_id.validate()?;
76327		self.strss_loss.validate()?;
76328		if let Some(ref val) = self.raw_strss_loss { val.validate()? }
76329		Ok(())
76330	}
76331}
76332
76333
76334// Position1 ...
76335#[cfg_attr(feature = "derive_debug", derive(Debug))]
76336#[cfg_attr(feature = "derive_default", derive(Default))]
76337#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76338#[cfg_attr(feature = "derive_clone", derive(Clone))]
76339#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76340pub struct Position1 {
76341	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctId") )]
76342	pub pdct_id: String,
76343	#[cfg_attr( feature = "derive_serde", serde(rename = "RskRqrmnt", skip_serializing_if = "Option::is_none") )]
76344	pub rsk_rqrmnt: Option<EndOfDayRequirement1>,
76345	#[cfg_attr( feature = "derive_serde", serde(rename = "GrssNtnl") )]
76346	pub grss_ntnl: ActiveCurrencyAnd24Amount,
76347	#[cfg_attr( feature = "derive_serde", serde(rename = "NetNtnl") )]
76348	pub net_ntnl: AmountAndDirection102,
76349	#[cfg_attr( feature = "derive_serde", serde(rename = "GrssDltaEqvtVal", skip_serializing_if = "Option::is_none") )]
76350	pub grss_dlta_eqvt_val: Option<ActiveCurrencyAndAmount>,
76351	#[cfg_attr( feature = "derive_serde", serde(rename = "NetDltaEqvtVal", skip_serializing_if = "Option::is_none") )]
76352	pub net_dlta_eqvt_val: Option<AmountAndDirection102>,
76353	#[cfg_attr( feature = "derive_serde", serde(rename = "GrssDltaEqvtQty", skip_serializing_if = "Option::is_none") )]
76354	pub grss_dlta_eqvt_qty: Option<f64>,
76355	#[cfg_attr( feature = "derive_serde", serde(rename = "NetDltaEqvtQty", skip_serializing_if = "Option::is_none") )]
76356	pub net_dlta_eqvt_qty: Option<f64>,
76357	#[cfg_attr( feature = "derive_serde", serde(rename = "GrssMktVal") )]
76358	pub grss_mkt_val: ActiveCurrencyAndAmount,
76359}
76360
76361impl Position1 {
76362	pub fn validate(&self) -> Result<(), ValidationError> {
76363		if self.pdct_id.chars().count() < 1 {
76364			return Err(ValidationError::new(1001, "pdct_id is shorter than the minimum length of 1".to_string()));
76365		}
76366		if self.pdct_id.chars().count() > 256 {
76367			return Err(ValidationError::new(1002, "pdct_id exceeds the maximum length of 256".to_string()));
76368		}
76369		if let Some(ref val) = self.rsk_rqrmnt { val.validate()? }
76370		self.grss_ntnl.validate()?;
76371		self.net_ntnl.validate()?;
76372		if let Some(ref val) = self.grss_dlta_eqvt_val { val.validate()? }
76373		if let Some(ref val) = self.net_dlta_eqvt_val { val.validate()? }
76374		self.grss_mkt_val.validate()?;
76375		Ok(())
76376	}
76377}
76378
76379
76380// PositionAccount1 ...
76381#[cfg_attr(feature = "derive_debug", derive(Debug))]
76382#[cfg_attr(feature = "derive_default", derive(Default))]
76383#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76384#[cfg_attr(feature = "derive_clone", derive(Clone))]
76385#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76386pub struct PositionAccount1 {
76387	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
76388	pub id: PartyIdentification118Choice,
76389}
76390
76391impl PositionAccount1 {
76392	pub fn validate(&self) -> Result<(), ValidationError> {
76393		self.id.validate()?;
76394		Ok(())
76395	}
76396}
76397
76398
76399// PositionAccount2 ...
76400#[cfg_attr(feature = "derive_debug", derive(Debug))]
76401#[cfg_attr(feature = "derive_default", derive(Default))]
76402#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76403#[cfg_attr(feature = "derive_clone", derive(Clone))]
76404#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76405pub struct PositionAccount2 {
76406	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
76407	pub id: GenericIdentification165,
76408	#[cfg_attr( feature = "derive_serde", serde(rename = "Pos") )]
76409	pub pos: Vec<Position1>,
76410}
76411
76412impl PositionAccount2 {
76413	pub fn validate(&self) -> Result<(), ValidationError> {
76414		self.id.validate()?;
76415		for item in &self.pos { item.validate()? }
76416		Ok(())
76417	}
76418}
76419
76420
76421// PositionEffect3Code ...
76422#[cfg_attr(feature = "derive_debug", derive(Debug))]
76423#[cfg_attr(feature = "derive_default", derive(Default))]
76424#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76425#[cfg_attr(feature = "derive_clone", derive(Clone))]
76426#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76427pub enum PositionEffect3Code {
76428	#[cfg_attr(feature = "derive_default", default)]
76429	#[cfg_attr( feature = "derive_serde", serde(rename = "FIFO") )]
76430	CodeFIFO,
76431	#[cfg_attr( feature = "derive_serde", serde(rename = "LIFO") )]
76432	CodeLIFO,
76433}
76434
76435impl PositionEffect3Code {
76436	pub fn validate(&self) -> Result<(), ValidationError> {
76437		Ok(())
76438	}
76439}
76440
76441
76442// PositionSet16 ...
76443#[cfg_attr(feature = "derive_debug", derive(Debug))]
76444#[cfg_attr(feature = "derive_default", derive(Default))]
76445#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76446#[cfg_attr(feature = "derive_clone", derive(Clone))]
76447#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76448pub struct PositionSet16 {
76449	#[cfg_attr( feature = "derive_serde", serde(rename = "Dmnsns") )]
76450	pub dmnsns: PositionSetDimensions14,
76451	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtrcs") )]
76452	pub mtrcs: PositionSetMetrics7,
76453}
76454
76455impl PositionSet16 {
76456	pub fn validate(&self) -> Result<(), ValidationError> {
76457		self.dmnsns.validate()?;
76458		self.mtrcs.validate()?;
76459		Ok(())
76460	}
76461}
76462
76463
76464// PositionSet17 ...
76465#[cfg_attr(feature = "derive_debug", derive(Debug))]
76466#[cfg_attr(feature = "derive_default", derive(Default))]
76467#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76468#[cfg_attr(feature = "derive_clone", derive(Clone))]
76469#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76470pub struct PositionSet17 {
76471	#[cfg_attr( feature = "derive_serde", serde(rename = "Dmnsns") )]
76472	pub dmnsns: PositionSetDimensions14,
76473	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtrcs") )]
76474	pub mtrcs: PositionSetMetrics13,
76475}
76476
76477impl PositionSet17 {
76478	pub fn validate(&self) -> Result<(), ValidationError> {
76479		self.dmnsns.validate()?;
76480		self.mtrcs.validate()?;
76481		Ok(())
76482	}
76483}
76484
76485
76486// PositionSet18 ...
76487#[cfg_attr(feature = "derive_debug", derive(Debug))]
76488#[cfg_attr(feature = "derive_default", derive(Default))]
76489#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76490#[cfg_attr(feature = "derive_clone", derive(Clone))]
76491#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76492pub struct PositionSet18 {
76493	#[cfg_attr( feature = "derive_serde", serde(rename = "Dmnsns") )]
76494	pub dmnsns: PositionSetDimensions14,
76495	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtrcs") )]
76496	pub mtrcs: PositionSetMetrics12,
76497}
76498
76499impl PositionSet18 {
76500	pub fn validate(&self) -> Result<(), ValidationError> {
76501		self.dmnsns.validate()?;
76502		self.mtrcs.validate()?;
76503		Ok(())
76504	}
76505}
76506
76507
76508// PositionSet19 ...
76509#[cfg_attr(feature = "derive_debug", derive(Debug))]
76510#[cfg_attr(feature = "derive_default", derive(Default))]
76511#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76512#[cfg_attr(feature = "derive_clone", derive(Clone))]
76513#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76514pub struct PositionSet19 {
76515	#[cfg_attr( feature = "derive_serde", serde(rename = "Dmnsns") )]
76516	pub dmnsns: PositionSetDimensions12,
76517	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtrcs") )]
76518	pub mtrcs: PositionSetMetrics11,
76519}
76520
76521impl PositionSet19 {
76522	pub fn validate(&self) -> Result<(), ValidationError> {
76523		self.dmnsns.validate()?;
76524		self.mtrcs.validate()?;
76525		Ok(())
76526	}
76527}
76528
76529
76530// PositionSet20 ...
76531#[cfg_attr(feature = "derive_debug", derive(Debug))]
76532#[cfg_attr(feature = "derive_default", derive(Default))]
76533#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76534#[cfg_attr(feature = "derive_clone", derive(Clone))]
76535#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76536pub struct PositionSet20 {
76537	#[cfg_attr( feature = "derive_serde", serde(rename = "Dmnsns") )]
76538	pub dmnsns: PositionSetDimensions15,
76539	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtrcs") )]
76540	pub mtrcs: PositionSetMetrics10,
76541}
76542
76543impl PositionSet20 {
76544	pub fn validate(&self) -> Result<(), ValidationError> {
76545		self.dmnsns.validate()?;
76546		self.mtrcs.validate()?;
76547		Ok(())
76548	}
76549}
76550
76551
76552// PositionSet21 ...
76553#[cfg_attr(feature = "derive_debug", derive(Debug))]
76554#[cfg_attr(feature = "derive_default", derive(Default))]
76555#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76556#[cfg_attr(feature = "derive_clone", derive(Clone))]
76557#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76558pub struct PositionSet21 {
76559	#[cfg_attr( feature = "derive_serde", serde(rename = "Dmnsns") )]
76560	pub dmnsns: PositionSetDimensions16,
76561	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtrcs") )]
76562	pub mtrcs: PositionSetMetrics14,
76563}
76564
76565impl PositionSet21 {
76566	pub fn validate(&self) -> Result<(), ValidationError> {
76567		self.dmnsns.validate()?;
76568		self.mtrcs.validate()?;
76569		Ok(())
76570	}
76571}
76572
76573
76574// PositionSet22 ...
76575#[cfg_attr(feature = "derive_debug", derive(Debug))]
76576#[cfg_attr(feature = "derive_default", derive(Default))]
76577#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76578#[cfg_attr(feature = "derive_clone", derive(Clone))]
76579#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76580pub struct PositionSet22 {
76581	#[cfg_attr( feature = "derive_serde", serde(rename = "Dmnsns") )]
76582	pub dmnsns: PositionSetCollateralDimensions3,
76583	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtrcs") )]
76584	pub mtrcs: PositionSetCollateralMetrics2,
76585}
76586
76587impl PositionSet22 {
76588	pub fn validate(&self) -> Result<(), ValidationError> {
76589		self.dmnsns.validate()?;
76590		self.mtrcs.validate()?;
76591		Ok(())
76592	}
76593}
76594
76595
76596// PositionSetAggregated2Choice ...
76597#[cfg_attr(feature = "derive_debug", derive(Debug))]
76598#[cfg_attr(feature = "derive_default", derive(Default))]
76599#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76600#[cfg_attr(feature = "derive_clone", derive(Clone))]
76601#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76602pub struct PositionSetAggregated2Choice {
76603	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
76604	pub data_set_actn: Option<ReportPeriodActivity1Code>,
76605	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
76606	pub rpt: Option<PositionSetAggregated4>,
76607}
76608
76609impl PositionSetAggregated2Choice {
76610	pub fn validate(&self) -> Result<(), ValidationError> {
76611		if let Some(ref val) = self.data_set_actn { val.validate()? }
76612		if let Some(ref val) = self.rpt { val.validate()? }
76613		Ok(())
76614	}
76615}
76616
76617
76618// PositionSetAggregated4 ...
76619#[cfg_attr(feature = "derive_debug", derive(Debug))]
76620#[cfg_attr(feature = "derive_default", derive(Default))]
76621#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76622#[cfg_attr(feature = "derive_clone", derive(Clone))]
76623#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76624pub struct PositionSetAggregated4 {
76625	#[cfg_attr( feature = "derive_serde", serde(rename = "RefDt") )]
76626	pub ref_dt: String,
76627	#[cfg_attr( feature = "derive_serde", serde(rename = "PosSet", skip_serializing_if = "Option::is_none") )]
76628	pub pos_set: Option<Vec<PositionSet21>>,
76629	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyPosSet", skip_serializing_if = "Option::is_none") )]
76630	pub ccy_pos_set: Option<Vec<PositionSet21>>,
76631	#[cfg_attr( feature = "derive_serde", serde(rename = "CollPosSet", skip_serializing_if = "Option::is_none") )]
76632	pub coll_pos_set: Option<Vec<PositionSet22>>,
76633	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyCollPosSet", skip_serializing_if = "Option::is_none") )]
76634	pub ccy_coll_pos_set: Option<Vec<PositionSet22>>,
76635}
76636
76637impl PositionSetAggregated4 {
76638	pub fn validate(&self) -> Result<(), ValidationError> {
76639		if let Some(ref vec) = self.pos_set { for item in vec { item.validate()? } }
76640		if let Some(ref vec) = self.ccy_pos_set { for item in vec { item.validate()? } }
76641		if let Some(ref vec) = self.coll_pos_set { for item in vec { item.validate()? } }
76642		if let Some(ref vec) = self.ccy_coll_pos_set { for item in vec { item.validate()? } }
76643		Ok(())
76644	}
76645}
76646
76647
76648// PositionSetBuyerAndSeller2 ...
76649#[cfg_attr(feature = "derive_debug", derive(Debug))]
76650#[cfg_attr(feature = "derive_default", derive(Default))]
76651#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76652#[cfg_attr(feature = "derive_clone", derive(Clone))]
76653#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76654pub struct PositionSetBuyerAndSeller2 {
76655	#[cfg_attr( feature = "derive_serde", serde(rename = "Buyr", skip_serializing_if = "Option::is_none") )]
76656	pub buyr: Option<PositionSetTotal2>,
76657	#[cfg_attr( feature = "derive_serde", serde(rename = "Sellr", skip_serializing_if = "Option::is_none") )]
76658	pub sellr: Option<PositionSetTotal2>,
76659}
76660
76661impl PositionSetBuyerAndSeller2 {
76662	pub fn validate(&self) -> Result<(), ValidationError> {
76663		if let Some(ref val) = self.buyr { val.validate()? }
76664		if let Some(ref val) = self.sellr { val.validate()? }
76665		Ok(())
76666	}
76667}
76668
76669
76670// PositionSetCollateralDimensions3 ...
76671#[cfg_attr(feature = "derive_debug", derive(Debug))]
76672#[cfg_attr(feature = "derive_default", derive(Default))]
76673#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76674#[cfg_attr(feature = "derive_clone", derive(Clone))]
76675#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76676pub struct PositionSetCollateralDimensions3 {
76677	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId", skip_serializing_if = "Option::is_none") )]
76678	pub ctr_pty_id: Option<TradeCounterpartyReport20>,
76679	#[cfg_attr( feature = "derive_serde", serde(rename = "Coll", skip_serializing_if = "Option::is_none") )]
76680	pub coll: Option<MarginCollateralReport4>,
76681	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlMrgnPstdCcy", skip_serializing_if = "Option::is_none") )]
76682	pub initl_mrgn_pstd_ccy: Option<String>,
76683	#[cfg_attr( feature = "derive_serde", serde(rename = "VartnMrgnPstdCcy", skip_serializing_if = "Option::is_none") )]
76684	pub vartn_mrgn_pstd_ccy: Option<String>,
76685	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlMrgnRcvdCcy", skip_serializing_if = "Option::is_none") )]
76686	pub initl_mrgn_rcvd_ccy: Option<String>,
76687	#[cfg_attr( feature = "derive_serde", serde(rename = "VartnMrgnRcvdCcy", skip_serializing_if = "Option::is_none") )]
76688	pub vartn_mrgn_rcvd_ccy: Option<String>,
76689	#[cfg_attr( feature = "derive_serde", serde(rename = "XcssCollPstdCcy", skip_serializing_if = "Option::is_none") )]
76690	pub xcss_coll_pstd_ccy: Option<String>,
76691	#[cfg_attr( feature = "derive_serde", serde(rename = "XcssCollRcvdCcy", skip_serializing_if = "Option::is_none") )]
76692	pub xcss_coll_rcvd_ccy: Option<String>,
76693}
76694
76695impl PositionSetCollateralDimensions3 {
76696	pub fn validate(&self) -> Result<(), ValidationError> {
76697		if let Some(ref val) = self.ctr_pty_id { val.validate()? }
76698		if let Some(ref val) = self.coll { val.validate()? }
76699		if let Some(ref val) = self.initl_mrgn_pstd_ccy {
76700			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
76701			if !pattern.is_match(val) {
76702				return Err(ValidationError::new(1005, "initl_mrgn_pstd_ccy does not match the required pattern".to_string()));
76703			}
76704		}
76705		if let Some(ref val) = self.vartn_mrgn_pstd_ccy {
76706			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
76707			if !pattern.is_match(val) {
76708				return Err(ValidationError::new(1005, "vartn_mrgn_pstd_ccy does not match the required pattern".to_string()));
76709			}
76710		}
76711		if let Some(ref val) = self.initl_mrgn_rcvd_ccy {
76712			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
76713			if !pattern.is_match(val) {
76714				return Err(ValidationError::new(1005, "initl_mrgn_rcvd_ccy does not match the required pattern".to_string()));
76715			}
76716		}
76717		if let Some(ref val) = self.vartn_mrgn_rcvd_ccy {
76718			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
76719			if !pattern.is_match(val) {
76720				return Err(ValidationError::new(1005, "vartn_mrgn_rcvd_ccy does not match the required pattern".to_string()));
76721			}
76722		}
76723		if let Some(ref val) = self.xcss_coll_pstd_ccy {
76724			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
76725			if !pattern.is_match(val) {
76726				return Err(ValidationError::new(1005, "xcss_coll_pstd_ccy does not match the required pattern".to_string()));
76727			}
76728		}
76729		if let Some(ref val) = self.xcss_coll_rcvd_ccy {
76730			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
76731			if !pattern.is_match(val) {
76732				return Err(ValidationError::new(1005, "xcss_coll_rcvd_ccy does not match the required pattern".to_string()));
76733			}
76734		}
76735		Ok(())
76736	}
76737}
76738
76739
76740// PositionSetCollateralMetrics2 ...
76741#[cfg_attr(feature = "derive_debug", derive(Debug))]
76742#[cfg_attr(feature = "derive_default", derive(Default))]
76743#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76744#[cfg_attr(feature = "derive_clone", derive(Clone))]
76745#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76746pub struct PositionSetCollateralMetrics2 {
76747	#[cfg_attr( feature = "derive_serde", serde(rename = "Ttl", skip_serializing_if = "Option::is_none") )]
76748	pub ttl: Option<PositionSetCollateralTotal2>,
76749	#[cfg_attr( feature = "derive_serde", serde(rename = "Clean", skip_serializing_if = "Option::is_none") )]
76750	pub clean: Option<PositionSetCollateralTotal2>,
76751}
76752
76753impl PositionSetCollateralMetrics2 {
76754	pub fn validate(&self) -> Result<(), ValidationError> {
76755		if let Some(ref val) = self.ttl { val.validate()? }
76756		if let Some(ref val) = self.clean { val.validate()? }
76757		Ok(())
76758	}
76759}
76760
76761
76762// PositionSetCollateralTotal2 ...
76763#[cfg_attr(feature = "derive_debug", derive(Debug))]
76764#[cfg_attr(feature = "derive_default", derive(Default))]
76765#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76766#[cfg_attr(feature = "derive_clone", derive(Clone))]
76767#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76768pub struct PositionSetCollateralTotal2 {
76769	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfRpts", skip_serializing_if = "Option::is_none") )]
76770	pub nb_of_rpts: Option<f64>,
76771	#[cfg_attr( feature = "derive_serde", serde(rename = "PstdMrgnOrColl", skip_serializing_if = "Option::is_none") )]
76772	pub pstd_mrgn_or_coll: Option<PostedMarginOrCollateral6>,
76773	#[cfg_attr( feature = "derive_serde", serde(rename = "RcvdMrgnOrColl", skip_serializing_if = "Option::is_none") )]
76774	pub rcvd_mrgn_or_coll: Option<ReceivedMarginOrCollateral6>,
76775}
76776
76777impl PositionSetCollateralTotal2 {
76778	pub fn validate(&self) -> Result<(), ValidationError> {
76779		if let Some(ref val) = self.pstd_mrgn_or_coll { val.validate()? }
76780		if let Some(ref val) = self.rcvd_mrgn_or_coll { val.validate()? }
76781		Ok(())
76782	}
76783}
76784
76785
76786// PositionSetDimensions12 ...
76787#[cfg_attr(feature = "derive_debug", derive(Debug))]
76788#[cfg_attr(feature = "derive_default", derive(Default))]
76789#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76790#[cfg_attr(feature = "derive_clone", derive(Clone))]
76791#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76792pub struct PositionSetDimensions12 {
76793	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty", skip_serializing_if = "Option::is_none") )]
76794	pub rptg_ctr_pty: Option<OrganisationIdentification15Choice>,
76795	#[cfg_attr( feature = "derive_serde", serde(rename = "CollData", skip_serializing_if = "Option::is_none") )]
76796	pub coll_data: Option<CollateralData33>,
76797	#[cfg_attr( feature = "derive_serde", serde(rename = "OtlrsIncl", skip_serializing_if = "Option::is_none") )]
76798	pub otlrs_incl: Option<bool>,
76799}
76800
76801impl PositionSetDimensions12 {
76802	pub fn validate(&self) -> Result<(), ValidationError> {
76803		if let Some(ref val) = self.rptg_ctr_pty { val.validate()? }
76804		if let Some(ref val) = self.coll_data { val.validate()? }
76805		Ok(())
76806	}
76807}
76808
76809
76810// PositionSetDimensions14 ...
76811#[cfg_attr(feature = "derive_debug", derive(Debug))]
76812#[cfg_attr(feature = "derive_default", derive(Default))]
76813#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76814#[cfg_attr(feature = "derive_clone", derive(Clone))]
76815#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76816pub struct PositionSetDimensions14 {
76817	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyData", skip_serializing_if = "Option::is_none") )]
76818	pub ctr_pty_data: Option<CounterpartyData86>,
76819	#[cfg_attr( feature = "derive_serde", serde(rename = "LnData", skip_serializing_if = "Option::is_none") )]
76820	pub ln_data: Option<LoanData134>,
76821	#[cfg_attr( feature = "derive_serde", serde(rename = "CollData", skip_serializing_if = "Option::is_none") )]
76822	pub coll_data: Option<CollateralData33>,
76823	#[cfg_attr( feature = "derive_serde", serde(rename = "OtlrsIncl", skip_serializing_if = "Option::is_none") )]
76824	pub otlrs_incl: Option<bool>,
76825}
76826
76827impl PositionSetDimensions14 {
76828	pub fn validate(&self) -> Result<(), ValidationError> {
76829		if let Some(ref val) = self.ctr_pty_data { val.validate()? }
76830		if let Some(ref val) = self.ln_data { val.validate()? }
76831		if let Some(ref val) = self.coll_data { val.validate()? }
76832		Ok(())
76833	}
76834}
76835
76836
76837// PositionSetDimensions15 ...
76838#[cfg_attr(feature = "derive_debug", derive(Debug))]
76839#[cfg_attr(feature = "derive_default", derive(Default))]
76840#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76841#[cfg_attr(feature = "derive_clone", derive(Clone))]
76842#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76843pub struct PositionSetDimensions15 {
76844	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty", skip_serializing_if = "Option::is_none") )]
76845	pub rptg_ctr_pty: Option<OrganisationIdentification15Choice>,
76846	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty", skip_serializing_if = "Option::is_none") )]
76847	pub othr_ctr_pty: Option<OrganisationIdentification15Choice>,
76848	#[cfg_attr( feature = "derive_serde", serde(rename = "CollPrtflId", skip_serializing_if = "Option::is_none") )]
76849	pub coll_prtfl_id: Option<String>,
76850	#[cfg_attr( feature = "derive_serde", serde(rename = "OtlrsIncl", skip_serializing_if = "Option::is_none") )]
76851	pub otlrs_incl: Option<bool>,
76852}
76853
76854impl PositionSetDimensions15 {
76855	pub fn validate(&self) -> Result<(), ValidationError> {
76856		if let Some(ref val) = self.rptg_ctr_pty { val.validate()? }
76857		if let Some(ref val) = self.othr_ctr_pty { val.validate()? }
76858		if let Some(ref val) = self.coll_prtfl_id {
76859			if val.chars().count() < 1 {
76860				return Err(ValidationError::new(1001, "coll_prtfl_id is shorter than the minimum length of 1".to_string()));
76861			}
76862			if val.chars().count() > 52 {
76863				return Err(ValidationError::new(1002, "coll_prtfl_id exceeds the maximum length of 52".to_string()));
76864			}
76865		}
76866		Ok(())
76867	}
76868}
76869
76870
76871// PositionSetDimensions16 ...
76872#[cfg_attr(feature = "derive_debug", derive(Debug))]
76873#[cfg_attr(feature = "derive_default", derive(Default))]
76874#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76875#[cfg_attr(feature = "derive_clone", derive(Clone))]
76876#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76877pub struct PositionSetDimensions16 {
76878	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId", skip_serializing_if = "Option::is_none") )]
76879	pub ctr_pty_id: Option<TradeCounterpartyReport20>,
76880	#[cfg_attr( feature = "derive_serde", serde(rename = "ValCcy", skip_serializing_if = "Option::is_none") )]
76881	pub val_ccy: Option<String>,
76882	#[cfg_attr( feature = "derive_serde", serde(rename = "Coll", skip_serializing_if = "Option::is_none") )]
76883	pub coll: Option<MarginCollateralReport4>,
76884	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctTp", skip_serializing_if = "Option::is_none") )]
76885	pub ctrct_tp: Option<FinancialInstrumentContractType2Code>,
76886	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstClss", skip_serializing_if = "Option::is_none") )]
76887	pub asst_clss: Option<ProductType4Code>,
76888	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygInstrm", skip_serializing_if = "Option::is_none") )]
76889	pub undrlyg_instrm: Option<SecurityIdentification41Choice>,
76890	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlCcy", skip_serializing_if = "Option::is_none") )]
76891	pub ntnl_ccy: Option<String>,
76892	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlCcyScndLeg", skip_serializing_if = "Option::is_none") )]
76893	pub ntnl_ccy_scnd_leg: Option<String>,
76894	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcy", skip_serializing_if = "Option::is_none") )]
76895	pub sttlm_ccy: Option<String>,
76896	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcyScndLeg", skip_serializing_if = "Option::is_none") )]
76897	pub sttlm_ccy_scnd_leg: Option<String>,
76898	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
76899	pub mstr_agrmt: Option<MasterAgreement8>,
76900	#[cfg_attr( feature = "derive_serde", serde(rename = "Clrd", skip_serializing_if = "Option::is_none") )]
76901	pub clrd: Option<bool>,
76902	#[cfg_attr( feature = "derive_serde", serde(rename = "IntraGrp", skip_serializing_if = "Option::is_none") )]
76903	pub intra_grp: Option<bool>,
76904	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRateBsis", skip_serializing_if = "Option::is_none") )]
76905	pub xchg_rate_bsis: Option<ExchangeRateBasis1Choice>,
76906	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnTp", skip_serializing_if = "Option::is_none") )]
76907	pub optn_tp: Option<OptionType2Code>,
76908	#[cfg_attr( feature = "derive_serde", serde(rename = "TmToMtrty", skip_serializing_if = "Option::is_none") )]
76909	pub tm_to_mtrty: Option<TimeToMaturity1Choice>,
76910	#[cfg_attr( feature = "derive_serde", serde(rename = "IRSTp", skip_serializing_if = "Option::is_none") )]
76911	pub irs_tp: Option<String>,
76912	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdt", skip_serializing_if = "Option::is_none") )]
76913	pub cdt: Option<CreditDerivative7>,
76914	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmmdty", skip_serializing_if = "Option::is_none") )]
76915	pub cmmdty: Option<AssetClassCommodity6Choice>,
76916	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPmt", skip_serializing_if = "Option::is_none") )]
76917	pub othr_pmt: Option<OtherPayment6>,
76918}
76919
76920impl PositionSetDimensions16 {
76921	pub fn validate(&self) -> Result<(), ValidationError> {
76922		if let Some(ref val) = self.ctr_pty_id { val.validate()? }
76923		if let Some(ref val) = self.val_ccy {
76924			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
76925			if !pattern.is_match(val) {
76926				return Err(ValidationError::new(1005, "val_ccy does not match the required pattern".to_string()));
76927			}
76928		}
76929		if let Some(ref val) = self.coll { val.validate()? }
76930		if let Some(ref val) = self.ctrct_tp { val.validate()? }
76931		if let Some(ref val) = self.asst_clss { val.validate()? }
76932		if let Some(ref val) = self.undrlyg_instrm { val.validate()? }
76933		if let Some(ref val) = self.ntnl_ccy {
76934			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
76935			if !pattern.is_match(val) {
76936				return Err(ValidationError::new(1005, "ntnl_ccy does not match the required pattern".to_string()));
76937			}
76938		}
76939		if let Some(ref val) = self.ntnl_ccy_scnd_leg {
76940			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
76941			if !pattern.is_match(val) {
76942				return Err(ValidationError::new(1005, "ntnl_ccy_scnd_leg does not match the required pattern".to_string()));
76943			}
76944		}
76945		if let Some(ref val) = self.sttlm_ccy {
76946			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
76947			if !pattern.is_match(val) {
76948				return Err(ValidationError::new(1005, "sttlm_ccy does not match the required pattern".to_string()));
76949			}
76950		}
76951		if let Some(ref val) = self.sttlm_ccy_scnd_leg {
76952			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
76953			if !pattern.is_match(val) {
76954				return Err(ValidationError::new(1005, "sttlm_ccy_scnd_leg does not match the required pattern".to_string()));
76955			}
76956		}
76957		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
76958		if let Some(ref val) = self.xchg_rate_bsis { val.validate()? }
76959		if let Some(ref val) = self.optn_tp { val.validate()? }
76960		if let Some(ref val) = self.tm_to_mtrty { val.validate()? }
76961		if let Some(ref val) = self.irs_tp {
76962			if val.chars().count() < 1 {
76963				return Err(ValidationError::new(1001, "irs_tp is shorter than the minimum length of 1".to_string()));
76964			}
76965			if val.chars().count() > 52 {
76966				return Err(ValidationError::new(1002, "irs_tp exceeds the maximum length of 52".to_string()));
76967			}
76968		}
76969		if let Some(ref val) = self.cdt { val.validate()? }
76970		if let Some(ref val) = self.cmmdty { val.validate()? }
76971		if let Some(ref val) = self.othr_pmt { val.validate()? }
76972		Ok(())
76973	}
76974}
76975
76976
76977// PositionSetMetrics10 ...
76978#[cfg_attr(feature = "derive_debug", derive(Debug))]
76979#[cfg_attr(feature = "derive_default", derive(Default))]
76980#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
76981#[cfg_attr(feature = "derive_clone", derive(Clone))]
76982#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
76983pub struct PositionSetMetrics10 {
76984	#[cfg_attr( feature = "derive_serde", serde(rename = "VolMtrcs", skip_serializing_if = "Option::is_none") )]
76985	pub vol_mtrcs: Option<ExposureMetrics6>,
76986}
76987
76988impl PositionSetMetrics10 {
76989	pub fn validate(&self) -> Result<(), ValidationError> {
76990		if let Some(ref val) = self.vol_mtrcs { val.validate()? }
76991		Ok(())
76992	}
76993}
76994
76995
76996// PositionSetMetrics11 ...
76997#[cfg_attr(feature = "derive_debug", derive(Debug))]
76998#[cfg_attr(feature = "derive_default", derive(Default))]
76999#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
77000#[cfg_attr(feature = "derive_clone", derive(Clone))]
77001#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
77002pub struct PositionSetMetrics11 {
77003	#[cfg_attr( feature = "derive_serde", serde(rename = "VolMtrcs", skip_serializing_if = "Option::is_none") )]
77004	pub vol_mtrcs: Option<VolumeMetrics4>,
77005	#[cfg_attr( feature = "derive_serde", serde(rename = "CshRinvstmtRate", skip_serializing_if = "Option::is_none") )]
77006	pub csh_rinvstmt_rate: Option<f64>,
77007}
77008
77009impl PositionSetMetrics11 {
77010	pub fn validate(&self) -> Result<(), ValidationError> {
77011		if let Some(ref val) = self.vol_mtrcs { val.validate()? }
77012		Ok(())
77013	}
77014}
77015
77016
77017// PositionSetMetrics12 ...
77018#[cfg_attr(feature = "derive_debug", derive(Debug))]
77019#[cfg_attr(feature = "derive_default", derive(Default))]
77020#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
77021#[cfg_attr(feature = "derive_clone", derive(Clone))]
77022#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
77023pub struct PositionSetMetrics12 {
77024	#[cfg_attr( feature = "derive_serde", serde(rename = "VolMtrcs", skip_serializing_if = "Option::is_none") )]
77025	pub vol_mtrcs: Option<VolumeMetrics6>,
77026	#[cfg_attr( feature = "derive_serde", serde(rename = "HrcutOrMrgn", skip_serializing_if = "Option::is_none") )]
77027	pub hrcut_or_mrgn: Option<f64>,
77028	#[cfg_attr( feature = "derive_serde", serde(rename = "QtyOrNmnlAmt", skip_serializing_if = "Option::is_none") )]
77029	pub qty_or_nmnl_amt: Option<QuantityNominalValue2Choice>,
77030}
77031
77032impl PositionSetMetrics12 {
77033	pub fn validate(&self) -> Result<(), ValidationError> {
77034		if let Some(ref val) = self.vol_mtrcs { val.validate()? }
77035		if let Some(ref val) = self.qty_or_nmnl_amt { val.validate()? }
77036		Ok(())
77037	}
77038}
77039
77040
77041// PositionSetMetrics13 ...
77042#[cfg_attr(feature = "derive_debug", derive(Debug))]
77043#[cfg_attr(feature = "derive_default", derive(Default))]
77044#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
77045#[cfg_attr(feature = "derive_clone", derive(Clone))]
77046#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
77047pub struct PositionSetMetrics13 {
77048	#[cfg_attr( feature = "derive_serde", serde(rename = "VolMtrcs") )]
77049	pub vol_mtrcs: VolumeMetrics5,
77050	#[cfg_attr( feature = "derive_serde", serde(rename = "PricMtrcs", skip_serializing_if = "Option::is_none") )]
77051	pub pric_mtrcs: Option<PriceMetrics3>,
77052}
77053
77054impl PositionSetMetrics13 {
77055	pub fn validate(&self) -> Result<(), ValidationError> {
77056		self.vol_mtrcs.validate()?;
77057		if let Some(ref val) = self.pric_mtrcs { val.validate()? }
77058		Ok(())
77059	}
77060}
77061
77062
77063// PositionSetMetrics14 ...
77064#[cfg_attr(feature = "derive_debug", derive(Debug))]
77065#[cfg_attr(feature = "derive_default", derive(Default))]
77066#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
77067#[cfg_attr(feature = "derive_clone", derive(Clone))]
77068#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
77069pub struct PositionSetMetrics14 {
77070	#[cfg_attr( feature = "derive_serde", serde(rename = "Ttl", skip_serializing_if = "Option::is_none") )]
77071	pub ttl: Option<PositionSetBuyerAndSeller2>,
77072	#[cfg_attr( feature = "derive_serde", serde(rename = "Clean", skip_serializing_if = "Option::is_none") )]
77073	pub clean: Option<PositionSetBuyerAndSeller2>,
77074}
77075
77076impl PositionSetMetrics14 {
77077	pub fn validate(&self) -> Result<(), ValidationError> {
77078		if let Some(ref val) = self.ttl { val.validate()? }
77079		if let Some(ref val) = self.clean { val.validate()? }
77080		Ok(())
77081	}
77082}
77083
77084
77085// PositionSetMetrics7 ...
77086#[cfg_attr(feature = "derive_debug", derive(Debug))]
77087#[cfg_attr(feature = "derive_default", derive(Default))]
77088#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
77089#[cfg_attr(feature = "derive_clone", derive(Clone))]
77090#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
77091pub struct PositionSetMetrics7 {
77092	#[cfg_attr( feature = "derive_serde", serde(rename = "VolMtrcs") )]
77093	pub vol_mtrcs: VolumeMetrics5,
77094}
77095
77096impl PositionSetMetrics7 {
77097	pub fn validate(&self) -> Result<(), ValidationError> {
77098		self.vol_mtrcs.validate()?;
77099		Ok(())
77100	}
77101}
77102
77103
77104// PositionSetReport3Choice ...
77105#[cfg_attr(feature = "derive_debug", derive(Debug))]
77106#[cfg_attr(feature = "derive_default", derive(Default))]
77107#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
77108#[cfg_attr(feature = "derive_clone", derive(Clone))]
77109#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
77110pub struct PositionSetReport3Choice {
77111	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
77112	pub data_set_actn: Option<ReportPeriodActivity1Code>,
77113	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
77114	pub rpt: Option<NamedPosition3>,
77115}
77116
77117impl PositionSetReport3Choice {
77118	pub fn validate(&self) -> Result<(), ValidationError> {
77119		if let Some(ref val) = self.data_set_actn { val.validate()? }
77120		if let Some(ref val) = self.rpt { val.validate()? }
77121		Ok(())
77122	}
77123}
77124
77125
77126// PositionSetTotal2 ...
77127#[cfg_attr(feature = "derive_debug", derive(Debug))]
77128#[cfg_attr(feature = "derive_default", derive(Default))]
77129#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
77130#[cfg_attr(feature = "derive_clone", derive(Clone))]
77131#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
77132pub struct PositionSetTotal2 {
77133	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTrds", skip_serializing_if = "Option::is_none") )]
77134	pub nb_of_trds: Option<f64>,
77135	#[cfg_attr( feature = "derive_serde", serde(rename = "PostvVal", skip_serializing_if = "Option::is_none") )]
77136	pub postv_val: Option<ActiveOrHistoricCurrencyAnd19DecimalAmount>,
77137	#[cfg_attr( feature = "derive_serde", serde(rename = "NegVal", skip_serializing_if = "Option::is_none") )]
77138	pub neg_val: Option<ActiveOrHistoricCurrencyAnd19DecimalAmount>,
77139	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntnl", skip_serializing_if = "Option::is_none") )]
77140	pub ntnl: Option<NotionalAmountLegs6>,
77141	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPmtAmt", skip_serializing_if = "Option::is_none") )]
77142	pub othr_pmt_amt: Option<Vec<ActiveOrHistoricCurrencyAnd19DecimalAmount>>,
77143}
77144
77145impl PositionSetTotal2 {
77146	pub fn validate(&self) -> Result<(), ValidationError> {
77147		if let Some(ref val) = self.postv_val { val.validate()? }
77148		if let Some(ref val) = self.neg_val { val.validate()? }
77149		if let Some(ref val) = self.ntnl { val.validate()? }
77150		if let Some(ref vec) = self.othr_pmt_amt { for item in vec { item.validate()? } }
77151		Ok(())
77152	}
77153}
77154
77155
77156// PostTradeRiskReductionIdentifier1 ...
77157#[cfg_attr(feature = "derive_debug", derive(Debug))]
77158#[cfg_attr(feature = "derive_default", derive(Default))]
77159#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
77160#[cfg_attr(feature = "derive_clone", derive(Clone))]
77161#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
77162pub struct PostTradeRiskReductionIdentifier1 {
77163	#[cfg_attr( feature = "derive_serde", serde(rename = "Strr") )]
77164	pub strr: String,
77165	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
77166	pub id: String,
77167}
77168
77169impl PostTradeRiskReductionIdentifier1 {
77170	pub fn validate(&self) -> Result<(), ValidationError> {
77171		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
77172		if !pattern.is_match(&self.strr) {
77173			return Err(ValidationError::new(1005, "strr does not match the required pattern".to_string()));
77174		}
77175		if self.id.chars().count() < 1 {
77176			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
77177		}
77178		if self.id.chars().count() > 52 {
77179			return Err(ValidationError::new(1002, "id exceeds the maximum length of 52".to_string()));
77180		}
77181		Ok(())
77182	}
77183}
77184
77185
77186// PostalAddress1 ...
77187#[cfg_attr(feature = "derive_debug", derive(Debug))]
77188#[cfg_attr(feature = "derive_default", derive(Default))]
77189#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
77190#[cfg_attr(feature = "derive_clone", derive(Clone))]
77191#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
77192pub struct PostalAddress1 {
77193	#[cfg_attr( feature = "derive_serde", serde(rename = "AdrTp", skip_serializing_if = "Option::is_none") )]
77194	pub adr_tp: Option<AddressType2Code>,
77195	#[cfg_attr( feature = "derive_serde", serde(rename = "AdrLine", skip_serializing_if = "Option::is_none") )]
77196	pub adr_line: Option<Vec<String>>,
77197	#[cfg_attr( feature = "derive_serde", serde(rename = "StrtNm", skip_serializing_if = "Option::is_none") )]
77198	pub strt_nm: Option<String>,
77199	#[cfg_attr( feature = "derive_serde", serde(rename = "BldgNb", skip_serializing_if = "Option::is_none") )]
77200	pub bldg_nb: Option<String>,
77201	#[cfg_attr( feature = "derive_serde", serde(rename = "PstCd", skip_serializing_if = "Option::is_none") )]
77202	pub pst_cd: Option<String>,
77203	#[cfg_attr( feature = "derive_serde", serde(rename = "TwnNm", skip_serializing_if = "Option::is_none") )]
77204	pub twn_nm: Option<String>,
77205	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrySubDvsn", skip_serializing_if = "Option::is_none") )]
77206	pub ctry_sub_dvsn: Option<String>,
77207	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry") )]
77208	pub ctry: String,
77209}
77210
77211impl PostalAddress1 {
77212	pub fn validate(&self) -> Result<(), ValidationError> {
77213		if let Some(ref val) = self.adr_tp { val.validate()? }
77214		if let Some(ref vec) = self.adr_line {
77215			for item in vec {
77216				if item.chars().count() < 1 {
77217					return Err(ValidationError::new(1001, "adr_line is shorter than the minimum length of 1".to_string()));
77218				}
77219				if item.chars().count() > 70 {
77220					return Err(ValidationError::new(1002, "adr_line exceeds the maximum length of 70".to_string()));
77221				}
77222			}
77223		}
77224		if let Some(ref val) = self.strt_nm {
77225			if val.chars().count() < 1 {
77226				return Err(ValidationError::new(1001, "strt_nm is shorter than the minimum length of 1".to_string()));
77227			}
77228			if val.chars().count() > 70 {
77229				return Err(ValidationError::new(1002, "strt_nm exceeds the maximum length of 70".to_string()));
77230			}
77231		}
77232		if let Some(ref val) = self.bldg_nb {
77233			if val.chars().count() < 1 {
77234				return Err(ValidationError::new(1001, "bldg_nb is shorter than the minimum length of 1".to_string()));
77235			}
77236			if val.chars().count() > 16 {
77237				return Err(ValidationError::new(1002, "bldg_nb exceeds the maximum length of 16".to_string()));
77238			}
77239		}
77240		if let Some(ref val) = self.pst_cd {
77241			if val.chars().count() < 1 {
77242				return Err(ValidationError::new(1001, "pst_cd is shorter than the minimum length of 1".to_string()));
77243			}
77244			if val.chars().count() > 16 {
77245				return Err(ValidationError::new(1002, "pst_cd exceeds the maximum length of 16".to_string()));
77246			}
77247		}
77248		if let Some(ref val) = self.twn_nm {
77249			if val.chars().count() < 1 {
77250				return Err(ValidationError::new(1001, "twn_nm is shorter than the minimum length of 1".to_string()));
77251			}
77252			if val.chars().count() > 35 {
77253				return Err(ValidationError::new(1002, "twn_nm exceeds the maximum length of 35".to_string()));
77254			}
77255		}
77256		if let Some(ref val) = self.ctry_sub_dvsn {
77257			if val.chars().count() < 1 {
77258				return Err(ValidationError::new(1001, "ctry_sub_dvsn is shorter than the minimum length of 1".to_string()));
77259			}
77260			if val.chars().count() > 35 {
77261				return Err(ValidationError::new(1002, "ctry_sub_dvsn exceeds the maximum length of 35".to_string()));
77262			}
77263		}
77264		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
77265		if !pattern.is_match(&self.ctry) {
77266			return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
77267		}
77268		Ok(())
77269	}
77270}
77271
77272
77273// PostalAddress21 ...
77274#[cfg_attr(feature = "derive_debug", derive(Debug))]
77275#[cfg_attr(feature = "derive_default", derive(Default))]
77276#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
77277#[cfg_attr(feature = "derive_clone", derive(Clone))]
77278#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
77279pub struct PostalAddress21 {
77280	#[cfg_attr( feature = "derive_serde", serde(rename = "AdrTp", skip_serializing_if = "Option::is_none") )]
77281	pub adr_tp: Option<AddressType2Choice>,
77282	#[cfg_attr( feature = "derive_serde", serde(rename = "MlngInd", skip_serializing_if = "Option::is_none") )]
77283	pub mlng_ind: Option<bool>,
77284	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnAdrInd", skip_serializing_if = "Option::is_none") )]
77285	pub regn_adr_ind: Option<bool>,
77286	#[cfg_attr( feature = "derive_serde", serde(rename = "CareOf", skip_serializing_if = "Option::is_none") )]
77287	pub care_of: Option<String>,
77288	#[cfg_attr( feature = "derive_serde", serde(rename = "AdrLine", skip_serializing_if = "Option::is_none") )]
77289	pub adr_line: Option<Vec<String>>,
77290	#[cfg_attr( feature = "derive_serde", serde(rename = "StrtNm", skip_serializing_if = "Option::is_none") )]
77291	pub strt_nm: Option<String>,
77292	#[cfg_attr( feature = "derive_serde", serde(rename = "BldgNb", skip_serializing_if = "Option::is_none") )]
77293	pub bldg_nb: Option<String>,
77294	#[cfg_attr( feature = "derive_serde", serde(rename = "BldgNm", skip_serializing_if = "Option::is_none") )]
77295	pub bldg_nm: Option<String>,
77296	#[cfg_attr( feature = "derive_serde", serde(rename = "PstBx", skip_serializing_if = "Option::is_none") )]
77297	pub pst_bx: Option<String>,
77298	#[cfg_attr( feature = "derive_serde", serde(rename = "SdInBldg", skip_serializing_if = "Option::is_none") )]
77299	pub sd_in_bldg: Option<String>,
77300	#[cfg_attr( feature = "derive_serde", serde(rename = "Flr", skip_serializing_if = "Option::is_none") )]
77301	pub flr: Option<String>,
77302	#[cfg_attr( feature = "derive_serde", serde(rename = "SuiteId", skip_serializing_if = "Option::is_none") )]
77303	pub suite_id: Option<String>,
77304	#[cfg_attr( feature = "derive_serde", serde(rename = "PstCd", skip_serializing_if = "Option::is_none") )]
77305	pub pst_cd: Option<String>,
77306	#[cfg_attr( feature = "derive_serde", serde(rename = "DstrctNm", skip_serializing_if = "Option::is_none") )]
77307	pub dstrct_nm: Option<String>,
77308	#[cfg_attr( feature = "derive_serde", serde(rename = "Vllg", skip_serializing_if = "Option::is_none") )]
77309	pub vllg: Option<String>,
77310	#[cfg_attr( feature = "derive_serde", serde(rename = "TwnNm", skip_serializing_if = "Option::is_none") )]
77311	pub twn_nm: Option<String>,
77312	#[cfg_attr( feature = "derive_serde", serde(rename = "Stat", skip_serializing_if = "Option::is_none") )]
77313	pub stat: Option<String>,
77314	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry") )]
77315	pub ctry: String,
77316}
77317
77318impl PostalAddress21 {
77319	pub fn validate(&self) -> Result<(), ValidationError> {
77320		if let Some(ref val) = self.adr_tp { val.validate()? }
77321		if let Some(ref val) = self.care_of {
77322			if val.chars().count() < 1 {
77323				return Err(ValidationError::new(1001, "care_of is shorter than the minimum length of 1".to_string()));
77324			}
77325			if val.chars().count() > 70 {
77326				return Err(ValidationError::new(1002, "care_of exceeds the maximum length of 70".to_string()));
77327			}
77328		}
77329		if let Some(ref vec) = self.adr_line {
77330			for item in vec {
77331				if item.chars().count() < 1 {
77332					return Err(ValidationError::new(1001, "adr_line is shorter than the minimum length of 1".to_string()));
77333				}
77334				if item.chars().count() > 70 {
77335					return Err(ValidationError::new(1002, "adr_line exceeds the maximum length of 70".to_string()));
77336				}
77337			}
77338		}
77339		if let Some(ref val) = self.strt_nm {
77340			if val.chars().count() < 1 {
77341				return Err(ValidationError::new(1001, "strt_nm is shorter than the minimum length of 1".to_string()));
77342			}
77343			if val.chars().count() > 70 {
77344				return Err(ValidationError::new(1002, "strt_nm exceeds the maximum length of 70".to_string()));
77345			}
77346		}
77347		if let Some(ref val) = self.bldg_nb {
77348			if val.chars().count() < 1 {
77349				return Err(ValidationError::new(1001, "bldg_nb is shorter than the minimum length of 1".to_string()));
77350			}
77351			if val.chars().count() > 16 {
77352				return Err(ValidationError::new(1002, "bldg_nb exceeds the maximum length of 16".to_string()));
77353			}
77354		}
77355		if let Some(ref val) = self.bldg_nm {
77356			if val.chars().count() < 1 {
77357				return Err(ValidationError::new(1001, "bldg_nm is shorter than the minimum length of 1".to_string()));
77358			}
77359			if val.chars().count() > 35 {
77360				return Err(ValidationError::new(1002, "bldg_nm exceeds the maximum length of 35".to_string()));
77361			}
77362		}
77363		if let Some(ref val) = self.pst_bx {
77364			if val.chars().count() < 1 {
77365				return Err(ValidationError::new(1001, "pst_bx is shorter than the minimum length of 1".to_string()));
77366			}
77367			if val.chars().count() > 10 {
77368				return Err(ValidationError::new(1002, "pst_bx exceeds the maximum length of 10".to_string()));
77369			}
77370		}
77371		if let Some(ref val) = self.sd_in_bldg {
77372			if val.chars().count() < 1 {
77373				return Err(ValidationError::new(1001, "sd_in_bldg is shorter than the minimum length of 1".to_string()));
77374			}
77375			if val.chars().count() > 35 {
77376				return Err(ValidationError::new(1002, "sd_in_bldg exceeds the maximum length of 35".to_string()));
77377			}
77378		}
77379		if let Some(ref val) = self.flr {
77380			if val.chars().count() < 1 {
77381				return Err(ValidationError::new(1001, "flr is shorter than the minimum length of 1".to_string()));
77382			}
77383			if val.chars().count() > 70 {
77384				return Err(ValidationError::new(1002, "flr exceeds the maximum length of 70".to_string()));
77385			}
77386		}
77387		if let Some(ref val) = self.suite_id {
77388			if val.chars().count() < 1 {
77389				return Err(ValidationError::new(1001, "suite_id is shorter than the minimum length of 1".to_string()));
77390			}
77391			if val.chars().count() > 10 {
77392				return Err(ValidationError::new(1002, "suite_id exceeds the maximum length of 10".to_string()));
77393			}
77394		}
77395		if let Some(ref val) = self.pst_cd {
77396			if val.chars().count() < 1 {
77397				return Err(ValidationError::new(1001, "pst_cd is shorter than the minimum length of 1".to_string()));
77398			}
77399			if val.chars().count() > 16 {
77400				return Err(ValidationError::new(1002, "pst_cd exceeds the maximum length of 16".to_string()));
77401			}
77402		}
77403		if let Some(ref val) = self.dstrct_nm {
77404			if val.chars().count() < 1 {
77405				return Err(ValidationError::new(1001, "dstrct_nm is shorter than the minimum length of 1".to_string()));
77406			}
77407			if val.chars().count() > 35 {
77408				return Err(ValidationError::new(1002, "dstrct_nm exceeds the maximum length of 35".to_string()));
77409			}
77410		}
77411		if let Some(ref val) = self.vllg {
77412			if val.chars().count() < 1 {
77413				return Err(ValidationError::new(1001, "vllg is shorter than the minimum length of 1".to_string()));
77414			}
77415			if val.chars().count() > 70 {
77416				return Err(ValidationError::new(1002, "vllg exceeds the maximum length of 70".to_string()));
77417			}
77418		}
77419		if let Some(ref val) = self.twn_nm {
77420			if val.chars().count() < 1 {
77421				return Err(ValidationError::new(1001, "twn_nm is shorter than the minimum length of 1".to_string()));
77422			}
77423			if val.chars().count() > 35 {
77424				return Err(ValidationError::new(1002, "twn_nm exceeds the maximum length of 35".to_string()));
77425			}
77426		}
77427		if let Some(ref val) = self.stat {
77428			if val.chars().count() < 1 {
77429				return Err(ValidationError::new(1001, "stat is shorter than the minimum length of 1".to_string()));
77430			}
77431			if val.chars().count() > 70 {
77432				return Err(ValidationError::new(1002, "stat exceeds the maximum length of 70".to_string()));
77433			}
77434		}
77435		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
77436		if !pattern.is_match(&self.ctry) {
77437			return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
77438		}
77439		Ok(())
77440	}
77441}
77442
77443
77444// PostalAddress24 ...
77445#[cfg_attr(feature = "derive_debug", derive(Debug))]
77446#[cfg_attr(feature = "derive_default", derive(Default))]
77447#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
77448#[cfg_attr(feature = "derive_clone", derive(Clone))]
77449#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
77450pub struct PostalAddress24 {
77451	#[cfg_attr( feature = "derive_serde", serde(rename = "AdrTp", skip_serializing_if = "Option::is_none") )]
77452	pub adr_tp: Option<AddressType3Choice>,
77453	#[cfg_attr( feature = "derive_serde", serde(rename = "Dept", skip_serializing_if = "Option::is_none") )]
77454	pub dept: Option<String>,
77455	#[cfg_attr( feature = "derive_serde", serde(rename = "SubDept", skip_serializing_if = "Option::is_none") )]
77456	pub sub_dept: Option<String>,
77457	#[cfg_attr( feature = "derive_serde", serde(rename = "StrtNm", skip_serializing_if = "Option::is_none") )]
77458	pub strt_nm: Option<String>,
77459	#[cfg_attr( feature = "derive_serde", serde(rename = "BldgNb", skip_serializing_if = "Option::is_none") )]
77460	pub bldg_nb: Option<String>,
77461	#[cfg_attr( feature = "derive_serde", serde(rename = "BldgNm", skip_serializing_if = "Option::is_none") )]
77462	pub bldg_nm: Option<String>,
77463	#[cfg_attr( feature = "derive_serde", serde(rename = "Flr", skip_serializing_if = "Option::is_none") )]
77464	pub flr: Option<String>,
77465	#[cfg_attr( feature = "derive_serde", serde(rename = "PstBx", skip_serializing_if = "Option::is_none") )]
77466	pub pst_bx: Option<String>,
77467	#[cfg_attr( feature = "derive_serde", serde(rename = "Room", skip_serializing_if = "Option::is_none") )]
77468	pub room: Option<String>,
77469	#[cfg_attr( feature = "derive_serde", serde(rename = "PstCd", skip_serializing_if = "Option::is_none") )]
77470	pub pst_cd: Option<String>,
77471	#[cfg_attr( feature = "derive_serde", serde(rename = "TwnNm", skip_serializing_if = "Option::is_none") )]
77472	pub twn_nm: Option<String>,
77473	#[cfg_attr( feature = "derive_serde", serde(rename = "TwnLctnNm", skip_serializing_if = "Option::is_none") )]
77474	pub twn_lctn_nm: Option<String>,
77475	#[cfg_attr( feature = "derive_serde", serde(rename = "DstrctNm", skip_serializing_if = "Option::is_none") )]
77476	pub dstrct_nm: Option<String>,
77477	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrySubDvsn", skip_serializing_if = "Option::is_none") )]
77478	pub ctry_sub_dvsn: Option<String>,
77479	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
77480	pub ctry: Option<String>,
77481	#[cfg_attr( feature = "derive_serde", serde(rename = "AdrLine", skip_serializing_if = "Option::is_none") )]
77482	pub adr_line: Option<Vec<String>>,
77483}
77484
77485impl PostalAddress24 {
77486	pub fn validate(&self) -> Result<(), ValidationError> {
77487		if let Some(ref val) = self.adr_tp { val.validate()? }
77488		if let Some(ref val) = self.dept {
77489			if val.chars().count() < 1 {
77490				return Err(ValidationError::new(1001, "dept is shorter than the minimum length of 1".to_string()));
77491			}
77492			if val.chars().count() > 70 {
77493				return Err(ValidationError::new(1002, "dept exceeds the maximum length of 70".to_string()));
77494			}
77495		}
77496		if let Some(ref val) = self.sub_dept {
77497			if val.chars().count() < 1 {
77498				return Err(ValidationError::new(1001, "sub_dept is shorter than the minimum length of 1".to_string()));
77499			}
77500			if val.chars().count() > 70 {
77501				return Err(ValidationError::new(1002, "sub_dept exceeds the maximum length of 70".to_string()));
77502			}
77503		}
77504		if let Some(ref val) = self.strt_nm {
77505			if val.chars().count() < 1 {
77506				return Err(ValidationError::new(1001, "strt_nm is shorter than the minimum length of 1".to_string()));
77507			}
77508			if val.chars().count() > 70 {
77509				return Err(ValidationError::new(1002, "strt_nm exceeds the maximum length of 70".to_string()));
77510			}
77511		}
77512		if let Some(ref val) = self.bldg_nb {
77513			if val.chars().count() < 1 {
77514				return Err(ValidationError::new(1001, "bldg_nb is shorter than the minimum length of 1".to_string()));
77515			}
77516			if val.chars().count() > 16 {
77517				return Err(ValidationError::new(1002, "bldg_nb exceeds the maximum length of 16".to_string()));
77518			}
77519		}
77520		if let Some(ref val) = self.bldg_nm {
77521			if val.chars().count() < 1 {
77522				return Err(ValidationError::new(1001, "bldg_nm is shorter than the minimum length of 1".to_string()));
77523			}
77524			if val.chars().count() > 35 {
77525				return Err(ValidationError::new(1002, "bldg_nm exceeds the maximum length of 35".to_string()));
77526			}
77527		}
77528		if let Some(ref val) = self.flr {
77529			if val.chars().count() < 1 {
77530				return Err(ValidationError::new(1001, "flr is shorter than the minimum length of 1".to_string()));
77531			}
77532			if val.chars().count() > 70 {
77533				return Err(ValidationError::new(1002, "flr exceeds the maximum length of 70".to_string()));
77534			}
77535		}
77536		if let Some(ref val) = self.pst_bx {
77537			if val.chars().count() < 1 {
77538				return Err(ValidationError::new(1001, "pst_bx is shorter than the minimum length of 1".to_string()));
77539			}
77540			if val.chars().count() > 16 {
77541				return Err(ValidationError::new(1002, "pst_bx exceeds the maximum length of 16".to_string()));
77542			}
77543		}
77544		if let Some(ref val) = self.room {
77545			if val.chars().count() < 1 {
77546				return Err(ValidationError::new(1001, "room is shorter than the minimum length of 1".to_string()));
77547			}
77548			if val.chars().count() > 70 {
77549				return Err(ValidationError::new(1002, "room exceeds the maximum length of 70".to_string()));
77550			}
77551		}
77552		if let Some(ref val) = self.pst_cd {
77553			if val.chars().count() < 1 {
77554				return Err(ValidationError::new(1001, "pst_cd is shorter than the minimum length of 1".to_string()));
77555			}
77556			if val.chars().count() > 16 {
77557				return Err(ValidationError::new(1002, "pst_cd exceeds the maximum length of 16".to_string()));
77558			}
77559		}
77560		if let Some(ref val) = self.twn_nm {
77561			if val.chars().count() < 1 {
77562				return Err(ValidationError::new(1001, "twn_nm is shorter than the minimum length of 1".to_string()));
77563			}
77564			if val.chars().count() > 35 {
77565				return Err(ValidationError::new(1002, "twn_nm exceeds the maximum length of 35".to_string()));
77566			}
77567		}
77568		if let Some(ref val) = self.twn_lctn_nm {
77569			if val.chars().count() < 1 {
77570				return Err(ValidationError::new(1001, "twn_lctn_nm is shorter than the minimum length of 1".to_string()));
77571			}
77572			if val.chars().count() > 35 {
77573				return Err(ValidationError::new(1002, "twn_lctn_nm exceeds the maximum length of 35".to_string()));
77574			}
77575		}
77576		if let Some(ref val) = self.dstrct_nm {
77577			if val.chars().count() < 1 {
77578				return Err(ValidationError::new(1001, "dstrct_nm is shorter than the minimum length of 1".to_string()));
77579			}
77580			if val.chars().count() > 35 {
77581				return Err(ValidationError::new(1002, "dstrct_nm exceeds the maximum length of 35".to_string()));
77582			}
77583		}
77584		if let Some(ref val) = self.ctry_sub_dvsn {
77585			if val.chars().count() < 1 {
77586				return Err(ValidationError::new(1001, "ctry_sub_dvsn is shorter than the minimum length of 1".to_string()));
77587			}
77588			if val.chars().count() > 35 {
77589				return Err(ValidationError::new(1002, "ctry_sub_dvsn exceeds the maximum length of 35".to_string()));
77590			}
77591		}
77592		if let Some(ref val) = self.ctry {
77593			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
77594			if !pattern.is_match(val) {
77595				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
77596			}
77597		}
77598		if let Some(ref vec) = self.adr_line {
77599			for item in vec {
77600				if item.chars().count() < 1 {
77601					return Err(ValidationError::new(1001, "adr_line is shorter than the minimum length of 1".to_string()));
77602				}
77603				if item.chars().count() > 70 {
77604					return Err(ValidationError::new(1002, "adr_line exceeds the maximum length of 70".to_string()));
77605				}
77606			}
77607		}
77608		Ok(())
77609	}
77610}
77611
77612
77613// PostalAddress27 ...
77614#[cfg_attr(feature = "derive_debug", derive(Debug))]
77615#[cfg_attr(feature = "derive_default", derive(Default))]
77616#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
77617#[cfg_attr(feature = "derive_clone", derive(Clone))]
77618#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
77619pub struct PostalAddress27 {
77620	#[cfg_attr( feature = "derive_serde", serde(rename = "AdrTp", skip_serializing_if = "Option::is_none") )]
77621	pub adr_tp: Option<AddressType3Choice>,
77622	#[cfg_attr( feature = "derive_serde", serde(rename = "CareOf", skip_serializing_if = "Option::is_none") )]
77623	pub care_of: Option<String>,
77624	#[cfg_attr( feature = "derive_serde", serde(rename = "Dept", skip_serializing_if = "Option::is_none") )]
77625	pub dept: Option<String>,
77626	#[cfg_attr( feature = "derive_serde", serde(rename = "SubDept", skip_serializing_if = "Option::is_none") )]
77627	pub sub_dept: Option<String>,
77628	#[cfg_attr( feature = "derive_serde", serde(rename = "StrtNm", skip_serializing_if = "Option::is_none") )]
77629	pub strt_nm: Option<String>,
77630	#[cfg_attr( feature = "derive_serde", serde(rename = "BldgNb", skip_serializing_if = "Option::is_none") )]
77631	pub bldg_nb: Option<String>,
77632	#[cfg_attr( feature = "derive_serde", serde(rename = "BldgNm", skip_serializing_if = "Option::is_none") )]
77633	pub bldg_nm: Option<String>,
77634	#[cfg_attr( feature = "derive_serde", serde(rename = "Flr", skip_serializing_if = "Option::is_none") )]
77635	pub flr: Option<String>,
77636	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitNb", skip_serializing_if = "Option::is_none") )]
77637	pub unit_nb: Option<String>,
77638	#[cfg_attr( feature = "derive_serde", serde(rename = "PstBx", skip_serializing_if = "Option::is_none") )]
77639	pub pst_bx: Option<String>,
77640	#[cfg_attr( feature = "derive_serde", serde(rename = "Room", skip_serializing_if = "Option::is_none") )]
77641	pub room: Option<String>,
77642	#[cfg_attr( feature = "derive_serde", serde(rename = "PstCd", skip_serializing_if = "Option::is_none") )]
77643	pub pst_cd: Option<String>,
77644	#[cfg_attr( feature = "derive_serde", serde(rename = "TwnNm", skip_serializing_if = "Option::is_none") )]
77645	pub twn_nm: Option<String>,
77646	#[cfg_attr( feature = "derive_serde", serde(rename = "TwnLctnNm", skip_serializing_if = "Option::is_none") )]
77647	pub twn_lctn_nm: Option<String>,
77648	#[cfg_attr( feature = "derive_serde", serde(rename = "DstrctNm", skip_serializing_if = "Option::is_none") )]
77649	pub dstrct_nm: Option<String>,
77650	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrySubDvsn", skip_serializing_if = "Option::is_none") )]
77651	pub ctry_sub_dvsn: Option<String>,
77652	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
77653	pub ctry: Option<String>,
77654	#[cfg_attr( feature = "derive_serde", serde(rename = "AdrLine", skip_serializing_if = "Option::is_none") )]
77655	pub adr_line: Option<Vec<String>>,
77656}
77657
77658impl PostalAddress27 {
77659	pub fn validate(&self) -> Result<(), ValidationError> {
77660		if let Some(ref val) = self.adr_tp { val.validate()? }
77661		if let Some(ref val) = self.care_of {
77662			if val.chars().count() < 1 {
77663				return Err(ValidationError::new(1001, "care_of is shorter than the minimum length of 1".to_string()));
77664			}
77665			if val.chars().count() > 140 {
77666				return Err(ValidationError::new(1002, "care_of exceeds the maximum length of 140".to_string()));
77667			}
77668		}
77669		if let Some(ref val) = self.dept {
77670			if val.chars().count() < 1 {
77671				return Err(ValidationError::new(1001, "dept is shorter than the minimum length of 1".to_string()));
77672			}
77673			if val.chars().count() > 70 {
77674				return Err(ValidationError::new(1002, "dept exceeds the maximum length of 70".to_string()));
77675			}
77676		}
77677		if let Some(ref val) = self.sub_dept {
77678			if val.chars().count() < 1 {
77679				return Err(ValidationError::new(1001, "sub_dept is shorter than the minimum length of 1".to_string()));
77680			}
77681			if val.chars().count() > 70 {
77682				return Err(ValidationError::new(1002, "sub_dept exceeds the maximum length of 70".to_string()));
77683			}
77684		}
77685		if let Some(ref val) = self.strt_nm {
77686			if val.chars().count() < 1 {
77687				return Err(ValidationError::new(1001, "strt_nm is shorter than the minimum length of 1".to_string()));
77688			}
77689			if val.chars().count() > 140 {
77690				return Err(ValidationError::new(1002, "strt_nm exceeds the maximum length of 140".to_string()));
77691			}
77692		}
77693		if let Some(ref val) = self.bldg_nb {
77694			if val.chars().count() < 1 {
77695				return Err(ValidationError::new(1001, "bldg_nb is shorter than the minimum length of 1".to_string()));
77696			}
77697			if val.chars().count() > 16 {
77698				return Err(ValidationError::new(1002, "bldg_nb exceeds the maximum length of 16".to_string()));
77699			}
77700		}
77701		if let Some(ref val) = self.bldg_nm {
77702			if val.chars().count() < 1 {
77703				return Err(ValidationError::new(1001, "bldg_nm is shorter than the minimum length of 1".to_string()));
77704			}
77705			if val.chars().count() > 140 {
77706				return Err(ValidationError::new(1002, "bldg_nm exceeds the maximum length of 140".to_string()));
77707			}
77708		}
77709		if let Some(ref val) = self.flr {
77710			if val.chars().count() < 1 {
77711				return Err(ValidationError::new(1001, "flr is shorter than the minimum length of 1".to_string()));
77712			}
77713			if val.chars().count() > 70 {
77714				return Err(ValidationError::new(1002, "flr exceeds the maximum length of 70".to_string()));
77715			}
77716		}
77717		if let Some(ref val) = self.unit_nb {
77718			if val.chars().count() < 1 {
77719				return Err(ValidationError::new(1001, "unit_nb is shorter than the minimum length of 1".to_string()));
77720			}
77721			if val.chars().count() > 16 {
77722				return Err(ValidationError::new(1002, "unit_nb exceeds the maximum length of 16".to_string()));
77723			}
77724		}
77725		if let Some(ref val) = self.pst_bx {
77726			if val.chars().count() < 1 {
77727				return Err(ValidationError::new(1001, "pst_bx is shorter than the minimum length of 1".to_string()));
77728			}
77729			if val.chars().count() > 16 {
77730				return Err(ValidationError::new(1002, "pst_bx exceeds the maximum length of 16".to_string()));
77731			}
77732		}
77733		if let Some(ref val) = self.room {
77734			if val.chars().count() < 1 {
77735				return Err(ValidationError::new(1001, "room is shorter than the minimum length of 1".to_string()));
77736			}
77737			if val.chars().count() > 70 {
77738				return Err(ValidationError::new(1002, "room exceeds the maximum length of 70".to_string()));
77739			}
77740		}
77741		if let Some(ref val) = self.pst_cd {
77742			if val.chars().count() < 1 {
77743				return Err(ValidationError::new(1001, "pst_cd is shorter than the minimum length of 1".to_string()));
77744			}
77745			if val.chars().count() > 16 {
77746				return Err(ValidationError::new(1002, "pst_cd exceeds the maximum length of 16".to_string()));
77747			}
77748		}
77749		if let Some(ref val) = self.twn_nm {
77750			if val.chars().count() < 1 {
77751				return Err(ValidationError::new(1001, "twn_nm is shorter than the minimum length of 1".to_string()));
77752			}
77753			if val.chars().count() > 140 {
77754				return Err(ValidationError::new(1002, "twn_nm exceeds the maximum length of 140".to_string()));
77755			}
77756		}
77757		if let Some(ref val) = self.twn_lctn_nm {
77758			if val.chars().count() < 1 {
77759				return Err(ValidationError::new(1001, "twn_lctn_nm is shorter than the minimum length of 1".to_string()));
77760			}
77761			if val.chars().count() > 140 {
77762				return Err(ValidationError::new(1002, "twn_lctn_nm exceeds the maximum length of 140".to_string()));
77763			}
77764		}
77765		if let Some(ref val) = self.dstrct_nm {
77766			if val.chars().count() < 1 {
77767				return Err(ValidationError::new(1001, "dstrct_nm is shorter than the minimum length of 1".to_string()));
77768			}
77769			if val.chars().count() > 140 {
77770				return Err(ValidationError::new(1002, "dstrct_nm exceeds the maximum length of 140".to_string()));
77771			}
77772		}
77773		if let Some(ref val) = self.ctry_sub_dvsn {
77774			if val.chars().count() < 1 {
77775				return Err(ValidationError::new(1001, "ctry_sub_dvsn is shorter than the minimum length of 1".to_string()));
77776			}
77777			if val.chars().count() > 35 {
77778				return Err(ValidationError::new(1002, "ctry_sub_dvsn exceeds the maximum length of 35".to_string()));
77779			}
77780		}
77781		if let Some(ref val) = self.ctry {
77782			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
77783			if !pattern.is_match(val) {
77784				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
77785			}
77786		}
77787		if let Some(ref vec) = self.adr_line {
77788			for item in vec {
77789				if item.chars().count() < 1 {
77790					return Err(ValidationError::new(1001, "adr_line is shorter than the minimum length of 1".to_string()));
77791				}
77792				if item.chars().count() > 70 {
77793					return Err(ValidationError::new(1002, "adr_line exceeds the maximum length of 70".to_string()));
77794				}
77795			}
77796		}
77797		Ok(())
77798	}
77799}
77800
77801
77802// PostalAddress28 ...
77803#[cfg_attr(feature = "derive_debug", derive(Debug))]
77804#[cfg_attr(feature = "derive_default", derive(Default))]
77805#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
77806#[cfg_attr(feature = "derive_clone", derive(Clone))]
77807#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
77808pub struct PostalAddress28 {
77809	#[cfg_attr( feature = "derive_serde", serde(rename = "AdrTp", skip_serializing_if = "Option::is_none") )]
77810	pub adr_tp: Option<AddressType3Choice>,
77811	#[cfg_attr( feature = "derive_serde", serde(rename = "CareOf", skip_serializing_if = "Option::is_none") )]
77812	pub care_of: Option<String>,
77813	#[cfg_attr( feature = "derive_serde", serde(rename = "Dept", skip_serializing_if = "Option::is_none") )]
77814	pub dept: Option<String>,
77815	#[cfg_attr( feature = "derive_serde", serde(rename = "SubDept", skip_serializing_if = "Option::is_none") )]
77816	pub sub_dept: Option<String>,
77817	#[cfg_attr( feature = "derive_serde", serde(rename = "StrtNm", skip_serializing_if = "Option::is_none") )]
77818	pub strt_nm: Option<String>,
77819	#[cfg_attr( feature = "derive_serde", serde(rename = "BldgNb", skip_serializing_if = "Option::is_none") )]
77820	pub bldg_nb: Option<String>,
77821	#[cfg_attr( feature = "derive_serde", serde(rename = "BldgNm", skip_serializing_if = "Option::is_none") )]
77822	pub bldg_nm: Option<String>,
77823	#[cfg_attr( feature = "derive_serde", serde(rename = "Flr", skip_serializing_if = "Option::is_none") )]
77824	pub flr: Option<String>,
77825	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitNb", skip_serializing_if = "Option::is_none") )]
77826	pub unit_nb: Option<String>,
77827	#[cfg_attr( feature = "derive_serde", serde(rename = "PstBx", skip_serializing_if = "Option::is_none") )]
77828	pub pst_bx: Option<String>,
77829	#[cfg_attr( feature = "derive_serde", serde(rename = "Room", skip_serializing_if = "Option::is_none") )]
77830	pub room: Option<String>,
77831	#[cfg_attr( feature = "derive_serde", serde(rename = "PstCd", skip_serializing_if = "Option::is_none") )]
77832	pub pst_cd: Option<String>,
77833	#[cfg_attr( feature = "derive_serde", serde(rename = "TwnNm", skip_serializing_if = "Option::is_none") )]
77834	pub twn_nm: Option<String>,
77835	#[cfg_attr( feature = "derive_serde", serde(rename = "TwnLctnNm", skip_serializing_if = "Option::is_none") )]
77836	pub twn_lctn_nm: Option<String>,
77837	#[cfg_attr( feature = "derive_serde", serde(rename = "DstrctNm", skip_serializing_if = "Option::is_none") )]
77838	pub dstrct_nm: Option<String>,
77839	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrySubDvsn", skip_serializing_if = "Option::is_none") )]
77840	pub ctry_sub_dvsn: Option<String>,
77841	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
77842	pub ctry: Option<String>,
77843	#[cfg_attr( feature = "derive_serde", serde(rename = "AdrLine", skip_serializing_if = "Option::is_none") )]
77844	pub adr_line: Option<Vec<String>>,
77845	#[cfg_attr( feature = "derive_serde", serde(rename = "VldFr", skip_serializing_if = "Option::is_none") )]
77846	pub vld_fr: Option<String>,
77847}
77848
77849impl PostalAddress28 {
77850	pub fn validate(&self) -> Result<(), ValidationError> {
77851		if let Some(ref val) = self.adr_tp { val.validate()? }
77852		if let Some(ref val) = self.care_of {
77853			if val.chars().count() < 1 {
77854				return Err(ValidationError::new(1001, "care_of is shorter than the minimum length of 1".to_string()));
77855			}
77856			if val.chars().count() > 140 {
77857				return Err(ValidationError::new(1002, "care_of exceeds the maximum length of 140".to_string()));
77858			}
77859		}
77860		if let Some(ref val) = self.dept {
77861			if val.chars().count() < 1 {
77862				return Err(ValidationError::new(1001, "dept is shorter than the minimum length of 1".to_string()));
77863			}
77864			if val.chars().count() > 70 {
77865				return Err(ValidationError::new(1002, "dept exceeds the maximum length of 70".to_string()));
77866			}
77867		}
77868		if let Some(ref val) = self.sub_dept {
77869			if val.chars().count() < 1 {
77870				return Err(ValidationError::new(1001, "sub_dept is shorter than the minimum length of 1".to_string()));
77871			}
77872			if val.chars().count() > 70 {
77873				return Err(ValidationError::new(1002, "sub_dept exceeds the maximum length of 70".to_string()));
77874			}
77875		}
77876		if let Some(ref val) = self.strt_nm {
77877			if val.chars().count() < 1 {
77878				return Err(ValidationError::new(1001, "strt_nm is shorter than the minimum length of 1".to_string()));
77879			}
77880			if val.chars().count() > 140 {
77881				return Err(ValidationError::new(1002, "strt_nm exceeds the maximum length of 140".to_string()));
77882			}
77883		}
77884		if let Some(ref val) = self.bldg_nb {
77885			if val.chars().count() < 1 {
77886				return Err(ValidationError::new(1001, "bldg_nb is shorter than the minimum length of 1".to_string()));
77887			}
77888			if val.chars().count() > 16 {
77889				return Err(ValidationError::new(1002, "bldg_nb exceeds the maximum length of 16".to_string()));
77890			}
77891		}
77892		if let Some(ref val) = self.bldg_nm {
77893			if val.chars().count() < 1 {
77894				return Err(ValidationError::new(1001, "bldg_nm is shorter than the minimum length of 1".to_string()));
77895			}
77896			if val.chars().count() > 140 {
77897				return Err(ValidationError::new(1002, "bldg_nm exceeds the maximum length of 140".to_string()));
77898			}
77899		}
77900		if let Some(ref val) = self.flr {
77901			if val.chars().count() < 1 {
77902				return Err(ValidationError::new(1001, "flr is shorter than the minimum length of 1".to_string()));
77903			}
77904			if val.chars().count() > 70 {
77905				return Err(ValidationError::new(1002, "flr exceeds the maximum length of 70".to_string()));
77906			}
77907		}
77908		if let Some(ref val) = self.unit_nb {
77909			if val.chars().count() < 1 {
77910				return Err(ValidationError::new(1001, "unit_nb is shorter than the minimum length of 1".to_string()));
77911			}
77912			if val.chars().count() > 16 {
77913				return Err(ValidationError::new(1002, "unit_nb exceeds the maximum length of 16".to_string()));
77914			}
77915		}
77916		if let Some(ref val) = self.pst_bx {
77917			if val.chars().count() < 1 {
77918				return Err(ValidationError::new(1001, "pst_bx is shorter than the minimum length of 1".to_string()));
77919			}
77920			if val.chars().count() > 16 {
77921				return Err(ValidationError::new(1002, "pst_bx exceeds the maximum length of 16".to_string()));
77922			}
77923		}
77924		if let Some(ref val) = self.room {
77925			if val.chars().count() < 1 {
77926				return Err(ValidationError::new(1001, "room is shorter than the minimum length of 1".to_string()));
77927			}
77928			if val.chars().count() > 70 {
77929				return Err(ValidationError::new(1002, "room exceeds the maximum length of 70".to_string()));
77930			}
77931		}
77932		if let Some(ref val) = self.pst_cd {
77933			if val.chars().count() < 1 {
77934				return Err(ValidationError::new(1001, "pst_cd is shorter than the minimum length of 1".to_string()));
77935			}
77936			if val.chars().count() > 16 {
77937				return Err(ValidationError::new(1002, "pst_cd exceeds the maximum length of 16".to_string()));
77938			}
77939		}
77940		if let Some(ref val) = self.twn_nm {
77941			if val.chars().count() < 1 {
77942				return Err(ValidationError::new(1001, "twn_nm is shorter than the minimum length of 1".to_string()));
77943			}
77944			if val.chars().count() > 140 {
77945				return Err(ValidationError::new(1002, "twn_nm exceeds the maximum length of 140".to_string()));
77946			}
77947		}
77948		if let Some(ref val) = self.twn_lctn_nm {
77949			if val.chars().count() < 1 {
77950				return Err(ValidationError::new(1001, "twn_lctn_nm is shorter than the minimum length of 1".to_string()));
77951			}
77952			if val.chars().count() > 140 {
77953				return Err(ValidationError::new(1002, "twn_lctn_nm exceeds the maximum length of 140".to_string()));
77954			}
77955		}
77956		if let Some(ref val) = self.dstrct_nm {
77957			if val.chars().count() < 1 {
77958				return Err(ValidationError::new(1001, "dstrct_nm is shorter than the minimum length of 1".to_string()));
77959			}
77960			if val.chars().count() > 140 {
77961				return Err(ValidationError::new(1002, "dstrct_nm exceeds the maximum length of 140".to_string()));
77962			}
77963		}
77964		if let Some(ref val) = self.ctry_sub_dvsn {
77965			if val.chars().count() < 1 {
77966				return Err(ValidationError::new(1001, "ctry_sub_dvsn is shorter than the minimum length of 1".to_string()));
77967			}
77968			if val.chars().count() > 35 {
77969				return Err(ValidationError::new(1002, "ctry_sub_dvsn exceeds the maximum length of 35".to_string()));
77970			}
77971		}
77972		if let Some(ref val) = self.ctry {
77973			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
77974			if !pattern.is_match(val) {
77975				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
77976			}
77977		}
77978		if let Some(ref vec) = self.adr_line {
77979			for item in vec {
77980				if item.chars().count() < 1 {
77981					return Err(ValidationError::new(1001, "adr_line is shorter than the minimum length of 1".to_string()));
77982				}
77983				if item.chars().count() > 70 {
77984					return Err(ValidationError::new(1002, "adr_line exceeds the maximum length of 70".to_string()));
77985				}
77986			}
77987		}
77988		Ok(())
77989	}
77990}
77991
77992
77993// PostalAddress3 ...
77994#[cfg_attr(feature = "derive_debug", derive(Debug))]
77995#[cfg_attr(feature = "derive_default", derive(Default))]
77996#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
77997#[cfg_attr(feature = "derive_clone", derive(Clone))]
77998#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
77999pub struct PostalAddress3 {
78000	#[cfg_attr( feature = "derive_serde", serde(rename = "AdrTp") )]
78001	pub adr_tp: AddressType1Code,
78002	#[cfg_attr( feature = "derive_serde", serde(rename = "MlngInd") )]
78003	pub mlng_ind: bool,
78004	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnAdrInd") )]
78005	pub regn_adr_ind: bool,
78006	#[cfg_attr( feature = "derive_serde", serde(rename = "NmAndAdr") )]
78007	pub nm_and_adr: NameAndAddress4,
78008}
78009
78010impl PostalAddress3 {
78011	pub fn validate(&self) -> Result<(), ValidationError> {
78012		self.adr_tp.validate()?;
78013		self.nm_and_adr.validate()?;
78014		Ok(())
78015	}
78016}
78017
78018
78019// PostalAddress6 ...
78020#[cfg_attr(feature = "derive_debug", derive(Debug))]
78021#[cfg_attr(feature = "derive_default", derive(Default))]
78022#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78023#[cfg_attr(feature = "derive_clone", derive(Clone))]
78024#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78025pub struct PostalAddress6 {
78026	#[cfg_attr( feature = "derive_serde", serde(rename = "AdrTp", skip_serializing_if = "Option::is_none") )]
78027	pub adr_tp: Option<AddressType2Code>,
78028	#[cfg_attr( feature = "derive_serde", serde(rename = "Dept", skip_serializing_if = "Option::is_none") )]
78029	pub dept: Option<String>,
78030	#[cfg_attr( feature = "derive_serde", serde(rename = "SubDept", skip_serializing_if = "Option::is_none") )]
78031	pub sub_dept: Option<String>,
78032	#[cfg_attr( feature = "derive_serde", serde(rename = "StrtNm", skip_serializing_if = "Option::is_none") )]
78033	pub strt_nm: Option<String>,
78034	#[cfg_attr( feature = "derive_serde", serde(rename = "BldgNb", skip_serializing_if = "Option::is_none") )]
78035	pub bldg_nb: Option<String>,
78036	#[cfg_attr( feature = "derive_serde", serde(rename = "PstCd", skip_serializing_if = "Option::is_none") )]
78037	pub pst_cd: Option<String>,
78038	#[cfg_attr( feature = "derive_serde", serde(rename = "TwnNm", skip_serializing_if = "Option::is_none") )]
78039	pub twn_nm: Option<String>,
78040	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrySubDvsn", skip_serializing_if = "Option::is_none") )]
78041	pub ctry_sub_dvsn: Option<String>,
78042	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
78043	pub ctry: Option<String>,
78044	#[cfg_attr( feature = "derive_serde", serde(rename = "AdrLine", skip_serializing_if = "Option::is_none") )]
78045	pub adr_line: Option<Vec<String>>,
78046}
78047
78048impl PostalAddress6 {
78049	pub fn validate(&self) -> Result<(), ValidationError> {
78050		if let Some(ref val) = self.adr_tp { val.validate()? }
78051		if let Some(ref val) = self.dept {
78052			if val.chars().count() < 1 {
78053				return Err(ValidationError::new(1001, "dept is shorter than the minimum length of 1".to_string()));
78054			}
78055			if val.chars().count() > 70 {
78056				return Err(ValidationError::new(1002, "dept exceeds the maximum length of 70".to_string()));
78057			}
78058		}
78059		if let Some(ref val) = self.sub_dept {
78060			if val.chars().count() < 1 {
78061				return Err(ValidationError::new(1001, "sub_dept is shorter than the minimum length of 1".to_string()));
78062			}
78063			if val.chars().count() > 70 {
78064				return Err(ValidationError::new(1002, "sub_dept exceeds the maximum length of 70".to_string()));
78065			}
78066		}
78067		if let Some(ref val) = self.strt_nm {
78068			if val.chars().count() < 1 {
78069				return Err(ValidationError::new(1001, "strt_nm is shorter than the minimum length of 1".to_string()));
78070			}
78071			if val.chars().count() > 70 {
78072				return Err(ValidationError::new(1002, "strt_nm exceeds the maximum length of 70".to_string()));
78073			}
78074		}
78075		if let Some(ref val) = self.bldg_nb {
78076			if val.chars().count() < 1 {
78077				return Err(ValidationError::new(1001, "bldg_nb is shorter than the minimum length of 1".to_string()));
78078			}
78079			if val.chars().count() > 16 {
78080				return Err(ValidationError::new(1002, "bldg_nb exceeds the maximum length of 16".to_string()));
78081			}
78082		}
78083		if let Some(ref val) = self.pst_cd {
78084			if val.chars().count() < 1 {
78085				return Err(ValidationError::new(1001, "pst_cd is shorter than the minimum length of 1".to_string()));
78086			}
78087			if val.chars().count() > 16 {
78088				return Err(ValidationError::new(1002, "pst_cd exceeds the maximum length of 16".to_string()));
78089			}
78090		}
78091		if let Some(ref val) = self.twn_nm {
78092			if val.chars().count() < 1 {
78093				return Err(ValidationError::new(1001, "twn_nm is shorter than the minimum length of 1".to_string()));
78094			}
78095			if val.chars().count() > 35 {
78096				return Err(ValidationError::new(1002, "twn_nm exceeds the maximum length of 35".to_string()));
78097			}
78098		}
78099		if let Some(ref val) = self.ctry_sub_dvsn {
78100			if val.chars().count() < 1 {
78101				return Err(ValidationError::new(1001, "ctry_sub_dvsn is shorter than the minimum length of 1".to_string()));
78102			}
78103			if val.chars().count() > 35 {
78104				return Err(ValidationError::new(1002, "ctry_sub_dvsn exceeds the maximum length of 35".to_string()));
78105			}
78106		}
78107		if let Some(ref val) = self.ctry {
78108			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
78109			if !pattern.is_match(val) {
78110				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
78111			}
78112		}
78113		if let Some(ref vec) = self.adr_line {
78114			for item in vec {
78115				if item.chars().count() < 1 {
78116					return Err(ValidationError::new(1001, "adr_line is shorter than the minimum length of 1".to_string()));
78117				}
78118				if item.chars().count() > 70 {
78119					return Err(ValidationError::new(1002, "adr_line exceeds the maximum length of 70".to_string()));
78120				}
78121			}
78122		}
78123		Ok(())
78124	}
78125}
78126
78127
78128// PostedMarginOrCollateral4 ...
78129#[cfg_attr(feature = "derive_debug", derive(Debug))]
78130#[cfg_attr(feature = "derive_default", derive(Default))]
78131#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78132#[cfg_attr(feature = "derive_clone", derive(Clone))]
78133#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78134pub struct PostedMarginOrCollateral4 {
78135	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlMrgnPstd", skip_serializing_if = "Option::is_none") )]
78136	pub initl_mrgn_pstd: Option<ActiveOrHistoricCurrencyAndAmount>,
78137	#[cfg_attr( feature = "derive_serde", serde(rename = "VartnMrgnPstd", skip_serializing_if = "Option::is_none") )]
78138	pub vartn_mrgn_pstd: Option<ActiveOrHistoricCurrencyAndAmount>,
78139	#[cfg_attr( feature = "derive_serde", serde(rename = "XcssCollPstd", skip_serializing_if = "Option::is_none") )]
78140	pub xcss_coll_pstd: Option<ActiveOrHistoricCurrencyAndAmount>,
78141}
78142
78143impl PostedMarginOrCollateral4 {
78144	pub fn validate(&self) -> Result<(), ValidationError> {
78145		if let Some(ref val) = self.initl_mrgn_pstd { val.validate()? }
78146		if let Some(ref val) = self.vartn_mrgn_pstd { val.validate()? }
78147		if let Some(ref val) = self.xcss_coll_pstd { val.validate()? }
78148		Ok(())
78149	}
78150}
78151
78152
78153// PostedMarginOrCollateral6 ...
78154#[cfg_attr(feature = "derive_debug", derive(Debug))]
78155#[cfg_attr(feature = "derive_default", derive(Default))]
78156#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78157#[cfg_attr(feature = "derive_clone", derive(Clone))]
78158#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78159pub struct PostedMarginOrCollateral6 {
78160	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlMrgnPstdPreHrcut", skip_serializing_if = "Option::is_none") )]
78161	pub initl_mrgn_pstd_pre_hrcut: Option<ActiveOrHistoricCurrencyAnd20DecimalAmount>,
78162	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlMrgnPstdPstHrcut", skip_serializing_if = "Option::is_none") )]
78163	pub initl_mrgn_pstd_pst_hrcut: Option<ActiveOrHistoricCurrencyAnd20DecimalAmount>,
78164	#[cfg_attr( feature = "derive_serde", serde(rename = "VartnMrgnPstdPreHrcut", skip_serializing_if = "Option::is_none") )]
78165	pub vartn_mrgn_pstd_pre_hrcut: Option<ActiveOrHistoricCurrencyAnd20DecimalAmount>,
78166	#[cfg_attr( feature = "derive_serde", serde(rename = "VartnMrgnPstdPstHrcut", skip_serializing_if = "Option::is_none") )]
78167	pub vartn_mrgn_pstd_pst_hrcut: Option<ActiveOrHistoricCurrencyAnd20DecimalAmount>,
78168	#[cfg_attr( feature = "derive_serde", serde(rename = "XcssCollPstd", skip_serializing_if = "Option::is_none") )]
78169	pub xcss_coll_pstd: Option<ActiveOrHistoricCurrencyAnd20DecimalAmount>,
78170}
78171
78172impl PostedMarginOrCollateral6 {
78173	pub fn validate(&self) -> Result<(), ValidationError> {
78174		if let Some(ref val) = self.initl_mrgn_pstd_pre_hrcut { val.validate()? }
78175		if let Some(ref val) = self.initl_mrgn_pstd_pst_hrcut { val.validate()? }
78176		if let Some(ref val) = self.vartn_mrgn_pstd_pre_hrcut { val.validate()? }
78177		if let Some(ref val) = self.vartn_mrgn_pstd_pst_hrcut { val.validate()? }
78178		if let Some(ref val) = self.xcss_coll_pstd { val.validate()? }
78179		Ok(())
78180	}
78181}
78182
78183
78184// PreferenceToIncome1Code ...
78185#[cfg_attr(feature = "derive_debug", derive(Debug))]
78186#[cfg_attr(feature = "derive_default", derive(Default))]
78187#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78188#[cfg_attr(feature = "derive_clone", derive(Clone))]
78189#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78190pub enum PreferenceToIncome1Code {
78191	#[cfg_attr(feature = "derive_default", default)]
78192	#[cfg_attr( feature = "derive_serde", serde(rename = "ORDN") )]
78193	CodeORDN,
78194	#[cfg_attr( feature = "derive_serde", serde(rename = "PFRD") )]
78195	CodePFRD,
78196}
78197
78198impl PreferenceToIncome1Code {
78199	pub fn validate(&self) -> Result<(), ValidationError> {
78200		Ok(())
78201	}
78202}
78203
78204
78205// PreferenceToIncome5Choice ...
78206#[cfg_attr(feature = "derive_debug", derive(Debug))]
78207#[cfg_attr(feature = "derive_default", derive(Default))]
78208#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78209#[cfg_attr(feature = "derive_clone", derive(Clone))]
78210#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78211pub struct PreferenceToIncome5Choice {
78212	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
78213	pub cd: Option<PreferenceToIncome1Code>,
78214	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
78215	pub prtry: Option<GenericIdentification30>,
78216}
78217
78218impl PreferenceToIncome5Choice {
78219	pub fn validate(&self) -> Result<(), ValidationError> {
78220		if let Some(ref val) = self.cd { val.validate()? }
78221		if let Some(ref val) = self.prtry { val.validate()? }
78222		Ok(())
78223	}
78224}
78225
78226
78227// PreferredContactMethod1Code ...
78228#[cfg_attr(feature = "derive_debug", derive(Debug))]
78229#[cfg_attr(feature = "derive_default", derive(Default))]
78230#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78231#[cfg_attr(feature = "derive_clone", derive(Clone))]
78232#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78233pub enum PreferredContactMethod1Code {
78234	#[cfg_attr(feature = "derive_default", default)]
78235	#[cfg_attr( feature = "derive_serde", serde(rename = "LETT") )]
78236	CodeLETT,
78237	#[cfg_attr( feature = "derive_serde", serde(rename = "MAIL") )]
78238	CodeMAIL,
78239	#[cfg_attr( feature = "derive_serde", serde(rename = "PHON") )]
78240	CodePHON,
78241	#[cfg_attr( feature = "derive_serde", serde(rename = "FAXX") )]
78242	CodeFAXX,
78243	#[cfg_attr( feature = "derive_serde", serde(rename = "CELL") )]
78244	CodeCELL,
78245}
78246
78247impl PreferredContactMethod1Code {
78248	pub fn validate(&self) -> Result<(), ValidationError> {
78249		Ok(())
78250	}
78251}
78252
78253
78254// PreferredContactMethod2Code ...
78255#[cfg_attr(feature = "derive_debug", derive(Debug))]
78256#[cfg_attr(feature = "derive_default", derive(Default))]
78257#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78258#[cfg_attr(feature = "derive_clone", derive(Clone))]
78259#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78260pub enum PreferredContactMethod2Code {
78261	#[cfg_attr(feature = "derive_default", default)]
78262	#[cfg_attr( feature = "derive_serde", serde(rename = "MAIL") )]
78263	CodeMAIL,
78264	#[cfg_attr( feature = "derive_serde", serde(rename = "FAXX") )]
78265	CodeFAXX,
78266	#[cfg_attr( feature = "derive_serde", serde(rename = "LETT") )]
78267	CodeLETT,
78268	#[cfg_attr( feature = "derive_serde", serde(rename = "CELL") )]
78269	CodeCELL,
78270	#[cfg_attr( feature = "derive_serde", serde(rename = "ONLI") )]
78271	CodeONLI,
78272	#[cfg_attr( feature = "derive_serde", serde(rename = "PHON") )]
78273	CodePHON,
78274}
78275
78276impl PreferredContactMethod2Code {
78277	pub fn validate(&self) -> Result<(), ValidationError> {
78278		Ok(())
78279	}
78280}
78281
78282
78283// PresentmentType1Code ...
78284#[cfg_attr(feature = "derive_debug", derive(Debug))]
78285#[cfg_attr(feature = "derive_default", derive(Default))]
78286#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78287#[cfg_attr(feature = "derive_clone", derive(Clone))]
78288#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78289pub enum PresentmentType1Code {
78290	#[cfg_attr(feature = "derive_default", default)]
78291	#[cfg_attr( feature = "derive_serde", serde(rename = "FULL") )]
78292	CodeFULL,
78293	#[cfg_attr( feature = "derive_serde", serde(rename = "PAYD") )]
78294	CodePAYD,
78295}
78296
78297impl PresentmentType1Code {
78298	pub fn validate(&self) -> Result<(), ValidationError> {
78299		Ok(())
78300	}
78301}
78302
78303
78304// Price7 ...
78305#[cfg_attr(feature = "derive_debug", derive(Debug))]
78306#[cfg_attr(feature = "derive_default", derive(Default))]
78307#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78308#[cfg_attr(feature = "derive_clone", derive(Clone))]
78309#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78310pub struct Price7 {
78311	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
78312	pub tp: YieldedOrValueType1Choice,
78313	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
78314	pub val: PriceRateOrAmount3Choice,
78315}
78316
78317impl Price7 {
78318	pub fn validate(&self) -> Result<(), ValidationError> {
78319		self.tp.validate()?;
78320		self.val.validate()?;
78321		Ok(())
78322	}
78323}
78324
78325
78326// Price8 ...
78327#[cfg_attr(feature = "derive_debug", derive(Debug))]
78328#[cfg_attr(feature = "derive_default", derive(Default))]
78329#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78330#[cfg_attr(feature = "derive_clone", derive(Clone))]
78331#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78332pub struct Price8 {
78333	#[cfg_attr( feature = "derive_serde", serde(rename = "ValTp", skip_serializing_if = "Option::is_none") )]
78334	pub val_tp: Option<PriceValueType3Code>,
78335	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
78336	pub val: PriceRateOrAmount3Choice,
78337	#[cfg_attr( feature = "derive_serde", serde(rename = "PricTp", skip_serializing_if = "Option::is_none") )]
78338	pub pric_tp: Option<TypeOfPrice1Code>,
78339}
78340
78341impl Price8 {
78342	pub fn validate(&self) -> Result<(), ValidationError> {
78343		if let Some(ref val) = self.val_tp { val.validate()? }
78344		self.val.validate()?;
78345		if let Some(ref val) = self.pric_tp { val.validate()? }
78346		Ok(())
78347	}
78348}
78349
78350
78351// PriceData2 ...
78352#[cfg_attr(feature = "derive_debug", derive(Debug))]
78353#[cfg_attr(feature = "derive_default", derive(Default))]
78354#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78355#[cfg_attr(feature = "derive_clone", derive(Clone))]
78356#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78357pub struct PriceData2 {
78358	#[cfg_attr( feature = "derive_serde", serde(rename = "Pric", skip_serializing_if = "Option::is_none") )]
78359	pub pric: Option<SecuritiesTransactionPrice17Choice>,
78360	#[cfg_attr( feature = "derive_serde", serde(rename = "SchdlPrd", skip_serializing_if = "Option::is_none") )]
78361	pub schdl_prd: Option<Vec<Schedule1>>,
78362	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitOfMeasr", skip_serializing_if = "Option::is_none") )]
78363	pub unit_of_measr: Option<UnitOfMeasure8Choice>,
78364	#[cfg_attr( feature = "derive_serde", serde(rename = "PricMltplr", skip_serializing_if = "Option::is_none") )]
78365	pub pric_mltplr: Option<f64>,
78366}
78367
78368impl PriceData2 {
78369	pub fn validate(&self) -> Result<(), ValidationError> {
78370		if let Some(ref val) = self.pric { val.validate()? }
78371		if let Some(ref vec) = self.schdl_prd { for item in vec { item.validate()? } }
78372		if let Some(ref val) = self.unit_of_measr { val.validate()? }
78373		Ok(())
78374	}
78375}
78376
78377
78378// PriceMethod1Code ...
78379#[cfg_attr(feature = "derive_debug", derive(Debug))]
78380#[cfg_attr(feature = "derive_default", derive(Default))]
78381#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78382#[cfg_attr(feature = "derive_clone", derive(Clone))]
78383#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78384pub enum PriceMethod1Code {
78385	#[cfg_attr(feature = "derive_default", default)]
78386	#[cfg_attr( feature = "derive_serde", serde(rename = "FORW") )]
78387	CodeFORW,
78388	#[cfg_attr( feature = "derive_serde", serde(rename = "HIST") )]
78389	CodeHIST,
78390}
78391
78392impl PriceMethod1Code {
78393	pub fn validate(&self) -> Result<(), ValidationError> {
78394		Ok(())
78395	}
78396}
78397
78398
78399// PriceMetrics3 ...
78400#[cfg_attr(feature = "derive_debug", derive(Debug))]
78401#[cfg_attr(feature = "derive_default", derive(Default))]
78402#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78403#[cfg_attr(feature = "derive_clone", derive(Clone))]
78404#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78405pub struct PriceMetrics3 {
78406	#[cfg_attr( feature = "derive_serde", serde(rename = "Rates", skip_serializing_if = "Option::is_none") )]
78407	pub rates: Option<Rates3>,
78408	#[cfg_attr( feature = "derive_serde", serde(rename = "LndgFee", skip_serializing_if = "Option::is_none") )]
78409	pub lndg_fee: Option<f64>,
78410}
78411
78412impl PriceMetrics3 {
78413	pub fn validate(&self) -> Result<(), ValidationError> {
78414		if let Some(ref val) = self.rates { val.validate()? }
78415		Ok(())
78416	}
78417}
78418
78419
78420// PriceRateOrAmount3Choice ...
78421#[cfg_attr(feature = "derive_debug", derive(Debug))]
78422#[cfg_attr(feature = "derive_default", derive(Default))]
78423#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78424#[cfg_attr(feature = "derive_clone", derive(Clone))]
78425#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78426pub struct PriceRateOrAmount3Choice {
78427	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
78428	pub rate: Option<f64>,
78429	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
78430	pub amt: Option<ActiveOrHistoricCurrencyAnd13DecimalAmount>,
78431}
78432
78433impl PriceRateOrAmount3Choice {
78434	pub fn validate(&self) -> Result<(), ValidationError> {
78435		if let Some(ref val) = self.amt { val.validate()? }
78436		Ok(())
78437	}
78438}
78439
78440
78441// PriceReport3 ...
78442#[cfg_attr(feature = "derive_debug", derive(Debug))]
78443#[cfg_attr(feature = "derive_default", derive(Default))]
78444#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78445#[cfg_attr(feature = "derive_clone", derive(Clone))]
78446#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78447pub struct PriceReport3 {
78448	#[cfg_attr( feature = "derive_serde", serde(rename = "PricValtnDtls") )]
78449	pub pric_valtn_dtls: Vec<PriceValuation4>,
78450}
78451
78452impl PriceReport3 {
78453	pub fn validate(&self) -> Result<(), ValidationError> {
78454		for item in &self.pric_valtn_dtls { item.validate()? }
78455		Ok(())
78456	}
78457}
78458
78459
78460// PriceReportFunction1Code ...
78461#[cfg_attr(feature = "derive_debug", derive(Debug))]
78462#[cfg_attr(feature = "derive_default", derive(Default))]
78463#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78464#[cfg_attr(feature = "derive_clone", derive(Clone))]
78465#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78466pub enum PriceReportFunction1Code {
78467	#[cfg_attr(feature = "derive_default", default)]
78468	#[cfg_attr( feature = "derive_serde", serde(rename = "REPL") )]
78469	CodeREPL,
78470	#[cfg_attr( feature = "derive_serde", serde(rename = "NEWP") )]
78471	CodeNEWP,
78472	#[cfg_attr( feature = "derive_serde", serde(rename = "PART") )]
78473	CodePART,
78474}
78475
78476impl PriceReportFunction1Code {
78477	pub fn validate(&self) -> Result<(), ValidationError> {
78478		Ok(())
78479	}
78480}
78481
78482
78483// PriceStatus1Code ...
78484#[cfg_attr(feature = "derive_debug", derive(Debug))]
78485#[cfg_attr(feature = "derive_default", derive(Default))]
78486#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78487#[cfg_attr(feature = "derive_clone", derive(Clone))]
78488#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78489pub enum PriceStatus1Code {
78490	#[cfg_attr(feature = "derive_default", default)]
78491	#[cfg_attr( feature = "derive_serde", serde(rename = "PNDG") )]
78492	CodePNDG,
78493	#[cfg_attr( feature = "derive_serde", serde(rename = "NOAP") )]
78494	CodeNOAP,
78495}
78496
78497impl PriceStatus1Code {
78498	pub fn validate(&self) -> Result<(), ValidationError> {
78499		Ok(())
78500	}
78501}
78502
78503
78504// PriceStatus2Code ...
78505#[cfg_attr(feature = "derive_debug", derive(Debug))]
78506#[cfg_attr(feature = "derive_default", derive(Default))]
78507#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78508#[cfg_attr(feature = "derive_clone", derive(Clone))]
78509#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78510pub enum PriceStatus2Code {
78511	#[cfg_attr(feature = "derive_default", default)]
78512	#[cfg_attr( feature = "derive_serde", serde(rename = "PNDG") )]
78513	CodePNDG,
78514}
78515
78516impl PriceStatus2Code {
78517	pub fn validate(&self) -> Result<(), ValidationError> {
78518		Ok(())
78519	}
78520}
78521
78522
78523// PriceType2 ...
78524#[cfg_attr(feature = "derive_debug", derive(Debug))]
78525#[cfg_attr(feature = "derive_default", derive(Default))]
78526#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78527#[cfg_attr(feature = "derive_clone", derive(Clone))]
78528#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78529pub struct PriceType2 {
78530	#[cfg_attr( feature = "derive_serde", serde(rename = "Strd") )]
78531	pub strd: TypeOfPrice6Code,
78532	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
78533	pub addtl_inf: Option<String>,
78534}
78535
78536impl PriceType2 {
78537	pub fn validate(&self) -> Result<(), ValidationError> {
78538		self.strd.validate()?;
78539		if let Some(ref val) = self.addtl_inf {
78540			if val.chars().count() < 1 {
78541				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
78542			}
78543			if val.chars().count() > 350 {
78544				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 350".to_string()));
78545			}
78546		}
78547		Ok(())
78548	}
78549}
78550
78551
78552// PriceValuation4 ...
78553#[cfg_attr(feature = "derive_debug", derive(Debug))]
78554#[cfg_attr(feature = "derive_default", derive(Default))]
78555#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78556#[cfg_attr(feature = "derive_clone", derive(Clone))]
78557#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78558pub struct PriceValuation4 {
78559	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
78560	pub id: Option<String>,
78561	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnDtTm", skip_serializing_if = "Option::is_none") )]
78562	pub valtn_dt_tm: Option<DateAndDateTimeChoice>,
78563	#[cfg_attr( feature = "derive_serde", serde(rename = "NAVDtTm") )]
78564	pub nav_dt_tm: DateAndDateTimeChoice,
78565	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmDtls") )]
78566	pub fin_instrm_dtls: FinancialInstrument8,
78567	#[cfg_attr( feature = "derive_serde", serde(rename = "FndMgmtCpny", skip_serializing_if = "Option::is_none") )]
78568	pub fnd_mgmt_cpny: Option<PartyIdentification2Choice>,
78569	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNAV", skip_serializing_if = "Option::is_none") )]
78570	pub ttl_nav: Option<Vec<ActiveOrHistoricCurrencyAndAmount>>,
78571	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlUnitsNb", skip_serializing_if = "Option::is_none") )]
78572	pub ttl_units_nb: Option<FinancialInstrumentQuantity1>,
78573	#[cfg_attr( feature = "derive_serde", serde(rename = "NxtValtnDtTm", skip_serializing_if = "Option::is_none") )]
78574	pub nxt_valtn_dt_tm: Option<DateAndDateTimeChoice>,
78575	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsValtnDtTm", skip_serializing_if = "Option::is_none") )]
78576	pub prvs_valtn_dt_tm: Option<DateAndDateTimeChoice>,
78577	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnTp") )]
78578	pub valtn_tp: ValuationTiming1Code,
78579	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnFrqcy", skip_serializing_if = "Option::is_none") )]
78580	pub valtn_frqcy: Option<EventFrequency1Code>,
78581	#[cfg_attr( feature = "derive_serde", serde(rename = "OffclValtnInd") )]
78582	pub offcl_valtn_ind: bool,
78583	#[cfg_attr( feature = "derive_serde", serde(rename = "SspdInd") )]
78584	pub sspd_ind: bool,
78585	#[cfg_attr( feature = "derive_serde", serde(rename = "PricDtls", skip_serializing_if = "Option::is_none") )]
78586	pub pric_dtls: Option<Vec<UnitPrice15>>,
78587	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnSttstcs", skip_serializing_if = "Option::is_none") )]
78588	pub valtn_sttstcs: Option<Vec<ValuationStatistics3>>,
78589	#[cfg_attr( feature = "derive_serde", serde(rename = "PrfrmncDtls", skip_serializing_if = "Option::is_none") )]
78590	pub prfrmnc_dtls: Option<PerformanceFactors1>,
78591}
78592
78593impl PriceValuation4 {
78594	pub fn validate(&self) -> Result<(), ValidationError> {
78595		if let Some(ref val) = self.id {
78596			if val.chars().count() < 1 {
78597				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
78598			}
78599			if val.chars().count() > 35 {
78600				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
78601			}
78602		}
78603		if let Some(ref val) = self.valtn_dt_tm { val.validate()? }
78604		self.nav_dt_tm.validate()?;
78605		self.fin_instrm_dtls.validate()?;
78606		if let Some(ref val) = self.fnd_mgmt_cpny { val.validate()? }
78607		if let Some(ref vec) = self.ttl_nav { for item in vec { item.validate()? } }
78608		if let Some(ref val) = self.ttl_units_nb { val.validate()? }
78609		if let Some(ref val) = self.nxt_valtn_dt_tm { val.validate()? }
78610		if let Some(ref val) = self.prvs_valtn_dt_tm { val.validate()? }
78611		self.valtn_tp.validate()?;
78612		if let Some(ref val) = self.valtn_frqcy { val.validate()? }
78613		if let Some(ref vec) = self.pric_dtls { for item in vec { item.validate()? } }
78614		if let Some(ref vec) = self.valtn_sttstcs { for item in vec { item.validate()? } }
78615		if let Some(ref val) = self.prfrmnc_dtls { val.validate()? }
78616		Ok(())
78617	}
78618}
78619
78620
78621// PriceValue1 ...
78622#[cfg_attr(feature = "derive_debug", derive(Debug))]
78623#[cfg_attr(feature = "derive_default", derive(Default))]
78624#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78625#[cfg_attr(feature = "derive_clone", derive(Clone))]
78626#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78627pub struct PriceValue1 {
78628	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
78629	pub amt: ActiveCurrencyAnd13DecimalAmount,
78630}
78631
78632impl PriceValue1 {
78633	pub fn validate(&self) -> Result<(), ValidationError> {
78634		self.amt.validate()?;
78635		Ok(())
78636	}
78637}
78638
78639
78640// PriceValue5 ...
78641#[cfg_attr(feature = "derive_debug", derive(Debug))]
78642#[cfg_attr(feature = "derive_default", derive(Default))]
78643#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78644#[cfg_attr(feature = "derive_clone", derive(Clone))]
78645#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78646pub struct PriceValue5 {
78647	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
78648	pub amt: ActiveOrHistoricCurrencyAnd13DecimalAmount,
78649}
78650
78651impl PriceValue5 {
78652	pub fn validate(&self) -> Result<(), ValidationError> {
78653		self.amt.validate()?;
78654		Ok(())
78655	}
78656}
78657
78658
78659// PriceValueChange1 ...
78660#[cfg_attr(feature = "derive_debug", derive(Debug))]
78661#[cfg_attr(feature = "derive_default", derive(Default))]
78662#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78663#[cfg_attr(feature = "derive_clone", derive(Clone))]
78664#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78665pub struct PriceValueChange1 {
78666	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
78667	pub amt: Option<ActiveOrHistoricCurrencyAnd13DecimalAmount>,
78668	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtSgn", skip_serializing_if = "Option::is_none") )]
78669	pub amt_sgn: Option<bool>,
78670	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
78671	pub rate: Option<f64>,
78672}
78673
78674impl PriceValueChange1 {
78675	pub fn validate(&self) -> Result<(), ValidationError> {
78676		if let Some(ref val) = self.amt { val.validate()? }
78677		Ok(())
78678	}
78679}
78680
78681
78682// PriceValueType1Code ...
78683#[cfg_attr(feature = "derive_debug", derive(Debug))]
78684#[cfg_attr(feature = "derive_default", derive(Default))]
78685#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78686#[cfg_attr(feature = "derive_clone", derive(Clone))]
78687#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78688pub enum PriceValueType1Code {
78689	#[cfg_attr(feature = "derive_default", default)]
78690	#[cfg_attr( feature = "derive_serde", serde(rename = "DISC") )]
78691	CodeDISC,
78692	#[cfg_attr( feature = "derive_serde", serde(rename = "PREM") )]
78693	CodePREM,
78694	#[cfg_attr( feature = "derive_serde", serde(rename = "PARV") )]
78695	CodePARV,
78696}
78697
78698impl PriceValueType1Code {
78699	pub fn validate(&self) -> Result<(), ValidationError> {
78700		Ok(())
78701	}
78702}
78703
78704
78705// PriceValueType3Code ...
78706#[cfg_attr(feature = "derive_debug", derive(Debug))]
78707#[cfg_attr(feature = "derive_default", derive(Default))]
78708#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78709#[cfg_attr(feature = "derive_clone", derive(Clone))]
78710#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78711pub enum PriceValueType3Code {
78712	#[cfg_attr(feature = "derive_default", default)]
78713	#[cfg_attr( feature = "derive_serde", serde(rename = "DISC") )]
78714	CodeDISC,
78715	#[cfg_attr( feature = "derive_serde", serde(rename = "PREM") )]
78716	CodePREM,
78717	#[cfg_attr( feature = "derive_serde", serde(rename = "PARV") )]
78718	CodePARV,
78719	#[cfg_attr( feature = "derive_serde", serde(rename = "YIEL") )]
78720	CodeYIEL,
78721	#[cfg_attr( feature = "derive_serde", serde(rename = "SPRE") )]
78722	CodeSPRE,
78723	#[cfg_attr( feature = "derive_serde", serde(rename = "PEUN") )]
78724	CodePEUN,
78725	#[cfg_attr( feature = "derive_serde", serde(rename = "ABSO") )]
78726	CodeABSO,
78727	#[cfg_attr( feature = "derive_serde", serde(rename = "TEDP") )]
78728	CodeTEDP,
78729	#[cfg_attr( feature = "derive_serde", serde(rename = "TEDY") )]
78730	CodeTEDY,
78731	#[cfg_attr( feature = "derive_serde", serde(rename = "FICT") )]
78732	CodeFICT,
78733	#[cfg_attr( feature = "derive_serde", serde(rename = "VACT") )]
78734	CodeVACT,
78735}
78736
78737impl PriceValueType3Code {
78738	pub fn validate(&self) -> Result<(), ValidationError> {
78739		Ok(())
78740	}
78741}
78742
78743
78744// PrincipalAmount3 ...
78745#[cfg_attr(feature = "derive_debug", derive(Debug))]
78746#[cfg_attr(feature = "derive_default", derive(Default))]
78747#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78748#[cfg_attr(feature = "derive_clone", derive(Clone))]
78749#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78750pub struct PrincipalAmount3 {
78751	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDtAmt", skip_serializing_if = "Option::is_none") )]
78752	pub val_dt_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
78753	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDtAmt", skip_serializing_if = "Option::is_none") )]
78754	pub mtrty_dt_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
78755}
78756
78757impl PrincipalAmount3 {
78758	pub fn validate(&self) -> Result<(), ValidationError> {
78759		if let Some(ref val) = self.val_dt_amt { val.validate()? }
78760		if let Some(ref val) = self.mtrty_dt_amt { val.validate()? }
78761		Ok(())
78762	}
78763}
78764
78765
78766// Priority1Choice ...
78767#[cfg_attr(feature = "derive_debug", derive(Debug))]
78768#[cfg_attr(feature = "derive_default", derive(Default))]
78769#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78770#[cfg_attr(feature = "derive_clone", derive(Clone))]
78771#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78772pub struct Priority1Choice {
78773	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
78774	pub cd: Option<Priority5Code>,
78775	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
78776	pub prtry: Option<String>,
78777}
78778
78779impl Priority1Choice {
78780	pub fn validate(&self) -> Result<(), ValidationError> {
78781		if let Some(ref val) = self.cd { val.validate()? }
78782		if let Some(ref val) = self.prtry {
78783			if val.chars().count() < 1 {
78784				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
78785			}
78786			if val.chars().count() > 35 {
78787				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
78788			}
78789		}
78790		Ok(())
78791	}
78792}
78793
78794
78795// Priority1Code ...
78796#[cfg_attr(feature = "derive_debug", derive(Debug))]
78797#[cfg_attr(feature = "derive_default", derive(Default))]
78798#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78799#[cfg_attr(feature = "derive_clone", derive(Clone))]
78800#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78801pub enum Priority1Code {
78802	#[cfg_attr(feature = "derive_default", default)]
78803	#[cfg_attr( feature = "derive_serde", serde(rename = "HIGH") )]
78804	CodeHIGH,
78805	#[cfg_attr( feature = "derive_serde", serde(rename = "NORM") )]
78806	CodeNORM,
78807	#[cfg_attr( feature = "derive_serde", serde(rename = "LOWW") )]
78808	CodeLOWW,
78809}
78810
78811impl Priority1Code {
78812	pub fn validate(&self) -> Result<(), ValidationError> {
78813		Ok(())
78814	}
78815}
78816
78817
78818// Priority2Code ...
78819#[cfg_attr(feature = "derive_debug", derive(Debug))]
78820#[cfg_attr(feature = "derive_default", derive(Default))]
78821#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78822#[cfg_attr(feature = "derive_clone", derive(Clone))]
78823#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78824pub enum Priority2Code {
78825	#[cfg_attr(feature = "derive_default", default)]
78826	#[cfg_attr( feature = "derive_serde", serde(rename = "HIGH") )]
78827	CodeHIGH,
78828	#[cfg_attr( feature = "derive_serde", serde(rename = "NORM") )]
78829	CodeNORM,
78830}
78831
78832impl Priority2Code {
78833	pub fn validate(&self) -> Result<(), ValidationError> {
78834		Ok(())
78835	}
78836}
78837
78838
78839// Priority3Code ...
78840#[cfg_attr(feature = "derive_debug", derive(Debug))]
78841#[cfg_attr(feature = "derive_default", derive(Default))]
78842#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78843#[cfg_attr(feature = "derive_clone", derive(Clone))]
78844#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78845pub enum Priority3Code {
78846	#[cfg_attr(feature = "derive_default", default)]
78847	#[cfg_attr( feature = "derive_serde", serde(rename = "URGT") )]
78848	CodeURGT,
78849	#[cfg_attr( feature = "derive_serde", serde(rename = "HIGH") )]
78850	CodeHIGH,
78851	#[cfg_attr( feature = "derive_serde", serde(rename = "NORM") )]
78852	CodeNORM,
78853}
78854
78855impl Priority3Code {
78856	pub fn validate(&self) -> Result<(), ValidationError> {
78857		Ok(())
78858	}
78859}
78860
78861
78862// Priority5Code ...
78863#[cfg_attr(feature = "derive_debug", derive(Debug))]
78864#[cfg_attr(feature = "derive_default", derive(Default))]
78865#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78866#[cfg_attr(feature = "derive_clone", derive(Clone))]
78867#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78868pub enum Priority5Code {
78869	#[cfg_attr(feature = "derive_default", default)]
78870	#[cfg_attr( feature = "derive_serde", serde(rename = "HIGH") )]
78871	CodeHIGH,
78872	#[cfg_attr( feature = "derive_serde", serde(rename = "LOWW") )]
78873	CodeLOWW,
78874	#[cfg_attr( feature = "derive_serde", serde(rename = "NORM") )]
78875	CodeNORM,
78876	#[cfg_attr( feature = "derive_serde", serde(rename = "URGT") )]
78877	CodeURGT,
78878}
78879
78880impl Priority5Code {
78881	pub fn validate(&self) -> Result<(), ValidationError> {
78882		Ok(())
78883	}
78884}
78885
78886
78887// PriorityNumeric4Choice ...
78888#[cfg_attr(feature = "derive_debug", derive(Debug))]
78889#[cfg_attr(feature = "derive_default", derive(Default))]
78890#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78891#[cfg_attr(feature = "derive_clone", derive(Clone))]
78892#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78893pub struct PriorityNumeric4Choice {
78894	#[cfg_attr( feature = "derive_serde", serde(rename = "Nmrc", skip_serializing_if = "Option::is_none") )]
78895	pub nmrc: Option<String>,
78896	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
78897	pub prtry: Option<GenericIdentification30>,
78898}
78899
78900impl PriorityNumeric4Choice {
78901	pub fn validate(&self) -> Result<(), ValidationError> {
78902		if let Some(ref val) = self.nmrc {
78903			let pattern = Regex::new("[0-9]{4}").unwrap();
78904			if !pattern.is_match(val) {
78905				return Err(ValidationError::new(1005, "nmrc does not match the required pattern".to_string()));
78906			}
78907		}
78908		if let Some(ref val) = self.prtry { val.validate()? }
78909		Ok(())
78910	}
78911}
78912
78913
78914// ProcessingCharacteristics10 ...
78915#[cfg_attr(feature = "derive_debug", derive(Debug))]
78916#[cfg_attr(feature = "derive_default", derive(Default))]
78917#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78918#[cfg_attr(feature = "derive_clone", derive(Clone))]
78919#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
78920pub struct ProcessingCharacteristics10 {
78921	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgCcyAccptd", skip_serializing_if = "Option::is_none") )]
78922	pub dealg_ccy_accptd: Option<Vec<String>>,
78923	#[cfg_attr( feature = "derive_serde", serde(rename = "RedAuthstn", skip_serializing_if = "Option::is_none") )]
78924	pub red_authstn: Option<Forms1>,
78925	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtInd", skip_serializing_if = "Option::is_none") )]
78926	pub amt_ind: Option<bool>,
78927	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitsInd", skip_serializing_if = "Option::is_none") )]
78928	pub units_ind: Option<bool>,
78929	#[cfg_attr( feature = "derive_serde", serde(rename = "Rndg", skip_serializing_if = "Option::is_none") )]
78930	pub rndg: Option<RoundingDirection2Code>,
78931	#[cfg_attr( feature = "derive_serde", serde(rename = "PctgInd", skip_serializing_if = "Option::is_none") )]
78932	pub pctg_ind: Option<bool>,
78933	#[cfg_attr( feature = "derive_serde", serde(rename = "MainFndOrdrDskLctn", skip_serializing_if = "Option::is_none") )]
78934	pub main_fnd_ordr_dsk_lctn: Option<MainFundOrderDeskLocation1>,
78935	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgFrqcy", skip_serializing_if = "Option::is_none") )]
78936	pub dealg_frqcy: Option<EventFrequency5Code>,
78937	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgFrqcyDesc", skip_serializing_if = "Option::is_none") )]
78938	pub dealg_frqcy_desc: Option<String>,
78939	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgCutOffTm", skip_serializing_if = "Option::is_none") )]
78940	pub dealg_cut_off_tm: Option<String>,
78941	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgCutOffTmFrame", skip_serializing_if = "Option::is_none") )]
78942	pub dealg_cut_off_tm_frame: Option<TimeFrame9>,
78943	#[cfg_attr( feature = "derive_serde", serde(rename = "DealConfTm", skip_serializing_if = "Option::is_none") )]
78944	pub deal_conf_tm: Option<String>,
78945	#[cfg_attr( feature = "derive_serde", serde(rename = "DealConfTmFrame", skip_serializing_if = "Option::is_none") )]
78946	pub deal_conf_tm_frame: Option<TimeFrame8>,
78947	#[cfg_attr( feature = "derive_serde", serde(rename = "LtdPrd", skip_serializing_if = "Option::is_none") )]
78948	pub ltd_prd: Option<String>,
78949	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCycl", skip_serializing_if = "Option::is_none") )]
78950	pub sttlm_cycl: Option<TimeFrame8Choice>,
78951	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
78952	pub addtl_inf: Option<Vec<AdditionalInformation15>>,
78953}
78954
78955impl ProcessingCharacteristics10 {
78956	pub fn validate(&self) -> Result<(), ValidationError> {
78957		if let Some(ref vec) = self.dealg_ccy_accptd {
78958			for item in vec {
78959				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
78960				if !pattern.is_match(&item) {
78961					return Err(ValidationError::new(1005, "dealg_ccy_accptd does not match the required pattern".to_string()));
78962				}
78963			}
78964		}
78965		if let Some(ref val) = self.red_authstn { val.validate()? }
78966		if let Some(ref val) = self.rndg { val.validate()? }
78967		if let Some(ref val) = self.main_fnd_ordr_dsk_lctn { val.validate()? }
78968		if let Some(ref val) = self.dealg_frqcy { val.validate()? }
78969		if let Some(ref val) = self.dealg_frqcy_desc {
78970			if val.chars().count() < 1 {
78971				return Err(ValidationError::new(1001, "dealg_frqcy_desc is shorter than the minimum length of 1".to_string()));
78972			}
78973			if val.chars().count() > 350 {
78974				return Err(ValidationError::new(1002, "dealg_frqcy_desc exceeds the maximum length of 350".to_string()));
78975			}
78976		}
78977		if let Some(ref val) = self.dealg_cut_off_tm_frame { val.validate()? }
78978		if let Some(ref val) = self.deal_conf_tm_frame { val.validate()? }
78979		if let Some(ref val) = self.ltd_prd {
78980			if val.chars().count() < 1 {
78981				return Err(ValidationError::new(1001, "ltd_prd is shorter than the minimum length of 1".to_string()));
78982			}
78983			if val.chars().count() > 350 {
78984				return Err(ValidationError::new(1002, "ltd_prd exceeds the maximum length of 350".to_string()));
78985			}
78986		}
78987		if let Some(ref val) = self.sttlm_cycl { val.validate()? }
78988		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
78989		Ok(())
78990	}
78991}
78992
78993
78994// ProcessingCharacteristics11 ...
78995#[cfg_attr(feature = "derive_debug", derive(Debug))]
78996#[cfg_attr(feature = "derive_default", derive(Default))]
78997#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
78998#[cfg_attr(feature = "derive_clone", derive(Clone))]
78999#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79000pub struct ProcessingCharacteristics11 {
79001	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgCcyAccptd", skip_serializing_if = "Option::is_none") )]
79002	pub dealg_ccy_accptd: Option<Vec<String>>,
79003	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlInvstmtAppl", skip_serializing_if = "Option::is_none") )]
79004	pub initl_invstmt_appl: Option<Forms1>,
79005	#[cfg_attr( feature = "derive_serde", serde(rename = "SbsqntInvstmtAppl", skip_serializing_if = "Option::is_none") )]
79006	pub sbsqnt_invstmt_appl: Option<Forms1>,
79007	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtInd", skip_serializing_if = "Option::is_none") )]
79008	pub amt_ind: Option<bool>,
79009	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitsInd", skip_serializing_if = "Option::is_none") )]
79010	pub units_ind: Option<bool>,
79011	#[cfg_attr( feature = "derive_serde", serde(rename = "Rndg", skip_serializing_if = "Option::is_none") )]
79012	pub rndg: Option<RoundingDirection2Code>,
79013	#[cfg_attr( feature = "derive_serde", serde(rename = "MainFndOrdrDskLctn", skip_serializing_if = "Option::is_none") )]
79014	pub main_fnd_ordr_dsk_lctn: Option<MainFundOrderDeskLocation1>,
79015	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgFrqcy", skip_serializing_if = "Option::is_none") )]
79016	pub dealg_frqcy: Option<EventFrequency5Code>,
79017	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgFrqcyDesc", skip_serializing_if = "Option::is_none") )]
79018	pub dealg_frqcy_desc: Option<String>,
79019	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgCutOffTm", skip_serializing_if = "Option::is_none") )]
79020	pub dealg_cut_off_tm: Option<String>,
79021	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgCutOffTmFrame", skip_serializing_if = "Option::is_none") )]
79022	pub dealg_cut_off_tm_frame: Option<TimeFrame9>,
79023	#[cfg_attr( feature = "derive_serde", serde(rename = "DealConfTm", skip_serializing_if = "Option::is_none") )]
79024	pub deal_conf_tm: Option<String>,
79025	#[cfg_attr( feature = "derive_serde", serde(rename = "DealConfTmFrame", skip_serializing_if = "Option::is_none") )]
79026	pub deal_conf_tm_frame: Option<TimeFrame11>,
79027	#[cfg_attr( feature = "derive_serde", serde(rename = "LtdPrd", skip_serializing_if = "Option::is_none") )]
79028	pub ltd_prd: Option<String>,
79029	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCycl", skip_serializing_if = "Option::is_none") )]
79030	pub sttlm_cycl: Option<TimeFrame7Choice>,
79031	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
79032	pub addtl_inf: Option<Vec<AdditionalInformation15>>,
79033}
79034
79035impl ProcessingCharacteristics11 {
79036	pub fn validate(&self) -> Result<(), ValidationError> {
79037		if let Some(ref vec) = self.dealg_ccy_accptd {
79038			for item in vec {
79039				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
79040				if !pattern.is_match(&item) {
79041					return Err(ValidationError::new(1005, "dealg_ccy_accptd does not match the required pattern".to_string()));
79042				}
79043			}
79044		}
79045		if let Some(ref val) = self.initl_invstmt_appl { val.validate()? }
79046		if let Some(ref val) = self.sbsqnt_invstmt_appl { val.validate()? }
79047		if let Some(ref val) = self.rndg { val.validate()? }
79048		if let Some(ref val) = self.main_fnd_ordr_dsk_lctn { val.validate()? }
79049		if let Some(ref val) = self.dealg_frqcy { val.validate()? }
79050		if let Some(ref val) = self.dealg_frqcy_desc {
79051			if val.chars().count() < 1 {
79052				return Err(ValidationError::new(1001, "dealg_frqcy_desc is shorter than the minimum length of 1".to_string()));
79053			}
79054			if val.chars().count() > 350 {
79055				return Err(ValidationError::new(1002, "dealg_frqcy_desc exceeds the maximum length of 350".to_string()));
79056			}
79057		}
79058		if let Some(ref val) = self.dealg_cut_off_tm_frame { val.validate()? }
79059		if let Some(ref val) = self.deal_conf_tm_frame { val.validate()? }
79060		if let Some(ref val) = self.ltd_prd {
79061			if val.chars().count() < 1 {
79062				return Err(ValidationError::new(1001, "ltd_prd is shorter than the minimum length of 1".to_string()));
79063			}
79064			if val.chars().count() > 350 {
79065				return Err(ValidationError::new(1002, "ltd_prd exceeds the maximum length of 350".to_string()));
79066			}
79067		}
79068		if let Some(ref val) = self.sttlm_cycl { val.validate()? }
79069		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
79070		Ok(())
79071	}
79072}
79073
79074
79075// ProcessingCharacteristics12 ...
79076#[cfg_attr(feature = "derive_debug", derive(Debug))]
79077#[cfg_attr(feature = "derive_default", derive(Default))]
79078#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79079#[cfg_attr(feature = "derive_clone", derive(Clone))]
79080#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79081pub struct ProcessingCharacteristics12 {
79082	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgCcyAccptd", skip_serializing_if = "Option::is_none") )]
79083	pub dealg_ccy_accptd: Option<Vec<String>>,
79084	#[cfg_attr( feature = "derive_serde", serde(rename = "RedAuthstn", skip_serializing_if = "Option::is_none") )]
79085	pub red_authstn: Option<Forms1>,
79086	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtInd", skip_serializing_if = "Option::is_none") )]
79087	pub amt_ind: Option<bool>,
79088	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitsInd", skip_serializing_if = "Option::is_none") )]
79089	pub units_ind: Option<bool>,
79090	#[cfg_attr( feature = "derive_serde", serde(rename = "Rndg", skip_serializing_if = "Option::is_none") )]
79091	pub rndg: Option<RoundingDirection2Code>,
79092	#[cfg_attr( feature = "derive_serde", serde(rename = "PctgInd", skip_serializing_if = "Option::is_none") )]
79093	pub pctg_ind: Option<bool>,
79094	#[cfg_attr( feature = "derive_serde", serde(rename = "MainFndOrdrDskLctn", skip_serializing_if = "Option::is_none") )]
79095	pub main_fnd_ordr_dsk_lctn: Option<MainFundOrderDeskLocation1>,
79096	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgFrqcy", skip_serializing_if = "Option::is_none") )]
79097	pub dealg_frqcy: Option<EventFrequency5Code>,
79098	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgFrqcyDesc", skip_serializing_if = "Option::is_none") )]
79099	pub dealg_frqcy_desc: Option<String>,
79100	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgCutOffTm", skip_serializing_if = "Option::is_none") )]
79101	pub dealg_cut_off_tm: Option<String>,
79102	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgCutOffTmFrame", skip_serializing_if = "Option::is_none") )]
79103	pub dealg_cut_off_tm_frame: Option<TimeFrame9>,
79104	#[cfg_attr( feature = "derive_serde", serde(rename = "DealConfTm", skip_serializing_if = "Option::is_none") )]
79105	pub deal_conf_tm: Option<String>,
79106	#[cfg_attr( feature = "derive_serde", serde(rename = "DealConfTmFrame", skip_serializing_if = "Option::is_none") )]
79107	pub deal_conf_tm_frame: Option<TimeFrame10>,
79108	#[cfg_attr( feature = "derive_serde", serde(rename = "LtdPrd", skip_serializing_if = "Option::is_none") )]
79109	pub ltd_prd: Option<String>,
79110	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCycl", skip_serializing_if = "Option::is_none") )]
79111	pub sttlm_cycl: Option<TimeFrame8Choice>,
79112	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
79113	pub addtl_inf: Option<Vec<AdditionalInformation15>>,
79114}
79115
79116impl ProcessingCharacteristics12 {
79117	pub fn validate(&self) -> Result<(), ValidationError> {
79118		if let Some(ref vec) = self.dealg_ccy_accptd {
79119			for item in vec {
79120				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
79121				if !pattern.is_match(&item) {
79122					return Err(ValidationError::new(1005, "dealg_ccy_accptd does not match the required pattern".to_string()));
79123				}
79124			}
79125		}
79126		if let Some(ref val) = self.red_authstn { val.validate()? }
79127		if let Some(ref val) = self.rndg { val.validate()? }
79128		if let Some(ref val) = self.main_fnd_ordr_dsk_lctn { val.validate()? }
79129		if let Some(ref val) = self.dealg_frqcy { val.validate()? }
79130		if let Some(ref val) = self.dealg_frqcy_desc {
79131			if val.chars().count() < 1 {
79132				return Err(ValidationError::new(1001, "dealg_frqcy_desc is shorter than the minimum length of 1".to_string()));
79133			}
79134			if val.chars().count() > 350 {
79135				return Err(ValidationError::new(1002, "dealg_frqcy_desc exceeds the maximum length of 350".to_string()));
79136			}
79137		}
79138		if let Some(ref val) = self.dealg_cut_off_tm_frame { val.validate()? }
79139		if let Some(ref val) = self.deal_conf_tm_frame { val.validate()? }
79140		if let Some(ref val) = self.ltd_prd {
79141			if val.chars().count() < 1 {
79142				return Err(ValidationError::new(1001, "ltd_prd is shorter than the minimum length of 1".to_string()));
79143			}
79144			if val.chars().count() > 350 {
79145				return Err(ValidationError::new(1002, "ltd_prd exceeds the maximum length of 350".to_string()));
79146			}
79147		}
79148		if let Some(ref val) = self.sttlm_cycl { val.validate()? }
79149		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
79150		Ok(())
79151	}
79152}
79153
79154
79155// ProcessingCharacteristics9 ...
79156#[cfg_attr(feature = "derive_debug", derive(Debug))]
79157#[cfg_attr(feature = "derive_default", derive(Default))]
79158#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79159#[cfg_attr(feature = "derive_clone", derive(Clone))]
79160#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79161pub struct ProcessingCharacteristics9 {
79162	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgCcyAccptd", skip_serializing_if = "Option::is_none") )]
79163	pub dealg_ccy_accptd: Option<Vec<String>>,
79164	#[cfg_attr( feature = "derive_serde", serde(rename = "SwtchAuthstn", skip_serializing_if = "Option::is_none") )]
79165	pub swtch_authstn: Option<Forms1>,
79166	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtInd", skip_serializing_if = "Option::is_none") )]
79167	pub amt_ind: Option<bool>,
79168	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitsInd", skip_serializing_if = "Option::is_none") )]
79169	pub units_ind: Option<bool>,
79170	#[cfg_attr( feature = "derive_serde", serde(rename = "Rndg", skip_serializing_if = "Option::is_none") )]
79171	pub rndg: Option<RoundingDirection2Code>,
79172	#[cfg_attr( feature = "derive_serde", serde(rename = "MainFndOrdrDskLctn", skip_serializing_if = "Option::is_none") )]
79173	pub main_fnd_ordr_dsk_lctn: Option<MainFundOrderDeskLocation1>,
79174	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgFrqcy", skip_serializing_if = "Option::is_none") )]
79175	pub dealg_frqcy: Option<EventFrequency5Code>,
79176	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgFrqcyDesc", skip_serializing_if = "Option::is_none") )]
79177	pub dealg_frqcy_desc: Option<String>,
79178	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgCutOffTm", skip_serializing_if = "Option::is_none") )]
79179	pub dealg_cut_off_tm: Option<String>,
79180	#[cfg_attr( feature = "derive_serde", serde(rename = "DealgCutOffTmFrame", skip_serializing_if = "Option::is_none") )]
79181	pub dealg_cut_off_tm_frame: Option<TimeFrame9>,
79182	#[cfg_attr( feature = "derive_serde", serde(rename = "DealConfTm", skip_serializing_if = "Option::is_none") )]
79183	pub deal_conf_tm: Option<String>,
79184	#[cfg_attr( feature = "derive_serde", serde(rename = "DealConfTmFrame", skip_serializing_if = "Option::is_none") )]
79185	pub deal_conf_tm_frame: Option<TimeFrame8>,
79186	#[cfg_attr( feature = "derive_serde", serde(rename = "LtdPrd", skip_serializing_if = "Option::is_none") )]
79187	pub ltd_prd: Option<String>,
79188	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCycl", skip_serializing_if = "Option::is_none") )]
79189	pub sttlm_cycl: Option<TimeFrame8Choice>,
79190	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
79191	pub addtl_inf: Option<Vec<AdditionalInformation15>>,
79192}
79193
79194impl ProcessingCharacteristics9 {
79195	pub fn validate(&self) -> Result<(), ValidationError> {
79196		if let Some(ref vec) = self.dealg_ccy_accptd {
79197			for item in vec {
79198				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
79199				if !pattern.is_match(&item) {
79200					return Err(ValidationError::new(1005, "dealg_ccy_accptd does not match the required pattern".to_string()));
79201				}
79202			}
79203		}
79204		if let Some(ref val) = self.swtch_authstn { val.validate()? }
79205		if let Some(ref val) = self.rndg { val.validate()? }
79206		if let Some(ref val) = self.main_fnd_ordr_dsk_lctn { val.validate()? }
79207		if let Some(ref val) = self.dealg_frqcy { val.validate()? }
79208		if let Some(ref val) = self.dealg_frqcy_desc {
79209			if val.chars().count() < 1 {
79210				return Err(ValidationError::new(1001, "dealg_frqcy_desc is shorter than the minimum length of 1".to_string()));
79211			}
79212			if val.chars().count() > 350 {
79213				return Err(ValidationError::new(1002, "dealg_frqcy_desc exceeds the maximum length of 350".to_string()));
79214			}
79215		}
79216		if let Some(ref val) = self.dealg_cut_off_tm_frame { val.validate()? }
79217		if let Some(ref val) = self.deal_conf_tm_frame { val.validate()? }
79218		if let Some(ref val) = self.ltd_prd {
79219			if val.chars().count() < 1 {
79220				return Err(ValidationError::new(1001, "ltd_prd is shorter than the minimum length of 1".to_string()));
79221			}
79222			if val.chars().count() > 350 {
79223				return Err(ValidationError::new(1002, "ltd_prd exceeds the maximum length of 350".to_string()));
79224			}
79225		}
79226		if let Some(ref val) = self.sttlm_cycl { val.validate()? }
79227		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
79228		Ok(())
79229	}
79230}
79231
79232
79233// ProcessingPosition3Code ...
79234#[cfg_attr(feature = "derive_debug", derive(Debug))]
79235#[cfg_attr(feature = "derive_default", derive(Default))]
79236#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79237#[cfg_attr(feature = "derive_clone", derive(Clone))]
79238#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79239pub enum ProcessingPosition3Code {
79240	#[cfg_attr(feature = "derive_default", default)]
79241	#[cfg_attr( feature = "derive_serde", serde(rename = "AFTE") )]
79242	CodeAFTE,
79243	#[cfg_attr( feature = "derive_serde", serde(rename = "WITH") )]
79244	CodeWITH,
79245	#[cfg_attr( feature = "derive_serde", serde(rename = "BEFO") )]
79246	CodeBEFO,
79247	#[cfg_attr( feature = "derive_serde", serde(rename = "INFO") )]
79248	CodeINFO,
79249}
79250
79251impl ProcessingPosition3Code {
79252	pub fn validate(&self) -> Result<(), ValidationError> {
79253		Ok(())
79254	}
79255}
79256
79257
79258// ProcessingPosition7Choice ...
79259#[cfg_attr(feature = "derive_debug", derive(Debug))]
79260#[cfg_attr(feature = "derive_default", derive(Default))]
79261#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79262#[cfg_attr(feature = "derive_clone", derive(Clone))]
79263#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79264pub struct ProcessingPosition7Choice {
79265	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
79266	pub cd: Option<ProcessingPosition3Code>,
79267	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
79268	pub prtry: Option<GenericIdentification30>,
79269}
79270
79271impl ProcessingPosition7Choice {
79272	pub fn validate(&self) -> Result<(), ValidationError> {
79273		if let Some(ref val) = self.cd { val.validate()? }
79274		if let Some(ref val) = self.prtry { val.validate()? }
79275		Ok(())
79276	}
79277}
79278
79279
79280// ProcessingStatus43Choice ...
79281#[cfg_attr(feature = "derive_debug", derive(Debug))]
79282#[cfg_attr(feature = "derive_default", derive(Default))]
79283#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79284#[cfg_attr(feature = "derive_clone", derive(Clone))]
79285#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79286pub struct ProcessingStatus43Choice {
79287	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcvd", skip_serializing_if = "Option::is_none") )]
79288	pub rcvd: Option<ReceivedStatusReason1>,
79289	#[cfg_attr( feature = "derive_serde", serde(rename = "Accptd", skip_serializing_if = "Option::is_none") )]
79290	pub accptd: Option<AcceptedStatusReason7>,
79291	#[cfg_attr( feature = "derive_serde", serde(rename = "PdgPrcg", skip_serializing_if = "Option::is_none") )]
79292	pub pdg_prcg: Option<PendingProcessingStatusReason1>,
79293	#[cfg_attr( feature = "derive_serde", serde(rename = "Rjctd", skip_serializing_if = "Option::is_none") )]
79294	pub rjctd: Option<RejectedStatusReason12>,
79295	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtrySts", skip_serializing_if = "Option::is_none") )]
79296	pub prtry_sts: Option<ProprietaryStatusAndReason5>,
79297}
79298
79299impl ProcessingStatus43Choice {
79300	pub fn validate(&self) -> Result<(), ValidationError> {
79301		if let Some(ref val) = self.rcvd { val.validate()? }
79302		if let Some(ref val) = self.accptd { val.validate()? }
79303		if let Some(ref val) = self.pdg_prcg { val.validate()? }
79304		if let Some(ref val) = self.rjctd { val.validate()? }
79305		if let Some(ref val) = self.prtry_sts { val.validate()? }
79306		Ok(())
79307	}
79308}
79309
79310
79311// ProcessingStatus66Choice ...
79312#[cfg_attr(feature = "derive_debug", derive(Debug))]
79313#[cfg_attr(feature = "derive_default", derive(Default))]
79314#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79315#[cfg_attr(feature = "derive_clone", derive(Clone))]
79316#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79317pub struct ProcessingStatus66Choice {
79318	#[cfg_attr( feature = "derive_serde", serde(rename = "AckdAccptd", skip_serializing_if = "Option::is_none") )]
79319	pub ackd_accptd: Option<AcknowledgedAcceptedStatus21Choice>,
79320	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpr", skip_serializing_if = "Option::is_none") )]
79321	pub rpr: Option<RejectionOrRepairStatus38Choice>,
79322	#[cfg_attr( feature = "derive_serde", serde(rename = "Canc", skip_serializing_if = "Option::is_none") )]
79323	pub canc: Option<CancellationStatus14Choice>,
79324	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
79325	pub prtry: Option<ProprietaryStatusAndReason6>,
79326}
79327
79328impl ProcessingStatus66Choice {
79329	pub fn validate(&self) -> Result<(), ValidationError> {
79330		if let Some(ref val) = self.ackd_accptd { val.validate()? }
79331		if let Some(ref val) = self.rpr { val.validate()? }
79332		if let Some(ref val) = self.canc { val.validate()? }
79333		if let Some(ref val) = self.prtry { val.validate()? }
79334		Ok(())
79335	}
79336}
79337
79338
79339// ProcessingStatus67Choice ...
79340#[cfg_attr(feature = "derive_debug", derive(Debug))]
79341#[cfg_attr(feature = "derive_default", derive(Default))]
79342#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79343#[cfg_attr(feature = "derive_clone", derive(Clone))]
79344#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79345pub struct ProcessingStatus67Choice {
79346	#[cfg_attr( feature = "derive_serde", serde(rename = "Rjctd", skip_serializing_if = "Option::is_none") )]
79347	pub rjctd: Option<RejectionOrRepairStatus38Choice>,
79348	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpr", skip_serializing_if = "Option::is_none") )]
79349	pub rpr: Option<RejectionOrRepairStatus38Choice>,
79350	#[cfg_attr( feature = "derive_serde", serde(rename = "Canc", skip_serializing_if = "Option::is_none") )]
79351	pub canc: Option<CancellationStatus14Choice>,
79352	#[cfg_attr( feature = "derive_serde", serde(rename = "AckdAccptd", skip_serializing_if = "Option::is_none") )]
79353	pub ackd_accptd: Option<AcknowledgedAcceptedStatus21Choice>,
79354	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
79355	pub prtry: Option<ProprietaryStatusAndReason6>,
79356}
79357
79358impl ProcessingStatus67Choice {
79359	pub fn validate(&self) -> Result<(), ValidationError> {
79360		if let Some(ref val) = self.rjctd { val.validate()? }
79361		if let Some(ref val) = self.rpr { val.validate()? }
79362		if let Some(ref val) = self.canc { val.validate()? }
79363		if let Some(ref val) = self.ackd_accptd { val.validate()? }
79364		if let Some(ref val) = self.prtry { val.validate()? }
79365		Ok(())
79366	}
79367}
79368
79369
79370// ProcessingStatus68Choice ...
79371#[cfg_attr(feature = "derive_debug", derive(Debug))]
79372#[cfg_attr(feature = "derive_default", derive(Default))]
79373#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79374#[cfg_attr(feature = "derive_clone", derive(Clone))]
79375#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79376pub struct ProcessingStatus68Choice {
79377	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
79378	pub cd: Option<TransactionProcessingStatus3Code>,
79379	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
79380	pub prtry: Option<GenericIdentification30>,
79381}
79382
79383impl ProcessingStatus68Choice {
79384	pub fn validate(&self) -> Result<(), ValidationError> {
79385		if let Some(ref val) = self.cd { val.validate()? }
79386		if let Some(ref val) = self.prtry { val.validate()? }
79387		Ok(())
79388	}
79389}
79390
79391
79392// ProcessingStatus69Choice ...
79393#[cfg_attr(feature = "derive_debug", derive(Debug))]
79394#[cfg_attr(feature = "derive_default", derive(Default))]
79395#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79396#[cfg_attr(feature = "derive_clone", derive(Clone))]
79397#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79398pub struct ProcessingStatus69Choice {
79399	#[cfg_attr( feature = "derive_serde", serde(rename = "PdgCxl", skip_serializing_if = "Option::is_none") )]
79400	pub pdg_cxl: Option<PendingStatus39Choice>,
79401	#[cfg_attr( feature = "derive_serde", serde(rename = "Rjctd", skip_serializing_if = "Option::is_none") )]
79402	pub rjctd: Option<RejectionOrRepairStatus39Choice>,
79403	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpr", skip_serializing_if = "Option::is_none") )]
79404	pub rpr: Option<RejectionOrRepairStatus39Choice>,
79405	#[cfg_attr( feature = "derive_serde", serde(rename = "AckdAccptd", skip_serializing_if = "Option::is_none") )]
79406	pub ackd_accptd: Option<AcknowledgedAcceptedStatus24Choice>,
79407	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
79408	pub prtry: Option<ProprietaryStatusAndReason6>,
79409	#[cfg_attr( feature = "derive_serde", serde(rename = "Dnd", skip_serializing_if = "Option::is_none") )]
79410	pub dnd: Option<DeniedStatus16Choice>,
79411	#[cfg_attr( feature = "derive_serde", serde(rename = "Canc", skip_serializing_if = "Option::is_none") )]
79412	pub canc: Option<CancellationStatus15Choice>,
79413}
79414
79415impl ProcessingStatus69Choice {
79416	pub fn validate(&self) -> Result<(), ValidationError> {
79417		if let Some(ref val) = self.pdg_cxl { val.validate()? }
79418		if let Some(ref val) = self.rjctd { val.validate()? }
79419		if let Some(ref val) = self.rpr { val.validate()? }
79420		if let Some(ref val) = self.ackd_accptd { val.validate()? }
79421		if let Some(ref val) = self.prtry { val.validate()? }
79422		if let Some(ref val) = self.dnd { val.validate()? }
79423		if let Some(ref val) = self.canc { val.validate()? }
79424		Ok(())
79425	}
79426}
79427
79428
79429// ProcessingStatus71Choice ...
79430#[cfg_attr(feature = "derive_debug", derive(Debug))]
79431#[cfg_attr(feature = "derive_default", derive(Default))]
79432#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79433#[cfg_attr(feature = "derive_clone", derive(Clone))]
79434#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79435pub struct ProcessingStatus71Choice {
79436	#[cfg_attr( feature = "derive_serde", serde(rename = "AckdAccptd", skip_serializing_if = "Option::is_none") )]
79437	pub ackd_accptd: Option<AcknowledgedAcceptedStatus21Choice>,
79438	#[cfg_attr( feature = "derive_serde", serde(rename = "Pdg", skip_serializing_if = "Option::is_none") )]
79439	pub pdg: Option<PendingStatus38Choice>,
79440	#[cfg_attr( feature = "derive_serde", serde(rename = "Rjctd", skip_serializing_if = "Option::is_none") )]
79441	pub rjctd: Option<RejectionOrRepairStatus40Choice>,
79442	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpr", skip_serializing_if = "Option::is_none") )]
79443	pub rpr: Option<RejectionOrRepairStatus39Choice>,
79444	#[cfg_attr( feature = "derive_serde", serde(rename = "Dnd", skip_serializing_if = "Option::is_none") )]
79445	pub dnd: Option<DeniedStatus16Choice>,
79446	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmpltd", skip_serializing_if = "Option::is_none") )]
79447	pub cmpltd: Option<ProprietaryReason4>,
79448	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
79449	pub prtry: Option<ProprietaryStatusAndReason6>,
79450}
79451
79452impl ProcessingStatus71Choice {
79453	pub fn validate(&self) -> Result<(), ValidationError> {
79454		if let Some(ref val) = self.ackd_accptd { val.validate()? }
79455		if let Some(ref val) = self.pdg { val.validate()? }
79456		if let Some(ref val) = self.rjctd { val.validate()? }
79457		if let Some(ref val) = self.rpr { val.validate()? }
79458		if let Some(ref val) = self.dnd { val.validate()? }
79459		if let Some(ref val) = self.cmpltd { val.validate()? }
79460		if let Some(ref val) = self.prtry { val.validate()? }
79461		Ok(())
79462	}
79463}
79464
79465
79466// ProcessingStatus72Choice ...
79467#[cfg_attr(feature = "derive_debug", derive(Debug))]
79468#[cfg_attr(feature = "derive_default", derive(Default))]
79469#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79470#[cfg_attr(feature = "derive_clone", derive(Clone))]
79471#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79472pub struct ProcessingStatus72Choice {
79473	#[cfg_attr( feature = "derive_serde", serde(rename = "AckdAccptd", skip_serializing_if = "Option::is_none") )]
79474	pub ackd_accptd: Option<Reason4>,
79475	#[cfg_attr( feature = "derive_serde", serde(rename = "PdgPrcg", skip_serializing_if = "Option::is_none") )]
79476	pub pdg_prcg: Option<Reason18Choice>,
79477	#[cfg_attr( feature = "derive_serde", serde(rename = "Rjctd", skip_serializing_if = "Option::is_none") )]
79478	pub rjctd: Option<Reason18Choice>,
79479	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmpltd", skip_serializing_if = "Option::is_none") )]
79480	pub cmpltd: Option<Reason4>,
79481	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
79482	pub prtry: Option<ProprietaryStatusAndReason6>,
79483}
79484
79485impl ProcessingStatus72Choice {
79486	pub fn validate(&self) -> Result<(), ValidationError> {
79487		if let Some(ref val) = self.ackd_accptd { val.validate()? }
79488		if let Some(ref val) = self.pdg_prcg { val.validate()? }
79489		if let Some(ref val) = self.rjctd { val.validate()? }
79490		if let Some(ref val) = self.cmpltd { val.validate()? }
79491		if let Some(ref val) = self.prtry { val.validate()? }
79492		Ok(())
79493	}
79494}
79495
79496
79497// ProcessingType1Choice ...
79498#[cfg_attr(feature = "derive_debug", derive(Debug))]
79499#[cfg_attr(feature = "derive_default", derive(Default))]
79500#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79501#[cfg_attr(feature = "derive_clone", derive(Clone))]
79502#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79503pub struct ProcessingType1Choice {
79504	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
79505	pub cd: Option<ProcessingType1Code>,
79506	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
79507	pub prtry: Option<String>,
79508}
79509
79510impl ProcessingType1Choice {
79511	pub fn validate(&self) -> Result<(), ValidationError> {
79512		if let Some(ref val) = self.cd { val.validate()? }
79513		if let Some(ref val) = self.prtry {
79514			if val.chars().count() < 1 {
79515				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
79516			}
79517			if val.chars().count() > 35 {
79518				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
79519			}
79520		}
79521		Ok(())
79522	}
79523}
79524
79525
79526// ProcessingType1Code ...
79527#[cfg_attr(feature = "derive_debug", derive(Debug))]
79528#[cfg_attr(feature = "derive_default", derive(Default))]
79529#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79530#[cfg_attr(feature = "derive_clone", derive(Clone))]
79531#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79532pub enum ProcessingType1Code {
79533	#[cfg_attr(feature = "derive_default", default)]
79534	#[cfg_attr( feature = "derive_serde", serde(rename = "RJCT") )]
79535	CodeRJCT,
79536	#[cfg_attr( feature = "derive_serde", serde(rename = "CVHD") )]
79537	CodeCVHD,
79538	#[cfg_attr( feature = "derive_serde", serde(rename = "RSVT") )]
79539	CodeRSVT,
79540	#[cfg_attr( feature = "derive_serde", serde(rename = "BLCK") )]
79541	CodeBLCK,
79542	#[cfg_attr( feature = "derive_serde", serde(rename = "EARM") )]
79543	CodeEARM,
79544	#[cfg_attr( feature = "derive_serde", serde(rename = "EFAC") )]
79545	CodeEFAC,
79546	#[cfg_attr( feature = "derive_serde", serde(rename = "DLVR") )]
79547	CodeDLVR,
79548	#[cfg_attr( feature = "derive_serde", serde(rename = "COLD") )]
79549	CodeCOLD,
79550	#[cfg_attr( feature = "derive_serde", serde(rename = "CSDB") )]
79551	CodeCSDB,
79552}
79553
79554impl ProcessingType1Code {
79555	pub fn validate(&self) -> Result<(), ValidationError> {
79556		Ok(())
79557	}
79558}
79559
79560
79561// Product1Choice ...
79562#[cfg_attr(feature = "derive_debug", derive(Debug))]
79563#[cfg_attr(feature = "derive_default", derive(Default))]
79564#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79565#[cfg_attr(feature = "derive_clone", derive(Clone))]
79566#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79567pub struct Product1Choice {
79568	#[cfg_attr( feature = "derive_serde", serde(rename = "Deriv", skip_serializing_if = "Option::is_none") )]
79569	pub deriv: Option<Derivative3>,
79570	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesFincgTx", skip_serializing_if = "Option::is_none") )]
79571	pub scties_fincg_tx: Option<RepurchaseAgreement3>,
79572	#[cfg_attr( feature = "derive_serde", serde(rename = "Scty", skip_serializing_if = "Option::is_none") )]
79573	pub scty: Option<FinancialInstrument59>,
79574}
79575
79576impl Product1Choice {
79577	pub fn validate(&self) -> Result<(), ValidationError> {
79578		if let Some(ref val) = self.deriv { val.validate()? }
79579		if let Some(ref val) = self.scties_fincg_tx { val.validate()? }
79580		if let Some(ref val) = self.scty { val.validate()? }
79581		Ok(())
79582	}
79583}
79584
79585
79586// Product2 ...
79587#[cfg_attr(feature = "derive_debug", derive(Debug))]
79588#[cfg_attr(feature = "derive_default", derive(Default))]
79589#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79590#[cfg_attr(feature = "derive_clone", derive(Clone))]
79591#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79592pub struct Product2 {
79593	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctCd") )]
79594	pub pdct_cd: String,
79595	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitOfMeasr", skip_serializing_if = "Option::is_none") )]
79596	pub unit_of_measr: Option<UnitOfMeasure1Code>,
79597	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctQty", skip_serializing_if = "Option::is_none") )]
79598	pub pdct_qty: Option<f64>,
79599	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitPric", skip_serializing_if = "Option::is_none") )]
79600	pub unit_pric: Option<f64>,
79601	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctAmt", skip_serializing_if = "Option::is_none") )]
79602	pub pdct_amt: Option<f64>,
79603	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxTp", skip_serializing_if = "Option::is_none") )]
79604	pub tax_tp: Option<String>,
79605	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlPdctInf", skip_serializing_if = "Option::is_none") )]
79606	pub addtl_pdct_inf: Option<String>,
79607}
79608
79609impl Product2 {
79610	pub fn validate(&self) -> Result<(), ValidationError> {
79611		if self.pdct_cd.chars().count() < 1 {
79612			return Err(ValidationError::new(1001, "pdct_cd is shorter than the minimum length of 1".to_string()));
79613		}
79614		if self.pdct_cd.chars().count() > 70 {
79615			return Err(ValidationError::new(1002, "pdct_cd exceeds the maximum length of 70".to_string()));
79616		}
79617		if let Some(ref val) = self.unit_of_measr { val.validate()? }
79618		if let Some(ref val) = self.tax_tp {
79619			if val.chars().count() < 1 {
79620				return Err(ValidationError::new(1001, "tax_tp is shorter than the minimum length of 1".to_string()));
79621			}
79622			if val.chars().count() > 35 {
79623				return Err(ValidationError::new(1002, "tax_tp exceeds the maximum length of 35".to_string()));
79624			}
79625		}
79626		if let Some(ref val) = self.addtl_pdct_inf {
79627			if val.chars().count() < 1 {
79628				return Err(ValidationError::new(1001, "addtl_pdct_inf is shorter than the minimum length of 1".to_string()));
79629			}
79630			if val.chars().count() > 35 {
79631				return Err(ValidationError::new(1002, "addtl_pdct_inf exceeds the maximum length of 35".to_string()));
79632			}
79633		}
79634		Ok(())
79635	}
79636}
79637
79638
79639// ProductClassification1 ...
79640#[cfg_attr(feature = "derive_debug", derive(Debug))]
79641#[cfg_attr(feature = "derive_default", derive(Default))]
79642#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79643#[cfg_attr(feature = "derive_clone", derive(Clone))]
79644#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79645pub struct ProductClassification1 {
79646	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstClss") )]
79647	pub asst_clss: String,
79648	#[cfg_attr( feature = "derive_serde", serde(rename = "BasePdct", skip_serializing_if = "Option::is_none") )]
79649	pub base_pdct: Option<String>,
79650	#[cfg_attr( feature = "derive_serde", serde(rename = "SubPdct", skip_serializing_if = "Option::is_none") )]
79651	pub sub_pdct: Option<String>,
79652	#[cfg_attr( feature = "derive_serde", serde(rename = "SubCmmdty", skip_serializing_if = "Option::is_none") )]
79653	pub sub_cmmdty: Option<String>,
79654	#[cfg_attr( feature = "derive_serde", serde(rename = "TxTp", skip_serializing_if = "Option::is_none") )]
79655	pub tx_tp: Option<String>,
79656}
79657
79658impl ProductClassification1 {
79659	pub fn validate(&self) -> Result<(), ValidationError> {
79660		if self.asst_clss.chars().count() < 1 {
79661			return Err(ValidationError::new(1001, "asst_clss is shorter than the minimum length of 1".to_string()));
79662		}
79663		if self.asst_clss.chars().count() > 35 {
79664			return Err(ValidationError::new(1002, "asst_clss exceeds the maximum length of 35".to_string()));
79665		}
79666		if let Some(ref val) = self.base_pdct {
79667			if val.chars().count() < 1 {
79668				return Err(ValidationError::new(1001, "base_pdct is shorter than the minimum length of 1".to_string()));
79669			}
79670			if val.chars().count() > 35 {
79671				return Err(ValidationError::new(1002, "base_pdct exceeds the maximum length of 35".to_string()));
79672			}
79673		}
79674		if let Some(ref val) = self.sub_pdct {
79675			if val.chars().count() < 1 {
79676				return Err(ValidationError::new(1001, "sub_pdct is shorter than the minimum length of 1".to_string()));
79677			}
79678			if val.chars().count() > 35 {
79679				return Err(ValidationError::new(1002, "sub_pdct exceeds the maximum length of 35".to_string()));
79680			}
79681		}
79682		if let Some(ref val) = self.sub_cmmdty {
79683			if val.chars().count() < 1 {
79684				return Err(ValidationError::new(1001, "sub_cmmdty is shorter than the minimum length of 1".to_string()));
79685			}
79686			if val.chars().count() > 35 {
79687				return Err(ValidationError::new(1002, "sub_cmmdty exceeds the maximum length of 35".to_string()));
79688			}
79689		}
79690		if let Some(ref val) = self.tx_tp {
79691			if val.chars().count() < 1 {
79692				return Err(ValidationError::new(1001, "tx_tp is shorter than the minimum length of 1".to_string()));
79693			}
79694			if val.chars().count() > 35 {
79695				return Err(ValidationError::new(1002, "tx_tp exceeds the maximum length of 35".to_string()));
79696			}
79697		}
79698		Ok(())
79699	}
79700}
79701
79702
79703// ProductClassificationCriteria1 ...
79704#[cfg_attr(feature = "derive_debug", derive(Debug))]
79705#[cfg_attr(feature = "derive_default", derive(Default))]
79706#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79707#[cfg_attr(feature = "derive_clone", derive(Clone))]
79708#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79709pub struct ProductClassificationCriteria1 {
79710	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnFinInstrm", skip_serializing_if = "Option::is_none") )]
79711	pub clssfctn_fin_instrm: Option<Vec<String>>,
79712	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqPdctIdr", skip_serializing_if = "Option::is_none") )]
79713	pub unq_pdct_idr: Option<Vec<String>>,
79714}
79715
79716impl ProductClassificationCriteria1 {
79717	pub fn validate(&self) -> Result<(), ValidationError> {
79718		if let Some(ref vec) = self.clssfctn_fin_instrm {
79719			for item in vec {
79720				let pattern = Regex::new("[A-Z]{6,6}").unwrap();
79721				if !pattern.is_match(&item) {
79722					return Err(ValidationError::new(1005, "clssfctn_fin_instrm does not match the required pattern".to_string()));
79723				}
79724			}
79725		}
79726		if let Some(ref vec) = self.unq_pdct_idr {
79727			for item in vec {
79728				if item.chars().count() < 1 {
79729					return Err(ValidationError::new(1001, "unq_pdct_idr is shorter than the minimum length of 1".to_string()));
79730				}
79731				if item.chars().count() > 52 {
79732					return Err(ValidationError::new(1002, "unq_pdct_idr exceeds the maximum length of 52".to_string()));
79733				}
79734			}
79735		}
79736		Ok(())
79737	}
79738}
79739
79740
79741// ProductStructure1Choice ...
79742#[cfg_attr(feature = "derive_debug", derive(Debug))]
79743#[cfg_attr(feature = "derive_default", derive(Default))]
79744#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79745#[cfg_attr(feature = "derive_clone", derive(Clone))]
79746#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79747pub struct ProductStructure1Choice {
79748	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
79749	pub cd: Option<ProductStructure1Code>,
79750	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
79751	pub prtry: Option<GenericIdentification47>,
79752}
79753
79754impl ProductStructure1Choice {
79755	pub fn validate(&self) -> Result<(), ValidationError> {
79756		if let Some(ref val) = self.cd { val.validate()? }
79757		if let Some(ref val) = self.prtry { val.validate()? }
79758		Ok(())
79759	}
79760}
79761
79762
79763// ProductStructure1Code ...
79764#[cfg_attr(feature = "derive_debug", derive(Debug))]
79765#[cfg_attr(feature = "derive_default", derive(Default))]
79766#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79767#[cfg_attr(feature = "derive_clone", derive(Clone))]
79768#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79769pub enum ProductStructure1Code {
79770	#[cfg_attr(feature = "derive_default", default)]
79771	#[cfg_attr( feature = "derive_serde", serde(rename = "BOND") )]
79772	CodeBOND,
79773	#[cfg_attr( feature = "derive_serde", serde(rename = "NUMM") )]
79774	CodeNUMM,
79775	#[cfg_attr( feature = "derive_serde", serde(rename = "UCMM") )]
79776	CodeUCMM,
79777	#[cfg_attr( feature = "derive_serde", serde(rename = "EXTC") )]
79778	CodeEXTC,
79779	#[cfg_attr( feature = "derive_serde", serde(rename = "UCIT") )]
79780	CodeUCIT,
79781	#[cfg_attr( feature = "derive_serde", serde(rename = "SSEC") )]
79782	CodeSSEC,
79783	#[cfg_attr( feature = "derive_serde", serde(rename = "SFUN") )]
79784	CodeSFUN,
79785	#[cfg_attr( feature = "derive_serde", serde(rename = "NUCI") )]
79786	CodeNUCI,
79787}
79788
79789impl ProductStructure1Code {
79790	pub fn validate(&self) -> Result<(), ValidationError> {
79791		Ok(())
79792	}
79793}
79794
79795
79796// ProductType4Code ...
79797#[cfg_attr(feature = "derive_debug", derive(Debug))]
79798#[cfg_attr(feature = "derive_default", derive(Default))]
79799#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79800#[cfg_attr(feature = "derive_clone", derive(Clone))]
79801#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79802pub enum ProductType4Code {
79803	#[cfg_attr(feature = "derive_default", default)]
79804	#[cfg_attr( feature = "derive_serde", serde(rename = "CRDT") )]
79805	CodeCRDT,
79806	#[cfg_attr( feature = "derive_serde", serde(rename = "CURR") )]
79807	CodeCURR,
79808	#[cfg_attr( feature = "derive_serde", serde(rename = "EQUI") )]
79809	CodeEQUI,
79810	#[cfg_attr( feature = "derive_serde", serde(rename = "INTR") )]
79811	CodeINTR,
79812	#[cfg_attr( feature = "derive_serde", serde(rename = "COMM") )]
79813	CodeCOMM,
79814	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
79815	CodeOTHR,
79816}
79817
79818impl ProductType4Code {
79819	pub fn validate(&self) -> Result<(), ValidationError> {
79820		Ok(())
79821	}
79822}
79823
79824
79825// ProductType6Code ...
79826#[cfg_attr(feature = "derive_debug", derive(Debug))]
79827#[cfg_attr(feature = "derive_default", derive(Default))]
79828#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79829#[cfg_attr(feature = "derive_clone", derive(Clone))]
79830#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79831pub enum ProductType6Code {
79832	#[cfg_attr(feature = "derive_default", default)]
79833	#[cfg_attr( feature = "derive_serde", serde(rename = "BOND") )]
79834	CodeBOND,
79835	#[cfg_attr( feature = "derive_serde", serde(rename = "CASH") )]
79836	CodeCASH,
79837	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
79838	CodeOTHR,
79839	#[cfg_attr( feature = "derive_serde", serde(rename = "EQUI") )]
79840	CodeEQUI,
79841}
79842
79843impl ProductType6Code {
79844	pub fn validate(&self) -> Result<(), ValidationError> {
79845		Ok(())
79846	}
79847}
79848
79849
79850// ProductType7Code ...
79851#[cfg_attr(feature = "derive_debug", derive(Debug))]
79852#[cfg_attr(feature = "derive_default", derive(Default))]
79853#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79854#[cfg_attr(feature = "derive_clone", derive(Clone))]
79855#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79856pub enum ProductType7Code {
79857	#[cfg_attr(feature = "derive_default", default)]
79858	#[cfg_attr( feature = "derive_serde", serde(rename = "SVGN") )]
79859	CodeSVGN,
79860	#[cfg_attr( feature = "derive_serde", serde(rename = "EQUI") )]
79861	CodeEQUI,
79862	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
79863	CodeOTHR,
79864}
79865
79866impl ProductType7Code {
79867	pub fn validate(&self) -> Result<(), ValidationError> {
79868		Ok(())
79869	}
79870}
79871
79872
79873// ProfileType1Choice ...
79874#[cfg_attr(feature = "derive_debug", derive(Debug))]
79875#[cfg_attr(feature = "derive_default", derive(Default))]
79876#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79877#[cfg_attr(feature = "derive_clone", derive(Clone))]
79878#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79879pub struct ProfileType1Choice {
79880	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
79881	pub cd: Option<ProfileType1Code>,
79882	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
79883	pub prtry: Option<GenericIdentification47>,
79884}
79885
79886impl ProfileType1Choice {
79887	pub fn validate(&self) -> Result<(), ValidationError> {
79888		if let Some(ref val) = self.cd { val.validate()? }
79889		if let Some(ref val) = self.prtry { val.validate()? }
79890		Ok(())
79891	}
79892}
79893
79894
79895// ProfileType1Code ...
79896#[cfg_attr(feature = "derive_debug", derive(Debug))]
79897#[cfg_attr(feature = "derive_default", derive(Default))]
79898#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79899#[cfg_attr(feature = "derive_clone", derive(Clone))]
79900#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79901pub enum ProfileType1Code {
79902	#[cfg_attr(feature = "derive_default", default)]
79903	#[cfg_attr( feature = "derive_serde", serde(rename = "HEDG") )]
79904	CodeHEDG,
79905	#[cfg_attr( feature = "derive_serde", serde(rename = "HFTR") )]
79906	CodeHFTR,
79907	#[cfg_attr( feature = "derive_serde", serde(rename = "MAKE") )]
79908	CodeMAKE,
79909	#[cfg_attr( feature = "derive_serde", serde(rename = "TREA") )]
79910	CodeTREA,
79911}
79912
79913impl ProfileType1Code {
79914	pub fn validate(&self) -> Result<(), ValidationError> {
79915		Ok(())
79916	}
79917}
79918
79919
79920// ProformaStatusReason1 ...
79921#[cfg_attr(feature = "derive_debug", derive(Debug))]
79922#[cfg_attr(feature = "derive_default", derive(Default))]
79923#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79924#[cfg_attr(feature = "derive_clone", derive(Clone))]
79925#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79926pub struct ProformaStatusReason1 {
79927	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
79928	pub cd: ProformaStatusReason2Choice,
79929	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
79930	pub addtl_inf: Option<String>,
79931}
79932
79933impl ProformaStatusReason1 {
79934	pub fn validate(&self) -> Result<(), ValidationError> {
79935		self.cd.validate()?;
79936		if let Some(ref val) = self.addtl_inf {
79937			if val.chars().count() < 1 {
79938				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
79939			}
79940			if val.chars().count() > 350 {
79941				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 350".to_string()));
79942			}
79943		}
79944		Ok(())
79945	}
79946}
79947
79948
79949// ProformaStatusReason1Choice ...
79950#[cfg_attr(feature = "derive_debug", derive(Debug))]
79951#[cfg_attr(feature = "derive_default", derive(Default))]
79952#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79953#[cfg_attr(feature = "derive_clone", derive(Clone))]
79954#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79955pub struct ProformaStatusReason1Choice {
79956	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
79957	pub no_spcfd_rsn: Option<NoReasonCode>,
79958	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
79959	pub rsn: Option<Vec<ProformaStatusReason1>>,
79960}
79961
79962impl ProformaStatusReason1Choice {
79963	pub fn validate(&self) -> Result<(), ValidationError> {
79964		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
79965		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
79966		Ok(())
79967	}
79968}
79969
79970
79971// ProformaStatusReason1Code ...
79972#[cfg_attr(feature = "derive_debug", derive(Debug))]
79973#[cfg_attr(feature = "derive_default", derive(Default))]
79974#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79975#[cfg_attr(feature = "derive_clone", derive(Clone))]
79976#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79977pub enum ProformaStatusReason1Code {
79978	#[cfg_attr(feature = "derive_default", default)]
79979	#[cfg_attr( feature = "derive_serde", serde(rename = "MODI") )]
79980	CodeMODI,
79981	#[cfg_attr( feature = "derive_serde", serde(rename = "RIGH") )]
79982	CodeRIGH,
79983}
79984
79985impl ProformaStatusReason1Code {
79986	pub fn validate(&self) -> Result<(), ValidationError> {
79987		Ok(())
79988	}
79989}
79990
79991
79992// ProformaStatusReason2Choice ...
79993#[cfg_attr(feature = "derive_debug", derive(Debug))]
79994#[cfg_attr(feature = "derive_default", derive(Default))]
79995#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
79996#[cfg_attr(feature = "derive_clone", derive(Clone))]
79997#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
79998pub struct ProformaStatusReason2Choice {
79999	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
80000	pub cd: Option<ProformaStatusReason1Code>,
80001	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
80002	pub prtry: Option<GenericIdentification36>,
80003}
80004
80005impl ProformaStatusReason2Choice {
80006	pub fn validate(&self) -> Result<(), ValidationError> {
80007		if let Some(ref val) = self.cd { val.validate()? }
80008		if let Some(ref val) = self.prtry { val.validate()? }
80009		Ok(())
80010	}
80011}
80012
80013
80014// ProprietaryAgent5 ...
80015#[cfg_attr(feature = "derive_debug", derive(Debug))]
80016#[cfg_attr(feature = "derive_default", derive(Default))]
80017#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80018#[cfg_attr(feature = "derive_clone", derive(Clone))]
80019#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80020pub struct ProprietaryAgent5 {
80021	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
80022	pub tp: String,
80023	#[cfg_attr( feature = "derive_serde", serde(rename = "Agt") )]
80024	pub agt: BranchAndFinancialInstitutionIdentification8,
80025}
80026
80027impl ProprietaryAgent5 {
80028	pub fn validate(&self) -> Result<(), ValidationError> {
80029		if self.tp.chars().count() < 1 {
80030			return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
80031		}
80032		if self.tp.chars().count() > 35 {
80033			return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
80034		}
80035		self.agt.validate()?;
80036		Ok(())
80037	}
80038}
80039
80040
80041// ProprietaryBankTransactionCodeStructure1 ...
80042#[cfg_attr(feature = "derive_debug", derive(Debug))]
80043#[cfg_attr(feature = "derive_default", derive(Default))]
80044#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80045#[cfg_attr(feature = "derive_clone", derive(Clone))]
80046#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80047pub struct ProprietaryBankTransactionCodeStructure1 {
80048	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
80049	pub cd: String,
80050	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
80051	pub issr: Option<String>,
80052}
80053
80054impl ProprietaryBankTransactionCodeStructure1 {
80055	pub fn validate(&self) -> Result<(), ValidationError> {
80056		if self.cd.chars().count() < 1 {
80057			return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
80058		}
80059		if self.cd.chars().count() > 35 {
80060			return Err(ValidationError::new(1002, "cd exceeds the maximum length of 35".to_string()));
80061		}
80062		if let Some(ref val) = self.issr {
80063			if val.chars().count() < 1 {
80064				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
80065			}
80066			if val.chars().count() > 35 {
80067				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
80068			}
80069		}
80070		Ok(())
80071	}
80072}
80073
80074
80075// ProprietaryData6 ...
80076#[cfg_attr(feature = "derive_debug", derive(Debug))]
80077#[cfg_attr(feature = "derive_default", derive(Default))]
80078#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80079#[cfg_attr(feature = "derive_clone", derive(Clone))]
80080#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80081pub struct ProprietaryData6 {
80082	#[cfg_attr( feature = "derive_serde", serde(rename = "Any") )]
80083	pub any: SkipPayload,
80084}
80085
80086impl ProprietaryData6 {
80087	pub fn validate(&self) -> Result<(), ValidationError> {
80088		self.any.validate()?;
80089		Ok(())
80090	}
80091}
80092
80093
80094// ProprietaryData7 ...
80095#[cfg_attr(feature = "derive_debug", derive(Debug))]
80096#[cfg_attr(feature = "derive_default", derive(Default))]
80097#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80098#[cfg_attr(feature = "derive_clone", derive(Clone))]
80099#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80100pub struct ProprietaryData7 {
80101	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
80102	pub tp: String,
80103	#[cfg_attr( feature = "derive_serde", serde(rename = "Data") )]
80104	pub data: ProprietaryData6,
80105}
80106
80107impl ProprietaryData7 {
80108	pub fn validate(&self) -> Result<(), ValidationError> {
80109		if self.tp.chars().count() < 1 {
80110			return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
80111		}
80112		if self.tp.chars().count() > 35 {
80113			return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
80114		}
80115		self.data.validate()?;
80116		Ok(())
80117	}
80118}
80119
80120
80121// ProprietaryDate3 ...
80122#[cfg_attr(feature = "derive_debug", derive(Debug))]
80123#[cfg_attr(feature = "derive_default", derive(Default))]
80124#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80125#[cfg_attr(feature = "derive_clone", derive(Clone))]
80126#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80127pub struct ProprietaryDate3 {
80128	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
80129	pub tp: String,
80130	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt") )]
80131	pub dt: DateAndDateTime2Choice,
80132}
80133
80134impl ProprietaryDate3 {
80135	pub fn validate(&self) -> Result<(), ValidationError> {
80136		if self.tp.chars().count() < 1 {
80137			return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
80138		}
80139		if self.tp.chars().count() > 35 {
80140			return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
80141		}
80142		self.dt.validate()?;
80143		Ok(())
80144	}
80145}
80146
80147
80148// ProprietaryParty6 ...
80149#[cfg_attr(feature = "derive_debug", derive(Debug))]
80150#[cfg_attr(feature = "derive_default", derive(Default))]
80151#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80152#[cfg_attr(feature = "derive_clone", derive(Clone))]
80153#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80154pub struct ProprietaryParty6 {
80155	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
80156	pub tp: String,
80157	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty") )]
80158	pub pty: Party50Choice,
80159}
80160
80161impl ProprietaryParty6 {
80162	pub fn validate(&self) -> Result<(), ValidationError> {
80163		if self.tp.chars().count() < 1 {
80164			return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
80165		}
80166		if self.tp.chars().count() > 35 {
80167			return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
80168		}
80169		self.pty.validate()?;
80170		Ok(())
80171	}
80172}
80173
80174
80175// ProprietaryPrice2 ...
80176#[cfg_attr(feature = "derive_debug", derive(Debug))]
80177#[cfg_attr(feature = "derive_default", derive(Default))]
80178#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80179#[cfg_attr(feature = "derive_clone", derive(Clone))]
80180#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80181pub struct ProprietaryPrice2 {
80182	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
80183	pub tp: String,
80184	#[cfg_attr( feature = "derive_serde", serde(rename = "Pric") )]
80185	pub pric: ActiveOrHistoricCurrencyAndAmount,
80186}
80187
80188impl ProprietaryPrice2 {
80189	pub fn validate(&self) -> Result<(), ValidationError> {
80190		if self.tp.chars().count() < 1 {
80191			return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
80192		}
80193		if self.tp.chars().count() > 35 {
80194			return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
80195		}
80196		self.pric.validate()?;
80197		Ok(())
80198	}
80199}
80200
80201
80202// ProprietaryQuantity1 ...
80203#[cfg_attr(feature = "derive_debug", derive(Debug))]
80204#[cfg_attr(feature = "derive_default", derive(Default))]
80205#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80206#[cfg_attr(feature = "derive_clone", derive(Clone))]
80207#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80208pub struct ProprietaryQuantity1 {
80209	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
80210	pub tp: String,
80211	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty") )]
80212	pub qty: String,
80213}
80214
80215impl ProprietaryQuantity1 {
80216	pub fn validate(&self) -> Result<(), ValidationError> {
80217		if self.tp.chars().count() < 1 {
80218			return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
80219		}
80220		if self.tp.chars().count() > 35 {
80221			return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
80222		}
80223		if self.qty.chars().count() < 1 {
80224			return Err(ValidationError::new(1001, "qty is shorter than the minimum length of 1".to_string()));
80225		}
80226		if self.qty.chars().count() > 35 {
80227			return Err(ValidationError::new(1002, "qty exceeds the maximum length of 35".to_string()));
80228		}
80229		Ok(())
80230	}
80231}
80232
80233
80234// ProprietaryReason1Choice ...
80235#[cfg_attr(feature = "derive_debug", derive(Debug))]
80236#[cfg_attr(feature = "derive_default", derive(Default))]
80237#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80238#[cfg_attr(feature = "derive_clone", derive(Clone))]
80239#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80240pub struct ProprietaryReason1Choice {
80241	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
80242	pub no_spcfd_rsn: Option<NoReasonCode>,
80243	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
80244	pub rsn: Option<Vec<GenericIdentification36>>,
80245}
80246
80247impl ProprietaryReason1Choice {
80248	pub fn validate(&self) -> Result<(), ValidationError> {
80249		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
80250		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
80251		Ok(())
80252	}
80253}
80254
80255
80256// ProprietaryReason4 ...
80257#[cfg_attr(feature = "derive_debug", derive(Debug))]
80258#[cfg_attr(feature = "derive_default", derive(Default))]
80259#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80260#[cfg_attr(feature = "derive_clone", derive(Clone))]
80261#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80262pub struct ProprietaryReason4 {
80263	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
80264	pub rsn: Option<GenericIdentification30>,
80265	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
80266	pub addtl_rsn_inf: Option<String>,
80267}
80268
80269impl ProprietaryReason4 {
80270	pub fn validate(&self) -> Result<(), ValidationError> {
80271		if let Some(ref val) = self.rsn { val.validate()? }
80272		if let Some(ref val) = self.addtl_rsn_inf {
80273			if val.chars().count() < 1 {
80274				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
80275			}
80276			if val.chars().count() > 210 {
80277				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
80278			}
80279		}
80280		Ok(())
80281	}
80282}
80283
80284
80285// ProprietaryReference1 ...
80286#[cfg_attr(feature = "derive_debug", derive(Debug))]
80287#[cfg_attr(feature = "derive_default", derive(Default))]
80288#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80289#[cfg_attr(feature = "derive_clone", derive(Clone))]
80290#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80291pub struct ProprietaryReference1 {
80292	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
80293	pub tp: String,
80294	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref") )]
80295	pub ref_attr: String,
80296}
80297
80298impl ProprietaryReference1 {
80299	pub fn validate(&self) -> Result<(), ValidationError> {
80300		if self.tp.chars().count() < 1 {
80301			return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
80302		}
80303		if self.tp.chars().count() > 35 {
80304			return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
80305		}
80306		if self.ref_attr.chars().count() < 1 {
80307			return Err(ValidationError::new(1001, "ref_attr is shorter than the minimum length of 1".to_string()));
80308		}
80309		if self.ref_attr.chars().count() > 35 {
80310			return Err(ValidationError::new(1002, "ref_attr exceeds the maximum length of 35".to_string()));
80311		}
80312		Ok(())
80313	}
80314}
80315
80316
80317// ProprietaryStatusAndReason5 ...
80318#[cfg_attr(feature = "derive_debug", derive(Debug))]
80319#[cfg_attr(feature = "derive_default", derive(Default))]
80320#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80321#[cfg_attr(feature = "derive_clone", derive(Clone))]
80322#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80323pub struct ProprietaryStatusAndReason5 {
80324	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
80325	pub sts: GenericIdentification36,
80326	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
80327	pub rsn: ProprietaryReason1Choice,
80328	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
80329	pub addtl_rsn_inf: Option<String>,
80330}
80331
80332impl ProprietaryStatusAndReason5 {
80333	pub fn validate(&self) -> Result<(), ValidationError> {
80334		self.sts.validate()?;
80335		self.rsn.validate()?;
80336		if let Some(ref val) = self.addtl_rsn_inf {
80337			if val.chars().count() < 1 {
80338				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
80339			}
80340			if val.chars().count() > 210 {
80341				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
80342			}
80343		}
80344		Ok(())
80345	}
80346}
80347
80348
80349// ProprietaryStatusAndReason6 ...
80350#[cfg_attr(feature = "derive_debug", derive(Debug))]
80351#[cfg_attr(feature = "derive_default", derive(Default))]
80352#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80353#[cfg_attr(feature = "derive_clone", derive(Clone))]
80354#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80355pub struct ProprietaryStatusAndReason6 {
80356	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtrySts") )]
80357	pub prtry_sts: GenericIdentification30,
80358	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryRsn", skip_serializing_if = "Option::is_none") )]
80359	pub prtry_rsn: Option<Vec<ProprietaryReason4>>,
80360}
80361
80362impl ProprietaryStatusAndReason6 {
80363	pub fn validate(&self) -> Result<(), ValidationError> {
80364		self.prtry_sts.validate()?;
80365		if let Some(ref vec) = self.prtry_rsn { for item in vec { item.validate()? } }
80366		Ok(())
80367	}
80368}
80369
80370
80371// ProprietaryStatusJustification2 ...
80372#[cfg_attr(feature = "derive_debug", derive(Debug))]
80373#[cfg_attr(feature = "derive_default", derive(Default))]
80374#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80375#[cfg_attr(feature = "derive_clone", derive(Clone))]
80376#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80377pub struct ProprietaryStatusJustification2 {
80378	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryStsRsn") )]
80379	pub prtry_sts_rsn: String,
80380	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
80381	pub rsn: String,
80382}
80383
80384impl ProprietaryStatusJustification2 {
80385	pub fn validate(&self) -> Result<(), ValidationError> {
80386		if self.prtry_sts_rsn.chars().count() < 1 {
80387			return Err(ValidationError::new(1001, "prtry_sts_rsn is shorter than the minimum length of 1".to_string()));
80388		}
80389		if self.prtry_sts_rsn.chars().count() > 4 {
80390			return Err(ValidationError::new(1002, "prtry_sts_rsn exceeds the maximum length of 4".to_string()));
80391		}
80392		let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
80393		if !pattern.is_match(&self.prtry_sts_rsn) {
80394			return Err(ValidationError::new(1005, "prtry_sts_rsn does not match the required pattern".to_string()));
80395		}
80396		if self.rsn.chars().count() < 1 {
80397			return Err(ValidationError::new(1001, "rsn is shorter than the minimum length of 1".to_string()));
80398		}
80399		if self.rsn.chars().count() > 256 {
80400			return Err(ValidationError::new(1002, "rsn exceeds the maximum length of 256".to_string()));
80401		}
80402		Ok(())
80403	}
80404}
80405
80406
80407// Provided1Code ...
80408#[cfg_attr(feature = "derive_debug", derive(Debug))]
80409#[cfg_attr(feature = "derive_default", derive(Default))]
80410#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80411#[cfg_attr(feature = "derive_clone", derive(Clone))]
80412#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80413pub enum Provided1Code {
80414	#[cfg_attr(feature = "derive_default", default)]
80415	#[cfg_attr( feature = "derive_serde", serde(rename = "NPRO") )]
80416	CodeNPRO,
80417	#[cfg_attr( feature = "derive_serde", serde(rename = "PROV") )]
80418	CodePROV,
80419}
80420
80421impl Provided1Code {
80422	pub fn validate(&self) -> Result<(), ValidationError> {
80423		Ok(())
80424	}
80425}
80426
80427
80428// ProxyAccountIdentification1 ...
80429#[cfg_attr(feature = "derive_debug", derive(Debug))]
80430#[cfg_attr(feature = "derive_default", derive(Default))]
80431#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80432#[cfg_attr(feature = "derive_clone", derive(Clone))]
80433#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80434pub struct ProxyAccountIdentification1 {
80435	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
80436	pub tp: Option<ProxyAccountType1Choice>,
80437	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
80438	pub id: String,
80439}
80440
80441impl ProxyAccountIdentification1 {
80442	pub fn validate(&self) -> Result<(), ValidationError> {
80443		if let Some(ref val) = self.tp { val.validate()? }
80444		if self.id.chars().count() < 1 {
80445			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
80446		}
80447		if self.id.chars().count() > 2048 {
80448			return Err(ValidationError::new(1002, "id exceeds the maximum length of 2048".to_string()));
80449		}
80450		Ok(())
80451	}
80452}
80453
80454
80455// ProxyAccountType1Choice ...
80456#[cfg_attr(feature = "derive_debug", derive(Debug))]
80457#[cfg_attr(feature = "derive_default", derive(Default))]
80458#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80459#[cfg_attr(feature = "derive_clone", derive(Clone))]
80460#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80461pub struct ProxyAccountType1Choice {
80462	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
80463	pub cd: Option<String>,
80464	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
80465	pub prtry: Option<String>,
80466}
80467
80468impl ProxyAccountType1Choice {
80469	pub fn validate(&self) -> Result<(), ValidationError> {
80470		if let Some(ref val) = self.cd {
80471			if val.chars().count() < 1 {
80472				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
80473			}
80474			if val.chars().count() > 4 {
80475				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
80476			}
80477		}
80478		if let Some(ref val) = self.prtry {
80479			if val.chars().count() < 1 {
80480				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
80481			}
80482			if val.chars().count() > 35 {
80483				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
80484			}
80485		}
80486		Ok(())
80487	}
80488}
80489
80490
80491// Purpose2Choice ...
80492#[cfg_attr(feature = "derive_debug", derive(Debug))]
80493#[cfg_attr(feature = "derive_default", derive(Default))]
80494#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80495#[cfg_attr(feature = "derive_clone", derive(Clone))]
80496#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80497pub struct Purpose2Choice {
80498	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
80499	pub cd: Option<String>,
80500	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
80501	pub prtry: Option<String>,
80502}
80503
80504impl Purpose2Choice {
80505	pub fn validate(&self) -> Result<(), ValidationError> {
80506		if let Some(ref val) = self.cd {
80507			if val.chars().count() < 1 {
80508				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
80509			}
80510			if val.chars().count() > 4 {
80511				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
80512			}
80513		}
80514		if let Some(ref val) = self.prtry {
80515			if val.chars().count() < 1 {
80516				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
80517			}
80518			if val.chars().count() > 35 {
80519				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
80520			}
80521		}
80522		Ok(())
80523	}
80524}
80525
80526
80527// Purpose3Choice ...
80528#[cfg_attr(feature = "derive_debug", derive(Debug))]
80529#[cfg_attr(feature = "derive_default", derive(Default))]
80530#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80531#[cfg_attr(feature = "derive_clone", derive(Clone))]
80532#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80533pub struct Purpose3Choice {
80534	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesPurpCd", skip_serializing_if = "Option::is_none") )]
80535	pub scties_purp_cd: Option<String>,
80536	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
80537	pub prtry: Option<GenericIdentification1>,
80538}
80539
80540impl Purpose3Choice {
80541	pub fn validate(&self) -> Result<(), ValidationError> {
80542		if let Some(ref val) = self.scties_purp_cd {
80543			if val.chars().count() < 1 {
80544				return Err(ValidationError::new(1001, "scties_purp_cd is shorter than the minimum length of 1".to_string()));
80545			}
80546			if val.chars().count() > 4 {
80547				return Err(ValidationError::new(1002, "scties_purp_cd exceeds the maximum length of 4".to_string()));
80548			}
80549		}
80550		if let Some(ref val) = self.prtry { val.validate()? }
80551		Ok(())
80552	}
80553}
80554
80555
80556// PurposeModification1 ...
80557#[cfg_attr(feature = "derive_debug", derive(Debug))]
80558#[cfg_attr(feature = "derive_default", derive(Default))]
80559#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80560#[cfg_attr(feature = "derive_clone", derive(Clone))]
80561#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80562pub struct PurposeModification1 {
80563	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
80564	pub mod_cd: Option<Modification1Code>,
80565	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp") )]
80566	pub purp: String,
80567}
80568
80569impl PurposeModification1 {
80570	pub fn validate(&self) -> Result<(), ValidationError> {
80571		if let Some(ref val) = self.mod_cd { val.validate()? }
80572		if self.purp.chars().count() < 1 {
80573			return Err(ValidationError::new(1001, "purp is shorter than the minimum length of 1".to_string()));
80574		}
80575		if self.purp.chars().count() > 140 {
80576			return Err(ValidationError::new(1002, "purp exceeds the maximum length of 140".to_string()));
80577		}
80578		Ok(())
80579	}
80580}
80581
80582
80583// PutType1Code ...
80584#[cfg_attr(feature = "derive_debug", derive(Debug))]
80585#[cfg_attr(feature = "derive_default", derive(Default))]
80586#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80587#[cfg_attr(feature = "derive_clone", derive(Clone))]
80588#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80589pub enum PutType1Code {
80590	#[cfg_attr(feature = "derive_default", default)]
80591	#[cfg_attr( feature = "derive_serde", serde(rename = "MAND") )]
80592	CodeMAND,
80593	#[cfg_attr( feature = "derive_serde", serde(rename = "OPTI") )]
80594	CodeOPTI,
80595	#[cfg_attr( feature = "derive_serde", serde(rename = "TWOS") )]
80596	CodeTWOS,
80597}
80598
80599impl PutType1Code {
80600	pub fn validate(&self) -> Result<(), ValidationError> {
80601		Ok(())
80602	}
80603}
80604
80605
80606// PutType3Choice ...
80607#[cfg_attr(feature = "derive_debug", derive(Debug))]
80608#[cfg_attr(feature = "derive_default", derive(Default))]
80609#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80610#[cfg_attr(feature = "derive_clone", derive(Clone))]
80611#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80612pub struct PutType3Choice {
80613	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
80614	pub cd: Option<PutType1Code>,
80615	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
80616	pub prtry: Option<GenericIdentification30>,
80617}
80618
80619impl PutType3Choice {
80620	pub fn validate(&self) -> Result<(), ValidationError> {
80621		if let Some(ref val) = self.cd { val.validate()? }
80622		if let Some(ref val) = self.prtry { val.validate()? }
80623		Ok(())
80624	}
80625}
80626
80627
80628// Quantity17 ...
80629#[cfg_attr(feature = "derive_debug", derive(Debug))]
80630#[cfg_attr(feature = "derive_default", derive(Default))]
80631#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80632#[cfg_attr(feature = "derive_clone", derive(Clone))]
80633#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80634pub struct Quantity17 {
80635	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
80636	pub val: f64,
80637	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitOfMeasr") )]
80638	pub unit_of_measr: UnitOfMeasure11Code,
80639}
80640
80641impl Quantity17 {
80642	pub fn validate(&self) -> Result<(), ValidationError> {
80643		self.unit_of_measr.validate()?;
80644		Ok(())
80645	}
80646}
80647
80648
80649// Quantity47Choice ...
80650#[cfg_attr(feature = "derive_debug", derive(Debug))]
80651#[cfg_attr(feature = "derive_default", derive(Default))]
80652#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80653#[cfg_attr(feature = "derive_clone", derive(Clone))]
80654#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80655pub struct Quantity47Choice {
80656	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty", skip_serializing_if = "Option::is_none") )]
80657	pub qty: Option<f64>,
80658	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
80659	pub desc: Option<String>,
80660}
80661
80662impl Quantity47Choice {
80663	pub fn validate(&self) -> Result<(), ValidationError> {
80664		if let Some(ref val) = self.desc {
80665			if val.chars().count() < 1 {
80666				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
80667			}
80668			if val.chars().count() > 52 {
80669				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 52".to_string()));
80670			}
80671		}
80672		Ok(())
80673	}
80674}
80675
80676
80677// QuantityNominalValue2Choice ...
80678#[cfg_attr(feature = "derive_debug", derive(Debug))]
80679#[cfg_attr(feature = "derive_default", derive(Default))]
80680#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80681#[cfg_attr(feature = "derive_clone", derive(Clone))]
80682#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80683pub struct QuantityNominalValue2Choice {
80684	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty", skip_serializing_if = "Option::is_none") )]
80685	pub qty: Option<f64>,
80686	#[cfg_attr( feature = "derive_serde", serde(rename = "NmnlVal", skip_serializing_if = "Option::is_none") )]
80687	pub nmnl_val: Option<AmountAndDirection53>,
80688}
80689
80690impl QuantityNominalValue2Choice {
80691	pub fn validate(&self) -> Result<(), ValidationError> {
80692		if let Some(ref val) = self.nmnl_val { val.validate()? }
80693		Ok(())
80694	}
80695}
80696
80697
80698// QuantityOrTerm1Choice ...
80699#[cfg_attr(feature = "derive_debug", derive(Debug))]
80700#[cfg_attr(feature = "derive_default", derive(Default))]
80701#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80702#[cfg_attr(feature = "derive_clone", derive(Clone))]
80703#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80704pub struct QuantityOrTerm1Choice {
80705	#[cfg_attr( feature = "derive_serde", serde(rename = "SchdlPrd", skip_serializing_if = "Option::is_none") )]
80706	pub schdl_prd: Option<Vec<Schedule10>>,
80707	#[cfg_attr( feature = "derive_serde", serde(rename = "Term", skip_serializing_if = "Option::is_none") )]
80708	pub term: Option<QuantityTerm1>,
80709}
80710
80711impl QuantityOrTerm1Choice {
80712	pub fn validate(&self) -> Result<(), ValidationError> {
80713		if let Some(ref vec) = self.schdl_prd { for item in vec { item.validate()? } }
80714		if let Some(ref val) = self.term { val.validate()? }
80715		Ok(())
80716	}
80717}
80718
80719
80720// QuantityTerm1 ...
80721#[cfg_attr(feature = "derive_debug", derive(Debug))]
80722#[cfg_attr(feature = "derive_default", derive(Default))]
80723#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80724#[cfg_attr(feature = "derive_clone", derive(Clone))]
80725#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80726pub struct QuantityTerm1 {
80727	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty", skip_serializing_if = "Option::is_none") )]
80728	pub qty: Option<f64>,
80729	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitOfMeasr", skip_serializing_if = "Option::is_none") )]
80730	pub unit_of_measr: Option<UnitOfMeasure8Choice>,
80731	#[cfg_attr( feature = "derive_serde", serde(rename = "Val", skip_serializing_if = "Option::is_none") )]
80732	pub val: Option<f64>,
80733	#[cfg_attr( feature = "derive_serde", serde(rename = "TmUnit", skip_serializing_if = "Option::is_none") )]
80734	pub tm_unit: Option<Frequency19Code>,
80735}
80736
80737impl QuantityTerm1 {
80738	pub fn validate(&self) -> Result<(), ValidationError> {
80739		if let Some(ref val) = self.unit_of_measr { val.validate()? }
80740		if let Some(ref val) = self.tm_unit { val.validate()? }
80741		Ok(())
80742	}
80743}
80744
80745
80746// QuantityType1Choice ...
80747#[cfg_attr(feature = "derive_debug", derive(Debug))]
80748#[cfg_attr(feature = "derive_default", derive(Default))]
80749#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80750#[cfg_attr(feature = "derive_clone", derive(Clone))]
80751#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80752pub struct QuantityType1Choice {
80753	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
80754	pub cd: Option<OrderQuantityType2Code>,
80755	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
80756	pub prtry: Option<GenericIdentification47>,
80757}
80758
80759impl QuantityType1Choice {
80760	pub fn validate(&self) -> Result<(), ValidationError> {
80761		if let Some(ref val) = self.cd { val.validate()? }
80762		if let Some(ref val) = self.prtry { val.validate()? }
80763		Ok(())
80764	}
80765}
80766
80767
80768// QueryType2Code ...
80769#[cfg_attr(feature = "derive_debug", derive(Debug))]
80770#[cfg_attr(feature = "derive_default", derive(Default))]
80771#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80772#[cfg_attr(feature = "derive_clone", derive(Clone))]
80773#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80774pub enum QueryType2Code {
80775	#[cfg_attr(feature = "derive_default", default)]
80776	#[cfg_attr( feature = "derive_serde", serde(rename = "ALLL") )]
80777	CodeALLL,
80778	#[cfg_attr( feature = "derive_serde", serde(rename = "CHNG") )]
80779	CodeCHNG,
80780	#[cfg_attr( feature = "derive_serde", serde(rename = "MODF") )]
80781	CodeMODF,
80782	#[cfg_attr( feature = "derive_serde", serde(rename = "DELD") )]
80783	CodeDELD,
80784}
80785
80786impl QueryType2Code {
80787	pub fn validate(&self) -> Result<(), ValidationError> {
80788		Ok(())
80789	}
80790}
80791
80792
80793// QueryType3Code ...
80794#[cfg_attr(feature = "derive_debug", derive(Debug))]
80795#[cfg_attr(feature = "derive_default", derive(Default))]
80796#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80797#[cfg_attr(feature = "derive_clone", derive(Clone))]
80798#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80799pub enum QueryType3Code {
80800	#[cfg_attr(feature = "derive_default", default)]
80801	#[cfg_attr( feature = "derive_serde", serde(rename = "ALLL") )]
80802	CodeALLL,
80803	#[cfg_attr( feature = "derive_serde", serde(rename = "CHNG") )]
80804	CodeCHNG,
80805	#[cfg_attr( feature = "derive_serde", serde(rename = "MODF") )]
80806	CodeMODF,
80807}
80808
80809impl QueryType3Code {
80810	pub fn validate(&self) -> Result<(), ValidationError> {
80811		Ok(())
80812	}
80813}
80814
80815
80816// QueueTransactionIdentification1 ...
80817#[cfg_attr(feature = "derive_debug", derive(Debug))]
80818#[cfg_attr(feature = "derive_default", derive(Default))]
80819#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80820#[cfg_attr(feature = "derive_clone", derive(Clone))]
80821#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80822pub struct QueueTransactionIdentification1 {
80823	#[cfg_attr( feature = "derive_serde", serde(rename = "QId") )]
80824	pub q_id: String,
80825	#[cfg_attr( feature = "derive_serde", serde(rename = "PosInQ") )]
80826	pub pos_in_q: String,
80827}
80828
80829impl QueueTransactionIdentification1 {
80830	pub fn validate(&self) -> Result<(), ValidationError> {
80831		if self.q_id.chars().count() < 1 {
80832			return Err(ValidationError::new(1001, "q_id is shorter than the minimum length of 1".to_string()));
80833		}
80834		if self.q_id.chars().count() > 16 {
80835			return Err(ValidationError::new(1002, "q_id exceeds the maximum length of 16".to_string()));
80836		}
80837		if self.pos_in_q.chars().count() < 1 {
80838			return Err(ValidationError::new(1001, "pos_in_q is shorter than the minimum length of 1".to_string()));
80839		}
80840		if self.pos_in_q.chars().count() > 16 {
80841			return Err(ValidationError::new(1002, "pos_in_q exceeds the maximum length of 16".to_string()));
80842		}
80843		Ok(())
80844	}
80845}
80846
80847
80848// QuotationType1Choice ...
80849#[cfg_attr(feature = "derive_debug", derive(Debug))]
80850#[cfg_attr(feature = "derive_default", derive(Default))]
80851#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80852#[cfg_attr(feature = "derive_clone", derive(Clone))]
80853#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80854pub struct QuotationType1Choice {
80855	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
80856	pub cd: Option<QuotationType1Code>,
80857	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
80858	pub prtry: Option<GenericIdentification47>,
80859}
80860
80861impl QuotationType1Choice {
80862	pub fn validate(&self) -> Result<(), ValidationError> {
80863		if let Some(ref val) = self.cd { val.validate()? }
80864		if let Some(ref val) = self.prtry { val.validate()? }
80865		Ok(())
80866	}
80867}
80868
80869
80870// QuotationType1Code ...
80871#[cfg_attr(feature = "derive_debug", derive(Debug))]
80872#[cfg_attr(feature = "derive_default", derive(Default))]
80873#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80874#[cfg_attr(feature = "derive_clone", derive(Clone))]
80875#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80876pub enum QuotationType1Code {
80877	#[cfg_attr(feature = "derive_default", default)]
80878	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTU") )]
80879	CodeACTU,
80880	#[cfg_attr( feature = "derive_serde", serde(rename = "PRCT") )]
80881	CodePRCT,
80882}
80883
80884impl QuotationType1Code {
80885	pub fn validate(&self) -> Result<(), ValidationError> {
80886		Ok(())
80887	}
80888}
80889
80890
80891// RTPPartyIdentification2 ...
80892#[cfg_attr(feature = "derive_debug", derive(Debug))]
80893#[cfg_attr(feature = "derive_default", derive(Default))]
80894#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80895#[cfg_attr(feature = "derive_clone", derive(Clone))]
80896#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80897pub struct RTPPartyIdentification2 {
80898	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
80899	pub nm: Option<String>,
80900	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
80901	pub pstl_adr: Option<PostalAddress27>,
80902	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
80903	pub id: Option<Party53Choice>,
80904	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfRes", skip_serializing_if = "Option::is_none") )]
80905	pub ctry_of_res: Option<String>,
80906	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctDtls", skip_serializing_if = "Option::is_none") )]
80907	pub ctct_dtls: Option<Contact13>,
80908}
80909
80910impl RTPPartyIdentification2 {
80911	pub fn validate(&self) -> Result<(), ValidationError> {
80912		if let Some(ref val) = self.nm {
80913			if val.chars().count() < 1 {
80914				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
80915			}
80916			if val.chars().count() > 140 {
80917				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
80918			}
80919		}
80920		if let Some(ref val) = self.pstl_adr { val.validate()? }
80921		if let Some(ref val) = self.id { val.validate()? }
80922		if let Some(ref val) = self.ctry_of_res {
80923			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
80924			if !pattern.is_match(val) {
80925				return Err(ValidationError::new(1005, "ctry_of_res does not match the required pattern".to_string()));
80926			}
80927		}
80928		if let Some(ref val) = self.ctct_dtls { val.validate()? }
80929		Ok(())
80930	}
80931}
80932
80933
80934// Rank1Code ...
80935#[cfg_attr(feature = "derive_debug", derive(Debug))]
80936#[cfg_attr(feature = "derive_default", derive(Default))]
80937#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80938#[cfg_attr(feature = "derive_clone", derive(Clone))]
80939#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80940pub enum Rank1Code {
80941	#[cfg_attr(feature = "derive_default", default)]
80942	#[cfg_attr( feature = "derive_serde", serde(rename = "PRIM") )]
80943	CodePRIM,
80944	#[cfg_attr( feature = "derive_serde", serde(rename = "SECO") )]
80945	CodeSECO,
80946}
80947
80948impl Rank1Code {
80949	pub fn validate(&self) -> Result<(), ValidationError> {
80950		Ok(())
80951	}
80952}
80953
80954
80955// Rate4 ...
80956#[cfg_attr(feature = "derive_debug", derive(Debug))]
80957#[cfg_attr(feature = "derive_default", derive(Default))]
80958#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80959#[cfg_attr(feature = "derive_clone", derive(Clone))]
80960#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80961pub struct Rate4 {
80962	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
80963	pub tp: RateType4Choice,
80964	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtyRg", skip_serializing_if = "Option::is_none") )]
80965	pub vldty_rg: Option<ActiveOrHistoricCurrencyAndAmountRange2>,
80966}
80967
80968impl Rate4 {
80969	pub fn validate(&self) -> Result<(), ValidationError> {
80970		self.tp.validate()?;
80971		if let Some(ref val) = self.vldty_rg { val.validate()? }
80972		Ok(())
80973	}
80974}
80975
80976
80977// RateAdjustment1 ...
80978#[cfg_attr(feature = "derive_debug", derive(Debug))]
80979#[cfg_attr(feature = "derive_default", derive(Default))]
80980#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
80981#[cfg_attr(feature = "derive_clone", derive(Clone))]
80982#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
80983pub struct RateAdjustment1 {
80984	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate") )]
80985	pub rate: f64,
80986	#[cfg_attr( feature = "derive_serde", serde(rename = "AdjstmntDt") )]
80987	pub adjstmnt_dt: String,
80988}
80989
80990impl RateAdjustment1 {
80991	pub fn validate(&self) -> Result<(), ValidationError> {
80992		Ok(())
80993	}
80994}
80995
80996
80997// RateAndAmountFormat1Choice ...
80998#[cfg_attr(feature = "derive_debug", derive(Debug))]
80999#[cfg_attr(feature = "derive_default", derive(Default))]
81000#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81001#[cfg_attr(feature = "derive_clone", derive(Clone))]
81002#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81003pub struct RateAndAmountFormat1Choice {
81004	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
81005	pub rate: Option<f64>,
81006	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
81007	pub amt: Option<ActiveCurrencyAndAmount>,
81008	#[cfg_attr( feature = "derive_serde", serde(rename = "NotSpcfdRate", skip_serializing_if = "Option::is_none") )]
81009	pub not_spcfd_rate: Option<RateType12FormatChoice>,
81010}
81011
81012impl RateAndAmountFormat1Choice {
81013	pub fn validate(&self) -> Result<(), ValidationError> {
81014		if let Some(ref val) = self.amt { val.validate()? }
81015		if let Some(ref val) = self.not_spcfd_rate { val.validate()? }
81016		Ok(())
81017	}
81018}
81019
81020
81021// RateBasis1Code ...
81022#[cfg_attr(feature = "derive_debug", derive(Debug))]
81023#[cfg_attr(feature = "derive_default", derive(Default))]
81024#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81025#[cfg_attr(feature = "derive_clone", derive(Clone))]
81026#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81027pub enum RateBasis1Code {
81028	#[cfg_attr(feature = "derive_default", default)]
81029	#[cfg_attr( feature = "derive_serde", serde(rename = "DAYS") )]
81030	CodeDAYS,
81031	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
81032	CodeMNTH,
81033	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
81034	CodeWEEK,
81035	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
81036	CodeYEAR,
81037}
81038
81039impl RateBasis1Code {
81040	pub fn validate(&self) -> Result<(), ValidationError> {
81041		Ok(())
81042	}
81043}
81044
81045
81046// RateOrAbsoluteValue1Choice ...
81047#[cfg_attr(feature = "derive_debug", derive(Debug))]
81048#[cfg_attr(feature = "derive_default", derive(Default))]
81049#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81050#[cfg_attr(feature = "derive_clone", derive(Clone))]
81051#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81052pub struct RateOrAbsoluteValue1Choice {
81053	#[cfg_attr( feature = "derive_serde", serde(rename = "RateVal", skip_serializing_if = "Option::is_none") )]
81054	pub rate_val: Option<f64>,
81055	#[cfg_attr( feature = "derive_serde", serde(rename = "AbsVal", skip_serializing_if = "Option::is_none") )]
81056	pub abs_val: Option<f64>,
81057}
81058
81059impl RateOrAbsoluteValue1Choice {
81060	pub fn validate(&self) -> Result<(), ValidationError> {
81061		Ok(())
81062	}
81063}
81064
81065
81066// RateType12Code ...
81067#[cfg_attr(feature = "derive_debug", derive(Debug))]
81068#[cfg_attr(feature = "derive_default", derive(Default))]
81069#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81070#[cfg_attr(feature = "derive_clone", derive(Clone))]
81071#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81072pub enum RateType12Code {
81073	#[cfg_attr(feature = "derive_default", default)]
81074	#[cfg_attr( feature = "derive_serde", serde(rename = "OPEN") )]
81075	CodeOPEN,
81076	#[cfg_attr( feature = "derive_serde", serde(rename = "UKWN") )]
81077	CodeUKWN,
81078	#[cfg_attr( feature = "derive_serde", serde(rename = "NILP") )]
81079	CodeNILP,
81080}
81081
81082impl RateType12Code {
81083	pub fn validate(&self) -> Result<(), ValidationError> {
81084		Ok(())
81085	}
81086}
81087
81088
81089// RateType12FormatChoice ...
81090#[cfg_attr(feature = "derive_debug", derive(Debug))]
81091#[cfg_attr(feature = "derive_default", derive(Default))]
81092#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81093#[cfg_attr(feature = "derive_clone", derive(Clone))]
81094#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81095pub struct RateType12FormatChoice {
81096	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
81097	pub cd: Option<RateType12Code>,
81098	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
81099	pub prtry: Option<GenericIdentification13>,
81100}
81101
81102impl RateType12FormatChoice {
81103	pub fn validate(&self) -> Result<(), ValidationError> {
81104		if let Some(ref val) = self.cd { val.validate()? }
81105		if let Some(ref val) = self.prtry { val.validate()? }
81106		Ok(())
81107	}
81108}
81109
81110
81111// RateType4Choice ...
81112#[cfg_attr(feature = "derive_debug", derive(Debug))]
81113#[cfg_attr(feature = "derive_default", derive(Default))]
81114#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81115#[cfg_attr(feature = "derive_clone", derive(Clone))]
81116#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81117pub struct RateType4Choice {
81118	#[cfg_attr( feature = "derive_serde", serde(rename = "Pctg", skip_serializing_if = "Option::is_none") )]
81119	pub pctg: Option<f64>,
81120	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
81121	pub othr: Option<String>,
81122}
81123
81124impl RateType4Choice {
81125	pub fn validate(&self) -> Result<(), ValidationError> {
81126		if let Some(ref val) = self.othr {
81127			if val.chars().count() < 1 {
81128				return Err(ValidationError::new(1001, "othr is shorter than the minimum length of 1".to_string()));
81129			}
81130			if val.chars().count() > 35 {
81131				return Err(ValidationError::new(1002, "othr exceeds the maximum length of 35".to_string()));
81132			}
81133		}
81134		Ok(())
81135	}
81136}
81137
81138
81139// Rates1Choice ...
81140#[cfg_attr(feature = "derive_debug", derive(Debug))]
81141#[cfg_attr(feature = "derive_default", derive(Default))]
81142#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81143#[cfg_attr(feature = "derive_clone", derive(Clone))]
81144#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81145pub struct Rates1Choice {
81146	#[cfg_attr( feature = "derive_serde", serde(rename = "Fxd", skip_serializing_if = "Option::is_none") )]
81147	pub fxd: Option<NoReasonCode>,
81148	#[cfg_attr( feature = "derive_serde", serde(rename = "Fltg", skip_serializing_if = "Option::is_none") )]
81149	pub fltg: Option<String>,
81150}
81151
81152impl Rates1Choice {
81153	pub fn validate(&self) -> Result<(), ValidationError> {
81154		if let Some(ref val) = self.fxd { val.validate()? }
81155		if let Some(ref val) = self.fltg {
81156			if val.chars().count() < 1 {
81157				return Err(ValidationError::new(1001, "fltg is shorter than the minimum length of 1".to_string()));
81158			}
81159			if val.chars().count() > 4 {
81160				return Err(ValidationError::new(1002, "fltg exceeds the maximum length of 4".to_string()));
81161			}
81162		}
81163		Ok(())
81164	}
81165}
81166
81167
81168// Rates3 ...
81169#[cfg_attr(feature = "derive_debug", derive(Debug))]
81170#[cfg_attr(feature = "derive_default", derive(Default))]
81171#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81172#[cfg_attr(feature = "derive_clone", derive(Clone))]
81173#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81174pub struct Rates3 {
81175	#[cfg_attr( feature = "derive_serde", serde(rename = "Fxd", skip_serializing_if = "Option::is_none") )]
81176	pub fxd: Option<f64>,
81177	#[cfg_attr( feature = "derive_serde", serde(rename = "Fltg", skip_serializing_if = "Option::is_none") )]
81178	pub fltg: Option<f64>,
81179	#[cfg_attr( feature = "derive_serde", serde(rename = "BuySellBck", skip_serializing_if = "Option::is_none") )]
81180	pub buy_sell_bck: Option<SecuritiesTransactionPrice18Choice>,
81181}
81182
81183impl Rates3 {
81184	pub fn validate(&self) -> Result<(), ValidationError> {
81185		if let Some(ref val) = self.buy_sell_bck { val.validate()? }
81186		Ok(())
81187	}
81188}
81189
81190
81191// Reason18Choice ...
81192#[cfg_attr(feature = "derive_debug", derive(Debug))]
81193#[cfg_attr(feature = "derive_default", derive(Default))]
81194#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81195#[cfg_attr(feature = "derive_clone", derive(Clone))]
81196#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81197pub struct Reason18Choice {
81198	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
81199	pub rsn: Option<Vec<ProprietaryReason4>>,
81200	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
81201	pub no_spcfd_rsn: Option<NoReasonCode>,
81202}
81203
81204impl Reason18Choice {
81205	pub fn validate(&self) -> Result<(), ValidationError> {
81206		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
81207		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
81208		Ok(())
81209	}
81210}
81211
81212
81213// Reason4 ...
81214#[cfg_attr(feature = "derive_debug", derive(Debug))]
81215#[cfg_attr(feature = "derive_default", derive(Default))]
81216#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81217#[cfg_attr(feature = "derive_clone", derive(Clone))]
81218#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81219pub struct Reason4 {
81220	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
81221	pub rsn: Option<Vec<ProprietaryReason4>>,
81222}
81223
81224impl Reason4 {
81225	pub fn validate(&self) -> Result<(), ValidationError> {
81226		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
81227		Ok(())
81228	}
81229}
81230
81231
81232// Receipt6 ...
81233#[cfg_attr(feature = "derive_debug", derive(Debug))]
81234#[cfg_attr(feature = "derive_default", derive(Default))]
81235#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81236#[cfg_attr(feature = "derive_clone", derive(Clone))]
81237#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81238pub struct Receipt6 {
81239	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
81240	pub orgnl_msg_id: OriginalMessageAndIssuer1,
81241	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPmtId", skip_serializing_if = "Option::is_none") )]
81242	pub orgnl_pmt_id: Option<PaymentIdentification8Choice>,
81243	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqHdlg", skip_serializing_if = "Option::is_none") )]
81244	pub req_hdlg: Option<Vec<RequestHandling3>>,
81245}
81246
81247impl Receipt6 {
81248	pub fn validate(&self) -> Result<(), ValidationError> {
81249		self.orgnl_msg_id.validate()?;
81250		if let Some(ref val) = self.orgnl_pmt_id { val.validate()? }
81251		if let Some(ref vec) = self.req_hdlg { for item in vec { item.validate()? } }
81252		Ok(())
81253	}
81254}
81255
81256
81257// ReceiptAcknowledgementReport2 ...
81258#[cfg_attr(feature = "derive_debug", derive(Debug))]
81259#[cfg_attr(feature = "derive_default", derive(Default))]
81260#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81261#[cfg_attr(feature = "derive_clone", derive(Clone))]
81262#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81263pub struct ReceiptAcknowledgementReport2 {
81264	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdRef") )]
81265	pub rltd_ref: MessageReference1,
81266	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqHdlg") )]
81267	pub req_hdlg: RequestHandling2,
81268}
81269
81270impl ReceiptAcknowledgementReport2 {
81271	pub fn validate(&self) -> Result<(), ValidationError> {
81272		self.rltd_ref.validate()?;
81273		self.req_hdlg.validate()?;
81274		Ok(())
81275	}
81276}
81277
81278
81279// ReceivedMarginOrCollateral4 ...
81280#[cfg_attr(feature = "derive_debug", derive(Debug))]
81281#[cfg_attr(feature = "derive_default", derive(Default))]
81282#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81283#[cfg_attr(feature = "derive_clone", derive(Clone))]
81284#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81285pub struct ReceivedMarginOrCollateral4 {
81286	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlMrgnRcvd", skip_serializing_if = "Option::is_none") )]
81287	pub initl_mrgn_rcvd: Option<ActiveOrHistoricCurrencyAndAmount>,
81288	#[cfg_attr( feature = "derive_serde", serde(rename = "VartnMrgnRcvd", skip_serializing_if = "Option::is_none") )]
81289	pub vartn_mrgn_rcvd: Option<ActiveOrHistoricCurrencyAndAmount>,
81290	#[cfg_attr( feature = "derive_serde", serde(rename = "XcssCollRcvd", skip_serializing_if = "Option::is_none") )]
81291	pub xcss_coll_rcvd: Option<ActiveOrHistoricCurrencyAndAmount>,
81292}
81293
81294impl ReceivedMarginOrCollateral4 {
81295	pub fn validate(&self) -> Result<(), ValidationError> {
81296		if let Some(ref val) = self.initl_mrgn_rcvd { val.validate()? }
81297		if let Some(ref val) = self.vartn_mrgn_rcvd { val.validate()? }
81298		if let Some(ref val) = self.xcss_coll_rcvd { val.validate()? }
81299		Ok(())
81300	}
81301}
81302
81303
81304// ReceivedMarginOrCollateral6 ...
81305#[cfg_attr(feature = "derive_debug", derive(Debug))]
81306#[cfg_attr(feature = "derive_default", derive(Default))]
81307#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81308#[cfg_attr(feature = "derive_clone", derive(Clone))]
81309#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81310pub struct ReceivedMarginOrCollateral6 {
81311	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlMrgnRcvdPreHrcut", skip_serializing_if = "Option::is_none") )]
81312	pub initl_mrgn_rcvd_pre_hrcut: Option<ActiveOrHistoricCurrencyAnd20DecimalAmount>,
81313	#[cfg_attr( feature = "derive_serde", serde(rename = "InitlMrgnRcvdPstHrcut", skip_serializing_if = "Option::is_none") )]
81314	pub initl_mrgn_rcvd_pst_hrcut: Option<ActiveOrHistoricCurrencyAnd20DecimalAmount>,
81315	#[cfg_attr( feature = "derive_serde", serde(rename = "VartnMrgnRcvdPreHrcut", skip_serializing_if = "Option::is_none") )]
81316	pub vartn_mrgn_rcvd_pre_hrcut: Option<ActiveOrHistoricCurrencyAnd20DecimalAmount>,
81317	#[cfg_attr( feature = "derive_serde", serde(rename = "VartnMrgnRcvdPstHrcut", skip_serializing_if = "Option::is_none") )]
81318	pub vartn_mrgn_rcvd_pst_hrcut: Option<ActiveOrHistoricCurrencyAnd20DecimalAmount>,
81319	#[cfg_attr( feature = "derive_serde", serde(rename = "XcssCollRcvd", skip_serializing_if = "Option::is_none") )]
81320	pub xcss_coll_rcvd: Option<ActiveOrHistoricCurrencyAnd20DecimalAmount>,
81321}
81322
81323impl ReceivedMarginOrCollateral6 {
81324	pub fn validate(&self) -> Result<(), ValidationError> {
81325		if let Some(ref val) = self.initl_mrgn_rcvd_pre_hrcut { val.validate()? }
81326		if let Some(ref val) = self.initl_mrgn_rcvd_pst_hrcut { val.validate()? }
81327		if let Some(ref val) = self.vartn_mrgn_rcvd_pre_hrcut { val.validate()? }
81328		if let Some(ref val) = self.vartn_mrgn_rcvd_pst_hrcut { val.validate()? }
81329		if let Some(ref val) = self.xcss_coll_rcvd { val.validate()? }
81330		Ok(())
81331	}
81332}
81333
81334
81335// ReceivedReason1Choice ...
81336#[cfg_attr(feature = "derive_debug", derive(Debug))]
81337#[cfg_attr(feature = "derive_default", derive(Default))]
81338#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81339#[cfg_attr(feature = "derive_clone", derive(Clone))]
81340#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81341pub struct ReceivedReason1Choice {
81342	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
81343	pub no_spcfd_rsn: Option<NoReasonCode>,
81344	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
81345	pub rsn: Option<ReceivedReason2Choice>,
81346}
81347
81348impl ReceivedReason1Choice {
81349	pub fn validate(&self) -> Result<(), ValidationError> {
81350		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
81351		if let Some(ref val) = self.rsn { val.validate()? }
81352		Ok(())
81353	}
81354}
81355
81356
81357// ReceivedReason2Choice ...
81358#[cfg_attr(feature = "derive_debug", derive(Debug))]
81359#[cfg_attr(feature = "derive_default", derive(Default))]
81360#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81361#[cfg_attr(feature = "derive_clone", derive(Clone))]
81362#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81363pub struct ReceivedReason2Choice {
81364	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
81365	pub cd: Option<String>,
81366	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
81367	pub prtry: Option<GenericIdentification36>,
81368}
81369
81370impl ReceivedReason2Choice {
81371	pub fn validate(&self) -> Result<(), ValidationError> {
81372		if let Some(ref val) = self.cd {
81373			if val.chars().count() < 1 {
81374				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
81375			}
81376			if val.chars().count() > 4 {
81377				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
81378			}
81379		}
81380		if let Some(ref val) = self.prtry { val.validate()? }
81381		Ok(())
81382	}
81383}
81384
81385
81386// ReceivedStatusReason1 ...
81387#[cfg_attr(feature = "derive_debug", derive(Debug))]
81388#[cfg_attr(feature = "derive_default", derive(Default))]
81389#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81390#[cfg_attr(feature = "derive_clone", derive(Clone))]
81391#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81392pub struct ReceivedStatusReason1 {
81393	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
81394	pub rsn: ReceivedReason1Choice,
81395	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
81396	pub addtl_rsn_inf: Option<String>,
81397}
81398
81399impl ReceivedStatusReason1 {
81400	pub fn validate(&self) -> Result<(), ValidationError> {
81401		self.rsn.validate()?;
81402		if let Some(ref val) = self.addtl_rsn_inf {
81403			if val.chars().count() < 1 {
81404				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
81405			}
81406			if val.chars().count() > 210 {
81407				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
81408			}
81409		}
81410		Ok(())
81411	}
81412}
81413
81414
81415// Reconciliation3Code ...
81416#[cfg_attr(feature = "derive_debug", derive(Debug))]
81417#[cfg_attr(feature = "derive_default", derive(Default))]
81418#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81419#[cfg_attr(feature = "derive_clone", derive(Clone))]
81420#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81421pub enum Reconciliation3Code {
81422	#[cfg_attr(feature = "derive_default", default)]
81423	#[cfg_attr( feature = "derive_serde", serde(rename = "DPRW") )]
81424	CodeDPRW,
81425	#[cfg_attr( feature = "derive_serde", serde(rename = "DPRV") )]
81426	CodeDPRV,
81427	#[cfg_attr( feature = "derive_serde", serde(rename = "DSMA") )]
81428	CodeDSMA,
81429	#[cfg_attr( feature = "derive_serde", serde(rename = "DSNM") )]
81430	CodeDSNM,
81431	#[cfg_attr( feature = "derive_serde", serde(rename = "NORE") )]
81432	CodeNORE,
81433	#[cfg_attr( feature = "derive_serde", serde(rename = "SSMA") )]
81434	CodeSSMA,
81435	#[cfg_attr( feature = "derive_serde", serde(rename = "SSPA") )]
81436	CodeSSPA,
81437	#[cfg_attr( feature = "derive_serde", serde(rename = "SPRW") )]
81438	CodeSPRW,
81439	#[cfg_attr( feature = "derive_serde", serde(rename = "SPRV") )]
81440	CodeSPRV,
81441	#[cfg_attr( feature = "derive_serde", serde(rename = "SSUN") )]
81442	CodeSSUN,
81443	#[cfg_attr( feature = "derive_serde", serde(rename = "SSNE") )]
81444	CodeSSNE,
81445}
81446
81447impl Reconciliation3Code {
81448	pub fn validate(&self) -> Result<(), ValidationError> {
81449		Ok(())
81450	}
81451}
81452
81453
81454// ReconciliationCategory4 ...
81455#[cfg_attr(feature = "derive_debug", derive(Debug))]
81456#[cfg_attr(feature = "derive_default", derive(Default))]
81457#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81458#[cfg_attr(feature = "derive_clone", derive(Clone))]
81459#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81460pub struct ReconciliationCategory4 {
81461	#[cfg_attr( feature = "derive_serde", serde(rename = "Rvvd") )]
81462	pub rvvd: bool,
81463	#[cfg_attr( feature = "derive_serde", serde(rename = "FrthrMod") )]
81464	pub frthr_mod: bool,
81465}
81466
81467impl ReconciliationCategory4 {
81468	pub fn validate(&self) -> Result<(), ValidationError> {
81469		Ok(())
81470	}
81471}
81472
81473
81474// ReconciliationCategory5 ...
81475#[cfg_attr(feature = "derive_debug", derive(Debug))]
81476#[cfg_attr(feature = "derive_default", derive(Default))]
81477#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81478#[cfg_attr(feature = "derive_clone", derive(Clone))]
81479#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81480pub struct ReconciliationCategory5 {
81481	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgTp") )]
81482	pub rptg_tp: TradeRepositoryReportingType1Code,
81483	#[cfg_attr( feature = "derive_serde", serde(rename = "Pairg") )]
81484	pub pairg: PairingStatus1Code,
81485	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcncltn") )]
81486	pub rcncltn: ReconciliationStatus1Code,
81487	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnRcncltn") )]
81488	pub valtn_rcncltn: ReconciliationStatus2Code,
81489	#[cfg_attr( feature = "derive_serde", serde(rename = "Rvvd") )]
81490	pub rvvd: bool,
81491	#[cfg_attr( feature = "derive_serde", serde(rename = "FrthrMod") )]
81492	pub frthr_mod: bool,
81493}
81494
81495impl ReconciliationCategory5 {
81496	pub fn validate(&self) -> Result<(), ValidationError> {
81497		self.rptg_tp.validate()?;
81498		self.pairg.validate()?;
81499		self.rcncltn.validate()?;
81500		self.valtn_rcncltn.validate()?;
81501		Ok(())
81502	}
81503}
81504
81505
81506// ReconciliationCounterpartyPairStatistics7 ...
81507#[cfg_attr(feature = "derive_debug", derive(Debug))]
81508#[cfg_attr(feature = "derive_default", derive(Default))]
81509#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81510#[cfg_attr(feature = "derive_clone", derive(Clone))]
81511#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81512pub struct ReconciliationCounterpartyPairStatistics7 {
81513	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId") )]
81514	pub ctr_pty_id: CounterpartyData91,
81515	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfTxs") )]
81516	pub ttl_nb_of_txs: f64,
81517	#[cfg_attr( feature = "derive_serde", serde(rename = "RcncltnRpt") )]
81518	pub rcncltn_rpt: Vec<ReconciliationReport15>,
81519}
81520
81521impl ReconciliationCounterpartyPairStatistics7 {
81522	pub fn validate(&self) -> Result<(), ValidationError> {
81523		self.ctr_pty_id.validate()?;
81524		for item in &self.rcncltn_rpt { item.validate()? }
81525		Ok(())
81526	}
81527}
81528
81529
81530// ReconciliationFlag2 ...
81531#[cfg_attr(feature = "derive_debug", derive(Debug))]
81532#[cfg_attr(feature = "derive_default", derive(Default))]
81533#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81534#[cfg_attr(feature = "derive_clone", derive(Clone))]
81535#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81536pub struct ReconciliationFlag2 {
81537	#[cfg_attr( feature = "derive_serde", serde(rename = "RptTp", skip_serializing_if = "Option::is_none") )]
81538	pub rpt_tp: Option<TradeRepositoryReportingType1Code>,
81539	#[cfg_attr( feature = "derive_serde", serde(rename = "BothCtrPtiesRptg", skip_serializing_if = "Option::is_none") )]
81540	pub both_ctr_pties_rptg: Option<bool>,
81541	#[cfg_attr( feature = "derive_serde", serde(rename = "PairdSts", skip_serializing_if = "Option::is_none") )]
81542	pub paird_sts: Option<bool>,
81543	#[cfg_attr( feature = "derive_serde", serde(rename = "LnRcncltnSts", skip_serializing_if = "Option::is_none") )]
81544	pub ln_rcncltn_sts: Option<bool>,
81545	#[cfg_attr( feature = "derive_serde", serde(rename = "CollRcncltnSts", skip_serializing_if = "Option::is_none") )]
81546	pub coll_rcncltn_sts: Option<bool>,
81547	#[cfg_attr( feature = "derive_serde", serde(rename = "ModSts", skip_serializing_if = "Option::is_none") )]
81548	pub mod_sts: Option<bool>,
81549}
81550
81551impl ReconciliationFlag2 {
81552	pub fn validate(&self) -> Result<(), ValidationError> {
81553		if let Some(ref val) = self.rpt_tp { val.validate()? }
81554		Ok(())
81555	}
81556}
81557
81558
81559// ReconciliationMatchedStatus9Choice ...
81560#[cfg_attr(feature = "derive_debug", derive(Debug))]
81561#[cfg_attr(feature = "derive_default", derive(Default))]
81562#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81563#[cfg_attr(feature = "derive_clone", derive(Clone))]
81564#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81565pub struct ReconciliationMatchedStatus9Choice {
81566	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtchd", skip_serializing_if = "Option::is_none") )]
81567	pub mtchd: Option<NoReasonCode>,
81568	#[cfg_attr( feature = "derive_serde", serde(rename = "NotMtchd", skip_serializing_if = "Option::is_none") )]
81569	pub not_mtchd: Option<ReconciliationResult10>,
81570}
81571
81572impl ReconciliationMatchedStatus9Choice {
81573	pub fn validate(&self) -> Result<(), ValidationError> {
81574		if let Some(ref val) = self.mtchd { val.validate()? }
81575		if let Some(ref val) = self.not_mtchd { val.validate()? }
81576		Ok(())
81577	}
81578}
81579
81580
81581// ReconciliationReport15 ...
81582#[cfg_attr(feature = "derive_debug", derive(Debug))]
81583#[cfg_attr(feature = "derive_default", derive(Default))]
81584#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81585#[cfg_attr(feature = "derive_clone", derive(Clone))]
81586#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81587pub struct ReconciliationReport15 {
81588	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId") )]
81589	pub tx_id: TradeTransactionIdentification24,
81590	#[cfg_attr( feature = "derive_serde", serde(rename = "MtchgCrit") )]
81591	pub mtchg_crit: MatchingCriteria17,
81592}
81593
81594impl ReconciliationReport15 {
81595	pub fn validate(&self) -> Result<(), ValidationError> {
81596		self.tx_id.validate()?;
81597		self.mtchg_crit.validate()?;
81598		Ok(())
81599	}
81600}
81601
81602
81603// ReconciliationReport8 ...
81604#[cfg_attr(feature = "derive_debug", derive(Debug))]
81605#[cfg_attr(feature = "derive_default", derive(Default))]
81606#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81607#[cfg_attr(feature = "derive_clone", derive(Clone))]
81608#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81609pub struct ReconciliationReport8 {
81610	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
81611	pub tech_rcrd_id: Option<String>,
81612	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId") )]
81613	pub tx_id: TradeTransactionIdentification19,
81614	#[cfg_attr( feature = "derive_serde", serde(rename = "Modfd") )]
81615	pub modfd: bool,
81616	#[cfg_attr( feature = "derive_serde", serde(rename = "RcncltnSts") )]
81617	pub rcncltn_sts: ReconciliationStatus8Choice,
81618}
81619
81620impl ReconciliationReport8 {
81621	pub fn validate(&self) -> Result<(), ValidationError> {
81622		if let Some(ref val) = self.tech_rcrd_id {
81623			if val.chars().count() < 1 {
81624				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
81625			}
81626			if val.chars().count() > 140 {
81627				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
81628			}
81629		}
81630		self.tx_id.validate()?;
81631		self.rcncltn_sts.validate()?;
81632		Ok(())
81633	}
81634}
81635
81636
81637// ReconciliationResult10 ...
81638#[cfg_attr(feature = "derive_debug", derive(Debug))]
81639#[cfg_attr(feature = "derive_default", derive(Default))]
81640#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81641#[cfg_attr(feature = "derive_clone", derive(Clone))]
81642#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81643pub struct ReconciliationResult10 {
81644	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPty1") )]
81645	pub ctr_pty1: OrganisationIdentification15Choice,
81646	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPty2") )]
81647	pub ctr_pty2: OrganisationIdentification15Choice,
81648	#[cfg_attr( feature = "derive_serde", serde(rename = "MtchgCrit") )]
81649	pub mtchg_crit: MatchingCriteria10,
81650}
81651
81652impl ReconciliationResult10 {
81653	pub fn validate(&self) -> Result<(), ValidationError> {
81654		self.ctr_pty1.validate()?;
81655		self.ctr_pty2.validate()?;
81656		self.mtchg_crit.validate()?;
81657		Ok(())
81658	}
81659}
81660
81661
81662// ReconciliationStatisticsPerCounterparty4 ...
81663#[cfg_attr(feature = "derive_debug", derive(Debug))]
81664#[cfg_attr(feature = "derive_default", derive(Default))]
81665#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81666#[cfg_attr(feature = "derive_clone", derive(Clone))]
81667#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81668pub struct ReconciliationStatisticsPerCounterparty4 {
81669	#[cfg_attr( feature = "derive_serde", serde(rename = "RefDt") )]
81670	pub ref_dt: String,
81671	#[cfg_attr( feature = "derive_serde", serde(rename = "RcncltnCtgrs") )]
81672	pub rcncltn_ctgrs: ReportingRequirement3Choice,
81673	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfTxs", skip_serializing_if = "Option::is_none") )]
81674	pub ttl_nb_of_txs: Option<f64>,
81675	#[cfg_attr( feature = "derive_serde", serde(rename = "TxDtls", skip_serializing_if = "Option::is_none") )]
81676	pub tx_dtls: Option<Vec<ReconciliationCounterpartyPairStatistics7>>,
81677}
81678
81679impl ReconciliationStatisticsPerCounterparty4 {
81680	pub fn validate(&self) -> Result<(), ValidationError> {
81681		self.rcncltn_ctgrs.validate()?;
81682		if let Some(ref vec) = self.tx_dtls { for item in vec { item.validate()? } }
81683		Ok(())
81684	}
81685}
81686
81687
81688// ReconciliationStatus1Code ...
81689#[cfg_attr(feature = "derive_debug", derive(Debug))]
81690#[cfg_attr(feature = "derive_default", derive(Default))]
81691#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81692#[cfg_attr(feature = "derive_clone", derive(Clone))]
81693#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81694pub enum ReconciliationStatus1Code {
81695	#[cfg_attr(feature = "derive_default", default)]
81696	#[cfg_attr( feature = "derive_serde", serde(rename = "NREC") )]
81697	CodeNREC,
81698	#[cfg_attr( feature = "derive_serde", serde(rename = "RECO") )]
81699	CodeRECO,
81700}
81701
81702impl ReconciliationStatus1Code {
81703	pub fn validate(&self) -> Result<(), ValidationError> {
81704		Ok(())
81705	}
81706}
81707
81708
81709// ReconciliationStatus2Code ...
81710#[cfg_attr(feature = "derive_debug", derive(Debug))]
81711#[cfg_attr(feature = "derive_default", derive(Default))]
81712#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81713#[cfg_attr(feature = "derive_clone", derive(Clone))]
81714#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81715pub enum ReconciliationStatus2Code {
81716	#[cfg_attr(feature = "derive_default", default)]
81717	#[cfg_attr( feature = "derive_serde", serde(rename = "NREC") )]
81718	CodeNREC,
81719	#[cfg_attr( feature = "derive_serde", serde(rename = "RECO") )]
81720	CodeRECO,
81721	#[cfg_attr( feature = "derive_serde", serde(rename = "NOAP") )]
81722	CodeNOAP,
81723}
81724
81725impl ReconciliationStatus2Code {
81726	pub fn validate(&self) -> Result<(), ValidationError> {
81727		Ok(())
81728	}
81729}
81730
81731
81732// ReconciliationStatus8Choice ...
81733#[cfg_attr(feature = "derive_debug", derive(Debug))]
81734#[cfg_attr(feature = "derive_default", derive(Default))]
81735#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81736#[cfg_attr(feature = "derive_clone", derive(Clone))]
81737#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81738pub struct ReconciliationStatus8Choice {
81739	#[cfg_attr( feature = "derive_serde", serde(rename = "NoRcncltnReqrd", skip_serializing_if = "Option::is_none") )]
81740	pub no_rcncltn_reqrd: Option<NoReasonCode>,
81741	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgData", skip_serializing_if = "Option::is_none") )]
81742	pub rptg_data: Option<ReconciliationMatchedStatus9Choice>,
81743}
81744
81745impl ReconciliationStatus8Choice {
81746	pub fn validate(&self) -> Result<(), ValidationError> {
81747		if let Some(ref val) = self.no_rcncltn_reqrd { val.validate()? }
81748		if let Some(ref val) = self.rptg_data { val.validate()? }
81749		Ok(())
81750	}
81751}
81752
81753
81754// RecordTechnicalData2 ...
81755#[cfg_attr(feature = "derive_debug", derive(Debug))]
81756#[cfg_attr(feature = "derive_default", derive(Default))]
81757#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81758#[cfg_attr(feature = "derive_clone", derive(Clone))]
81759#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81760pub struct RecordTechnicalData2 {
81761	#[cfg_attr( feature = "derive_serde", serde(rename = "RctDtTm") )]
81762	pub rct_dt_tm: String,
81763	#[cfg_attr( feature = "derive_serde", serde(rename = "CxlRsn") )]
81764	pub cxl_rsn: CancelledStatusReason15Code,
81765}
81766
81767impl RecordTechnicalData2 {
81768	pub fn validate(&self) -> Result<(), ValidationError> {
81769		self.cxl_rsn.validate()?;
81770		Ok(())
81771	}
81772}
81773
81774
81775// RecordTechnicalData4 ...
81776#[cfg_attr(feature = "derive_debug", derive(Debug))]
81777#[cfg_attr(feature = "derive_default", derive(Default))]
81778#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81779#[cfg_attr(feature = "derive_clone", derive(Clone))]
81780#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81781pub struct RecordTechnicalData4 {
81782	#[cfg_attr( feature = "derive_serde", serde(rename = "IncnsstncyInd", skip_serializing_if = "Option::is_none") )]
81783	pub incnsstncy_ind: Option<bool>,
81784	#[cfg_attr( feature = "derive_serde", serde(rename = "LastUpd", skip_serializing_if = "Option::is_none") )]
81785	pub last_upd: Option<String>,
81786	#[cfg_attr( feature = "derive_serde", serde(rename = "SubmissnDtTm", skip_serializing_if = "Option::is_none") )]
81787	pub submissn_dt_tm: Option<String>,
81788	#[cfg_attr( feature = "derive_serde", serde(rename = "RlvntCmptntAuthrty", skip_serializing_if = "Option::is_none") )]
81789	pub rlvnt_cmptnt_authrty: Option<String>,
81790	#[cfg_attr( feature = "derive_serde", serde(rename = "PblctnPrd", skip_serializing_if = "Option::is_none") )]
81791	pub pblctn_prd: Option<Period4Choice>,
81792	#[cfg_attr( feature = "derive_serde", serde(rename = "NvrPblshd", skip_serializing_if = "Option::is_none") )]
81793	pub nvr_pblshd: Option<bool>,
81794	#[cfg_attr( feature = "derive_serde", serde(rename = "RlvntTradgVn", skip_serializing_if = "Option::is_none") )]
81795	pub rlvnt_tradg_vn: Option<String>,
81796}
81797
81798impl RecordTechnicalData4 {
81799	pub fn validate(&self) -> Result<(), ValidationError> {
81800		if let Some(ref val) = self.rlvnt_cmptnt_authrty {
81801			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
81802			if !pattern.is_match(val) {
81803				return Err(ValidationError::new(1005, "rlvnt_cmptnt_authrty does not match the required pattern".to_string()));
81804			}
81805		}
81806		if let Some(ref val) = self.pblctn_prd { val.validate()? }
81807		if let Some(ref val) = self.rlvnt_tradg_vn {
81808			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
81809			if !pattern.is_match(val) {
81810				return Err(ValidationError::new(1005, "rlvnt_tradg_vn does not match the required pattern".to_string()));
81811			}
81812		}
81813		Ok(())
81814	}
81815}
81816
81817
81818// RecordTechnicalData5 ...
81819#[cfg_attr(feature = "derive_debug", derive(Debug))]
81820#[cfg_attr(feature = "derive_default", derive(Default))]
81821#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81822#[cfg_attr(feature = "derive_clone", derive(Clone))]
81823#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81824pub struct RecordTechnicalData5 {
81825	#[cfg_attr( feature = "derive_serde", serde(rename = "RctDtTm") )]
81826	pub rct_dt_tm: String,
81827	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRsn") )]
81828	pub xchg_rsn: Vec<String>,
81829}
81830
81831impl RecordTechnicalData5 {
81832	pub fn validate(&self) -> Result<(), ValidationError> {
81833		for item in &self.xchg_rsn {
81834			if item.chars().count() < 1 {
81835				return Err(ValidationError::new(1001, "xchg_rsn is shorter than the minimum length of 1".to_string()));
81836			}
81837			if item.chars().count() > 4 {
81838				return Err(ValidationError::new(1002, "xchg_rsn exceeds the maximum length of 4".to_string()));
81839			}
81840		}
81841		Ok(())
81842	}
81843}
81844
81845
81846// ReferToFundOrderDesk1Code ...
81847#[cfg_attr(feature = "derive_debug", derive(Debug))]
81848#[cfg_attr(feature = "derive_default", derive(Default))]
81849#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81850#[cfg_attr(feature = "derive_clone", derive(Clone))]
81851#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81852pub enum ReferToFundOrderDesk1Code {
81853	#[cfg_attr(feature = "derive_default", default)]
81854	#[cfg_attr( feature = "derive_serde", serde(rename = "RFOD") )]
81855	CodeRFOD,
81856}
81857
81858impl ReferToFundOrderDesk1Code {
81859	pub fn validate(&self) -> Result<(), ValidationError> {
81860		Ok(())
81861	}
81862}
81863
81864
81865// References14 ...
81866#[cfg_attr(feature = "derive_debug", derive(Debug))]
81867#[cfg_attr(feature = "derive_default", derive(Default))]
81868#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81869#[cfg_attr(feature = "derive_clone", derive(Clone))]
81870#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81871pub struct References14 {
81872	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnrTxId", skip_serializing_if = "Option::is_none") )]
81873	pub acct_ownr_tx_id: Option<String>,
81874	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrTxId", skip_serializing_if = "Option::is_none") )]
81875	pub acct_svcr_tx_id: Option<String>,
81876	#[cfg_attr( feature = "derive_serde", serde(rename = "MktInfrstrctrTxId", skip_serializing_if = "Option::is_none") )]
81877	pub mkt_infrstrctr_tx_id: Option<String>,
81878	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcrTxId", skip_serializing_if = "Option::is_none") )]
81879	pub prcr_tx_id: Option<String>,
81880	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolId", skip_serializing_if = "Option::is_none") )]
81881	pub pool_id: Option<String>,
81882}
81883
81884impl References14 {
81885	pub fn validate(&self) -> Result<(), ValidationError> {
81886		if let Some(ref val) = self.acct_ownr_tx_id {
81887			if val.chars().count() < 1 {
81888				return Err(ValidationError::new(1001, "acct_ownr_tx_id is shorter than the minimum length of 1".to_string()));
81889			}
81890			if val.chars().count() > 35 {
81891				return Err(ValidationError::new(1002, "acct_ownr_tx_id exceeds the maximum length of 35".to_string()));
81892			}
81893		}
81894		if let Some(ref val) = self.acct_svcr_tx_id {
81895			if val.chars().count() < 1 {
81896				return Err(ValidationError::new(1001, "acct_svcr_tx_id is shorter than the minimum length of 1".to_string()));
81897			}
81898			if val.chars().count() > 35 {
81899				return Err(ValidationError::new(1002, "acct_svcr_tx_id exceeds the maximum length of 35".to_string()));
81900			}
81901		}
81902		if let Some(ref val) = self.mkt_infrstrctr_tx_id {
81903			if val.chars().count() < 1 {
81904				return Err(ValidationError::new(1001, "mkt_infrstrctr_tx_id is shorter than the minimum length of 1".to_string()));
81905			}
81906			if val.chars().count() > 35 {
81907				return Err(ValidationError::new(1002, "mkt_infrstrctr_tx_id exceeds the maximum length of 35".to_string()));
81908			}
81909		}
81910		if let Some(ref val) = self.prcr_tx_id {
81911			if val.chars().count() < 1 {
81912				return Err(ValidationError::new(1001, "prcr_tx_id is shorter than the minimum length of 1".to_string()));
81913			}
81914			if val.chars().count() > 35 {
81915				return Err(ValidationError::new(1002, "prcr_tx_id exceeds the maximum length of 35".to_string()));
81916			}
81917		}
81918		if let Some(ref val) = self.pool_id {
81919			if val.chars().count() < 1 {
81920				return Err(ValidationError::new(1001, "pool_id is shorter than the minimum length of 1".to_string()));
81921			}
81922			if val.chars().count() > 35 {
81923				return Err(ValidationError::new(1002, "pool_id exceeds the maximum length of 35".to_string()));
81924			}
81925		}
81926		Ok(())
81927	}
81928}
81929
81930
81931// References3 ...
81932#[cfg_attr(feature = "derive_debug", derive(Debug))]
81933#[cfg_attr(feature = "derive_default", derive(Default))]
81934#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81935#[cfg_attr(feature = "derive_clone", derive(Clone))]
81936#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81937pub struct References3 {
81938	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
81939	pub msg_id: MessageIdentification1,
81940	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqToBeCmpltdId") )]
81941	pub req_to_be_cmpltd_id: MessageIdentification1,
81942	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcId") )]
81943	pub prc_id: MessageIdentification1,
81944	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqRsn") )]
81945	pub req_rsn: Vec<String>,
81946	#[cfg_attr( feature = "derive_serde", serde(rename = "AttchdDocNm", skip_serializing_if = "Option::is_none") )]
81947	pub attchd_doc_nm: Option<Vec<String>>,
81948}
81949
81950impl References3 {
81951	pub fn validate(&self) -> Result<(), ValidationError> {
81952		self.msg_id.validate()?;
81953		self.req_to_be_cmpltd_id.validate()?;
81954		self.prc_id.validate()?;
81955		for item in &self.req_rsn {
81956			if item.chars().count() < 1 {
81957				return Err(ValidationError::new(1001, "req_rsn is shorter than the minimum length of 1".to_string()));
81958			}
81959			if item.chars().count() > 35 {
81960				return Err(ValidationError::new(1002, "req_rsn exceeds the maximum length of 35".to_string()));
81961			}
81962		}
81963		if let Some(ref vec) = self.attchd_doc_nm {
81964			for item in vec {
81965				if item.chars().count() < 1 {
81966					return Err(ValidationError::new(1001, "attchd_doc_nm is shorter than the minimum length of 1".to_string()));
81967				}
81968				if item.chars().count() > 70 {
81969					return Err(ValidationError::new(1002, "attchd_doc_nm exceeds the maximum length of 70".to_string()));
81970				}
81971			}
81972		}
81973		Ok(())
81974	}
81975}
81976
81977
81978// References34Choice ...
81979#[cfg_attr(feature = "derive_debug", derive(Debug))]
81980#[cfg_attr(feature = "derive_default", derive(Default))]
81981#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
81982#[cfg_attr(feature = "derive_clone", derive(Clone))]
81983#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
81984pub struct References34Choice {
81985	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesSttlmTxId", skip_serializing_if = "Option::is_none") )]
81986	pub scties_sttlm_tx_id: Option<String>,
81987	#[cfg_attr( feature = "derive_serde", serde(rename = "IntraPosMvmntId", skip_serializing_if = "Option::is_none") )]
81988	pub intra_pos_mvmnt_id: Option<String>,
81989	#[cfg_attr( feature = "derive_serde", serde(rename = "IntraBalMvmntId", skip_serializing_if = "Option::is_none") )]
81990	pub intra_bal_mvmnt_id: Option<String>,
81991	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrTxId", skip_serializing_if = "Option::is_none") )]
81992	pub acct_svcr_tx_id: Option<String>,
81993	#[cfg_attr( feature = "derive_serde", serde(rename = "MktInfrstrctrTxId", skip_serializing_if = "Option::is_none") )]
81994	pub mkt_infrstrctr_tx_id: Option<String>,
81995	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolId", skip_serializing_if = "Option::is_none") )]
81996	pub pool_id: Option<String>,
81997	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrTxId", skip_serializing_if = "Option::is_none") )]
81998	pub othr_tx_id: Option<String>,
81999}
82000
82001impl References34Choice {
82002	pub fn validate(&self) -> Result<(), ValidationError> {
82003		if let Some(ref val) = self.scties_sttlm_tx_id {
82004			if val.chars().count() < 1 {
82005				return Err(ValidationError::new(1001, "scties_sttlm_tx_id is shorter than the minimum length of 1".to_string()));
82006			}
82007			if val.chars().count() > 35 {
82008				return Err(ValidationError::new(1002, "scties_sttlm_tx_id exceeds the maximum length of 35".to_string()));
82009			}
82010		}
82011		if let Some(ref val) = self.intra_pos_mvmnt_id {
82012			if val.chars().count() < 1 {
82013				return Err(ValidationError::new(1001, "intra_pos_mvmnt_id is shorter than the minimum length of 1".to_string()));
82014			}
82015			if val.chars().count() > 35 {
82016				return Err(ValidationError::new(1002, "intra_pos_mvmnt_id exceeds the maximum length of 35".to_string()));
82017			}
82018		}
82019		if let Some(ref val) = self.intra_bal_mvmnt_id {
82020			if val.chars().count() < 1 {
82021				return Err(ValidationError::new(1001, "intra_bal_mvmnt_id is shorter than the minimum length of 1".to_string()));
82022			}
82023			if val.chars().count() > 35 {
82024				return Err(ValidationError::new(1002, "intra_bal_mvmnt_id exceeds the maximum length of 35".to_string()));
82025			}
82026		}
82027		if let Some(ref val) = self.acct_svcr_tx_id {
82028			if val.chars().count() < 1 {
82029				return Err(ValidationError::new(1001, "acct_svcr_tx_id is shorter than the minimum length of 1".to_string()));
82030			}
82031			if val.chars().count() > 35 {
82032				return Err(ValidationError::new(1002, "acct_svcr_tx_id exceeds the maximum length of 35".to_string()));
82033			}
82034		}
82035		if let Some(ref val) = self.mkt_infrstrctr_tx_id {
82036			if val.chars().count() < 1 {
82037				return Err(ValidationError::new(1001, "mkt_infrstrctr_tx_id is shorter than the minimum length of 1".to_string()));
82038			}
82039			if val.chars().count() > 35 {
82040				return Err(ValidationError::new(1002, "mkt_infrstrctr_tx_id exceeds the maximum length of 35".to_string()));
82041			}
82042		}
82043		if let Some(ref val) = self.pool_id {
82044			if val.chars().count() < 1 {
82045				return Err(ValidationError::new(1001, "pool_id is shorter than the minimum length of 1".to_string()));
82046			}
82047			if val.chars().count() > 35 {
82048				return Err(ValidationError::new(1002, "pool_id exceeds the maximum length of 35".to_string()));
82049			}
82050		}
82051		if let Some(ref val) = self.othr_tx_id {
82052			if val.chars().count() < 1 {
82053				return Err(ValidationError::new(1001, "othr_tx_id is shorter than the minimum length of 1".to_string()));
82054			}
82055			if val.chars().count() > 35 {
82056				return Err(ValidationError::new(1002, "othr_tx_id exceeds the maximum length of 35".to_string()));
82057			}
82058		}
82059		Ok(())
82060	}
82061}
82062
82063
82064// References36Choice ...
82065#[cfg_attr(feature = "derive_debug", derive(Debug))]
82066#[cfg_attr(feature = "derive_default", derive(Default))]
82067#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82068#[cfg_attr(feature = "derive_clone", derive(Clone))]
82069#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82070pub struct References36Choice {
82071	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnrTxId", skip_serializing_if = "Option::is_none") )]
82072	pub acct_ownr_tx_id: Option<String>,
82073	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrTxId", skip_serializing_if = "Option::is_none") )]
82074	pub acct_svcr_tx_id: Option<String>,
82075	#[cfg_attr( feature = "derive_serde", serde(rename = "MktInfrstrctrTxId", skip_serializing_if = "Option::is_none") )]
82076	pub mkt_infrstrctr_tx_id: Option<String>,
82077	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcrTxId", skip_serializing_if = "Option::is_none") )]
82078	pub prcr_tx_id: Option<String>,
82079	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolId", skip_serializing_if = "Option::is_none") )]
82080	pub pool_id: Option<String>,
82081	#[cfg_attr( feature = "derive_serde", serde(rename = "CorpActnEvtId", skip_serializing_if = "Option::is_none") )]
82082	pub corp_actn_evt_id: Option<String>,
82083}
82084
82085impl References36Choice {
82086	pub fn validate(&self) -> Result<(), ValidationError> {
82087		if let Some(ref val) = self.acct_ownr_tx_id {
82088			if val.chars().count() < 1 {
82089				return Err(ValidationError::new(1001, "acct_ownr_tx_id is shorter than the minimum length of 1".to_string()));
82090			}
82091			if val.chars().count() > 35 {
82092				return Err(ValidationError::new(1002, "acct_ownr_tx_id exceeds the maximum length of 35".to_string()));
82093			}
82094		}
82095		if let Some(ref val) = self.acct_svcr_tx_id {
82096			if val.chars().count() < 1 {
82097				return Err(ValidationError::new(1001, "acct_svcr_tx_id is shorter than the minimum length of 1".to_string()));
82098			}
82099			if val.chars().count() > 35 {
82100				return Err(ValidationError::new(1002, "acct_svcr_tx_id exceeds the maximum length of 35".to_string()));
82101			}
82102		}
82103		if let Some(ref val) = self.mkt_infrstrctr_tx_id {
82104			if val.chars().count() < 1 {
82105				return Err(ValidationError::new(1001, "mkt_infrstrctr_tx_id is shorter than the minimum length of 1".to_string()));
82106			}
82107			if val.chars().count() > 35 {
82108				return Err(ValidationError::new(1002, "mkt_infrstrctr_tx_id exceeds the maximum length of 35".to_string()));
82109			}
82110		}
82111		if let Some(ref val) = self.prcr_tx_id {
82112			if val.chars().count() < 1 {
82113				return Err(ValidationError::new(1001, "prcr_tx_id is shorter than the minimum length of 1".to_string()));
82114			}
82115			if val.chars().count() > 35 {
82116				return Err(ValidationError::new(1002, "prcr_tx_id exceeds the maximum length of 35".to_string()));
82117			}
82118		}
82119		if let Some(ref val) = self.pool_id {
82120			if val.chars().count() < 1 {
82121				return Err(ValidationError::new(1001, "pool_id is shorter than the minimum length of 1".to_string()));
82122			}
82123			if val.chars().count() > 35 {
82124				return Err(ValidationError::new(1002, "pool_id exceeds the maximum length of 35".to_string()));
82125			}
82126		}
82127		if let Some(ref val) = self.corp_actn_evt_id {
82128			if val.chars().count() < 1 {
82129				return Err(ValidationError::new(1001, "corp_actn_evt_id is shorter than the minimum length of 1".to_string()));
82130			}
82131			if val.chars().count() > 35 {
82132				return Err(ValidationError::new(1002, "corp_actn_evt_id exceeds the maximum length of 35".to_string()));
82133			}
82134		}
82135		Ok(())
82136	}
82137}
82138
82139
82140// References4 ...
82141#[cfg_attr(feature = "derive_debug", derive(Debug))]
82142#[cfg_attr(feature = "derive_default", derive(Default))]
82143#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82144#[cfg_attr(feature = "derive_clone", derive(Clone))]
82145#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82146pub struct References4 {
82147	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
82148	pub msg_id: MessageIdentification1,
82149	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcId") )]
82150	pub prc_id: MessageIdentification1,
82151	#[cfg_attr( feature = "derive_serde", serde(rename = "AttchdDocNm", skip_serializing_if = "Option::is_none") )]
82152	pub attchd_doc_nm: Option<Vec<String>>,
82153}
82154
82155impl References4 {
82156	pub fn validate(&self) -> Result<(), ValidationError> {
82157		self.msg_id.validate()?;
82158		self.prc_id.validate()?;
82159		if let Some(ref vec) = self.attchd_doc_nm {
82160			for item in vec {
82161				if item.chars().count() < 1 {
82162					return Err(ValidationError::new(1001, "attchd_doc_nm is shorter than the minimum length of 1".to_string()));
82163				}
82164				if item.chars().count() > 70 {
82165					return Err(ValidationError::new(1002, "attchd_doc_nm exceeds the maximum length of 70".to_string()));
82166				}
82167			}
82168		}
82169		Ok(())
82170	}
82171}
82172
82173
82174// References5 ...
82175#[cfg_attr(feature = "derive_debug", derive(Debug))]
82176#[cfg_attr(feature = "derive_default", derive(Default))]
82177#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82178#[cfg_attr(feature = "derive_clone", derive(Clone))]
82179#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82180pub struct References5 {
82181	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqTp") )]
82182	pub req_tp: UseCases1Code,
82183	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
82184	pub msg_id: MessageIdentification1,
82185	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcId") )]
82186	pub prc_id: MessageIdentification1,
82187	#[cfg_attr( feature = "derive_serde", serde(rename = "AckdMsgId", skip_serializing_if = "Option::is_none") )]
82188	pub ackd_msg_id: Option<Vec<MessageIdentification1>>,
82189	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
82190	pub sts: Option<String>,
82191	#[cfg_attr( feature = "derive_serde", serde(rename = "AttchdDocNm", skip_serializing_if = "Option::is_none") )]
82192	pub attchd_doc_nm: Option<Vec<String>>,
82193}
82194
82195impl References5 {
82196	pub fn validate(&self) -> Result<(), ValidationError> {
82197		self.req_tp.validate()?;
82198		self.msg_id.validate()?;
82199		self.prc_id.validate()?;
82200		if let Some(ref vec) = self.ackd_msg_id { for item in vec { item.validate()? } }
82201		if let Some(ref val) = self.sts {
82202			if val.chars().count() < 1 {
82203				return Err(ValidationError::new(1001, "sts is shorter than the minimum length of 1".to_string()));
82204			}
82205			if val.chars().count() > 35 {
82206				return Err(ValidationError::new(1002, "sts exceeds the maximum length of 35".to_string()));
82207			}
82208		}
82209		if let Some(ref vec) = self.attchd_doc_nm {
82210			for item in vec {
82211				if item.chars().count() < 1 {
82212					return Err(ValidationError::new(1001, "attchd_doc_nm is shorter than the minimum length of 1".to_string()));
82213				}
82214				if item.chars().count() > 70 {
82215					return Err(ValidationError::new(1002, "attchd_doc_nm exceeds the maximum length of 70".to_string()));
82216				}
82217			}
82218		}
82219		Ok(())
82220	}
82221}
82222
82223
82224// References6 ...
82225#[cfg_attr(feature = "derive_debug", derive(Debug))]
82226#[cfg_attr(feature = "derive_default", derive(Default))]
82227#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82228#[cfg_attr(feature = "derive_clone", derive(Clone))]
82229#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82230pub struct References6 {
82231	#[cfg_attr( feature = "derive_serde", serde(rename = "RjctdReqTp") )]
82232	pub rjctd_req_tp: UseCases1Code,
82233	#[cfg_attr( feature = "derive_serde", serde(rename = "RjctnRsn") )]
82234	pub rjctn_rsn: Vec<String>,
82235	#[cfg_attr( feature = "derive_serde", serde(rename = "RjctdReqId") )]
82236	pub rjctd_req_id: MessageIdentification1,
82237	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
82238	pub msg_id: MessageIdentification1,
82239	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcId") )]
82240	pub prc_id: MessageIdentification1,
82241	#[cfg_attr( feature = "derive_serde", serde(rename = "AttchdDocNm", skip_serializing_if = "Option::is_none") )]
82242	pub attchd_doc_nm: Option<Vec<String>>,
82243}
82244
82245impl References6 {
82246	pub fn validate(&self) -> Result<(), ValidationError> {
82247		self.rjctd_req_tp.validate()?;
82248		for item in &self.rjctn_rsn {
82249			if item.chars().count() < 1 {
82250				return Err(ValidationError::new(1001, "rjctn_rsn is shorter than the minimum length of 1".to_string()));
82251			}
82252			if item.chars().count() > 350 {
82253				return Err(ValidationError::new(1002, "rjctn_rsn exceeds the maximum length of 350".to_string()));
82254			}
82255		}
82256		self.rjctd_req_id.validate()?;
82257		self.msg_id.validate()?;
82258		self.prc_id.validate()?;
82259		if let Some(ref vec) = self.attchd_doc_nm {
82260			for item in vec {
82261				if item.chars().count() < 1 {
82262					return Err(ValidationError::new(1001, "attchd_doc_nm is shorter than the minimum length of 1".to_string()));
82263				}
82264				if item.chars().count() > 70 {
82265					return Err(ValidationError::new(1002, "attchd_doc_nm exceeds the maximum length of 70".to_string()));
82266				}
82267			}
82268		}
82269		Ok(())
82270	}
82271}
82272
82273
82274// References74Choice ...
82275#[cfg_attr(feature = "derive_debug", derive(Debug))]
82276#[cfg_attr(feature = "derive_default", derive(Default))]
82277#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82278#[cfg_attr(feature = "derive_clone", derive(Clone))]
82279#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82280pub struct References74Choice {
82281	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesSttlmTxId", skip_serializing_if = "Option::is_none") )]
82282	pub scties_sttlm_tx_id: Option<String>,
82283	#[cfg_attr( feature = "derive_serde", serde(rename = "IntraPosMvmntId", skip_serializing_if = "Option::is_none") )]
82284	pub intra_pos_mvmnt_id: Option<String>,
82285	#[cfg_attr( feature = "derive_serde", serde(rename = "IntraBalMvmntId", skip_serializing_if = "Option::is_none") )]
82286	pub intra_bal_mvmnt_id: Option<String>,
82287	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrTxId", skip_serializing_if = "Option::is_none") )]
82288	pub acct_svcr_tx_id: Option<String>,
82289	#[cfg_attr( feature = "derive_serde", serde(rename = "MktInfrstrctrTxId", skip_serializing_if = "Option::is_none") )]
82290	pub mkt_infrstrctr_tx_id: Option<String>,
82291	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyMktInfrstrctrTxId", skip_serializing_if = "Option::is_none") )]
82292	pub ctr_pty_mkt_infrstrctr_tx_id: Option<String>,
82293	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolId", skip_serializing_if = "Option::is_none") )]
82294	pub pool_id: Option<String>,
82295	#[cfg_attr( feature = "derive_serde", serde(rename = "CmonId", skip_serializing_if = "Option::is_none") )]
82296	pub cmon_id: Option<String>,
82297	#[cfg_attr( feature = "derive_serde", serde(rename = "TradId", skip_serializing_if = "Option::is_none") )]
82298	pub trad_id: Option<String>,
82299	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrTxId", skip_serializing_if = "Option::is_none") )]
82300	pub othr_tx_id: Option<String>,
82301}
82302
82303impl References74Choice {
82304	pub fn validate(&self) -> Result<(), ValidationError> {
82305		if let Some(ref val) = self.scties_sttlm_tx_id {
82306			if val.chars().count() < 1 {
82307				return Err(ValidationError::new(1001, "scties_sttlm_tx_id is shorter than the minimum length of 1".to_string()));
82308			}
82309			if val.chars().count() > 35 {
82310				return Err(ValidationError::new(1002, "scties_sttlm_tx_id exceeds the maximum length of 35".to_string()));
82311			}
82312		}
82313		if let Some(ref val) = self.intra_pos_mvmnt_id {
82314			if val.chars().count() < 1 {
82315				return Err(ValidationError::new(1001, "intra_pos_mvmnt_id is shorter than the minimum length of 1".to_string()));
82316			}
82317			if val.chars().count() > 35 {
82318				return Err(ValidationError::new(1002, "intra_pos_mvmnt_id exceeds the maximum length of 35".to_string()));
82319			}
82320		}
82321		if let Some(ref val) = self.intra_bal_mvmnt_id {
82322			if val.chars().count() < 1 {
82323				return Err(ValidationError::new(1001, "intra_bal_mvmnt_id is shorter than the minimum length of 1".to_string()));
82324			}
82325			if val.chars().count() > 35 {
82326				return Err(ValidationError::new(1002, "intra_bal_mvmnt_id exceeds the maximum length of 35".to_string()));
82327			}
82328		}
82329		if let Some(ref val) = self.acct_svcr_tx_id {
82330			if val.chars().count() < 1 {
82331				return Err(ValidationError::new(1001, "acct_svcr_tx_id is shorter than the minimum length of 1".to_string()));
82332			}
82333			if val.chars().count() > 35 {
82334				return Err(ValidationError::new(1002, "acct_svcr_tx_id exceeds the maximum length of 35".to_string()));
82335			}
82336		}
82337		if let Some(ref val) = self.mkt_infrstrctr_tx_id {
82338			if val.chars().count() < 1 {
82339				return Err(ValidationError::new(1001, "mkt_infrstrctr_tx_id is shorter than the minimum length of 1".to_string()));
82340			}
82341			if val.chars().count() > 35 {
82342				return Err(ValidationError::new(1002, "mkt_infrstrctr_tx_id exceeds the maximum length of 35".to_string()));
82343			}
82344		}
82345		if let Some(ref val) = self.ctr_pty_mkt_infrstrctr_tx_id {
82346			if val.chars().count() < 1 {
82347				return Err(ValidationError::new(1001, "ctr_pty_mkt_infrstrctr_tx_id is shorter than the minimum length of 1".to_string()));
82348			}
82349			if val.chars().count() > 35 {
82350				return Err(ValidationError::new(1002, "ctr_pty_mkt_infrstrctr_tx_id exceeds the maximum length of 35".to_string()));
82351			}
82352		}
82353		if let Some(ref val) = self.pool_id {
82354			if val.chars().count() < 1 {
82355				return Err(ValidationError::new(1001, "pool_id is shorter than the minimum length of 1".to_string()));
82356			}
82357			if val.chars().count() > 35 {
82358				return Err(ValidationError::new(1002, "pool_id exceeds the maximum length of 35".to_string()));
82359			}
82360		}
82361		if let Some(ref val) = self.cmon_id {
82362			if val.chars().count() < 1 {
82363				return Err(ValidationError::new(1001, "cmon_id is shorter than the minimum length of 1".to_string()));
82364			}
82365			if val.chars().count() > 35 {
82366				return Err(ValidationError::new(1002, "cmon_id exceeds the maximum length of 35".to_string()));
82367			}
82368		}
82369		if let Some(ref val) = self.trad_id {
82370			if val.chars().count() < 1 {
82371				return Err(ValidationError::new(1001, "trad_id is shorter than the minimum length of 1".to_string()));
82372			}
82373			if val.chars().count() > 52 {
82374				return Err(ValidationError::new(1002, "trad_id exceeds the maximum length of 52".to_string()));
82375			}
82376		}
82377		if let Some(ref val) = self.othr_tx_id {
82378			if val.chars().count() < 1 {
82379				return Err(ValidationError::new(1001, "othr_tx_id is shorter than the minimum length of 1".to_string()));
82380			}
82381			if val.chars().count() > 35 {
82382				return Err(ValidationError::new(1002, "othr_tx_id exceeds the maximum length of 35".to_string()));
82383			}
82384		}
82385		Ok(())
82386	}
82387}
82388
82389
82390// Referred1Code ...
82391#[cfg_attr(feature = "derive_debug", derive(Debug))]
82392#[cfg_attr(feature = "derive_default", derive(Default))]
82393#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82394#[cfg_attr(feature = "derive_clone", derive(Clone))]
82395#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82396pub enum Referred1Code {
82397	#[cfg_attr(feature = "derive_default", default)]
82398	#[cfg_attr( feature = "derive_serde", serde(rename = "REFR") )]
82399	CodeREFR,
82400	#[cfg_attr( feature = "derive_serde", serde(rename = "NRFR") )]
82401	CodeNRFR,
82402	#[cfg_attr( feature = "derive_serde", serde(rename = "UKNW") )]
82403	CodeUKNW,
82404}
82405
82406impl Referred1Code {
82407	pub fn validate(&self) -> Result<(), ValidationError> {
82408		Ok(())
82409	}
82410}
82411
82412
82413// ReferredAgent3 ...
82414#[cfg_attr(feature = "derive_debug", derive(Debug))]
82415#[cfg_attr(feature = "derive_default", derive(Default))]
82416#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82417#[cfg_attr(feature = "derive_clone", derive(Clone))]
82418#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82419pub struct ReferredAgent3 {
82420	#[cfg_attr( feature = "derive_serde", serde(rename = "Rfrd") )]
82421	pub rfrd: Referred1Code,
82422	#[cfg_attr( feature = "derive_serde", serde(rename = "RfrdPlcmntAgt", skip_serializing_if = "Option::is_none") )]
82423	pub rfrd_plcmnt_agt: Option<PartyIdentification125Choice>,
82424}
82425
82426impl ReferredAgent3 {
82427	pub fn validate(&self) -> Result<(), ValidationError> {
82428		self.rfrd.validate()?;
82429		if let Some(ref val) = self.rfrd_plcmnt_agt { val.validate()? }
82430		Ok(())
82431	}
82432}
82433
82434
82435// ReferredDocumentInformation7 ...
82436#[cfg_attr(feature = "derive_debug", derive(Debug))]
82437#[cfg_attr(feature = "derive_default", derive(Default))]
82438#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82439#[cfg_attr(feature = "derive_clone", derive(Clone))]
82440#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82441pub struct ReferredDocumentInformation7 {
82442	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
82443	pub tp: Option<ReferredDocumentType4>,
82444	#[cfg_attr( feature = "derive_serde", serde(rename = "Nb", skip_serializing_if = "Option::is_none") )]
82445	pub nb: Option<String>,
82446	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdDt", skip_serializing_if = "Option::is_none") )]
82447	pub rltd_dt: Option<String>,
82448	#[cfg_attr( feature = "derive_serde", serde(rename = "LineDtls", skip_serializing_if = "Option::is_none") )]
82449	pub line_dtls: Option<Vec<DocumentLineInformation1>>,
82450}
82451
82452impl ReferredDocumentInformation7 {
82453	pub fn validate(&self) -> Result<(), ValidationError> {
82454		if let Some(ref val) = self.tp { val.validate()? }
82455		if let Some(ref val) = self.nb {
82456			if val.chars().count() < 1 {
82457				return Err(ValidationError::new(1001, "nb is shorter than the minimum length of 1".to_string()));
82458			}
82459			if val.chars().count() > 35 {
82460				return Err(ValidationError::new(1002, "nb exceeds the maximum length of 35".to_string()));
82461			}
82462		}
82463		if let Some(ref vec) = self.line_dtls { for item in vec { item.validate()? } }
82464		Ok(())
82465	}
82466}
82467
82468
82469// ReferredDocumentInformation8 ...
82470#[cfg_attr(feature = "derive_debug", derive(Debug))]
82471#[cfg_attr(feature = "derive_default", derive(Default))]
82472#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82473#[cfg_attr(feature = "derive_clone", derive(Clone))]
82474#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82475pub struct ReferredDocumentInformation8 {
82476	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
82477	pub tp: Option<DocumentType1>,
82478	#[cfg_attr( feature = "derive_serde", serde(rename = "Nb", skip_serializing_if = "Option::is_none") )]
82479	pub nb: Option<String>,
82480	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdDt", skip_serializing_if = "Option::is_none") )]
82481	pub rltd_dt: Option<DateAndType1>,
82482	#[cfg_attr( feature = "derive_serde", serde(rename = "LineDtls", skip_serializing_if = "Option::is_none") )]
82483	pub line_dtls: Option<Vec<DocumentLineInformation2>>,
82484}
82485
82486impl ReferredDocumentInformation8 {
82487	pub fn validate(&self) -> Result<(), ValidationError> {
82488		if let Some(ref val) = self.tp { val.validate()? }
82489		if let Some(ref val) = self.nb {
82490			if val.chars().count() < 1 {
82491				return Err(ValidationError::new(1001, "nb is shorter than the minimum length of 1".to_string()));
82492			}
82493			if val.chars().count() > 35 {
82494				return Err(ValidationError::new(1002, "nb exceeds the maximum length of 35".to_string()));
82495			}
82496		}
82497		if let Some(ref val) = self.rltd_dt { val.validate()? }
82498		if let Some(ref vec) = self.line_dtls { for item in vec { item.validate()? } }
82499		Ok(())
82500	}
82501}
82502
82503
82504// ReferredDocumentType3Choice ...
82505#[cfg_attr(feature = "derive_debug", derive(Debug))]
82506#[cfg_attr(feature = "derive_default", derive(Default))]
82507#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82508#[cfg_attr(feature = "derive_clone", derive(Clone))]
82509#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82510pub struct ReferredDocumentType3Choice {
82511	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
82512	pub cd: Option<DocumentType6Code>,
82513	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
82514	pub prtry: Option<String>,
82515}
82516
82517impl ReferredDocumentType3Choice {
82518	pub fn validate(&self) -> Result<(), ValidationError> {
82519		if let Some(ref val) = self.cd { val.validate()? }
82520		if let Some(ref val) = self.prtry {
82521			if val.chars().count() < 1 {
82522				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
82523			}
82524			if val.chars().count() > 35 {
82525				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
82526			}
82527		}
82528		Ok(())
82529	}
82530}
82531
82532
82533// ReferredDocumentType4 ...
82534#[cfg_attr(feature = "derive_debug", derive(Debug))]
82535#[cfg_attr(feature = "derive_default", derive(Default))]
82536#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82537#[cfg_attr(feature = "derive_clone", derive(Clone))]
82538#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82539pub struct ReferredDocumentType4 {
82540	#[cfg_attr( feature = "derive_serde", serde(rename = "CdOrPrtry") )]
82541	pub cd_or_prtry: ReferredDocumentType3Choice,
82542	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
82543	pub issr: Option<String>,
82544}
82545
82546impl ReferredDocumentType4 {
82547	pub fn validate(&self) -> Result<(), ValidationError> {
82548		self.cd_or_prtry.validate()?;
82549		if let Some(ref val) = self.issr {
82550			if val.chars().count() < 1 {
82551				return Err(ValidationError::new(1001, "issr is shorter than the minimum length of 1".to_string()));
82552			}
82553			if val.chars().count() > 35 {
82554				return Err(ValidationError::new(1002, "issr exceeds the maximum length of 35".to_string()));
82555			}
82556		}
82557		Ok(())
82558	}
82559}
82560
82561
82562// ReferredMandateDocument2 ...
82563#[cfg_attr(feature = "derive_debug", derive(Debug))]
82564#[cfg_attr(feature = "derive_default", derive(Default))]
82565#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82566#[cfg_attr(feature = "derive_clone", derive(Clone))]
82567#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82568pub struct ReferredMandateDocument2 {
82569	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
82570	pub tp: Option<DocumentType1>,
82571	#[cfg_attr( feature = "derive_serde", serde(rename = "Nb", skip_serializing_if = "Option::is_none") )]
82572	pub nb: Option<String>,
82573	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrRef", skip_serializing_if = "Option::is_none") )]
82574	pub cdtr_ref: Option<String>,
82575	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdDt", skip_serializing_if = "Option::is_none") )]
82576	pub rltd_dt: Option<DateAndType1>,
82577}
82578
82579impl ReferredMandateDocument2 {
82580	pub fn validate(&self) -> Result<(), ValidationError> {
82581		if let Some(ref val) = self.tp { val.validate()? }
82582		if let Some(ref val) = self.nb {
82583			if val.chars().count() < 1 {
82584				return Err(ValidationError::new(1001, "nb is shorter than the minimum length of 1".to_string()));
82585			}
82586			if val.chars().count() > 35 {
82587				return Err(ValidationError::new(1002, "nb exceeds the maximum length of 35".to_string()));
82588			}
82589		}
82590		if let Some(ref val) = self.cdtr_ref {
82591			if val.chars().count() < 1 {
82592				return Err(ValidationError::new(1001, "cdtr_ref is shorter than the minimum length of 1".to_string()));
82593			}
82594			if val.chars().count() > 35 {
82595				return Err(ValidationError::new(1002, "cdtr_ref exceeds the maximum length of 35".to_string()));
82596			}
82597		}
82598		if let Some(ref val) = self.rltd_dt { val.validate()? }
82599		Ok(())
82600	}
82601}
82602
82603
82604// RegisteredContract16 ...
82605#[cfg_attr(feature = "derive_debug", derive(Debug))]
82606#[cfg_attr(feature = "derive_default", derive(Default))]
82607#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82608#[cfg_attr(feature = "derive_clone", derive(Clone))]
82609#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82610pub struct RegisteredContract16 {
82611	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctRegnAmdmntId") )]
82612	pub ctrct_regn_amdmnt_id: String,
82613	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPty") )]
82614	pub rptg_pty: TradeParty6,
82615	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnAgt") )]
82616	pub regn_agt: BranchAndFinancialInstitutionIdentification8,
82617	#[cfg_attr( feature = "derive_serde", serde(rename = "RegdCtrctAmdmnt") )]
82618	pub regd_ctrct_amdmnt: Vec<RegisteredContract17>,
82619	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
82620	pub splmtry_data: Option<Vec<SupplementaryData1>>,
82621}
82622
82623impl RegisteredContract16 {
82624	pub fn validate(&self) -> Result<(), ValidationError> {
82625		if self.ctrct_regn_amdmnt_id.chars().count() < 1 {
82626			return Err(ValidationError::new(1001, "ctrct_regn_amdmnt_id is shorter than the minimum length of 1".to_string()));
82627		}
82628		if self.ctrct_regn_amdmnt_id.chars().count() > 35 {
82629			return Err(ValidationError::new(1002, "ctrct_regn_amdmnt_id exceeds the maximum length of 35".to_string()));
82630		}
82631		self.rptg_pty.validate()?;
82632		self.regn_agt.validate()?;
82633		for item in &self.regd_ctrct_amdmnt { item.validate()? }
82634		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
82635		Ok(())
82636	}
82637}
82638
82639
82640// RegisteredContract17 ...
82641#[cfg_attr(feature = "derive_debug", derive(Debug))]
82642#[cfg_attr(feature = "derive_default", derive(Default))]
82643#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82644#[cfg_attr(feature = "derive_clone", derive(Clone))]
82645#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82646pub struct RegisteredContract17 {
82647	#[cfg_attr( feature = "derive_serde", serde(rename = "RegdCtrctAmdmntId") )]
82648	pub regd_ctrct_amdmnt_id: String,
82649	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlRegdCtrctId") )]
82650	pub orgnl_regd_ctrct_id: String,
82651	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty") )]
82652	pub prty: Priority2Code,
82653	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctrct") )]
82654	pub ctrct: UnderlyingContract4Choice,
82655	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctBal", skip_serializing_if = "Option::is_none") )]
82656	pub ctrct_bal: Option<Vec<ContractBalance1>>,
82657	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtSchdlTp", skip_serializing_if = "Option::is_none") )]
82658	pub pmt_schdl_tp: Option<PaymentScheduleType2Choice>,
82659	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
82660	pub addtl_inf: Option<String>,
82661	#[cfg_attr( feature = "derive_serde", serde(rename = "Attchmnt", skip_serializing_if = "Option::is_none") )]
82662	pub attchmnt: Option<Vec<DocumentGeneralInformation5>>,
82663	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
82664	pub splmtry_data: Option<Vec<SupplementaryData1>>,
82665}
82666
82667impl RegisteredContract17 {
82668	pub fn validate(&self) -> Result<(), ValidationError> {
82669		if self.regd_ctrct_amdmnt_id.chars().count() < 1 {
82670			return Err(ValidationError::new(1001, "regd_ctrct_amdmnt_id is shorter than the minimum length of 1".to_string()));
82671		}
82672		if self.regd_ctrct_amdmnt_id.chars().count() > 35 {
82673			return Err(ValidationError::new(1002, "regd_ctrct_amdmnt_id exceeds the maximum length of 35".to_string()));
82674		}
82675		if self.orgnl_regd_ctrct_id.chars().count() < 1 {
82676			return Err(ValidationError::new(1001, "orgnl_regd_ctrct_id is shorter than the minimum length of 1".to_string()));
82677		}
82678		if self.orgnl_regd_ctrct_id.chars().count() > 35 {
82679			return Err(ValidationError::new(1002, "orgnl_regd_ctrct_id exceeds the maximum length of 35".to_string()));
82680		}
82681		self.prty.validate()?;
82682		self.ctrct.validate()?;
82683		if let Some(ref vec) = self.ctrct_bal { for item in vec { item.validate()? } }
82684		if let Some(ref val) = self.pmt_schdl_tp { val.validate()? }
82685		if let Some(ref val) = self.addtl_inf {
82686			if val.chars().count() < 1 {
82687				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
82688			}
82689			if val.chars().count() > 1025 {
82690				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 1025".to_string()));
82691			}
82692		}
82693		if let Some(ref vec) = self.attchmnt { for item in vec { item.validate()? } }
82694		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
82695		Ok(())
82696	}
82697}
82698
82699
82700// RegisteredContract18 ...
82701#[cfg_attr(feature = "derive_debug", derive(Debug))]
82702#[cfg_attr(feature = "derive_default", derive(Default))]
82703#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82704#[cfg_attr(feature = "derive_clone", derive(Clone))]
82705#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82706pub struct RegisteredContract18 {
82707	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCtrctRegnReq", skip_serializing_if = "Option::is_none") )]
82708	pub orgnl_ctrct_regn_req: Option<String>,
82709	#[cfg_attr( feature = "derive_serde", serde(rename = "IssrFI") )]
82710	pub issr_fi: BranchAndFinancialInstitutionIdentification8,
82711	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctrct") )]
82712	pub ctrct: UnderlyingContract4Choice,
82713	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctBal", skip_serializing_if = "Option::is_none") )]
82714	pub ctrct_bal: Option<Vec<ContractBalance1>>,
82715	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtSchdlTp", skip_serializing_if = "Option::is_none") )]
82716	pub pmt_schdl_tp: Option<PaymentScheduleType2Choice>,
82717	#[cfg_attr( feature = "derive_serde", serde(rename = "RegdCtrctId") )]
82718	pub regd_ctrct_id: DocumentIdentification29,
82719	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsRegdCtrctId", skip_serializing_if = "Option::is_none") )]
82720	pub prvs_regd_ctrct_id: Option<DocumentIdentification22>,
82721	#[cfg_attr( feature = "derive_serde", serde(rename = "RegdCtrctJrnl", skip_serializing_if = "Option::is_none") )]
82722	pub regd_ctrct_jrnl: Option<Vec<RegisteredContractJournal3>>,
82723	#[cfg_attr( feature = "derive_serde", serde(rename = "Amdmnt", skip_serializing_if = "Option::is_none") )]
82724	pub amdmnt: Option<Vec<RegisteredContractAmendment1>>,
82725	#[cfg_attr( feature = "derive_serde", serde(rename = "Submissn") )]
82726	pub submissn: RegisteredContractCommunication1,
82727	#[cfg_attr( feature = "derive_serde", serde(rename = "Dlvry") )]
82728	pub dlvry: RegisteredContractCommunication1,
82729	#[cfg_attr( feature = "derive_serde", serde(rename = "LnPrncplAmt", skip_serializing_if = "Option::is_none") )]
82730	pub ln_prncpl_amt: Option<ActiveCurrencyAndAmount>,
82731	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdDtInd") )]
82732	pub estmtd_dt_ind: bool,
82733	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrCpnyLn") )]
82734	pub intr_cpny_ln: bool,
82735	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
82736	pub addtl_inf: Option<String>,
82737}
82738
82739impl RegisteredContract18 {
82740	pub fn validate(&self) -> Result<(), ValidationError> {
82741		if let Some(ref val) = self.orgnl_ctrct_regn_req {
82742			if val.chars().count() < 1 {
82743				return Err(ValidationError::new(1001, "orgnl_ctrct_regn_req is shorter than the minimum length of 1".to_string()));
82744			}
82745			if val.chars().count() > 35 {
82746				return Err(ValidationError::new(1002, "orgnl_ctrct_regn_req exceeds the maximum length of 35".to_string()));
82747			}
82748		}
82749		self.issr_fi.validate()?;
82750		self.ctrct.validate()?;
82751		if let Some(ref vec) = self.ctrct_bal { for item in vec { item.validate()? } }
82752		if let Some(ref val) = self.pmt_schdl_tp { val.validate()? }
82753		self.regd_ctrct_id.validate()?;
82754		if let Some(ref val) = self.prvs_regd_ctrct_id { val.validate()? }
82755		if let Some(ref vec) = self.regd_ctrct_jrnl { for item in vec { item.validate()? } }
82756		if let Some(ref vec) = self.amdmnt { for item in vec { item.validate()? } }
82757		self.submissn.validate()?;
82758		self.dlvry.validate()?;
82759		if let Some(ref val) = self.ln_prncpl_amt { val.validate()? }
82760		if let Some(ref val) = self.addtl_inf {
82761			if val.chars().count() < 1 {
82762				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
82763			}
82764			if val.chars().count() > 1025 {
82765				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 1025".to_string()));
82766			}
82767		}
82768		Ok(())
82769	}
82770}
82771
82772
82773// RegisteredContract19 ...
82774#[cfg_attr(feature = "derive_debug", derive(Debug))]
82775#[cfg_attr(feature = "derive_default", derive(Default))]
82776#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82777#[cfg_attr(feature = "derive_clone", derive(Clone))]
82778#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82779pub struct RegisteredContract19 {
82780	#[cfg_attr( feature = "derive_serde", serde(rename = "RegdCtrctClsrId") )]
82781	pub regd_ctrct_clsr_id: String,
82782	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPty") )]
82783	pub rptg_pty: TradeParty6,
82784	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnAgt") )]
82785	pub regn_agt: BranchAndFinancialInstitutionIdentification8,
82786	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlRegdCtrct") )]
82787	pub orgnl_regd_ctrct: DocumentIdentification29,
82788	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty") )]
82789	pub prty: Priority2Code,
82790	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsrRsn") )]
82791	pub clsr_rsn: ContractClosureReason1Choice,
82792	#[cfg_attr( feature = "derive_serde", serde(rename = "Cssn", skip_serializing_if = "Option::is_none") )]
82793	pub cssn: Option<ContractCessionData2>,
82794	#[cfg_attr( feature = "derive_serde", serde(rename = "Attchmnt", skip_serializing_if = "Option::is_none") )]
82795	pub attchmnt: Option<Vec<DocumentGeneralInformation5>>,
82796	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
82797	pub splmtry_data: Option<Vec<SupplementaryData1>>,
82798}
82799
82800impl RegisteredContract19 {
82801	pub fn validate(&self) -> Result<(), ValidationError> {
82802		if self.regd_ctrct_clsr_id.chars().count() < 1 {
82803			return Err(ValidationError::new(1001, "regd_ctrct_clsr_id is shorter than the minimum length of 1".to_string()));
82804		}
82805		if self.regd_ctrct_clsr_id.chars().count() > 35 {
82806			return Err(ValidationError::new(1002, "regd_ctrct_clsr_id exceeds the maximum length of 35".to_string()));
82807		}
82808		self.rptg_pty.validate()?;
82809		self.regn_agt.validate()?;
82810		self.orgnl_regd_ctrct.validate()?;
82811		self.prty.validate()?;
82812		self.clsr_rsn.validate()?;
82813		if let Some(ref val) = self.cssn { val.validate()? }
82814		if let Some(ref vec) = self.attchmnt { for item in vec { item.validate()? } }
82815		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
82816		Ok(())
82817	}
82818}
82819
82820
82821// RegisteredContract20 ...
82822#[cfg_attr(feature = "derive_debug", derive(Debug))]
82823#[cfg_attr(feature = "derive_default", derive(Default))]
82824#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82825#[cfg_attr(feature = "derive_clone", derive(Clone))]
82826#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82827pub struct RegisteredContract20 {
82828	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCtrctRegnReq", skip_serializing_if = "Option::is_none") )]
82829	pub orgnl_ctrct_regn_req: Option<String>,
82830	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPty") )]
82831	pub rptg_pty: TradeParty6,
82832	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnAgt") )]
82833	pub regn_agt: BranchAndFinancialInstitutionIdentification8,
82834	#[cfg_attr( feature = "derive_serde", serde(rename = "IssrFI") )]
82835	pub issr_fi: BranchAndFinancialInstitutionIdentification8,
82836	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctrct") )]
82837	pub ctrct: UnderlyingContract4Choice,
82838	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctBal", skip_serializing_if = "Option::is_none") )]
82839	pub ctrct_bal: Option<Vec<ContractBalance1>>,
82840	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtSchdlTp", skip_serializing_if = "Option::is_none") )]
82841	pub pmt_schdl_tp: Option<PaymentScheduleType2Choice>,
82842	#[cfg_attr( feature = "derive_serde", serde(rename = "RegdCtrctId") )]
82843	pub regd_ctrct_id: DocumentIdentification29,
82844	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsRegdCtrctId", skip_serializing_if = "Option::is_none") )]
82845	pub prvs_regd_ctrct_id: Option<DocumentIdentification22>,
82846	#[cfg_attr( feature = "derive_serde", serde(rename = "RegdCtrctJrnl", skip_serializing_if = "Option::is_none") )]
82847	pub regd_ctrct_jrnl: Option<Vec<RegisteredContractJournal3>>,
82848	#[cfg_attr( feature = "derive_serde", serde(rename = "Amdmnt", skip_serializing_if = "Option::is_none") )]
82849	pub amdmnt: Option<Vec<RegisteredContractAmendment1>>,
82850	#[cfg_attr( feature = "derive_serde", serde(rename = "Submissn") )]
82851	pub submissn: RegisteredContractCommunication1,
82852	#[cfg_attr( feature = "derive_serde", serde(rename = "Dlvry") )]
82853	pub dlvry: RegisteredContractCommunication1,
82854	#[cfg_attr( feature = "derive_serde", serde(rename = "LnPrncplAmt", skip_serializing_if = "Option::is_none") )]
82855	pub ln_prncpl_amt: Option<ActiveCurrencyAndAmount>,
82856	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdDtInd") )]
82857	pub estmtd_dt_ind: bool,
82858	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrCpnyLn") )]
82859	pub intr_cpny_ln: bool,
82860	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
82861	pub addtl_inf: Option<String>,
82862	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
82863	pub splmtry_data: Option<Vec<SupplementaryData1>>,
82864}
82865
82866impl RegisteredContract20 {
82867	pub fn validate(&self) -> Result<(), ValidationError> {
82868		if let Some(ref val) = self.orgnl_ctrct_regn_req {
82869			if val.chars().count() < 1 {
82870				return Err(ValidationError::new(1001, "orgnl_ctrct_regn_req is shorter than the minimum length of 1".to_string()));
82871			}
82872			if val.chars().count() > 35 {
82873				return Err(ValidationError::new(1002, "orgnl_ctrct_regn_req exceeds the maximum length of 35".to_string()));
82874			}
82875		}
82876		self.rptg_pty.validate()?;
82877		self.regn_agt.validate()?;
82878		self.issr_fi.validate()?;
82879		self.ctrct.validate()?;
82880		if let Some(ref vec) = self.ctrct_bal { for item in vec { item.validate()? } }
82881		if let Some(ref val) = self.pmt_schdl_tp { val.validate()? }
82882		self.regd_ctrct_id.validate()?;
82883		if let Some(ref val) = self.prvs_regd_ctrct_id { val.validate()? }
82884		if let Some(ref vec) = self.regd_ctrct_jrnl { for item in vec { item.validate()? } }
82885		if let Some(ref vec) = self.amdmnt { for item in vec { item.validate()? } }
82886		self.submissn.validate()?;
82887		self.dlvry.validate()?;
82888		if let Some(ref val) = self.ln_prncpl_amt { val.validate()? }
82889		if let Some(ref val) = self.addtl_inf {
82890			if val.chars().count() < 1 {
82891				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
82892			}
82893			if val.chars().count() > 1025 {
82894				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 1025".to_string()));
82895			}
82896		}
82897		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
82898		Ok(())
82899	}
82900}
82901
82902
82903// RegisteredContractAmendment1 ...
82904#[cfg_attr(feature = "derive_debug", derive(Debug))]
82905#[cfg_attr(feature = "derive_default", derive(Default))]
82906#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82907#[cfg_attr(feature = "derive_clone", derive(Clone))]
82908#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82909pub struct RegisteredContractAmendment1 {
82910	#[cfg_attr( feature = "derive_serde", serde(rename = "AmdmntDt") )]
82911	pub amdmnt_dt: String,
82912	#[cfg_attr( feature = "derive_serde", serde(rename = "Doc") )]
82913	pub doc: DocumentIdentification28,
82914	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
82915	pub start_dt: Option<String>,
82916	#[cfg_attr( feature = "derive_serde", serde(rename = "AmdmntRsn", skip_serializing_if = "Option::is_none") )]
82917	pub amdmnt_rsn: Option<String>,
82918	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
82919	pub addtl_inf: Option<String>,
82920}
82921
82922impl RegisteredContractAmendment1 {
82923	pub fn validate(&self) -> Result<(), ValidationError> {
82924		self.doc.validate()?;
82925		if let Some(ref val) = self.amdmnt_rsn {
82926			if val.chars().count() < 1 {
82927				return Err(ValidationError::new(1001, "amdmnt_rsn is shorter than the minimum length of 1".to_string()));
82928			}
82929			if val.chars().count() > 35 {
82930				return Err(ValidationError::new(1002, "amdmnt_rsn exceeds the maximum length of 35".to_string()));
82931			}
82932		}
82933		if let Some(ref val) = self.addtl_inf {
82934			if val.chars().count() < 1 {
82935				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
82936			}
82937			if val.chars().count() > 1025 {
82938				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 1025".to_string()));
82939			}
82940		}
82941		Ok(())
82942	}
82943}
82944
82945
82946// RegisteredContractCommunication1 ...
82947#[cfg_attr(feature = "derive_debug", derive(Debug))]
82948#[cfg_attr(feature = "derive_default", derive(Default))]
82949#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82950#[cfg_attr(feature = "derive_clone", derive(Clone))]
82951#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82952pub struct RegisteredContractCommunication1 {
82953	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtd") )]
82954	pub mtd: CommunicationMethod4Code,
82955	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt") )]
82956	pub dt: String,
82957}
82958
82959impl RegisteredContractCommunication1 {
82960	pub fn validate(&self) -> Result<(), ValidationError> {
82961		self.mtd.validate()?;
82962		Ok(())
82963	}
82964}
82965
82966
82967// RegisteredContractJournal3 ...
82968#[cfg_attr(feature = "derive_debug", derive(Debug))]
82969#[cfg_attr(feature = "derive_default", derive(Default))]
82970#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82971#[cfg_attr(feature = "derive_clone", derive(Clone))]
82972#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
82973pub struct RegisteredContractJournal3 {
82974	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnAgt") )]
82975	pub regn_agt: BranchAndFinancialInstitutionIdentification8,
82976	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqId", skip_serializing_if = "Option::is_none") )]
82977	pub unq_id: Option<DocumentIdentification28>,
82978	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsrDt") )]
82979	pub clsr_dt: String,
82980	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsrRsn") )]
82981	pub clsr_rsn: ContractClosureReason1Choice,
82982}
82983
82984impl RegisteredContractJournal3 {
82985	pub fn validate(&self) -> Result<(), ValidationError> {
82986		self.regn_agt.validate()?;
82987		if let Some(ref val) = self.unq_id { val.validate()? }
82988		self.clsr_rsn.validate()?;
82989		Ok(())
82990	}
82991}
82992
82993
82994// RegisteredShareholderName1Choice ...
82995#[cfg_attr(feature = "derive_debug", derive(Debug))]
82996#[cfg_attr(feature = "derive_default", derive(Default))]
82997#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
82998#[cfg_attr(feature = "derive_clone", derive(Clone))]
82999#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83000pub struct RegisteredShareholderName1Choice {
83001	#[cfg_attr( feature = "derive_serde", serde(rename = "IndvPrsn", skip_serializing_if = "Option::is_none") )]
83002	pub indv_prsn: Option<IndividualPerson29>,
83003	#[cfg_attr( feature = "derive_serde", serde(rename = "Org", skip_serializing_if = "Option::is_none") )]
83004	pub org: Option<Organisation23>,
83005}
83006
83007impl RegisteredShareholderName1Choice {
83008	pub fn validate(&self) -> Result<(), ValidationError> {
83009		if let Some(ref val) = self.indv_prsn { val.validate()? }
83010		if let Some(ref val) = self.org { val.validate()? }
83011		Ok(())
83012	}
83013}
83014
83015
83016// RegulatoryAuthority2 ...
83017#[cfg_attr(feature = "derive_debug", derive(Debug))]
83018#[cfg_attr(feature = "derive_default", derive(Default))]
83019#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83020#[cfg_attr(feature = "derive_clone", derive(Clone))]
83021#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83022pub struct RegulatoryAuthority2 {
83023	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
83024	pub nm: Option<String>,
83025	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
83026	pub ctry: Option<String>,
83027}
83028
83029impl RegulatoryAuthority2 {
83030	pub fn validate(&self) -> Result<(), ValidationError> {
83031		if let Some(ref val) = self.nm {
83032			if val.chars().count() < 1 {
83033				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
83034			}
83035			if val.chars().count() > 140 {
83036				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
83037			}
83038		}
83039		if let Some(ref val) = self.ctry {
83040			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
83041			if !pattern.is_match(val) {
83042				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
83043			}
83044		}
83045		Ok(())
83046	}
83047}
83048
83049
83050// RegulatoryInformation1 ...
83051#[cfg_attr(feature = "derive_debug", derive(Debug))]
83052#[cfg_attr(feature = "derive_default", derive(Default))]
83053#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83054#[cfg_attr(feature = "derive_clone", derive(Clone))]
83055#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83056pub struct RegulatoryInformation1 {
83057	#[cfg_attr( feature = "derive_serde", serde(rename = "Sctr", skip_serializing_if = "Option::is_none") )]
83058	pub sctr: Option<String>,
83059	#[cfg_attr( feature = "derive_serde", serde(rename = "Brnch", skip_serializing_if = "Option::is_none") )]
83060	pub brnch: Option<String>,
83061	#[cfg_attr( feature = "derive_serde", serde(rename = "Grp", skip_serializing_if = "Option::is_none") )]
83062	pub grp: Option<String>,
83063	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
83064	pub othr: Option<String>,
83065}
83066
83067impl RegulatoryInformation1 {
83068	pub fn validate(&self) -> Result<(), ValidationError> {
83069		if let Some(ref val) = self.sctr {
83070			if val.chars().count() < 1 {
83071				return Err(ValidationError::new(1001, "sctr is shorter than the minimum length of 1".to_string()));
83072			}
83073			if val.chars().count() > 35 {
83074				return Err(ValidationError::new(1002, "sctr exceeds the maximum length of 35".to_string()));
83075			}
83076		}
83077		if let Some(ref val) = self.brnch {
83078			if val.chars().count() < 1 {
83079				return Err(ValidationError::new(1001, "brnch is shorter than the minimum length of 1".to_string()));
83080			}
83081			if val.chars().count() > 35 {
83082				return Err(ValidationError::new(1002, "brnch exceeds the maximum length of 35".to_string()));
83083			}
83084		}
83085		if let Some(ref val) = self.grp {
83086			if val.chars().count() < 1 {
83087				return Err(ValidationError::new(1001, "grp is shorter than the minimum length of 1".to_string()));
83088			}
83089			if val.chars().count() > 35 {
83090				return Err(ValidationError::new(1002, "grp exceeds the maximum length of 35".to_string()));
83091			}
83092		}
83093		if let Some(ref val) = self.othr {
83094			if val.chars().count() < 1 {
83095				return Err(ValidationError::new(1001, "othr is shorter than the minimum length of 1".to_string()));
83096			}
83097			if val.chars().count() > 35 {
83098				return Err(ValidationError::new(1002, "othr exceeds the maximum length of 35".to_string()));
83099			}
83100		}
83101		Ok(())
83102	}
83103}
83104
83105
83106// RegulatoryReporting3 ...
83107#[cfg_attr(feature = "derive_debug", derive(Debug))]
83108#[cfg_attr(feature = "derive_default", derive(Default))]
83109#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83110#[cfg_attr(feature = "derive_clone", derive(Clone))]
83111#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83112pub struct RegulatoryReporting3 {
83113	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtCdtRptgInd", skip_serializing_if = "Option::is_none") )]
83114	pub dbt_cdt_rptg_ind: Option<RegulatoryReportingType1Code>,
83115	#[cfg_attr( feature = "derive_serde", serde(rename = "Authrty", skip_serializing_if = "Option::is_none") )]
83116	pub authrty: Option<RegulatoryAuthority2>,
83117	#[cfg_attr( feature = "derive_serde", serde(rename = "Dtls", skip_serializing_if = "Option::is_none") )]
83118	pub dtls: Option<Vec<StructuredRegulatoryReporting3>>,
83119}
83120
83121impl RegulatoryReporting3 {
83122	pub fn validate(&self) -> Result<(), ValidationError> {
83123		if let Some(ref val) = self.dbt_cdt_rptg_ind { val.validate()? }
83124		if let Some(ref val) = self.authrty { val.validate()? }
83125		if let Some(ref vec) = self.dtls { for item in vec { item.validate()? } }
83126		Ok(())
83127	}
83128}
83129
83130
83131// RegulatoryReportingNotification4 ...
83132#[cfg_attr(feature = "derive_debug", derive(Debug))]
83133#[cfg_attr(feature = "derive_default", derive(Default))]
83134#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83135#[cfg_attr(feature = "derive_clone", derive(Clone))]
83136#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83137pub struct RegulatoryReportingNotification4 {
83138	#[cfg_attr( feature = "derive_serde", serde(rename = "TxNtfctnId") )]
83139	pub tx_ntfctn_id: String,
83140	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr") )]
83141	pub acct_ownr: PartyIdentification272,
83142	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr") )]
83143	pub acct_svcr: BranchAndFinancialInstitutionIdentification8,
83144	#[cfg_attr( feature = "derive_serde", serde(rename = "TxCert") )]
83145	pub tx_cert: Vec<TransactionCertificate4>,
83146}
83147
83148impl RegulatoryReportingNotification4 {
83149	pub fn validate(&self) -> Result<(), ValidationError> {
83150		if self.tx_ntfctn_id.chars().count() < 1 {
83151			return Err(ValidationError::new(1001, "tx_ntfctn_id is shorter than the minimum length of 1".to_string()));
83152		}
83153		if self.tx_ntfctn_id.chars().count() > 35 {
83154			return Err(ValidationError::new(1002, "tx_ntfctn_id exceeds the maximum length of 35".to_string()));
83155		}
83156		self.acct_ownr.validate()?;
83157		self.acct_svcr.validate()?;
83158		for item in &self.tx_cert { item.validate()? }
83159		Ok(())
83160	}
83161}
83162
83163
83164// RegulatoryReportingType1Code ...
83165#[cfg_attr(feature = "derive_debug", derive(Debug))]
83166#[cfg_attr(feature = "derive_default", derive(Default))]
83167#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83168#[cfg_attr(feature = "derive_clone", derive(Clone))]
83169#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83170pub enum RegulatoryReportingType1Code {
83171	#[cfg_attr(feature = "derive_default", default)]
83172	#[cfg_attr( feature = "derive_serde", serde(rename = "CRED") )]
83173	CodeCRED,
83174	#[cfg_attr( feature = "derive_serde", serde(rename = "DEBT") )]
83175	CodeDEBT,
83176	#[cfg_attr( feature = "derive_serde", serde(rename = "BOTH") )]
83177	CodeBOTH,
83178}
83179
83180impl RegulatoryReportingType1Code {
83181	pub fn validate(&self) -> Result<(), ValidationError> {
83182		Ok(())
83183	}
83184}
83185
83186
83187// RegulatoryTradingCapacity1Code ...
83188#[cfg_attr(feature = "derive_debug", derive(Debug))]
83189#[cfg_attr(feature = "derive_default", derive(Default))]
83190#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83191#[cfg_attr(feature = "derive_clone", derive(Clone))]
83192#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83193pub enum RegulatoryTradingCapacity1Code {
83194	#[cfg_attr(feature = "derive_default", default)]
83195	#[cfg_attr( feature = "derive_serde", serde(rename = "MTCH") )]
83196	CodeMTCH,
83197	#[cfg_attr( feature = "derive_serde", serde(rename = "DEAL") )]
83198	CodeDEAL,
83199	#[cfg_attr( feature = "derive_serde", serde(rename = "AOTC") )]
83200	CodeAOTC,
83201}
83202
83203impl RegulatoryTradingCapacity1Code {
83204	pub fn validate(&self) -> Result<(), ValidationError> {
83205		Ok(())
83206	}
83207}
83208
83209
83210// ReinvestedCashTypeAndAmount1 ...
83211#[cfg_attr(feature = "derive_debug", derive(Debug))]
83212#[cfg_attr(feature = "derive_default", derive(Default))]
83213#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83214#[cfg_attr(feature = "derive_clone", derive(Clone))]
83215#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83216pub struct ReinvestedCashTypeAndAmount1 {
83217	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
83218	pub tp: ReinvestmentType1Code,
83219	#[cfg_attr( feature = "derive_serde", serde(rename = "RinvstdCshAmt") )]
83220	pub rinvstd_csh_amt: ActiveOrHistoricCurrencyAndAmount,
83221}
83222
83223impl ReinvestedCashTypeAndAmount1 {
83224	pub fn validate(&self) -> Result<(), ValidationError> {
83225		self.tp.validate()?;
83226		self.rinvstd_csh_amt.validate()?;
83227		Ok(())
83228	}
83229}
83230
83231
83232// ReinvestedCashTypeAndAmount2 ...
83233#[cfg_attr(feature = "derive_debug", derive(Debug))]
83234#[cfg_attr(feature = "derive_default", derive(Default))]
83235#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83236#[cfg_attr(feature = "derive_clone", derive(Clone))]
83237#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83238pub struct ReinvestedCashTypeAndAmount2 {
83239	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
83240	pub tp: ReinvestmentType1Code,
83241	#[cfg_attr( feature = "derive_serde", serde(rename = "RinvstdCshCcy") )]
83242	pub rinvstd_csh_ccy: String,
83243}
83244
83245impl ReinvestedCashTypeAndAmount2 {
83246	pub fn validate(&self) -> Result<(), ValidationError> {
83247		self.tp.validate()?;
83248		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
83249		if !pattern.is_match(&self.rinvstd_csh_ccy) {
83250			return Err(ValidationError::new(1005, "rinvstd_csh_ccy does not match the required pattern".to_string()));
83251		}
83252		Ok(())
83253	}
83254}
83255
83256
83257// Reinvestment4 ...
83258#[cfg_attr(feature = "derive_debug", derive(Debug))]
83259#[cfg_attr(feature = "derive_default", derive(Default))]
83260#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83261#[cfg_attr(feature = "derive_clone", derive(Clone))]
83262#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83263pub struct Reinvestment4 {
83264	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmDtls") )]
83265	pub fin_instrm_dtls: FinancialInstrument87,
83266	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdNAVCcy", skip_serializing_if = "Option::is_none") )]
83267	pub reqd_nav_ccy: Option<String>,
83268	#[cfg_attr( feature = "derive_serde", serde(rename = "RinvstmtPctg") )]
83269	pub rinvstmt_pctg: f64,
83270}
83271
83272impl Reinvestment4 {
83273	pub fn validate(&self) -> Result<(), ValidationError> {
83274		self.fin_instrm_dtls.validate()?;
83275		if let Some(ref val) = self.reqd_nav_ccy {
83276			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
83277			if !pattern.is_match(val) {
83278				return Err(ValidationError::new(1005, "reqd_nav_ccy does not match the required pattern".to_string()));
83279			}
83280		}
83281		Ok(())
83282	}
83283}
83284
83285
83286// ReinvestmentType1Code ...
83287#[cfg_attr(feature = "derive_debug", derive(Debug))]
83288#[cfg_attr(feature = "derive_default", derive(Default))]
83289#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83290#[cfg_attr(feature = "derive_clone", derive(Clone))]
83291#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83292pub enum ReinvestmentType1Code {
83293	#[cfg_attr(feature = "derive_default", default)]
83294	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
83295	CodeOTHR,
83296	#[cfg_attr( feature = "derive_serde", serde(rename = "OCMP") )]
83297	CodeOCMP,
83298	#[cfg_attr( feature = "derive_serde", serde(rename = "MMFT") )]
83299	CodeMMFT,
83300	#[cfg_attr( feature = "derive_serde", serde(rename = "REPM") )]
83301	CodeREPM,
83302	#[cfg_attr( feature = "derive_serde", serde(rename = "SDPU") )]
83303	CodeSDPU,
83304}
83305
83306impl ReinvestmentType1Code {
83307	pub fn validate(&self) -> Result<(), ValidationError> {
83308		Ok(())
83309	}
83310}
83311
83312
83313// RejectedReason16Choice ...
83314#[cfg_attr(feature = "derive_debug", derive(Debug))]
83315#[cfg_attr(feature = "derive_default", derive(Default))]
83316#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83317#[cfg_attr(feature = "derive_clone", derive(Clone))]
83318#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83319pub struct RejectedReason16Choice {
83320	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
83321	pub cd: Option<RejectedStatusReason6Code>,
83322	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
83323	pub prtry: Option<GenericIdentification36>,
83324}
83325
83326impl RejectedReason16Choice {
83327	pub fn validate(&self) -> Result<(), ValidationError> {
83328		if let Some(ref val) = self.cd { val.validate()? }
83329		if let Some(ref val) = self.prtry { val.validate()? }
83330		Ok(())
83331	}
83332}
83333
83334
83335// RejectedReason7Choice ...
83336#[cfg_attr(feature = "derive_debug", derive(Debug))]
83337#[cfg_attr(feature = "derive_default", derive(Default))]
83338#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83339#[cfg_attr(feature = "derive_clone", derive(Clone))]
83340#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83341pub struct RejectedReason7Choice {
83342	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
83343	pub cd: Option<String>,
83344	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
83345	pub prtry: Option<GenericIdentification36>,
83346}
83347
83348impl RejectedReason7Choice {
83349	pub fn validate(&self) -> Result<(), ValidationError> {
83350		if let Some(ref val) = self.cd {
83351			if val.chars().count() < 1 {
83352				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
83353			}
83354			if val.chars().count() > 4 {
83355				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
83356			}
83357		}
83358		if let Some(ref val) = self.prtry { val.validate()? }
83359		Ok(())
83360	}
83361}
83362
83363
83364// RejectedReason8Choice ...
83365#[cfg_attr(feature = "derive_debug", derive(Debug))]
83366#[cfg_attr(feature = "derive_default", derive(Default))]
83367#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83368#[cfg_attr(feature = "derive_clone", derive(Clone))]
83369#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83370pub struct RejectedReason8Choice {
83371	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
83372	pub no_spcfd_rsn: Option<NoReasonCode>,
83373	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
83374	pub rsn: Option<Vec<RejectedReason7Choice>>,
83375}
83376
83377impl RejectedReason8Choice {
83378	pub fn validate(&self) -> Result<(), ValidationError> {
83379		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
83380		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
83381		Ok(())
83382	}
83383}
83384
83385
83386// RejectedStatusReason12 ...
83387#[cfg_attr(feature = "derive_debug", derive(Debug))]
83388#[cfg_attr(feature = "derive_default", derive(Default))]
83389#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83390#[cfg_attr(feature = "derive_clone", derive(Clone))]
83391#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83392pub struct RejectedStatusReason12 {
83393	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
83394	pub rsn: RejectedReason8Choice,
83395	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
83396	pub addtl_rsn_inf: Option<String>,
83397}
83398
83399impl RejectedStatusReason12 {
83400	pub fn validate(&self) -> Result<(), ValidationError> {
83401		self.rsn.validate()?;
83402		if let Some(ref val) = self.addtl_rsn_inf {
83403			if val.chars().count() < 1 {
83404				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
83405			}
83406			if val.chars().count() > 210 {
83407				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
83408			}
83409		}
83410		Ok(())
83411	}
83412}
83413
83414
83415// RejectedStatusReason6Code ...
83416#[cfg_attr(feature = "derive_debug", derive(Debug))]
83417#[cfg_attr(feature = "derive_default", derive(Default))]
83418#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83419#[cfg_attr(feature = "derive_clone", derive(Clone))]
83420#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83421pub enum RejectedStatusReason6Code {
83422	#[cfg_attr(feature = "derive_default", default)]
83423	#[cfg_attr( feature = "derive_serde", serde(rename = "SAFE") )]
83424	CodeSAFE,
83425	#[cfg_attr( feature = "derive_serde", serde(rename = "NSLA") )]
83426	CodeNSLA,
83427}
83428
83429impl RejectedStatusReason6Code {
83430	pub fn validate(&self) -> Result<(), ValidationError> {
83431		Ok(())
83432	}
83433}
83434
83435
83436// RejectionAndRepairReason32Choice ...
83437#[cfg_attr(feature = "derive_debug", derive(Debug))]
83438#[cfg_attr(feature = "derive_default", derive(Default))]
83439#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83440#[cfg_attr(feature = "derive_clone", derive(Clone))]
83441#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83442pub struct RejectionAndRepairReason32Choice {
83443	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
83444	pub cd: Option<RejectionReason33Code>,
83445	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
83446	pub prtry: Option<GenericIdentification30>,
83447}
83448
83449impl RejectionAndRepairReason32Choice {
83450	pub fn validate(&self) -> Result<(), ValidationError> {
83451		if let Some(ref val) = self.cd { val.validate()? }
83452		if let Some(ref val) = self.prtry { val.validate()? }
83453		Ok(())
83454	}
83455}
83456
83457
83458// RejectionAndRepairReason33Choice ...
83459#[cfg_attr(feature = "derive_debug", derive(Debug))]
83460#[cfg_attr(feature = "derive_default", derive(Default))]
83461#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83462#[cfg_attr(feature = "derive_clone", derive(Clone))]
83463#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83464pub struct RejectionAndRepairReason33Choice {
83465	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
83466	pub cd: Option<RejectionReason34Code>,
83467	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
83468	pub prtry: Option<GenericIdentification30>,
83469}
83470
83471impl RejectionAndRepairReason33Choice {
83472	pub fn validate(&self) -> Result<(), ValidationError> {
83473		if let Some(ref val) = self.cd { val.validate()? }
83474		if let Some(ref val) = self.prtry { val.validate()? }
83475		Ok(())
83476	}
83477}
83478
83479
83480// RejectionAndRepairReason34Choice ...
83481#[cfg_attr(feature = "derive_debug", derive(Debug))]
83482#[cfg_attr(feature = "derive_default", derive(Default))]
83483#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83484#[cfg_attr(feature = "derive_clone", derive(Clone))]
83485#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83486pub struct RejectionAndRepairReason34Choice {
83487	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
83488	pub cd: Option<RejectionReason35Code>,
83489	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
83490	pub prtry: Option<GenericIdentification30>,
83491}
83492
83493impl RejectionAndRepairReason34Choice {
83494	pub fn validate(&self) -> Result<(), ValidationError> {
83495		if let Some(ref val) = self.cd { val.validate()? }
83496		if let Some(ref val) = self.prtry { val.validate()? }
83497		Ok(())
83498	}
83499}
83500
83501
83502// RejectionOrRepairReason32 ...
83503#[cfg_attr(feature = "derive_debug", derive(Debug))]
83504#[cfg_attr(feature = "derive_default", derive(Default))]
83505#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83506#[cfg_attr(feature = "derive_clone", derive(Clone))]
83507#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83508pub struct RejectionOrRepairReason32 {
83509	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
83510	pub cd: Option<Vec<RejectionAndRepairReason32Choice>>,
83511	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
83512	pub addtl_rsn_inf: Option<String>,
83513}
83514
83515impl RejectionOrRepairReason32 {
83516	pub fn validate(&self) -> Result<(), ValidationError> {
83517		if let Some(ref vec) = self.cd { for item in vec { item.validate()? } }
83518		if let Some(ref val) = self.addtl_rsn_inf {
83519			if val.chars().count() < 1 {
83520				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
83521			}
83522			if val.chars().count() > 210 {
83523				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
83524			}
83525		}
83526		Ok(())
83527	}
83528}
83529
83530
83531// RejectionOrRepairReason33 ...
83532#[cfg_attr(feature = "derive_debug", derive(Debug))]
83533#[cfg_attr(feature = "derive_default", derive(Default))]
83534#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83535#[cfg_attr(feature = "derive_clone", derive(Clone))]
83536#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83537pub struct RejectionOrRepairReason33 {
83538	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
83539	pub cd: RejectionAndRepairReason33Choice,
83540	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
83541	pub addtl_rsn_inf: Option<String>,
83542}
83543
83544impl RejectionOrRepairReason33 {
83545	pub fn validate(&self) -> Result<(), ValidationError> {
83546		self.cd.validate()?;
83547		if let Some(ref val) = self.addtl_rsn_inf {
83548			if val.chars().count() < 1 {
83549				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
83550			}
83551			if val.chars().count() > 210 {
83552				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
83553			}
83554		}
83555		Ok(())
83556	}
83557}
83558
83559
83560// RejectionOrRepairReason34 ...
83561#[cfg_attr(feature = "derive_debug", derive(Debug))]
83562#[cfg_attr(feature = "derive_default", derive(Default))]
83563#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83564#[cfg_attr(feature = "derive_clone", derive(Clone))]
83565#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83566pub struct RejectionOrRepairReason34 {
83567	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
83568	pub cd: RejectionAndRepairReason34Choice,
83569	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
83570	pub addtl_rsn_inf: Option<String>,
83571}
83572
83573impl RejectionOrRepairReason34 {
83574	pub fn validate(&self) -> Result<(), ValidationError> {
83575		self.cd.validate()?;
83576		if let Some(ref val) = self.addtl_rsn_inf {
83577			if val.chars().count() < 1 {
83578				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
83579			}
83580			if val.chars().count() > 210 {
83581				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 210".to_string()));
83582			}
83583		}
83584		Ok(())
83585	}
83586}
83587
83588
83589// RejectionOrRepairStatus38Choice ...
83590#[cfg_attr(feature = "derive_debug", derive(Debug))]
83591#[cfg_attr(feature = "derive_default", derive(Default))]
83592#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83593#[cfg_attr(feature = "derive_clone", derive(Clone))]
83594#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83595pub struct RejectionOrRepairStatus38Choice {
83596	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
83597	pub no_spcfd_rsn: Option<NoReasonCode>,
83598	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
83599	pub rsn: Option<Vec<RejectionOrRepairReason32>>,
83600}
83601
83602impl RejectionOrRepairStatus38Choice {
83603	pub fn validate(&self) -> Result<(), ValidationError> {
83604		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
83605		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
83606		Ok(())
83607	}
83608}
83609
83610
83611// RejectionOrRepairStatus39Choice ...
83612#[cfg_attr(feature = "derive_debug", derive(Debug))]
83613#[cfg_attr(feature = "derive_default", derive(Default))]
83614#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83615#[cfg_attr(feature = "derive_clone", derive(Clone))]
83616#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83617pub struct RejectionOrRepairStatus39Choice {
83618	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
83619	pub no_spcfd_rsn: Option<NoReasonCode>,
83620	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
83621	pub rsn: Option<Vec<RejectionOrRepairReason33>>,
83622}
83623
83624impl RejectionOrRepairStatus39Choice {
83625	pub fn validate(&self) -> Result<(), ValidationError> {
83626		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
83627		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
83628		Ok(())
83629	}
83630}
83631
83632
83633// RejectionOrRepairStatus40Choice ...
83634#[cfg_attr(feature = "derive_debug", derive(Debug))]
83635#[cfg_attr(feature = "derive_default", derive(Default))]
83636#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83637#[cfg_attr(feature = "derive_clone", derive(Clone))]
83638#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83639pub struct RejectionOrRepairStatus40Choice {
83640	#[cfg_attr( feature = "derive_serde", serde(rename = "NoSpcfdRsn", skip_serializing_if = "Option::is_none") )]
83641	pub no_spcfd_rsn: Option<NoReasonCode>,
83642	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
83643	pub rsn: Option<Vec<RejectionOrRepairReason34>>,
83644}
83645
83646impl RejectionOrRepairStatus40Choice {
83647	pub fn validate(&self) -> Result<(), ValidationError> {
83648		if let Some(ref val) = self.no_spcfd_rsn { val.validate()? }
83649		if let Some(ref vec) = self.rsn { for item in vec { item.validate()? } }
83650		Ok(())
83651	}
83652}
83653
83654
83655// RejectionReason2 ...
83656#[cfg_attr(feature = "derive_debug", derive(Debug))]
83657#[cfg_attr(feature = "derive_default", derive(Default))]
83658#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83659#[cfg_attr(feature = "derive_clone", derive(Clone))]
83660#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83661pub struct RejectionReason2 {
83662	#[cfg_attr( feature = "derive_serde", serde(rename = "RjctgPtyRsn") )]
83663	pub rjctg_pty_rsn: String,
83664	#[cfg_attr( feature = "derive_serde", serde(rename = "RjctnDtTm", skip_serializing_if = "Option::is_none") )]
83665	pub rjctn_dt_tm: Option<String>,
83666	#[cfg_attr( feature = "derive_serde", serde(rename = "ErrLctn", skip_serializing_if = "Option::is_none") )]
83667	pub err_lctn: Option<String>,
83668	#[cfg_attr( feature = "derive_serde", serde(rename = "RsnDesc", skip_serializing_if = "Option::is_none") )]
83669	pub rsn_desc: Option<String>,
83670	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlData", skip_serializing_if = "Option::is_none") )]
83671	pub addtl_data: Option<String>,
83672}
83673
83674impl RejectionReason2 {
83675	pub fn validate(&self) -> Result<(), ValidationError> {
83676		if self.rjctg_pty_rsn.chars().count() < 1 {
83677			return Err(ValidationError::new(1001, "rjctg_pty_rsn is shorter than the minimum length of 1".to_string()));
83678		}
83679		if self.rjctg_pty_rsn.chars().count() > 35 {
83680			return Err(ValidationError::new(1002, "rjctg_pty_rsn exceeds the maximum length of 35".to_string()));
83681		}
83682		if let Some(ref val) = self.err_lctn {
83683			if val.chars().count() < 1 {
83684				return Err(ValidationError::new(1001, "err_lctn is shorter than the minimum length of 1".to_string()));
83685			}
83686			if val.chars().count() > 350 {
83687				return Err(ValidationError::new(1002, "err_lctn exceeds the maximum length of 350".to_string()));
83688			}
83689		}
83690		if let Some(ref val) = self.rsn_desc {
83691			if val.chars().count() < 1 {
83692				return Err(ValidationError::new(1001, "rsn_desc is shorter than the minimum length of 1".to_string()));
83693			}
83694			if val.chars().count() > 350 {
83695				return Err(ValidationError::new(1002, "rsn_desc exceeds the maximum length of 350".to_string()));
83696			}
83697		}
83698		if let Some(ref val) = self.addtl_data {
83699			if val.chars().count() < 1 {
83700				return Err(ValidationError::new(1001, "addtl_data is shorter than the minimum length of 1".to_string()));
83701			}
83702			if val.chars().count() > 20000 {
83703				return Err(ValidationError::new(1002, "addtl_data exceeds the maximum length of 20000".to_string()));
83704			}
83705		}
83706		Ok(())
83707	}
83708}
83709
83710
83711// RejectionReason31 ...
83712#[cfg_attr(feature = "derive_debug", derive(Debug))]
83713#[cfg_attr(feature = "derive_default", derive(Default))]
83714#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83715#[cfg_attr(feature = "derive_clone", derive(Clone))]
83716#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83717pub struct RejectionReason31 {
83718	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
83719	pub rsn: RejectedReason16Choice,
83720	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRsnInf", skip_serializing_if = "Option::is_none") )]
83721	pub addtl_rsn_inf: Option<String>,
83722}
83723
83724impl RejectionReason31 {
83725	pub fn validate(&self) -> Result<(), ValidationError> {
83726		self.rsn.validate()?;
83727		if let Some(ref val) = self.addtl_rsn_inf {
83728			if val.chars().count() < 1 {
83729				return Err(ValidationError::new(1001, "addtl_rsn_inf is shorter than the minimum length of 1".to_string()));
83730			}
83731			if val.chars().count() > 350 {
83732				return Err(ValidationError::new(1002, "addtl_rsn_inf exceeds the maximum length of 350".to_string()));
83733			}
83734		}
83735		Ok(())
83736	}
83737}
83738
83739
83740// RejectionReason33Code ...
83741#[cfg_attr(feature = "derive_debug", derive(Debug))]
83742#[cfg_attr(feature = "derive_default", derive(Default))]
83743#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83744#[cfg_attr(feature = "derive_clone", derive(Clone))]
83745#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83746pub enum RejectionReason33Code {
83747	#[cfg_attr(feature = "derive_default", default)]
83748	#[cfg_attr( feature = "derive_serde", serde(rename = "CASH") )]
83749	CodeCASH,
83750	#[cfg_attr( feature = "derive_serde", serde(rename = "ADEA") )]
83751	CodeADEA,
83752	#[cfg_attr( feature = "derive_serde", serde(rename = "DMON") )]
83753	CodeDMON,
83754	#[cfg_attr( feature = "derive_serde", serde(rename = "NCRR") )]
83755	CodeNCRR,
83756	#[cfg_attr( feature = "derive_serde", serde(rename = "LATE") )]
83757	CodeLATE,
83758	#[cfg_attr( feature = "derive_serde", serde(rename = "INVL") )]
83759	CodeINVL,
83760	#[cfg_attr( feature = "derive_serde", serde(rename = "INVB") )]
83761	CodeINVB,
83762	#[cfg_attr( feature = "derive_serde", serde(rename = "INVN") )]
83763	CodeINVN,
83764	#[cfg_attr( feature = "derive_serde", serde(rename = "VALR") )]
83765	CodeVALR,
83766	#[cfg_attr( feature = "derive_serde", serde(rename = "MONY") )]
83767	CodeMONY,
83768	#[cfg_attr( feature = "derive_serde", serde(rename = "CAEV") )]
83769	CodeCAEV,
83770	#[cfg_attr( feature = "derive_serde", serde(rename = "DDAT") )]
83771	CodeDDAT,
83772	#[cfg_attr( feature = "derive_serde", serde(rename = "REFE") )]
83773	CodeREFE,
83774	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
83775	CodeOTHR,
83776	#[cfg_attr( feature = "derive_serde", serde(rename = "DQUA") )]
83777	CodeDQUA,
83778	#[cfg_attr( feature = "derive_serde", serde(rename = "DSEC") )]
83779	CodeDSEC,
83780	#[cfg_attr( feature = "derive_serde", serde(rename = "MINO") )]
83781	CodeMINO,
83782	#[cfg_attr( feature = "derive_serde", serde(rename = "MUNO") )]
83783	CodeMUNO,
83784}
83785
83786impl RejectionReason33Code {
83787	pub fn validate(&self) -> Result<(), ValidationError> {
83788		Ok(())
83789	}
83790}
83791
83792
83793// RejectionReason34Code ...
83794#[cfg_attr(feature = "derive_debug", derive(Debug))]
83795#[cfg_attr(feature = "derive_default", derive(Default))]
83796#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83797#[cfg_attr(feature = "derive_clone", derive(Clone))]
83798#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83799pub enum RejectionReason34Code {
83800	#[cfg_attr(feature = "derive_default", default)]
83801	#[cfg_attr( feature = "derive_serde", serde(rename = "ADEA") )]
83802	CodeADEA,
83803	#[cfg_attr( feature = "derive_serde", serde(rename = "LATE") )]
83804	CodeLATE,
83805	#[cfg_attr( feature = "derive_serde", serde(rename = "CASH") )]
83806	CodeCASH,
83807	#[cfg_attr( feature = "derive_serde", serde(rename = "NRGM") )]
83808	CodeNRGM,
83809	#[cfg_attr( feature = "derive_serde", serde(rename = "NRGN") )]
83810	CodeNRGN,
83811	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
83812	CodeOTHR,
83813	#[cfg_attr( feature = "derive_serde", serde(rename = "REFE") )]
83814	CodeREFE,
83815}
83816
83817impl RejectionReason34Code {
83818	pub fn validate(&self) -> Result<(), ValidationError> {
83819		Ok(())
83820	}
83821}
83822
83823
83824// RejectionReason35Code ...
83825#[cfg_attr(feature = "derive_debug", derive(Debug))]
83826#[cfg_attr(feature = "derive_default", derive(Default))]
83827#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83828#[cfg_attr(feature = "derive_clone", derive(Clone))]
83829#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83830pub enum RejectionReason35Code {
83831	#[cfg_attr(feature = "derive_default", default)]
83832	#[cfg_attr( feature = "derive_serde", serde(rename = "CASH") )]
83833	CodeCASH,
83834	#[cfg_attr( feature = "derive_serde", serde(rename = "ADEA") )]
83835	CodeADEA,
83836	#[cfg_attr( feature = "derive_serde", serde(rename = "REFE") )]
83837	CodeREFE,
83838	#[cfg_attr( feature = "derive_serde", serde(rename = "LATE") )]
83839	CodeLATE,
83840	#[cfg_attr( feature = "derive_serde", serde(rename = "DDAT") )]
83841	CodeDDAT,
83842	#[cfg_attr( feature = "derive_serde", serde(rename = "NRGN") )]
83843	CodeNRGN,
83844	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
83845	CodeOTHR,
83846	#[cfg_attr( feature = "derive_serde", serde(rename = "INVM") )]
83847	CodeINVM,
83848	#[cfg_attr( feature = "derive_serde", serde(rename = "INVL") )]
83849	CodeINVL,
83850}
83851
83852impl RejectionReason35Code {
83853	pub fn validate(&self) -> Result<(), ValidationError> {
83854		Ok(())
83855	}
83856}
83857
83858
83859// RejectionReason45 ...
83860#[cfg_attr(feature = "derive_debug", derive(Debug))]
83861#[cfg_attr(feature = "derive_default", derive(Default))]
83862#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83863#[cfg_attr(feature = "derive_clone", derive(Clone))]
83864#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83865pub struct RejectionReason45 {
83866	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgRptId") )]
83867	pub msg_rpt_id: String,
83868	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
83869	pub sts: ReportingMessageStatus1Code,
83870	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldVldtnRule", skip_serializing_if = "Option::is_none") )]
83871	pub dtld_vldtn_rule: Option<GenericValidationRuleIdentification1>,
83872}
83873
83874impl RejectionReason45 {
83875	pub fn validate(&self) -> Result<(), ValidationError> {
83876		if self.msg_rpt_id.chars().count() < 1 {
83877			return Err(ValidationError::new(1001, "msg_rpt_id is shorter than the minimum length of 1".to_string()));
83878		}
83879		if self.msg_rpt_id.chars().count() > 140 {
83880			return Err(ValidationError::new(1002, "msg_rpt_id exceeds the maximum length of 140".to_string()));
83881		}
83882		self.sts.validate()?;
83883		if let Some(ref val) = self.dtld_vldtn_rule { val.validate()? }
83884		Ok(())
83885	}
83886}
83887
83888
83889// RejectionReason53 ...
83890#[cfg_attr(feature = "derive_debug", derive(Debug))]
83891#[cfg_attr(feature = "derive_default", derive(Default))]
83892#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83893#[cfg_attr(feature = "derive_clone", derive(Clone))]
83894#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83895pub struct RejectionReason53 {
83896	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId") )]
83897	pub tx_id: TransactionIdentification3Choice,
83898	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
83899	pub sts: ReportingMessageStatus1Code,
83900	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldVldtnRule", skip_serializing_if = "Option::is_none") )]
83901	pub dtld_vldtn_rule: Option<Vec<GenericValidationRuleIdentification1>>,
83902}
83903
83904impl RejectionReason53 {
83905	pub fn validate(&self) -> Result<(), ValidationError> {
83906		self.tx_id.validate()?;
83907		self.sts.validate()?;
83908		if let Some(ref vec) = self.dtld_vldtn_rule { for item in vec { item.validate()? } }
83909		Ok(())
83910	}
83911}
83912
83913
83914// RejectionReason70 ...
83915#[cfg_attr(feature = "derive_debug", derive(Debug))]
83916#[cfg_attr(feature = "derive_default", derive(Default))]
83917#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83918#[cfg_attr(feature = "derive_clone", derive(Clone))]
83919#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83920pub struct RejectionReason70 {
83921	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgRptId") )]
83922	pub msg_rpt_id: String,
83923	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
83924	pub sts: ReportingMessageStatus2Code,
83925	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldVldtnRule", skip_serializing_if = "Option::is_none") )]
83926	pub dtld_vldtn_rule: Option<GenericValidationRuleIdentification1>,
83927}
83928
83929impl RejectionReason70 {
83930	pub fn validate(&self) -> Result<(), ValidationError> {
83931		if self.msg_rpt_id.chars().count() < 1 {
83932			return Err(ValidationError::new(1001, "msg_rpt_id is shorter than the minimum length of 1".to_string()));
83933		}
83934		if self.msg_rpt_id.chars().count() > 140 {
83935			return Err(ValidationError::new(1002, "msg_rpt_id exceeds the maximum length of 140".to_string()));
83936		}
83937		self.sts.validate()?;
83938		if let Some(ref val) = self.dtld_vldtn_rule { val.validate()? }
83939		Ok(())
83940	}
83941}
83942
83943
83944// RejectionReason71 ...
83945#[cfg_attr(feature = "derive_debug", derive(Debug))]
83946#[cfg_attr(feature = "derive_default", derive(Default))]
83947#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83948#[cfg_attr(feature = "derive_clone", derive(Clone))]
83949#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83950pub struct RejectionReason71 {
83951	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId") )]
83952	pub tx_id: TradeTransactionIdentification24,
83953	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
83954	pub sts: ReportingMessageStatus2Code,
83955	#[cfg_attr( feature = "derive_serde", serde(rename = "DtldVldtnRule", skip_serializing_if = "Option::is_none") )]
83956	pub dtld_vldtn_rule: Option<Vec<GenericValidationRuleIdentification1>>,
83957}
83958
83959impl RejectionReason71 {
83960	pub fn validate(&self) -> Result<(), ValidationError> {
83961		self.tx_id.validate()?;
83962		self.sts.validate()?;
83963		if let Some(ref vec) = self.dtld_vldtn_rule { for item in vec { item.validate()? } }
83964		Ok(())
83965	}
83966}
83967
83968
83969// RejectionStatistics9 ...
83970#[cfg_attr(feature = "derive_debug", derive(Debug))]
83971#[cfg_attr(feature = "derive_default", derive(Default))]
83972#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83973#[cfg_attr(feature = "derive_clone", derive(Clone))]
83974#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
83975pub struct RejectionStatistics9 {
83976	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId") )]
83977	pub ctr_pty_id: CounterpartyData92,
83978	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSttstcs") )]
83979	pub rpt_sttstcs: DetailedReportStatistics7,
83980	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivSttstcs") )]
83981	pub deriv_sttstcs: DetailedTransactionStatistics7Choice,
83982}
83983
83984impl RejectionStatistics9 {
83985	pub fn validate(&self) -> Result<(), ValidationError> {
83986		self.ctr_pty_id.validate()?;
83987		self.rpt_sttstcs.validate()?;
83988		self.deriv_sttstcs.validate()?;
83989		Ok(())
83990	}
83991}
83992
83993
83994// RelatedInvestigationData1 ...
83995#[cfg_attr(feature = "derive_debug", derive(Debug))]
83996#[cfg_attr(feature = "derive_default", derive(Default))]
83997#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
83998#[cfg_attr(feature = "derive_clone", derive(Clone))]
83999#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84000pub struct RelatedInvestigationData1 {
84001	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstgtnId", skip_serializing_if = "Option::is_none") )]
84002	pub invstgtn_id: Option<String>,
84003	#[cfg_attr( feature = "derive_serde", serde(rename = "Lctn", skip_serializing_if = "Option::is_none") )]
84004	pub lctn: Option<Vec<InvestigationLocationData1>>,
84005}
84006
84007impl RelatedInvestigationData1 {
84008	pub fn validate(&self) -> Result<(), ValidationError> {
84009		if let Some(ref val) = self.invstgtn_id {
84010			if val.chars().count() < 1 {
84011				return Err(ValidationError::new(1001, "invstgtn_id is shorter than the minimum length of 1".to_string()));
84012			}
84013			if val.chars().count() > 35 {
84014				return Err(ValidationError::new(1002, "invstgtn_id exceeds the maximum length of 35".to_string()));
84015			}
84016		}
84017		if let Some(ref vec) = self.lctn { for item in vec { item.validate()? } }
84018		Ok(())
84019	}
84020}
84021
84022
84023// RelatedNotificationData1 ...
84024#[cfg_attr(feature = "derive_debug", derive(Debug))]
84025#[cfg_attr(feature = "derive_default", derive(Default))]
84026#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84027#[cfg_attr(feature = "derive_clone", derive(Clone))]
84028#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84029pub struct RelatedNotificationData1 {
84030	#[cfg_attr( feature = "derive_serde", serde(rename = "NtfctnId", skip_serializing_if = "Option::is_none") )]
84031	pub ntfctn_id: Option<String>,
84032	#[cfg_attr( feature = "derive_serde", serde(rename = "Lctn", skip_serializing_if = "Option::is_none") )]
84033	pub lctn: Option<Vec<NotificationLocationData1>>,
84034}
84035
84036impl RelatedNotificationData1 {
84037	pub fn validate(&self) -> Result<(), ValidationError> {
84038		if let Some(ref val) = self.ntfctn_id {
84039			if val.chars().count() < 1 {
84040				return Err(ValidationError::new(1001, "ntfctn_id is shorter than the minimum length of 1".to_string()));
84041			}
84042			if val.chars().count() > 35 {
84043				return Err(ValidationError::new(1002, "ntfctn_id exceeds the maximum length of 35".to_string()));
84044			}
84045		}
84046		if let Some(ref vec) = self.lctn { for item in vec { item.validate()? } }
84047		Ok(())
84048	}
84049}
84050
84051
84052// Remittance1 ...
84053#[cfg_attr(feature = "derive_debug", derive(Debug))]
84054#[cfg_attr(feature = "derive_default", derive(Default))]
84055#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84056#[cfg_attr(feature = "derive_clone", derive(Clone))]
84057#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84058pub struct Remittance1 {
84059	#[cfg_attr( feature = "derive_serde", serde(rename = "Ustrd", skip_serializing_if = "Option::is_none") )]
84060	pub ustrd: Option<Vec<String>>,
84061	#[cfg_attr( feature = "derive_serde", serde(rename = "Strd", skip_serializing_if = "Option::is_none") )]
84062	pub strd: Option<Vec<StructuredRemittanceInformation16>>,
84063	#[cfg_attr( feature = "derive_serde", serde(rename = "Rltd", skip_serializing_if = "Option::is_none") )]
84064	pub rltd: Option<Vec<RemittanceLocation7>>,
84065}
84066
84067impl Remittance1 {
84068	pub fn validate(&self) -> Result<(), ValidationError> {
84069		if let Some(ref vec) = self.ustrd {
84070			for item in vec {
84071				if item.chars().count() < 1 {
84072					return Err(ValidationError::new(1001, "ustrd is shorter than the minimum length of 1".to_string()));
84073				}
84074				if item.chars().count() > 140 {
84075					return Err(ValidationError::new(1002, "ustrd exceeds the maximum length of 140".to_string()));
84076				}
84077			}
84078		}
84079		if let Some(ref vec) = self.strd { for item in vec { item.validate()? } }
84080		if let Some(ref vec) = self.rltd { for item in vec { item.validate()? } }
84081		Ok(())
84082	}
84083}
84084
84085
84086// RemittanceAmount2 ...
84087#[cfg_attr(feature = "derive_debug", derive(Debug))]
84088#[cfg_attr(feature = "derive_default", derive(Default))]
84089#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84090#[cfg_attr(feature = "derive_clone", derive(Clone))]
84091#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84092pub struct RemittanceAmount2 {
84093	#[cfg_attr( feature = "derive_serde", serde(rename = "DuePyblAmt", skip_serializing_if = "Option::is_none") )]
84094	pub due_pybl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
84095	#[cfg_attr( feature = "derive_serde", serde(rename = "DscntApldAmt", skip_serializing_if = "Option::is_none") )]
84096	pub dscnt_apld_amt: Option<Vec<DiscountAmountAndType1>>,
84097	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtNoteAmt", skip_serializing_if = "Option::is_none") )]
84098	pub cdt_note_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
84099	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxAmt", skip_serializing_if = "Option::is_none") )]
84100	pub tax_amt: Option<Vec<TaxAmountAndType1>>,
84101	#[cfg_attr( feature = "derive_serde", serde(rename = "AdjstmntAmtAndRsn", skip_serializing_if = "Option::is_none") )]
84102	pub adjstmnt_amt_and_rsn: Option<Vec<DocumentAdjustment1>>,
84103	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtdAmt", skip_serializing_if = "Option::is_none") )]
84104	pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
84105}
84106
84107impl RemittanceAmount2 {
84108	pub fn validate(&self) -> Result<(), ValidationError> {
84109		if let Some(ref val) = self.due_pybl_amt { val.validate()? }
84110		if let Some(ref vec) = self.dscnt_apld_amt { for item in vec { item.validate()? } }
84111		if let Some(ref val) = self.cdt_note_amt { val.validate()? }
84112		if let Some(ref vec) = self.tax_amt { for item in vec { item.validate()? } }
84113		if let Some(ref vec) = self.adjstmnt_amt_and_rsn { for item in vec { item.validate()? } }
84114		if let Some(ref val) = self.rmtd_amt { val.validate()? }
84115		Ok(())
84116	}
84117}
84118
84119
84120// RemittanceAmount3 ...
84121#[cfg_attr(feature = "derive_debug", derive(Debug))]
84122#[cfg_attr(feature = "derive_default", derive(Default))]
84123#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84124#[cfg_attr(feature = "derive_clone", derive(Clone))]
84125#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84126pub struct RemittanceAmount3 {
84127	#[cfg_attr( feature = "derive_serde", serde(rename = "DuePyblAmt", skip_serializing_if = "Option::is_none") )]
84128	pub due_pybl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
84129	#[cfg_attr( feature = "derive_serde", serde(rename = "DscntApldAmt", skip_serializing_if = "Option::is_none") )]
84130	pub dscnt_apld_amt: Option<Vec<DiscountAmountAndType1>>,
84131	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtNoteAmt", skip_serializing_if = "Option::is_none") )]
84132	pub cdt_note_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
84133	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxAmt", skip_serializing_if = "Option::is_none") )]
84134	pub tax_amt: Option<Vec<TaxAmountAndType1>>,
84135	#[cfg_attr( feature = "derive_serde", serde(rename = "AdjstmntAmtAndRsn", skip_serializing_if = "Option::is_none") )]
84136	pub adjstmnt_amt_and_rsn: Option<Vec<DocumentAdjustment1>>,
84137	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtdAmt", skip_serializing_if = "Option::is_none") )]
84138	pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
84139}
84140
84141impl RemittanceAmount3 {
84142	pub fn validate(&self) -> Result<(), ValidationError> {
84143		if let Some(ref val) = self.due_pybl_amt { val.validate()? }
84144		if let Some(ref vec) = self.dscnt_apld_amt { for item in vec { item.validate()? } }
84145		if let Some(ref val) = self.cdt_note_amt { val.validate()? }
84146		if let Some(ref vec) = self.tax_amt { for item in vec { item.validate()? } }
84147		if let Some(ref vec) = self.adjstmnt_amt_and_rsn { for item in vec { item.validate()? } }
84148		if let Some(ref val) = self.rmtd_amt { val.validate()? }
84149		Ok(())
84150	}
84151}
84152
84153
84154// RemittanceAmount4 ...
84155#[cfg_attr(feature = "derive_debug", derive(Debug))]
84156#[cfg_attr(feature = "derive_default", derive(Default))]
84157#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84158#[cfg_attr(feature = "derive_clone", derive(Clone))]
84159#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84160pub struct RemittanceAmount4 {
84161	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtAmtAndTp", skip_serializing_if = "Option::is_none") )]
84162	pub rmt_amt_and_tp: Option<Vec<DocumentAmount1>>,
84163	#[cfg_attr( feature = "derive_serde", serde(rename = "AdjstmntAmtAndRsn", skip_serializing_if = "Option::is_none") )]
84164	pub adjstmnt_amt_and_rsn: Option<Vec<DocumentAdjustment1>>,
84165}
84166
84167impl RemittanceAmount4 {
84168	pub fn validate(&self) -> Result<(), ValidationError> {
84169		if let Some(ref vec) = self.rmt_amt_and_tp { for item in vec { item.validate()? } }
84170		if let Some(ref vec) = self.adjstmnt_amt_and_rsn { for item in vec { item.validate()? } }
84171		Ok(())
84172	}
84173}
84174
84175
84176// RemittanceInformation2 ...
84177#[cfg_attr(feature = "derive_debug", derive(Debug))]
84178#[cfg_attr(feature = "derive_default", derive(Default))]
84179#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84180#[cfg_attr(feature = "derive_clone", derive(Clone))]
84181#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84182pub struct RemittanceInformation2 {
84183	#[cfg_attr( feature = "derive_serde", serde(rename = "Ustrd", skip_serializing_if = "Option::is_none") )]
84184	pub ustrd: Option<Vec<String>>,
84185}
84186
84187impl RemittanceInformation2 {
84188	pub fn validate(&self) -> Result<(), ValidationError> {
84189		if let Some(ref vec) = self.ustrd {
84190			for item in vec {
84191				if item.chars().count() < 1 {
84192					return Err(ValidationError::new(1001, "ustrd is shorter than the minimum length of 1".to_string()));
84193				}
84194				if item.chars().count() > 140 {
84195					return Err(ValidationError::new(1002, "ustrd exceeds the maximum length of 140".to_string()));
84196				}
84197			}
84198		}
84199		Ok(())
84200	}
84201}
84202
84203
84204// RemittanceInformation21 ...
84205#[cfg_attr(feature = "derive_debug", derive(Debug))]
84206#[cfg_attr(feature = "derive_default", derive(Default))]
84207#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84208#[cfg_attr(feature = "derive_clone", derive(Clone))]
84209#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84210pub struct RemittanceInformation21 {
84211	#[cfg_attr( feature = "derive_serde", serde(rename = "Ustrd", skip_serializing_if = "Option::is_none") )]
84212	pub ustrd: Option<Vec<String>>,
84213	#[cfg_attr( feature = "derive_serde", serde(rename = "Strd", skip_serializing_if = "Option::is_none") )]
84214	pub strd: Option<Vec<StructuredRemittanceInformation17>>,
84215}
84216
84217impl RemittanceInformation21 {
84218	pub fn validate(&self) -> Result<(), ValidationError> {
84219		if let Some(ref vec) = self.ustrd {
84220			for item in vec {
84221				if item.chars().count() < 1 {
84222					return Err(ValidationError::new(1001, "ustrd is shorter than the minimum length of 1".to_string()));
84223				}
84224				if item.chars().count() > 140 {
84225					return Err(ValidationError::new(1002, "ustrd exceeds the maximum length of 140".to_string()));
84226				}
84227			}
84228		}
84229		if let Some(ref vec) = self.strd { for item in vec { item.validate()? } }
84230		Ok(())
84231	}
84232}
84233
84234
84235// RemittanceInformation22 ...
84236#[cfg_attr(feature = "derive_debug", derive(Debug))]
84237#[cfg_attr(feature = "derive_default", derive(Default))]
84238#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84239#[cfg_attr(feature = "derive_clone", derive(Clone))]
84240#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84241pub struct RemittanceInformation22 {
84242	#[cfg_attr( feature = "derive_serde", serde(rename = "Ustrd", skip_serializing_if = "Option::is_none") )]
84243	pub ustrd: Option<Vec<String>>,
84244	#[cfg_attr( feature = "derive_serde", serde(rename = "Strd", skip_serializing_if = "Option::is_none") )]
84245	pub strd: Option<Vec<StructuredRemittanceInformation18>>,
84246}
84247
84248impl RemittanceInformation22 {
84249	pub fn validate(&self) -> Result<(), ValidationError> {
84250		if let Some(ref vec) = self.ustrd {
84251			for item in vec {
84252				if item.chars().count() < 1 {
84253					return Err(ValidationError::new(1001, "ustrd is shorter than the minimum length of 1".to_string()));
84254				}
84255				if item.chars().count() > 140 {
84256					return Err(ValidationError::new(1002, "ustrd exceeds the maximum length of 140".to_string()));
84257				}
84258			}
84259		}
84260		if let Some(ref vec) = self.strd { for item in vec { item.validate()? } }
84261		Ok(())
84262	}
84263}
84264
84265
84266// RemittanceInformation23 ...
84267#[cfg_attr(feature = "derive_debug", derive(Debug))]
84268#[cfg_attr(feature = "derive_default", derive(Default))]
84269#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84270#[cfg_attr(feature = "derive_clone", derive(Clone))]
84271#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84272pub struct RemittanceInformation23 {
84273	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtId", skip_serializing_if = "Option::is_none") )]
84274	pub rmt_id: Option<String>,
84275	#[cfg_attr( feature = "derive_serde", serde(rename = "Ustrd", skip_serializing_if = "Option::is_none") )]
84276	pub ustrd: Option<Vec<String>>,
84277	#[cfg_attr( feature = "derive_serde", serde(rename = "Strd", skip_serializing_if = "Option::is_none") )]
84278	pub strd: Option<Vec<StructuredRemittanceInformation18>>,
84279	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPmtInf") )]
84280	pub orgnl_pmt_inf: OriginalPaymentInformation10,
84281}
84282
84283impl RemittanceInformation23 {
84284	pub fn validate(&self) -> Result<(), ValidationError> {
84285		if let Some(ref val) = self.rmt_id {
84286			if val.chars().count() < 1 {
84287				return Err(ValidationError::new(1001, "rmt_id is shorter than the minimum length of 1".to_string()));
84288			}
84289			if val.chars().count() > 35 {
84290				return Err(ValidationError::new(1002, "rmt_id exceeds the maximum length of 35".to_string()));
84291			}
84292		}
84293		if let Some(ref vec) = self.ustrd {
84294			for item in vec {
84295				if item.chars().count() < 1 {
84296					return Err(ValidationError::new(1001, "ustrd is shorter than the minimum length of 1".to_string()));
84297				}
84298				if item.chars().count() > 140 {
84299					return Err(ValidationError::new(1002, "ustrd exceeds the maximum length of 140".to_string()));
84300				}
84301			}
84302		}
84303		if let Some(ref vec) = self.strd { for item in vec { item.validate()? } }
84304		self.orgnl_pmt_inf.validate()?;
84305		Ok(())
84306	}
84307}
84308
84309
84310// RemittanceLocation10 ...
84311#[cfg_attr(feature = "derive_debug", derive(Debug))]
84312#[cfg_attr(feature = "derive_default", derive(Default))]
84313#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84314#[cfg_attr(feature = "derive_clone", derive(Clone))]
84315#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84316pub struct RemittanceLocation10 {
84317	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtId", skip_serializing_if = "Option::is_none") )]
84318	pub rmt_id: Option<String>,
84319	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtLctnDtls") )]
84320	pub rmt_lctn_dtls: Vec<RemittanceLocationData2>,
84321	#[cfg_attr( feature = "derive_serde", serde(rename = "Refs") )]
84322	pub refs: TransactionReferences8,
84323}
84324
84325impl RemittanceLocation10 {
84326	pub fn validate(&self) -> Result<(), ValidationError> {
84327		if let Some(ref val) = self.rmt_id {
84328			if val.chars().count() < 1 {
84329				return Err(ValidationError::new(1001, "rmt_id is shorter than the minimum length of 1".to_string()));
84330			}
84331			if val.chars().count() > 35 {
84332				return Err(ValidationError::new(1002, "rmt_id exceeds the maximum length of 35".to_string()));
84333			}
84334		}
84335		for item in &self.rmt_lctn_dtls { item.validate()? }
84336		self.refs.validate()?;
84337		Ok(())
84338	}
84339}
84340
84341
84342// RemittanceLocation7 ...
84343#[cfg_attr(feature = "derive_debug", derive(Debug))]
84344#[cfg_attr(feature = "derive_default", derive(Default))]
84345#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84346#[cfg_attr(feature = "derive_clone", derive(Clone))]
84347#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84348pub struct RemittanceLocation7 {
84349	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtId", skip_serializing_if = "Option::is_none") )]
84350	pub rmt_id: Option<String>,
84351	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtLctnDtls", skip_serializing_if = "Option::is_none") )]
84352	pub rmt_lctn_dtls: Option<Vec<RemittanceLocationData1>>,
84353}
84354
84355impl RemittanceLocation7 {
84356	pub fn validate(&self) -> Result<(), ValidationError> {
84357		if let Some(ref val) = self.rmt_id {
84358			if val.chars().count() < 1 {
84359				return Err(ValidationError::new(1001, "rmt_id is shorter than the minimum length of 1".to_string()));
84360			}
84361			if val.chars().count() > 35 {
84362				return Err(ValidationError::new(1002, "rmt_id exceeds the maximum length of 35".to_string()));
84363			}
84364		}
84365		if let Some(ref vec) = self.rmt_lctn_dtls { for item in vec { item.validate()? } }
84366		Ok(())
84367	}
84368}
84369
84370
84371// RemittanceLocation8 ...
84372#[cfg_attr(feature = "derive_debug", derive(Debug))]
84373#[cfg_attr(feature = "derive_default", derive(Default))]
84374#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84375#[cfg_attr(feature = "derive_clone", derive(Clone))]
84376#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84377pub struct RemittanceLocation8 {
84378	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtId", skip_serializing_if = "Option::is_none") )]
84379	pub rmt_id: Option<String>,
84380	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtLctnDtls", skip_serializing_if = "Option::is_none") )]
84381	pub rmt_lctn_dtls: Option<Vec<RemittanceLocationData2>>,
84382}
84383
84384impl RemittanceLocation8 {
84385	pub fn validate(&self) -> Result<(), ValidationError> {
84386		if let Some(ref val) = self.rmt_id {
84387			if val.chars().count() < 1 {
84388				return Err(ValidationError::new(1001, "rmt_id is shorter than the minimum length of 1".to_string()));
84389			}
84390			if val.chars().count() > 35 {
84391				return Err(ValidationError::new(1002, "rmt_id exceeds the maximum length of 35".to_string()));
84392			}
84393		}
84394		if let Some(ref vec) = self.rmt_lctn_dtls { for item in vec { item.validate()? } }
84395		Ok(())
84396	}
84397}
84398
84399
84400// RemittanceLocation9 ...
84401#[cfg_attr(feature = "derive_debug", derive(Debug))]
84402#[cfg_attr(feature = "derive_default", derive(Default))]
84403#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84404#[cfg_attr(feature = "derive_clone", derive(Clone))]
84405#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84406pub struct RemittanceLocation9 {
84407	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtId", skip_serializing_if = "Option::is_none") )]
84408	pub rmt_id: Option<String>,
84409	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtLctnMtd", skip_serializing_if = "Option::is_none") )]
84410	pub rmt_lctn_mtd: Option<RemittanceLocationMethod2Code>,
84411	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtLctnElctrncAdr", skip_serializing_if = "Option::is_none") )]
84412	pub rmt_lctn_elctrnc_adr: Option<String>,
84413	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtLctnPstlAdr", skip_serializing_if = "Option::is_none") )]
84414	pub rmt_lctn_pstl_adr: Option<NameAndAddress18>,
84415}
84416
84417impl RemittanceLocation9 {
84418	pub fn validate(&self) -> Result<(), ValidationError> {
84419		if let Some(ref val) = self.rmt_id {
84420			if val.chars().count() < 1 {
84421				return Err(ValidationError::new(1001, "rmt_id is shorter than the minimum length of 1".to_string()));
84422			}
84423			if val.chars().count() > 35 {
84424				return Err(ValidationError::new(1002, "rmt_id exceeds the maximum length of 35".to_string()));
84425			}
84426		}
84427		if let Some(ref val) = self.rmt_lctn_mtd { val.validate()? }
84428		if let Some(ref val) = self.rmt_lctn_elctrnc_adr {
84429			if val.chars().count() < 1 {
84430				return Err(ValidationError::new(1001, "rmt_lctn_elctrnc_adr is shorter than the minimum length of 1".to_string()));
84431			}
84432			if val.chars().count() > 2048 {
84433				return Err(ValidationError::new(1002, "rmt_lctn_elctrnc_adr exceeds the maximum length of 2048".to_string()));
84434			}
84435		}
84436		if let Some(ref val) = self.rmt_lctn_pstl_adr { val.validate()? }
84437		Ok(())
84438	}
84439}
84440
84441
84442// RemittanceLocationData1 ...
84443#[cfg_attr(feature = "derive_debug", derive(Debug))]
84444#[cfg_attr(feature = "derive_default", derive(Default))]
84445#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84446#[cfg_attr(feature = "derive_clone", derive(Clone))]
84447#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84448pub struct RemittanceLocationData1 {
84449	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtd") )]
84450	pub mtd: RemittanceLocationMethod2Code,
84451	#[cfg_attr( feature = "derive_serde", serde(rename = "ElctrncAdr", skip_serializing_if = "Option::is_none") )]
84452	pub elctrnc_adr: Option<String>,
84453	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
84454	pub pstl_adr: Option<NameAndAddress16>,
84455}
84456
84457impl RemittanceLocationData1 {
84458	pub fn validate(&self) -> Result<(), ValidationError> {
84459		self.mtd.validate()?;
84460		if let Some(ref val) = self.elctrnc_adr {
84461			if val.chars().count() < 1 {
84462				return Err(ValidationError::new(1001, "elctrnc_adr is shorter than the minimum length of 1".to_string()));
84463			}
84464			if val.chars().count() > 2048 {
84465				return Err(ValidationError::new(1002, "elctrnc_adr exceeds the maximum length of 2048".to_string()));
84466			}
84467		}
84468		if let Some(ref val) = self.pstl_adr { val.validate()? }
84469		Ok(())
84470	}
84471}
84472
84473
84474// RemittanceLocationData2 ...
84475#[cfg_attr(feature = "derive_debug", derive(Debug))]
84476#[cfg_attr(feature = "derive_default", derive(Default))]
84477#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84478#[cfg_attr(feature = "derive_clone", derive(Clone))]
84479#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84480pub struct RemittanceLocationData2 {
84481	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtd") )]
84482	pub mtd: RemittanceLocationMethod2Code,
84483	#[cfg_attr( feature = "derive_serde", serde(rename = "ElctrncAdr", skip_serializing_if = "Option::is_none") )]
84484	pub elctrnc_adr: Option<String>,
84485	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
84486	pub pstl_adr: Option<NameAndAddress18>,
84487}
84488
84489impl RemittanceLocationData2 {
84490	pub fn validate(&self) -> Result<(), ValidationError> {
84491		self.mtd.validate()?;
84492		if let Some(ref val) = self.elctrnc_adr {
84493			if val.chars().count() < 1 {
84494				return Err(ValidationError::new(1001, "elctrnc_adr is shorter than the minimum length of 1".to_string()));
84495			}
84496			if val.chars().count() > 2048 {
84497				return Err(ValidationError::new(1002, "elctrnc_adr exceeds the maximum length of 2048".to_string()));
84498			}
84499		}
84500		if let Some(ref val) = self.pstl_adr { val.validate()? }
84501		Ok(())
84502	}
84503}
84504
84505
84506// RemittanceLocationMethod2Code ...
84507#[cfg_attr(feature = "derive_debug", derive(Debug))]
84508#[cfg_attr(feature = "derive_default", derive(Default))]
84509#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84510#[cfg_attr(feature = "derive_clone", derive(Clone))]
84511#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84512pub enum RemittanceLocationMethod2Code {
84513	#[cfg_attr(feature = "derive_default", default)]
84514	#[cfg_attr( feature = "derive_serde", serde(rename = "FAXI") )]
84515	CodeFAXI,
84516	#[cfg_attr( feature = "derive_serde", serde(rename = "EDIC") )]
84517	CodeEDIC,
84518	#[cfg_attr( feature = "derive_serde", serde(rename = "URID") )]
84519	CodeURID,
84520	#[cfg_attr( feature = "derive_serde", serde(rename = "EMAL") )]
84521	CodeEMAL,
84522	#[cfg_attr( feature = "derive_serde", serde(rename = "POST") )]
84523	CodePOST,
84524	#[cfg_attr( feature = "derive_serde", serde(rename = "SMSM") )]
84525	CodeSMSM,
84526}
84527
84528impl RemittanceLocationMethod2Code {
84529	pub fn validate(&self) -> Result<(), ValidationError> {
84530		Ok(())
84531	}
84532}
84533
84534
84535// Repartition6 ...
84536#[cfg_attr(feature = "derive_debug", derive(Debug))]
84537#[cfg_attr(feature = "derive_default", derive(Default))]
84538#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84539#[cfg_attr(feature = "derive_clone", derive(Clone))]
84540#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84541pub struct Repartition6 {
84542	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty") )]
84543	pub qty: UnitsOrAmountOrPercentage1Choice,
84544	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrm") )]
84545	pub fin_instrm: FinancialInstrument87,
84546	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyOfPlan", skip_serializing_if = "Option::is_none") )]
84547	pub ccy_of_plan: Option<String>,
84548}
84549
84550impl Repartition6 {
84551	pub fn validate(&self) -> Result<(), ValidationError> {
84552		self.qty.validate()?;
84553		self.fin_instrm.validate()?;
84554		if let Some(ref val) = self.ccy_of_plan {
84555			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
84556			if !pattern.is_match(val) {
84557				return Err(ValidationError::new(1005, "ccy_of_plan does not match the required pattern".to_string()));
84558			}
84559		}
84560		Ok(())
84561	}
84562}
84563
84564
84565// RepoTerminationOption2Code ...
84566#[cfg_attr(feature = "derive_debug", derive(Debug))]
84567#[cfg_attr(feature = "derive_default", derive(Default))]
84568#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84569#[cfg_attr(feature = "derive_clone", derive(Clone))]
84570#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84571pub enum RepoTerminationOption2Code {
84572	#[cfg_attr(feature = "derive_default", default)]
84573	#[cfg_attr( feature = "derive_serde", serde(rename = "EGRN") )]
84574	CodeEGRN,
84575	#[cfg_attr( feature = "derive_serde", serde(rename = "EGAE") )]
84576	CodeEGAE,
84577	#[cfg_attr( feature = "derive_serde", serde(rename = "ETSB") )]
84578	CodeETSB,
84579	#[cfg_attr( feature = "derive_serde", serde(rename = "NOAP") )]
84580	CodeNOAP,
84581}
84582
84583impl RepoTerminationOption2Code {
84584	pub fn validate(&self) -> Result<(), ValidationError> {
84585		Ok(())
84586	}
84587}
84588
84589
84590// ReportData4 ...
84591#[cfg_attr(feature = "derive_debug", derive(Debug))]
84592#[cfg_attr(feature = "derive_default", derive(Default))]
84593#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84594#[cfg_attr(feature = "derive_clone", derive(Clone))]
84595#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84596pub struct ReportData4 {
84597	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
84598	pub msg_id: String,
84599	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt") )]
84600	pub val_dt: String,
84601	#[cfg_attr( feature = "derive_serde", serde(rename = "DtAndTmStmp") )]
84602	pub dt_and_tm_stmp: String,
84603	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
84604	pub tp: Entry2Code,
84605	#[cfg_attr( feature = "derive_serde", serde(rename = "SchdlTp") )]
84606	pub schdl_tp: String,
84607	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmSsnIdr", skip_serializing_if = "Option::is_none") )]
84608	pub sttlm_ssn_idr: Option<String>,
84609}
84610
84611impl ReportData4 {
84612	pub fn validate(&self) -> Result<(), ValidationError> {
84613		if self.msg_id.chars().count() < 1 {
84614			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
84615		}
84616		if self.msg_id.chars().count() > 35 {
84617			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
84618		}
84619		self.tp.validate()?;
84620		let pattern = Regex::new("[a-zA-Z0-9]{4}").unwrap();
84621		if !pattern.is_match(&self.schdl_tp) {
84622			return Err(ValidationError::new(1005, "schdl_tp does not match the required pattern".to_string()));
84623		}
84624		if let Some(ref val) = self.sttlm_ssn_idr {
84625			let pattern = Regex::new("[a-zA-Z0-9]{4}").unwrap();
84626			if !pattern.is_match(val) {
84627				return Err(ValidationError::new(1005, "sttlm_ssn_idr does not match the required pattern".to_string()));
84628			}
84629		}
84630		Ok(())
84631	}
84632}
84633
84634
84635// ReportData5 ...
84636#[cfg_attr(feature = "derive_debug", derive(Debug))]
84637#[cfg_attr(feature = "derive_default", derive(Default))]
84638#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84639#[cfg_attr(feature = "derive_clone", derive(Clone))]
84640#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84641pub struct ReportData5 {
84642	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
84643	pub msg_id: String,
84644	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt") )]
84645	pub val_dt: String,
84646	#[cfg_attr( feature = "derive_serde", serde(rename = "DtAndTmStmp") )]
84647	pub dt_and_tm_stmp: String,
84648	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
84649	pub tp: CallIn1Code,
84650	#[cfg_attr( feature = "derive_serde", serde(rename = "PayInCallAmt", skip_serializing_if = "Option::is_none") )]
84651	pub pay_in_call_amt: Option<Vec<PayInCallItem>>,
84652	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmSsnIdr", skip_serializing_if = "Option::is_none") )]
84653	pub sttlm_ssn_idr: Option<String>,
84654	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctVal", skip_serializing_if = "Option::is_none") )]
84655	pub acct_val: Option<Value>,
84656}
84657
84658impl ReportData5 {
84659	pub fn validate(&self) -> Result<(), ValidationError> {
84660		if self.msg_id.chars().count() < 1 {
84661			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
84662		}
84663		if self.msg_id.chars().count() > 35 {
84664			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
84665		}
84666		self.tp.validate()?;
84667		if let Some(ref vec) = self.pay_in_call_amt { for item in vec { item.validate()? } }
84668		if let Some(ref val) = self.sttlm_ssn_idr {
84669			let pattern = Regex::new("[a-zA-Z0-9]{4}").unwrap();
84670			if !pattern.is_match(val) {
84671				return Err(ValidationError::new(1005, "sttlm_ssn_idr does not match the required pattern".to_string()));
84672			}
84673		}
84674		if let Some(ref val) = self.acct_val { val.validate()? }
84675		Ok(())
84676	}
84677}
84678
84679
84680// ReportEntry14 ...
84681#[cfg_attr(feature = "derive_debug", derive(Debug))]
84682#[cfg_attr(feature = "derive_default", derive(Default))]
84683#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84684#[cfg_attr(feature = "derive_clone", derive(Clone))]
84685#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84686pub struct ReportEntry14 {
84687	#[cfg_attr( feature = "derive_serde", serde(rename = "NtryRef", skip_serializing_if = "Option::is_none") )]
84688	pub ntry_ref: Option<String>,
84689	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
84690	pub amt: ActiveOrHistoricCurrencyAndAmount,
84691	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
84692	pub cdt_dbt_ind: CreditDebitCode,
84693	#[cfg_attr( feature = "derive_serde", serde(rename = "RvslInd", skip_serializing_if = "Option::is_none") )]
84694	pub rvsl_ind: Option<bool>,
84695	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
84696	pub sts: EntryStatus1Choice,
84697	#[cfg_attr( feature = "derive_serde", serde(rename = "BookgDt", skip_serializing_if = "Option::is_none") )]
84698	pub bookg_dt: Option<DateAndDateTime2Choice>,
84699	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt", skip_serializing_if = "Option::is_none") )]
84700	pub val_dt: Option<DateAndDateTime2Choice>,
84701	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrRef", skip_serializing_if = "Option::is_none") )]
84702	pub acct_svcr_ref: Option<String>,
84703	#[cfg_attr( feature = "derive_serde", serde(rename = "Avlbty", skip_serializing_if = "Option::is_none") )]
84704	pub avlbty: Option<Vec<CashAvailability1>>,
84705	#[cfg_attr( feature = "derive_serde", serde(rename = "BkTxCd") )]
84706	pub bk_tx_cd: BankTransactionCodeStructure4,
84707	#[cfg_attr( feature = "derive_serde", serde(rename = "ComssnWvrInd", skip_serializing_if = "Option::is_none") )]
84708	pub comssn_wvr_ind: Option<bool>,
84709	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInfInd", skip_serializing_if = "Option::is_none") )]
84710	pub addtl_inf_ind: Option<MessageIdentification2>,
84711	#[cfg_attr( feature = "derive_serde", serde(rename = "AmtDtls", skip_serializing_if = "Option::is_none") )]
84712	pub amt_dtls: Option<AmountAndCurrencyExchange4>,
84713	#[cfg_attr( feature = "derive_serde", serde(rename = "Chrgs", skip_serializing_if = "Option::is_none") )]
84714	pub chrgs: Option<Charges15>,
84715	#[cfg_attr( feature = "derive_serde", serde(rename = "TechInptChanl", skip_serializing_if = "Option::is_none") )]
84716	pub tech_inpt_chanl: Option<TechnicalInputChannel1Choice>,
84717	#[cfg_attr( feature = "derive_serde", serde(rename = "Intrst", skip_serializing_if = "Option::is_none") )]
84718	pub intrst: Option<TransactionInterest4>,
84719	#[cfg_attr( feature = "derive_serde", serde(rename = "CardTx", skip_serializing_if = "Option::is_none") )]
84720	pub card_tx: Option<CardEntry5>,
84721	#[cfg_attr( feature = "derive_serde", serde(rename = "NtryDtls", skip_serializing_if = "Option::is_none") )]
84722	pub ntry_dtls: Option<Vec<EntryDetails13>>,
84723	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlNtryInf", skip_serializing_if = "Option::is_none") )]
84724	pub addtl_ntry_inf: Option<String>,
84725}
84726
84727impl ReportEntry14 {
84728	pub fn validate(&self) -> Result<(), ValidationError> {
84729		if let Some(ref val) = self.ntry_ref {
84730			if val.chars().count() < 1 {
84731				return Err(ValidationError::new(1001, "ntry_ref is shorter than the minimum length of 1".to_string()));
84732			}
84733			if val.chars().count() > 35 {
84734				return Err(ValidationError::new(1002, "ntry_ref exceeds the maximum length of 35".to_string()));
84735			}
84736		}
84737		self.amt.validate()?;
84738		self.cdt_dbt_ind.validate()?;
84739		self.sts.validate()?;
84740		if let Some(ref val) = self.bookg_dt { val.validate()? }
84741		if let Some(ref val) = self.val_dt { val.validate()? }
84742		if let Some(ref val) = self.acct_svcr_ref {
84743			if val.chars().count() < 1 {
84744				return Err(ValidationError::new(1001, "acct_svcr_ref is shorter than the minimum length of 1".to_string()));
84745			}
84746			if val.chars().count() > 35 {
84747				return Err(ValidationError::new(1002, "acct_svcr_ref exceeds the maximum length of 35".to_string()));
84748			}
84749		}
84750		if let Some(ref vec) = self.avlbty { for item in vec { item.validate()? } }
84751		self.bk_tx_cd.validate()?;
84752		if let Some(ref val) = self.addtl_inf_ind { val.validate()? }
84753		if let Some(ref val) = self.amt_dtls { val.validate()? }
84754		if let Some(ref val) = self.chrgs { val.validate()? }
84755		if let Some(ref val) = self.tech_inpt_chanl { val.validate()? }
84756		if let Some(ref val) = self.intrst { val.validate()? }
84757		if let Some(ref val) = self.card_tx { val.validate()? }
84758		if let Some(ref vec) = self.ntry_dtls { for item in vec { item.validate()? } }
84759		if let Some(ref val) = self.addtl_ntry_inf {
84760			if val.chars().count() < 1 {
84761				return Err(ValidationError::new(1001, "addtl_ntry_inf is shorter than the minimum length of 1".to_string()));
84762			}
84763			if val.chars().count() > 500 {
84764				return Err(ValidationError::new(1002, "addtl_ntry_inf exceeds the maximum length of 500".to_string()));
84765			}
84766		}
84767		Ok(())
84768	}
84769}
84770
84771
84772// ReportHeader6 ...
84773#[cfg_attr(feature = "derive_debug", derive(Debug))]
84774#[cfg_attr(feature = "derive_default", derive(Default))]
84775#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84776#[cfg_attr(feature = "derive_clone", derive(Clone))]
84777#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84778pub struct ReportHeader6 {
84779	#[cfg_attr( feature = "derive_serde", serde(rename = "RptId") )]
84780	pub rpt_id: String,
84781	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgPgntn", skip_serializing_if = "Option::is_none") )]
84782	pub msg_pgntn: Option<Pagination1>,
84783}
84784
84785impl ReportHeader6 {
84786	pub fn validate(&self) -> Result<(), ValidationError> {
84787		if self.rpt_id.chars().count() < 1 {
84788			return Err(ValidationError::new(1001, "rpt_id is shorter than the minimum length of 1".to_string()));
84789		}
84790		if self.rpt_id.chars().count() > 35 {
84791			return Err(ValidationError::new(1002, "rpt_id exceeds the maximum length of 35".to_string()));
84792		}
84793		if let Some(ref val) = self.msg_pgntn { val.validate()? }
84794		Ok(())
84795	}
84796}
84797
84798
84799// ReportHeader7 ...
84800#[cfg_attr(feature = "derive_debug", derive(Debug))]
84801#[cfg_attr(feature = "derive_default", derive(Default))]
84802#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84803#[cfg_attr(feature = "derive_clone", derive(Clone))]
84804#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84805pub struct ReportHeader7 {
84806	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
84807	pub id: String,
84808	#[cfg_attr( feature = "derive_serde", serde(rename = "Fr") )]
84809	pub fr: Party50Choice,
84810	#[cfg_attr( feature = "derive_serde", serde(rename = "To") )]
84811	pub to: Party50Choice,
84812	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
84813	pub cre_dt_tm: String,
84814}
84815
84816impl ReportHeader7 {
84817	pub fn validate(&self) -> Result<(), ValidationError> {
84818		if self.id.chars().count() < 1 {
84819			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
84820		}
84821		if self.id.chars().count() > 35 {
84822			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
84823		}
84824		self.fr.validate()?;
84825		self.to.validate()?;
84826		Ok(())
84827	}
84828}
84829
84830
84831// ReportIndicator1Code ...
84832#[cfg_attr(feature = "derive_debug", derive(Debug))]
84833#[cfg_attr(feature = "derive_default", derive(Default))]
84834#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84835#[cfg_attr(feature = "derive_clone", derive(Clone))]
84836#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84837pub enum ReportIndicator1Code {
84838	#[cfg_attr(feature = "derive_default", default)]
84839	#[cfg_attr( feature = "derive_serde", serde(rename = "STND") )]
84840	CodeSTND,
84841	#[cfg_attr( feature = "derive_serde", serde(rename = "PRPR") )]
84842	CodePRPR,
84843}
84844
84845impl ReportIndicator1Code {
84846	pub fn validate(&self) -> Result<(), ValidationError> {
84847		Ok(())
84848	}
84849}
84850
84851
84852// ReportParameter1 ...
84853#[cfg_attr(feature = "derive_debug", derive(Debug))]
84854#[cfg_attr(feature = "derive_default", derive(Default))]
84855#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84856#[cfg_attr(feature = "derive_clone", derive(Clone))]
84857#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84858pub struct ReportParameter1 {
84859	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
84860	pub nm: String,
84861	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
84862	pub val: String,
84863}
84864
84865impl ReportParameter1 {
84866	pub fn validate(&self) -> Result<(), ValidationError> {
84867		if self.nm.chars().count() < 1 {
84868			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
84869		}
84870		if self.nm.chars().count() > 70 {
84871			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 70".to_string()));
84872		}
84873		if self.val.chars().count() < 1 {
84874			return Err(ValidationError::new(1001, "val is shorter than the minimum length of 1".to_string()));
84875		}
84876		if self.val.chars().count() > 350 {
84877			return Err(ValidationError::new(1002, "val exceeds the maximum length of 350".to_string()));
84878		}
84879		Ok(())
84880	}
84881}
84882
84883
84884// ReportPeriodActivity1Code ...
84885#[cfg_attr(feature = "derive_debug", derive(Debug))]
84886#[cfg_attr(feature = "derive_default", derive(Default))]
84887#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84888#[cfg_attr(feature = "derive_clone", derive(Clone))]
84889#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84890pub enum ReportPeriodActivity1Code {
84891	#[cfg_attr(feature = "derive_default", default)]
84892	#[cfg_attr( feature = "derive_serde", serde(rename = "NOTX") )]
84893	CodeNOTX,
84894}
84895
84896impl ReportPeriodActivity1Code {
84897	pub fn validate(&self) -> Result<(), ValidationError> {
84898		Ok(())
84899	}
84900}
84901
84902
84903// ReportPeriodActivity3Code ...
84904#[cfg_attr(feature = "derive_debug", derive(Debug))]
84905#[cfg_attr(feature = "derive_default", derive(Default))]
84906#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84907#[cfg_attr(feature = "derive_clone", derive(Clone))]
84908#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84909pub enum ReportPeriodActivity3Code {
84910	#[cfg_attr(feature = "derive_default", default)]
84911	#[cfg_attr( feature = "derive_serde", serde(rename = "NOTX") )]
84912	CodeNOTX,
84913	#[cfg_attr( feature = "derive_serde", serde(rename = "NORA") )]
84914	CodeNORA,
84915}
84916
84917impl ReportPeriodActivity3Code {
84918	pub fn validate(&self) -> Result<(), ValidationError> {
84919		Ok(())
84920	}
84921}
84922
84923
84924// ReportQueryCriteria3 ...
84925#[cfg_attr(feature = "derive_debug", derive(Debug))]
84926#[cfg_attr(feature = "derive_default", derive(Default))]
84927#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84928#[cfg_attr(feature = "derive_clone", derive(Clone))]
84929#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84930pub struct ReportQueryCriteria3 {
84931	#[cfg_attr( feature = "derive_serde", serde(rename = "NewQryNm", skip_serializing_if = "Option::is_none") )]
84932	pub new_qry_nm: Option<String>,
84933	#[cfg_attr( feature = "derive_serde", serde(rename = "SchCrit") )]
84934	pub sch_crit: ReportQuerySearchCriteria3,
84935}
84936
84937impl ReportQueryCriteria3 {
84938	pub fn validate(&self) -> Result<(), ValidationError> {
84939		if let Some(ref val) = self.new_qry_nm {
84940			if val.chars().count() < 1 {
84941				return Err(ValidationError::new(1001, "new_qry_nm is shorter than the minimum length of 1".to_string()));
84942			}
84943			if val.chars().count() > 35 {
84944				return Err(ValidationError::new(1002, "new_qry_nm exceeds the maximum length of 35".to_string()));
84945			}
84946		}
84947		self.sch_crit.validate()?;
84948		Ok(())
84949	}
84950}
84951
84952
84953// ReportQuerySearchCriteria3 ...
84954#[cfg_attr(feature = "derive_debug", derive(Debug))]
84955#[cfg_attr(feature = "derive_default", derive(Default))]
84956#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
84957#[cfg_attr(feature = "derive_clone", derive(Clone))]
84958#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
84959pub struct ReportQuerySearchCriteria3 {
84960	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
84961	pub acct_id: Option<Vec<AccountIdentificationSearchCriteria2Choice>>,
84962	#[cfg_attr( feature = "derive_serde", serde(rename = "Bal", skip_serializing_if = "Option::is_none") )]
84963	pub bal: Option<Vec<CashBalance14>>,
84964	#[cfg_attr( feature = "derive_serde", serde(rename = "RptNm", skip_serializing_if = "Option::is_none") )]
84965	pub rpt_nm: Option<String>,
84966	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNmId", skip_serializing_if = "Option::is_none") )]
84967	pub msg_nm_id: Option<String>,
84968	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId") )]
84969	pub pty_id: PartyIdentification136,
84970	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnsblPtyId", skip_serializing_if = "Option::is_none") )]
84971	pub rspnsbl_pty_id: Option<PartyIdentification136>,
84972	#[cfg_attr( feature = "derive_serde", serde(rename = "DtSch", skip_serializing_if = "Option::is_none") )]
84973	pub dt_sch: Option<DatePeriodSearch1Choice>,
84974	#[cfg_attr( feature = "derive_serde", serde(rename = "SchdldTm", skip_serializing_if = "Option::is_none") )]
84975	pub schdld_tm: Option<DateTimePeriod1Choice>,
84976	#[cfg_attr( feature = "derive_serde", serde(rename = "Evt", skip_serializing_if = "Option::is_none") )]
84977	pub evt: Option<EventType1Choice>,
84978}
84979
84980impl ReportQuerySearchCriteria3 {
84981	pub fn validate(&self) -> Result<(), ValidationError> {
84982		if let Some(ref vec) = self.acct_id { for item in vec { item.validate()? } }
84983		if let Some(ref vec) = self.bal { for item in vec { item.validate()? } }
84984		if let Some(ref val) = self.rpt_nm {
84985			if val.chars().count() < 1 {
84986				return Err(ValidationError::new(1001, "rpt_nm is shorter than the minimum length of 1".to_string()));
84987			}
84988			if val.chars().count() > 4 {
84989				return Err(ValidationError::new(1002, "rpt_nm exceeds the maximum length of 4".to_string()));
84990			}
84991			let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
84992			if !pattern.is_match(val) {
84993				return Err(ValidationError::new(1005, "rpt_nm does not match the required pattern".to_string()));
84994			}
84995		}
84996		if let Some(ref val) = self.msg_nm_id {
84997			if val.chars().count() < 1 {
84998				return Err(ValidationError::new(1001, "msg_nm_id is shorter than the minimum length of 1".to_string()));
84999			}
85000			if val.chars().count() > 35 {
85001				return Err(ValidationError::new(1002, "msg_nm_id exceeds the maximum length of 35".to_string()));
85002			}
85003		}
85004		self.pty_id.validate()?;
85005		if let Some(ref val) = self.rspnsbl_pty_id { val.validate()? }
85006		if let Some(ref val) = self.dt_sch { val.validate()? }
85007		if let Some(ref val) = self.schdld_tm { val.validate()? }
85008		if let Some(ref val) = self.evt { val.validate()? }
85009		Ok(())
85010	}
85011}
85012
85013
85014// ReportingAssetBreakdown1 ...
85015#[cfg_attr(feature = "derive_debug", derive(Debug))]
85016#[cfg_attr(feature = "derive_default", derive(Default))]
85017#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85018#[cfg_attr(feature = "derive_clone", derive(Clone))]
85019#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85020pub struct ReportingAssetBreakdown1 {
85021	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgAsstTp") )]
85022	pub rptg_asst_tp: ProductType6Code,
85023	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
85024	pub id: Option<String>,
85025	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
85026	pub amt: ActiveCurrencyAndAmount,
85027}
85028
85029impl ReportingAssetBreakdown1 {
85030	pub fn validate(&self) -> Result<(), ValidationError> {
85031		self.rptg_asst_tp.validate()?;
85032		if let Some(ref val) = self.id {
85033			if val.chars().count() < 1 {
85034				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
85035			}
85036			if val.chars().count() > 350 {
85037				return Err(ValidationError::new(1002, "id exceeds the maximum length of 350".to_string()));
85038			}
85039		}
85040		self.amt.validate()?;
85041		Ok(())
85042	}
85043}
85044
85045
85046// ReportingExemption1 ...
85047#[cfg_attr(feature = "derive_debug", derive(Debug))]
85048#[cfg_attr(feature = "derive_default", derive(Default))]
85049#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85050#[cfg_attr(feature = "derive_clone", derive(Clone))]
85051#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85052pub struct ReportingExemption1 {
85053	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
85054	pub rsn: String,
85055	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
85056	pub desc: Option<String>,
85057}
85058
85059impl ReportingExemption1 {
85060	pub fn validate(&self) -> Result<(), ValidationError> {
85061		if self.rsn.chars().count() < 1 {
85062			return Err(ValidationError::new(1001, "rsn is shorter than the minimum length of 1".to_string()));
85063		}
85064		if self.rsn.chars().count() > 4 {
85065			return Err(ValidationError::new(1002, "rsn exceeds the maximum length of 4".to_string()));
85066		}
85067		if let Some(ref val) = self.desc {
85068			if val.chars().count() < 1 {
85069				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
85070			}
85071			if val.chars().count() > 1000 {
85072				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 1000".to_string()));
85073			}
85074		}
85075		Ok(())
85076	}
85077}
85078
85079
85080// ReportingMessageStatus1Code ...
85081#[cfg_attr(feature = "derive_debug", derive(Debug))]
85082#[cfg_attr(feature = "derive_default", derive(Default))]
85083#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85084#[cfg_attr(feature = "derive_clone", derive(Clone))]
85085#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85086pub enum ReportingMessageStatus1Code {
85087	#[cfg_attr(feature = "derive_default", default)]
85088	#[cfg_attr( feature = "derive_serde", serde(rename = "ACPT") )]
85089	CodeACPT,
85090	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTC") )]
85091	CodeACTC,
85092	#[cfg_attr( feature = "derive_serde", serde(rename = "PART") )]
85093	CodePART,
85094	#[cfg_attr( feature = "derive_serde", serde(rename = "RCVD") )]
85095	CodeRCVD,
85096	#[cfg_attr( feature = "derive_serde", serde(rename = "RJCT") )]
85097	CodeRJCT,
85098	#[cfg_attr( feature = "derive_serde", serde(rename = "RMDR") )]
85099	CodeRMDR,
85100	#[cfg_attr( feature = "derive_serde", serde(rename = "WARN") )]
85101	CodeWARN,
85102	#[cfg_attr( feature = "derive_serde", serde(rename = "INCF") )]
85103	CodeINCF,
85104	#[cfg_attr( feature = "derive_serde", serde(rename = "CRPT") )]
85105	CodeCRPT,
85106}
85107
85108impl ReportingMessageStatus1Code {
85109	pub fn validate(&self) -> Result<(), ValidationError> {
85110		Ok(())
85111	}
85112}
85113
85114
85115// ReportingMessageStatus2Code ...
85116#[cfg_attr(feature = "derive_debug", derive(Debug))]
85117#[cfg_attr(feature = "derive_default", derive(Default))]
85118#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85119#[cfg_attr(feature = "derive_clone", derive(Clone))]
85120#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85121pub enum ReportingMessageStatus2Code {
85122	#[cfg_attr(feature = "derive_default", default)]
85123	#[cfg_attr( feature = "derive_serde", serde(rename = "ACPT") )]
85124	CodeACPT,
85125	#[cfg_attr( feature = "derive_serde", serde(rename = "RJCT") )]
85126	CodeRJCT,
85127	#[cfg_attr( feature = "derive_serde", serde(rename = "INCF") )]
85128	CodeINCF,
85129	#[cfg_attr( feature = "derive_serde", serde(rename = "CRPT") )]
85130	CodeCRPT,
85131	#[cfg_attr( feature = "derive_serde", serde(rename = "NAUT") )]
85132	CodeNAUT,
85133}
85134
85135impl ReportingMessageStatus2Code {
85136	pub fn validate(&self) -> Result<(), ValidationError> {
85137		Ok(())
85138	}
85139}
85140
85141
85142// ReportingPeriod4 ...
85143#[cfg_attr(feature = "derive_debug", derive(Debug))]
85144#[cfg_attr(feature = "derive_default", derive(Default))]
85145#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85146#[cfg_attr(feature = "derive_clone", derive(Clone))]
85147#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85148pub struct ReportingPeriod4 {
85149	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDt") )]
85150	pub fr_to_dt: DatePeriod3,
85151	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToTm") )]
85152	pub fr_to_tm: TimePeriod2,
85153	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
85154	pub tp: QueryType3Code,
85155}
85156
85157impl ReportingPeriod4 {
85158	pub fn validate(&self) -> Result<(), ValidationError> {
85159		self.fr_to_dt.validate()?;
85160		self.fr_to_tm.validate()?;
85161		self.tp.validate()?;
85162		Ok(())
85163	}
85164}
85165
85166
85167// ReportingPeriod5 ...
85168#[cfg_attr(feature = "derive_debug", derive(Debug))]
85169#[cfg_attr(feature = "derive_default", derive(Default))]
85170#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85171#[cfg_attr(feature = "derive_clone", derive(Clone))]
85172#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85173pub struct ReportingPeriod5 {
85174	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDt") )]
85175	pub fr_to_dt: DatePeriod3,
85176	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToTm", skip_serializing_if = "Option::is_none") )]
85177	pub fr_to_tm: Option<TimePeriodDetails1>,
85178	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
85179	pub tp: QueryType3Code,
85180}
85181
85182impl ReportingPeriod5 {
85183	pub fn validate(&self) -> Result<(), ValidationError> {
85184		self.fr_to_dt.validate()?;
85185		if let Some(ref val) = self.fr_to_tm { val.validate()? }
85186		self.tp.validate()?;
85187		Ok(())
85188	}
85189}
85190
85191
85192// ReportingRecordStatus1Code ...
85193#[cfg_attr(feature = "derive_debug", derive(Debug))]
85194#[cfg_attr(feature = "derive_default", derive(Default))]
85195#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85196#[cfg_attr(feature = "derive_clone", derive(Clone))]
85197#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85198pub enum ReportingRecordStatus1Code {
85199	#[cfg_attr(feature = "derive_default", default)]
85200	#[cfg_attr( feature = "derive_serde", serde(rename = "ACPT") )]
85201	CodeACPT,
85202	#[cfg_attr( feature = "derive_serde", serde(rename = "ACPD") )]
85203	CodeACPD,
85204	#[cfg_attr( feature = "derive_serde", serde(rename = "PDNG") )]
85205	CodePDNG,
85206	#[cfg_attr( feature = "derive_serde", serde(rename = "RCVD") )]
85207	CodeRCVD,
85208	#[cfg_attr( feature = "derive_serde", serde(rename = "RJCT") )]
85209	CodeRJCT,
85210	#[cfg_attr( feature = "derive_serde", serde(rename = "RJPD") )]
85211	CodeRJPD,
85212	#[cfg_attr( feature = "derive_serde", serde(rename = "WARN") )]
85213	CodeWARN,
85214}
85215
85216impl ReportingRecordStatus1Code {
85217	pub fn validate(&self) -> Result<(), ValidationError> {
85218		Ok(())
85219	}
85220}
85221
85222
85223// ReportingRequest7 ...
85224#[cfg_attr(feature = "derive_debug", derive(Debug))]
85225#[cfg_attr(feature = "derive_default", derive(Default))]
85226#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85227#[cfg_attr(feature = "derive_clone", derive(Clone))]
85228#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85229pub struct ReportingRequest7 {
85230	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
85231	pub id: Option<String>,
85232	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdMsgNmId") )]
85233	pub reqd_msg_nm_id: String,
85234	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
85235	pub acct: Option<CashAccount40>,
85236	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr") )]
85237	pub acct_ownr: Party50Choice,
85238	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
85239	pub acct_svcr: Option<BranchAndFinancialInstitutionIdentification8>,
85240	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPrd", skip_serializing_if = "Option::is_none") )]
85241	pub rptg_prd: Option<ReportingPeriod5>,
85242	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgSeq", skip_serializing_if = "Option::is_none") )]
85243	pub rptg_seq: Option<SequenceRange1Choice>,
85244	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdTxTp", skip_serializing_if = "Option::is_none") )]
85245	pub reqd_tx_tp: Option<TransactionType2>,
85246	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdBalTp", skip_serializing_if = "Option::is_none") )]
85247	pub reqd_bal_tp: Option<Vec<BalanceType13>>,
85248}
85249
85250impl ReportingRequest7 {
85251	pub fn validate(&self) -> Result<(), ValidationError> {
85252		if let Some(ref val) = self.id {
85253			if val.chars().count() < 1 {
85254				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
85255			}
85256			if val.chars().count() > 35 {
85257				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
85258			}
85259		}
85260		if self.reqd_msg_nm_id.chars().count() < 1 {
85261			return Err(ValidationError::new(1001, "reqd_msg_nm_id is shorter than the minimum length of 1".to_string()));
85262		}
85263		if self.reqd_msg_nm_id.chars().count() > 35 {
85264			return Err(ValidationError::new(1002, "reqd_msg_nm_id exceeds the maximum length of 35".to_string()));
85265		}
85266		if let Some(ref val) = self.acct { val.validate()? }
85267		self.acct_ownr.validate()?;
85268		if let Some(ref val) = self.acct_svcr { val.validate()? }
85269		if let Some(ref val) = self.rptg_prd { val.validate()? }
85270		if let Some(ref val) = self.rptg_seq { val.validate()? }
85271		if let Some(ref val) = self.reqd_tx_tp { val.validate()? }
85272		if let Some(ref vec) = self.reqd_bal_tp { for item in vec { item.validate()? } }
85273		Ok(())
85274	}
85275}
85276
85277
85278// ReportingRequirement3Choice ...
85279#[cfg_attr(feature = "derive_debug", derive(Debug))]
85280#[cfg_attr(feature = "derive_default", derive(Default))]
85281#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85282#[cfg_attr(feature = "derive_clone", derive(Clone))]
85283#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85284pub struct ReportingRequirement3Choice {
85285	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgRqrmnt", skip_serializing_if = "Option::is_none") )]
85286	pub rptg_rqrmnt: Option<ReconciliationCategory5>,
85287	#[cfg_attr( feature = "derive_serde", serde(rename = "NoRptgRqrmnt", skip_serializing_if = "Option::is_none") )]
85288	pub no_rptg_rqrmnt: Option<ReconciliationCategory4>,
85289}
85290
85291impl ReportingRequirement3Choice {
85292	pub fn validate(&self) -> Result<(), ValidationError> {
85293		if let Some(ref val) = self.rptg_rqrmnt { val.validate()? }
85294		if let Some(ref val) = self.no_rptg_rqrmnt { val.validate()? }
85295		Ok(())
85296	}
85297}
85298
85299
85300// ReportingSource1Choice ...
85301#[cfg_attr(feature = "derive_debug", derive(Debug))]
85302#[cfg_attr(feature = "derive_default", derive(Default))]
85303#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85304#[cfg_attr(feature = "derive_clone", derive(Clone))]
85305#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85306pub struct ReportingSource1Choice {
85307	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
85308	pub cd: Option<String>,
85309	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
85310	pub prtry: Option<String>,
85311}
85312
85313impl ReportingSource1Choice {
85314	pub fn validate(&self) -> Result<(), ValidationError> {
85315		if let Some(ref val) = self.cd {
85316			if val.chars().count() < 1 {
85317				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
85318			}
85319			if val.chars().count() > 4 {
85320				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
85321			}
85322		}
85323		if let Some(ref val) = self.prtry {
85324			if val.chars().count() < 1 {
85325				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
85326			}
85327			if val.chars().count() > 35 {
85328				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
85329			}
85330		}
85331		Ok(())
85332	}
85333}
85334
85335
85336// ReportingTransactionType3Choice ...
85337#[cfg_attr(feature = "derive_debug", derive(Debug))]
85338#[cfg_attr(feature = "derive_default", derive(Default))]
85339#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85340#[cfg_attr(feature = "derive_clone", derive(Clone))]
85341#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85342pub struct ReportingTransactionType3Choice {
85343	#[cfg_attr( feature = "derive_serde", serde(rename = "New", skip_serializing_if = "Option::is_none") )]
85344	pub new: Option<SecuritiesTransactionReport7>,
85345	#[cfg_attr( feature = "derive_serde", serde(rename = "Cxl", skip_serializing_if = "Option::is_none") )]
85346	pub cxl: Option<SecuritiesTransactionReport2>,
85347	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
85348	pub splmtry_data: Option<Vec<SupplementaryData1>>,
85349}
85350
85351impl ReportingTransactionType3Choice {
85352	pub fn validate(&self) -> Result<(), ValidationError> {
85353		if let Some(ref val) = self.new { val.validate()? }
85354		if let Some(ref val) = self.cxl { val.validate()? }
85355		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
85356		Ok(())
85357	}
85358}
85359
85360
85361// ReportingWaiverType1Code ...
85362#[cfg_attr(feature = "derive_debug", derive(Debug))]
85363#[cfg_attr(feature = "derive_default", derive(Default))]
85364#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85365#[cfg_attr(feature = "derive_clone", derive(Clone))]
85366#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85367pub enum ReportingWaiverType1Code {
85368	#[cfg_attr(feature = "derive_default", default)]
85369	#[cfg_attr( feature = "derive_serde", serde(rename = "OILQ") )]
85370	CodeOILQ,
85371	#[cfg_attr( feature = "derive_serde", serde(rename = "NLIQ") )]
85372	CodeNLIQ,
85373	#[cfg_attr( feature = "derive_serde", serde(rename = "PRIC") )]
85374	CodePRIC,
85375	#[cfg_attr( feature = "derive_serde", serde(rename = "ILQD") )]
85376	CodeILQD,
85377	#[cfg_attr( feature = "derive_serde", serde(rename = "RFPT") )]
85378	CodeRFPT,
85379	#[cfg_attr( feature = "derive_serde", serde(rename = "SIZE") )]
85380	CodeSIZE,
85381}
85382
85383impl ReportingWaiverType1Code {
85384	pub fn validate(&self) -> Result<(), ValidationError> {
85385		Ok(())
85386	}
85387}
85388
85389
85390// ReportingWaiverType3Code ...
85391#[cfg_attr(feature = "derive_debug", derive(Debug))]
85392#[cfg_attr(feature = "derive_default", derive(Default))]
85393#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85394#[cfg_attr(feature = "derive_clone", derive(Clone))]
85395#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85396pub enum ReportingWaiverType3Code {
85397	#[cfg_attr(feature = "derive_default", default)]
85398	#[cfg_attr( feature = "derive_serde", serde(rename = "BENC") )]
85399	CodeBENC,
85400	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTX") )]
85401	CodeACTX,
85402	#[cfg_attr( feature = "derive_serde", serde(rename = "ILQD") )]
85403	CodeILQD,
85404	#[cfg_attr( feature = "derive_serde", serde(rename = "SIZE") )]
85405	CodeSIZE,
85406	#[cfg_attr( feature = "derive_serde", serde(rename = "CANC") )]
85407	CodeCANC,
85408	#[cfg_attr( feature = "derive_serde", serde(rename = "AMND") )]
85409	CodeAMND,
85410	#[cfg_attr( feature = "derive_serde", serde(rename = "SDIV") )]
85411	CodeSDIV,
85412	#[cfg_attr( feature = "derive_serde", serde(rename = "RPRI") )]
85413	CodeRPRI,
85414	#[cfg_attr( feature = "derive_serde", serde(rename = "DUPL") )]
85415	CodeDUPL,
85416	#[cfg_attr( feature = "derive_serde", serde(rename = "LRGS") )]
85417	CodeLRGS,
85418	#[cfg_attr( feature = "derive_serde", serde(rename = "TNCP") )]
85419	CodeTNCP,
85420	#[cfg_attr( feature = "derive_serde", serde(rename = "TPAC") )]
85421	CodeTPAC,
85422	#[cfg_attr( feature = "derive_serde", serde(rename = "XFPH") )]
85423	CodeXFPH,
85424}
85425
85426impl ReportingWaiverType3Code {
85427	pub fn validate(&self) -> Result<(), ValidationError> {
85428		Ok(())
85429	}
85430}
85431
85432
85433// RepurchaseAgreement2 ...
85434#[cfg_attr(feature = "derive_debug", derive(Debug))]
85435#[cfg_attr(feature = "derive_default", derive(Default))]
85436#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85437#[cfg_attr(feature = "derive_clone", derive(Clone))]
85438#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85439pub struct RepurchaseAgreement2 {
85440	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt") )]
85441	pub mtrty_dt: String,
85442	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndLegPric") )]
85443	pub scnd_leg_pric: ActiveCurrencyAndAmount,
85444	#[cfg_attr( feature = "derive_serde", serde(rename = "CollMktVal") )]
85445	pub coll_mkt_val: ActiveCurrencyAndAmount,
85446	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPty") )]
85447	pub ctr_pty: String,
85448	#[cfg_attr( feature = "derive_serde", serde(rename = "RpAgrmtTp") )]
85449	pub rp_agrmt_tp: RepurchaseAgreementType3Choice,
85450	#[cfg_attr( feature = "derive_serde", serde(rename = "TrptyAgtId", skip_serializing_if = "Option::is_none") )]
85451	pub trpty_agt_id: Option<String>,
85452}
85453
85454impl RepurchaseAgreement2 {
85455	pub fn validate(&self) -> Result<(), ValidationError> {
85456		self.scnd_leg_pric.validate()?;
85457		self.coll_mkt_val.validate()?;
85458		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
85459		if !pattern.is_match(&self.ctr_pty) {
85460			return Err(ValidationError::new(1005, "ctr_pty does not match the required pattern".to_string()));
85461		}
85462		self.rp_agrmt_tp.validate()?;
85463		if let Some(ref val) = self.trpty_agt_id {
85464			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
85465			if !pattern.is_match(val) {
85466				return Err(ValidationError::new(1005, "trpty_agt_id does not match the required pattern".to_string()));
85467			}
85468		}
85469		Ok(())
85470	}
85471}
85472
85473
85474// RepurchaseAgreement3 ...
85475#[cfg_attr(feature = "derive_debug", derive(Debug))]
85476#[cfg_attr(feature = "derive_default", derive(Default))]
85477#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85478#[cfg_attr(feature = "derive_clone", derive(Clone))]
85479#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85480pub struct RepurchaseAgreement3 {
85481	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctClssfctn") )]
85482	pub pdct_clssfctn: ProductClassification1,
85483	#[cfg_attr( feature = "derive_serde", serde(rename = "RpAgrmtTp") )]
85484	pub rp_agrmt_tp: RepurchaseAgreementType1Choice,
85485	#[cfg_attr( feature = "derive_serde", serde(rename = "TrptyAgt", skip_serializing_if = "Option::is_none") )]
85486	pub trpty_agt: Option<String>,
85487}
85488
85489impl RepurchaseAgreement3 {
85490	pub fn validate(&self) -> Result<(), ValidationError> {
85491		self.pdct_clssfctn.validate()?;
85492		self.rp_agrmt_tp.validate()?;
85493		if let Some(ref val) = self.trpty_agt {
85494			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
85495			if !pattern.is_match(val) {
85496				return Err(ValidationError::new(1005, "trpty_agt does not match the required pattern".to_string()));
85497			}
85498		}
85499		Ok(())
85500	}
85501}
85502
85503
85504// RepurchaseAgreementType1Choice ...
85505#[cfg_attr(feature = "derive_debug", derive(Debug))]
85506#[cfg_attr(feature = "derive_default", derive(Default))]
85507#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85508#[cfg_attr(feature = "derive_clone", derive(Clone))]
85509#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85510pub struct RepurchaseAgreementType1Choice {
85511	#[cfg_attr( feature = "derive_serde", serde(rename = "SpcfcColl", skip_serializing_if = "Option::is_none") )]
85512	pub spcfc_coll: Option<SpecificCollateral2>,
85513	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlColl", skip_serializing_if = "Option::is_none") )]
85514	pub gnl_coll: Option<GeneralCollateral2>,
85515}
85516
85517impl RepurchaseAgreementType1Choice {
85518	pub fn validate(&self) -> Result<(), ValidationError> {
85519		if let Some(ref val) = self.spcfc_coll { val.validate()? }
85520		if let Some(ref val) = self.gnl_coll { val.validate()? }
85521		Ok(())
85522	}
85523}
85524
85525
85526// RepurchaseAgreementType3Choice ...
85527#[cfg_attr(feature = "derive_debug", derive(Debug))]
85528#[cfg_attr(feature = "derive_default", derive(Default))]
85529#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85530#[cfg_attr(feature = "derive_clone", derive(Clone))]
85531#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85532pub struct RepurchaseAgreementType3Choice {
85533	#[cfg_attr( feature = "derive_serde", serde(rename = "SpcfcColl", skip_serializing_if = "Option::is_none") )]
85534	pub spcfc_coll: Option<SpecificCollateral2>,
85535	#[cfg_attr( feature = "derive_serde", serde(rename = "GnlColl", skip_serializing_if = "Option::is_none") )]
85536	pub gnl_coll: Option<GeneralCollateral3>,
85537}
85538
85539impl RepurchaseAgreementType3Choice {
85540	pub fn validate(&self) -> Result<(), ValidationError> {
85541		if let Some(ref val) = self.spcfc_coll { val.validate()? }
85542		if let Some(ref val) = self.gnl_coll { val.validate()? }
85543		Ok(())
85544	}
85545}
85546
85547
85548// RequestData2 ...
85549#[cfg_attr(feature = "derive_debug", derive(Debug))]
85550#[cfg_attr(feature = "derive_default", derive(Default))]
85551#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85552#[cfg_attr(feature = "derive_clone", derive(Clone))]
85553#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85554pub struct RequestData2 {
85555	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
85556	pub msg_id: String,
85557	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqTp") )]
85558	pub req_tp: String,
85559	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdActvtnDt") )]
85560	pub reqd_actvtn_dt: String,
85561	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqSvcr", skip_serializing_if = "Option::is_none") )]
85562	pub req_svcr: Option<PartyIdentification242Choice>,
85563	#[cfg_attr( feature = "derive_serde", serde(rename = "NetSvcPtcptId") )]
85564	pub net_svc_ptcpt_id: PartyIdentification242Choice,
85565	#[cfg_attr( feature = "derive_serde", serde(rename = "NetSvcTp", skip_serializing_if = "Option::is_none") )]
85566	pub net_svc_tp: Option<String>,
85567}
85568
85569impl RequestData2 {
85570	pub fn validate(&self) -> Result<(), ValidationError> {
85571		if self.msg_id.chars().count() < 1 {
85572			return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
85573		}
85574		if self.msg_id.chars().count() > 35 {
85575			return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
85576		}
85577		if self.req_tp.chars().count() < 1 {
85578			return Err(ValidationError::new(1001, "req_tp is shorter than the minimum length of 1".to_string()));
85579		}
85580		if self.req_tp.chars().count() > 4 {
85581			return Err(ValidationError::new(1002, "req_tp exceeds the maximum length of 4".to_string()));
85582		}
85583		if let Some(ref val) = self.req_svcr { val.validate()? }
85584		self.net_svc_ptcpt_id.validate()?;
85585		if let Some(ref val) = self.net_svc_tp {
85586			if val.chars().count() < 1 {
85587				return Err(ValidationError::new(1001, "net_svc_tp is shorter than the minimum length of 1".to_string()));
85588			}
85589			if val.chars().count() > 35 {
85590				return Err(ValidationError::new(1002, "net_svc_tp exceeds the maximum length of 35".to_string()));
85591			}
85592		}
85593		Ok(())
85594	}
85595}
85596
85597
85598// RequestDetails22 ...
85599#[cfg_attr(feature = "derive_debug", derive(Debug))]
85600#[cfg_attr(feature = "derive_default", derive(Default))]
85601#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85602#[cfg_attr(feature = "derive_clone", derive(Clone))]
85603#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85604pub struct RequestDetails22 {
85605	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref") )]
85606	pub ref_attr: References14,
85607	#[cfg_attr( feature = "derive_serde", serde(rename = "Lkg", skip_serializing_if = "Option::is_none") )]
85608	pub lkg: Option<LinkageType3Choice>,
85609	#[cfg_attr( feature = "derive_serde", serde(rename = "Prty", skip_serializing_if = "Option::is_none") )]
85610	pub prty: Option<PriorityNumeric4Choice>,
85611	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPrcg", skip_serializing_if = "Option::is_none") )]
85612	pub othr_prcg: Option<Vec<GenericIdentification30>>,
85613	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtlSttlmInd", skip_serializing_if = "Option::is_none") )]
85614	pub prtl_sttlm_ind: Option<bool>,
85615	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrChanl", skip_serializing_if = "Option::is_none") )]
85616	pub clr_chanl: Option<ClearingChannel2Code>,
85617	#[cfg_attr( feature = "derive_serde", serde(rename = "Lnkgs", skip_serializing_if = "Option::is_none") )]
85618	pub lnkgs: Option<Vec<Linkages57>>,
85619}
85620
85621impl RequestDetails22 {
85622	pub fn validate(&self) -> Result<(), ValidationError> {
85623		self.ref_attr.validate()?;
85624		if let Some(ref val) = self.lkg { val.validate()? }
85625		if let Some(ref val) = self.prty { val.validate()? }
85626		if let Some(ref vec) = self.othr_prcg { for item in vec { item.validate()? } }
85627		if let Some(ref val) = self.clr_chanl { val.validate()? }
85628		if let Some(ref vec) = self.lnkgs { for item in vec { item.validate()? } }
85629		Ok(())
85630	}
85631}
85632
85633
85634// RequestDetails3 ...
85635#[cfg_attr(feature = "derive_debug", derive(Debug))]
85636#[cfg_attr(feature = "derive_default", derive(Default))]
85637#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85638#[cfg_attr(feature = "derive_clone", derive(Clone))]
85639#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85640pub struct RequestDetails3 {
85641	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
85642	pub tp: String,
85643	#[cfg_attr( feature = "derive_serde", serde(rename = "Key", skip_serializing_if = "Option::is_none") )]
85644	pub key: Option<String>,
85645}
85646
85647impl RequestDetails3 {
85648	pub fn validate(&self) -> Result<(), ValidationError> {
85649		if self.tp.chars().count() < 1 {
85650			return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
85651		}
85652		if self.tp.chars().count() > 35 {
85653			return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
85654		}
85655		if let Some(ref val) = self.key {
85656			if val.chars().count() < 1 {
85657				return Err(ValidationError::new(1001, "key is shorter than the minimum length of 1".to_string()));
85658			}
85659			if val.chars().count() > 35 {
85660				return Err(ValidationError::new(1002, "key exceeds the maximum length of 35".to_string()));
85661			}
85662		}
85663		Ok(())
85664	}
85665}
85666
85667
85668// RequestDetails30 ...
85669#[cfg_attr(feature = "derive_debug", derive(Debug))]
85670#[cfg_attr(feature = "derive_default", derive(Default))]
85671#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85672#[cfg_attr(feature = "derive_clone", derive(Clone))]
85673#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85674pub struct RequestDetails30 {
85675	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
85676	pub tp: String,
85677	#[cfg_attr( feature = "derive_serde", serde(rename = "RqstrId", skip_serializing_if = "Option::is_none") )]
85678	pub rqstr_id: Option<PartyIdentification242Choice>,
85679	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlReqInf", skip_serializing_if = "Option::is_none") )]
85680	pub addtl_req_inf: Option<Vec<String>>,
85681}
85682
85683impl RequestDetails30 {
85684	pub fn validate(&self) -> Result<(), ValidationError> {
85685		if self.tp.chars().count() < 1 {
85686			return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
85687		}
85688		if self.tp.chars().count() > 35 {
85689			return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
85690		}
85691		if let Some(ref val) = self.rqstr_id { val.validate()? }
85692		if let Some(ref vec) = self.addtl_req_inf {
85693			for item in vec {
85694				if item.chars().count() < 1 {
85695					return Err(ValidationError::new(1001, "addtl_req_inf is shorter than the minimum length of 1".to_string()));
85696				}
85697				if item.chars().count() > 35 {
85698					return Err(ValidationError::new(1002, "addtl_req_inf exceeds the maximum length of 35".to_string()));
85699				}
85700			}
85701		}
85702		Ok(())
85703	}
85704}
85705
85706
85707// RequestDetails4 ...
85708#[cfg_attr(feature = "derive_debug", derive(Debug))]
85709#[cfg_attr(feature = "derive_default", derive(Default))]
85710#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85711#[cfg_attr(feature = "derive_clone", derive(Clone))]
85712#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85713pub struct RequestDetails4 {
85714	#[cfg_attr( feature = "derive_serde", serde(rename = "Key") )]
85715	pub key: String,
85716	#[cfg_attr( feature = "derive_serde", serde(rename = "RptData", skip_serializing_if = "Option::is_none") )]
85717	pub rpt_data: Option<Vec<ReportParameter1>>,
85718}
85719
85720impl RequestDetails4 {
85721	pub fn validate(&self) -> Result<(), ValidationError> {
85722		if self.key.chars().count() < 1 {
85723			return Err(ValidationError::new(1001, "key is shorter than the minimum length of 1".to_string()));
85724		}
85725		if self.key.chars().count() > 35 {
85726			return Err(ValidationError::new(1002, "key exceeds the maximum length of 35".to_string()));
85727		}
85728		if let Some(ref vec) = self.rpt_data { for item in vec { item.validate()? } }
85729		Ok(())
85730	}
85731}
85732
85733
85734// RequestDetails5 ...
85735#[cfg_attr(feature = "derive_debug", derive(Debug))]
85736#[cfg_attr(feature = "derive_default", derive(Default))]
85737#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85738#[cfg_attr(feature = "derive_clone", derive(Clone))]
85739#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85740pub struct RequestDetails5 {
85741	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
85742	pub tp: String,
85743	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqRef") )]
85744	pub req_ref: String,
85745	#[cfg_attr( feature = "derive_serde", serde(rename = "RptKey") )]
85746	pub rpt_key: Vec<RequestDetails4>,
85747}
85748
85749impl RequestDetails5 {
85750	pub fn validate(&self) -> Result<(), ValidationError> {
85751		if self.tp.chars().count() < 1 {
85752			return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
85753		}
85754		if self.tp.chars().count() > 35 {
85755			return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
85756		}
85757		if self.req_ref.chars().count() < 1 {
85758			return Err(ValidationError::new(1001, "req_ref is shorter than the minimum length of 1".to_string()));
85759		}
85760		if self.req_ref.chars().count() > 35 {
85761			return Err(ValidationError::new(1002, "req_ref exceeds the maximum length of 35".to_string()));
85762		}
85763		for item in &self.rpt_key { item.validate()? }
85764		Ok(())
85765	}
85766}
85767
85768
85769// RequestHandling2 ...
85770#[cfg_attr(feature = "derive_debug", derive(Debug))]
85771#[cfg_attr(feature = "derive_default", derive(Default))]
85772#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85773#[cfg_attr(feature = "derive_clone", derive(Clone))]
85774#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85775pub struct RequestHandling2 {
85776	#[cfg_attr( feature = "derive_serde", serde(rename = "StsCd") )]
85777	pub sts_cd: String,
85778	#[cfg_attr( feature = "derive_serde", serde(rename = "StsDtTm", skip_serializing_if = "Option::is_none") )]
85779	pub sts_dt_tm: Option<String>,
85780	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
85781	pub desc: Option<String>,
85782}
85783
85784impl RequestHandling2 {
85785	pub fn validate(&self) -> Result<(), ValidationError> {
85786		if self.sts_cd.chars().count() < 1 {
85787			return Err(ValidationError::new(1001, "sts_cd is shorter than the minimum length of 1".to_string()));
85788		}
85789		if self.sts_cd.chars().count() > 4 {
85790			return Err(ValidationError::new(1002, "sts_cd exceeds the maximum length of 4".to_string()));
85791		}
85792		let pattern = Regex::new("[a-zA-Z0-9]{1,4}").unwrap();
85793		if !pattern.is_match(&self.sts_cd) {
85794			return Err(ValidationError::new(1005, "sts_cd does not match the required pattern".to_string()));
85795		}
85796		if let Some(ref val) = self.desc {
85797			if val.chars().count() < 1 {
85798				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
85799			}
85800			if val.chars().count() > 140 {
85801				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 140".to_string()));
85802			}
85803		}
85804		Ok(())
85805	}
85806}
85807
85808
85809// RequestHandling3 ...
85810#[cfg_attr(feature = "derive_debug", derive(Debug))]
85811#[cfg_attr(feature = "derive_default", derive(Default))]
85812#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85813#[cfg_attr(feature = "derive_clone", derive(Clone))]
85814#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85815pub struct RequestHandling3 {
85816	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
85817	pub sts: RequestStatus1Choice,
85818	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsn", skip_serializing_if = "Option::is_none") )]
85819	pub sts_rsn: Option<StatusReasonInformation14>,
85820}
85821
85822impl RequestHandling3 {
85823	pub fn validate(&self) -> Result<(), ValidationError> {
85824		self.sts.validate()?;
85825		if let Some(ref val) = self.sts_rsn { val.validate()? }
85826		Ok(())
85827	}
85828}
85829
85830
85831// RequestStatus1Choice ...
85832#[cfg_attr(feature = "derive_debug", derive(Debug))]
85833#[cfg_attr(feature = "derive_default", derive(Default))]
85834#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85835#[cfg_attr(feature = "derive_clone", derive(Clone))]
85836#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85837pub struct RequestStatus1Choice {
85838	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
85839	pub cd: Option<String>,
85840	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
85841	pub prtry: Option<String>,
85842}
85843
85844impl RequestStatus1Choice {
85845	pub fn validate(&self) -> Result<(), ValidationError> {
85846		if let Some(ref val) = self.cd {
85847			if val.chars().count() < 1 {
85848				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
85849			}
85850			if val.chars().count() > 4 {
85851				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
85852			}
85853		}
85854		if let Some(ref val) = self.prtry {
85855			if val.chars().count() < 1 {
85856				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
85857			}
85858			if val.chars().count() > 35 {
85859				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
85860			}
85861		}
85862		Ok(())
85863	}
85864}
85865
85866
85867// RequestType1 ...
85868#[cfg_attr(feature = "derive_debug", derive(Debug))]
85869#[cfg_attr(feature = "derive_default", derive(Default))]
85870#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85871#[cfg_attr(feature = "derive_clone", derive(Clone))]
85872#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85873pub struct RequestType1 {
85874	#[cfg_attr( feature = "derive_serde", serde(rename = "Nb") )]
85875	pub nb: String,
85876	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
85877	pub tp: Vec<TransactionRequestType1Code>,
85878	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
85879	pub addtl_inf: Option<String>,
85880}
85881
85882impl RequestType1 {
85883	pub fn validate(&self) -> Result<(), ValidationError> {
85884		if self.nb.chars().count() < 1 {
85885			return Err(ValidationError::new(1001, "nb is shorter than the minimum length of 1".to_string()));
85886		}
85887		if self.nb.chars().count() > 35 {
85888			return Err(ValidationError::new(1002, "nb exceeds the maximum length of 35".to_string()));
85889		}
85890		for item in &self.tp { item.validate()? }
85891		if let Some(ref val) = self.addtl_inf {
85892			if val.chars().count() < 1 {
85893				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
85894			}
85895			if val.chars().count() > 500 {
85896				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 500".to_string()));
85897			}
85898		}
85899		Ok(())
85900	}
85901}
85902
85903
85904// RequestType1Code ...
85905#[cfg_attr(feature = "derive_debug", derive(Debug))]
85906#[cfg_attr(feature = "derive_default", derive(Default))]
85907#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85908#[cfg_attr(feature = "derive_clone", derive(Clone))]
85909#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85910pub enum RequestType1Code {
85911	#[cfg_attr(feature = "derive_default", default)]
85912	#[cfg_attr( feature = "derive_serde", serde(rename = "RT01") )]
85913	CodeRT01,
85914	#[cfg_attr( feature = "derive_serde", serde(rename = "RT02") )]
85915	CodeRT02,
85916	#[cfg_attr( feature = "derive_serde", serde(rename = "RT03") )]
85917	CodeRT03,
85918	#[cfg_attr( feature = "derive_serde", serde(rename = "RT04") )]
85919	CodeRT04,
85920	#[cfg_attr( feature = "derive_serde", serde(rename = "RT05") )]
85921	CodeRT05,
85922}
85923
85924impl RequestType1Code {
85925	pub fn validate(&self) -> Result<(), ValidationError> {
85926		Ok(())
85927	}
85928}
85929
85930
85931// RequestType2Choice ...
85932#[cfg_attr(feature = "derive_debug", derive(Debug))]
85933#[cfg_attr(feature = "derive_default", derive(Default))]
85934#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85935#[cfg_attr(feature = "derive_clone", derive(Clone))]
85936#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85937pub struct RequestType2Choice {
85938	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtCtrl", skip_serializing_if = "Option::is_none") )]
85939	pub pmt_ctrl: Option<RequestType1Code>,
85940	#[cfg_attr( feature = "derive_serde", serde(rename = "Enqry", skip_serializing_if = "Option::is_none") )]
85941	pub enqry: Option<RequestType2Code>,
85942	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
85943	pub prtry: Option<GenericIdentification1>,
85944}
85945
85946impl RequestType2Choice {
85947	pub fn validate(&self) -> Result<(), ValidationError> {
85948		if let Some(ref val) = self.pmt_ctrl { val.validate()? }
85949		if let Some(ref val) = self.enqry { val.validate()? }
85950		if let Some(ref val) = self.prtry { val.validate()? }
85951		Ok(())
85952	}
85953}
85954
85955
85956// RequestType2Code ...
85957#[cfg_attr(feature = "derive_debug", derive(Debug))]
85958#[cfg_attr(feature = "derive_default", derive(Default))]
85959#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85960#[cfg_attr(feature = "derive_clone", derive(Clone))]
85961#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85962pub enum RequestType2Code {
85963	#[cfg_attr(feature = "derive_default", default)]
85964	#[cfg_attr( feature = "derive_serde", serde(rename = "RT11") )]
85965	CodeRT11,
85966	#[cfg_attr( feature = "derive_serde", serde(rename = "RT12") )]
85967	CodeRT12,
85968	#[cfg_attr( feature = "derive_serde", serde(rename = "RT13") )]
85969	CodeRT13,
85970	#[cfg_attr( feature = "derive_serde", serde(rename = "RT14") )]
85971	CodeRT14,
85972	#[cfg_attr( feature = "derive_serde", serde(rename = "RT15") )]
85973	CodeRT15,
85974}
85975
85976impl RequestType2Code {
85977	pub fn validate(&self) -> Result<(), ValidationError> {
85978		Ok(())
85979	}
85980}
85981
85982
85983// RequestType3Choice ...
85984#[cfg_attr(feature = "derive_debug", derive(Debug))]
85985#[cfg_attr(feature = "derive_default", derive(Default))]
85986#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
85987#[cfg_attr(feature = "derive_clone", derive(Clone))]
85988#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
85989pub struct RequestType3Choice {
85990	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
85991	pub cd: Option<StandingOrderQueryType1Code>,
85992	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
85993	pub prtry: Option<GenericIdentification1>,
85994}
85995
85996impl RequestType3Choice {
85997	pub fn validate(&self) -> Result<(), ValidationError> {
85998		if let Some(ref val) = self.cd { val.validate()? }
85999		if let Some(ref val) = self.prtry { val.validate()? }
86000		Ok(())
86001	}
86002}
86003
86004
86005// RequestType4Choice ...
86006#[cfg_attr(feature = "derive_debug", derive(Debug))]
86007#[cfg_attr(feature = "derive_default", derive(Default))]
86008#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86009#[cfg_attr(feature = "derive_clone", derive(Clone))]
86010#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86011pub struct RequestType4Choice {
86012	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtCtrl", skip_serializing_if = "Option::is_none") )]
86013	pub pmt_ctrl: Option<String>,
86014	#[cfg_attr( feature = "derive_serde", serde(rename = "Enqry", skip_serializing_if = "Option::is_none") )]
86015	pub enqry: Option<String>,
86016	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
86017	pub prtry: Option<GenericIdentification1>,
86018}
86019
86020impl RequestType4Choice {
86021	pub fn validate(&self) -> Result<(), ValidationError> {
86022		if let Some(ref val) = self.pmt_ctrl {
86023			if val.chars().count() < 1 {
86024				return Err(ValidationError::new(1001, "pmt_ctrl is shorter than the minimum length of 1".to_string()));
86025			}
86026			if val.chars().count() > 4 {
86027				return Err(ValidationError::new(1002, "pmt_ctrl exceeds the maximum length of 4".to_string()));
86028			}
86029		}
86030		if let Some(ref val) = self.enqry {
86031			if val.chars().count() < 1 {
86032				return Err(ValidationError::new(1001, "enqry is shorter than the minimum length of 1".to_string()));
86033			}
86034			if val.chars().count() > 4 {
86035				return Err(ValidationError::new(1002, "enqry exceeds the maximum length of 4".to_string()));
86036			}
86037		}
86038		if let Some(ref val) = self.prtry { val.validate()? }
86039		Ok(())
86040	}
86041}
86042
86043
86044// RequestedModification11 ...
86045#[cfg_attr(feature = "derive_debug", derive(Debug))]
86046#[cfg_attr(feature = "derive_default", derive(Default))]
86047#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86048#[cfg_attr(feature = "derive_clone", derive(Clone))]
86049#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86050pub struct RequestedModification11 {
86051	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
86052	pub instr_id: Option<String>,
86053	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId", skip_serializing_if = "Option::is_none") )]
86054	pub end_to_end_id: Option<String>,
86055	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
86056	pub tx_id: Option<String>,
86057	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTpInf", skip_serializing_if = "Option::is_none") )]
86058	pub pmt_tp_inf: Option<PaymentTypeInformation27>,
86059	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
86060	pub reqd_exctn_dt: Option<DateAndDateTime2Choice>,
86061	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdColltnDt", skip_serializing_if = "Option::is_none") )]
86062	pub reqd_colltn_dt: Option<String>,
86063	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
86064	pub intr_bk_sttlm_dt: Option<String>,
86065	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmTmIndctn", skip_serializing_if = "Option::is_none") )]
86066	pub sttlm_tm_indctn: Option<SettlementDateTimeIndication1>,
86067	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
86068	pub amt: Option<AmountType4Choice>,
86069	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
86070	pub intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
86071	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr", skip_serializing_if = "Option::is_none") )]
86072	pub chrg_br: Option<ChargeBearerType1Code>,
86073	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
86074	pub ultmt_dbtr: Option<PartyIdentification272>,
86075	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
86076	pub dbtr: Option<PartyIdentification272>,
86077	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
86078	pub dbtr_acct: Option<CashAccount40>,
86079	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
86080	pub dbtr_agt_acct: Option<CashAccount40>,
86081	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmInf", skip_serializing_if = "Option::is_none") )]
86082	pub sttlm_inf: Option<SettlementInstruction16>,
86083	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
86084	pub cdtr_agt_acct: Option<CashAccount40>,
86085	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
86086	pub cdtr: Option<PartyIdentification272>,
86087	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
86088	pub cdtr_acct: Option<CashAccount40>,
86089	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
86090	pub ultmt_cdtr: Option<PartyIdentification272>,
86091	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
86092	pub purp: Option<Purpose2Choice>,
86093	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForDbtrAgt", skip_serializing_if = "Option::is_none") )]
86094	pub instr_for_dbtr_agt: Option<String>,
86095	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForNxtAgt", skip_serializing_if = "Option::is_none") )]
86096	pub instr_for_nxt_agt: Option<Vec<InstructionForNextAgent1>>,
86097	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrForCdtrAgt", skip_serializing_if = "Option::is_none") )]
86098	pub instr_for_cdtr_agt: Option<Vec<InstructionForCreditorAgent3>>,
86099	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdRmtInf", skip_serializing_if = "Option::is_none") )]
86100	pub rltd_rmt_inf: Option<Vec<RemittanceLocation8>>,
86101	#[cfg_attr( feature = "derive_serde", serde(rename = "RmtInf", skip_serializing_if = "Option::is_none") )]
86102	pub rmt_inf: Option<RemittanceInformation22>,
86103}
86104
86105impl RequestedModification11 {
86106	pub fn validate(&self) -> Result<(), ValidationError> {
86107		if let Some(ref val) = self.instr_id {
86108			if val.chars().count() < 1 {
86109				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
86110			}
86111			if val.chars().count() > 35 {
86112				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
86113			}
86114		}
86115		if let Some(ref val) = self.end_to_end_id {
86116			if val.chars().count() < 1 {
86117				return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
86118			}
86119			if val.chars().count() > 35 {
86120				return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
86121			}
86122		}
86123		if let Some(ref val) = self.tx_id {
86124			if val.chars().count() < 1 {
86125				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
86126			}
86127			if val.chars().count() > 35 {
86128				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
86129			}
86130		}
86131		if let Some(ref val) = self.pmt_tp_inf { val.validate()? }
86132		if let Some(ref val) = self.reqd_exctn_dt { val.validate()? }
86133		if let Some(ref val) = self.sttlm_tm_indctn { val.validate()? }
86134		if let Some(ref val) = self.amt { val.validate()? }
86135		if let Some(ref val) = self.intr_bk_sttlm_amt { val.validate()? }
86136		if let Some(ref val) = self.chrg_br { val.validate()? }
86137		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
86138		if let Some(ref val) = self.dbtr { val.validate()? }
86139		if let Some(ref val) = self.dbtr_acct { val.validate()? }
86140		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
86141		if let Some(ref val) = self.sttlm_inf { val.validate()? }
86142		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
86143		if let Some(ref val) = self.cdtr { val.validate()? }
86144		if let Some(ref val) = self.cdtr_acct { val.validate()? }
86145		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
86146		if let Some(ref val) = self.purp { val.validate()? }
86147		if let Some(ref val) = self.instr_for_dbtr_agt {
86148			if val.chars().count() < 1 {
86149				return Err(ValidationError::new(1001, "instr_for_dbtr_agt is shorter than the minimum length of 1".to_string()));
86150			}
86151			if val.chars().count() > 140 {
86152				return Err(ValidationError::new(1002, "instr_for_dbtr_agt exceeds the maximum length of 140".to_string()));
86153			}
86154		}
86155		if let Some(ref vec) = self.instr_for_nxt_agt { for item in vec { item.validate()? } }
86156		if let Some(ref vec) = self.instr_for_cdtr_agt { for item in vec { item.validate()? } }
86157		if let Some(ref vec) = self.rltd_rmt_inf { for item in vec { item.validate()? } }
86158		if let Some(ref val) = self.rmt_inf { val.validate()? }
86159		Ok(())
86160	}
86161}
86162
86163
86164// ResendSearchCriteria2 ...
86165#[cfg_attr(feature = "derive_debug", derive(Debug))]
86166#[cfg_attr(feature = "derive_default", derive(Default))]
86167#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86168#[cfg_attr(feature = "derive_clone", derive(Clone))]
86169#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86170pub struct ResendSearchCriteria2 {
86171	#[cfg_attr( feature = "derive_serde", serde(rename = "BizDt", skip_serializing_if = "Option::is_none") )]
86172	pub biz_dt: Option<String>,
86173	#[cfg_attr( feature = "derive_serde", serde(rename = "SeqNb", skip_serializing_if = "Option::is_none") )]
86174	pub seq_nb: Option<String>,
86175	#[cfg_attr( feature = "derive_serde", serde(rename = "SeqRg", skip_serializing_if = "Option::is_none") )]
86176	pub seq_rg: Option<SequenceRange1Choice>,
86177	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgNmId", skip_serializing_if = "Option::is_none") )]
86178	pub orgnl_msg_nm_id: Option<String>,
86179	#[cfg_attr( feature = "derive_serde", serde(rename = "FileRef", skip_serializing_if = "Option::is_none") )]
86180	pub file_ref: Option<String>,
86181	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcpt") )]
86182	pub rcpt: PartyIdentification136,
86183}
86184
86185impl ResendSearchCriteria2 {
86186	pub fn validate(&self) -> Result<(), ValidationError> {
86187		if let Some(ref val) = self.seq_nb {
86188			if val.chars().count() < 1 {
86189				return Err(ValidationError::new(1001, "seq_nb is shorter than the minimum length of 1".to_string()));
86190			}
86191			if val.chars().count() > 35 {
86192				return Err(ValidationError::new(1002, "seq_nb exceeds the maximum length of 35".to_string()));
86193			}
86194		}
86195		if let Some(ref val) = self.seq_rg { val.validate()? }
86196		if let Some(ref val) = self.orgnl_msg_nm_id {
86197			if val.chars().count() < 1 {
86198				return Err(ValidationError::new(1001, "orgnl_msg_nm_id is shorter than the minimum length of 1".to_string()));
86199			}
86200			if val.chars().count() > 35 {
86201				return Err(ValidationError::new(1002, "orgnl_msg_nm_id exceeds the maximum length of 35".to_string()));
86202			}
86203		}
86204		if let Some(ref val) = self.file_ref {
86205			if val.chars().count() < 1 {
86206				return Err(ValidationError::new(1001, "file_ref is shorter than the minimum length of 1".to_string()));
86207			}
86208			if val.chars().count() > 35 {
86209				return Err(ValidationError::new(1002, "file_ref exceeds the maximum length of 35".to_string()));
86210			}
86211		}
86212		self.rcpt.validate()?;
86213		Ok(())
86214	}
86215}
86216
86217
86218// Reservation3 ...
86219#[cfg_attr(feature = "derive_debug", derive(Debug))]
86220#[cfg_attr(feature = "derive_default", derive(Default))]
86221#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86222#[cfg_attr(feature = "derive_clone", derive(Clone))]
86223#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86224pub struct Reservation3 {
86225	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
86226	pub amt: Amount2Choice,
86227	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
86228	pub sts: Option<ReservationStatus1Choice>,
86229	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDtTm", skip_serializing_if = "Option::is_none") )]
86230	pub start_dt_tm: Option<DateAndDateTime2Choice>,
86231}
86232
86233impl Reservation3 {
86234	pub fn validate(&self) -> Result<(), ValidationError> {
86235		self.amt.validate()?;
86236		if let Some(ref val) = self.sts { val.validate()? }
86237		if let Some(ref val) = self.start_dt_tm { val.validate()? }
86238		Ok(())
86239	}
86240}
86241
86242
86243// Reservation4 ...
86244#[cfg_attr(feature = "derive_debug", derive(Debug))]
86245#[cfg_attr(feature = "derive_default", derive(Default))]
86246#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86247#[cfg_attr(feature = "derive_clone", derive(Clone))]
86248#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86249pub struct Reservation4 {
86250	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDtTm", skip_serializing_if = "Option::is_none") )]
86251	pub start_dt_tm: Option<DateAndDateTime2Choice>,
86252	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
86253	pub amt: Amount2Choice,
86254}
86255
86256impl Reservation4 {
86257	pub fn validate(&self) -> Result<(), ValidationError> {
86258		if let Some(ref val) = self.start_dt_tm { val.validate()? }
86259		self.amt.validate()?;
86260		Ok(())
86261	}
86262}
86263
86264
86265// ReservationCriteria6Choice ...
86266#[cfg_attr(feature = "derive_debug", derive(Debug))]
86267#[cfg_attr(feature = "derive_default", derive(Default))]
86268#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86269#[cfg_attr(feature = "derive_clone", derive(Clone))]
86270#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86271pub struct ReservationCriteria6Choice {
86272	#[cfg_attr( feature = "derive_serde", serde(rename = "QryNm", skip_serializing_if = "Option::is_none") )]
86273	pub qry_nm: Option<String>,
86274	#[cfg_attr( feature = "derive_serde", serde(rename = "NewCrit", skip_serializing_if = "Option::is_none") )]
86275	pub new_crit: Option<ReservationCriteria7>,
86276}
86277
86278impl ReservationCriteria6Choice {
86279	pub fn validate(&self) -> Result<(), ValidationError> {
86280		if let Some(ref val) = self.qry_nm {
86281			if val.chars().count() < 1 {
86282				return Err(ValidationError::new(1001, "qry_nm is shorter than the minimum length of 1".to_string()));
86283			}
86284			if val.chars().count() > 35 {
86285				return Err(ValidationError::new(1002, "qry_nm exceeds the maximum length of 35".to_string()));
86286			}
86287		}
86288		if let Some(ref val) = self.new_crit { val.validate()? }
86289		Ok(())
86290	}
86291}
86292
86293
86294// ReservationCriteria7 ...
86295#[cfg_attr(feature = "derive_debug", derive(Debug))]
86296#[cfg_attr(feature = "derive_default", derive(Default))]
86297#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86298#[cfg_attr(feature = "derive_clone", derive(Clone))]
86299#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86300pub struct ReservationCriteria7 {
86301	#[cfg_attr( feature = "derive_serde", serde(rename = "NewQryNm", skip_serializing_if = "Option::is_none") )]
86302	pub new_qry_nm: Option<String>,
86303	#[cfg_attr( feature = "derive_serde", serde(rename = "SchCrit", skip_serializing_if = "Option::is_none") )]
86304	pub sch_crit: Option<Vec<ReservationSearchCriteria6>>,
86305	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrCrit", skip_serializing_if = "Option::is_none") )]
86306	pub rtr_crit: Option<ReservationReturnCriteria1>,
86307}
86308
86309impl ReservationCriteria7 {
86310	pub fn validate(&self) -> Result<(), ValidationError> {
86311		if let Some(ref val) = self.new_qry_nm {
86312			if val.chars().count() < 1 {
86313				return Err(ValidationError::new(1001, "new_qry_nm is shorter than the minimum length of 1".to_string()));
86314			}
86315			if val.chars().count() > 35 {
86316				return Err(ValidationError::new(1002, "new_qry_nm exceeds the maximum length of 35".to_string()));
86317			}
86318		}
86319		if let Some(ref vec) = self.sch_crit { for item in vec { item.validate()? } }
86320		if let Some(ref val) = self.rtr_crit { val.validate()? }
86321		Ok(())
86322	}
86323}
86324
86325
86326// ReservationIdentification4 ...
86327#[cfg_attr(feature = "derive_debug", derive(Debug))]
86328#[cfg_attr(feature = "derive_default", derive(Default))]
86329#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86330#[cfg_attr(feature = "derive_clone", derive(Clone))]
86331#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86332pub struct ReservationIdentification4 {
86333	#[cfg_attr( feature = "derive_serde", serde(rename = "RsvatnId", skip_serializing_if = "Option::is_none") )]
86334	pub rsvatn_id: Option<String>,
86335	#[cfg_attr( feature = "derive_serde", serde(rename = "SysId", skip_serializing_if = "Option::is_none") )]
86336	pub sys_id: Option<SystemIdentification2Choice>,
86337	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
86338	pub tp: ReservationType2Choice,
86339	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
86340	pub acct_ownr: Option<BranchAndFinancialInstitutionIdentification8>,
86341	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
86342	pub acct_id: Option<AccountIdentification4Choice>,
86343}
86344
86345impl ReservationIdentification4 {
86346	pub fn validate(&self) -> Result<(), ValidationError> {
86347		if let Some(ref val) = self.rsvatn_id {
86348			if val.chars().count() < 1 {
86349				return Err(ValidationError::new(1001, "rsvatn_id is shorter than the minimum length of 1".to_string()));
86350			}
86351			if val.chars().count() > 35 {
86352				return Err(ValidationError::new(1002, "rsvatn_id exceeds the maximum length of 35".to_string()));
86353			}
86354		}
86355		if let Some(ref val) = self.sys_id { val.validate()? }
86356		self.tp.validate()?;
86357		if let Some(ref val) = self.acct_ownr { val.validate()? }
86358		if let Some(ref val) = self.acct_id { val.validate()? }
86359		Ok(())
86360	}
86361}
86362
86363
86364// ReservationOrError11Choice ...
86365#[cfg_attr(feature = "derive_debug", derive(Debug))]
86366#[cfg_attr(feature = "derive_default", derive(Default))]
86367#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86368#[cfg_attr(feature = "derive_clone", derive(Clone))]
86369#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86370pub struct ReservationOrError11Choice {
86371	#[cfg_attr( feature = "derive_serde", serde(rename = "BizRpt", skip_serializing_if = "Option::is_none") )]
86372	pub biz_rpt: Option<CurrentAndDefaultReservation6>,
86373	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
86374	pub oprl_err: Option<Vec<ErrorHandling5>>,
86375}
86376
86377impl ReservationOrError11Choice {
86378	pub fn validate(&self) -> Result<(), ValidationError> {
86379		if let Some(ref val) = self.biz_rpt { val.validate()? }
86380		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
86381		Ok(())
86382	}
86383}
86384
86385
86386// ReservationOrError9Choice ...
86387#[cfg_attr(feature = "derive_debug", derive(Debug))]
86388#[cfg_attr(feature = "derive_default", derive(Default))]
86389#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86390#[cfg_attr(feature = "derive_clone", derive(Clone))]
86391#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86392pub struct ReservationOrError9Choice {
86393	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsvatn", skip_serializing_if = "Option::is_none") )]
86394	pub rsvatn: Option<Reservation3>,
86395	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
86396	pub biz_err: Option<Vec<ErrorHandling5>>,
86397}
86398
86399impl ReservationOrError9Choice {
86400	pub fn validate(&self) -> Result<(), ValidationError> {
86401		if let Some(ref val) = self.rsvatn { val.validate()? }
86402		if let Some(ref vec) = self.biz_err { for item in vec { item.validate()? } }
86403		Ok(())
86404	}
86405}
86406
86407
86408// ReservationQuery6 ...
86409#[cfg_attr(feature = "derive_debug", derive(Debug))]
86410#[cfg_attr(feature = "derive_default", derive(Default))]
86411#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86412#[cfg_attr(feature = "derive_clone", derive(Clone))]
86413#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86414pub struct ReservationQuery6 {
86415	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp", skip_serializing_if = "Option::is_none") )]
86416	pub qry_tp: Option<QueryType2Code>,
86417	#[cfg_attr( feature = "derive_serde", serde(rename = "RsvatnCrit", skip_serializing_if = "Option::is_none") )]
86418	pub rsvatn_crit: Option<ReservationCriteria6Choice>,
86419}
86420
86421impl ReservationQuery6 {
86422	pub fn validate(&self) -> Result<(), ValidationError> {
86423		if let Some(ref val) = self.qry_tp { val.validate()? }
86424		if let Some(ref val) = self.rsvatn_crit { val.validate()? }
86425		Ok(())
86426	}
86427}
86428
86429
86430// ReservationReport8 ...
86431#[cfg_attr(feature = "derive_debug", derive(Debug))]
86432#[cfg_attr(feature = "derive_default", derive(Default))]
86433#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86434#[cfg_attr(feature = "derive_clone", derive(Clone))]
86435#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86436pub struct ReservationReport8 {
86437	#[cfg_attr( feature = "derive_serde", serde(rename = "RsvatnId") )]
86438	pub rsvatn_id: ReservationIdentification4,
86439	#[cfg_attr( feature = "derive_serde", serde(rename = "RsvatnOrErr") )]
86440	pub rsvatn_or_err: ReservationOrError9Choice,
86441}
86442
86443impl ReservationReport8 {
86444	pub fn validate(&self) -> Result<(), ValidationError> {
86445		self.rsvatn_id.validate()?;
86446		self.rsvatn_or_err.validate()?;
86447		Ok(())
86448	}
86449}
86450
86451
86452// ReservationReturnCriteria1 ...
86453#[cfg_attr(feature = "derive_debug", derive(Debug))]
86454#[cfg_attr(feature = "derive_default", derive(Default))]
86455#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86456#[cfg_attr(feature = "derive_clone", derive(Clone))]
86457#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86458pub struct ReservationReturnCriteria1 {
86459	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDtTmInd", skip_serializing_if = "Option::is_none") )]
86460	pub start_dt_tm_ind: Option<bool>,
86461	#[cfg_attr( feature = "derive_serde", serde(rename = "StsInd", skip_serializing_if = "Option::is_none") )]
86462	pub sts_ind: Option<bool>,
86463}
86464
86465impl ReservationReturnCriteria1 {
86466	pub fn validate(&self) -> Result<(), ValidationError> {
86467		Ok(())
86468	}
86469}
86470
86471
86472// ReservationSearchCriteria6 ...
86473#[cfg_attr(feature = "derive_debug", derive(Debug))]
86474#[cfg_attr(feature = "derive_default", derive(Default))]
86475#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86476#[cfg_attr(feature = "derive_clone", derive(Clone))]
86477#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86478pub struct ReservationSearchCriteria6 {
86479	#[cfg_attr( feature = "derive_serde", serde(rename = "DtTm", skip_serializing_if = "Option::is_none") )]
86480	pub dt_tm: Option<DateTimeSearch2Choice>,
86481	#[cfg_attr( feature = "derive_serde", serde(rename = "SysId", skip_serializing_if = "Option::is_none") )]
86482	pub sys_id: Option<SystemIdentification2Choice>,
86483	#[cfg_attr( feature = "derive_serde", serde(rename = "DfltRsvatnTp", skip_serializing_if = "Option::is_none") )]
86484	pub dflt_rsvatn_tp: Option<Vec<ReservationType2Choice>>,
86485	#[cfg_attr( feature = "derive_serde", serde(rename = "CurRsvatnTp", skip_serializing_if = "Option::is_none") )]
86486	pub cur_rsvatn_tp: Option<Vec<ReservationType2Choice>>,
86487	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
86488	pub acct_ownr: Option<BranchAndFinancialInstitutionIdentification8>,
86489	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
86490	pub acct_id: Option<AccountIdentification4Choice>,
86491}
86492
86493impl ReservationSearchCriteria6 {
86494	pub fn validate(&self) -> Result<(), ValidationError> {
86495		if let Some(ref val) = self.dt_tm { val.validate()? }
86496		if let Some(ref val) = self.sys_id { val.validate()? }
86497		if let Some(ref vec) = self.dflt_rsvatn_tp { for item in vec { item.validate()? } }
86498		if let Some(ref vec) = self.cur_rsvatn_tp { for item in vec { item.validate()? } }
86499		if let Some(ref val) = self.acct_ownr { val.validate()? }
86500		if let Some(ref val) = self.acct_id { val.validate()? }
86501		Ok(())
86502	}
86503}
86504
86505
86506// ReservationStatus1Choice ...
86507#[cfg_attr(feature = "derive_debug", derive(Debug))]
86508#[cfg_attr(feature = "derive_default", derive(Default))]
86509#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86510#[cfg_attr(feature = "derive_clone", derive(Clone))]
86511#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86512pub struct ReservationStatus1Choice {
86513	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
86514	pub cd: Option<ReservationStatus1Code>,
86515	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
86516	pub prtry: Option<String>,
86517}
86518
86519impl ReservationStatus1Choice {
86520	pub fn validate(&self) -> Result<(), ValidationError> {
86521		if let Some(ref val) = self.cd { val.validate()? }
86522		if let Some(ref val) = self.prtry {
86523			if val.chars().count() < 1 {
86524				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
86525			}
86526			if val.chars().count() > 35 {
86527				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
86528			}
86529		}
86530		Ok(())
86531	}
86532}
86533
86534
86535// ReservationStatus1Code ...
86536#[cfg_attr(feature = "derive_debug", derive(Debug))]
86537#[cfg_attr(feature = "derive_default", derive(Default))]
86538#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86539#[cfg_attr(feature = "derive_clone", derive(Clone))]
86540#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86541pub enum ReservationStatus1Code {
86542	#[cfg_attr(feature = "derive_default", default)]
86543	#[cfg_attr( feature = "derive_serde", serde(rename = "ENAB") )]
86544	CodeENAB,
86545	#[cfg_attr( feature = "derive_serde", serde(rename = "DISA") )]
86546	CodeDISA,
86547	#[cfg_attr( feature = "derive_serde", serde(rename = "DELD") )]
86548	CodeDELD,
86549	#[cfg_attr( feature = "derive_serde", serde(rename = "REQD") )]
86550	CodeREQD,
86551	#[cfg_attr( feature = "derive_serde", serde(rename = "BLKD") )]
86552	CodeBLKD,
86553}
86554
86555impl ReservationStatus1Code {
86556	pub fn validate(&self) -> Result<(), ValidationError> {
86557		Ok(())
86558	}
86559}
86560
86561
86562// ReservationType2Choice ...
86563#[cfg_attr(feature = "derive_debug", derive(Debug))]
86564#[cfg_attr(feature = "derive_default", derive(Default))]
86565#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86566#[cfg_attr(feature = "derive_clone", derive(Clone))]
86567#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86568pub struct ReservationType2Choice {
86569	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
86570	pub cd: Option<String>,
86571	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
86572	pub prtry: Option<String>,
86573}
86574
86575impl ReservationType2Choice {
86576	pub fn validate(&self) -> Result<(), ValidationError> {
86577		if let Some(ref val) = self.cd {
86578			if val.chars().count() < 1 {
86579				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
86580			}
86581			if val.chars().count() > 4 {
86582				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
86583			}
86584		}
86585		if let Some(ref val) = self.prtry {
86586			if val.chars().count() < 1 {
86587				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
86588			}
86589			if val.chars().count() > 35 {
86590				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
86591			}
86592		}
86593		Ok(())
86594	}
86595}
86596
86597
86598// ResetDateAndValue1 ...
86599#[cfg_attr(feature = "derive_debug", derive(Debug))]
86600#[cfg_attr(feature = "derive_default", derive(Default))]
86601#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86602#[cfg_attr(feature = "derive_clone", derive(Clone))]
86603#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86604pub struct ResetDateAndValue1 {
86605	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt") )]
86606	pub dt: String,
86607	#[cfg_attr( feature = "derive_serde", serde(rename = "Val", skip_serializing_if = "Option::is_none") )]
86608	pub val: Option<f64>,
86609}
86610
86611impl ResetDateAndValue1 {
86612	pub fn validate(&self) -> Result<(), ValidationError> {
86613		Ok(())
86614	}
86615}
86616
86617
86618// ResidenceLocation1Choice ...
86619#[cfg_attr(feature = "derive_debug", derive(Debug))]
86620#[cfg_attr(feature = "derive_default", derive(Default))]
86621#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86622#[cfg_attr(feature = "derive_clone", derive(Clone))]
86623#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86624pub struct ResidenceLocation1Choice {
86625	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
86626	pub ctry: Option<String>,
86627	#[cfg_attr( feature = "derive_serde", serde(rename = "Area", skip_serializing_if = "Option::is_none") )]
86628	pub area: Option<String>,
86629}
86630
86631impl ResidenceLocation1Choice {
86632	pub fn validate(&self) -> Result<(), ValidationError> {
86633		if let Some(ref val) = self.ctry {
86634			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
86635			if !pattern.is_match(val) {
86636				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
86637			}
86638		}
86639		if let Some(ref val) = self.area {
86640			if val.chars().count() < 1 {
86641				return Err(ValidationError::new(1001, "area is shorter than the minimum length of 1".to_string()));
86642			}
86643			if val.chars().count() > 35 {
86644				return Err(ValidationError::new(1002, "area exceeds the maximum length of 35".to_string()));
86645			}
86646		}
86647		Ok(())
86648	}
86649}
86650
86651
86652// ResidenceType1Code ...
86653#[cfg_attr(feature = "derive_debug", derive(Debug))]
86654#[cfg_attr(feature = "derive_default", derive(Default))]
86655#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86656#[cfg_attr(feature = "derive_clone", derive(Clone))]
86657#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86658pub enum ResidenceType1Code {
86659	#[cfg_attr(feature = "derive_default", default)]
86660	#[cfg_attr( feature = "derive_serde", serde(rename = "DMST") )]
86661	CodeDMST,
86662	#[cfg_attr( feature = "derive_serde", serde(rename = "FRGN") )]
86663	CodeFRGN,
86664	#[cfg_attr( feature = "derive_serde", serde(rename = "MXED") )]
86665	CodeMXED,
86666}
86667
86668impl ResidenceType1Code {
86669	pub fn validate(&self) -> Result<(), ValidationError> {
86670		Ok(())
86671	}
86672}
86673
86674
86675// ResidentialStatus1Code ...
86676#[cfg_attr(feature = "derive_debug", derive(Debug))]
86677#[cfg_attr(feature = "derive_default", derive(Default))]
86678#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86679#[cfg_attr(feature = "derive_clone", derive(Clone))]
86680#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86681pub enum ResidentialStatus1Code {
86682	#[cfg_attr(feature = "derive_default", default)]
86683	#[cfg_attr( feature = "derive_serde", serde(rename = "RESI") )]
86684	CodeRESI,
86685	#[cfg_attr( feature = "derive_serde", serde(rename = "PRES") )]
86686	CodePRES,
86687	#[cfg_attr( feature = "derive_serde", serde(rename = "NRES") )]
86688	CodeNRES,
86689}
86690
86691impl ResidentialStatus1Code {
86692	pub fn validate(&self) -> Result<(), ValidationError> {
86693		Ok(())
86694	}
86695}
86696
86697
86698// ResolutionData5 ...
86699#[cfg_attr(feature = "derive_debug", derive(Debug))]
86700#[cfg_attr(feature = "derive_default", derive(Default))]
86701#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86702#[cfg_attr(feature = "derive_clone", derive(Clone))]
86703#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86704pub struct ResolutionData5 {
86705	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId", skip_serializing_if = "Option::is_none") )]
86706	pub end_to_end_id: Option<String>,
86707	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
86708	pub tx_id: Option<String>,
86709	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
86710	pub uetr: Option<String>,
86711	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
86712	pub intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
86713	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
86714	pub intr_bk_sttlm_dt: Option<String>,
86715	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrChanl", skip_serializing_if = "Option::is_none") )]
86716	pub clr_chanl: Option<ClearingChannel2Code>,
86717	#[cfg_attr( feature = "derive_serde", serde(rename = "Compstn", skip_serializing_if = "Option::is_none") )]
86718	pub compstn: Option<Compensation5>,
86719	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsInf", skip_serializing_if = "Option::is_none") )]
86720	pub chrgs_inf: Option<Vec<Charges14>>,
86721}
86722
86723impl ResolutionData5 {
86724	pub fn validate(&self) -> Result<(), ValidationError> {
86725		if let Some(ref val) = self.end_to_end_id {
86726			if val.chars().count() < 1 {
86727				return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
86728			}
86729			if val.chars().count() > 35 {
86730				return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
86731			}
86732		}
86733		if let Some(ref val) = self.tx_id {
86734			if val.chars().count() < 1 {
86735				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
86736			}
86737			if val.chars().count() > 35 {
86738				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
86739			}
86740		}
86741		if let Some(ref val) = self.uetr {
86742			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
86743			if !pattern.is_match(val) {
86744				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
86745			}
86746		}
86747		if let Some(ref val) = self.intr_bk_sttlm_amt { val.validate()? }
86748		if let Some(ref val) = self.clr_chanl { val.validate()? }
86749		if let Some(ref val) = self.compstn { val.validate()? }
86750		if let Some(ref vec) = self.chrgs_inf { for item in vec { item.validate()? } }
86751		Ok(())
86752	}
86753}
86754
86755
86756// ResponseDetails1 ...
86757#[cfg_attr(feature = "derive_debug", derive(Debug))]
86758#[cfg_attr(feature = "derive_default", derive(Default))]
86759#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86760#[cfg_attr(feature = "derive_clone", derive(Clone))]
86761#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86762pub struct ResponseDetails1 {
86763	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnCd") )]
86764	pub rspn_cd: String,
86765	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlDtls", skip_serializing_if = "Option::is_none") )]
86766	pub addtl_dtls: Option<String>,
86767}
86768
86769impl ResponseDetails1 {
86770	pub fn validate(&self) -> Result<(), ValidationError> {
86771		if self.rspn_cd.chars().count() < 1 {
86772			return Err(ValidationError::new(1001, "rspn_cd is shorter than the minimum length of 1".to_string()));
86773		}
86774		if self.rspn_cd.chars().count() > 35 {
86775			return Err(ValidationError::new(1002, "rspn_cd exceeds the maximum length of 35".to_string()));
86776		}
86777		if let Some(ref val) = self.addtl_dtls {
86778			if val.chars().count() < 1 {
86779				return Err(ValidationError::new(1001, "addtl_dtls is shorter than the minimum length of 1".to_string()));
86780			}
86781			if val.chars().count() > 350 {
86782				return Err(ValidationError::new(1002, "addtl_dtls exceeds the maximum length of 350".to_string()));
86783			}
86784		}
86785		Ok(())
86786	}
86787}
86788
86789
86790// Restriction1 ...
86791#[cfg_attr(feature = "derive_debug", derive(Debug))]
86792#[cfg_attr(feature = "derive_default", derive(Default))]
86793#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86794#[cfg_attr(feature = "derive_clone", derive(Clone))]
86795#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86796pub struct Restriction1 {
86797	#[cfg_attr( feature = "derive_serde", serde(rename = "RstrctnTp") )]
86798	pub rstrctn_tp: CodeOrProprietary1Choice,
86799	#[cfg_attr( feature = "derive_serde", serde(rename = "VldFr") )]
86800	pub vld_fr: String,
86801	#[cfg_attr( feature = "derive_serde", serde(rename = "VldUntil", skip_serializing_if = "Option::is_none") )]
86802	pub vld_until: Option<String>,
86803}
86804
86805impl Restriction1 {
86806	pub fn validate(&self) -> Result<(), ValidationError> {
86807		self.rstrctn_tp.validate()?;
86808		Ok(())
86809	}
86810}
86811
86812
86813// RestrictionModification1 ...
86814#[cfg_attr(feature = "derive_debug", derive(Debug))]
86815#[cfg_attr(feature = "derive_default", derive(Default))]
86816#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86817#[cfg_attr(feature = "derive_clone", derive(Clone))]
86818#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86819pub struct RestrictionModification1 {
86820	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
86821	pub mod_cd: Option<Modification1Code>,
86822	#[cfg_attr( feature = "derive_serde", serde(rename = "Rstrctn") )]
86823	pub rstrctn: Restriction1,
86824}
86825
86826impl RestrictionModification1 {
86827	pub fn validate(&self) -> Result<(), ValidationError> {
86828		if let Some(ref val) = self.mod_cd { val.validate()? }
86829		self.rstrctn.validate()?;
86830		Ok(())
86831	}
86832}
86833
86834
86835// RestrictionStatus1Choice ...
86836#[cfg_attr(feature = "derive_debug", derive(Debug))]
86837#[cfg_attr(feature = "derive_default", derive(Default))]
86838#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86839#[cfg_attr(feature = "derive_clone", derive(Clone))]
86840#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86841pub struct RestrictionStatus1Choice {
86842	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
86843	pub cd: Option<RestrictionStatus1Code>,
86844	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
86845	pub prtry: Option<GenericIdentification47>,
86846}
86847
86848impl RestrictionStatus1Choice {
86849	pub fn validate(&self) -> Result<(), ValidationError> {
86850		if let Some(ref val) = self.cd { val.validate()? }
86851		if let Some(ref val) = self.prtry { val.validate()? }
86852		Ok(())
86853	}
86854}
86855
86856
86857// RestrictionStatus1Code ...
86858#[cfg_attr(feature = "derive_debug", derive(Debug))]
86859#[cfg_attr(feature = "derive_default", derive(Default))]
86860#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86861#[cfg_attr(feature = "derive_clone", derive(Clone))]
86862#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86863pub enum RestrictionStatus1Code {
86864	#[cfg_attr(feature = "derive_default", default)]
86865	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTV") )]
86866	CodeACTV,
86867	#[cfg_attr( feature = "derive_serde", serde(rename = "INAC") )]
86868	CodeINAC,
86869}
86870
86871impl RestrictionStatus1Code {
86872	pub fn validate(&self) -> Result<(), ValidationError> {
86873		Ok(())
86874	}
86875}
86876
86877
86878// RestrictionType1Code ...
86879#[cfg_attr(feature = "derive_debug", derive(Debug))]
86880#[cfg_attr(feature = "derive_default", derive(Default))]
86881#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86882#[cfg_attr(feature = "derive_clone", derive(Clone))]
86883#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86884pub enum RestrictionType1Code {
86885	#[cfg_attr(feature = "derive_default", default)]
86886	#[cfg_attr( feature = "derive_serde", serde(rename = "SELR") )]
86887	CodeSELR,
86888	#[cfg_attr( feature = "derive_serde", serde(rename = "BUYR") )]
86889	CodeBUYR,
86890	#[cfg_attr( feature = "derive_serde", serde(rename = "PLAR") )]
86891	CodePLAR,
86892	#[cfg_attr( feature = "derive_serde", serde(rename = "HOLR") )]
86893	CodeHOLR,
86894	#[cfg_attr( feature = "derive_serde", serde(rename = "VOTR") )]
86895	CodeVOTR,
86896}
86897
86898impl RestrictionType1Code {
86899	pub fn validate(&self) -> Result<(), ValidationError> {
86900		Ok(())
86901	}
86902}
86903
86904
86905// ReturnIndicator2 ...
86906#[cfg_attr(feature = "derive_debug", derive(Debug))]
86907#[cfg_attr(feature = "derive_default", derive(Default))]
86908#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86909#[cfg_attr(feature = "derive_clone", derive(Clone))]
86910#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86911pub struct ReturnIndicator2 {
86912	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnPrd", skip_serializing_if = "Option::is_none") )]
86913	pub rspn_prd: Option<DateOrDateTimePeriod1Choice>,
86914	#[cfg_attr( feature = "derive_serde", serde(rename = "AuthrtyReqTp") )]
86915	pub authrty_req_tp: AuthorityRequestType1,
86916	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstgtnRslt") )]
86917	pub invstgtn_rslt: InvestigationResult1Choice,
86918	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
86919	pub addtl_inf: Option<String>,
86920}
86921
86922impl ReturnIndicator2 {
86923	pub fn validate(&self) -> Result<(), ValidationError> {
86924		if let Some(ref val) = self.rspn_prd { val.validate()? }
86925		self.authrty_req_tp.validate()?;
86926		self.invstgtn_rslt.validate()?;
86927		if let Some(ref val) = self.addtl_inf {
86928			if val.chars().count() < 1 {
86929				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
86930			}
86931			if val.chars().count() > 500 {
86932				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 500".to_string()));
86933			}
86934		}
86935		Ok(())
86936	}
86937}
86938
86939
86940// ReturnReason5Choice ...
86941#[cfg_attr(feature = "derive_debug", derive(Debug))]
86942#[cfg_attr(feature = "derive_default", derive(Default))]
86943#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86944#[cfg_attr(feature = "derive_clone", derive(Clone))]
86945#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86946pub struct ReturnReason5Choice {
86947	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
86948	pub cd: Option<String>,
86949	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
86950	pub prtry: Option<String>,
86951}
86952
86953impl ReturnReason5Choice {
86954	pub fn validate(&self) -> Result<(), ValidationError> {
86955		if let Some(ref val) = self.cd {
86956			if val.chars().count() < 1 {
86957				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
86958			}
86959			if val.chars().count() > 4 {
86960				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
86961			}
86962		}
86963		if let Some(ref val) = self.prtry {
86964			if val.chars().count() < 1 {
86965				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
86966			}
86967			if val.chars().count() > 35 {
86968				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
86969			}
86970		}
86971		Ok(())
86972	}
86973}
86974
86975
86976// ReuseDataReport6Choice ...
86977#[cfg_attr(feature = "derive_debug", derive(Debug))]
86978#[cfg_attr(feature = "derive_default", derive(Default))]
86979#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
86980#[cfg_attr(feature = "derive_clone", derive(Clone))]
86981#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
86982pub struct ReuseDataReport6Choice {
86983	#[cfg_attr( feature = "derive_serde", serde(rename = "New", skip_serializing_if = "Option::is_none") )]
86984	pub new: Option<ReuseDataReportNew6>,
86985	#[cfg_attr( feature = "derive_serde", serde(rename = "Err", skip_serializing_if = "Option::is_none") )]
86986	pub err: Option<ReuseDataReportError5>,
86987	#[cfg_attr( feature = "derive_serde", serde(rename = "Crrctn", skip_serializing_if = "Option::is_none") )]
86988	pub crrctn: Option<ReuseDataReportCorrection14>,
86989	#[cfg_attr( feature = "derive_serde", serde(rename = "CollReuseUpd", skip_serializing_if = "Option::is_none") )]
86990	pub coll_reuse_upd: Option<ReuseDataReportCorrection14>,
86991}
86992
86993impl ReuseDataReport6Choice {
86994	pub fn validate(&self) -> Result<(), ValidationError> {
86995		if let Some(ref val) = self.new { val.validate()? }
86996		if let Some(ref val) = self.err { val.validate()? }
86997		if let Some(ref val) = self.crrctn { val.validate()? }
86998		if let Some(ref val) = self.coll_reuse_upd { val.validate()? }
86999		Ok(())
87000	}
87001}
87002
87003
87004// ReuseDataReportCorrection14 ...
87005#[cfg_attr(feature = "derive_debug", derive(Debug))]
87006#[cfg_attr(feature = "derive_default", derive(Default))]
87007#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87008#[cfg_attr(feature = "derive_clone", derive(Clone))]
87009#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87010pub struct ReuseDataReportCorrection14 {
87011	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
87012	pub tech_rcrd_id: Option<String>,
87013	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDtTm") )]
87014	pub rptg_dt_tm: String,
87015	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPty") )]
87016	pub ctr_pty: CounterpartyData87,
87017	#[cfg_attr( feature = "derive_serde", serde(rename = "CollCmpnt", skip_serializing_if = "Option::is_none") )]
87018	pub coll_cmpnt: Option<Vec<CollateralType19>>,
87019	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDay") )]
87020	pub evt_day: String,
87021	#[cfg_attr( feature = "derive_serde", serde(rename = "FndgSrc", skip_serializing_if = "Option::is_none") )]
87022	pub fndg_src: Option<Vec<FundingSource3>>,
87023	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
87024	pub splmtry_data: Option<Vec<SupplementaryData1>>,
87025}
87026
87027impl ReuseDataReportCorrection14 {
87028	pub fn validate(&self) -> Result<(), ValidationError> {
87029		if let Some(ref val) = self.tech_rcrd_id {
87030			if val.chars().count() < 1 {
87031				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
87032			}
87033			if val.chars().count() > 140 {
87034				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
87035			}
87036		}
87037		self.ctr_pty.validate()?;
87038		if let Some(ref vec) = self.coll_cmpnt { for item in vec { item.validate()? } }
87039		if let Some(ref vec) = self.fndg_src { for item in vec { item.validate()? } }
87040		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
87041		Ok(())
87042	}
87043}
87044
87045
87046// ReuseDataReportCorrection15 ...
87047#[cfg_attr(feature = "derive_debug", derive(Debug))]
87048#[cfg_attr(feature = "derive_default", derive(Default))]
87049#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87050#[cfg_attr(feature = "derive_clone", derive(Clone))]
87051#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87052pub struct ReuseDataReportCorrection15 {
87053	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
87054	pub tech_rcrd_id: Option<String>,
87055	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPty") )]
87056	pub ctr_pty: CounterpartyData87,
87057	#[cfg_attr( feature = "derive_serde", serde(rename = "CollCmpnt", skip_serializing_if = "Option::is_none") )]
87058	pub coll_cmpnt: Option<Vec<CollateralType19>>,
87059	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDay") )]
87060	pub evt_day: String,
87061	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDtTm") )]
87062	pub rptg_dt_tm: String,
87063	#[cfg_attr( feature = "derive_serde", serde(rename = "FndgSrc", skip_serializing_if = "Option::is_none") )]
87064	pub fndg_src: Option<Vec<FundingSource3>>,
87065	#[cfg_attr( feature = "derive_serde", serde(rename = "RcncltnFlg", skip_serializing_if = "Option::is_none") )]
87066	pub rcncltn_flg: Option<ReconciliationFlag2>,
87067	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctMod") )]
87068	pub ctrct_mod: ContractModification3,
87069	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
87070	pub splmtry_data: Option<Vec<SupplementaryData1>>,
87071}
87072
87073impl ReuseDataReportCorrection15 {
87074	pub fn validate(&self) -> Result<(), ValidationError> {
87075		if let Some(ref val) = self.tech_rcrd_id {
87076			if val.chars().count() < 1 {
87077				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
87078			}
87079			if val.chars().count() > 140 {
87080				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
87081			}
87082		}
87083		self.ctr_pty.validate()?;
87084		if let Some(ref vec) = self.coll_cmpnt { for item in vec { item.validate()? } }
87085		if let Some(ref vec) = self.fndg_src { for item in vec { item.validate()? } }
87086		if let Some(ref val) = self.rcncltn_flg { val.validate()? }
87087		self.ctrct_mod.validate()?;
87088		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
87089		Ok(())
87090	}
87091}
87092
87093
87094// ReuseDataReportError5 ...
87095#[cfg_attr(feature = "derive_debug", derive(Debug))]
87096#[cfg_attr(feature = "derive_default", derive(Default))]
87097#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87098#[cfg_attr(feature = "derive_clone", derive(Clone))]
87099#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87100pub struct ReuseDataReportError5 {
87101	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
87102	pub tech_rcrd_id: Option<String>,
87103	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDtTm") )]
87104	pub rptg_dt_tm: String,
87105	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPty") )]
87106	pub ctr_pty: CounterpartyData87,
87107	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
87108	pub splmtry_data: Option<Vec<SupplementaryData1>>,
87109}
87110
87111impl ReuseDataReportError5 {
87112	pub fn validate(&self) -> Result<(), ValidationError> {
87113		if let Some(ref val) = self.tech_rcrd_id {
87114			if val.chars().count() < 1 {
87115				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
87116			}
87117			if val.chars().count() > 140 {
87118				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
87119			}
87120		}
87121		self.ctr_pty.validate()?;
87122		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
87123		Ok(())
87124	}
87125}
87126
87127
87128// ReuseDataReportNew6 ...
87129#[cfg_attr(feature = "derive_debug", derive(Debug))]
87130#[cfg_attr(feature = "derive_default", derive(Default))]
87131#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87132#[cfg_attr(feature = "derive_clone", derive(Clone))]
87133#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87134pub struct ReuseDataReportNew6 {
87135	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
87136	pub tech_rcrd_id: Option<String>,
87137	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDtTm") )]
87138	pub rptg_dt_tm: String,
87139	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPty") )]
87140	pub ctr_pty: CounterpartyData87,
87141	#[cfg_attr( feature = "derive_serde", serde(rename = "CollCmpnt", skip_serializing_if = "Option::is_none") )]
87142	pub coll_cmpnt: Option<Vec<CollateralType19>>,
87143	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtDay") )]
87144	pub evt_day: String,
87145	#[cfg_attr( feature = "derive_serde", serde(rename = "FndgSrc", skip_serializing_if = "Option::is_none") )]
87146	pub fndg_src: Option<Vec<FundingSource3>>,
87147	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
87148	pub splmtry_data: Option<Vec<SupplementaryData1>>,
87149}
87150
87151impl ReuseDataReportNew6 {
87152	pub fn validate(&self) -> Result<(), ValidationError> {
87153		if let Some(ref val) = self.tech_rcrd_id {
87154			if val.chars().count() < 1 {
87155				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
87156			}
87157			if val.chars().count() > 140 {
87158				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
87159			}
87160		}
87161		self.ctr_pty.validate()?;
87162		if let Some(ref vec) = self.coll_cmpnt { for item in vec { item.validate()? } }
87163		if let Some(ref vec) = self.fndg_src { for item in vec { item.validate()? } }
87164		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
87165		Ok(())
87166	}
87167}
87168
87169
87170// ReuseValue1Choice ...
87171#[cfg_attr(feature = "derive_debug", derive(Debug))]
87172#[cfg_attr(feature = "derive_default", derive(Default))]
87173#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87174#[cfg_attr(feature = "derive_clone", derive(Clone))]
87175#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87176pub struct ReuseValue1Choice {
87177	#[cfg_attr( feature = "derive_serde", serde(rename = "Actl", skip_serializing_if = "Option::is_none") )]
87178	pub actl: Option<ActiveOrHistoricCurrencyAndAmount>,
87179	#[cfg_attr( feature = "derive_serde", serde(rename = "Estmtd", skip_serializing_if = "Option::is_none") )]
87180	pub estmtd: Option<ActiveOrHistoricCurrencyAndAmount>,
87181}
87182
87183impl ReuseValue1Choice {
87184	pub fn validate(&self) -> Result<(), ValidationError> {
87185		if let Some(ref val) = self.actl { val.validate()? }
87186		if let Some(ref val) = self.estmtd { val.validate()? }
87187		Ok(())
87188	}
87189}
87190
87191
87192// ReversalReason4Choice ...
87193#[cfg_attr(feature = "derive_debug", derive(Debug))]
87194#[cfg_attr(feature = "derive_default", derive(Default))]
87195#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87196#[cfg_attr(feature = "derive_clone", derive(Clone))]
87197#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87198pub struct ReversalReason4Choice {
87199	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
87200	pub cd: Option<String>,
87201	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
87202	pub prtry: Option<String>,
87203}
87204
87205impl ReversalReason4Choice {
87206	pub fn validate(&self) -> Result<(), ValidationError> {
87207		if let Some(ref val) = self.cd {
87208			if val.chars().count() < 1 {
87209				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
87210			}
87211			if val.chars().count() > 4 {
87212				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
87213			}
87214		}
87215		if let Some(ref val) = self.prtry {
87216			if val.chars().count() < 1 {
87217				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
87218			}
87219			if val.chars().count() > 35 {
87220				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
87221			}
87222		}
87223		Ok(())
87224	}
87225}
87226
87227
87228// RiskFactor1 ...
87229#[cfg_attr(feature = "derive_debug", derive(Debug))]
87230#[cfg_attr(feature = "derive_default", derive(Default))]
87231#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87232#[cfg_attr(feature = "derive_clone", derive(Clone))]
87233#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87234pub struct RiskFactor1 {
87235	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
87236	pub id: String,
87237	#[cfg_attr( feature = "derive_serde", serde(rename = "StrssSz") )]
87238	pub strss_sz: StressSize1Choice,
87239}
87240
87241impl RiskFactor1 {
87242	pub fn validate(&self) -> Result<(), ValidationError> {
87243		if self.id.chars().count() < 1 {
87244			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
87245		}
87246		if self.id.chars().count() > 35 {
87247			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
87248		}
87249		self.strss_sz.validate()?;
87250		Ok(())
87251	}
87252}
87253
87254
87255// RiskLevel1Code ...
87256#[cfg_attr(feature = "derive_debug", derive(Debug))]
87257#[cfg_attr(feature = "derive_default", derive(Default))]
87258#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87259#[cfg_attr(feature = "derive_clone", derive(Clone))]
87260#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87261pub enum RiskLevel1Code {
87262	#[cfg_attr(feature = "derive_default", default)]
87263	#[cfg_attr( feature = "derive_serde", serde(rename = "HIGH") )]
87264	CodeHIGH,
87265	#[cfg_attr( feature = "derive_serde", serde(rename = "LOWW") )]
87266	CodeLOWW,
87267	#[cfg_attr( feature = "derive_serde", serde(rename = "MEDM") )]
87268	CodeMEDM,
87269}
87270
87271impl RiskLevel1Code {
87272	pub fn validate(&self) -> Result<(), ValidationError> {
87273		Ok(())
87274	}
87275}
87276
87277
87278// RiskLevel2Choice ...
87279#[cfg_attr(feature = "derive_debug", derive(Debug))]
87280#[cfg_attr(feature = "derive_default", derive(Default))]
87281#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87282#[cfg_attr(feature = "derive_clone", derive(Clone))]
87283#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87284pub struct RiskLevel2Choice {
87285	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
87286	pub cd: Option<RiskLevel1Code>,
87287	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
87288	pub prtry: Option<GenericIdentification47>,
87289}
87290
87291impl RiskLevel2Choice {
87292	pub fn validate(&self) -> Result<(), ValidationError> {
87293		if let Some(ref val) = self.cd { val.validate()? }
87294		if let Some(ref val) = self.prtry { val.validate()? }
87295		Ok(())
87296	}
87297}
87298
87299
87300// RiskReductionService1Code ...
87301#[cfg_attr(feature = "derive_debug", derive(Debug))]
87302#[cfg_attr(feature = "derive_default", derive(Default))]
87303#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87304#[cfg_attr(feature = "derive_clone", derive(Clone))]
87305#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87306pub enum RiskReductionService1Code {
87307	#[cfg_attr(feature = "derive_default", default)]
87308	#[cfg_attr( feature = "derive_serde", serde(rename = "NORR") )]
87309	CodeNORR,
87310	#[cfg_attr( feature = "derive_serde", serde(rename = "PWOS") )]
87311	CodePWOS,
87312	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
87313	CodeOTHR,
87314	#[cfg_attr( feature = "derive_serde", serde(rename = "PRBM") )]
87315	CodePRBM,
87316	#[cfg_attr( feature = "derive_serde", serde(rename = "PWAS") )]
87317	CodePWAS,
87318}
87319
87320impl RiskReductionService1Code {
87321	pub fn validate(&self) -> Result<(), ValidationError> {
87322		Ok(())
87323	}
87324}
87325
87326
87327// RiskTolerance1 ...
87328#[cfg_attr(feature = "derive_debug", derive(Debug))]
87329#[cfg_attr(feature = "derive_default", derive(Default))]
87330#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87331#[cfg_attr(feature = "derive_clone", derive(Clone))]
87332#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87333pub struct RiskTolerance1 {
87334	#[cfg_attr( feature = "derive_serde", serde(rename = "RskTlrncePRIIPSMthdlgy", skip_serializing_if = "Option::is_none") )]
87335	pub rsk_tlrnce_priips_mthdlgy: Option<f64>,
87336	#[cfg_attr( feature = "derive_serde", serde(rename = "RskTlrnceUCITSMthdlgy", skip_serializing_if = "Option::is_none") )]
87337	pub rsk_tlrnce_ucits_mthdlgy: Option<f64>,
87338	#[cfg_attr( feature = "derive_serde", serde(rename = "RskTlrnceIntl", skip_serializing_if = "Option::is_none") )]
87339	pub rsk_tlrnce_intl: Option<RiskLevel1Code>,
87340	#[cfg_attr( feature = "derive_serde", serde(rename = "RskTlrnceForNonPRIIPSAndNonUCITSES", skip_serializing_if = "Option::is_none") )]
87341	pub rsk_tlrnce_for_non_priips_and_non_ucitses: Option<f64>,
87342	#[cfg_attr( feature = "derive_serde", serde(rename = "NotForInvstrsWthTheLwstRskTlrnceDE", skip_serializing_if = "Option::is_none") )]
87343	pub not_for_invstrs_wth_the_lwst_rsk_tlrnce_de: Option<TargetMarket2Code>,
87344	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
87345	pub othr: Option<Vec<OtherTargetMarketRiskTolerance1>>,
87346}
87347
87348impl RiskTolerance1 {
87349	pub fn validate(&self) -> Result<(), ValidationError> {
87350		if let Some(ref val) = self.rsk_tlrnce_intl { val.validate()? }
87351		if let Some(ref val) = self.not_for_invstrs_wth_the_lwst_rsk_tlrnce_de { val.validate()? }
87352		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
87353		Ok(())
87354	}
87355}
87356
87357
87358// RoundingDirection1Code ...
87359#[cfg_attr(feature = "derive_debug", derive(Debug))]
87360#[cfg_attr(feature = "derive_default", derive(Default))]
87361#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87362#[cfg_attr(feature = "derive_clone", derive(Clone))]
87363#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87364pub enum RoundingDirection1Code {
87365	#[cfg_attr(feature = "derive_default", default)]
87366	#[cfg_attr( feature = "derive_serde", serde(rename = "RDUP") )]
87367	CodeRDUP,
87368	#[cfg_attr( feature = "derive_serde", serde(rename = "RDWN") )]
87369	CodeRDWN,
87370	#[cfg_attr( feature = "derive_serde", serde(rename = "STAN") )]
87371	CodeSTAN,
87372	#[cfg_attr( feature = "derive_serde", serde(rename = "DIST") )]
87373	CodeDIST,
87374}
87375
87376impl RoundingDirection1Code {
87377	pub fn validate(&self) -> Result<(), ValidationError> {
87378		Ok(())
87379	}
87380}
87381
87382
87383// RoundingDirection2Code ...
87384#[cfg_attr(feature = "derive_debug", derive(Debug))]
87385#[cfg_attr(feature = "derive_default", derive(Default))]
87386#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87387#[cfg_attr(feature = "derive_clone", derive(Clone))]
87388#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87389pub enum RoundingDirection2Code {
87390	#[cfg_attr(feature = "derive_default", default)]
87391	#[cfg_attr( feature = "derive_serde", serde(rename = "RDUP") )]
87392	CodeRDUP,
87393	#[cfg_attr( feature = "derive_serde", serde(rename = "RDWN") )]
87394	CodeRDWN,
87395}
87396
87397impl RoundingDirection2Code {
87398	pub fn validate(&self) -> Result<(), ValidationError> {
87399		Ok(())
87400	}
87401}
87402
87403
87404// RoundingParameters1 ...
87405#[cfg_attr(feature = "derive_debug", derive(Debug))]
87406#[cfg_attr(feature = "derive_default", derive(Default))]
87407#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87408#[cfg_attr(feature = "derive_clone", derive(Clone))]
87409#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87410pub struct RoundingParameters1 {
87411	#[cfg_attr( feature = "derive_serde", serde(rename = "RndgMdlus", skip_serializing_if = "Option::is_none") )]
87412	pub rndg_mdlus: Option<f64>,
87413	#[cfg_attr( feature = "derive_serde", serde(rename = "RndgDrctn") )]
87414	pub rndg_drctn: RoundingDirection1Code,
87415}
87416
87417impl RoundingParameters1 {
87418	pub fn validate(&self) -> Result<(), ValidationError> {
87419		self.rndg_drctn.validate()?;
87420		Ok(())
87421	}
87422}
87423
87424
87425// ScenarioDefinition2 ...
87426#[cfg_attr(feature = "derive_debug", derive(Debug))]
87427#[cfg_attr(feature = "derive_default", derive(Default))]
87428#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87429#[cfg_attr(feature = "derive_clone", derive(Clone))]
87430#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87431pub struct ScenarioDefinition2 {
87432	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
87433	pub id: GenericIdentification165,
87434	#[cfg_attr( feature = "derive_serde", serde(rename = "ScnroTp") )]
87435	pub scnro_tp: ScenarioType1Code,
87436	#[cfg_attr( feature = "derive_serde", serde(rename = "StrtgyStrssTp") )]
87437	pub strtgy_strss_tp: StrategyStressType1Code,
87438	#[cfg_attr( feature = "derive_serde", serde(rename = "StrssItm") )]
87439	pub strss_itm: Vec<StressItem1>,
87440	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
87441	pub desc: Option<String>,
87442}
87443
87444impl ScenarioDefinition2 {
87445	pub fn validate(&self) -> Result<(), ValidationError> {
87446		self.id.validate()?;
87447		self.scnro_tp.validate()?;
87448		self.strtgy_strss_tp.validate()?;
87449		for item in &self.strss_itm { item.validate()? }
87450		if let Some(ref val) = self.desc {
87451			if val.chars().count() < 1 {
87452				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
87453			}
87454			if val.chars().count() > 2000 {
87455				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 2000".to_string()));
87456			}
87457		}
87458		Ok(())
87459	}
87460}
87461
87462
87463// ScenarioStressTestResult1 ...
87464#[cfg_attr(feature = "derive_debug", derive(Debug))]
87465#[cfg_attr(feature = "derive_default", derive(Default))]
87466#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87467#[cfg_attr(feature = "derive_clone", derive(Clone))]
87468#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87469pub struct ScenarioStressTestResult1 {
87470	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
87471	pub id: GenericIdentification168,
87472	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtflStrssTstRslt") )]
87473	pub prtfl_strss_tst_rslt: Vec<PortfolioStressTestResult1>,
87474}
87475
87476impl ScenarioStressTestResult1 {
87477	pub fn validate(&self) -> Result<(), ValidationError> {
87478		self.id.validate()?;
87479		for item in &self.prtfl_strss_tst_rslt { item.validate()? }
87480		Ok(())
87481	}
87482}
87483
87484
87485// ScenarioType1Code ...
87486#[cfg_attr(feature = "derive_debug", derive(Debug))]
87487#[cfg_attr(feature = "derive_default", derive(Default))]
87488#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87489#[cfg_attr(feature = "derive_clone", derive(Clone))]
87490#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87491pub enum ScenarioType1Code {
87492	#[cfg_attr(feature = "derive_default", default)]
87493	#[cfg_attr( feature = "derive_serde", serde(rename = "HIST") )]
87494	CodeHIST,
87495	#[cfg_attr( feature = "derive_serde", serde(rename = "HYPT") )]
87496	CodeHYPT,
87497}
87498
87499impl ScenarioType1Code {
87500	pub fn validate(&self) -> Result<(), ValidationError> {
87501		Ok(())
87502	}
87503}
87504
87505
87506// Schedule1 ...
87507#[cfg_attr(feature = "derive_debug", derive(Debug))]
87508#[cfg_attr(feature = "derive_default", derive(Default))]
87509#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87510#[cfg_attr(feature = "derive_clone", derive(Clone))]
87511#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87512pub struct Schedule1 {
87513	#[cfg_attr( feature = "derive_serde", serde(rename = "UadjstdFctvDt") )]
87514	pub uadjstd_fctv_dt: String,
87515	#[cfg_attr( feature = "derive_serde", serde(rename = "UadjstdEndDt", skip_serializing_if = "Option::is_none") )]
87516	pub uadjstd_end_dt: Option<String>,
87517	#[cfg_attr( feature = "derive_serde", serde(rename = "Pric") )]
87518	pub pric: SecuritiesTransactionPrice17Choice,
87519}
87520
87521impl Schedule1 {
87522	pub fn validate(&self) -> Result<(), ValidationError> {
87523		self.pric.validate()?;
87524		Ok(())
87525	}
87526}
87527
87528
87529// Schedule10 ...
87530#[cfg_attr(feature = "derive_debug", derive(Debug))]
87531#[cfg_attr(feature = "derive_default", derive(Default))]
87532#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87533#[cfg_attr(feature = "derive_clone", derive(Clone))]
87534#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87535pub struct Schedule10 {
87536	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty") )]
87537	pub qty: f64,
87538	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitOfMeasr", skip_serializing_if = "Option::is_none") )]
87539	pub unit_of_measr: Option<UnitOfMeasure8Choice>,
87540	#[cfg_attr( feature = "derive_serde", serde(rename = "UadjstdFctvDt") )]
87541	pub uadjstd_fctv_dt: String,
87542	#[cfg_attr( feature = "derive_serde", serde(rename = "UadjstdEndDt", skip_serializing_if = "Option::is_none") )]
87543	pub uadjstd_end_dt: Option<String>,
87544}
87545
87546impl Schedule10 {
87547	pub fn validate(&self) -> Result<(), ValidationError> {
87548		if let Some(ref val) = self.unit_of_measr { val.validate()? }
87549		Ok(())
87550	}
87551}
87552
87553
87554// Schedule11 ...
87555#[cfg_attr(feature = "derive_debug", derive(Debug))]
87556#[cfg_attr(feature = "derive_default", derive(Default))]
87557#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87558#[cfg_attr(feature = "derive_clone", derive(Clone))]
87559#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87560pub struct Schedule11 {
87561	#[cfg_attr( feature = "derive_serde", serde(rename = "UadjstdFctvDt") )]
87562	pub uadjstd_fctv_dt: String,
87563	#[cfg_attr( feature = "derive_serde", serde(rename = "UadjstdEndDt", skip_serializing_if = "Option::is_none") )]
87564	pub uadjstd_end_dt: Option<String>,
87565	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
87566	pub amt: AmountAndDirection106,
87567}
87568
87569impl Schedule11 {
87570	pub fn validate(&self) -> Result<(), ValidationError> {
87571		self.amt.validate()?;
87572		Ok(())
87573	}
87574}
87575
87576
87577// Schedule4 ...
87578#[cfg_attr(feature = "derive_debug", derive(Debug))]
87579#[cfg_attr(feature = "derive_default", derive(Default))]
87580#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87581#[cfg_attr(feature = "derive_clone", derive(Clone))]
87582#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87583pub struct Schedule4 {
87584	#[cfg_attr( feature = "derive_serde", serde(rename = "UadjstdFctvDt") )]
87585	pub uadjstd_fctv_dt: String,
87586	#[cfg_attr( feature = "derive_serde", serde(rename = "UadjstdEndDt", skip_serializing_if = "Option::is_none") )]
87587	pub uadjstd_end_dt: Option<String>,
87588	#[cfg_attr( feature = "derive_serde", serde(rename = "Pric") )]
87589	pub pric: SecuritiesTransactionPrice17Choice,
87590}
87591
87592impl Schedule4 {
87593	pub fn validate(&self) -> Result<(), ValidationError> {
87594		self.pric.validate()?;
87595		Ok(())
87596	}
87597}
87598
87599
87600// SchemeIdentificationType1Code ...
87601#[cfg_attr(feature = "derive_debug", derive(Debug))]
87602#[cfg_attr(feature = "derive_default", derive(Default))]
87603#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87604#[cfg_attr(feature = "derive_clone", derive(Clone))]
87605#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87606pub enum SchemeIdentificationType1Code {
87607	#[cfg_attr(feature = "derive_default", default)]
87608	#[cfg_attr( feature = "derive_serde", serde(rename = "MARG") )]
87609	CodeMARG,
87610	#[cfg_attr( feature = "derive_serde", serde(rename = "COLL") )]
87611	CodeCOLL,
87612	#[cfg_attr( feature = "derive_serde", serde(rename = "POSI") )]
87613	CodePOSI,
87614	#[cfg_attr( feature = "derive_serde", serde(rename = "CLIM") )]
87615	CodeCLIM,
87616}
87617
87618impl SchemeIdentificationType1Code {
87619	pub fn validate(&self) -> Result<(), ValidationError> {
87620		Ok(())
87621	}
87622}
87623
87624
87625// SearchCriteria2Choice ...
87626#[cfg_attr(feature = "derive_debug", derive(Debug))]
87627#[cfg_attr(feature = "derive_default", derive(Default))]
87628#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87629#[cfg_attr(feature = "derive_clone", derive(Clone))]
87630#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87631pub struct SearchCriteria2Choice {
87632	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
87633	pub acct: Option<AccountAndParties3>,
87634	#[cfg_attr( feature = "derive_serde", serde(rename = "CstmrId", skip_serializing_if = "Option::is_none") )]
87635	pub cstmr_id: Option<CustomerIdentification2>,
87636	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInstrm", skip_serializing_if = "Option::is_none") )]
87637	pub pmt_instrm: Option<PaymentInstrumentType1>,
87638	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxNb", skip_serializing_if = "Option::is_none") )]
87639	pub orgnl_tx_nb: Option<Vec<RequestType1>>,
87640}
87641
87642impl SearchCriteria2Choice {
87643	pub fn validate(&self) -> Result<(), ValidationError> {
87644		if let Some(ref val) = self.acct { val.validate()? }
87645		if let Some(ref val) = self.cstmr_id { val.validate()? }
87646		if let Some(ref val) = self.pmt_instrm { val.validate()? }
87647		if let Some(ref vec) = self.orgnl_tx_nb { for item in vec { item.validate()? } }
87648		Ok(())
87649	}
87650}
87651
87652
87653// SectorAndLocation1 ...
87654#[cfg_attr(feature = "derive_debug", derive(Debug))]
87655#[cfg_attr(feature = "derive_default", derive(Default))]
87656#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87657#[cfg_attr(feature = "derive_clone", derive(Clone))]
87658#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87659pub struct SectorAndLocation1 {
87660	#[cfg_attr( feature = "derive_serde", serde(rename = "Sctr") )]
87661	pub sctr: String,
87662	#[cfg_attr( feature = "derive_serde", serde(rename = "Lctn") )]
87663	pub lctn: String,
87664}
87665
87666impl SectorAndLocation1 {
87667	pub fn validate(&self) -> Result<(), ValidationError> {
87668		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
87669		if !pattern.is_match(&self.lctn) {
87670			return Err(ValidationError::new(1005, "lctn does not match the required pattern".to_string()));
87671		}
87672		Ok(())
87673	}
87674}
87675
87676
87677// SecuredCollateral2Choice ...
87678#[cfg_attr(feature = "derive_debug", derive(Debug))]
87679#[cfg_attr(feature = "derive_default", derive(Default))]
87680#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87681#[cfg_attr(feature = "derive_clone", derive(Clone))]
87682#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87683pub struct SecuredCollateral2Choice {
87684	#[cfg_attr( feature = "derive_serde", serde(rename = "SnglColl", skip_serializing_if = "Option::is_none") )]
87685	pub sngl_coll: Option<CollateralValuation6>,
87686	#[cfg_attr( feature = "derive_serde", serde(rename = "MltplColl", skip_serializing_if = "Option::is_none") )]
87687	pub mltpl_coll: Option<Vec<CollateralValuation6>>,
87688	#[cfg_attr( feature = "derive_serde", serde(rename = "PoolColl", skip_serializing_if = "Option::is_none") )]
87689	pub pool_coll: Option<CollateralValuation6>,
87690	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrColl", skip_serializing_if = "Option::is_none") )]
87691	pub othr_coll: Option<Vec<CollateralValuation7>>,
87692}
87693
87694impl SecuredCollateral2Choice {
87695	pub fn validate(&self) -> Result<(), ValidationError> {
87696		if let Some(ref val) = self.sngl_coll { val.validate()? }
87697		if let Some(ref vec) = self.mltpl_coll { for item in vec { item.validate()? } }
87698		if let Some(ref val) = self.pool_coll { val.validate()? }
87699		if let Some(ref vec) = self.othr_coll { for item in vec { item.validate()? } }
87700		Ok(())
87701	}
87702}
87703
87704
87705// SecuredMarketReport4Choice ...
87706#[cfg_attr(feature = "derive_debug", derive(Debug))]
87707#[cfg_attr(feature = "derive_default", derive(Default))]
87708#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87709#[cfg_attr(feature = "derive_clone", derive(Clone))]
87710#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87711pub struct SecuredMarketReport4Choice {
87712	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
87713	pub data_set_actn: Option<ReportPeriodActivity3Code>,
87714	#[cfg_attr( feature = "derive_serde", serde(rename = "Tx", skip_serializing_if = "Option::is_none") )]
87715	pub tx: Option<Vec<SecuredMarketTransaction4>>,
87716}
87717
87718impl SecuredMarketReport4Choice {
87719	pub fn validate(&self) -> Result<(), ValidationError> {
87720		if let Some(ref val) = self.data_set_actn { val.validate()? }
87721		if let Some(ref vec) = self.tx { for item in vec { item.validate()? } }
87722		Ok(())
87723	}
87724}
87725
87726
87727// SecuredMarketTransaction4 ...
87728#[cfg_attr(feature = "derive_debug", derive(Debug))]
87729#[cfg_attr(feature = "derive_default", derive(Default))]
87730#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87731#[cfg_attr(feature = "derive_clone", derive(Clone))]
87732#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87733pub struct SecuredMarketTransaction4 {
87734	#[cfg_attr( feature = "derive_serde", serde(rename = "RptdTxSts") )]
87735	pub rptd_tx_sts: TransactionOperationType1Code,
87736	#[cfg_attr( feature = "derive_serde", serde(rename = "NvtnSts", skip_serializing_if = "Option::is_none") )]
87737	pub nvtn_sts: Option<NovationStatus1Code>,
87738	#[cfg_attr( feature = "derive_serde", serde(rename = "BrnchId", skip_serializing_if = "Option::is_none") )]
87739	pub brnch_id: Option<String>,
87740	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTxIdr", skip_serializing_if = "Option::is_none") )]
87741	pub unq_tx_idr: Option<String>,
87742	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryTxId") )]
87743	pub prtry_tx_id: String,
87744	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdPrtryTxId", skip_serializing_if = "Option::is_none") )]
87745	pub rltd_prtry_tx_id: Option<String>,
87746	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyPrtryTxId", skip_serializing_if = "Option::is_none") )]
87747	pub ctr_pty_prtry_tx_id: Option<String>,
87748	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId") )]
87749	pub ctr_pty_id: CounterpartyIdentification3Choice,
87750	#[cfg_attr( feature = "derive_serde", serde(rename = "TrptyAgtId", skip_serializing_if = "Option::is_none") )]
87751	pub trpty_agt_id: Option<String>,
87752	#[cfg_attr( feature = "derive_serde", serde(rename = "TradDt") )]
87753	pub trad_dt: DateAndDateTimeChoice,
87754	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmDt") )]
87755	pub sttlm_dt: String,
87756	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt") )]
87757	pub mtrty_dt: String,
87758	#[cfg_attr( feature = "derive_serde", serde(rename = "TxTp") )]
87759	pub tx_tp: MoneyMarketTransactionType1Code,
87760	#[cfg_attr( feature = "derive_serde", serde(rename = "TxNmnlAmt") )]
87761	pub tx_nmnl_amt: ActiveCurrencyAndAmount,
87762	#[cfg_attr( feature = "derive_serde", serde(rename = "RateTp") )]
87763	pub rate_tp: InterestRateType1Code,
87764	#[cfg_attr( feature = "derive_serde", serde(rename = "DealRate", skip_serializing_if = "Option::is_none") )]
87765	pub deal_rate: Option<f64>,
87766	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgRateRpAgrmt", skip_serializing_if = "Option::is_none") )]
87767	pub fltg_rate_rp_agrmt: Option<FloatingRateNote2>,
87768	#[cfg_attr( feature = "derive_serde", serde(rename = "BrkrdDeal", skip_serializing_if = "Option::is_none") )]
87769	pub brkrd_deal: Option<BrokeredDeal1Code>,
87770	#[cfg_attr( feature = "derive_serde", serde(rename = "Coll") )]
87771	pub coll: Collateral18,
87772	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
87773	pub splmtry_data: Option<Vec<SupplementaryData1>>,
87774}
87775
87776impl SecuredMarketTransaction4 {
87777	pub fn validate(&self) -> Result<(), ValidationError> {
87778		self.rptd_tx_sts.validate()?;
87779		if let Some(ref val) = self.nvtn_sts { val.validate()? }
87780		if let Some(ref val) = self.brnch_id {
87781			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
87782			if !pattern.is_match(val) {
87783				return Err(ValidationError::new(1005, "brnch_id does not match the required pattern".to_string()));
87784			}
87785		}
87786		if let Some(ref val) = self.unq_tx_idr {
87787			if val.chars().count() < 1 {
87788				return Err(ValidationError::new(1001, "unq_tx_idr is shorter than the minimum length of 1".to_string()));
87789			}
87790			if val.chars().count() > 105 {
87791				return Err(ValidationError::new(1002, "unq_tx_idr exceeds the maximum length of 105".to_string()));
87792			}
87793		}
87794		if self.prtry_tx_id.chars().count() < 1 {
87795			return Err(ValidationError::new(1001, "prtry_tx_id is shorter than the minimum length of 1".to_string()));
87796		}
87797		if self.prtry_tx_id.chars().count() > 105 {
87798			return Err(ValidationError::new(1002, "prtry_tx_id exceeds the maximum length of 105".to_string()));
87799		}
87800		if let Some(ref val) = self.rltd_prtry_tx_id {
87801			if val.chars().count() < 1 {
87802				return Err(ValidationError::new(1001, "rltd_prtry_tx_id is shorter than the minimum length of 1".to_string()));
87803			}
87804			if val.chars().count() > 105 {
87805				return Err(ValidationError::new(1002, "rltd_prtry_tx_id exceeds the maximum length of 105".to_string()));
87806			}
87807		}
87808		if let Some(ref val) = self.ctr_pty_prtry_tx_id {
87809			if val.chars().count() < 1 {
87810				return Err(ValidationError::new(1001, "ctr_pty_prtry_tx_id is shorter than the minimum length of 1".to_string()));
87811			}
87812			if val.chars().count() > 105 {
87813				return Err(ValidationError::new(1002, "ctr_pty_prtry_tx_id exceeds the maximum length of 105".to_string()));
87814			}
87815		}
87816		self.ctr_pty_id.validate()?;
87817		if let Some(ref val) = self.trpty_agt_id {
87818			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
87819			if !pattern.is_match(val) {
87820				return Err(ValidationError::new(1005, "trpty_agt_id does not match the required pattern".to_string()));
87821			}
87822		}
87823		self.trad_dt.validate()?;
87824		self.tx_tp.validate()?;
87825		self.tx_nmnl_amt.validate()?;
87826		self.rate_tp.validate()?;
87827		if let Some(ref val) = self.fltg_rate_rp_agrmt { val.validate()? }
87828		if let Some(ref val) = self.brkrd_deal { val.validate()? }
87829		self.coll.validate()?;
87830		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
87831		Ok(())
87832	}
87833}
87834
87835
87836// SecuritiesAccount19 ...
87837#[cfg_attr(feature = "derive_debug", derive(Debug))]
87838#[cfg_attr(feature = "derive_default", derive(Default))]
87839#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87840#[cfg_attr(feature = "derive_clone", derive(Clone))]
87841#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87842pub struct SecuritiesAccount19 {
87843	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
87844	pub id: String,
87845	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
87846	pub tp: Option<GenericIdentification30>,
87847	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
87848	pub nm: Option<String>,
87849}
87850
87851impl SecuritiesAccount19 {
87852	pub fn validate(&self) -> Result<(), ValidationError> {
87853		if self.id.chars().count() < 1 {
87854			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
87855		}
87856		if self.id.chars().count() > 35 {
87857			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
87858		}
87859		if let Some(ref val) = self.tp { val.validate()? }
87860		if let Some(ref val) = self.nm {
87861			if val.chars().count() < 1 {
87862				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
87863			}
87864			if val.chars().count() > 70 {
87865				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 70".to_string()));
87866			}
87867		}
87868		Ok(())
87869	}
87870}
87871
87872
87873// SecuritiesAccount22 ...
87874#[cfg_attr(feature = "derive_debug", derive(Debug))]
87875#[cfg_attr(feature = "derive_default", derive(Default))]
87876#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87877#[cfg_attr(feature = "derive_clone", derive(Clone))]
87878#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87879pub struct SecuritiesAccount22 {
87880	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
87881	pub id: String,
87882	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
87883	pub tp: Option<GenericIdentification30>,
87884	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
87885	pub nm: Option<String>,
87886}
87887
87888impl SecuritiesAccount22 {
87889	pub fn validate(&self) -> Result<(), ValidationError> {
87890		if self.id.chars().count() < 1 {
87891			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
87892		}
87893		if self.id.chars().count() > 35 {
87894			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
87895		}
87896		if let Some(ref val) = self.tp { val.validate()? }
87897		if let Some(ref val) = self.nm {
87898			if val.chars().count() < 1 {
87899				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
87900			}
87901			if val.chars().count() > 70 {
87902				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 70".to_string()));
87903			}
87904		}
87905		Ok(())
87906	}
87907}
87908
87909
87910// SecuritiesAccountAuditTrailOrOperationalError3Choice ...
87911#[cfg_attr(feature = "derive_debug", derive(Debug))]
87912#[cfg_attr(feature = "derive_default", derive(Default))]
87913#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87914#[cfg_attr(feature = "derive_clone", derive(Clone))]
87915#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87916pub struct SecuritiesAccountAuditTrailOrOperationalError3Choice {
87917	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesAcctAudtTrlRpt", skip_serializing_if = "Option::is_none") )]
87918	pub scties_acct_audt_trl_rpt: Option<Vec<SecuritiesAccountAuditTrailReport3>>,
87919	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
87920	pub oprl_err: Option<Vec<ErrorHandling5>>,
87921}
87922
87923impl SecuritiesAccountAuditTrailOrOperationalError3Choice {
87924	pub fn validate(&self) -> Result<(), ValidationError> {
87925		if let Some(ref vec) = self.scties_acct_audt_trl_rpt { for item in vec { item.validate()? } }
87926		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
87927		Ok(())
87928	}
87929}
87930
87931
87932// SecuritiesAccountAuditTrailReport3 ...
87933#[cfg_attr(feature = "derive_debug", derive(Debug))]
87934#[cfg_attr(feature = "derive_default", derive(Default))]
87935#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87936#[cfg_attr(feature = "derive_clone", derive(Clone))]
87937#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87938pub struct SecuritiesAccountAuditTrailReport3 {
87939	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesAcctAudtTrlOrErr") )]
87940	pub scties_acct_audt_trl_or_err: AuditTrailOrBusinessError6Choice,
87941	#[cfg_attr( feature = "derive_serde", serde(rename = "DtPrd", skip_serializing_if = "Option::is_none") )]
87942	pub dt_prd: Option<DatePeriodSearch1Choice>,
87943	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesAcctId") )]
87944	pub scties_acct_id: SecuritiesAccount19,
87945}
87946
87947impl SecuritiesAccountAuditTrailReport3 {
87948	pub fn validate(&self) -> Result<(), ValidationError> {
87949		self.scties_acct_audt_trl_or_err.validate()?;
87950		if let Some(ref val) = self.dt_prd { val.validate()? }
87951		self.scties_acct_id.validate()?;
87952		Ok(())
87953	}
87954}
87955
87956
87957// SecuritiesAccountAuditTrailSearchCriteria3 ...
87958#[cfg_attr(feature = "derive_debug", derive(Debug))]
87959#[cfg_attr(feature = "derive_default", derive(Default))]
87960#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87961#[cfg_attr(feature = "derive_clone", derive(Clone))]
87962#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87963pub struct SecuritiesAccountAuditTrailSearchCriteria3 {
87964	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesAcctId", skip_serializing_if = "Option::is_none") )]
87965	pub scties_acct_id: Option<SecuritiesAccount19>,
87966	#[cfg_attr( feature = "derive_serde", serde(rename = "DtPrd", skip_serializing_if = "Option::is_none") )]
87967	pub dt_prd: Option<DatePeriodSearch1Choice>,
87968}
87969
87970impl SecuritiesAccountAuditTrailSearchCriteria3 {
87971	pub fn validate(&self) -> Result<(), ValidationError> {
87972		if let Some(ref val) = self.scties_acct_id { val.validate()? }
87973		if let Some(ref val) = self.dt_prd { val.validate()? }
87974		Ok(())
87975	}
87976}
87977
87978
87979// SecuritiesAccountModification2 ...
87980#[cfg_attr(feature = "derive_debug", derive(Debug))]
87981#[cfg_attr(feature = "derive_default", derive(Default))]
87982#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
87983#[cfg_attr(feature = "derive_clone", derive(Clone))]
87984#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
87985pub struct SecuritiesAccountModification2 {
87986	#[cfg_attr( feature = "derive_serde", serde(rename = "ScpIndctn") )]
87987	pub scp_indctn: DataModification1Code,
87988	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdMod") )]
87989	pub reqd_mod: SecuritiesAccountModification2Choice,
87990}
87991
87992impl SecuritiesAccountModification2 {
87993	pub fn validate(&self) -> Result<(), ValidationError> {
87994		self.scp_indctn.validate()?;
87995		self.reqd_mod.validate()?;
87996		Ok(())
87997	}
87998}
87999
88000
88001// SecuritiesAccountModification2Choice ...
88002#[cfg_attr(feature = "derive_debug", derive(Debug))]
88003#[cfg_attr(feature = "derive_default", derive(Default))]
88004#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88005#[cfg_attr(feature = "derive_clone", derive(Clone))]
88006#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88007pub struct SecuritiesAccountModification2Choice {
88008	#[cfg_attr( feature = "derive_serde", serde(rename = "SysSctiesAcct", skip_serializing_if = "Option::is_none") )]
88009	pub sys_scties_acct: Option<SystemSecuritiesAccount5>,
88010	#[cfg_attr( feature = "derive_serde", serde(rename = "SysRstrctn", skip_serializing_if = "Option::is_none") )]
88011	pub sys_rstrctn: Option<SystemRestriction1>,
88012	#[cfg_attr( feature = "derive_serde", serde(rename = "MktSpcfcAttr", skip_serializing_if = "Option::is_none") )]
88013	pub mkt_spcfc_attr: Option<MarketSpecificAttribute1>,
88014}
88015
88016impl SecuritiesAccountModification2Choice {
88017	pub fn validate(&self) -> Result<(), ValidationError> {
88018		if let Some(ref val) = self.sys_scties_acct { val.validate()? }
88019		if let Some(ref val) = self.sys_rstrctn { val.validate()? }
88020		if let Some(ref val) = self.mkt_spcfc_attr { val.validate()? }
88021		Ok(())
88022	}
88023}
88024
88025
88026// SecuritiesAccountOrBusinessError3Choice ...
88027#[cfg_attr(feature = "derive_debug", derive(Debug))]
88028#[cfg_attr(feature = "derive_default", derive(Default))]
88029#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88030#[cfg_attr(feature = "derive_clone", derive(Clone))]
88031#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88032pub struct SecuritiesAccountOrBusinessError3Choice {
88033	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesAcct", skip_serializing_if = "Option::is_none") )]
88034	pub scties_acct: Option<SystemSecuritiesAccount6>,
88035	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
88036	pub biz_err: Option<Vec<ErrorHandling5>>,
88037}
88038
88039impl SecuritiesAccountOrBusinessError3Choice {
88040	pub fn validate(&self) -> Result<(), ValidationError> {
88041		if let Some(ref val) = self.scties_acct { val.validate()? }
88042		if let Some(ref vec) = self.biz_err { for item in vec { item.validate()? } }
88043		Ok(())
88044	}
88045}
88046
88047
88048// SecuritiesAccountOrOperationalError3Choice ...
88049#[cfg_attr(feature = "derive_debug", derive(Debug))]
88050#[cfg_attr(feature = "derive_default", derive(Default))]
88051#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88052#[cfg_attr(feature = "derive_clone", derive(Clone))]
88053#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88054pub struct SecuritiesAccountOrOperationalError3Choice {
88055	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesAcctRpt", skip_serializing_if = "Option::is_none") )]
88056	pub scties_acct_rpt: Option<Vec<SecuritiesAccountReport3>>,
88057	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
88058	pub oprl_err: Option<Vec<ErrorHandling5>>,
88059}
88060
88061impl SecuritiesAccountOrOperationalError3Choice {
88062	pub fn validate(&self) -> Result<(), ValidationError> {
88063		if let Some(ref vec) = self.scties_acct_rpt { for item in vec { item.validate()? } }
88064		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
88065		Ok(())
88066	}
88067}
88068
88069
88070// SecuritiesAccountReferenceDataChange2 ...
88071#[cfg_attr(feature = "derive_debug", derive(Debug))]
88072#[cfg_attr(feature = "derive_default", derive(Default))]
88073#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88074#[cfg_attr(feature = "derive_clone", derive(Clone))]
88075#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88076pub struct SecuritiesAccountReferenceDataChange2 {
88077	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesAcctId") )]
88078	pub scties_acct_id: SecuritiesAccount19,
88079	#[cfg_attr( feature = "derive_serde", serde(rename = "FldNm") )]
88080	pub fld_nm: String,
88081	#[cfg_attr( feature = "derive_serde", serde(rename = "OdFldVal") )]
88082	pub od_fld_val: String,
88083	#[cfg_attr( feature = "derive_serde", serde(rename = "NewFldVal") )]
88084	pub new_fld_val: String,
88085	#[cfg_attr( feature = "derive_serde", serde(rename = "OprTmStmp") )]
88086	pub opr_tm_stmp: String,
88087}
88088
88089impl SecuritiesAccountReferenceDataChange2 {
88090	pub fn validate(&self) -> Result<(), ValidationError> {
88091		self.scties_acct_id.validate()?;
88092		if self.fld_nm.chars().count() < 1 {
88093			return Err(ValidationError::new(1001, "fld_nm is shorter than the minimum length of 1".to_string()));
88094		}
88095		if self.fld_nm.chars().count() > 35 {
88096			return Err(ValidationError::new(1002, "fld_nm exceeds the maximum length of 35".to_string()));
88097		}
88098		if self.od_fld_val.chars().count() < 1 {
88099			return Err(ValidationError::new(1001, "od_fld_val is shorter than the minimum length of 1".to_string()));
88100		}
88101		if self.od_fld_val.chars().count() > 350 {
88102			return Err(ValidationError::new(1002, "od_fld_val exceeds the maximum length of 350".to_string()));
88103		}
88104		if self.new_fld_val.chars().count() < 1 {
88105			return Err(ValidationError::new(1001, "new_fld_val is shorter than the minimum length of 1".to_string()));
88106		}
88107		if self.new_fld_val.chars().count() > 350 {
88108			return Err(ValidationError::new(1002, "new_fld_val exceeds the maximum length of 350".to_string()));
88109		}
88110		Ok(())
88111	}
88112}
88113
88114
88115// SecuritiesAccountReport3 ...
88116#[cfg_attr(feature = "derive_debug", derive(Debug))]
88117#[cfg_attr(feature = "derive_default", derive(Default))]
88118#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88119#[cfg_attr(feature = "derive_clone", derive(Clone))]
88120#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88121pub struct SecuritiesAccountReport3 {
88122	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesAcctId") )]
88123	pub scties_acct_id: SecuritiesAccount19,
88124	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesAcctOrErr") )]
88125	pub scties_acct_or_err: SecuritiesAccountOrBusinessError3Choice,
88126}
88127
88128impl SecuritiesAccountReport3 {
88129	pub fn validate(&self) -> Result<(), ValidationError> {
88130		self.scties_acct_id.validate()?;
88131		self.scties_acct_or_err.validate()?;
88132		Ok(())
88133	}
88134}
88135
88136
88137// SecuritiesAccountReturnCriteria1 ...
88138#[cfg_attr(feature = "derive_debug", derive(Debug))]
88139#[cfg_attr(feature = "derive_default", derive(Default))]
88140#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88141#[cfg_attr(feature = "derive_clone", derive(Clone))]
88142#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88143pub struct SecuritiesAccountReturnCriteria1 {
88144	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
88145	pub acct_id: Option<bool>,
88146	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId", skip_serializing_if = "Option::is_none") )]
88147	pub pty_id: Option<bool>,
88148	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyTp", skip_serializing_if = "Option::is_none") )]
88149	pub pty_tp: Option<bool>,
88150	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
88151	pub acct_svcr: Option<bool>,
88152	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctTp", skip_serializing_if = "Option::is_none") )]
88153	pub acct_tp: Option<bool>,
88154	#[cfg_attr( feature = "derive_serde", serde(rename = "OpngDt", skip_serializing_if = "Option::is_none") )]
88155	pub opng_dt: Option<bool>,
88156	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
88157	pub clsg_dt: Option<bool>,
88158	#[cfg_attr( feature = "derive_serde", serde(rename = "EndInvstrFlg", skip_serializing_if = "Option::is_none") )]
88159	pub end_invstr_flg: Option<bool>,
88160	#[cfg_attr( feature = "derive_serde", serde(rename = "PricgSchme", skip_serializing_if = "Option::is_none") )]
88161	pub pricg_schme: Option<bool>,
88162}
88163
88164impl SecuritiesAccountReturnCriteria1 {
88165	pub fn validate(&self) -> Result<(), ValidationError> {
88166		Ok(())
88167	}
88168}
88169
88170
88171// SecuritiesAccountSearchCriteria2 ...
88172#[cfg_attr(feature = "derive_debug", derive(Debug))]
88173#[cfg_attr(feature = "derive_default", derive(Default))]
88174#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88175#[cfg_attr(feature = "derive_clone", derive(Clone))]
88176#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88177pub struct SecuritiesAccountSearchCriteria2 {
88178	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
88179	pub acct_id: Option<String>,
88180	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr", skip_serializing_if = "Option::is_none") )]
88181	pub acct_svcr: Option<PartyIdentification136>,
88182	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
88183	pub acct_ownr: Option<SystemPartyIdentification8>,
88184	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyTp", skip_serializing_if = "Option::is_none") )]
88185	pub pty_tp: Option<SystemPartyType1Choice>,
88186	#[cfg_attr( feature = "derive_serde", serde(rename = "OpngDt", skip_serializing_if = "Option::is_none") )]
88187	pub opng_dt: Option<DatePeriodSearch1Choice>,
88188	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
88189	pub clsg_dt: Option<DatePeriodSearch1Choice>,
88190	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctTp", skip_serializing_if = "Option::is_none") )]
88191	pub acct_tp: Option<SystemSecuritiesAccountType1Choice>,
88192	#[cfg_attr( feature = "derive_serde", serde(rename = "EndInvstrFlg", skip_serializing_if = "Option::is_none") )]
88193	pub end_invstr_flg: Option<String>,
88194	#[cfg_attr( feature = "derive_serde", serde(rename = "PricgSchme", skip_serializing_if = "Option::is_none") )]
88195	pub pricg_schme: Option<String>,
88196}
88197
88198impl SecuritiesAccountSearchCriteria2 {
88199	pub fn validate(&self) -> Result<(), ValidationError> {
88200		if let Some(ref val) = self.acct_id {
88201			if val.chars().count() < 1 {
88202				return Err(ValidationError::new(1001, "acct_id is shorter than the minimum length of 1".to_string()));
88203			}
88204			if val.chars().count() > 35 {
88205				return Err(ValidationError::new(1002, "acct_id exceeds the maximum length of 35".to_string()));
88206			}
88207		}
88208		if let Some(ref val) = self.acct_svcr { val.validate()? }
88209		if let Some(ref val) = self.acct_ownr { val.validate()? }
88210		if let Some(ref val) = self.pty_tp { val.validate()? }
88211		if let Some(ref val) = self.opng_dt { val.validate()? }
88212		if let Some(ref val) = self.clsg_dt { val.validate()? }
88213		if let Some(ref val) = self.acct_tp { val.validate()? }
88214		if let Some(ref val) = self.end_invstr_flg {
88215			let pattern = Regex::new("[a-zA-Z0-9]{4}").unwrap();
88216			if !pattern.is_match(val) {
88217				return Err(ValidationError::new(1005, "end_invstr_flg does not match the required pattern".to_string()));
88218			}
88219		}
88220		if let Some(ref val) = self.pricg_schme {
88221			let pattern = Regex::new("[a-zA-Z0-9]{4}").unwrap();
88222			if !pattern.is_match(val) {
88223				return Err(ValidationError::new(1005, "pricg_schme does not match the required pattern".to_string()));
88224			}
88225		}
88226		Ok(())
88227	}
88228}
88229
88230
88231// SecuritiesAccountStatement2 ...
88232#[cfg_attr(feature = "derive_debug", derive(Debug))]
88233#[cfg_attr(feature = "derive_default", derive(Default))]
88234#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88235#[cfg_attr(feature = "derive_clone", derive(Clone))]
88236#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88237pub struct SecuritiesAccountStatement2 {
88238	#[cfg_attr( feature = "derive_serde", serde(rename = "SysDt") )]
88239	pub sys_dt: String,
88240	#[cfg_attr( feature = "derive_serde", serde(rename = "Chng", skip_serializing_if = "Option::is_none") )]
88241	pub chng: Option<Vec<SecuritiesAccountReferenceDataChange2>>,
88242}
88243
88244impl SecuritiesAccountStatement2 {
88245	pub fn validate(&self) -> Result<(), ValidationError> {
88246		if let Some(ref vec) = self.chng { for item in vec { item.validate()? } }
88247		Ok(())
88248	}
88249}
88250
88251
88252// SecuritiesAccountStatus2 ...
88253#[cfg_attr(feature = "derive_debug", derive(Debug))]
88254#[cfg_attr(feature = "derive_default", derive(Default))]
88255#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88256#[cfg_attr(feature = "derive_clone", derive(Clone))]
88257#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88258pub struct SecuritiesAccountStatus2 {
88259	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdSctiesAcct", skip_serializing_if = "Option::is_none") )]
88260	pub rltd_scties_acct: Option<SecuritiesAccount19>,
88261	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
88262	pub sts: Status6Code,
88263	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsn", skip_serializing_if = "Option::is_none") )]
88264	pub sts_rsn: Option<Vec<StatusReasonInformation10>>,
88265}
88266
88267impl SecuritiesAccountStatus2 {
88268	pub fn validate(&self) -> Result<(), ValidationError> {
88269		if let Some(ref val) = self.rltd_scties_acct { val.validate()? }
88270		self.sts.validate()?;
88271		if let Some(ref vec) = self.sts_rsn { for item in vec { item.validate()? } }
88272		Ok(())
88273	}
88274}
88275
88276
88277// SecuritiesAuditTrailOrOperationalError4Choice ...
88278#[cfg_attr(feature = "derive_debug", derive(Debug))]
88279#[cfg_attr(feature = "derive_default", derive(Default))]
88280#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88281#[cfg_attr(feature = "derive_clone", derive(Clone))]
88282#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88283pub struct SecuritiesAuditTrailOrOperationalError4Choice {
88284	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesAudtTrlRpt", skip_serializing_if = "Option::is_none") )]
88285	pub scties_audt_trl_rpt: Option<Vec<SecuritiesAuditTrailReport4>>,
88286	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
88287	pub oprl_err: Option<Vec<ErrorHandling5>>,
88288}
88289
88290impl SecuritiesAuditTrailOrOperationalError4Choice {
88291	pub fn validate(&self) -> Result<(), ValidationError> {
88292		if let Some(ref vec) = self.scties_audt_trl_rpt { for item in vec { item.validate()? } }
88293		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
88294		Ok(())
88295	}
88296}
88297
88298
88299// SecuritiesAuditTrailReport4 ...
88300#[cfg_attr(feature = "derive_debug", derive(Debug))]
88301#[cfg_attr(feature = "derive_default", derive(Default))]
88302#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88303#[cfg_attr(feature = "derive_clone", derive(Clone))]
88304#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88305pub struct SecuritiesAuditTrailReport4 {
88306	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesAudtTrlOrErr") )]
88307	pub scties_audt_trl_or_err: AuditTrailOrBusinessError6Choice,
88308	#[cfg_attr( feature = "derive_serde", serde(rename = "DtPrd", skip_serializing_if = "Option::is_none") )]
88309	pub dt_prd: Option<DatePeriodSearch1Choice>,
88310	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId") )]
88311	pub fin_instrm_id: SecurityIdentification39,
88312}
88313
88314impl SecuritiesAuditTrailReport4 {
88315	pub fn validate(&self) -> Result<(), ValidationError> {
88316		self.scties_audt_trl_or_err.validate()?;
88317		if let Some(ref val) = self.dt_prd { val.validate()? }
88318		self.fin_instrm_id.validate()?;
88319		Ok(())
88320	}
88321}
88322
88323
88324// SecuritiesAuditTrailSearchCriteria4 ...
88325#[cfg_attr(feature = "derive_debug", derive(Debug))]
88326#[cfg_attr(feature = "derive_default", derive(Default))]
88327#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88328#[cfg_attr(feature = "derive_clone", derive(Clone))]
88329#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88330pub struct SecuritiesAuditTrailSearchCriteria4 {
88331	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId", skip_serializing_if = "Option::is_none") )]
88332	pub fin_instrm_id: Option<SecurityIdentification39>,
88333	#[cfg_attr( feature = "derive_serde", serde(rename = "DtPrd", skip_serializing_if = "Option::is_none") )]
88334	pub dt_prd: Option<DatePeriodSearch1Choice>,
88335}
88336
88337impl SecuritiesAuditTrailSearchCriteria4 {
88338	pub fn validate(&self) -> Result<(), ValidationError> {
88339		if let Some(ref val) = self.fin_instrm_id { val.validate()? }
88340		if let Some(ref val) = self.dt_prd { val.validate()? }
88341		Ok(())
88342	}
88343}
88344
88345
88346// SecuritiesCountryIdentification2 ...
88347#[cfg_attr(feature = "derive_debug", derive(Debug))]
88348#[cfg_attr(feature = "derive_default", derive(Default))]
88349#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88350#[cfg_attr(feature = "derive_clone", derive(Clone))]
88351#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88352pub struct SecuritiesCountryIdentification2 {
88353	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry") )]
88354	pub ctry: CountryCodeAndName3,
88355	#[cfg_attr( feature = "derive_serde", serde(rename = "EEACtry") )]
88356	pub eea_ctry: bool,
88357	#[cfg_attr( feature = "derive_serde", serde(rename = "Mod", skip_serializing_if = "Option::is_none") )]
88358	pub mod_attr: Option<Modification1Code>,
88359	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtyPrd") )]
88360	pub vldty_prd: Period4Choice,
88361	#[cfg_attr( feature = "derive_serde", serde(rename = "LastUpdtd", skip_serializing_if = "Option::is_none") )]
88362	pub last_updtd: Option<String>,
88363}
88364
88365impl SecuritiesCountryIdentification2 {
88366	pub fn validate(&self) -> Result<(), ValidationError> {
88367		self.ctry.validate()?;
88368		if let Some(ref val) = self.mod_attr { val.validate()? }
88369		self.vldty_prd.validate()?;
88370		Ok(())
88371	}
88372}
88373
88374
88375// SecuritiesCurrencyIdentification2 ...
88376#[cfg_attr(feature = "derive_debug", derive(Debug))]
88377#[cfg_attr(feature = "derive_default", derive(Default))]
88378#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88379#[cfg_attr(feature = "derive_clone", derive(Clone))]
88380#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88381pub struct SecuritiesCurrencyIdentification2 {
88382	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
88383	pub ccy: CurrencyCodeAndName1,
88384	#[cfg_attr( feature = "derive_serde", serde(rename = "FrctnlDgt", skip_serializing_if = "Option::is_none") )]
88385	pub frctnl_dgt: Option<f64>,
88386	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryDtls") )]
88387	pub ctry_dtls: CountryCodeAndName3,
88388	#[cfg_attr( feature = "derive_serde", serde(rename = "PreEuro") )]
88389	pub pre_euro: bool,
88390	#[cfg_attr( feature = "derive_serde", serde(rename = "Mod", skip_serializing_if = "Option::is_none") )]
88391	pub mod_attr: Option<Modification1Code>,
88392	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtyPrd") )]
88393	pub vldty_prd: Period4Choice,
88394	#[cfg_attr( feature = "derive_serde", serde(rename = "LastUpdtd", skip_serializing_if = "Option::is_none") )]
88395	pub last_updtd: Option<String>,
88396}
88397
88398impl SecuritiesCurrencyIdentification2 {
88399	pub fn validate(&self) -> Result<(), ValidationError> {
88400		self.ccy.validate()?;
88401		self.ctry_dtls.validate()?;
88402		if let Some(ref val) = self.mod_attr { val.validate()? }
88403		self.vldty_prd.validate()?;
88404		Ok(())
88405	}
88406}
88407
88408
88409// SecuritiesIndexReport1 ...
88410#[cfg_attr(feature = "derive_debug", derive(Debug))]
88411#[cfg_attr(feature = "derive_default", derive(Default))]
88412#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88413#[cfg_attr(feature = "derive_clone", derive(Clone))]
88414#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88415pub struct SecuritiesIndexReport1 {
88416	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
88417	pub tech_rcrd_id: Option<String>,
88418	#[cfg_attr( feature = "derive_serde", serde(rename = "RqstngNtty", skip_serializing_if = "Option::is_none") )]
88419	pub rqstng_ntty: Option<String>,
88420	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx") )]
88421	pub indx: FinancialInstrument46Choice,
88422	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtyPrd", skip_serializing_if = "Option::is_none") )]
88423	pub vldty_prd: Option<Period4Choice>,
88424}
88425
88426impl SecuritiesIndexReport1 {
88427	pub fn validate(&self) -> Result<(), ValidationError> {
88428		if let Some(ref val) = self.tech_rcrd_id {
88429			if val.chars().count() < 1 {
88430				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
88431			}
88432			if val.chars().count() > 35 {
88433				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
88434			}
88435		}
88436		if let Some(ref val) = self.rqstng_ntty {
88437			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
88438			if !pattern.is_match(val) {
88439				return Err(ValidationError::new(1005, "rqstng_ntty does not match the required pattern".to_string()));
88440			}
88441		}
88442		self.indx.validate()?;
88443		if let Some(ref val) = self.vldty_prd { val.validate()? }
88444		Ok(())
88445	}
88446}
88447
88448
88449// SecuritiesInstrumentClassification2 ...
88450#[cfg_attr(feature = "derive_debug", derive(Debug))]
88451#[cfg_attr(feature = "derive_default", derive(Default))]
88452#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88453#[cfg_attr(feature = "derive_clone", derive(Clone))]
88454#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88455pub struct SecuritiesInstrumentClassification2 {
88456	#[cfg_attr( feature = "derive_serde", serde(rename = "Idr") )]
88457	pub idr: String,
88458	#[cfg_attr( feature = "derive_serde", serde(rename = "Mod", skip_serializing_if = "Option::is_none") )]
88459	pub mod_attr: Option<Modification1Code>,
88460	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtyPrd") )]
88461	pub vldty_prd: Period4Choice,
88462	#[cfg_attr( feature = "derive_serde", serde(rename = "LastUpdtd", skip_serializing_if = "Option::is_none") )]
88463	pub last_updtd: Option<String>,
88464}
88465
88466impl SecuritiesInstrumentClassification2 {
88467	pub fn validate(&self) -> Result<(), ValidationError> {
88468		let pattern = Regex::new("[A-Z]{6,6}").unwrap();
88469		if !pattern.is_match(&self.idr) {
88470			return Err(ValidationError::new(1005, "idr does not match the required pattern".to_string()));
88471		}
88472		if let Some(ref val) = self.mod_attr { val.validate()? }
88473		self.vldty_prd.validate()?;
88474		Ok(())
88475	}
88476}
88477
88478
88479// SecuritiesInvalidReferenceDataReport4 ...
88480#[cfg_attr(feature = "derive_debug", derive(Debug))]
88481#[cfg_attr(feature = "derive_default", derive(Default))]
88482#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88483#[cfg_attr(feature = "derive_clone", derive(Clone))]
88484#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88485pub struct SecuritiesInvalidReferenceDataReport4 {
88486	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrm") )]
88487	pub fin_instrm: SecuritiesReferenceDataReport6,
88488	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
88489	pub splmtry_data: Option<Vec<SupplementaryData1>>,
88490}
88491
88492impl SecuritiesInvalidReferenceDataReport4 {
88493	pub fn validate(&self) -> Result<(), ValidationError> {
88494		self.fin_instrm.validate()?;
88495		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
88496		Ok(())
88497	}
88498}
88499
88500
88501// SecuritiesLendingType3Choice ...
88502#[cfg_attr(feature = "derive_debug", derive(Debug))]
88503#[cfg_attr(feature = "derive_default", derive(Default))]
88504#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88505#[cfg_attr(feature = "derive_clone", derive(Clone))]
88506#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88507pub struct SecuritiesLendingType3Choice {
88508	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
88509	pub cd: Option<String>,
88510	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
88511	pub prtry: Option<String>,
88512}
88513
88514impl SecuritiesLendingType3Choice {
88515	pub fn validate(&self) -> Result<(), ValidationError> {
88516		if let Some(ref val) = self.cd {
88517			if val.chars().count() < 1 {
88518				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
88519			}
88520			if val.chars().count() > 4 {
88521				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
88522			}
88523		}
88524		if let Some(ref val) = self.prtry {
88525			if val.chars().count() < 1 {
88526				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
88527			}
88528			if val.chars().count() > 35 {
88529				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
88530			}
88531		}
88532		Ok(())
88533	}
88534}
88535
88536
88537// SecuritiesMarketReportHeader1 ...
88538#[cfg_attr(feature = "derive_debug", derive(Debug))]
88539#[cfg_attr(feature = "derive_default", derive(Default))]
88540#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88541#[cfg_attr(feature = "derive_clone", derive(Clone))]
88542#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88543pub struct SecuritiesMarketReportHeader1 {
88544	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgNtty") )]
88545	pub rptg_ntty: TradingVenueIdentification1Choice,
88546	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPrd") )]
88547	pub rptg_prd: Period4Choice,
88548	#[cfg_attr( feature = "derive_serde", serde(rename = "SubmissnDtTm", skip_serializing_if = "Option::is_none") )]
88549	pub submissn_dt_tm: Option<String>,
88550}
88551
88552impl SecuritiesMarketReportHeader1 {
88553	pub fn validate(&self) -> Result<(), ValidationError> {
88554		self.rptg_ntty.validate()?;
88555		self.rptg_prd.validate()?;
88556		Ok(())
88557	}
88558}
88559
88560
88561// SecuritiesMarketReportHeader3 ...
88562#[cfg_attr(feature = "derive_debug", derive(Debug))]
88563#[cfg_attr(feature = "derive_default", derive(Default))]
88564#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88565#[cfg_attr(feature = "derive_clone", derive(Clone))]
88566#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88567pub struct SecuritiesMarketReportHeader3 {
88568	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgNtty") )]
88569	pub rptg_ntty: TradingVenueIdentification1Choice,
88570	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPrd") )]
88571	pub rptg_prd: Period11Choice,
88572	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
88573	pub isin: Option<Vec<String>>,
88574	#[cfg_attr( feature = "derive_serde", serde(rename = "SubmissnDtTm", skip_serializing_if = "Option::is_none") )]
88575	pub submissn_dt_tm: Option<String>,
88576	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgPgntn", skip_serializing_if = "Option::is_none") )]
88577	pub msg_pgntn: Option<Pagination1>,
88578	#[cfg_attr( feature = "derive_serde", serde(rename = "NbRcrds", skip_serializing_if = "Option::is_none") )]
88579	pub nb_rcrds: Option<f64>,
88580}
88581
88582impl SecuritiesMarketReportHeader3 {
88583	pub fn validate(&self) -> Result<(), ValidationError> {
88584		self.rptg_ntty.validate()?;
88585		self.rptg_prd.validate()?;
88586		if let Some(ref vec) = self.isin {
88587			for item in vec {
88588				let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
88589				if !pattern.is_match(&item) {
88590					return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
88591				}
88592			}
88593		}
88594		if let Some(ref val) = self.msg_pgntn { val.validate()? }
88595		Ok(())
88596	}
88597}
88598
88599
88600// SecuritiesNonTradingDay1 ...
88601#[cfg_attr(feature = "derive_debug", derive(Debug))]
88602#[cfg_attr(feature = "derive_default", derive(Default))]
88603#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88604#[cfg_attr(feature = "derive_clone", derive(Clone))]
88605#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88606pub struct SecuritiesNonTradingDay1 {
88607	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
88608	pub tech_rcrd_id: Option<String>,
88609	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt") )]
88610	pub dt: String,
88611	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
88612	pub rsn: Option<NonTradingDayReason1Code>,
88613}
88614
88615impl SecuritiesNonTradingDay1 {
88616	pub fn validate(&self) -> Result<(), ValidationError> {
88617		if let Some(ref val) = self.tech_rcrd_id {
88618			if val.chars().count() < 1 {
88619				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
88620			}
88621			if val.chars().count() > 35 {
88622				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
88623			}
88624		}
88625		if let Some(ref val) = self.rsn { val.validate()? }
88626		Ok(())
88627	}
88628}
88629
88630
88631// SecuritiesNonTradingDayReport1 ...
88632#[cfg_attr(feature = "derive_debug", derive(Debug))]
88633#[cfg_attr(feature = "derive_default", derive(Default))]
88634#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88635#[cfg_attr(feature = "derive_clone", derive(Clone))]
88636#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88637pub struct SecuritiesNonTradingDayReport1 {
88638	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
88639	pub id: TradingVenueIdentification1Choice,
88640	#[cfg_attr( feature = "derive_serde", serde(rename = "NonWorkgDay") )]
88641	pub non_workg_day: Vec<SecuritiesNonTradingDay1>,
88642}
88643
88644impl SecuritiesNonTradingDayReport1 {
88645	pub fn validate(&self) -> Result<(), ValidationError> {
88646		self.id.validate()?;
88647		for item in &self.non_workg_day { item.validate()? }
88648		Ok(())
88649	}
88650}
88651
88652
88653// SecuritiesOrCash1Choice ...
88654#[cfg_attr(feature = "derive_debug", derive(Debug))]
88655#[cfg_attr(feature = "derive_default", derive(Default))]
88656#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88657#[cfg_attr(feature = "derive_clone", derive(Clone))]
88658#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88659pub struct SecuritiesOrCash1Choice {
88660	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesDtls", skip_serializing_if = "Option::is_none") )]
88661	pub scties_dtls: Option<SettlementParties35>,
88662	#[cfg_attr( feature = "derive_serde", serde(rename = "CshPtiesDtls", skip_serializing_if = "Option::is_none") )]
88663	pub csh_pties_dtls: Option<CashParties24>,
88664}
88665
88666impl SecuritiesOrCash1Choice {
88667	pub fn validate(&self) -> Result<(), ValidationError> {
88668		if let Some(ref val) = self.scties_dtls { val.validate()? }
88669		if let Some(ref val) = self.csh_pties_dtls { val.validate()? }
88670		Ok(())
88671	}
88672}
88673
88674
88675// SecuritiesPaymentStatus1Code ...
88676#[cfg_attr(feature = "derive_debug", derive(Debug))]
88677#[cfg_attr(feature = "derive_default", derive(Default))]
88678#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88679#[cfg_attr(feature = "derive_clone", derive(Clone))]
88680#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88681pub enum SecuritiesPaymentStatus1Code {
88682	#[cfg_attr(feature = "derive_default", default)]
88683	#[cfg_attr( feature = "derive_serde", serde(rename = "FULL") )]
88684	CodeFULL,
88685	#[cfg_attr( feature = "derive_serde", serde(rename = "NILL") )]
88686	CodeNILL,
88687	#[cfg_attr( feature = "derive_serde", serde(rename = "PART") )]
88688	CodePART,
88689}
88690
88691impl SecuritiesPaymentStatus1Code {
88692	pub fn validate(&self) -> Result<(), ValidationError> {
88693		Ok(())
88694	}
88695}
88696
88697
88698// SecuritiesPaymentStatus5Choice ...
88699#[cfg_attr(feature = "derive_debug", derive(Debug))]
88700#[cfg_attr(feature = "derive_default", derive(Default))]
88701#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88702#[cfg_attr(feature = "derive_clone", derive(Clone))]
88703#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88704pub struct SecuritiesPaymentStatus5Choice {
88705	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
88706	pub cd: Option<SecuritiesPaymentStatus1Code>,
88707	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
88708	pub prtry: Option<GenericIdentification30>,
88709}
88710
88711impl SecuritiesPaymentStatus5Choice {
88712	pub fn validate(&self) -> Result<(), ValidationError> {
88713		if let Some(ref val) = self.cd { val.validate()? }
88714		if let Some(ref val) = self.prtry { val.validate()? }
88715		Ok(())
88716	}
88717}
88718
88719
88720// SecuritiesReferenceDataChange3 ...
88721#[cfg_attr(feature = "derive_debug", derive(Debug))]
88722#[cfg_attr(feature = "derive_default", derive(Default))]
88723#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88724#[cfg_attr(feature = "derive_clone", derive(Clone))]
88725#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88726pub struct SecuritiesReferenceDataChange3 {
88727	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId") )]
88728	pub fin_instrm_id: SecurityIdentification39,
88729	#[cfg_attr( feature = "derive_serde", serde(rename = "FldNm") )]
88730	pub fld_nm: String,
88731	#[cfg_attr( feature = "derive_serde", serde(rename = "OdFldVal") )]
88732	pub od_fld_val: String,
88733	#[cfg_attr( feature = "derive_serde", serde(rename = "NewFldVal") )]
88734	pub new_fld_val: String,
88735	#[cfg_attr( feature = "derive_serde", serde(rename = "OprTmStmp") )]
88736	pub opr_tm_stmp: String,
88737}
88738
88739impl SecuritiesReferenceDataChange3 {
88740	pub fn validate(&self) -> Result<(), ValidationError> {
88741		self.fin_instrm_id.validate()?;
88742		if self.fld_nm.chars().count() < 1 {
88743			return Err(ValidationError::new(1001, "fld_nm is shorter than the minimum length of 1".to_string()));
88744		}
88745		if self.fld_nm.chars().count() > 35 {
88746			return Err(ValidationError::new(1002, "fld_nm exceeds the maximum length of 35".to_string()));
88747		}
88748		if self.od_fld_val.chars().count() < 1 {
88749			return Err(ValidationError::new(1001, "od_fld_val is shorter than the minimum length of 1".to_string()));
88750		}
88751		if self.od_fld_val.chars().count() > 350 {
88752			return Err(ValidationError::new(1002, "od_fld_val exceeds the maximum length of 350".to_string()));
88753		}
88754		if self.new_fld_val.chars().count() < 1 {
88755			return Err(ValidationError::new(1001, "new_fld_val is shorter than the minimum length of 1".to_string()));
88756		}
88757		if self.new_fld_val.chars().count() > 350 {
88758			return Err(ValidationError::new(1002, "new_fld_val exceeds the maximum length of 350".to_string()));
88759		}
88760		Ok(())
88761	}
88762}
88763
88764
88765// SecuritiesReferenceDataReport6 ...
88766#[cfg_attr(feature = "derive_debug", derive(Debug))]
88767#[cfg_attr(feature = "derive_default", derive(Default))]
88768#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88769#[cfg_attr(feature = "derive_clone", derive(Clone))]
88770#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88771pub struct SecuritiesReferenceDataReport6 {
88772	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
88773	pub tech_rcrd_id: Option<String>,
88774	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmGnlAttrbts") )]
88775	pub fin_instrm_gnl_attrbts: SecurityInstrumentDescription9,
88776	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr") )]
88777	pub issr: String,
88778	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVnRltdAttrbts") )]
88779	pub tradg_vn_rltd_attrbts: Vec<TradingVenueAttributes1>,
88780	#[cfg_attr( feature = "derive_serde", serde(rename = "DebtInstrmAttrbts", skip_serializing_if = "Option::is_none") )]
88781	pub debt_instrm_attrbts: Option<DebtInstrument2>,
88782	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivInstrmAttrbts", skip_serializing_if = "Option::is_none") )]
88783	pub deriv_instrm_attrbts: Option<DerivativeInstrument5>,
88784	#[cfg_attr( feature = "derive_serde", serde(rename = "TechAttrbts", skip_serializing_if = "Option::is_none") )]
88785	pub tech_attrbts: Option<RecordTechnicalData4>,
88786}
88787
88788impl SecuritiesReferenceDataReport6 {
88789	pub fn validate(&self) -> Result<(), ValidationError> {
88790		if let Some(ref val) = self.tech_rcrd_id {
88791			if val.chars().count() < 1 {
88792				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
88793			}
88794			if val.chars().count() > 35 {
88795				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
88796			}
88797		}
88798		self.fin_instrm_gnl_attrbts.validate()?;
88799		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
88800		if !pattern.is_match(&self.issr) {
88801			return Err(ValidationError::new(1005, "issr does not match the required pattern".to_string()));
88802		}
88803		for item in &self.tradg_vn_rltd_attrbts { item.validate()? }
88804		if let Some(ref val) = self.debt_instrm_attrbts { val.validate()? }
88805		if let Some(ref val) = self.deriv_instrm_attrbts { val.validate()? }
88806		if let Some(ref val) = self.tech_attrbts { val.validate()? }
88807		Ok(())
88808	}
88809}
88810
88811
88812// SecuritiesReferenceDataReport7 ...
88813#[cfg_attr(feature = "derive_debug", derive(Debug))]
88814#[cfg_attr(feature = "derive_default", derive(Default))]
88815#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88816#[cfg_attr(feature = "derive_clone", derive(Clone))]
88817#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88818pub struct SecuritiesReferenceDataReport7 {
88819	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
88820	pub tech_rcrd_id: Option<String>,
88821	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmGnlAttrbts") )]
88822	pub fin_instrm_gnl_attrbts: SecurityInstrumentDescription17,
88823	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
88824	pub issr: Option<String>,
88825	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVnRltdAttrbts") )]
88826	pub tradg_vn_rltd_attrbts: Vec<TradingVenueAttributes2>,
88827	#[cfg_attr( feature = "derive_serde", serde(rename = "DebtInstrmAttrbts", skip_serializing_if = "Option::is_none") )]
88828	pub debt_instrm_attrbts: Option<DebtInstrument2>,
88829	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivInstrmAttrbts", skip_serializing_if = "Option::is_none") )]
88830	pub deriv_instrm_attrbts: Option<DerivativeInstrument5>,
88831	#[cfg_attr( feature = "derive_serde", serde(rename = "TechAttrbts", skip_serializing_if = "Option::is_none") )]
88832	pub tech_attrbts: Option<RecordTechnicalData4>,
88833}
88834
88835impl SecuritiesReferenceDataReport7 {
88836	pub fn validate(&self) -> Result<(), ValidationError> {
88837		if let Some(ref val) = self.tech_rcrd_id {
88838			if val.chars().count() < 1 {
88839				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
88840			}
88841			if val.chars().count() > 35 {
88842				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
88843			}
88844		}
88845		self.fin_instrm_gnl_attrbts.validate()?;
88846		if let Some(ref val) = self.issr {
88847			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
88848			if !pattern.is_match(val) {
88849				return Err(ValidationError::new(1005, "issr does not match the required pattern".to_string()));
88850			}
88851		}
88852		for item in &self.tradg_vn_rltd_attrbts { item.validate()? }
88853		if let Some(ref val) = self.debt_instrm_attrbts { val.validate()? }
88854		if let Some(ref val) = self.deriv_instrm_attrbts { val.validate()? }
88855		if let Some(ref val) = self.tech_attrbts { val.validate()? }
88856		Ok(())
88857	}
88858}
88859
88860
88861// SecuritiesReferenceDeltaStatusReport5Choice ...
88862#[cfg_attr(feature = "derive_debug", derive(Debug))]
88863#[cfg_attr(feature = "derive_default", derive(Default))]
88864#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88865#[cfg_attr(feature = "derive_clone", derive(Clone))]
88866#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88867pub struct SecuritiesReferenceDeltaStatusReport5Choice {
88868	#[cfg_attr( feature = "derive_serde", serde(rename = "ModfdRcrd", skip_serializing_if = "Option::is_none") )]
88869	pub modfd_rcrd: Option<SecuritiesReferenceDataReport6>,
88870	#[cfg_attr( feature = "derive_serde", serde(rename = "NewRcrd", skip_serializing_if = "Option::is_none") )]
88871	pub new_rcrd: Option<SecuritiesReferenceDataReport6>,
88872	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntdRcrd", skip_serializing_if = "Option::is_none") )]
88873	pub termntd_rcrd: Option<SecuritiesReferenceDataReport6>,
88874	#[cfg_attr( feature = "derive_serde", serde(rename = "CancRcrd", skip_serializing_if = "Option::is_none") )]
88875	pub canc_rcrd: Option<SecuritiesReferenceDataReport7>,
88876}
88877
88878impl SecuritiesReferenceDeltaStatusReport5Choice {
88879	pub fn validate(&self) -> Result<(), ValidationError> {
88880		if let Some(ref val) = self.modfd_rcrd { val.validate()? }
88881		if let Some(ref val) = self.new_rcrd { val.validate()? }
88882		if let Some(ref val) = self.termntd_rcrd { val.validate()? }
88883		if let Some(ref val) = self.canc_rcrd { val.validate()? }
88884		Ok(())
88885	}
88886}
88887
88888
88889// SecuritiesReturnCriteria1 ...
88890#[cfg_attr(feature = "derive_debug", derive(Debug))]
88891#[cfg_attr(feature = "derive_default", derive(Default))]
88892#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88893#[cfg_attr(feature = "derive_clone", derive(Clone))]
88894#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88895pub struct SecuritiesReturnCriteria1 {
88896	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId") )]
88897	pub fin_instrm_id: bool,
88898	#[cfg_attr( feature = "derive_serde", serde(rename = "ISOSctyLngNm") )]
88899	pub iso_scty_lng_nm: bool,
88900	#[cfg_attr( feature = "derive_serde", serde(rename = "ISOSctyShrtNm") )]
88901	pub iso_scty_shrt_nm: bool,
88902	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnFinInstrm") )]
88903	pub clssfctn_fin_instrm: bool,
88904	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt") )]
88905	pub mtrty_dt: bool,
88906	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseDt") )]
88907	pub isse_dt: bool,
88908	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseCcy") )]
88909	pub isse_ccy: bool,
88910	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfIsse") )]
88911	pub ctry_of_isse: bool,
88912	#[cfg_attr( feature = "derive_serde", serde(rename = "SctySts") )]
88913	pub scty_sts: bool,
88914	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrCSD") )]
88915	pub invstr_csd: bool,
88916	#[cfg_attr( feature = "derive_serde", serde(rename = "IssrCSD") )]
88917	pub issr_csd: bool,
88918	#[cfg_attr( feature = "derive_serde", serde(rename = "TechIssrCSD") )]
88919	pub tech_issr_csd: bool,
88920	#[cfg_attr( feature = "derive_serde", serde(rename = "CSD") )]
88921	pub csd: bool,
88922	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesQtyTp") )]
88923	pub scties_qty_tp: bool,
88924	#[cfg_attr( feature = "derive_serde", serde(rename = "MinDnmtn") )]
88925	pub min_dnmtn: bool,
88926	#[cfg_attr( feature = "derive_serde", serde(rename = "MinMltplQty") )]
88927	pub min_mltpl_qty: bool,
88928	#[cfg_attr( feature = "derive_serde", serde(rename = "DevtgSttlmUnit") )]
88929	pub devtg_sttlm_unit: bool,
88930}
88931
88932impl SecuritiesReturnCriteria1 {
88933	pub fn validate(&self) -> Result<(), ValidationError> {
88934		Ok(())
88935	}
88936}
88937
88938
88939// SecuritiesSearchCriteria4 ...
88940#[cfg_attr(feature = "derive_debug", derive(Debug))]
88941#[cfg_attr(feature = "derive_default", derive(Default))]
88942#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
88943#[cfg_attr(feature = "derive_clone", derive(Clone))]
88944#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
88945pub struct SecuritiesSearchCriteria4 {
88946	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId", skip_serializing_if = "Option::is_none") )]
88947	pub fin_instrm_id: Option<SecurityIdentification39>,
88948	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnFinInstrm", skip_serializing_if = "Option::is_none") )]
88949	pub clssfctn_fin_instrm: Option<String>,
88950	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
88951	pub mtrty_dt: Option<DatePeriodSearch1Choice>,
88952	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseDt", skip_serializing_if = "Option::is_none") )]
88953	pub isse_dt: Option<DatePeriodSearch1Choice>,
88954	#[cfg_attr( feature = "derive_serde", serde(rename = "IsseCcy", skip_serializing_if = "Option::is_none") )]
88955	pub isse_ccy: Option<String>,
88956	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfIsse", skip_serializing_if = "Option::is_none") )]
88957	pub ctry_of_isse: Option<String>,
88958	#[cfg_attr( feature = "derive_serde", serde(rename = "SctySts", skip_serializing_if = "Option::is_none") )]
88959	pub scty_sts: Option<SecurityStatus3Choice>,
88960	#[cfg_attr( feature = "derive_serde", serde(rename = "MntngCSD", skip_serializing_if = "Option::is_none") )]
88961	pub mntng_csd: Option<SystemPartyIdentification2Choice>,
88962	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrCSD", skip_serializing_if = "Option::is_none") )]
88963	pub invstr_csd: Option<SystemPartyIdentification2Choice>,
88964	#[cfg_attr( feature = "derive_serde", serde(rename = "IssrCSD", skip_serializing_if = "Option::is_none") )]
88965	pub issr_csd: Option<SystemPartyIdentification2Choice>,
88966	#[cfg_attr( feature = "derive_serde", serde(rename = "TechIssrCSD", skip_serializing_if = "Option::is_none") )]
88967	pub tech_issr_csd: Option<SystemPartyIdentification2Choice>,
88968	#[cfg_attr( feature = "derive_serde", serde(rename = "CSD", skip_serializing_if = "Option::is_none") )]
88969	pub csd: Option<SystemPartyIdentification2Choice>,
88970}
88971
88972impl SecuritiesSearchCriteria4 {
88973	pub fn validate(&self) -> Result<(), ValidationError> {
88974		if let Some(ref val) = self.fin_instrm_id { val.validate()? }
88975		if let Some(ref val) = self.clssfctn_fin_instrm {
88976			let pattern = Regex::new("[A-Z]{6,6}").unwrap();
88977			if !pattern.is_match(val) {
88978				return Err(ValidationError::new(1005, "clssfctn_fin_instrm does not match the required pattern".to_string()));
88979			}
88980		}
88981		if let Some(ref val) = self.mtrty_dt { val.validate()? }
88982		if let Some(ref val) = self.isse_dt { val.validate()? }
88983		if let Some(ref val) = self.isse_ccy {
88984			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
88985			if !pattern.is_match(val) {
88986				return Err(ValidationError::new(1005, "isse_ccy does not match the required pattern".to_string()));
88987			}
88988		}
88989		if let Some(ref val) = self.ctry_of_isse {
88990			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
88991			if !pattern.is_match(val) {
88992				return Err(ValidationError::new(1005, "ctry_of_isse does not match the required pattern".to_string()));
88993			}
88994		}
88995		if let Some(ref val) = self.scty_sts { val.validate()? }
88996		if let Some(ref val) = self.mntng_csd { val.validate()? }
88997		if let Some(ref val) = self.invstr_csd { val.validate()? }
88998		if let Some(ref val) = self.issr_csd { val.validate()? }
88999		if let Some(ref val) = self.tech_issr_csd { val.validate()? }
89000		if let Some(ref val) = self.csd { val.validate()? }
89001		Ok(())
89002	}
89003}
89004
89005
89006// SecuritiesSettlementStatus1Code ...
89007#[cfg_attr(feature = "derive_debug", derive(Debug))]
89008#[cfg_attr(feature = "derive_default", derive(Default))]
89009#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89010#[cfg_attr(feature = "derive_clone", derive(Clone))]
89011#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89012pub enum SecuritiesSettlementStatus1Code {
89013	#[cfg_attr(feature = "derive_default", default)]
89014	#[cfg_attr( feature = "derive_serde", serde(rename = "PEND") )]
89015	CodePEND,
89016	#[cfg_attr( feature = "derive_serde", serde(rename = "PENF") )]
89017	CodePENF,
89018}
89019
89020impl SecuritiesSettlementStatus1Code {
89021	pub fn validate(&self) -> Result<(), ValidationError> {
89022		Ok(())
89023	}
89024}
89025
89026
89027// SecuritiesSettlementSystemIdentification2 ...
89028#[cfg_attr(feature = "derive_debug", derive(Debug))]
89029#[cfg_attr(feature = "derive_default", derive(Default))]
89030#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89031#[cfg_attr(feature = "derive_clone", derive(Clone))]
89032#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89033pub struct SecuritiesSettlementSystemIdentification2 {
89034	#[cfg_attr( feature = "derive_serde", serde(rename = "SysId") )]
89035	pub sys_id: String,
89036	#[cfg_attr( feature = "derive_serde", serde(rename = "SysNm", skip_serializing_if = "Option::is_none") )]
89037	pub sys_nm: Option<String>,
89038	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfJursdctn", skip_serializing_if = "Option::is_none") )]
89039	pub ctry_of_jursdctn: Option<String>,
89040	#[cfg_attr( feature = "derive_serde", serde(rename = "CSDLglNm", skip_serializing_if = "Option::is_none") )]
89041	pub csd_lgl_nm: Option<String>,
89042	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
89043	pub lei: Option<String>,
89044	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnsblPty", skip_serializing_if = "Option::is_none") )]
89045	pub rspnsbl_pty: Option<Vec<Contact9>>,
89046}
89047
89048impl SecuritiesSettlementSystemIdentification2 {
89049	pub fn validate(&self) -> Result<(), ValidationError> {
89050		if self.sys_id.chars().count() < 1 {
89051			return Err(ValidationError::new(1001, "sys_id is shorter than the minimum length of 1".to_string()));
89052		}
89053		if self.sys_id.chars().count() > 35 {
89054			return Err(ValidationError::new(1002, "sys_id exceeds the maximum length of 35".to_string()));
89055		}
89056		if let Some(ref val) = self.sys_nm {
89057			if val.chars().count() < 1 {
89058				return Err(ValidationError::new(1001, "sys_nm is shorter than the minimum length of 1".to_string()));
89059			}
89060			if val.chars().count() > 140 {
89061				return Err(ValidationError::new(1002, "sys_nm exceeds the maximum length of 140".to_string()));
89062			}
89063		}
89064		if let Some(ref val) = self.ctry_of_jursdctn {
89065			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
89066			if !pattern.is_match(val) {
89067				return Err(ValidationError::new(1005, "ctry_of_jursdctn does not match the required pattern".to_string()));
89068			}
89069		}
89070		if let Some(ref val) = self.csd_lgl_nm {
89071			if val.chars().count() < 1 {
89072				return Err(ValidationError::new(1001, "csd_lgl_nm is shorter than the minimum length of 1".to_string()));
89073			}
89074			if val.chars().count() > 140 {
89075				return Err(ValidationError::new(1002, "csd_lgl_nm exceeds the maximum length of 140".to_string()));
89076			}
89077		}
89078		if let Some(ref val) = self.lei {
89079			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
89080			if !pattern.is_match(val) {
89081				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
89082			}
89083		}
89084		if let Some(ref vec) = self.rspnsbl_pty { for item in vec { item.validate()? } }
89085		Ok(())
89086	}
89087}
89088
89089
89090// SecuritiesTradeVenueCriteria1Choice ...
89091#[cfg_attr(feature = "derive_debug", derive(Debug))]
89092#[cfg_attr(feature = "derive_default", derive(Default))]
89093#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89094#[cfg_attr(feature = "derive_clone", derive(Clone))]
89095#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89096pub struct SecuritiesTradeVenueCriteria1Choice {
89097	#[cfg_attr( feature = "derive_serde", serde(rename = "MIC", skip_serializing_if = "Option::is_none") )]
89098	pub mic: Option<Vec<String>>,
89099	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyMIC", skip_serializing_if = "Option::is_none") )]
89100	pub any_mic: Option<AnyMIC1Code>,
89101}
89102
89103impl SecuritiesTradeVenueCriteria1Choice {
89104	pub fn validate(&self) -> Result<(), ValidationError> {
89105		if let Some(ref vec) = self.mic {
89106			for item in vec {
89107				let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
89108				if !pattern.is_match(&item) {
89109					return Err(ValidationError::new(1005, "mic does not match the required pattern".to_string()));
89110				}
89111			}
89112		}
89113		if let Some(ref val) = self.any_mic { val.validate()? }
89114		Ok(())
89115	}
89116}
89117
89118
89119// SecuritiesTransaction3 ...
89120#[cfg_attr(feature = "derive_debug", derive(Debug))]
89121#[cfg_attr(feature = "derive_default", derive(Default))]
89122#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89123#[cfg_attr(feature = "derive_clone", derive(Clone))]
89124#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89125pub struct SecuritiesTransaction3 {
89126	#[cfg_attr( feature = "derive_serde", serde(rename = "TradDt") )]
89127	pub trad_dt: String,
89128	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgCpcty") )]
89129	pub tradg_cpcty: RegulatoryTradingCapacity1Code,
89130	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty") )]
89131	pub qty: FinancialInstrumentQuantity25Choice,
89132	#[cfg_attr( feature = "derive_serde", serde(rename = "DgtlTknQty", skip_serializing_if = "Option::is_none") )]
89133	pub dgtl_tkn_qty: Option<Vec<DigitalTokenAmount2>>,
89134	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivNtnlChng", skip_serializing_if = "Option::is_none") )]
89135	pub deriv_ntnl_chng: Option<VariationType1Code>,
89136	#[cfg_attr( feature = "derive_serde", serde(rename = "Pric") )]
89137	pub pric: SecuritiesTransactionPrice22Choice,
89138	#[cfg_attr( feature = "derive_serde", serde(rename = "NetAmt", skip_serializing_if = "Option::is_none") )]
89139	pub net_amt: Option<f64>,
89140	#[cfg_attr( feature = "derive_serde", serde(rename = "TradVn") )]
89141	pub trad_vn: String,
89142	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfBrnch", skip_serializing_if = "Option::is_none") )]
89143	pub ctry_of_brnch: Option<String>,
89144	#[cfg_attr( feature = "derive_serde", serde(rename = "UpFrntPmt", skip_serializing_if = "Option::is_none") )]
89145	pub up_frnt_pmt: Option<AmountAndDirection53>,
89146	#[cfg_attr( feature = "derive_serde", serde(rename = "TradPlcMtchgId", skip_serializing_if = "Option::is_none") )]
89147	pub trad_plc_mtchg_id: Option<String>,
89148	#[cfg_attr( feature = "derive_serde", serde(rename = "CmplxTradCmpntId", skip_serializing_if = "Option::is_none") )]
89149	pub cmplx_trad_cmpnt_id: Option<String>,
89150}
89151
89152impl SecuritiesTransaction3 {
89153	pub fn validate(&self) -> Result<(), ValidationError> {
89154		self.tradg_cpcty.validate()?;
89155		self.qty.validate()?;
89156		if let Some(ref vec) = self.dgtl_tkn_qty { for item in vec { item.validate()? } }
89157		if let Some(ref val) = self.deriv_ntnl_chng { val.validate()? }
89158		self.pric.validate()?;
89159		let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
89160		if !pattern.is_match(&self.trad_vn) {
89161			return Err(ValidationError::new(1005, "trad_vn does not match the required pattern".to_string()));
89162		}
89163		if let Some(ref val) = self.ctry_of_brnch {
89164			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
89165			if !pattern.is_match(val) {
89166				return Err(ValidationError::new(1005, "ctry_of_brnch does not match the required pattern".to_string()));
89167			}
89168		}
89169		if let Some(ref val) = self.up_frnt_pmt { val.validate()? }
89170		if let Some(ref val) = self.trad_plc_mtchg_id {
89171			if val.chars().count() < 1 {
89172				return Err(ValidationError::new(1001, "trad_plc_mtchg_id is shorter than the minimum length of 1".to_string()));
89173			}
89174			if val.chars().count() > 52 {
89175				return Err(ValidationError::new(1002, "trad_plc_mtchg_id exceeds the maximum length of 52".to_string()));
89176			}
89177		}
89178		if let Some(ref val) = self.cmplx_trad_cmpnt_id {
89179			if val.chars().count() < 1 {
89180				return Err(ValidationError::new(1001, "cmplx_trad_cmpnt_id is shorter than the minimum length of 1".to_string()));
89181			}
89182			if val.chars().count() > 35 {
89183				return Err(ValidationError::new(1002, "cmplx_trad_cmpnt_id exceeds the maximum length of 35".to_string()));
89184			}
89185		}
89186		Ok(())
89187	}
89188}
89189
89190
89191// SecuritiesTransactionIndicator2 ...
89192#[cfg_attr(feature = "derive_debug", derive(Debug))]
89193#[cfg_attr(feature = "derive_default", derive(Default))]
89194#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89195#[cfg_attr(feature = "derive_clone", derive(Clone))]
89196#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89197pub struct SecuritiesTransactionIndicator2 {
89198	#[cfg_attr( feature = "derive_serde", serde(rename = "WvrInd", skip_serializing_if = "Option::is_none") )]
89199	pub wvr_ind: Option<Vec<ReportingWaiverType1Code>>,
89200	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtSellgInd", skip_serializing_if = "Option::is_none") )]
89201	pub shrt_sellg_ind: Option<Side5Code>,
89202	#[cfg_attr( feature = "derive_serde", serde(rename = "OTCPstTradInd", skip_serializing_if = "Option::is_none") )]
89203	pub otc_pst_trad_ind: Option<Vec<ReportingWaiverType3Code>>,
89204	#[cfg_attr( feature = "derive_serde", serde(rename = "RskRdcgTx", skip_serializing_if = "Option::is_none") )]
89205	pub rsk_rdcg_tx: Option<bool>,
89206	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesFincgTxInd") )]
89207	pub scties_fincg_tx_ind: bool,
89208}
89209
89210impl SecuritiesTransactionIndicator2 {
89211	pub fn validate(&self) -> Result<(), ValidationError> {
89212		if let Some(ref vec) = self.wvr_ind { for item in vec { item.validate()? } }
89213		if let Some(ref val) = self.shrt_sellg_ind { val.validate()? }
89214		if let Some(ref vec) = self.otc_pst_trad_ind { for item in vec { item.validate()? } }
89215		Ok(())
89216	}
89217}
89218
89219
89220// SecuritiesTransactionPrice1 ...
89221#[cfg_attr(feature = "derive_debug", derive(Debug))]
89222#[cfg_attr(feature = "derive_default", derive(Default))]
89223#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89224#[cfg_attr(feature = "derive_clone", derive(Clone))]
89225#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89226pub struct SecuritiesTransactionPrice1 {
89227	#[cfg_attr( feature = "derive_serde", serde(rename = "Pdg") )]
89228	pub pdg: PriceStatus1Code,
89229	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
89230	pub ccy: Option<String>,
89231}
89232
89233impl SecuritiesTransactionPrice1 {
89234	pub fn validate(&self) -> Result<(), ValidationError> {
89235		self.pdg.validate()?;
89236		if let Some(ref val) = self.ccy {
89237			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
89238			if !pattern.is_match(val) {
89239				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
89240			}
89241		}
89242		Ok(())
89243	}
89244}
89245
89246
89247// SecuritiesTransactionPrice13Choice ...
89248#[cfg_attr(feature = "derive_debug", derive(Debug))]
89249#[cfg_attr(feature = "derive_default", derive(Default))]
89250#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89251#[cfg_attr(feature = "derive_clone", derive(Clone))]
89252#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89253pub struct SecuritiesTransactionPrice13Choice {
89254	#[cfg_attr( feature = "derive_serde", serde(rename = "MntryVal", skip_serializing_if = "Option::is_none") )]
89255	pub mntry_val: Option<AmountAndDirection106>,
89256	#[cfg_attr( feature = "derive_serde", serde(rename = "Pctg", skip_serializing_if = "Option::is_none") )]
89257	pub pctg: Option<f64>,
89258	#[cfg_attr( feature = "derive_serde", serde(rename = "Dcml", skip_serializing_if = "Option::is_none") )]
89259	pub dcml: Option<f64>,
89260	#[cfg_attr( feature = "derive_serde", serde(rename = "BsisPtSprd", skip_serializing_if = "Option::is_none") )]
89261	pub bsis_pt_sprd: Option<f64>,
89262}
89263
89264impl SecuritiesTransactionPrice13Choice {
89265	pub fn validate(&self) -> Result<(), ValidationError> {
89266		if let Some(ref val) = self.mntry_val { val.validate()? }
89267		Ok(())
89268	}
89269}
89270
89271
89272// SecuritiesTransactionPrice14Choice ...
89273#[cfg_attr(feature = "derive_debug", derive(Debug))]
89274#[cfg_attr(feature = "derive_default", derive(Default))]
89275#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89276#[cfg_attr(feature = "derive_clone", derive(Clone))]
89277#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89278pub struct SecuritiesTransactionPrice14Choice {
89279	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
89280	pub rate: Option<f64>,
89281	#[cfg_attr( feature = "derive_serde", serde(rename = "Dcml", skip_serializing_if = "Option::is_none") )]
89282	pub dcml: Option<f64>,
89283}
89284
89285impl SecuritiesTransactionPrice14Choice {
89286	pub fn validate(&self) -> Result<(), ValidationError> {
89287		Ok(())
89288	}
89289}
89290
89291
89292// SecuritiesTransactionPrice17Choice ...
89293#[cfg_attr(feature = "derive_debug", derive(Debug))]
89294#[cfg_attr(feature = "derive_default", derive(Default))]
89295#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89296#[cfg_attr(feature = "derive_clone", derive(Clone))]
89297#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89298pub struct SecuritiesTransactionPrice17Choice {
89299	#[cfg_attr( feature = "derive_serde", serde(rename = "MntryVal", skip_serializing_if = "Option::is_none") )]
89300	pub mntry_val: Option<AmountAndDirection106>,
89301	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit", skip_serializing_if = "Option::is_none") )]
89302	pub unit: Option<f64>,
89303	#[cfg_attr( feature = "derive_serde", serde(rename = "Pctg", skip_serializing_if = "Option::is_none") )]
89304	pub pctg: Option<f64>,
89305	#[cfg_attr( feature = "derive_serde", serde(rename = "Yld", skip_serializing_if = "Option::is_none") )]
89306	pub yld: Option<f64>,
89307	#[cfg_attr( feature = "derive_serde", serde(rename = "Dcml", skip_serializing_if = "Option::is_none") )]
89308	pub dcml: Option<f64>,
89309	#[cfg_attr( feature = "derive_serde", serde(rename = "PdgPric", skip_serializing_if = "Option::is_none") )]
89310	pub pdg_pric: Option<PriceStatus1Code>,
89311	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
89312	pub othr: Option<SecuritiesTransactionPrice5>,
89313}
89314
89315impl SecuritiesTransactionPrice17Choice {
89316	pub fn validate(&self) -> Result<(), ValidationError> {
89317		if let Some(ref val) = self.mntry_val { val.validate()? }
89318		if let Some(ref val) = self.pdg_pric { val.validate()? }
89319		if let Some(ref val) = self.othr { val.validate()? }
89320		Ok(())
89321	}
89322}
89323
89324
89325// SecuritiesTransactionPrice18Choice ...
89326#[cfg_attr(feature = "derive_debug", derive(Debug))]
89327#[cfg_attr(feature = "derive_default", derive(Default))]
89328#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89329#[cfg_attr(feature = "derive_clone", derive(Clone))]
89330#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89331pub struct SecuritiesTransactionPrice18Choice {
89332	#[cfg_attr( feature = "derive_serde", serde(rename = "MntryVal", skip_serializing_if = "Option::is_none") )]
89333	pub mntry_val: Option<AmountAndDirection107>,
89334	#[cfg_attr( feature = "derive_serde", serde(rename = "Pctg", skip_serializing_if = "Option::is_none") )]
89335	pub pctg: Option<f64>,
89336	#[cfg_attr( feature = "derive_serde", serde(rename = "Dcml", skip_serializing_if = "Option::is_none") )]
89337	pub dcml: Option<f64>,
89338	#[cfg_attr( feature = "derive_serde", serde(rename = "BsisPts", skip_serializing_if = "Option::is_none") )]
89339	pub bsis_pts: Option<f64>,
89340}
89341
89342impl SecuritiesTransactionPrice18Choice {
89343	pub fn validate(&self) -> Result<(), ValidationError> {
89344		if let Some(ref val) = self.mntry_val { val.validate()? }
89345		Ok(())
89346	}
89347}
89348
89349
89350// SecuritiesTransactionPrice19Choice ...
89351#[cfg_attr(feature = "derive_debug", derive(Debug))]
89352#[cfg_attr(feature = "derive_default", derive(Default))]
89353#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89354#[cfg_attr(feature = "derive_clone", derive(Clone))]
89355#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89356pub struct SecuritiesTransactionPrice19Choice {
89357	#[cfg_attr( feature = "derive_serde", serde(rename = "MntryVal", skip_serializing_if = "Option::is_none") )]
89358	pub mntry_val: Option<AmountAndDirection107>,
89359	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit", skip_serializing_if = "Option::is_none") )]
89360	pub unit: Option<f64>,
89361	#[cfg_attr( feature = "derive_serde", serde(rename = "Pctg", skip_serializing_if = "Option::is_none") )]
89362	pub pctg: Option<f64>,
89363	#[cfg_attr( feature = "derive_serde", serde(rename = "Yld", skip_serializing_if = "Option::is_none") )]
89364	pub yld: Option<f64>,
89365	#[cfg_attr( feature = "derive_serde", serde(rename = "Dcml", skip_serializing_if = "Option::is_none") )]
89366	pub dcml: Option<f64>,
89367	#[cfg_attr( feature = "derive_serde", serde(rename = "PdgPric", skip_serializing_if = "Option::is_none") )]
89368	pub pdg_pric: Option<PriceStatus1Code>,
89369	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
89370	pub othr: Option<SecuritiesTransactionPrice5>,
89371}
89372
89373impl SecuritiesTransactionPrice19Choice {
89374	pub fn validate(&self) -> Result<(), ValidationError> {
89375		if let Some(ref val) = self.mntry_val { val.validate()? }
89376		if let Some(ref val) = self.pdg_pric { val.validate()? }
89377		if let Some(ref val) = self.othr { val.validate()? }
89378		Ok(())
89379	}
89380}
89381
89382
89383// SecuritiesTransactionPrice20Choice ...
89384#[cfg_attr(feature = "derive_debug", derive(Debug))]
89385#[cfg_attr(feature = "derive_default", derive(Default))]
89386#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89387#[cfg_attr(feature = "derive_clone", derive(Clone))]
89388#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89389pub struct SecuritiesTransactionPrice20Choice {
89390	#[cfg_attr( feature = "derive_serde", serde(rename = "MntryVal", skip_serializing_if = "Option::is_none") )]
89391	pub mntry_val: Option<AmountAndDirection106>,
89392	#[cfg_attr( feature = "derive_serde", serde(rename = "Pctg", skip_serializing_if = "Option::is_none") )]
89393	pub pctg: Option<f64>,
89394	#[cfg_attr( feature = "derive_serde", serde(rename = "Dcml", skip_serializing_if = "Option::is_none") )]
89395	pub dcml: Option<f64>,
89396	#[cfg_attr( feature = "derive_serde", serde(rename = "BsisPtSprd", skip_serializing_if = "Option::is_none") )]
89397	pub bsis_pt_sprd: Option<f64>,
89398}
89399
89400impl SecuritiesTransactionPrice20Choice {
89401	pub fn validate(&self) -> Result<(), ValidationError> {
89402		if let Some(ref val) = self.mntry_val { val.validate()? }
89403		Ok(())
89404	}
89405}
89406
89407
89408// SecuritiesTransactionPrice21Choice ...
89409#[cfg_attr(feature = "derive_debug", derive(Debug))]
89410#[cfg_attr(feature = "derive_default", derive(Default))]
89411#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89412#[cfg_attr(feature = "derive_clone", derive(Clone))]
89413#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89414pub struct SecuritiesTransactionPrice21Choice {
89415	#[cfg_attr( feature = "derive_serde", serde(rename = "MntryVal", skip_serializing_if = "Option::is_none") )]
89416	pub mntry_val: Option<AmountAndDirection53>,
89417	#[cfg_attr( feature = "derive_serde", serde(rename = "Pctg", skip_serializing_if = "Option::is_none") )]
89418	pub pctg: Option<f64>,
89419	#[cfg_attr( feature = "derive_serde", serde(rename = "Yld", skip_serializing_if = "Option::is_none") )]
89420	pub yld: Option<f64>,
89421	#[cfg_attr( feature = "derive_serde", serde(rename = "BsisPts", skip_serializing_if = "Option::is_none") )]
89422	pub bsis_pts: Option<f64>,
89423	#[cfg_attr( feature = "derive_serde", serde(rename = "NmnlVal", skip_serializing_if = "Option::is_none") )]
89424	pub nmnl_val: Option<ActiveOrHistoricCurrencyAndAmount>,
89425}
89426
89427impl SecuritiesTransactionPrice21Choice {
89428	pub fn validate(&self) -> Result<(), ValidationError> {
89429		if let Some(ref val) = self.mntry_val { val.validate()? }
89430		if let Some(ref val) = self.nmnl_val { val.validate()? }
89431		Ok(())
89432	}
89433}
89434
89435
89436// SecuritiesTransactionPrice22Choice ...
89437#[cfg_attr(feature = "derive_debug", derive(Debug))]
89438#[cfg_attr(feature = "derive_default", derive(Default))]
89439#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89440#[cfg_attr(feature = "derive_clone", derive(Clone))]
89441#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89442pub struct SecuritiesTransactionPrice22Choice {
89443	#[cfg_attr( feature = "derive_serde", serde(rename = "Pric", skip_serializing_if = "Option::is_none") )]
89444	pub pric: Option<SecuritiesTransactionPrice2Choice>,
89445	#[cfg_attr( feature = "derive_serde", serde(rename = "DgtlTknPric", skip_serializing_if = "Option::is_none") )]
89446	pub dgtl_tkn_pric: Option<SecuritiesTransactionPrice7>,
89447	#[cfg_attr( feature = "derive_serde", serde(rename = "NoPric", skip_serializing_if = "Option::is_none") )]
89448	pub no_pric: Option<SecuritiesTransactionPrice6>,
89449}
89450
89451impl SecuritiesTransactionPrice22Choice {
89452	pub fn validate(&self) -> Result<(), ValidationError> {
89453		if let Some(ref val) = self.pric { val.validate()? }
89454		if let Some(ref val) = self.dgtl_tkn_pric { val.validate()? }
89455		if let Some(ref val) = self.no_pric { val.validate()? }
89456		Ok(())
89457	}
89458}
89459
89460
89461// SecuritiesTransactionPrice23Choice ...
89462#[cfg_attr(feature = "derive_debug", derive(Debug))]
89463#[cfg_attr(feature = "derive_default", derive(Default))]
89464#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89465#[cfg_attr(feature = "derive_clone", derive(Clone))]
89466#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89467pub struct SecuritiesTransactionPrice23Choice {
89468	#[cfg_attr( feature = "derive_serde", serde(rename = "MntryVal", skip_serializing_if = "Option::is_none") )]
89469	pub mntry_val: Option<AmountAndDirection106>,
89470	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit", skip_serializing_if = "Option::is_none") )]
89471	pub unit: Option<f64>,
89472	#[cfg_attr( feature = "derive_serde", serde(rename = "Pctg", skip_serializing_if = "Option::is_none") )]
89473	pub pctg: Option<f64>,
89474	#[cfg_attr( feature = "derive_serde", serde(rename = "Yld", skip_serializing_if = "Option::is_none") )]
89475	pub yld: Option<f64>,
89476	#[cfg_attr( feature = "derive_serde", serde(rename = "Dcml", skip_serializing_if = "Option::is_none") )]
89477	pub dcml: Option<f64>,
89478	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
89479	pub othr: Option<SecuritiesTransactionPrice5>,
89480}
89481
89482impl SecuritiesTransactionPrice23Choice {
89483	pub fn validate(&self) -> Result<(), ValidationError> {
89484		if let Some(ref val) = self.mntry_val { val.validate()? }
89485		if let Some(ref val) = self.othr { val.validate()? }
89486		Ok(())
89487	}
89488}
89489
89490
89491// SecuritiesTransactionPrice2Choice ...
89492#[cfg_attr(feature = "derive_debug", derive(Debug))]
89493#[cfg_attr(feature = "derive_default", derive(Default))]
89494#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89495#[cfg_attr(feature = "derive_clone", derive(Clone))]
89496#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89497pub struct SecuritiesTransactionPrice2Choice {
89498	#[cfg_attr( feature = "derive_serde", serde(rename = "MntryVal", skip_serializing_if = "Option::is_none") )]
89499	pub mntry_val: Option<AmountAndDirection61>,
89500	#[cfg_attr( feature = "derive_serde", serde(rename = "Pctg", skip_serializing_if = "Option::is_none") )]
89501	pub pctg: Option<f64>,
89502	#[cfg_attr( feature = "derive_serde", serde(rename = "Yld", skip_serializing_if = "Option::is_none") )]
89503	pub yld: Option<f64>,
89504	#[cfg_attr( feature = "derive_serde", serde(rename = "BsisPts", skip_serializing_if = "Option::is_none") )]
89505	pub bsis_pts: Option<f64>,
89506}
89507
89508impl SecuritiesTransactionPrice2Choice {
89509	pub fn validate(&self) -> Result<(), ValidationError> {
89510		if let Some(ref val) = self.mntry_val { val.validate()? }
89511		Ok(())
89512	}
89513}
89514
89515
89516// SecuritiesTransactionPrice4Choice ...
89517#[cfg_attr(feature = "derive_debug", derive(Debug))]
89518#[cfg_attr(feature = "derive_default", derive(Default))]
89519#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89520#[cfg_attr(feature = "derive_clone", derive(Clone))]
89521#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89522pub struct SecuritiesTransactionPrice4Choice {
89523	#[cfg_attr( feature = "derive_serde", serde(rename = "Pric", skip_serializing_if = "Option::is_none") )]
89524	pub pric: Option<SecuritiesTransactionPrice2Choice>,
89525	#[cfg_attr( feature = "derive_serde", serde(rename = "NoPric", skip_serializing_if = "Option::is_none") )]
89526	pub no_pric: Option<SecuritiesTransactionPrice1>,
89527}
89528
89529impl SecuritiesTransactionPrice4Choice {
89530	pub fn validate(&self) -> Result<(), ValidationError> {
89531		if let Some(ref val) = self.pric { val.validate()? }
89532		if let Some(ref val) = self.no_pric { val.validate()? }
89533		Ok(())
89534	}
89535}
89536
89537
89538// SecuritiesTransactionPrice5 ...
89539#[cfg_attr(feature = "derive_debug", derive(Debug))]
89540#[cfg_attr(feature = "derive_default", derive(Default))]
89541#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89542#[cfg_attr(feature = "derive_clone", derive(Clone))]
89543#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89544pub struct SecuritiesTransactionPrice5 {
89545	#[cfg_attr( feature = "derive_serde", serde(rename = "Val", skip_serializing_if = "Option::is_none") )]
89546	pub val: Option<f64>,
89547	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
89548	pub tp: Option<String>,
89549}
89550
89551impl SecuritiesTransactionPrice5 {
89552	pub fn validate(&self) -> Result<(), ValidationError> {
89553		if let Some(ref val) = self.tp {
89554			if val.chars().count() < 1 {
89555				return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
89556			}
89557			if val.chars().count() > 35 {
89558				return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
89559			}
89560		}
89561		Ok(())
89562	}
89563}
89564
89565
89566// SecuritiesTransactionPrice6 ...
89567#[cfg_attr(feature = "derive_debug", derive(Debug))]
89568#[cfg_attr(feature = "derive_default", derive(Default))]
89569#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89570#[cfg_attr(feature = "derive_clone", derive(Clone))]
89571#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89572pub struct SecuritiesTransactionPrice6 {
89573	#[cfg_attr( feature = "derive_serde", serde(rename = "Pdg") )]
89574	pub pdg: PriceStatus1Code,
89575	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
89576	pub ccy: Option<String>,
89577	#[cfg_attr( feature = "derive_serde", serde(rename = "DgtlTkn", skip_serializing_if = "Option::is_none") )]
89578	pub dgtl_tkn: Option<Vec<DigitalTokenAmount2>>,
89579}
89580
89581impl SecuritiesTransactionPrice6 {
89582	pub fn validate(&self) -> Result<(), ValidationError> {
89583		self.pdg.validate()?;
89584		if let Some(ref val) = self.ccy {
89585			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
89586			if !pattern.is_match(val) {
89587				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
89588			}
89589		}
89590		if let Some(ref vec) = self.dgtl_tkn { for item in vec { item.validate()? } }
89591		Ok(())
89592	}
89593}
89594
89595
89596// SecuritiesTransactionPrice7 ...
89597#[cfg_attr(feature = "derive_debug", derive(Debug))]
89598#[cfg_attr(feature = "derive_default", derive(Default))]
89599#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89600#[cfg_attr(feature = "derive_clone", derive(Clone))]
89601#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89602pub struct SecuritiesTransactionPrice7 {
89603	#[cfg_attr( feature = "derive_serde", serde(rename = "MntryVal") )]
89604	pub mntry_val: AmountAndDirection61,
89605	#[cfg_attr( feature = "derive_serde", serde(rename = "DgtlTknQty") )]
89606	pub dgtl_tkn_qty: DigitalTokenAmount2,
89607}
89608
89609impl SecuritiesTransactionPrice7 {
89610	pub fn validate(&self) -> Result<(), ValidationError> {
89611		self.mntry_val.validate()?;
89612		self.dgtl_tkn_qty.validate()?;
89613		Ok(())
89614	}
89615}
89616
89617
89618// SecuritiesTransactionReferences1 ...
89619#[cfg_attr(feature = "derive_debug", derive(Debug))]
89620#[cfg_attr(feature = "derive_default", derive(Default))]
89621#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89622#[cfg_attr(feature = "derive_clone", derive(Clone))]
89623#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89624pub struct SecuritiesTransactionReferences1 {
89625	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnrTxId", skip_serializing_if = "Option::is_none") )]
89626	pub acct_ownr_tx_id: Option<String>,
89627	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrTxId", skip_serializing_if = "Option::is_none") )]
89628	pub acct_svcr_tx_id: Option<String>,
89629	#[cfg_attr( feature = "derive_serde", serde(rename = "MktInfrstrctrTxId", skip_serializing_if = "Option::is_none") )]
89630	pub mkt_infrstrctr_tx_id: Option<String>,
89631	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgId", skip_serializing_if = "Option::is_none") )]
89632	pub prcg_id: Option<String>,
89633}
89634
89635impl SecuritiesTransactionReferences1 {
89636	pub fn validate(&self) -> Result<(), ValidationError> {
89637		if let Some(ref val) = self.acct_ownr_tx_id {
89638			if val.chars().count() < 1 {
89639				return Err(ValidationError::new(1001, "acct_ownr_tx_id is shorter than the minimum length of 1".to_string()));
89640			}
89641			if val.chars().count() > 35 {
89642				return Err(ValidationError::new(1002, "acct_ownr_tx_id exceeds the maximum length of 35".to_string()));
89643			}
89644		}
89645		if let Some(ref val) = self.acct_svcr_tx_id {
89646			if val.chars().count() < 1 {
89647				return Err(ValidationError::new(1001, "acct_svcr_tx_id is shorter than the minimum length of 1".to_string()));
89648			}
89649			if val.chars().count() > 35 {
89650				return Err(ValidationError::new(1002, "acct_svcr_tx_id exceeds the maximum length of 35".to_string()));
89651			}
89652		}
89653		if let Some(ref val) = self.mkt_infrstrctr_tx_id {
89654			if val.chars().count() < 1 {
89655				return Err(ValidationError::new(1001, "mkt_infrstrctr_tx_id is shorter than the minimum length of 1".to_string()));
89656			}
89657			if val.chars().count() > 35 {
89658				return Err(ValidationError::new(1002, "mkt_infrstrctr_tx_id exceeds the maximum length of 35".to_string()));
89659			}
89660		}
89661		if let Some(ref val) = self.prcg_id {
89662			if val.chars().count() < 1 {
89663				return Err(ValidationError::new(1001, "prcg_id is shorter than the minimum length of 1".to_string()));
89664			}
89665			if val.chars().count() > 35 {
89666				return Err(ValidationError::new(1002, "prcg_id exceeds the maximum length of 35".to_string()));
89667			}
89668		}
89669		Ok(())
89670	}
89671}
89672
89673
89674// SecuritiesTransactionReport2 ...
89675#[cfg_attr(feature = "derive_debug", derive(Debug))]
89676#[cfg_attr(feature = "derive_default", derive(Default))]
89677#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89678#[cfg_attr(feature = "derive_clone", derive(Clone))]
89679#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89680pub struct SecuritiesTransactionReport2 {
89681	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId") )]
89682	pub tx_id: String,
89683	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctgPty") )]
89684	pub exctg_pty: String,
89685	#[cfg_attr( feature = "derive_serde", serde(rename = "SubmitgPty") )]
89686	pub submitg_pty: String,
89687	#[cfg_attr( feature = "derive_serde", serde(rename = "TechAttrbts", skip_serializing_if = "Option::is_none") )]
89688	pub tech_attrbts: Option<RecordTechnicalData2>,
89689	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
89690	pub splmtry_data: Option<Vec<SupplementaryData1>>,
89691}
89692
89693impl SecuritiesTransactionReport2 {
89694	pub fn validate(&self) -> Result<(), ValidationError> {
89695		if self.tx_id.chars().count() < 1 {
89696			return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
89697		}
89698		if self.tx_id.chars().count() > 52 {
89699			return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 52".to_string()));
89700		}
89701		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
89702		if !pattern.is_match(&self.exctg_pty) {
89703			return Err(ValidationError::new(1005, "exctg_pty does not match the required pattern".to_string()));
89704		}
89705		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
89706		if !pattern.is_match(&self.submitg_pty) {
89707			return Err(ValidationError::new(1005, "submitg_pty does not match the required pattern".to_string()));
89708		}
89709		if let Some(ref val) = self.tech_attrbts { val.validate()? }
89710		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
89711		Ok(())
89712	}
89713}
89714
89715
89716// SecuritiesTransactionReport7 ...
89717#[cfg_attr(feature = "derive_debug", derive(Debug))]
89718#[cfg_attr(feature = "derive_default", derive(Default))]
89719#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89720#[cfg_attr(feature = "derive_clone", derive(Clone))]
89721#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89722pub struct SecuritiesTransactionReport7 {
89723	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId") )]
89724	pub tx_id: String,
89725	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctgPty") )]
89726	pub exctg_pty: String,
89727	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtPtyInd") )]
89728	pub invstmt_pty_ind: bool,
89729	#[cfg_attr( feature = "derive_serde", serde(rename = "SubmitgPty") )]
89730	pub submitg_pty: String,
89731	#[cfg_attr( feature = "derive_serde", serde(rename = "Buyr") )]
89732	pub buyr: PartyIdentification79,
89733	#[cfg_attr( feature = "derive_serde", serde(rename = "Sellr") )]
89734	pub sellr: PartyIdentification79,
89735	#[cfg_attr( feature = "derive_serde", serde(rename = "OrdrTrnsmssn") )]
89736	pub ordr_trnsmssn: SecuritiesTransactionTransmission2,
89737	#[cfg_attr( feature = "derive_serde", serde(rename = "Tx") )]
89738	pub tx: SecuritiesTransaction3,
89739	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrm") )]
89740	pub fin_instrm: FinancialInstrumentAttributes5Choice,
89741	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstmtDcsnPrsn", skip_serializing_if = "Option::is_none") )]
89742	pub invstmt_dcsn_prsn: Option<InvestmentParty1Choice>,
89743	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctgPrsn") )]
89744	pub exctg_prsn: ExecutingParty1Choice,
89745	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlAttrbts") )]
89746	pub addtl_attrbts: SecuritiesTransactionIndicator2,
89747	#[cfg_attr( feature = "derive_serde", serde(rename = "TechAttrbts", skip_serializing_if = "Option::is_none") )]
89748	pub tech_attrbts: Option<RecordTechnicalData5>,
89749	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
89750	pub splmtry_data: Option<Vec<SupplementaryData1>>,
89751}
89752
89753impl SecuritiesTransactionReport7 {
89754	pub fn validate(&self) -> Result<(), ValidationError> {
89755		if self.tx_id.chars().count() < 1 {
89756			return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
89757		}
89758		if self.tx_id.chars().count() > 52 {
89759			return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 52".to_string()));
89760		}
89761		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
89762		if !pattern.is_match(&self.exctg_pty) {
89763			return Err(ValidationError::new(1005, "exctg_pty does not match the required pattern".to_string()));
89764		}
89765		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
89766		if !pattern.is_match(&self.submitg_pty) {
89767			return Err(ValidationError::new(1005, "submitg_pty does not match the required pattern".to_string()));
89768		}
89769		self.buyr.validate()?;
89770		self.sellr.validate()?;
89771		self.ordr_trnsmssn.validate()?;
89772		self.tx.validate()?;
89773		self.fin_instrm.validate()?;
89774		if let Some(ref val) = self.invstmt_dcsn_prsn { val.validate()? }
89775		self.exctg_prsn.validate()?;
89776		self.addtl_attrbts.validate()?;
89777		if let Some(ref val) = self.tech_attrbts { val.validate()? }
89778		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
89779		Ok(())
89780	}
89781}
89782
89783
89784// SecuritiesTransactionTransmission2 ...
89785#[cfg_attr(feature = "derive_debug", derive(Debug))]
89786#[cfg_attr(feature = "derive_default", derive(Default))]
89787#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89788#[cfg_attr(feature = "derive_clone", derive(Clone))]
89789#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89790pub struct SecuritiesTransactionTransmission2 {
89791	#[cfg_attr( feature = "derive_serde", serde(rename = "TrnsmssnInd") )]
89792	pub trnsmssn_ind: bool,
89793	#[cfg_attr( feature = "derive_serde", serde(rename = "TrnsmttgBuyr", skip_serializing_if = "Option::is_none") )]
89794	pub trnsmttg_buyr: Option<String>,
89795	#[cfg_attr( feature = "derive_serde", serde(rename = "TrnsmttgSellr", skip_serializing_if = "Option::is_none") )]
89796	pub trnsmttg_sellr: Option<String>,
89797}
89798
89799impl SecuritiesTransactionTransmission2 {
89800	pub fn validate(&self) -> Result<(), ValidationError> {
89801		if let Some(ref val) = self.trnsmttg_buyr {
89802			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
89803			if !pattern.is_match(val) {
89804				return Err(ValidationError::new(1005, "trnsmttg_buyr does not match the required pattern".to_string()));
89805			}
89806		}
89807		if let Some(ref val) = self.trnsmttg_sellr {
89808			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
89809			if !pattern.is_match(val) {
89810				return Err(ValidationError::new(1005, "trnsmttg_sellr does not match the required pattern".to_string()));
89811			}
89812		}
89813		Ok(())
89814	}
89815}
89816
89817
89818// SecuritiesTransactionType11Code ...
89819#[cfg_attr(feature = "derive_debug", derive(Debug))]
89820#[cfg_attr(feature = "derive_default", derive(Default))]
89821#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89822#[cfg_attr(feature = "derive_clone", derive(Clone))]
89823#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89824pub enum SecuritiesTransactionType11Code {
89825	#[cfg_attr(feature = "derive_default", default)]
89826	#[cfg_attr( feature = "derive_serde", serde(rename = "NSYN") )]
89827	CodeNSYN,
89828	#[cfg_attr( feature = "derive_serde", serde(rename = "SYND") )]
89829	CodeSYND,
89830}
89831
89832impl SecuritiesTransactionType11Code {
89833	pub fn validate(&self) -> Result<(), ValidationError> {
89834		Ok(())
89835	}
89836}
89837
89838
89839// SecuritiesTransactionType15Code ...
89840#[cfg_attr(feature = "derive_debug", derive(Debug))]
89841#[cfg_attr(feature = "derive_default", derive(Default))]
89842#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89843#[cfg_attr(feature = "derive_clone", derive(Clone))]
89844#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89845pub enum SecuritiesTransactionType15Code {
89846	#[cfg_attr(feature = "derive_default", default)]
89847	#[cfg_attr( feature = "derive_serde", serde(rename = "BUYI") )]
89848	CodeBUYI,
89849	#[cfg_attr( feature = "derive_serde", serde(rename = "SELL") )]
89850	CodeSELL,
89851}
89852
89853impl SecuritiesTransactionType15Code {
89854	pub fn validate(&self) -> Result<(), ValidationError> {
89855		Ok(())
89856	}
89857}
89858
89859
89860// SecuritiesTransactionType31Choice ...
89861#[cfg_attr(feature = "derive_debug", derive(Debug))]
89862#[cfg_attr(feature = "derive_default", derive(Default))]
89863#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89864#[cfg_attr(feature = "derive_clone", derive(Clone))]
89865#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89866pub struct SecuritiesTransactionType31Choice {
89867	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
89868	pub cd: Option<SecuritiesTransactionType11Code>,
89869	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
89870	pub prtry: Option<GenericIdentification30>,
89871}
89872
89873impl SecuritiesTransactionType31Choice {
89874	pub fn validate(&self) -> Result<(), ValidationError> {
89875		if let Some(ref val) = self.cd { val.validate()? }
89876		if let Some(ref val) = self.prtry { val.validate()? }
89877		Ok(())
89878	}
89879}
89880
89881
89882// SecuritiesUpdateReason1Choice ...
89883#[cfg_attr(feature = "derive_debug", derive(Debug))]
89884#[cfg_attr(feature = "derive_default", derive(Default))]
89885#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89886#[cfg_attr(feature = "derive_clone", derive(Clone))]
89887#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89888pub struct SecuritiesUpdateReason1Choice {
89889	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
89890	pub cd: Option<String>,
89891	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
89892	pub prtry: Option<GenericIdentification30>,
89893}
89894
89895impl SecuritiesUpdateReason1Choice {
89896	pub fn validate(&self) -> Result<(), ValidationError> {
89897		if let Some(ref val) = self.cd {
89898			if val.chars().count() < 1 {
89899				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
89900			}
89901			if val.chars().count() > 4 {
89902				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
89903			}
89904		}
89905		if let Some(ref val) = self.prtry { val.validate()? }
89906		Ok(())
89907	}
89908}
89909
89910
89911// Security48 ...
89912#[cfg_attr(feature = "derive_debug", derive(Debug))]
89913#[cfg_attr(feature = "derive_default", derive(Default))]
89914#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89915#[cfg_attr(feature = "derive_clone", derive(Clone))]
89916#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89917pub struct Security48 {
89918	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
89919	pub id: Option<CompareISINIdentifier4>,
89920	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnTp", skip_serializing_if = "Option::is_none") )]
89921	pub clssfctn_tp: Option<CompareCFIIdentifier3>,
89922	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty", skip_serializing_if = "Option::is_none") )]
89923	pub qty: Option<CompareDecimalNumber3>,
89924	#[cfg_attr( feature = "derive_serde", serde(rename = "NmnlVal", skip_serializing_if = "Option::is_none") )]
89925	pub nmnl_val: Option<CompareAmountAndDirection2>,
89926	#[cfg_attr( feature = "derive_serde", serde(rename = "Qlty", skip_serializing_if = "Option::is_none") )]
89927	pub qlty: Option<CompareCollateralQualityType3>,
89928	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtrty", skip_serializing_if = "Option::is_none") )]
89929	pub mtrty: Option<CompareDate3>,
89930	#[cfg_attr( feature = "derive_serde", serde(rename = "IssrId", skip_serializing_if = "Option::is_none") )]
89931	pub issr_id: Option<CompareOrganisationIdentification6>,
89932	#[cfg_attr( feature = "derive_serde", serde(rename = "IssrCtry", skip_serializing_if = "Option::is_none") )]
89933	pub issr_ctry: Option<CompareCountryCode3>,
89934	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
89935	pub tp: Option<Vec<CompareSecuritiesLendingType3>>,
89936	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitPric", skip_serializing_if = "Option::is_none") )]
89937	pub unit_pric: Option<CompareUnitPrice6>,
89938	#[cfg_attr( feature = "derive_serde", serde(rename = "ExclsvArrgmnt", skip_serializing_if = "Option::is_none") )]
89939	pub exclsv_arrgmnt: Option<CompareTrueFalseIndicator3>,
89940	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal", skip_serializing_if = "Option::is_none") )]
89941	pub mkt_val: Option<CompareAmountAndDirection2>,
89942	#[cfg_attr( feature = "derive_serde", serde(rename = "AvlblForCollReuse", skip_serializing_if = "Option::is_none") )]
89943	pub avlbl_for_coll_reuse: Option<CompareTrueFalseIndicator3>,
89944	#[cfg_attr( feature = "derive_serde", serde(rename = "HrcutOrMrgn", skip_serializing_if = "Option::is_none") )]
89945	pub hrcut_or_mrgn: Option<ComparePercentageRate3>,
89946}
89947
89948impl Security48 {
89949	pub fn validate(&self) -> Result<(), ValidationError> {
89950		if let Some(ref val) = self.id { val.validate()? }
89951		if let Some(ref val) = self.clssfctn_tp { val.validate()? }
89952		if let Some(ref val) = self.qty { val.validate()? }
89953		if let Some(ref val) = self.nmnl_val { val.validate()? }
89954		if let Some(ref val) = self.qlty { val.validate()? }
89955		if let Some(ref val) = self.mtrty { val.validate()? }
89956		if let Some(ref val) = self.issr_id { val.validate()? }
89957		if let Some(ref val) = self.issr_ctry { val.validate()? }
89958		if let Some(ref vec) = self.tp { for item in vec { item.validate()? } }
89959		if let Some(ref val) = self.unit_pric { val.validate()? }
89960		if let Some(ref val) = self.exclsv_arrgmnt { val.validate()? }
89961		if let Some(ref val) = self.mkt_val { val.validate()? }
89962		if let Some(ref val) = self.avlbl_for_coll_reuse { val.validate()? }
89963		if let Some(ref val) = self.hrcut_or_mrgn { val.validate()? }
89964		Ok(())
89965	}
89966}
89967
89968
89969// Security49 ...
89970#[cfg_attr(feature = "derive_debug", derive(Debug))]
89971#[cfg_attr(feature = "derive_default", derive(Default))]
89972#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
89973#[cfg_attr(feature = "derive_clone", derive(Clone))]
89974#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
89975pub struct Security49 {
89976	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
89977	pub id: Option<String>,
89978	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnTp", skip_serializing_if = "Option::is_none") )]
89979	pub clssfctn_tp: Option<String>,
89980	#[cfg_attr( feature = "derive_serde", serde(rename = "QtyOrNmnlVal", skip_serializing_if = "Option::is_none") )]
89981	pub qty_or_nmnl_val: Option<QuantityNominalValue2Choice>,
89982	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitPric", skip_serializing_if = "Option::is_none") )]
89983	pub unit_pric: Option<SecuritiesTransactionPrice19Choice>,
89984	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal", skip_serializing_if = "Option::is_none") )]
89985	pub mkt_val: Option<AmountAndDirection53>,
89986	#[cfg_attr( feature = "derive_serde", serde(rename = "Qlty", skip_serializing_if = "Option::is_none") )]
89987	pub qlty: Option<CollateralQualityType1Code>,
89988	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtrty", skip_serializing_if = "Option::is_none") )]
89989	pub mtrty: Option<String>,
89990	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
89991	pub issr: Option<SecurityIssuer4>,
89992	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
89993	pub tp: Option<Vec<SecuritiesLendingType3Choice>>,
89994	#[cfg_attr( feature = "derive_serde", serde(rename = "ExclsvArrgmnt", skip_serializing_if = "Option::is_none") )]
89995	pub exclsv_arrgmnt: Option<bool>,
89996}
89997
89998impl Security49 {
89999	pub fn validate(&self) -> Result<(), ValidationError> {
90000		if let Some(ref val) = self.id {
90001			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
90002			if !pattern.is_match(val) {
90003				return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
90004			}
90005		}
90006		if let Some(ref val) = self.clssfctn_tp {
90007			let pattern = Regex::new("[A-Z]{6,6}").unwrap();
90008			if !pattern.is_match(val) {
90009				return Err(ValidationError::new(1005, "clssfctn_tp does not match the required pattern".to_string()));
90010			}
90011		}
90012		if let Some(ref val) = self.qty_or_nmnl_val { val.validate()? }
90013		if let Some(ref val) = self.unit_pric { val.validate()? }
90014		if let Some(ref val) = self.mkt_val { val.validate()? }
90015		if let Some(ref val) = self.qlty { val.validate()? }
90016		if let Some(ref val) = self.issr { val.validate()? }
90017		if let Some(ref vec) = self.tp { for item in vec { item.validate()? } }
90018		Ok(())
90019	}
90020}
90021
90022
90023// Security51 ...
90024#[cfg_attr(feature = "derive_debug", derive(Debug))]
90025#[cfg_attr(feature = "derive_default", derive(Default))]
90026#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90027#[cfg_attr(feature = "derive_clone", derive(Clone))]
90028#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90029pub struct Security51 {
90030	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
90031	pub id: Option<String>,
90032	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnTp", skip_serializing_if = "Option::is_none") )]
90033	pub clssfctn_tp: Option<String>,
90034	#[cfg_attr( feature = "derive_serde", serde(rename = "QtyOrNmnlVal", skip_serializing_if = "Option::is_none") )]
90035	pub qty_or_nmnl_val: Option<QuantityNominalValue2Choice>,
90036	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitPric", skip_serializing_if = "Option::is_none") )]
90037	pub unit_pric: Option<SecuritiesTransactionPrice19Choice>,
90038	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal", skip_serializing_if = "Option::is_none") )]
90039	pub mkt_val: Option<AmountAndDirection53>,
90040	#[cfg_attr( feature = "derive_serde", serde(rename = "Qlty", skip_serializing_if = "Option::is_none") )]
90041	pub qlty: Option<CollateralQualityType1Code>,
90042	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtrty", skip_serializing_if = "Option::is_none") )]
90043	pub mtrty: Option<String>,
90044	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
90045	pub issr: Option<SecurityIssuer4>,
90046	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
90047	pub tp: Option<Vec<SecuritiesLendingType3Choice>>,
90048	#[cfg_attr( feature = "derive_serde", serde(rename = "ExclsvArrgmnt", skip_serializing_if = "Option::is_none") )]
90049	pub exclsv_arrgmnt: Option<bool>,
90050	#[cfg_attr( feature = "derive_serde", serde(rename = "AvlblForCollReuse", skip_serializing_if = "Option::is_none") )]
90051	pub avlbl_for_coll_reuse: Option<bool>,
90052}
90053
90054impl Security51 {
90055	pub fn validate(&self) -> Result<(), ValidationError> {
90056		if let Some(ref val) = self.id {
90057			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
90058			if !pattern.is_match(val) {
90059				return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
90060			}
90061		}
90062		if let Some(ref val) = self.clssfctn_tp {
90063			let pattern = Regex::new("[A-Z]{6,6}").unwrap();
90064			if !pattern.is_match(val) {
90065				return Err(ValidationError::new(1005, "clssfctn_tp does not match the required pattern".to_string()));
90066			}
90067		}
90068		if let Some(ref val) = self.qty_or_nmnl_val { val.validate()? }
90069		if let Some(ref val) = self.unit_pric { val.validate()? }
90070		if let Some(ref val) = self.mkt_val { val.validate()? }
90071		if let Some(ref val) = self.qlty { val.validate()? }
90072		if let Some(ref val) = self.issr { val.validate()? }
90073		if let Some(ref vec) = self.tp { for item in vec { item.validate()? } }
90074		Ok(())
90075	}
90076}
90077
90078
90079// Security52 ...
90080#[cfg_attr(feature = "derive_debug", derive(Debug))]
90081#[cfg_attr(feature = "derive_default", derive(Default))]
90082#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90083#[cfg_attr(feature = "derive_clone", derive(Clone))]
90084#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90085pub struct Security52 {
90086	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
90087	pub id: Option<String>,
90088	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnTp", skip_serializing_if = "Option::is_none") )]
90089	pub clssfctn_tp: Option<String>,
90090	#[cfg_attr( feature = "derive_serde", serde(rename = "QtyOrNmnlVal", skip_serializing_if = "Option::is_none") )]
90091	pub qty_or_nmnl_val: Option<QuantityNominalValue2Choice>,
90092	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitPric", skip_serializing_if = "Option::is_none") )]
90093	pub unit_pric: Option<SecuritiesTransactionPrice19Choice>,
90094	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal", skip_serializing_if = "Option::is_none") )]
90095	pub mkt_val: Option<AmountAndDirection53>,
90096	#[cfg_attr( feature = "derive_serde", serde(rename = "Qlty", skip_serializing_if = "Option::is_none") )]
90097	pub qlty: Option<CollateralQualityType1Code>,
90098	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtrty", skip_serializing_if = "Option::is_none") )]
90099	pub mtrty: Option<String>,
90100	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
90101	pub issr: Option<SecurityIssuer4>,
90102	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
90103	pub tp: Option<Vec<SecuritiesLendingType3Choice>>,
90104	#[cfg_attr( feature = "derive_serde", serde(rename = "ExclsvArrgmnt", skip_serializing_if = "Option::is_none") )]
90105	pub exclsv_arrgmnt: Option<bool>,
90106	#[cfg_attr( feature = "derive_serde", serde(rename = "HrcutOrMrgn", skip_serializing_if = "Option::is_none") )]
90107	pub hrcut_or_mrgn: Option<f64>,
90108	#[cfg_attr( feature = "derive_serde", serde(rename = "AvlblForCollReuse", skip_serializing_if = "Option::is_none") )]
90109	pub avlbl_for_coll_reuse: Option<bool>,
90110}
90111
90112impl Security52 {
90113	pub fn validate(&self) -> Result<(), ValidationError> {
90114		if let Some(ref val) = self.id {
90115			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
90116			if !pattern.is_match(val) {
90117				return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
90118			}
90119		}
90120		if let Some(ref val) = self.clssfctn_tp {
90121			let pattern = Regex::new("[A-Z]{6,6}").unwrap();
90122			if !pattern.is_match(val) {
90123				return Err(ValidationError::new(1005, "clssfctn_tp does not match the required pattern".to_string()));
90124			}
90125		}
90126		if let Some(ref val) = self.qty_or_nmnl_val { val.validate()? }
90127		if let Some(ref val) = self.unit_pric { val.validate()? }
90128		if let Some(ref val) = self.mkt_val { val.validate()? }
90129		if let Some(ref val) = self.qlty { val.validate()? }
90130		if let Some(ref val) = self.issr { val.validate()? }
90131		if let Some(ref vec) = self.tp { for item in vec { item.validate()? } }
90132		Ok(())
90133	}
90134}
90135
90136
90137// Security55 ...
90138#[cfg_attr(feature = "derive_debug", derive(Debug))]
90139#[cfg_attr(feature = "derive_default", derive(Default))]
90140#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90141#[cfg_attr(feature = "derive_clone", derive(Clone))]
90142#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90143pub struct Security55 {
90144	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
90145	pub id: Option<String>,
90146	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnTp", skip_serializing_if = "Option::is_none") )]
90147	pub clssfctn_tp: Option<String>,
90148	#[cfg_attr( feature = "derive_serde", serde(rename = "QtyOrNmnlVal", skip_serializing_if = "Option::is_none") )]
90149	pub qty_or_nmnl_val: Option<QuantityNominalValue2Choice>,
90150	#[cfg_attr( feature = "derive_serde", serde(rename = "UnitPric", skip_serializing_if = "Option::is_none") )]
90151	pub unit_pric: Option<SecuritiesTransactionPrice19Choice>,
90152	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal", skip_serializing_if = "Option::is_none") )]
90153	pub mkt_val: Option<AmountAndDirection53>,
90154	#[cfg_attr( feature = "derive_serde", serde(rename = "Qlty", skip_serializing_if = "Option::is_none") )]
90155	pub qlty: Option<CollateralQualityType1Code>,
90156	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtrty", skip_serializing_if = "Option::is_none") )]
90157	pub mtrty: Option<String>,
90158	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
90159	pub issr: Option<SecurityIssuer4>,
90160	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
90161	pub tp: Option<Vec<SecuritiesLendingType3Choice>>,
90162	#[cfg_attr( feature = "derive_serde", serde(rename = "ExclsvArrgmnt", skip_serializing_if = "Option::is_none") )]
90163	pub exclsv_arrgmnt: Option<bool>,
90164	#[cfg_attr( feature = "derive_serde", serde(rename = "AvlblForCollReuse", skip_serializing_if = "Option::is_none") )]
90165	pub avlbl_for_coll_reuse: Option<bool>,
90166	#[cfg_attr( feature = "derive_serde", serde(rename = "HrcutOrMrgn", skip_serializing_if = "Option::is_none") )]
90167	pub hrcut_or_mrgn: Option<f64>,
90168}
90169
90170impl Security55 {
90171	pub fn validate(&self) -> Result<(), ValidationError> {
90172		if let Some(ref val) = self.id {
90173			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
90174			if !pattern.is_match(val) {
90175				return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
90176			}
90177		}
90178		if let Some(ref val) = self.clssfctn_tp {
90179			let pattern = Regex::new("[A-Z]{6,6}").unwrap();
90180			if !pattern.is_match(val) {
90181				return Err(ValidationError::new(1005, "clssfctn_tp does not match the required pattern".to_string()));
90182			}
90183		}
90184		if let Some(ref val) = self.qty_or_nmnl_val { val.validate()? }
90185		if let Some(ref val) = self.unit_pric { val.validate()? }
90186		if let Some(ref val) = self.mkt_val { val.validate()? }
90187		if let Some(ref val) = self.qlty { val.validate()? }
90188		if let Some(ref val) = self.issr { val.validate()? }
90189		if let Some(ref vec) = self.tp { for item in vec { item.validate()? } }
90190		Ok(())
90191	}
90192}
90193
90194
90195// SecurityAttributes10 ...
90196#[cfg_attr(feature = "derive_debug", derive(Debug))]
90197#[cfg_attr(feature = "derive_default", derive(Default))]
90198#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90199#[cfg_attr(feature = "derive_clone", derive(Clone))]
90200#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90201pub struct SecurityAttributes10 {
90202	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId") )]
90203	pub fin_instrm_id: SecurityIdentification39,
90204	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmTp", skip_serializing_if = "Option::is_none") )]
90205	pub fin_instrm_tp: Option<Vec<FinancialInstrument97>>,
90206	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmAttrbts", skip_serializing_if = "Option::is_none") )]
90207	pub fin_instrm_attrbts: Option<Vec<CommonFinancialInstrumentAttributes10>>,
90208}
90209
90210impl SecurityAttributes10 {
90211	pub fn validate(&self) -> Result<(), ValidationError> {
90212		self.fin_instrm_id.validate()?;
90213		if let Some(ref vec) = self.fin_instrm_tp { for item in vec { item.validate()? } }
90214		if let Some(ref vec) = self.fin_instrm_attrbts { for item in vec { item.validate()? } }
90215		Ok(())
90216	}
90217}
90218
90219
90220// SecurityAttributes11 ...
90221#[cfg_attr(feature = "derive_debug", derive(Debug))]
90222#[cfg_attr(feature = "derive_default", derive(Default))]
90223#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90224#[cfg_attr(feature = "derive_clone", derive(Clone))]
90225#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90226pub struct SecurityAttributes11 {
90227	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId", skip_serializing_if = "Option::is_none") )]
90228	pub fin_instrm_id: Option<Vec<SecurityIdentification39>>,
90229	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmTp", skip_serializing_if = "Option::is_none") )]
90230	pub fin_instrm_tp: Option<FinancialInstrument97>,
90231	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmAttrbts", skip_serializing_if = "Option::is_none") )]
90232	pub fin_instrm_attrbts: Option<Vec<CommonFinancialInstrumentAttributes11>>,
90233}
90234
90235impl SecurityAttributes11 {
90236	pub fn validate(&self) -> Result<(), ValidationError> {
90237		if let Some(ref vec) = self.fin_instrm_id { for item in vec { item.validate()? } }
90238		if let Some(ref val) = self.fin_instrm_tp { val.validate()? }
90239		if let Some(ref vec) = self.fin_instrm_attrbts { for item in vec { item.validate()? } }
90240		Ok(())
90241	}
90242}
90243
90244
90245// SecurityAttributes12 ...
90246#[cfg_attr(feature = "derive_debug", derive(Debug))]
90247#[cfg_attr(feature = "derive_default", derive(Default))]
90248#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90249#[cfg_attr(feature = "derive_clone", derive(Clone))]
90250#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90251pub struct SecurityAttributes12 {
90252	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmTp", skip_serializing_if = "Option::is_none") )]
90253	pub fin_instrm_tp: Option<Vec<FinancialInstrument97>>,
90254	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmAttrbts", skip_serializing_if = "Option::is_none") )]
90255	pub fin_instrm_attrbts: Option<Vec<CommonFinancialInstrumentAttributes12>>,
90256	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
90257	pub splmtry_data: Option<Vec<SupplementaryData1>>,
90258}
90259
90260impl SecurityAttributes12 {
90261	pub fn validate(&self) -> Result<(), ValidationError> {
90262		if let Some(ref vec) = self.fin_instrm_tp { for item in vec { item.validate()? } }
90263		if let Some(ref vec) = self.fin_instrm_attrbts { for item in vec { item.validate()? } }
90264		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
90265		Ok(())
90266	}
90267}
90268
90269
90270// SecurityCSDLink7 ...
90271#[cfg_attr(feature = "derive_debug", derive(Debug))]
90272#[cfg_attr(feature = "derive_default", derive(Default))]
90273#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90274#[cfg_attr(feature = "derive_clone", derive(Clone))]
90275#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90276pub struct SecurityCSDLink7 {
90277	#[cfg_attr( feature = "derive_serde", serde(rename = "VldFr") )]
90278	pub vld_fr: DateAndDateTime2Choice,
90279	#[cfg_attr( feature = "derive_serde", serde(rename = "VldTo", skip_serializing_if = "Option::is_none") )]
90280	pub vld_to: Option<DateAndDateTime2Choice>,
90281	#[cfg_attr( feature = "derive_serde", serde(rename = "SctyMntnc", skip_serializing_if = "Option::is_none") )]
90282	pub scty_mntnc: Option<bool>,
90283	#[cfg_attr( feature = "derive_serde", serde(rename = "IssrCSD", skip_serializing_if = "Option::is_none") )]
90284	pub issr_csd: Option<SystemPartyIdentification2Choice>,
90285	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrCSD", skip_serializing_if = "Option::is_none") )]
90286	pub invstr_csd: Option<SystemPartyIdentification2Choice>,
90287	#[cfg_attr( feature = "derive_serde", serde(rename = "TechIssrCSD", skip_serializing_if = "Option::is_none") )]
90288	pub tech_issr_csd: Option<SystemPartyIdentification2Choice>,
90289	#[cfg_attr( feature = "derive_serde", serde(rename = "IssncAcct", skip_serializing_if = "Option::is_none") )]
90290	pub issnc_acct: Option<Vec<IssuanceAccount2>>,
90291}
90292
90293impl SecurityCSDLink7 {
90294	pub fn validate(&self) -> Result<(), ValidationError> {
90295		self.vld_fr.validate()?;
90296		if let Some(ref val) = self.vld_to { val.validate()? }
90297		if let Some(ref val) = self.issr_csd { val.validate()? }
90298		if let Some(ref val) = self.invstr_csd { val.validate()? }
90299		if let Some(ref val) = self.tech_issr_csd { val.validate()? }
90300		if let Some(ref vec) = self.issnc_acct { for item in vec { item.validate()? } }
90301		Ok(())
90302	}
90303}
90304
90305
90306// SecurityClassificationType2Choice ...
90307#[cfg_attr(feature = "derive_debug", derive(Debug))]
90308#[cfg_attr(feature = "derive_default", derive(Default))]
90309#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90310#[cfg_attr(feature = "derive_clone", derive(Clone))]
90311#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90312pub struct SecurityClassificationType2Choice {
90313	#[cfg_attr( feature = "derive_serde", serde(rename = "CFI", skip_serializing_if = "Option::is_none") )]
90314	pub cfi: Option<String>,
90315	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrnClssfctn", skip_serializing_if = "Option::is_none") )]
90316	pub altrn_clssfctn: Option<GenericIdentification3>,
90317}
90318
90319impl SecurityClassificationType2Choice {
90320	pub fn validate(&self) -> Result<(), ValidationError> {
90321		if let Some(ref val) = self.cfi {
90322			let pattern = Regex::new("[A-Z]{6,6}").unwrap();
90323			if !pattern.is_match(val) {
90324				return Err(ValidationError::new(1005, "cfi does not match the required pattern".to_string()));
90325			}
90326		}
90327		if let Some(ref val) = self.altrn_clssfctn { val.validate()? }
90328		Ok(())
90329	}
90330}
90331
90332
90333// SecurityCommodity7Choice ...
90334#[cfg_attr(feature = "derive_debug", derive(Debug))]
90335#[cfg_attr(feature = "derive_default", derive(Default))]
90336#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90337#[cfg_attr(feature = "derive_clone", derive(Clone))]
90338#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90339pub struct SecurityCommodity7Choice {
90340	#[cfg_attr( feature = "derive_serde", serde(rename = "Scty", skip_serializing_if = "Option::is_none") )]
90341	pub scty: Option<Vec<Security48>>,
90342	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmmdty", skip_serializing_if = "Option::is_none") )]
90343	pub cmmdty: Option<Vec<Commodity42>>,
90344}
90345
90346impl SecurityCommodity7Choice {
90347	pub fn validate(&self) -> Result<(), ValidationError> {
90348		if let Some(ref vec) = self.scty { for item in vec { item.validate()? } }
90349		if let Some(ref vec) = self.cmmdty { for item in vec { item.validate()? } }
90350		Ok(())
90351	}
90352}
90353
90354
90355// SecurityCommodity9 ...
90356#[cfg_attr(feature = "derive_debug", derive(Debug))]
90357#[cfg_attr(feature = "derive_default", derive(Default))]
90358#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90359#[cfg_attr(feature = "derive_clone", derive(Clone))]
90360#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90361pub struct SecurityCommodity9 {
90362	#[cfg_attr( feature = "derive_serde", serde(rename = "Scty", skip_serializing_if = "Option::is_none") )]
90363	pub scty: Option<Vec<Security51>>,
90364	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmmdty", skip_serializing_if = "Option::is_none") )]
90365	pub cmmdty: Option<Vec<Commodity43>>,
90366}
90367
90368impl SecurityCommodity9 {
90369	pub fn validate(&self) -> Result<(), ValidationError> {
90370		if let Some(ref vec) = self.scty { for item in vec { item.validate()? } }
90371		if let Some(ref vec) = self.cmmdty { for item in vec { item.validate()? } }
90372		Ok(())
90373	}
90374}
90375
90376
90377// SecurityCommodityCash4 ...
90378#[cfg_attr(feature = "derive_debug", derive(Debug))]
90379#[cfg_attr(feature = "derive_default", derive(Default))]
90380#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90381#[cfg_attr(feature = "derive_clone", derive(Clone))]
90382#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90383pub struct SecurityCommodityCash4 {
90384	#[cfg_attr( feature = "derive_serde", serde(rename = "Scty", skip_serializing_if = "Option::is_none") )]
90385	pub scty: Option<Vec<Security48>>,
90386	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmmdty", skip_serializing_if = "Option::is_none") )]
90387	pub cmmdty: Option<Vec<Commodity42>>,
90388	#[cfg_attr( feature = "derive_serde", serde(rename = "Csh", skip_serializing_if = "Option::is_none") )]
90389	pub csh: Option<Vec<CashCompare3>>,
90390}
90391
90392impl SecurityCommodityCash4 {
90393	pub fn validate(&self) -> Result<(), ValidationError> {
90394		if let Some(ref vec) = self.scty { for item in vec { item.validate()? } }
90395		if let Some(ref vec) = self.cmmdty { for item in vec { item.validate()? } }
90396		if let Some(ref vec) = self.csh { for item in vec { item.validate()? } }
90397		Ok(())
90398	}
90399}
90400
90401
90402// SecurityIdentification19 ...
90403#[cfg_attr(feature = "derive_debug", derive(Debug))]
90404#[cfg_attr(feature = "derive_default", derive(Default))]
90405#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90406#[cfg_attr(feature = "derive_clone", derive(Clone))]
90407#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90408pub struct SecurityIdentification19 {
90409	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
90410	pub isin: Option<String>,
90411	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrId", skip_serializing_if = "Option::is_none") )]
90412	pub othr_id: Option<Vec<OtherIdentification1>>,
90413	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
90414	pub desc: Option<String>,
90415}
90416
90417impl SecurityIdentification19 {
90418	pub fn validate(&self) -> Result<(), ValidationError> {
90419		if let Some(ref val) = self.isin {
90420			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
90421			if !pattern.is_match(val) {
90422				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
90423			}
90424		}
90425		if let Some(ref vec) = self.othr_id { for item in vec { item.validate()? } }
90426		if let Some(ref val) = self.desc {
90427			if val.chars().count() < 1 {
90428				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
90429			}
90430			if val.chars().count() > 140 {
90431				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 140".to_string()));
90432			}
90433		}
90434		Ok(())
90435	}
90436}
90437
90438
90439// SecurityIdentification20Choice ...
90440#[cfg_attr(feature = "derive_debug", derive(Debug))]
90441#[cfg_attr(feature = "derive_default", derive(Default))]
90442#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90443#[cfg_attr(feature = "derive_clone", derive(Clone))]
90444#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90445pub struct SecurityIdentification20Choice {
90446	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
90447	pub isin: Option<String>,
90448	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
90449	pub nm: Option<String>,
90450}
90451
90452impl SecurityIdentification20Choice {
90453	pub fn validate(&self) -> Result<(), ValidationError> {
90454		if let Some(ref val) = self.isin {
90455			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
90456			if !pattern.is_match(val) {
90457				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
90458			}
90459		}
90460		if let Some(ref val) = self.nm {
90461			if val.chars().count() < 1 {
90462				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
90463			}
90464			if val.chars().count() > 25 {
90465				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 25".to_string()));
90466			}
90467		}
90468		Ok(())
90469	}
90470}
90471
90472
90473// SecurityIdentification25Choice ...
90474#[cfg_attr(feature = "derive_debug", derive(Debug))]
90475#[cfg_attr(feature = "derive_default", derive(Default))]
90476#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90477#[cfg_attr(feature = "derive_clone", derive(Clone))]
90478#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90479pub struct SecurityIdentification25Choice {
90480	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
90481	pub isin: Option<String>,
90482	#[cfg_attr( feature = "derive_serde", serde(rename = "SEDOL", skip_serializing_if = "Option::is_none") )]
90483	pub sedol: Option<String>,
90484	#[cfg_attr( feature = "derive_serde", serde(rename = "CUSIP", skip_serializing_if = "Option::is_none") )]
90485	pub cusip: Option<String>,
90486	#[cfg_attr( feature = "derive_serde", serde(rename = "RIC", skip_serializing_if = "Option::is_none") )]
90487	pub ric: Option<String>,
90488	#[cfg_attr( feature = "derive_serde", serde(rename = "TckrSymb", skip_serializing_if = "Option::is_none") )]
90489	pub tckr_symb: Option<String>,
90490	#[cfg_attr( feature = "derive_serde", serde(rename = "Blmbrg", skip_serializing_if = "Option::is_none") )]
90491	pub blmbrg: Option<String>,
90492	#[cfg_attr( feature = "derive_serde", serde(rename = "CTA", skip_serializing_if = "Option::is_none") )]
90493	pub cta: Option<String>,
90494	#[cfg_attr( feature = "derive_serde", serde(rename = "QUICK", skip_serializing_if = "Option::is_none") )]
90495	pub quick: Option<String>,
90496	#[cfg_attr( feature = "derive_serde", serde(rename = "Wrtppr", skip_serializing_if = "Option::is_none") )]
90497	pub wrtppr: Option<String>,
90498	#[cfg_attr( feature = "derive_serde", serde(rename = "Dtch", skip_serializing_if = "Option::is_none") )]
90499	pub dtch: Option<String>,
90500	#[cfg_attr( feature = "derive_serde", serde(rename = "Vlrn", skip_serializing_if = "Option::is_none") )]
90501	pub vlrn: Option<String>,
90502	#[cfg_attr( feature = "derive_serde", serde(rename = "SCVM", skip_serializing_if = "Option::is_none") )]
90503	pub scvm: Option<String>,
90504	#[cfg_attr( feature = "derive_serde", serde(rename = "Belgn", skip_serializing_if = "Option::is_none") )]
90505	pub belgn: Option<String>,
90506	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmon", skip_serializing_if = "Option::is_none") )]
90507	pub cmon: Option<String>,
90508	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPrtryId", skip_serializing_if = "Option::is_none") )]
90509	pub othr_prtry_id: Option<AlternateSecurityIdentification7>,
90510}
90511
90512impl SecurityIdentification25Choice {
90513	pub fn validate(&self) -> Result<(), ValidationError> {
90514		if let Some(ref val) = self.isin {
90515			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
90516			if !pattern.is_match(val) {
90517				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
90518			}
90519		}
90520		if let Some(ref val) = self.ric {
90521			if val.chars().count() < 1 {
90522				return Err(ValidationError::new(1001, "ric is shorter than the minimum length of 1".to_string()));
90523			}
90524			if val.chars().count() > 35 {
90525				return Err(ValidationError::new(1002, "ric exceeds the maximum length of 35".to_string()));
90526			}
90527		}
90528		if let Some(ref val) = self.tckr_symb {
90529			if val.chars().count() < 1 {
90530				return Err(ValidationError::new(1001, "tckr_symb is shorter than the minimum length of 1".to_string()));
90531			}
90532			if val.chars().count() > 35 {
90533				return Err(ValidationError::new(1002, "tckr_symb exceeds the maximum length of 35".to_string()));
90534			}
90535		}
90536		if let Some(ref val) = self.blmbrg {
90537			let pattern = Regex::new("(BBG)[BCDFGHJKLMNPQRSTVWXYZ\\d]{8}\\d").unwrap();
90538			if !pattern.is_match(val) {
90539				return Err(ValidationError::new(1005, "blmbrg does not match the required pattern".to_string()));
90540			}
90541		}
90542		if let Some(ref val) = self.cta {
90543			if val.chars().count() < 1 {
90544				return Err(ValidationError::new(1001, "cta is shorter than the minimum length of 1".to_string()));
90545			}
90546			if val.chars().count() > 35 {
90547				return Err(ValidationError::new(1002, "cta exceeds the maximum length of 35".to_string()));
90548			}
90549		}
90550		if let Some(ref val) = self.cmon {
90551			if val.chars().count() < 1 {
90552				return Err(ValidationError::new(1001, "cmon is shorter than the minimum length of 1".to_string()));
90553			}
90554			if val.chars().count() > 12 {
90555				return Err(ValidationError::new(1002, "cmon exceeds the maximum length of 12".to_string()));
90556			}
90557		}
90558		if let Some(ref val) = self.othr_prtry_id { val.validate()? }
90559		Ok(())
90560	}
90561}
90562
90563
90564// SecurityIdentification26Choice ...
90565#[cfg_attr(feature = "derive_debug", derive(Debug))]
90566#[cfg_attr(feature = "derive_default", derive(Default))]
90567#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90568#[cfg_attr(feature = "derive_clone", derive(Clone))]
90569#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90570pub struct SecurityIdentification26Choice {
90571	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
90572	pub id: Option<String>,
90573	#[cfg_attr( feature = "derive_serde", serde(rename = "NotAvlbl", skip_serializing_if = "Option::is_none") )]
90574	pub not_avlbl: Option<NotAvailable1Code>,
90575}
90576
90577impl SecurityIdentification26Choice {
90578	pub fn validate(&self) -> Result<(), ValidationError> {
90579		if let Some(ref val) = self.id {
90580			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
90581			if !pattern.is_match(val) {
90582				return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
90583			}
90584		}
90585		if let Some(ref val) = self.not_avlbl { val.validate()? }
90586		Ok(())
90587	}
90588}
90589
90590
90591// SecurityIdentification39 ...
90592#[cfg_attr(feature = "derive_debug", derive(Debug))]
90593#[cfg_attr(feature = "derive_default", derive(Default))]
90594#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90595#[cfg_attr(feature = "derive_clone", derive(Clone))]
90596#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90597pub struct SecurityIdentification39 {
90598	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
90599	pub isin: Option<String>,
90600	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrId", skip_serializing_if = "Option::is_none") )]
90601	pub othr_id: Option<Vec<OtherIdentification1>>,
90602	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
90603	pub desc: Option<String>,
90604}
90605
90606impl SecurityIdentification39 {
90607	pub fn validate(&self) -> Result<(), ValidationError> {
90608		if let Some(ref val) = self.isin {
90609			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
90610			if !pattern.is_match(val) {
90611				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
90612			}
90613		}
90614		if let Some(ref vec) = self.othr_id { for item in vec { item.validate()? } }
90615		if let Some(ref val) = self.desc {
90616			if val.chars().count() < 1 {
90617				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
90618			}
90619			if val.chars().count() > 140 {
90620				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 140".to_string()));
90621			}
90622		}
90623		Ok(())
90624	}
90625}
90626
90627
90628// SecurityIdentification3Choice ...
90629#[cfg_attr(feature = "derive_debug", derive(Debug))]
90630#[cfg_attr(feature = "derive_default", derive(Default))]
90631#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90632#[cfg_attr(feature = "derive_clone", derive(Clone))]
90633#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90634pub struct SecurityIdentification3Choice {
90635	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
90636	pub isin: Option<String>,
90637	#[cfg_attr( feature = "derive_serde", serde(rename = "SEDOL", skip_serializing_if = "Option::is_none") )]
90638	pub sedol: Option<String>,
90639	#[cfg_attr( feature = "derive_serde", serde(rename = "CUSIP", skip_serializing_if = "Option::is_none") )]
90640	pub cusip: Option<String>,
90641	#[cfg_attr( feature = "derive_serde", serde(rename = "RIC", skip_serializing_if = "Option::is_none") )]
90642	pub ric: Option<String>,
90643	#[cfg_attr( feature = "derive_serde", serde(rename = "TckrSymb", skip_serializing_if = "Option::is_none") )]
90644	pub tckr_symb: Option<String>,
90645	#[cfg_attr( feature = "derive_serde", serde(rename = "Blmbrg", skip_serializing_if = "Option::is_none") )]
90646	pub blmbrg: Option<String>,
90647	#[cfg_attr( feature = "derive_serde", serde(rename = "CTA", skip_serializing_if = "Option::is_none") )]
90648	pub cta: Option<String>,
90649	#[cfg_attr( feature = "derive_serde", serde(rename = "QUICK", skip_serializing_if = "Option::is_none") )]
90650	pub quick: Option<String>,
90651	#[cfg_attr( feature = "derive_serde", serde(rename = "Wrtppr", skip_serializing_if = "Option::is_none") )]
90652	pub wrtppr: Option<String>,
90653	#[cfg_attr( feature = "derive_serde", serde(rename = "Dtch", skip_serializing_if = "Option::is_none") )]
90654	pub dtch: Option<String>,
90655	#[cfg_attr( feature = "derive_serde", serde(rename = "Vlrn", skip_serializing_if = "Option::is_none") )]
90656	pub vlrn: Option<String>,
90657	#[cfg_attr( feature = "derive_serde", serde(rename = "SCVM", skip_serializing_if = "Option::is_none") )]
90658	pub scvm: Option<String>,
90659	#[cfg_attr( feature = "derive_serde", serde(rename = "Belgn", skip_serializing_if = "Option::is_none") )]
90660	pub belgn: Option<String>,
90661	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmon", skip_serializing_if = "Option::is_none") )]
90662	pub cmon: Option<String>,
90663	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPrtryId", skip_serializing_if = "Option::is_none") )]
90664	pub othr_prtry_id: Option<AlternateSecurityIdentification1>,
90665}
90666
90667impl SecurityIdentification3Choice {
90668	pub fn validate(&self) -> Result<(), ValidationError> {
90669		if let Some(ref val) = self.isin {
90670			let pattern = Regex::new("[A-Z0-9]{12,12}").unwrap();
90671			if !pattern.is_match(val) {
90672				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
90673			}
90674		}
90675		if let Some(ref val) = self.ric {
90676			if val.chars().count() < 1 {
90677				return Err(ValidationError::new(1001, "ric is shorter than the minimum length of 1".to_string()));
90678			}
90679			if val.chars().count() > 35 {
90680				return Err(ValidationError::new(1002, "ric exceeds the maximum length of 35".to_string()));
90681			}
90682		}
90683		if let Some(ref val) = self.tckr_symb {
90684			if val.chars().count() < 1 {
90685				return Err(ValidationError::new(1001, "tckr_symb is shorter than the minimum length of 1".to_string()));
90686			}
90687			if val.chars().count() > 35 {
90688				return Err(ValidationError::new(1002, "tckr_symb exceeds the maximum length of 35".to_string()));
90689			}
90690		}
90691		if let Some(ref val) = self.blmbrg {
90692			if val.chars().count() < 1 {
90693				return Err(ValidationError::new(1001, "blmbrg is shorter than the minimum length of 1".to_string()));
90694			}
90695			if val.chars().count() > 35 {
90696				return Err(ValidationError::new(1002, "blmbrg exceeds the maximum length of 35".to_string()));
90697			}
90698		}
90699		if let Some(ref val) = self.cta {
90700			if val.chars().count() < 1 {
90701				return Err(ValidationError::new(1001, "cta is shorter than the minimum length of 1".to_string()));
90702			}
90703			if val.chars().count() > 35 {
90704				return Err(ValidationError::new(1002, "cta exceeds the maximum length of 35".to_string()));
90705			}
90706		}
90707		if let Some(ref val) = self.cmon {
90708			if val.chars().count() < 1 {
90709				return Err(ValidationError::new(1001, "cmon is shorter than the minimum length of 1".to_string()));
90710			}
90711			if val.chars().count() > 12 {
90712				return Err(ValidationError::new(1002, "cmon exceeds the maximum length of 12".to_string()));
90713			}
90714		}
90715		if let Some(ref val) = self.othr_prtry_id { val.validate()? }
90716		Ok(())
90717	}
90718}
90719
90720
90721// SecurityIdentification40 ...
90722#[cfg_attr(feature = "derive_debug", derive(Debug))]
90723#[cfg_attr(feature = "derive_default", derive(Default))]
90724#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90725#[cfg_attr(feature = "derive_clone", derive(Clone))]
90726#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90727pub struct SecurityIdentification40 {
90728	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrId", skip_serializing_if = "Option::is_none") )]
90729	pub othr_id: Option<Vec<OtherIdentification1>>,
90730	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
90731	pub desc: Option<String>,
90732	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
90733	pub isin: Option<String>,
90734}
90735
90736impl SecurityIdentification40 {
90737	pub fn validate(&self) -> Result<(), ValidationError> {
90738		if let Some(ref vec) = self.othr_id { for item in vec { item.validate()? } }
90739		if let Some(ref val) = self.desc {
90740			if val.chars().count() < 1 {
90741				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
90742			}
90743			if val.chars().count() > 140 {
90744				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 140".to_string()));
90745			}
90746		}
90747		if let Some(ref val) = self.isin {
90748			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
90749			if !pattern.is_match(val) {
90750				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
90751			}
90752		}
90753		Ok(())
90754	}
90755}
90756
90757
90758// SecurityIdentification41Choice ...
90759#[cfg_attr(feature = "derive_debug", derive(Debug))]
90760#[cfg_attr(feature = "derive_default", derive(Default))]
90761#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90762#[cfg_attr(feature = "derive_clone", derive(Clone))]
90763#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90764pub struct SecurityIdentification41Choice {
90765	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
90766	pub isin: Option<String>,
90767	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrntvInstrmId", skip_serializing_if = "Option::is_none") )]
90768	pub altrntv_instrm_id: Option<String>,
90769	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqPdctIdr", skip_serializing_if = "Option::is_none") )]
90770	pub unq_pdct_idr: Option<UniqueProductIdentifier2Choice>,
90771	#[cfg_attr( feature = "derive_serde", serde(rename = "Bskt", skip_serializing_if = "Option::is_none") )]
90772	pub bskt: Option<CustomBasket4>,
90773	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
90774	pub indx: Option<IndexIdentification1>,
90775	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
90776	pub othr: Option<GenericIdentification184>,
90777	#[cfg_attr( feature = "derive_serde", serde(rename = "IdNotAvlbl", skip_serializing_if = "Option::is_none") )]
90778	pub id_not_avlbl: Option<UnderlyingIdentification1Code>,
90779}
90780
90781impl SecurityIdentification41Choice {
90782	pub fn validate(&self) -> Result<(), ValidationError> {
90783		if let Some(ref val) = self.isin {
90784			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
90785			if !pattern.is_match(val) {
90786				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
90787			}
90788		}
90789		if let Some(ref val) = self.altrntv_instrm_id {
90790			if val.chars().count() < 1 {
90791				return Err(ValidationError::new(1001, "altrntv_instrm_id is shorter than the minimum length of 1".to_string()));
90792			}
90793			if val.chars().count() > 52 {
90794				return Err(ValidationError::new(1002, "altrntv_instrm_id exceeds the maximum length of 52".to_string()));
90795			}
90796		}
90797		if let Some(ref val) = self.unq_pdct_idr { val.validate()? }
90798		if let Some(ref val) = self.bskt { val.validate()? }
90799		if let Some(ref val) = self.indx { val.validate()? }
90800		if let Some(ref val) = self.othr { val.validate()? }
90801		if let Some(ref val) = self.id_not_avlbl { val.validate()? }
90802		Ok(())
90803	}
90804}
90805
90806
90807// SecurityIdentification46 ...
90808#[cfg_attr(feature = "derive_debug", derive(Debug))]
90809#[cfg_attr(feature = "derive_default", derive(Default))]
90810#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90811#[cfg_attr(feature = "derive_clone", derive(Clone))]
90812#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90813pub struct SecurityIdentification46 {
90814	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
90815	pub isin: Option<String>,
90816	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqPdctIdr", skip_serializing_if = "Option::is_none") )]
90817	pub unq_pdct_idr: Option<UniqueProductIdentifier2Choice>,
90818	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrntvInstrmId", skip_serializing_if = "Option::is_none") )]
90819	pub altrntv_instrm_id: Option<String>,
90820	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctDesc", skip_serializing_if = "Option::is_none") )]
90821	pub pdct_desc: Option<String>,
90822}
90823
90824impl SecurityIdentification46 {
90825	pub fn validate(&self) -> Result<(), ValidationError> {
90826		if let Some(ref val) = self.isin {
90827			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
90828			if !pattern.is_match(val) {
90829				return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
90830			}
90831		}
90832		if let Some(ref val) = self.unq_pdct_idr { val.validate()? }
90833		if let Some(ref val) = self.altrntv_instrm_id {
90834			if val.chars().count() < 1 {
90835				return Err(ValidationError::new(1001, "altrntv_instrm_id is shorter than the minimum length of 1".to_string()));
90836			}
90837			if val.chars().count() > 105 {
90838				return Err(ValidationError::new(1002, "altrntv_instrm_id exceeds the maximum length of 105".to_string()));
90839			}
90840		}
90841		if let Some(ref val) = self.pdct_desc {
90842			if val.chars().count() < 1 {
90843				return Err(ValidationError::new(1001, "pdct_desc is shorter than the minimum length of 1".to_string()));
90844			}
90845			if val.chars().count() > 1000 {
90846				return Err(ValidationError::new(1002, "pdct_desc exceeds the maximum length of 1000".to_string()));
90847			}
90848		}
90849		Ok(())
90850	}
90851}
90852
90853
90854// SecurityIdentification47 ...
90855#[cfg_attr(feature = "derive_debug", derive(Debug))]
90856#[cfg_attr(feature = "derive_default", derive(Default))]
90857#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90858#[cfg_attr(feature = "derive_clone", derive(Clone))]
90859#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90860pub struct SecurityIdentification47 {
90861	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
90862	pub id: SecurityIdentification40,
90863	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
90864	pub nm: String,
90865	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtNm", skip_serializing_if = "Option::is_none") )]
90866	pub shrt_nm: Option<String>,
90867	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssTp", skip_serializing_if = "Option::is_none") )]
90868	pub clss_tp: Option<String>,
90869	#[cfg_attr( feature = "derive_serde", serde(rename = "UmbrllNm", skip_serializing_if = "Option::is_none") )]
90870	pub umbrll_nm: Option<String>,
90871	#[cfg_attr( feature = "derive_serde", serde(rename = "NewUmbrll", skip_serializing_if = "Option::is_none") )]
90872	pub new_umbrll: Option<bool>,
90873	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnTp", skip_serializing_if = "Option::is_none") )]
90874	pub clssfctn_tp: Option<SecurityClassificationType2Choice>,
90875	#[cfg_attr( feature = "derive_serde", serde(rename = "BaseCcy", skip_serializing_if = "Option::is_none") )]
90876	pub base_ccy: Option<String>,
90877	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfDmcl", skip_serializing_if = "Option::is_none") )]
90878	pub ctry_of_dmcl: Option<String>,
90879	#[cfg_attr( feature = "derive_serde", serde(rename = "RegdDstrbtnCtry", skip_serializing_if = "Option::is_none") )]
90880	pub regd_dstrbtn_ctry: Option<Vec<String>>,
90881	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctTp", skip_serializing_if = "Option::is_none") )]
90882	pub pdct_tp: Option<ProductStructure1Choice>,
90883	#[cfg_attr( feature = "derive_serde", serde(rename = "Issr", skip_serializing_if = "Option::is_none") )]
90884	pub issr: Option<ContactAttributes5>,
90885	#[cfg_attr( feature = "derive_serde", serde(rename = "IssrPdctGovncPrc", skip_serializing_if = "Option::is_none") )]
90886	pub issr_pdct_govnc_prc: Option<GovernanceProcess1Choice>,
90887	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctCtgy", skip_serializing_if = "Option::is_none") )]
90888	pub pdct_ctgy: Option<String>,
90889	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctCtgyDE", skip_serializing_if = "Option::is_none") )]
90890	pub pdct_ctgy_de: Option<String>,
90891	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlOrUnitBased", skip_serializing_if = "Option::is_none") )]
90892	pub ntnl_or_unit_based: Option<NotionalOrUnitBased1Choice>,
90893	#[cfg_attr( feature = "derive_serde", serde(rename = "QtnTp", skip_serializing_if = "Option::is_none") )]
90894	pub qtn_tp: Option<QuotationType1Choice>,
90895	#[cfg_attr( feature = "derive_serde", serde(rename = "LvrgdOrCntngntLblty", skip_serializing_if = "Option::is_none") )]
90896	pub lvrgd_or_cntngnt_lblty: Option<bool>,
90897	#[cfg_attr( feature = "derive_serde", serde(rename = "NoRtrcssnInd", skip_serializing_if = "Option::is_none") )]
90898	pub no_rtrcssn_ind: Option<bool>,
90899	#[cfg_attr( feature = "derive_serde", serde(rename = "ExPstCostClctnBsis", skip_serializing_if = "Option::is_none") )]
90900	pub ex_pst_cost_clctn_bsis: Option<ExPostCostCalculationBasis1Choice>,
90901	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
90902	pub addtl_inf: Option<Vec<AdditionalInformation15>>,
90903}
90904
90905impl SecurityIdentification47 {
90906	pub fn validate(&self) -> Result<(), ValidationError> {
90907		self.id.validate()?;
90908		if self.nm.chars().count() < 1 {
90909			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
90910		}
90911		if self.nm.chars().count() > 350 {
90912			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 350".to_string()));
90913		}
90914		if let Some(ref val) = self.shrt_nm {
90915			if val.chars().count() < 1 {
90916				return Err(ValidationError::new(1001, "shrt_nm is shorter than the minimum length of 1".to_string()));
90917			}
90918			if val.chars().count() > 35 {
90919				return Err(ValidationError::new(1002, "shrt_nm exceeds the maximum length of 35".to_string()));
90920			}
90921		}
90922		if let Some(ref val) = self.clss_tp {
90923			if val.chars().count() < 1 {
90924				return Err(ValidationError::new(1001, "clss_tp is shorter than the minimum length of 1".to_string()));
90925			}
90926			if val.chars().count() > 35 {
90927				return Err(ValidationError::new(1002, "clss_tp exceeds the maximum length of 35".to_string()));
90928			}
90929		}
90930		if let Some(ref val) = self.umbrll_nm {
90931			if val.chars().count() < 1 {
90932				return Err(ValidationError::new(1001, "umbrll_nm is shorter than the minimum length of 1".to_string()));
90933			}
90934			if val.chars().count() > 35 {
90935				return Err(ValidationError::new(1002, "umbrll_nm exceeds the maximum length of 35".to_string()));
90936			}
90937		}
90938		if let Some(ref val) = self.clssfctn_tp { val.validate()? }
90939		if let Some(ref val) = self.base_ccy {
90940			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
90941			if !pattern.is_match(val) {
90942				return Err(ValidationError::new(1005, "base_ccy does not match the required pattern".to_string()));
90943			}
90944		}
90945		if let Some(ref val) = self.ctry_of_dmcl {
90946			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
90947			if !pattern.is_match(val) {
90948				return Err(ValidationError::new(1005, "ctry_of_dmcl does not match the required pattern".to_string()));
90949			}
90950		}
90951		if let Some(ref vec) = self.regd_dstrbtn_ctry {
90952			for item in vec {
90953				let pattern = Regex::new("[A-Z]{2,2}").unwrap();
90954				if !pattern.is_match(&item) {
90955					return Err(ValidationError::new(1005, "regd_dstrbtn_ctry does not match the required pattern".to_string()));
90956				}
90957			}
90958		}
90959		if let Some(ref val) = self.pdct_tp { val.validate()? }
90960		if let Some(ref val) = self.issr { val.validate()? }
90961		if let Some(ref val) = self.issr_pdct_govnc_prc { val.validate()? }
90962		if let Some(ref val) = self.pdct_ctgy {
90963			if val.chars().count() < 1 {
90964				return Err(ValidationError::new(1001, "pdct_ctgy is shorter than the minimum length of 1".to_string()));
90965			}
90966			if val.chars().count() > 140 {
90967				return Err(ValidationError::new(1002, "pdct_ctgy exceeds the maximum length of 140".to_string()));
90968			}
90969		}
90970		if let Some(ref val) = self.pdct_ctgy_de {
90971			if val.chars().count() < 1 {
90972				return Err(ValidationError::new(1001, "pdct_ctgy_de is shorter than the minimum length of 1".to_string()));
90973			}
90974			if val.chars().count() > 140 {
90975				return Err(ValidationError::new(1002, "pdct_ctgy_de exceeds the maximum length of 140".to_string()));
90976			}
90977		}
90978		if let Some(ref val) = self.ntnl_or_unit_based { val.validate()? }
90979		if let Some(ref val) = self.qtn_tp { val.validate()? }
90980		if let Some(ref val) = self.ex_pst_cost_clctn_bsis { val.validate()? }
90981		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
90982		Ok(())
90983	}
90984}
90985
90986
90987// SecurityIdentificationAndAmount1 ...
90988#[cfg_attr(feature = "derive_debug", derive(Debug))]
90989#[cfg_attr(feature = "derive_default", derive(Default))]
90990#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
90991#[cfg_attr(feature = "derive_clone", derive(Clone))]
90992#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
90993pub struct SecurityIdentificationAndAmount1 {
90994	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
90995	pub id: String,
90996	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal") )]
90997	pub mkt_val: ActiveCurrencyAnd24Amount,
90998	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmTp") )]
90999	pub fin_instrm_tp: ProductType7Code,
91000}
91001
91002impl SecurityIdentificationAndAmount1 {
91003	pub fn validate(&self) -> Result<(), ValidationError> {
91004		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
91005		if !pattern.is_match(&self.id) {
91006			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
91007		}
91008		self.mkt_val.validate()?;
91009		self.fin_instrm_tp.validate()?;
91010		Ok(())
91011	}
91012}
91013
91014
91015// SecurityIdentificationQuery4Choice ...
91016#[cfg_attr(feature = "derive_debug", derive(Debug))]
91017#[cfg_attr(feature = "derive_default", derive(Default))]
91018#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91019#[cfg_attr(feature = "derive_clone", derive(Clone))]
91020#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91021pub struct SecurityIdentificationQuery4Choice {
91022	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
91023	pub isin: Option<Vec<String>>,
91024	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrntvInstrmId", skip_serializing_if = "Option::is_none") )]
91025	pub altrntv_instrm_id: Option<Vec<String>>,
91026	#[cfg_attr( feature = "derive_serde", serde(rename = "NotAvlbl", skip_serializing_if = "Option::is_none") )]
91027	pub not_avlbl: Option<NotAvailable1Code>,
91028	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqPdctIdr", skip_serializing_if = "Option::is_none") )]
91029	pub unq_pdct_idr: Option<Vec<String>>,
91030	#[cfg_attr( feature = "derive_serde", serde(rename = "Indx", skip_serializing_if = "Option::is_none") )]
91031	pub indx: Option<Vec<SecurityIdentification20Choice>>,
91032	#[cfg_attr( feature = "derive_serde", serde(rename = "Bskt", skip_serializing_if = "Option::is_none") )]
91033	pub bskt: Option<Vec<BasketQuery1>>,
91034	#[cfg_attr( feature = "derive_serde", serde(rename = "NotRptd", skip_serializing_if = "Option::is_none") )]
91035	pub not_rptd: Option<NotReported1Code>,
91036}
91037
91038impl SecurityIdentificationQuery4Choice {
91039	pub fn validate(&self) -> Result<(), ValidationError> {
91040		if let Some(ref vec) = self.isin {
91041			for item in vec {
91042				let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
91043				if !pattern.is_match(&item) {
91044					return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
91045				}
91046			}
91047		}
91048		if let Some(ref vec) = self.altrntv_instrm_id {
91049			for item in vec {
91050				if item.chars().count() < 1 {
91051					return Err(ValidationError::new(1001, "altrntv_instrm_id is shorter than the minimum length of 1".to_string()));
91052				}
91053				if item.chars().count() > 52 {
91054					return Err(ValidationError::new(1002, "altrntv_instrm_id exceeds the maximum length of 52".to_string()));
91055				}
91056			}
91057		}
91058		if let Some(ref val) = self.not_avlbl { val.validate()? }
91059		if let Some(ref vec) = self.unq_pdct_idr {
91060			for item in vec {
91061				if item.chars().count() < 1 {
91062					return Err(ValidationError::new(1001, "unq_pdct_idr is shorter than the minimum length of 1".to_string()));
91063				}
91064				if item.chars().count() > 52 {
91065					return Err(ValidationError::new(1002, "unq_pdct_idr exceeds the maximum length of 52".to_string()));
91066				}
91067			}
91068		}
91069		if let Some(ref vec) = self.indx { for item in vec { item.validate()? } }
91070		if let Some(ref vec) = self.bskt { for item in vec { item.validate()? } }
91071		if let Some(ref val) = self.not_rptd { val.validate()? }
91072		Ok(())
91073	}
91074}
91075
91076
91077// SecurityIdentificationQueryCriteria1 ...
91078#[cfg_attr(feature = "derive_debug", derive(Debug))]
91079#[cfg_attr(feature = "derive_default", derive(Default))]
91080#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91081#[cfg_attr(feature = "derive_clone", derive(Clone))]
91082#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91083pub struct SecurityIdentificationQueryCriteria1 {
91084	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
91085	pub isin: Option<Vec<String>>,
91086	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrntvInstrmId", skip_serializing_if = "Option::is_none") )]
91087	pub altrntv_instrm_id: Option<Vec<String>>,
91088}
91089
91090impl SecurityIdentificationQueryCriteria1 {
91091	pub fn validate(&self) -> Result<(), ValidationError> {
91092		if let Some(ref vec) = self.isin {
91093			for item in vec {
91094				let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
91095				if !pattern.is_match(&item) {
91096					return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
91097				}
91098			}
91099		}
91100		if let Some(ref vec) = self.altrntv_instrm_id {
91101			for item in vec {
91102				if item.chars().count() < 1 {
91103					return Err(ValidationError::new(1001, "altrntv_instrm_id is shorter than the minimum length of 1".to_string()));
91104				}
91105				if item.chars().count() > 52 {
91106					return Err(ValidationError::new(1002, "altrntv_instrm_id exceeds the maximum length of 52".to_string()));
91107				}
91108			}
91109		}
91110		Ok(())
91111	}
91112}
91113
91114
91115// SecurityInstrumentDescription17 ...
91116#[cfg_attr(feature = "derive_debug", derive(Debug))]
91117#[cfg_attr(feature = "derive_default", derive(Default))]
91118#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91119#[cfg_attr(feature = "derive_clone", derive(Clone))]
91120#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91121pub struct SecurityInstrumentDescription17 {
91122	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
91123	pub id: String,
91124	#[cfg_attr( feature = "derive_serde", serde(rename = "FullNm", skip_serializing_if = "Option::is_none") )]
91125	pub full_nm: Option<String>,
91126	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtNm", skip_serializing_if = "Option::is_none") )]
91127	pub shrt_nm: Option<String>,
91128	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnTp", skip_serializing_if = "Option::is_none") )]
91129	pub clssfctn_tp: Option<String>,
91130	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlCcy", skip_serializing_if = "Option::is_none") )]
91131	pub ntnl_ccy: Option<String>,
91132	#[cfg_attr( feature = "derive_serde", serde(rename = "CmmdtyDerivInd", skip_serializing_if = "Option::is_none") )]
91133	pub cmmdty_deriv_ind: Option<bool>,
91134}
91135
91136impl SecurityInstrumentDescription17 {
91137	pub fn validate(&self) -> Result<(), ValidationError> {
91138		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
91139		if !pattern.is_match(&self.id) {
91140			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
91141		}
91142		if let Some(ref val) = self.full_nm {
91143			if val.chars().count() < 1 {
91144				return Err(ValidationError::new(1001, "full_nm is shorter than the minimum length of 1".to_string()));
91145			}
91146			if val.chars().count() > 350 {
91147				return Err(ValidationError::new(1002, "full_nm exceeds the maximum length of 350".to_string()));
91148			}
91149		}
91150		if let Some(ref val) = self.shrt_nm {
91151			if val.chars().count() < 1 {
91152				return Err(ValidationError::new(1001, "shrt_nm is shorter than the minimum length of 1".to_string()));
91153			}
91154			if val.chars().count() > 35 {
91155				return Err(ValidationError::new(1002, "shrt_nm exceeds the maximum length of 35".to_string()));
91156			}
91157		}
91158		if let Some(ref val) = self.clssfctn_tp {
91159			let pattern = Regex::new("[A-Z]{6,6}").unwrap();
91160			if !pattern.is_match(val) {
91161				return Err(ValidationError::new(1005, "clssfctn_tp does not match the required pattern".to_string()));
91162			}
91163		}
91164		if let Some(ref val) = self.ntnl_ccy {
91165			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
91166			if !pattern.is_match(val) {
91167				return Err(ValidationError::new(1005, "ntnl_ccy does not match the required pattern".to_string()));
91168			}
91169		}
91170		Ok(())
91171	}
91172}
91173
91174
91175// SecurityInstrumentDescription22 ...
91176#[cfg_attr(feature = "derive_debug", derive(Debug))]
91177#[cfg_attr(feature = "derive_default", derive(Default))]
91178#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91179#[cfg_attr(feature = "derive_clone", derive(Clone))]
91180#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91181pub struct SecurityInstrumentDescription22 {
91182	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmGnlAttrbts") )]
91183	pub fin_instrm_gnl_attrbts: SecurityInstrumentDescription23,
91184	#[cfg_attr( feature = "derive_serde", serde(rename = "DebtInstrmAttrbts", skip_serializing_if = "Option::is_none") )]
91185	pub debt_instrm_attrbts: Option<DebtInstrument4>,
91186	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivInstrmAttrbts") )]
91187	pub deriv_instrm_attrbts: DerivativeInstrument6,
91188}
91189
91190impl SecurityInstrumentDescription22 {
91191	pub fn validate(&self) -> Result<(), ValidationError> {
91192		self.fin_instrm_gnl_attrbts.validate()?;
91193		if let Some(ref val) = self.debt_instrm_attrbts { val.validate()? }
91194		self.deriv_instrm_attrbts.validate()?;
91195		Ok(())
91196	}
91197}
91198
91199
91200// SecurityInstrumentDescription23 ...
91201#[cfg_attr(feature = "derive_debug", derive(Debug))]
91202#[cfg_attr(feature = "derive_default", derive(Default))]
91203#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91204#[cfg_attr(feature = "derive_clone", derive(Clone))]
91205#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91206pub struct SecurityInstrumentDescription23 {
91207	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
91208	pub id: Option<String>,
91209	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrId", skip_serializing_if = "Option::is_none") )]
91210	pub othr_id: Option<Vec<OtherIdentification1>>,
91211	#[cfg_attr( feature = "derive_serde", serde(rename = "FullNm") )]
91212	pub full_nm: String,
91213	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnTp") )]
91214	pub clssfctn_tp: String,
91215	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlCcy", skip_serializing_if = "Option::is_none") )]
91216	pub ntnl_ccy: Option<String>,
91217}
91218
91219impl SecurityInstrumentDescription23 {
91220	pub fn validate(&self) -> Result<(), ValidationError> {
91221		if let Some(ref val) = self.id {
91222			let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
91223			if !pattern.is_match(val) {
91224				return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
91225			}
91226		}
91227		if let Some(ref vec) = self.othr_id { for item in vec { item.validate()? } }
91228		if self.full_nm.chars().count() < 1 {
91229			return Err(ValidationError::new(1001, "full_nm is shorter than the minimum length of 1".to_string()));
91230		}
91231		if self.full_nm.chars().count() > 350 {
91232			return Err(ValidationError::new(1002, "full_nm exceeds the maximum length of 350".to_string()));
91233		}
91234		let pattern = Regex::new("[A-Z]{6,6}").unwrap();
91235		if !pattern.is_match(&self.clssfctn_tp) {
91236			return Err(ValidationError::new(1005, "clssfctn_tp does not match the required pattern".to_string()));
91237		}
91238		if let Some(ref val) = self.ntnl_ccy {
91239			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
91240			if !pattern.is_match(val) {
91241				return Err(ValidationError::new(1005, "ntnl_ccy does not match the required pattern".to_string()));
91242			}
91243		}
91244		Ok(())
91245	}
91246}
91247
91248
91249// SecurityInstrumentDescription9 ...
91250#[cfg_attr(feature = "derive_debug", derive(Debug))]
91251#[cfg_attr(feature = "derive_default", derive(Default))]
91252#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91253#[cfg_attr(feature = "derive_clone", derive(Clone))]
91254#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91255pub struct SecurityInstrumentDescription9 {
91256	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
91257	pub id: String,
91258	#[cfg_attr( feature = "derive_serde", serde(rename = "FullNm") )]
91259	pub full_nm: String,
91260	#[cfg_attr( feature = "derive_serde", serde(rename = "ShrtNm", skip_serializing_if = "Option::is_none") )]
91261	pub shrt_nm: Option<String>,
91262	#[cfg_attr( feature = "derive_serde", serde(rename = "ClssfctnTp") )]
91263	pub clssfctn_tp: String,
91264	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlCcy") )]
91265	pub ntnl_ccy: String,
91266	#[cfg_attr( feature = "derive_serde", serde(rename = "CmmdtyDerivInd") )]
91267	pub cmmdty_deriv_ind: bool,
91268}
91269
91270impl SecurityInstrumentDescription9 {
91271	pub fn validate(&self) -> Result<(), ValidationError> {
91272		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
91273		if !pattern.is_match(&self.id) {
91274			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
91275		}
91276		if self.full_nm.chars().count() < 1 {
91277			return Err(ValidationError::new(1001, "full_nm is shorter than the minimum length of 1".to_string()));
91278		}
91279		if self.full_nm.chars().count() > 350 {
91280			return Err(ValidationError::new(1002, "full_nm exceeds the maximum length of 350".to_string()));
91281		}
91282		if let Some(ref val) = self.shrt_nm {
91283			if val.chars().count() < 1 {
91284				return Err(ValidationError::new(1001, "shrt_nm is shorter than the minimum length of 1".to_string()));
91285			}
91286			if val.chars().count() > 35 {
91287				return Err(ValidationError::new(1002, "shrt_nm exceeds the maximum length of 35".to_string()));
91288			}
91289		}
91290		let pattern = Regex::new("[A-Z]{6,6}").unwrap();
91291		if !pattern.is_match(&self.clssfctn_tp) {
91292			return Err(ValidationError::new(1005, "clssfctn_tp does not match the required pattern".to_string()));
91293		}
91294		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
91295		if !pattern.is_match(&self.ntnl_ccy) {
91296			return Err(ValidationError::new(1005, "ntnl_ccy does not match the required pattern".to_string()));
91297		}
91298		Ok(())
91299	}
91300}
91301
91302
91303// SecurityIssuer4 ...
91304#[cfg_attr(feature = "derive_debug", derive(Debug))]
91305#[cfg_attr(feature = "derive_default", derive(Default))]
91306#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91307#[cfg_attr(feature = "derive_clone", derive(Clone))]
91308#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91309pub struct SecurityIssuer4 {
91310	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
91311	pub id: Option<OrganisationIdentification15Choice>,
91312	#[cfg_attr( feature = "derive_serde", serde(rename = "JursdctnCtry") )]
91313	pub jursdctn_ctry: String,
91314}
91315
91316impl SecurityIssuer4 {
91317	pub fn validate(&self) -> Result<(), ValidationError> {
91318		if let Some(ref val) = self.id { val.validate()? }
91319		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
91320		if !pattern.is_match(&self.jursdctn_ctry) {
91321			return Err(ValidationError::new(1005, "jursdctn_ctry does not match the required pattern".to_string()));
91322		}
91323		Ok(())
91324	}
91325}
91326
91327
91328// SecurityOrBusinessError4Choice ...
91329#[cfg_attr(feature = "derive_debug", derive(Debug))]
91330#[cfg_attr(feature = "derive_default", derive(Default))]
91331#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91332#[cfg_attr(feature = "derive_clone", derive(Clone))]
91333#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91334pub struct SecurityOrBusinessError4Choice {
91335	#[cfg_attr( feature = "derive_serde", serde(rename = "SctyRpt", skip_serializing_if = "Option::is_none") )]
91336	pub scty_rpt: Option<Vec<SecurityAttributes11>>,
91337	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
91338	pub biz_err: Option<Vec<BusinessError4>>,
91339}
91340
91341impl SecurityOrBusinessError4Choice {
91342	pub fn validate(&self) -> Result<(), ValidationError> {
91343		if let Some(ref vec) = self.scty_rpt { for item in vec { item.validate()? } }
91344		if let Some(ref vec) = self.biz_err { for item in vec { item.validate()? } }
91345		Ok(())
91346	}
91347}
91348
91349
91350// SecurityOrOperationalError4Choice ...
91351#[cfg_attr(feature = "derive_debug", derive(Debug))]
91352#[cfg_attr(feature = "derive_default", derive(Default))]
91353#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91354#[cfg_attr(feature = "derive_clone", derive(Clone))]
91355#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91356pub struct SecurityOrOperationalError4Choice {
91357	#[cfg_attr( feature = "derive_serde", serde(rename = "SctyRptOrBizErr", skip_serializing_if = "Option::is_none") )]
91358	pub scty_rpt_or_biz_err: Option<SecurityOrBusinessError4Choice>,
91359	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
91360	pub oprl_err: Option<Vec<ErrorHandling5>>,
91361}
91362
91363impl SecurityOrOperationalError4Choice {
91364	pub fn validate(&self) -> Result<(), ValidationError> {
91365		if let Some(ref val) = self.scty_rpt_or_biz_err { val.validate()? }
91366		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
91367		Ok(())
91368	}
91369}
91370
91371
91372// SecurityRestriction3 ...
91373#[cfg_attr(feature = "derive_debug", derive(Debug))]
91374#[cfg_attr(feature = "derive_default", derive(Default))]
91375#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91376#[cfg_attr(feature = "derive_clone", derive(Clone))]
91377#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91378pub struct SecurityRestriction3 {
91379	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvPrd", skip_serializing_if = "Option::is_none") )]
91380	pub fctv_prd: Option<DateTimePeriod2>,
91381	#[cfg_attr( feature = "derive_serde", serde(rename = "RstrctnTp", skip_serializing_if = "Option::is_none") )]
91382	pub rstrctn_tp: Option<SecurityRestrictionType2Choice>,
91383	#[cfg_attr( feature = "derive_serde", serde(rename = "LglRstrctnTp", skip_serializing_if = "Option::is_none") )]
91384	pub lgl_rstrctn_tp: Option<LegalRestrictions5Choice>,
91385	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrRstrctnTp", skip_serializing_if = "Option::is_none") )]
91386	pub invstr_rstrctn_tp: Option<Vec<InvestorRestrictionType3Choice>>,
91387	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrTp", skip_serializing_if = "Option::is_none") )]
91388	pub invstr_tp: Option<Vec<InvestorType3Choice>>,
91389}
91390
91391impl SecurityRestriction3 {
91392	pub fn validate(&self) -> Result<(), ValidationError> {
91393		if let Some(ref val) = self.fctv_prd { val.validate()? }
91394		if let Some(ref val) = self.rstrctn_tp { val.validate()? }
91395		if let Some(ref val) = self.lgl_rstrctn_tp { val.validate()? }
91396		if let Some(ref vec) = self.invstr_rstrctn_tp { for item in vec { item.validate()? } }
91397		if let Some(ref vec) = self.invstr_tp { for item in vec { item.validate()? } }
91398		Ok(())
91399	}
91400}
91401
91402
91403// SecurityRestrictionType2Choice ...
91404#[cfg_attr(feature = "derive_debug", derive(Debug))]
91405#[cfg_attr(feature = "derive_default", derive(Default))]
91406#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91407#[cfg_attr(feature = "derive_clone", derive(Clone))]
91408#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91409pub struct SecurityRestrictionType2Choice {
91410	#[cfg_attr( feature = "derive_serde", serde(rename = "RstrctnTp", skip_serializing_if = "Option::is_none") )]
91411	pub rstrctn_tp: Option<RestrictionType1Code>,
91412	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryRstrctn", skip_serializing_if = "Option::is_none") )]
91413	pub prtry_rstrctn: Option<GenericIdentification30>,
91414}
91415
91416impl SecurityRestrictionType2Choice {
91417	pub fn validate(&self) -> Result<(), ValidationError> {
91418		if let Some(ref val) = self.rstrctn_tp { val.validate()? }
91419		if let Some(ref val) = self.prtry_rstrctn { val.validate()? }
91420		Ok(())
91421	}
91422}
91423
91424
91425// SecurityReuseData1 ...
91426#[cfg_attr(feature = "derive_debug", derive(Debug))]
91427#[cfg_attr(feature = "derive_default", derive(Default))]
91428#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91429#[cfg_attr(feature = "derive_clone", derive(Clone))]
91430#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91431pub struct SecurityReuseData1 {
91432	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN") )]
91433	pub isin: String,
91434	#[cfg_attr( feature = "derive_serde", serde(rename = "ReuseVal") )]
91435	pub reuse_val: ReuseValue1Choice,
91436}
91437
91438impl SecurityReuseData1 {
91439	pub fn validate(&self) -> Result<(), ValidationError> {
91440		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
91441		if !pattern.is_match(&self.isin) {
91442			return Err(ValidationError::new(1005, "isin does not match the required pattern".to_string()));
91443		}
91444		self.reuse_val.validate()?;
91445		Ok(())
91446	}
91447}
91448
91449
91450// SecurityStatement3 ...
91451#[cfg_attr(feature = "derive_debug", derive(Debug))]
91452#[cfg_attr(feature = "derive_default", derive(Default))]
91453#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91454#[cfg_attr(feature = "derive_clone", derive(Clone))]
91455#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91456pub struct SecurityStatement3 {
91457	#[cfg_attr( feature = "derive_serde", serde(rename = "SysDt") )]
91458	pub sys_dt: String,
91459	#[cfg_attr( feature = "derive_serde", serde(rename = "Chng", skip_serializing_if = "Option::is_none") )]
91460	pub chng: Option<Vec<SecuritiesReferenceDataChange3>>,
91461}
91462
91463impl SecurityStatement3 {
91464	pub fn validate(&self) -> Result<(), ValidationError> {
91465		if let Some(ref vec) = self.chng { for item in vec { item.validate()? } }
91466		Ok(())
91467	}
91468}
91469
91470
91471// SecurityStatus2Code ...
91472#[cfg_attr(feature = "derive_debug", derive(Debug))]
91473#[cfg_attr(feature = "derive_default", derive(Default))]
91474#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91475#[cfg_attr(feature = "derive_clone", derive(Clone))]
91476#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91477pub enum SecurityStatus2Code {
91478	#[cfg_attr(feature = "derive_default", default)]
91479	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTV") )]
91480	CodeACTV,
91481	#[cfg_attr( feature = "derive_serde", serde(rename = "INAC") )]
91482	CodeINAC,
91483	#[cfg_attr( feature = "derive_serde", serde(rename = "SUSP") )]
91484	CodeSUSP,
91485}
91486
91487impl SecurityStatus2Code {
91488	pub fn validate(&self) -> Result<(), ValidationError> {
91489		Ok(())
91490	}
91491}
91492
91493
91494// SecurityStatus3Choice ...
91495#[cfg_attr(feature = "derive_debug", derive(Debug))]
91496#[cfg_attr(feature = "derive_default", derive(Default))]
91497#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91498#[cfg_attr(feature = "derive_clone", derive(Clone))]
91499#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91500pub struct SecurityStatus3Choice {
91501	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
91502	pub cd: Option<SecurityStatus2Code>,
91503	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
91504	pub prtry: Option<GenericIdentification30>,
91505}
91506
91507impl SecurityStatus3Choice {
91508	pub fn validate(&self) -> Result<(), ValidationError> {
91509		if let Some(ref val) = self.cd { val.validate()? }
91510		if let Some(ref val) = self.prtry { val.validate()? }
91511		Ok(())
91512	}
91513}
91514
91515
91516// SecurityWithHoldingTax1 ...
91517#[cfg_attr(feature = "derive_debug", derive(Debug))]
91518#[cfg_attr(feature = "derive_default", derive(Default))]
91519#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91520#[cfg_attr(feature = "derive_clone", derive(Clone))]
91521#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91522pub struct SecurityWithHoldingTax1 {
91523	#[cfg_attr( feature = "derive_serde", serde(rename = "WhldgTaxVal") )]
91524	pub whldg_tax_val: RateAndAmountFormat1Choice,
91525	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry") )]
91526	pub ctry: String,
91527}
91528
91529impl SecurityWithHoldingTax1 {
91530	pub fn validate(&self) -> Result<(), ValidationError> {
91531		self.whldg_tax_val.validate()?;
91532		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
91533		if !pattern.is_match(&self.ctry) {
91534			return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
91535		}
91536		Ok(())
91537	}
91538}
91539
91540
91541// SequenceRange1 ...
91542#[cfg_attr(feature = "derive_debug", derive(Debug))]
91543#[cfg_attr(feature = "derive_default", derive(Default))]
91544#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91545#[cfg_attr(feature = "derive_clone", derive(Clone))]
91546#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91547pub struct SequenceRange1 {
91548	#[cfg_attr( feature = "derive_serde", serde(rename = "FrSeq") )]
91549	pub fr_seq: String,
91550	#[cfg_attr( feature = "derive_serde", serde(rename = "ToSeq") )]
91551	pub to_seq: String,
91552}
91553
91554impl SequenceRange1 {
91555	pub fn validate(&self) -> Result<(), ValidationError> {
91556		if self.fr_seq.chars().count() < 1 {
91557			return Err(ValidationError::new(1001, "fr_seq is shorter than the minimum length of 1".to_string()));
91558		}
91559		if self.fr_seq.chars().count() > 35 {
91560			return Err(ValidationError::new(1002, "fr_seq exceeds the maximum length of 35".to_string()));
91561		}
91562		if self.to_seq.chars().count() < 1 {
91563			return Err(ValidationError::new(1001, "to_seq is shorter than the minimum length of 1".to_string()));
91564		}
91565		if self.to_seq.chars().count() > 35 {
91566			return Err(ValidationError::new(1002, "to_seq exceeds the maximum length of 35".to_string()));
91567		}
91568		Ok(())
91569	}
91570}
91571
91572
91573// SequenceRange1Choice ...
91574#[cfg_attr(feature = "derive_debug", derive(Debug))]
91575#[cfg_attr(feature = "derive_default", derive(Default))]
91576#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91577#[cfg_attr(feature = "derive_clone", derive(Clone))]
91578#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91579pub struct SequenceRange1Choice {
91580	#[cfg_attr( feature = "derive_serde", serde(rename = "FrSeq", skip_serializing_if = "Option::is_none") )]
91581	pub fr_seq: Option<String>,
91582	#[cfg_attr( feature = "derive_serde", serde(rename = "ToSeq", skip_serializing_if = "Option::is_none") )]
91583	pub to_seq: Option<String>,
91584	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToSeq", skip_serializing_if = "Option::is_none") )]
91585	pub fr_to_seq: Option<Vec<SequenceRange1>>,
91586	#[cfg_attr( feature = "derive_serde", serde(rename = "EQSeq", skip_serializing_if = "Option::is_none") )]
91587	pub eq_seq: Option<Vec<String>>,
91588	#[cfg_attr( feature = "derive_serde", serde(rename = "NEQSeq", skip_serializing_if = "Option::is_none") )]
91589	pub neq_seq: Option<Vec<String>>,
91590}
91591
91592impl SequenceRange1Choice {
91593	pub fn validate(&self) -> Result<(), ValidationError> {
91594		if let Some(ref val) = self.fr_seq {
91595			if val.chars().count() < 1 {
91596				return Err(ValidationError::new(1001, "fr_seq is shorter than the minimum length of 1".to_string()));
91597			}
91598			if val.chars().count() > 35 {
91599				return Err(ValidationError::new(1002, "fr_seq exceeds the maximum length of 35".to_string()));
91600			}
91601		}
91602		if let Some(ref val) = self.to_seq {
91603			if val.chars().count() < 1 {
91604				return Err(ValidationError::new(1001, "to_seq is shorter than the minimum length of 1".to_string()));
91605			}
91606			if val.chars().count() > 35 {
91607				return Err(ValidationError::new(1002, "to_seq exceeds the maximum length of 35".to_string()));
91608			}
91609		}
91610		if let Some(ref vec) = self.fr_to_seq { for item in vec { item.validate()? } }
91611		if let Some(ref vec) = self.eq_seq {
91612			for item in vec {
91613				if item.chars().count() < 1 {
91614					return Err(ValidationError::new(1001, "eq_seq is shorter than the minimum length of 1".to_string()));
91615				}
91616				if item.chars().count() > 35 {
91617					return Err(ValidationError::new(1002, "eq_seq exceeds the maximum length of 35".to_string()));
91618				}
91619			}
91620		}
91621		if let Some(ref vec) = self.neq_seq {
91622			for item in vec {
91623				if item.chars().count() < 1 {
91624					return Err(ValidationError::new(1001, "neq_seq is shorter than the minimum length of 1".to_string()));
91625				}
91626				if item.chars().count() > 35 {
91627					return Err(ValidationError::new(1002, "neq_seq exceeds the maximum length of 35".to_string()));
91628				}
91629			}
91630		}
91631		Ok(())
91632	}
91633}
91634
91635
91636// SequenceType2Code ...
91637#[cfg_attr(feature = "derive_debug", derive(Debug))]
91638#[cfg_attr(feature = "derive_default", derive(Default))]
91639#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91640#[cfg_attr(feature = "derive_clone", derive(Clone))]
91641#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91642pub enum SequenceType2Code {
91643	#[cfg_attr(feature = "derive_default", default)]
91644	#[cfg_attr( feature = "derive_serde", serde(rename = "RCUR") )]
91645	CodeRCUR,
91646	#[cfg_attr( feature = "derive_serde", serde(rename = "OOFF") )]
91647	CodeOOFF,
91648}
91649
91650impl SequenceType2Code {
91651	pub fn validate(&self) -> Result<(), ValidationError> {
91652		Ok(())
91653	}
91654}
91655
91656
91657// SequenceType3Code ...
91658#[cfg_attr(feature = "derive_debug", derive(Debug))]
91659#[cfg_attr(feature = "derive_default", derive(Default))]
91660#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91661#[cfg_attr(feature = "derive_clone", derive(Clone))]
91662#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91663pub enum SequenceType3Code {
91664	#[cfg_attr(feature = "derive_default", default)]
91665	#[cfg_attr( feature = "derive_serde", serde(rename = "FRST") )]
91666	CodeFRST,
91667	#[cfg_attr( feature = "derive_serde", serde(rename = "RCUR") )]
91668	CodeRCUR,
91669	#[cfg_attr( feature = "derive_serde", serde(rename = "FNAL") )]
91670	CodeFNAL,
91671	#[cfg_attr( feature = "derive_serde", serde(rename = "OOFF") )]
91672	CodeOOFF,
91673	#[cfg_attr( feature = "derive_serde", serde(rename = "RPRE") )]
91674	CodeRPRE,
91675}
91676
91677impl SequenceType3Code {
91678	pub fn validate(&self) -> Result<(), ValidationError> {
91679		Ok(())
91680	}
91681}
91682
91683
91684// ServiceAdjustmentType1Code ...
91685#[cfg_attr(feature = "derive_debug", derive(Debug))]
91686#[cfg_attr(feature = "derive_default", derive(Default))]
91687#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91688#[cfg_attr(feature = "derive_clone", derive(Clone))]
91689#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91690pub enum ServiceAdjustmentType1Code {
91691	#[cfg_attr(feature = "derive_default", default)]
91692	#[cfg_attr( feature = "derive_serde", serde(rename = "COMP") )]
91693	CodeCOMP,
91694	#[cfg_attr( feature = "derive_serde", serde(rename = "NCMP") )]
91695	CodeNCMP,
91696}
91697
91698impl ServiceAdjustmentType1Code {
91699	pub fn validate(&self) -> Result<(), ValidationError> {
91700		Ok(())
91701	}
91702}
91703
91704
91705// ServiceLevel8Choice ...
91706#[cfg_attr(feature = "derive_debug", derive(Debug))]
91707#[cfg_attr(feature = "derive_default", derive(Default))]
91708#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91709#[cfg_attr(feature = "derive_clone", derive(Clone))]
91710#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91711pub struct ServiceLevel8Choice {
91712	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
91713	pub cd: Option<String>,
91714	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
91715	pub prtry: Option<String>,
91716}
91717
91718impl ServiceLevel8Choice {
91719	pub fn validate(&self) -> Result<(), ValidationError> {
91720		if let Some(ref val) = self.cd {
91721			if val.chars().count() < 1 {
91722				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
91723			}
91724			if val.chars().count() > 4 {
91725				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
91726			}
91727		}
91728		if let Some(ref val) = self.prtry {
91729			if val.chars().count() < 1 {
91730				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
91731			}
91732			if val.chars().count() > 35 {
91733				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
91734			}
91735		}
91736		Ok(())
91737	}
91738}
91739
91740
91741// ServicePaymentMethod1Code ...
91742#[cfg_attr(feature = "derive_debug", derive(Debug))]
91743#[cfg_attr(feature = "derive_default", derive(Default))]
91744#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91745#[cfg_attr(feature = "derive_clone", derive(Clone))]
91746#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91747pub enum ServicePaymentMethod1Code {
91748	#[cfg_attr(feature = "derive_default", default)]
91749	#[cfg_attr( feature = "derive_serde", serde(rename = "BCMP") )]
91750	CodeBCMP,
91751	#[cfg_attr( feature = "derive_serde", serde(rename = "FLAT") )]
91752	CodeFLAT,
91753	#[cfg_attr( feature = "derive_serde", serde(rename = "PVCH") )]
91754	CodePVCH,
91755	#[cfg_attr( feature = "derive_serde", serde(rename = "INVS") )]
91756	CodeINVS,
91757	#[cfg_attr( feature = "derive_serde", serde(rename = "WVED") )]
91758	CodeWVED,
91759	#[cfg_attr( feature = "derive_serde", serde(rename = "FREE") )]
91760	CodeFREE,
91761}
91762
91763impl ServicePaymentMethod1Code {
91764	pub fn validate(&self) -> Result<(), ValidationError> {
91765		Ok(())
91766	}
91767}
91768
91769
91770// ServiceRequestStatus1Code ...
91771#[cfg_attr(feature = "derive_debug", derive(Debug))]
91772#[cfg_attr(feature = "derive_default", derive(Default))]
91773#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91774#[cfg_attr(feature = "derive_clone", derive(Clone))]
91775#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91776pub enum ServiceRequestStatus1Code {
91777	#[cfg_attr(feature = "derive_default", default)]
91778	#[cfg_attr( feature = "derive_serde", serde(rename = "ACPT") )]
91779	CodeACPT,
91780	#[cfg_attr( feature = "derive_serde", serde(rename = "RJCT") )]
91781	CodeRJCT,
91782}
91783
91784impl ServiceRequestStatus1Code {
91785	pub fn validate(&self) -> Result<(), ValidationError> {
91786		Ok(())
91787	}
91788}
91789
91790
91791// ServiceStatus1Choice ...
91792#[cfg_attr(feature = "derive_debug", derive(Debug))]
91793#[cfg_attr(feature = "derive_default", derive(Default))]
91794#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91795#[cfg_attr(feature = "derive_clone", derive(Clone))]
91796#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91797pub struct ServiceStatus1Choice {
91798	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
91799	pub cd: Option<ServiceRequestStatus1Code>,
91800	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
91801	pub prtry: Option<String>,
91802}
91803
91804impl ServiceStatus1Choice {
91805	pub fn validate(&self) -> Result<(), ValidationError> {
91806		if let Some(ref val) = self.cd { val.validate()? }
91807		if let Some(ref val) = self.prtry {
91808			if val.chars().count() < 1 {
91809				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
91810			}
91811			if val.chars().count() > 35 {
91812				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
91813			}
91814		}
91815		Ok(())
91816	}
91817}
91818
91819
91820// ServiceTaxDesignation1 ...
91821#[cfg_attr(feature = "derive_debug", derive(Debug))]
91822#[cfg_attr(feature = "derive_default", derive(Default))]
91823#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91824#[cfg_attr(feature = "derive_clone", derive(Clone))]
91825#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91826pub struct ServiceTaxDesignation1 {
91827	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
91828	pub cd: ServiceTaxDesignation1Code,
91829	#[cfg_attr( feature = "derive_serde", serde(rename = "Rgn", skip_serializing_if = "Option::is_none") )]
91830	pub rgn: Option<String>,
91831	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRsn", skip_serializing_if = "Option::is_none") )]
91832	pub tax_rsn: Option<Vec<TaxReason1>>,
91833}
91834
91835impl ServiceTaxDesignation1 {
91836	pub fn validate(&self) -> Result<(), ValidationError> {
91837		self.cd.validate()?;
91838		if let Some(ref val) = self.rgn {
91839			if val.chars().count() < 1 {
91840				return Err(ValidationError::new(1001, "rgn is shorter than the minimum length of 1".to_string()));
91841			}
91842			if val.chars().count() > 35 {
91843				return Err(ValidationError::new(1002, "rgn exceeds the maximum length of 35".to_string()));
91844			}
91845		}
91846		if let Some(ref vec) = self.tax_rsn { for item in vec { item.validate()? } }
91847		Ok(())
91848	}
91849}
91850
91851
91852// ServiceTaxDesignation1Code ...
91853#[cfg_attr(feature = "derive_debug", derive(Debug))]
91854#[cfg_attr(feature = "derive_default", derive(Default))]
91855#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91856#[cfg_attr(feature = "derive_clone", derive(Clone))]
91857#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91858pub enum ServiceTaxDesignation1Code {
91859	#[cfg_attr(feature = "derive_default", default)]
91860	#[cfg_attr( feature = "derive_serde", serde(rename = "XMPT") )]
91861	CodeXMPT,
91862	#[cfg_attr( feature = "derive_serde", serde(rename = "ZERO") )]
91863	CodeZERO,
91864	#[cfg_attr( feature = "derive_serde", serde(rename = "TAXE") )]
91865	CodeTAXE,
91866}
91867
91868impl ServiceTaxDesignation1Code {
91869	pub fn validate(&self) -> Result<(), ValidationError> {
91870		Ok(())
91871	}
91872}
91873
91874
91875// SettleStyle1Code ...
91876#[cfg_attr(feature = "derive_debug", derive(Debug))]
91877#[cfg_attr(feature = "derive_default", derive(Default))]
91878#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91879#[cfg_attr(feature = "derive_clone", derive(Clone))]
91880#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91881pub enum SettleStyle1Code {
91882	#[cfg_attr(feature = "derive_default", default)]
91883	#[cfg_attr( feature = "derive_serde", serde(rename = "SETC") )]
91884	CodeSETC,
91885	#[cfg_attr( feature = "derive_serde", serde(rename = "SETO") )]
91886	CodeSETO,
91887}
91888
91889impl SettleStyle1Code {
91890	pub fn validate(&self) -> Result<(), ValidationError> {
91891		Ok(())
91892	}
91893}
91894
91895
91896// SettleStyle2Choice ...
91897#[cfg_attr(feature = "derive_debug", derive(Debug))]
91898#[cfg_attr(feature = "derive_default", derive(Default))]
91899#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91900#[cfg_attr(feature = "derive_clone", derive(Clone))]
91901#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91902pub struct SettleStyle2Choice {
91903	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
91904	pub cd: Option<Vec<SettleStyle1Code>>,
91905	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
91906	pub prtry: Option<GenericIdentification30>,
91907}
91908
91909impl SettleStyle2Choice {
91910	pub fn validate(&self) -> Result<(), ValidationError> {
91911		if let Some(ref vec) = self.cd { for item in vec { item.validate()? } }
91912		if let Some(ref val) = self.prtry { val.validate()? }
91913		Ok(())
91914	}
91915}
91916
91917
91918// SettlementAccount1 ...
91919#[cfg_attr(feature = "derive_debug", derive(Debug))]
91920#[cfg_attr(feature = "derive_default", derive(Default))]
91921#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91922#[cfg_attr(feature = "derive_clone", derive(Clone))]
91923#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91924pub struct SettlementAccount1 {
91925	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
91926	pub id: GenericIdentification165,
91927	#[cfg_attr( feature = "derive_serde", serde(rename = "EndOfDayInitlMrgnClld") )]
91928	pub end_of_day_initl_mrgn_clld: AmountAndDirection102,
91929	#[cfg_attr( feature = "derive_serde", serde(rename = "EndOfDayVartnMrgnClld") )]
91930	pub end_of_day_vartn_mrgn_clld: AmountAndDirection102,
91931	#[cfg_attr( feature = "derive_serde", serde(rename = "EndOfDayDfltFndClld") )]
91932	pub end_of_day_dflt_fnd_clld: AmountAndDirection102,
91933	#[cfg_attr( feature = "derive_serde", serde(rename = "EndOfDaySttlmClld") )]
91934	pub end_of_day_sttlm_clld: AmountAndDirection102,
91935	#[cfg_attr( feature = "derive_serde", serde(rename = "EndOfDayOthrClld") )]
91936	pub end_of_day_othr_clld: AmountAndDirection102,
91937	#[cfg_attr( feature = "derive_serde", serde(rename = "EndOfDayLqdtyClld") )]
91938	pub end_of_day_lqdty_clld: AmountAndDirection102,
91939}
91940
91941impl SettlementAccount1 {
91942	pub fn validate(&self) -> Result<(), ValidationError> {
91943		self.id.validate()?;
91944		self.end_of_day_initl_mrgn_clld.validate()?;
91945		self.end_of_day_vartn_mrgn_clld.validate()?;
91946		self.end_of_day_dflt_fnd_clld.validate()?;
91947		self.end_of_day_sttlm_clld.validate()?;
91948		self.end_of_day_othr_clld.validate()?;
91949		self.end_of_day_lqdty_clld.validate()?;
91950		Ok(())
91951	}
91952}
91953
91954
91955// SettlementAgent2 ...
91956#[cfg_attr(feature = "derive_debug", derive(Debug))]
91957#[cfg_attr(feature = "derive_default", derive(Default))]
91958#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91959#[cfg_attr(feature = "derive_clone", derive(Clone))]
91960#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91961pub struct SettlementAgent2 {
91962	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
91963	pub id: String,
91964	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct") )]
91965	pub acct: Vec<PaymentAccount4>,
91966}
91967
91968impl SettlementAgent2 {
91969	pub fn validate(&self) -> Result<(), ValidationError> {
91970		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
91971		if !pattern.is_match(&self.id) {
91972			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
91973		}
91974		for item in &self.acct { item.validate()? }
91975		Ok(())
91976	}
91977}
91978
91979
91980// SettlementDailyFailureReason1Choice ...
91981#[cfg_attr(feature = "derive_debug", derive(Debug))]
91982#[cfg_attr(feature = "derive_default", derive(Default))]
91983#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
91984#[cfg_attr(feature = "derive_clone", derive(Clone))]
91985#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
91986pub struct SettlementDailyFailureReason1Choice {
91987	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
91988	pub data_set_actn: Option<ReportPeriodActivity1Code>,
91989	#[cfg_attr( feature = "derive_serde", serde(rename = "Data", skip_serializing_if = "Option::is_none") )]
91990	pub data: Option<SettlementDailyFailureReason3>,
91991}
91992
91993impl SettlementDailyFailureReason1Choice {
91994	pub fn validate(&self) -> Result<(), ValidationError> {
91995		if let Some(ref val) = self.data_set_actn { val.validate()? }
91996		if let Some(ref val) = self.data { val.validate()? }
91997		Ok(())
91998	}
91999}
92000
92001
92002// SettlementDailyFailureReason3 ...
92003#[cfg_attr(feature = "derive_debug", derive(Debug))]
92004#[cfg_attr(feature = "derive_default", derive(Default))]
92005#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92006#[cfg_attr(feature = "derive_clone", derive(Clone))]
92007#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92008pub struct SettlementDailyFailureReason3 {
92009	#[cfg_attr( feature = "derive_serde", serde(rename = "FaildScties") )]
92010	pub faild_scties: SettlementTotalData1Choice,
92011	#[cfg_attr( feature = "derive_serde", serde(rename = "FaildCsh") )]
92012	pub faild_csh: SettlementTotalData1Choice,
92013}
92014
92015impl SettlementDailyFailureReason3 {
92016	pub fn validate(&self) -> Result<(), ValidationError> {
92017		self.faild_scties.validate()?;
92018		self.faild_csh.validate()?;
92019		Ok(())
92020	}
92021}
92022
92023
92024// SettlementDataRate1Choice ...
92025#[cfg_attr(feature = "derive_debug", derive(Debug))]
92026#[cfg_attr(feature = "derive_default", derive(Default))]
92027#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92028#[cfg_attr(feature = "derive_clone", derive(Clone))]
92029#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92030pub struct SettlementDataRate1Choice {
92031	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfInstrs", skip_serializing_if = "Option::is_none") )]
92032	pub nb_of_instrs: Option<f64>,
92033	#[cfg_attr( feature = "derive_serde", serde(rename = "ValOfInstrs", skip_serializing_if = "Option::is_none") )]
92034	pub val_of_instrs: Option<f64>,
92035}
92036
92037impl SettlementDataRate1Choice {
92038	pub fn validate(&self) -> Result<(), ValidationError> {
92039		Ok(())
92040	}
92041}
92042
92043
92044// SettlementDataRate2 ...
92045#[cfg_attr(feature = "derive_debug", derive(Debug))]
92046#[cfg_attr(feature = "derive_default", derive(Default))]
92047#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92048#[cfg_attr(feature = "derive_clone", derive(Clone))]
92049#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92050pub struct SettlementDataRate2 {
92051	#[cfg_attr( feature = "derive_serde", serde(rename = "Vol") )]
92052	pub vol: f64,
92053	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
92054	pub val: f64,
92055}
92056
92057impl SettlementDataRate2 {
92058	pub fn validate(&self) -> Result<(), ValidationError> {
92059		Ok(())
92060	}
92061}
92062
92063
92064// SettlementDataVolume2 ...
92065#[cfg_attr(feature = "derive_debug", derive(Debug))]
92066#[cfg_attr(feature = "derive_default", derive(Default))]
92067#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92068#[cfg_attr(feature = "derive_clone", derive(Clone))]
92069#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92070pub struct SettlementDataVolume2 {
92071	#[cfg_attr( feature = "derive_serde", serde(rename = "Vol") )]
92072	pub vol: f64,
92073	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
92074	pub val: f64,
92075}
92076
92077impl SettlementDataVolume2 {
92078	pub fn validate(&self) -> Result<(), ValidationError> {
92079		Ok(())
92080	}
92081}
92082
92083
92084// SettlementDate6Code ...
92085#[cfg_attr(feature = "derive_debug", derive(Debug))]
92086#[cfg_attr(feature = "derive_default", derive(Default))]
92087#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92088#[cfg_attr(feature = "derive_clone", derive(Clone))]
92089#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92090pub enum SettlementDate6Code {
92091	#[cfg_attr(feature = "derive_default", default)]
92092	#[cfg_attr( feature = "derive_serde", serde(rename = "TFIV") )]
92093	CodeTFIV,
92094	#[cfg_attr( feature = "derive_serde", serde(rename = "TFOR") )]
92095	CodeTFOR,
92096	#[cfg_attr( feature = "derive_serde", serde(rename = "TONE") )]
92097	CodeTONE,
92098	#[cfg_attr( feature = "derive_serde", serde(rename = "TTRE") )]
92099	CodeTTRE,
92100	#[cfg_attr( feature = "derive_serde", serde(rename = "TTWO") )]
92101	CodeTTWO,
92102	#[cfg_attr( feature = "derive_serde", serde(rename = "SAMD") )]
92103	CodeSAMD,
92104}
92105
92106impl SettlementDate6Code {
92107	pub fn validate(&self) -> Result<(), ValidationError> {
92108		Ok(())
92109	}
92110}
92111
92112
92113// SettlementDateTimeIndication1 ...
92114#[cfg_attr(feature = "derive_debug", derive(Debug))]
92115#[cfg_attr(feature = "derive_default", derive(Default))]
92116#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92117#[cfg_attr(feature = "derive_clone", derive(Clone))]
92118#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92119pub struct SettlementDateTimeIndication1 {
92120	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtDtTm", skip_serializing_if = "Option::is_none") )]
92121	pub dbt_dt_tm: Option<String>,
92122	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDtTm", skip_serializing_if = "Option::is_none") )]
92123	pub cdt_dt_tm: Option<String>,
92124}
92125
92126impl SettlementDateTimeIndication1 {
92127	pub fn validate(&self) -> Result<(), ValidationError> {
92128		Ok(())
92129	}
92130}
92131
92132
92133// SettlementFailsCurrency2 ...
92134#[cfg_attr(feature = "derive_debug", derive(Debug))]
92135#[cfg_attr(feature = "derive_default", derive(Default))]
92136#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92137#[cfg_attr(feature = "derive_clone", derive(Clone))]
92138#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92139pub struct SettlementFailsCurrency2 {
92140	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
92141	pub ccy: String,
92142	#[cfg_attr( feature = "derive_serde", serde(rename = "Data") )]
92143	pub data: SettlementTotalData1,
92144}
92145
92146impl SettlementFailsCurrency2 {
92147	pub fn validate(&self) -> Result<(), ValidationError> {
92148		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
92149		if !pattern.is_match(&self.ccy) {
92150			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
92151		}
92152		self.data.validate()?;
92153		Ok(())
92154	}
92155}
92156
92157
92158// SettlementFailsDailyCSD1Choice ...
92159#[cfg_attr(feature = "derive_debug", derive(Debug))]
92160#[cfg_attr(feature = "derive_default", derive(Default))]
92161#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92162#[cfg_attr(feature = "derive_clone", derive(Clone))]
92163#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92164pub struct SettlementFailsDailyCSD1Choice {
92165	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
92166	pub data_set_actn: Option<ReportPeriodActivity1Code>,
92167	#[cfg_attr( feature = "derive_serde", serde(rename = "Data", skip_serializing_if = "Option::is_none") )]
92168	pub data: Option<SettlementFailsDailyCSD3>,
92169}
92170
92171impl SettlementFailsDailyCSD1Choice {
92172	pub fn validate(&self) -> Result<(), ValidationError> {
92173		if let Some(ref val) = self.data_set_actn { val.validate()? }
92174		if let Some(ref val) = self.data { val.validate()? }
92175		Ok(())
92176	}
92177}
92178
92179
92180// SettlementFailsDailyCSD3 ...
92181#[cfg_attr(feature = "derive_debug", derive(Debug))]
92182#[cfg_attr(feature = "derive_default", derive(Default))]
92183#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92184#[cfg_attr(feature = "derive_clone", derive(Clone))]
92185#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92186pub struct SettlementFailsDailyCSD3 {
92187	#[cfg_attr( feature = "derive_serde", serde(rename = "IntraCSD") )]
92188	pub intra_csd: SettlementFailsDailyInstructionType1Choice,
92189	#[cfg_attr( feature = "derive_serde", serde(rename = "CrossCSD") )]
92190	pub cross_csd: SettlementFailsDailyInstructionType1Choice,
92191}
92192
92193impl SettlementFailsDailyCSD3 {
92194	pub fn validate(&self) -> Result<(), ValidationError> {
92195		self.intra_csd.validate()?;
92196		self.cross_csd.validate()?;
92197		Ok(())
92198	}
92199}
92200
92201
92202// SettlementFailsDailyData3 ...
92203#[cfg_attr(feature = "derive_debug", derive(Debug))]
92204#[cfg_attr(feature = "derive_default", derive(Default))]
92205#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92206#[cfg_attr(feature = "derive_clone", derive(Clone))]
92207#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92208pub struct SettlementFailsDailyData3 {
92209	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDt") )]
92210	pub rptg_dt: String,
92211	#[cfg_attr( feature = "derive_serde", serde(rename = "DalyRcrd") )]
92212	pub daly_rcrd: SettlementFailsDailyInstrument3,
92213}
92214
92215impl SettlementFailsDailyData3 {
92216	pub fn validate(&self) -> Result<(), ValidationError> {
92217		self.daly_rcrd.validate()?;
92218		Ok(())
92219	}
92220}
92221
92222
92223// SettlementFailsDailyInstructionType1Choice ...
92224#[cfg_attr(feature = "derive_debug", derive(Debug))]
92225#[cfg_attr(feature = "derive_default", derive(Default))]
92226#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92227#[cfg_attr(feature = "derive_clone", derive(Clone))]
92228#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92229pub struct SettlementFailsDailyInstructionType1Choice {
92230	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
92231	pub data_set_actn: Option<ReportPeriodActivity1Code>,
92232	#[cfg_attr( feature = "derive_serde", serde(rename = "Data", skip_serializing_if = "Option::is_none") )]
92233	pub data: Option<SettlementFailsDailyInstructionType3>,
92234}
92235
92236impl SettlementFailsDailyInstructionType1Choice {
92237	pub fn validate(&self) -> Result<(), ValidationError> {
92238		if let Some(ref val) = self.data_set_actn { val.validate()? }
92239		if let Some(ref val) = self.data { val.validate()? }
92240		Ok(())
92241	}
92242}
92243
92244
92245// SettlementFailsDailyInstructionType3 ...
92246#[cfg_attr(feature = "derive_debug", derive(Debug))]
92247#[cfg_attr(feature = "derive_default", derive(Default))]
92248#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92249#[cfg_attr(feature = "derive_clone", derive(Clone))]
92250#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92251pub struct SettlementFailsDailyInstructionType3 {
92252	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryVrssPmt") )]
92253	pub dlvry_vrss_pmt: SettlementDailyFailureReason1Choice,
92254	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryWthPmt") )]
92255	pub dlvry_wth_pmt: SettlementDailyFailureReason1Choice,
92256	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtFreeOfDlvry") )]
92257	pub pmt_free_of_dlvry: SettlementDailyFailureReason1Choice,
92258	#[cfg_attr( feature = "derive_serde", serde(rename = "FreeOfPmt") )]
92259	pub free_of_pmt: SettlementDailyFailureReason1Choice,
92260}
92261
92262impl SettlementFailsDailyInstructionType3 {
92263	pub fn validate(&self) -> Result<(), ValidationError> {
92264		self.dlvry_vrss_pmt.validate()?;
92265		self.dlvry_wth_pmt.validate()?;
92266		self.pmt_free_of_dlvry.validate()?;
92267		self.free_of_pmt.validate()?;
92268		Ok(())
92269	}
92270}
92271
92272
92273// SettlementFailsDailyInstrument3 ...
92274#[cfg_attr(feature = "derive_debug", derive(Debug))]
92275#[cfg_attr(feature = "derive_default", derive(Default))]
92276#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92277#[cfg_attr(feature = "derive_clone", derive(Clone))]
92278#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92279pub struct SettlementFailsDailyInstrument3 {
92280	#[cfg_attr( feature = "derive_serde", serde(rename = "Eqty") )]
92281	pub eqty: SettlementFailsDailyTransactionType1Choice,
92282	#[cfg_attr( feature = "derive_serde", serde(rename = "SvrgnDebt") )]
92283	pub svrgn_debt: SettlementFailsDailyTransactionType1Choice,
92284	#[cfg_attr( feature = "derive_serde", serde(rename = "Bd") )]
92285	pub bd: SettlementFailsDailyTransactionType1Choice,
92286	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrTrfblScties") )]
92287	pub othr_trfbl_scties: SettlementFailsDailyTransactionType1Choice,
92288	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgTraddFnds") )]
92289	pub xchg_tradd_fnds: SettlementFailsDailyTransactionType1Choice,
92290	#[cfg_attr( feature = "derive_serde", serde(rename = "CllctvInvstmtUdrtkgs") )]
92291	pub cllctv_invstmt_udrtkgs: SettlementFailsDailyTransactionType1Choice,
92292	#[cfg_attr( feature = "derive_serde", serde(rename = "MnyMktInstrm") )]
92293	pub mny_mkt_instrm: SettlementFailsDailyTransactionType1Choice,
92294	#[cfg_attr( feature = "derive_serde", serde(rename = "EmssnAllwnc") )]
92295	pub emssn_allwnc: SettlementFailsDailyTransactionType1Choice,
92296	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr") )]
92297	pub othr: SettlementFailsDailyTransactionType1Choice,
92298}
92299
92300impl SettlementFailsDailyInstrument3 {
92301	pub fn validate(&self) -> Result<(), ValidationError> {
92302		self.eqty.validate()?;
92303		self.svrgn_debt.validate()?;
92304		self.bd.validate()?;
92305		self.othr_trfbl_scties.validate()?;
92306		self.xchg_tradd_fnds.validate()?;
92307		self.cllctv_invstmt_udrtkgs.validate()?;
92308		self.mny_mkt_instrm.validate()?;
92309		self.emssn_allwnc.validate()?;
92310		self.othr.validate()?;
92311		Ok(())
92312	}
92313}
92314
92315
92316// SettlementFailsDailyTransactionType1Choice ...
92317#[cfg_attr(feature = "derive_debug", derive(Debug))]
92318#[cfg_attr(feature = "derive_default", derive(Default))]
92319#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92320#[cfg_attr(feature = "derive_clone", derive(Clone))]
92321#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92322pub struct SettlementFailsDailyTransactionType1Choice {
92323	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
92324	pub data_set_actn: Option<ReportPeriodActivity1Code>,
92325	#[cfg_attr( feature = "derive_serde", serde(rename = "Data", skip_serializing_if = "Option::is_none") )]
92326	pub data: Option<SettlementFailsDailyTransactionType3>,
92327}
92328
92329impl SettlementFailsDailyTransactionType1Choice {
92330	pub fn validate(&self) -> Result<(), ValidationError> {
92331		if let Some(ref val) = self.data_set_actn { val.validate()? }
92332		if let Some(ref val) = self.data { val.validate()? }
92333		Ok(())
92334	}
92335}
92336
92337
92338// SettlementFailsDailyTransactionType3 ...
92339#[cfg_attr(feature = "derive_debug", derive(Debug))]
92340#[cfg_attr(feature = "derive_default", derive(Default))]
92341#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92342#[cfg_attr(feature = "derive_clone", derive(Clone))]
92343#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92344pub struct SettlementFailsDailyTransactionType3 {
92345	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesBuyOrSell") )]
92346	pub scties_buy_or_sell: SettlementFailsDailyCSD1Choice,
92347	#[cfg_attr( feature = "derive_serde", serde(rename = "CollMgmtOpr") )]
92348	pub coll_mgmt_opr: SettlementFailsDailyCSD1Choice,
92349	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesLndgOrBrrwg") )]
92350	pub scties_lndg_or_brrwg: SettlementFailsDailyCSD1Choice,
92351	#[cfg_attr( feature = "derive_serde", serde(rename = "RpAgrmt") )]
92352	pub rp_agrmt: SettlementFailsDailyCSD1Choice,
92353	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr") )]
92354	pub othr: SettlementFailsDailyCSD1Choice,
92355}
92356
92357impl SettlementFailsDailyTransactionType3 {
92358	pub fn validate(&self) -> Result<(), ValidationError> {
92359		self.scties_buy_or_sell.validate()?;
92360		self.coll_mgmt_opr.validate()?;
92361		self.scties_lndg_or_brrwg.validate()?;
92362		self.rp_agrmt.validate()?;
92363		self.othr.validate()?;
92364		Ok(())
92365	}
92366}
92367
92368
92369// SettlementFailsData3 ...
92370#[cfg_attr(feature = "derive_debug", derive(Debug))]
92371#[cfg_attr(feature = "derive_default", derive(Default))]
92372#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92373#[cfg_attr(feature = "derive_clone", derive(Clone))]
92374#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92375pub struct SettlementFailsData3 {
92376	#[cfg_attr( feature = "derive_serde", serde(rename = "Ttl") )]
92377	pub ttl: SettlementTotalData1,
92378	#[cfg_attr( feature = "derive_serde", serde(rename = "PtcptInFail", skip_serializing_if = "Option::is_none") )]
92379	pub ptcpt_in_fail: Option<SettlementFailsParticipantRange1>,
92380	#[cfg_attr( feature = "derive_serde", serde(rename = "FlsPerCcy", skip_serializing_if = "Option::is_none") )]
92381	pub fls_per_ccy: Option<Vec<SettlementFailsCurrency2>>,
92382	#[cfg_attr( feature = "derive_serde", serde(rename = "FlsPerFinInstrmTp", skip_serializing_if = "Option::is_none") )]
92383	pub fls_per_fin_instrm_tp: Option<SettlementFailsInstrument2>,
92384	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesInFail", skip_serializing_if = "Option::is_none") )]
92385	pub scties_in_fail: Option<SettlementFailsSecuritiesRange1>,
92386	#[cfg_attr( feature = "derive_serde", serde(rename = "FlsPerTxTp", skip_serializing_if = "Option::is_none") )]
92387	pub fls_per_tx_tp: Option<SettlementFailsTransactionType2>,
92388	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlSttlmPnlties", skip_serializing_if = "Option::is_none") )]
92389	pub ttl_sttlm_pnlties: Option<SettlementDataVolume2>,
92390	#[cfg_attr( feature = "derive_serde", serde(rename = "FailrRsn") )]
92391	pub failr_rsn: SettlementFailureReason3,
92392}
92393
92394impl SettlementFailsData3 {
92395	pub fn validate(&self) -> Result<(), ValidationError> {
92396		self.ttl.validate()?;
92397		if let Some(ref val) = self.ptcpt_in_fail { val.validate()? }
92398		if let Some(ref vec) = self.fls_per_ccy { for item in vec { item.validate()? } }
92399		if let Some(ref val) = self.fls_per_fin_instrm_tp { val.validate()? }
92400		if let Some(ref val) = self.scties_in_fail { val.validate()? }
92401		if let Some(ref val) = self.fls_per_tx_tp { val.validate()? }
92402		if let Some(ref val) = self.ttl_sttlm_pnlties { val.validate()? }
92403		self.failr_rsn.validate()?;
92404		Ok(())
92405	}
92406}
92407
92408
92409// SettlementFailsData4 ...
92410#[cfg_attr(feature = "derive_debug", derive(Debug))]
92411#[cfg_attr(feature = "derive_default", derive(Default))]
92412#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92413#[cfg_attr(feature = "derive_clone", derive(Clone))]
92414#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92415pub struct SettlementFailsData4 {
92416	#[cfg_attr( feature = "derive_serde", serde(rename = "Ttl") )]
92417	pub ttl: SettlementTotalData1,
92418	#[cfg_attr( feature = "derive_serde", serde(rename = "FailrRsn") )]
92419	pub failr_rsn: SettlementFailureReason3,
92420	#[cfg_attr( feature = "derive_serde", serde(rename = "ElgblForDrgtn") )]
92421	pub elgbl_for_drgtn: SettlementFailsDerogation1,
92422}
92423
92424impl SettlementFailsData4 {
92425	pub fn validate(&self) -> Result<(), ValidationError> {
92426		self.ttl.validate()?;
92427		self.failr_rsn.validate()?;
92428		self.elgbl_for_drgtn.validate()?;
92429		Ok(())
92430	}
92431}
92432
92433
92434// SettlementFailsDerogation1 ...
92435#[cfg_attr(feature = "derive_debug", derive(Debug))]
92436#[cfg_attr(feature = "derive_default", derive(Default))]
92437#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92438#[cfg_attr(feature = "derive_clone", derive(Clone))]
92439#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92440pub struct SettlementFailsDerogation1 {
92441	#[cfg_attr( feature = "derive_serde", serde(rename = "ElgbltyInd") )]
92442	pub elgblty_ind: bool,
92443	#[cfg_attr( feature = "derive_serde", serde(rename = "Justfn", skip_serializing_if = "Option::is_none") )]
92444	pub justfn: Option<SettlementFailsJustification1>,
92445}
92446
92447impl SettlementFailsDerogation1 {
92448	pub fn validate(&self) -> Result<(), ValidationError> {
92449		if let Some(ref val) = self.justfn { val.validate()? }
92450		Ok(())
92451	}
92452}
92453
92454
92455// SettlementFailsInstrument2 ...
92456#[cfg_attr(feature = "derive_debug", derive(Debug))]
92457#[cfg_attr(feature = "derive_default", derive(Default))]
92458#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92459#[cfg_attr(feature = "derive_clone", derive(Clone))]
92460#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92461pub struct SettlementFailsInstrument2 {
92462	#[cfg_attr( feature = "derive_serde", serde(rename = "Eqty") )]
92463	pub eqty: SettlementTotalData1Choice,
92464	#[cfg_attr( feature = "derive_serde", serde(rename = "SvrgnDebt") )]
92465	pub svrgn_debt: SettlementTotalData1Choice,
92466	#[cfg_attr( feature = "derive_serde", serde(rename = "Bd") )]
92467	pub bd: SettlementTotalData1Choice,
92468	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrTrfblScties") )]
92469	pub othr_trfbl_scties: SettlementTotalData1Choice,
92470	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgTraddFnds") )]
92471	pub xchg_tradd_fnds: SettlementTotalData1Choice,
92472	#[cfg_attr( feature = "derive_serde", serde(rename = "CllctvInvstmtUdrtkgs") )]
92473	pub cllctv_invstmt_udrtkgs: SettlementTotalData1Choice,
92474	#[cfg_attr( feature = "derive_serde", serde(rename = "MnyMktInstrm") )]
92475	pub mny_mkt_instrm: SettlementTotalData1Choice,
92476	#[cfg_attr( feature = "derive_serde", serde(rename = "EmssnAllwnc") )]
92477	pub emssn_allwnc: SettlementTotalData1Choice,
92478	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr") )]
92479	pub othr: SettlementTotalData1Choice,
92480}
92481
92482impl SettlementFailsInstrument2 {
92483	pub fn validate(&self) -> Result<(), ValidationError> {
92484		self.eqty.validate()?;
92485		self.svrgn_debt.validate()?;
92486		self.bd.validate()?;
92487		self.othr_trfbl_scties.validate()?;
92488		self.xchg_tradd_fnds.validate()?;
92489		self.cllctv_invstmt_udrtkgs.validate()?;
92490		self.mny_mkt_instrm.validate()?;
92491		self.emssn_allwnc.validate()?;
92492		self.othr.validate()?;
92493		Ok(())
92494	}
92495}
92496
92497
92498// SettlementFailsJustification1 ...
92499#[cfg_attr(feature = "derive_debug", derive(Debug))]
92500#[cfg_attr(feature = "derive_default", derive(Default))]
92501#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92502#[cfg_attr(feature = "derive_clone", derive(Clone))]
92503#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92504pub struct SettlementFailsJustification1 {
92505	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
92506	pub val: f64,
92507	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate") )]
92508	pub rate: SettlementDataRate1Choice,
92509}
92510
92511impl SettlementFailsJustification1 {
92512	pub fn validate(&self) -> Result<(), ValidationError> {
92513		self.rate.validate()?;
92514		Ok(())
92515	}
92516}
92517
92518
92519// SettlementFailsParticipant1 ...
92520#[cfg_attr(feature = "derive_debug", derive(Debug))]
92521#[cfg_attr(feature = "derive_default", derive(Default))]
92522#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92523#[cfg_attr(feature = "derive_clone", derive(Clone))]
92524#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92525pub struct SettlementFailsParticipant1 {
92526	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI") )]
92527	pub lei: String,
92528	#[cfg_attr( feature = "derive_serde", serde(rename = "Rank") )]
92529	pub rank: String,
92530	#[cfg_attr( feature = "derive_serde", serde(rename = "Aggt") )]
92531	pub aggt: SettlementTotalData1,
92532}
92533
92534impl SettlementFailsParticipant1 {
92535	pub fn validate(&self) -> Result<(), ValidationError> {
92536		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
92537		if !pattern.is_match(&self.lei) {
92538			return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
92539		}
92540		let pattern = Regex::new("[0-9]{1,2}").unwrap();
92541		if !pattern.is_match(&self.rank) {
92542			return Err(ValidationError::new(1005, "rank does not match the required pattern".to_string()));
92543		}
92544		self.aggt.validate()?;
92545		Ok(())
92546	}
92547}
92548
92549
92550// SettlementFailsParticipantRange1 ...
92551#[cfg_attr(feature = "derive_debug", derive(Debug))]
92552#[cfg_attr(feature = "derive_default", derive(Default))]
92553#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92554#[cfg_attr(feature = "derive_clone", derive(Clone))]
92555#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92556pub struct SettlementFailsParticipantRange1 {
92557	#[cfg_attr( feature = "derive_serde", serde(rename = "HghstInVol") )]
92558	pub hghst_in_vol: Vec<SettlementFailsParticipant1>,
92559	#[cfg_attr( feature = "derive_serde", serde(rename = "HghstInVal") )]
92560	pub hghst_in_val: Vec<SettlementFailsParticipant1>,
92561}
92562
92563impl SettlementFailsParticipantRange1 {
92564	pub fn validate(&self) -> Result<(), ValidationError> {
92565		for item in &self.hghst_in_vol { item.validate()? }
92566		for item in &self.hghst_in_val { item.validate()? }
92567		Ok(())
92568	}
92569}
92570
92571
92572// SettlementFailsReportHeader2 ...
92573#[cfg_attr(feature = "derive_debug", derive(Debug))]
92574#[cfg_attr(feature = "derive_default", derive(Default))]
92575#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92576#[cfg_attr(feature = "derive_clone", derive(Clone))]
92577#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92578pub struct SettlementFailsReportHeader2 {
92579	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
92580	pub cre_dt_tm: String,
92581	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPrd") )]
92582	pub rptg_prd: DatePeriod2,
92583	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
92584	pub ccy: String,
92585	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSts") )]
92586	pub rpt_sts: TransactionOperationType4Code,
92587	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesSttlmSys") )]
92588	pub scties_sttlm_sys: SecuritiesSettlementSystemIdentification2,
92589}
92590
92591impl SettlementFailsReportHeader2 {
92592	pub fn validate(&self) -> Result<(), ValidationError> {
92593		self.rptg_prd.validate()?;
92594		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
92595		if !pattern.is_match(&self.ccy) {
92596			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
92597		}
92598		self.rpt_sts.validate()?;
92599		self.scties_sttlm_sys.validate()?;
92600		Ok(())
92601	}
92602}
92603
92604
92605// SettlementFailsSecurities1 ...
92606#[cfg_attr(feature = "derive_debug", derive(Debug))]
92607#[cfg_attr(feature = "derive_default", derive(Default))]
92608#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92609#[cfg_attr(feature = "derive_clone", derive(Clone))]
92610#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92611pub struct SettlementFailsSecurities1 {
92612	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId") )]
92613	pub fin_instrm_id: SecurityIdentification19,
92614	#[cfg_attr( feature = "derive_serde", serde(rename = "Rank") )]
92615	pub rank: String,
92616}
92617
92618impl SettlementFailsSecurities1 {
92619	pub fn validate(&self) -> Result<(), ValidationError> {
92620		self.fin_instrm_id.validate()?;
92621		let pattern = Regex::new("[0-9]{1,2}").unwrap();
92622		if !pattern.is_match(&self.rank) {
92623			return Err(ValidationError::new(1005, "rank does not match the required pattern".to_string()));
92624		}
92625		Ok(())
92626	}
92627}
92628
92629
92630// SettlementFailsSecuritiesRange1 ...
92631#[cfg_attr(feature = "derive_debug", derive(Debug))]
92632#[cfg_attr(feature = "derive_default", derive(Default))]
92633#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92634#[cfg_attr(feature = "derive_clone", derive(Clone))]
92635#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92636pub struct SettlementFailsSecuritiesRange1 {
92637	#[cfg_attr( feature = "derive_serde", serde(rename = "HghstInVol") )]
92638	pub hghst_in_vol: Vec<SettlementFailsSecurities1>,
92639	#[cfg_attr( feature = "derive_serde", serde(rename = "HghstInVal") )]
92640	pub hghst_in_val: Vec<SettlementFailsSecurities1>,
92641}
92642
92643impl SettlementFailsSecuritiesRange1 {
92644	pub fn validate(&self) -> Result<(), ValidationError> {
92645		for item in &self.hghst_in_vol { item.validate()? }
92646		for item in &self.hghst_in_val { item.validate()? }
92647		Ok(())
92648	}
92649}
92650
92651
92652// SettlementFailsTransactionType2 ...
92653#[cfg_attr(feature = "derive_debug", derive(Debug))]
92654#[cfg_attr(feature = "derive_default", derive(Default))]
92655#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92656#[cfg_attr(feature = "derive_clone", derive(Clone))]
92657#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92658pub struct SettlementFailsTransactionType2 {
92659	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesBuyOrSell") )]
92660	pub scties_buy_or_sell: SettlementTotalData1Choice,
92661	#[cfg_attr( feature = "derive_serde", serde(rename = "CollMgmtOpr") )]
92662	pub coll_mgmt_opr: SettlementTotalData1Choice,
92663	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesLndgOrBrrwg") )]
92664	pub scties_lndg_or_brrwg: SettlementTotalData1Choice,
92665	#[cfg_attr( feature = "derive_serde", serde(rename = "RpAgrmt") )]
92666	pub rp_agrmt: SettlementTotalData1Choice,
92667	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr") )]
92668	pub othr: SettlementTotalData1Choice,
92669}
92670
92671impl SettlementFailsTransactionType2 {
92672	pub fn validate(&self) -> Result<(), ValidationError> {
92673		self.scties_buy_or_sell.validate()?;
92674		self.coll_mgmt_opr.validate()?;
92675		self.scties_lndg_or_brrwg.validate()?;
92676		self.rp_agrmt.validate()?;
92677		self.othr.validate()?;
92678		Ok(())
92679	}
92680}
92681
92682
92683// SettlementFailureReason2 ...
92684#[cfg_attr(feature = "derive_debug", derive(Debug))]
92685#[cfg_attr(feature = "derive_default", derive(Default))]
92686#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92687#[cfg_attr(feature = "derive_clone", derive(Clone))]
92688#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92689pub struct SettlementFailureReason2 {
92690	#[cfg_attr( feature = "derive_serde", serde(rename = "MainRsns") )]
92691	pub main_rsns: String,
92692	#[cfg_attr( feature = "derive_serde", serde(rename = "EffcncyImprvmt") )]
92693	pub effcncy_imprvmt: String,
92694}
92695
92696impl SettlementFailureReason2 {
92697	pub fn validate(&self) -> Result<(), ValidationError> {
92698		if self.main_rsns.chars().count() < 1 {
92699			return Err(ValidationError::new(1001, "main_rsns is shorter than the minimum length of 1".to_string()));
92700		}
92701		if self.main_rsns.chars().count() > 2048 {
92702			return Err(ValidationError::new(1002, "main_rsns exceeds the maximum length of 2048".to_string()));
92703		}
92704		if self.effcncy_imprvmt.chars().count() < 1 {
92705			return Err(ValidationError::new(1001, "effcncy_imprvmt is shorter than the minimum length of 1".to_string()));
92706		}
92707		if self.effcncy_imprvmt.chars().count() > 2048 {
92708			return Err(ValidationError::new(1002, "effcncy_imprvmt exceeds the maximum length of 2048".to_string()));
92709		}
92710		Ok(())
92711	}
92712}
92713
92714
92715// SettlementFailureReason3 ...
92716#[cfg_attr(feature = "derive_debug", derive(Debug))]
92717#[cfg_attr(feature = "derive_default", derive(Default))]
92718#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92719#[cfg_attr(feature = "derive_clone", derive(Clone))]
92720#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92721pub struct SettlementFailureReason3 {
92722	#[cfg_attr( feature = "derive_serde", serde(rename = "AvrgDrtn", skip_serializing_if = "Option::is_none") )]
92723	pub avrg_drtn: Option<f64>,
92724	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc") )]
92725	pub desc: Vec<SettlementFailureReason2>,
92726}
92727
92728impl SettlementFailureReason3 {
92729	pub fn validate(&self) -> Result<(), ValidationError> {
92730		for item in &self.desc { item.validate()? }
92731		Ok(())
92732	}
92733}
92734
92735
92736// SettlementFrequency1Choice ...
92737#[cfg_attr(feature = "derive_debug", derive(Debug))]
92738#[cfg_attr(feature = "derive_default", derive(Default))]
92739#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92740#[cfg_attr(feature = "derive_clone", derive(Clone))]
92741#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92742pub struct SettlementFrequency1Choice {
92743	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
92744	pub cd: Option<EventFrequency10Code>,
92745	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
92746	pub prtry: Option<GenericIdentification47>,
92747}
92748
92749impl SettlementFrequency1Choice {
92750	pub fn validate(&self) -> Result<(), ValidationError> {
92751		if let Some(ref val) = self.cd { val.validate()? }
92752		if let Some(ref val) = self.prtry { val.validate()? }
92753		Ok(())
92754	}
92755}
92756
92757
92758// SettlementInformation17 ...
92759#[cfg_attr(feature = "derive_debug", derive(Debug))]
92760#[cfg_attr(feature = "derive_default", derive(Default))]
92761#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92762#[cfg_attr(feature = "derive_clone", derive(Clone))]
92763#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92764pub struct SettlementInformation17 {
92765	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesQtyTp", skip_serializing_if = "Option::is_none") )]
92766	pub scties_qty_tp: Option<SettlementUnitType3Choice>,
92767	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctSttlmMnth", skip_serializing_if = "Option::is_none") )]
92768	pub ctrct_sttlm_mnth: Option<String>,
92769	#[cfg_attr( feature = "derive_serde", serde(rename = "MinDnmtn", skip_serializing_if = "Option::is_none") )]
92770	pub min_dnmtn: Option<FinancialInstrumentQuantity1Choice>,
92771	#[cfg_attr( feature = "derive_serde", serde(rename = "MinMltplQty", skip_serializing_if = "Option::is_none") )]
92772	pub min_mltpl_qty: Option<FinancialInstrumentQuantity1Choice>,
92773	#[cfg_attr( feature = "derive_serde", serde(rename = "DevtgSttlmUnit", skip_serializing_if = "Option::is_none") )]
92774	pub devtg_sttlm_unit: Option<Vec<FinancialInstrumentQuantity1Choice>>,
92775}
92776
92777impl SettlementInformation17 {
92778	pub fn validate(&self) -> Result<(), ValidationError> {
92779		if let Some(ref val) = self.scties_qty_tp { val.validate()? }
92780		if let Some(ref val) = self.min_dnmtn { val.validate()? }
92781		if let Some(ref val) = self.min_mltpl_qty { val.validate()? }
92782		if let Some(ref vec) = self.devtg_sttlm_unit { for item in vec { item.validate()? } }
92783		Ok(())
92784	}
92785}
92786
92787
92788// SettlementInstruction11 ...
92789#[cfg_attr(feature = "derive_debug", derive(Debug))]
92790#[cfg_attr(feature = "derive_default", derive(Default))]
92791#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92792#[cfg_attr(feature = "derive_clone", derive(Clone))]
92793#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92794pub struct SettlementInstruction11 {
92795	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmMtd") )]
92796	pub sttlm_mtd: SettlementMethod1Code,
92797	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmAcct", skip_serializing_if = "Option::is_none") )]
92798	pub sttlm_acct: Option<CashAccount40>,
92799	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSys", skip_serializing_if = "Option::is_none") )]
92800	pub clr_sys: Option<ClearingSystemIdentification3Choice>,
92801	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgRmbrsmntAgt", skip_serializing_if = "Option::is_none") )]
92802	pub instg_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification6>,
92803	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgRmbrsmntAgtAcct", skip_serializing_if = "Option::is_none") )]
92804	pub instg_rmbrsmnt_agt_acct: Option<CashAccount40>,
92805	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdRmbrsmntAgt", skip_serializing_if = "Option::is_none") )]
92806	pub instd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification6>,
92807	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdRmbrsmntAgtAcct", skip_serializing_if = "Option::is_none") )]
92808	pub instd_rmbrsmnt_agt_acct: Option<CashAccount40>,
92809	#[cfg_attr( feature = "derive_serde", serde(rename = "ThrdRmbrsmntAgt", skip_serializing_if = "Option::is_none") )]
92810	pub thrd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification6>,
92811	#[cfg_attr( feature = "derive_serde", serde(rename = "ThrdRmbrsmntAgtAcct", skip_serializing_if = "Option::is_none") )]
92812	pub thrd_rmbrsmnt_agt_acct: Option<CashAccount40>,
92813}
92814
92815impl SettlementInstruction11 {
92816	pub fn validate(&self) -> Result<(), ValidationError> {
92817		self.sttlm_mtd.validate()?;
92818		if let Some(ref val) = self.sttlm_acct { val.validate()? }
92819		if let Some(ref val) = self.clr_sys { val.validate()? }
92820		if let Some(ref val) = self.instg_rmbrsmnt_agt { val.validate()? }
92821		if let Some(ref val) = self.instg_rmbrsmnt_agt_acct { val.validate()? }
92822		if let Some(ref val) = self.instd_rmbrsmnt_agt { val.validate()? }
92823		if let Some(ref val) = self.instd_rmbrsmnt_agt_acct { val.validate()? }
92824		if let Some(ref val) = self.thrd_rmbrsmnt_agt { val.validate()? }
92825		if let Some(ref val) = self.thrd_rmbrsmnt_agt_acct { val.validate()? }
92826		Ok(())
92827	}
92828}
92829
92830
92831// SettlementInstruction14 ...
92832#[cfg_attr(feature = "derive_debug", derive(Debug))]
92833#[cfg_attr(feature = "derive_default", derive(Default))]
92834#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92835#[cfg_attr(feature = "derive_clone", derive(Clone))]
92836#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92837pub struct SettlementInstruction14 {
92838	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmMtd") )]
92839	pub sttlm_mtd: SettlementMethod2Code,
92840	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmAcct", skip_serializing_if = "Option::is_none") )]
92841	pub sttlm_acct: Option<CashAccount40>,
92842	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSys", skip_serializing_if = "Option::is_none") )]
92843	pub clr_sys: Option<ClearingSystemIdentification3Choice>,
92844}
92845
92846impl SettlementInstruction14 {
92847	pub fn validate(&self) -> Result<(), ValidationError> {
92848		self.sttlm_mtd.validate()?;
92849		if let Some(ref val) = self.sttlm_acct { val.validate()? }
92850		if let Some(ref val) = self.clr_sys { val.validate()? }
92851		Ok(())
92852	}
92853}
92854
92855
92856// SettlementInstruction15 ...
92857#[cfg_attr(feature = "derive_debug", derive(Debug))]
92858#[cfg_attr(feature = "derive_default", derive(Default))]
92859#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92860#[cfg_attr(feature = "derive_clone", derive(Clone))]
92861#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92862pub struct SettlementInstruction15 {
92863	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmMtd") )]
92864	pub sttlm_mtd: SettlementMethod1Code,
92865	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmAcct", skip_serializing_if = "Option::is_none") )]
92866	pub sttlm_acct: Option<CashAccount40>,
92867	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSys", skip_serializing_if = "Option::is_none") )]
92868	pub clr_sys: Option<ClearingSystemIdentification3Choice>,
92869	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgRmbrsmntAgt", skip_serializing_if = "Option::is_none") )]
92870	pub instg_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification8>,
92871	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgRmbrsmntAgtAcct", skip_serializing_if = "Option::is_none") )]
92872	pub instg_rmbrsmnt_agt_acct: Option<CashAccount40>,
92873	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdRmbrsmntAgt", skip_serializing_if = "Option::is_none") )]
92874	pub instd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification8>,
92875	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdRmbrsmntAgtAcct", skip_serializing_if = "Option::is_none") )]
92876	pub instd_rmbrsmnt_agt_acct: Option<CashAccount40>,
92877	#[cfg_attr( feature = "derive_serde", serde(rename = "ThrdRmbrsmntAgt", skip_serializing_if = "Option::is_none") )]
92878	pub thrd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification8>,
92879	#[cfg_attr( feature = "derive_serde", serde(rename = "ThrdRmbrsmntAgtAcct", skip_serializing_if = "Option::is_none") )]
92880	pub thrd_rmbrsmnt_agt_acct: Option<CashAccount40>,
92881}
92882
92883impl SettlementInstruction15 {
92884	pub fn validate(&self) -> Result<(), ValidationError> {
92885		self.sttlm_mtd.validate()?;
92886		if let Some(ref val) = self.sttlm_acct { val.validate()? }
92887		if let Some(ref val) = self.clr_sys { val.validate()? }
92888		if let Some(ref val) = self.instg_rmbrsmnt_agt { val.validate()? }
92889		if let Some(ref val) = self.instg_rmbrsmnt_agt_acct { val.validate()? }
92890		if let Some(ref val) = self.instd_rmbrsmnt_agt { val.validate()? }
92891		if let Some(ref val) = self.instd_rmbrsmnt_agt_acct { val.validate()? }
92892		if let Some(ref val) = self.thrd_rmbrsmnt_agt { val.validate()? }
92893		if let Some(ref val) = self.thrd_rmbrsmnt_agt_acct { val.validate()? }
92894		Ok(())
92895	}
92896}
92897
92898
92899// SettlementInstruction16 ...
92900#[cfg_attr(feature = "derive_debug", derive(Debug))]
92901#[cfg_attr(feature = "derive_default", derive(Default))]
92902#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92903#[cfg_attr(feature = "derive_clone", derive(Clone))]
92904#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92905pub struct SettlementInstruction16 {
92906	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgRmbrsmntAgt", skip_serializing_if = "Option::is_none") )]
92907	pub instg_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification8>,
92908	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgRmbrsmntAgtAcct", skip_serializing_if = "Option::is_none") )]
92909	pub instg_rmbrsmnt_agt_acct: Option<CashAccount40>,
92910	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdRmbrsmntAgt", skip_serializing_if = "Option::is_none") )]
92911	pub instd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification8>,
92912	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdRmbrsmntAgtAcct", skip_serializing_if = "Option::is_none") )]
92913	pub instd_rmbrsmnt_agt_acct: Option<CashAccount40>,
92914}
92915
92916impl SettlementInstruction16 {
92917	pub fn validate(&self) -> Result<(), ValidationError> {
92918		if let Some(ref val) = self.instg_rmbrsmnt_agt { val.validate()? }
92919		if let Some(ref val) = self.instg_rmbrsmnt_agt_acct { val.validate()? }
92920		if let Some(ref val) = self.instd_rmbrsmnt_agt { val.validate()? }
92921		if let Some(ref val) = self.instd_rmbrsmnt_agt_acct { val.validate()? }
92922		Ok(())
92923	}
92924}
92925
92926
92927// SettlementInstructionReason1Choice ...
92928#[cfg_attr(feature = "derive_debug", derive(Debug))]
92929#[cfg_attr(feature = "derive_default", derive(Default))]
92930#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92931#[cfg_attr(feature = "derive_clone", derive(Clone))]
92932#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92933pub struct SettlementInstructionReason1Choice {
92934	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
92935	pub cd: Option<SettlementInstructionReason1Code>,
92936	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
92937	pub prtry: Option<GenericIdentification47>,
92938}
92939
92940impl SettlementInstructionReason1Choice {
92941	pub fn validate(&self) -> Result<(), ValidationError> {
92942		if let Some(ref val) = self.cd { val.validate()? }
92943		if let Some(ref val) = self.prtry { val.validate()? }
92944		Ok(())
92945	}
92946}
92947
92948
92949// SettlementInstructionReason1Code ...
92950#[cfg_attr(feature = "derive_debug", derive(Debug))]
92951#[cfg_attr(feature = "derive_default", derive(Default))]
92952#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92953#[cfg_attr(feature = "derive_clone", derive(Clone))]
92954#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
92955pub enum SettlementInstructionReason1Code {
92956	#[cfg_attr(feature = "derive_default", default)]
92957	#[cfg_attr( feature = "derive_serde", serde(rename = "CSHI") )]
92958	CodeCSHI,
92959	#[cfg_attr( feature = "derive_serde", serde(rename = "ALLL") )]
92960	CodeALLL,
92961	#[cfg_attr( feature = "derive_serde", serde(rename = "CSHO") )]
92962	CodeCSHO,
92963	#[cfg_attr( feature = "derive_serde", serde(rename = "CHAR") )]
92964	CodeCHAR,
92965	#[cfg_attr( feature = "derive_serde", serde(rename = "DIVI") )]
92966	CodeDIVI,
92967	#[cfg_attr( feature = "derive_serde", serde(rename = "INTE") )]
92968	CodeINTE,
92969	#[cfg_attr( feature = "derive_serde", serde(rename = "SAVP") )]
92970	CodeSAVP,
92971	#[cfg_attr( feature = "derive_serde", serde(rename = "REDM") )]
92972	CodeREDM,
92973	#[cfg_attr( feature = "derive_serde", serde(rename = "SAVE") )]
92974	CodeSAVE,
92975	#[cfg_attr( feature = "derive_serde", serde(rename = "BUYI") )]
92976	CodeBUYI,
92977	#[cfg_attr( feature = "derive_serde", serde(rename = "SELL") )]
92978	CodeSELL,
92979	#[cfg_attr( feature = "derive_serde", serde(rename = "SUBS") )]
92980	CodeSUBS,
92981	#[cfg_attr( feature = "derive_serde", serde(rename = "WTHP") )]
92982	CodeWTHP,
92983	#[cfg_attr( feature = "derive_serde", serde(rename = "CORP") )]
92984	CodeCORP,
92985}
92986
92987impl SettlementInstructionReason1Code {
92988	pub fn validate(&self) -> Result<(), ValidationError> {
92989		Ok(())
92990	}
92991}
92992
92993
92994// SettlementInternaliser1 ...
92995#[cfg_attr(feature = "derive_debug", derive(Debug))]
92996#[cfg_attr(feature = "derive_default", derive(Default))]
92997#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
92998#[cfg_attr(feature = "derive_clone", derive(Clone))]
92999#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93000pub struct SettlementInternaliser1 {
93001	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
93002	pub id: SettlementInternaliserIdentification1,
93003	#[cfg_attr( feature = "derive_serde", serde(rename = "OvrllTtl") )]
93004	pub ovrll_ttl: InternalisationData1,
93005	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrm") )]
93006	pub fin_instrm: SettlementInternaliserFinancialInstrument1,
93007	#[cfg_attr( feature = "derive_serde", serde(rename = "TxTp") )]
93008	pub tx_tp: SettlementInternaliserTransactionType1,
93009	#[cfg_attr( feature = "derive_serde", serde(rename = "ClntTp") )]
93010	pub clnt_tp: SettlementInternaliserClientType1,
93011	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlCshTrf") )]
93012	pub ttl_csh_trf: InternalisationData1,
93013}
93014
93015impl SettlementInternaliser1 {
93016	pub fn validate(&self) -> Result<(), ValidationError> {
93017		self.id.validate()?;
93018		self.ovrll_ttl.validate()?;
93019		self.fin_instrm.validate()?;
93020		self.tx_tp.validate()?;
93021		self.clnt_tp.validate()?;
93022		self.ttl_csh_trf.validate()?;
93023		Ok(())
93024	}
93025}
93026
93027
93028// SettlementInternaliserClientType1 ...
93029#[cfg_attr(feature = "derive_debug", derive(Debug))]
93030#[cfg_attr(feature = "derive_default", derive(Default))]
93031#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93032#[cfg_attr(feature = "derive_clone", derive(Clone))]
93033#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93034pub struct SettlementInternaliserClientType1 {
93035	#[cfg_attr( feature = "derive_serde", serde(rename = "Prfssnl") )]
93036	pub prfssnl: InternalisationData1,
93037	#[cfg_attr( feature = "derive_serde", serde(rename = "Rtl") )]
93038	pub rtl: InternalisationData1,
93039}
93040
93041impl SettlementInternaliserClientType1 {
93042	pub fn validate(&self) -> Result<(), ValidationError> {
93043		self.prfssnl.validate()?;
93044		self.rtl.validate()?;
93045		Ok(())
93046	}
93047}
93048
93049
93050// SettlementInternaliserFinancialInstrument1 ...
93051#[cfg_attr(feature = "derive_debug", derive(Debug))]
93052#[cfg_attr(feature = "derive_default", derive(Default))]
93053#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93054#[cfg_attr(feature = "derive_clone", derive(Clone))]
93055#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93056pub struct SettlementInternaliserFinancialInstrument1 {
93057	#[cfg_attr( feature = "derive_serde", serde(rename = "Eqty") )]
93058	pub eqty: InternalisationData1,
93059	#[cfg_attr( feature = "derive_serde", serde(rename = "SvrgnDebt") )]
93060	pub svrgn_debt: InternalisationData1,
93061	#[cfg_attr( feature = "derive_serde", serde(rename = "Bd") )]
93062	pub bd: InternalisationData1,
93063	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrTrfblScties") )]
93064	pub othr_trfbl_scties: InternalisationData1,
93065	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgTradgFnds") )]
93066	pub xchg_tradg_fnds: InternalisationData1,
93067	#[cfg_attr( feature = "derive_serde", serde(rename = "CllctvInvstmtUdrtkgs") )]
93068	pub cllctv_invstmt_udrtkgs: InternalisationData1,
93069	#[cfg_attr( feature = "derive_serde", serde(rename = "MnyMktInstrm") )]
93070	pub mny_mkt_instrm: InternalisationData1,
93071	#[cfg_attr( feature = "derive_serde", serde(rename = "EmssnAllwnc") )]
93072	pub emssn_allwnc: InternalisationData1,
93073	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrFinInstrms") )]
93074	pub othr_fin_instrms: InternalisationData1,
93075}
93076
93077impl SettlementInternaliserFinancialInstrument1 {
93078	pub fn validate(&self) -> Result<(), ValidationError> {
93079		self.eqty.validate()?;
93080		self.svrgn_debt.validate()?;
93081		self.bd.validate()?;
93082		self.othr_trfbl_scties.validate()?;
93083		self.xchg_tradg_fnds.validate()?;
93084		self.cllctv_invstmt_udrtkgs.validate()?;
93085		self.mny_mkt_instrm.validate()?;
93086		self.emssn_allwnc.validate()?;
93087		self.othr_fin_instrms.validate()?;
93088		Ok(())
93089	}
93090}
93091
93092
93093// SettlementInternaliserIdentification1 ...
93094#[cfg_attr(feature = "derive_debug", derive(Debug))]
93095#[cfg_attr(feature = "derive_default", derive(Default))]
93096#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93097#[cfg_attr(feature = "derive_clone", derive(Clone))]
93098#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93099pub struct SettlementInternaliserIdentification1 {
93100	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI") )]
93101	pub lei: String,
93102	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnsblPrsn") )]
93103	pub rspnsbl_prsn: ContactDetails4,
93104	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry") )]
93105	pub ctry: String,
93106	#[cfg_attr( feature = "derive_serde", serde(rename = "BrnchId", skip_serializing_if = "Option::is_none") )]
93107	pub brnch_id: Option<String>,
93108}
93109
93110impl SettlementInternaliserIdentification1 {
93111	pub fn validate(&self) -> Result<(), ValidationError> {
93112		let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
93113		if !pattern.is_match(&self.lei) {
93114			return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
93115		}
93116		self.rspnsbl_prsn.validate()?;
93117		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
93118		if !pattern.is_match(&self.ctry) {
93119			return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
93120		}
93121		if let Some(ref val) = self.brnch_id {
93122			let pattern = Regex::new("[A-Z]{2}").unwrap();
93123			if !pattern.is_match(val) {
93124				return Err(ValidationError::new(1005, "brnch_id does not match the required pattern".to_string()));
93125			}
93126		}
93127		Ok(())
93128	}
93129}
93130
93131
93132// SettlementInternaliserReportHeader1 ...
93133#[cfg_attr(feature = "derive_debug", derive(Debug))]
93134#[cfg_attr(feature = "derive_default", derive(Default))]
93135#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93136#[cfg_attr(feature = "derive_clone", derive(Clone))]
93137#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93138pub struct SettlementInternaliserReportHeader1 {
93139	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm") )]
93140	pub cre_dt_tm: String,
93141	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDt") )]
93142	pub rptg_dt: String,
93143	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
93144	pub ccy: String,
93145	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSts") )]
93146	pub rpt_sts: TransactionOperationType4Code,
93147}
93148
93149impl SettlementInternaliserReportHeader1 {
93150	pub fn validate(&self) -> Result<(), ValidationError> {
93151		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
93152		if !pattern.is_match(&self.ccy) {
93153			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
93154		}
93155		self.rpt_sts.validate()?;
93156		Ok(())
93157	}
93158}
93159
93160
93161// SettlementInternaliserTransactionType1 ...
93162#[cfg_attr(feature = "derive_debug", derive(Debug))]
93163#[cfg_attr(feature = "derive_default", derive(Default))]
93164#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93165#[cfg_attr(feature = "derive_clone", derive(Clone))]
93166#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93167pub struct SettlementInternaliserTransactionType1 {
93168	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesBuyOrSell") )]
93169	pub scties_buy_or_sell: InternalisationData1,
93170	#[cfg_attr( feature = "derive_serde", serde(rename = "CollMgmtOpr") )]
93171	pub coll_mgmt_opr: InternalisationData1,
93172	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesLndgOrBrrwg") )]
93173	pub scties_lndg_or_brrwg: InternalisationData1,
93174	#[cfg_attr( feature = "derive_serde", serde(rename = "RpAgrmt") )]
93175	pub rp_agrmt: InternalisationData1,
93176	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrTxs") )]
93177	pub othr_txs: InternalisationData1,
93178}
93179
93180impl SettlementInternaliserTransactionType1 {
93181	pub fn validate(&self) -> Result<(), ValidationError> {
93182		self.scties_buy_or_sell.validate()?;
93183		self.coll_mgmt_opr.validate()?;
93184		self.scties_lndg_or_brrwg.validate()?;
93185		self.rp_agrmt.validate()?;
93186		self.othr_txs.validate()?;
93187		Ok(())
93188	}
93189}
93190
93191
93192// SettlementMethod1Code ...
93193#[cfg_attr(feature = "derive_debug", derive(Debug))]
93194#[cfg_attr(feature = "derive_default", derive(Default))]
93195#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93196#[cfg_attr(feature = "derive_clone", derive(Clone))]
93197#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93198pub enum SettlementMethod1Code {
93199	#[cfg_attr(feature = "derive_default", default)]
93200	#[cfg_attr( feature = "derive_serde", serde(rename = "INDA") )]
93201	CodeINDA,
93202	#[cfg_attr( feature = "derive_serde", serde(rename = "INGA") )]
93203	CodeINGA,
93204	#[cfg_attr( feature = "derive_serde", serde(rename = "COVE") )]
93205	CodeCOVE,
93206	#[cfg_attr( feature = "derive_serde", serde(rename = "CLRG") )]
93207	CodeCLRG,
93208}
93209
93210impl SettlementMethod1Code {
93211	pub fn validate(&self) -> Result<(), ValidationError> {
93212		Ok(())
93213	}
93214}
93215
93216
93217// SettlementMethod2Code ...
93218#[cfg_attr(feature = "derive_debug", derive(Debug))]
93219#[cfg_attr(feature = "derive_default", derive(Default))]
93220#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93221#[cfg_attr(feature = "derive_clone", derive(Clone))]
93222#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93223pub enum SettlementMethod2Code {
93224	#[cfg_attr(feature = "derive_default", default)]
93225	#[cfg_attr( feature = "derive_serde", serde(rename = "INDA") )]
93226	CodeINDA,
93227	#[cfg_attr( feature = "derive_serde", serde(rename = "INGA") )]
93228	CodeINGA,
93229	#[cfg_attr( feature = "derive_serde", serde(rename = "CLRG") )]
93230	CodeCLRG,
93231}
93232
93233impl SettlementMethod2Code {
93234	pub fn validate(&self) -> Result<(), ValidationError> {
93235		Ok(())
93236	}
93237}
93238
93239
93240// SettlementMethod5Choice ...
93241#[cfg_attr(feature = "derive_debug", derive(Debug))]
93242#[cfg_attr(feature = "derive_default", derive(Default))]
93243#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93244#[cfg_attr(feature = "derive_clone", derive(Clone))]
93245#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93246pub struct SettlementMethod5Choice {
93247	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdt", skip_serializing_if = "Option::is_none") )]
93248	pub cdt: Option<CreditTransferTransaction59>,
93249	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbt", skip_serializing_if = "Option::is_none") )]
93250	pub dbt: Option<CreditTransferTransaction59>,
93251}
93252
93253impl SettlementMethod5Choice {
93254	pub fn validate(&self) -> Result<(), ValidationError> {
93255		if let Some(ref val) = self.cdt { val.validate()? }
93256		if let Some(ref val) = self.dbt { val.validate()? }
93257		Ok(())
93258	}
93259}
93260
93261
93262// SettlementParties120 ...
93263#[cfg_attr(feature = "derive_debug", derive(Debug))]
93264#[cfg_attr(feature = "derive_default", derive(Default))]
93265#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93266#[cfg_attr(feature = "derive_clone", derive(Clone))]
93267#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93268pub struct SettlementParties120 {
93269	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryAgt", skip_serializing_if = "Option::is_none") )]
93270	pub dlvry_agt: Option<PartyIdentification242Choice>,
93271	#[cfg_attr( feature = "derive_serde", serde(rename = "Intrmy", skip_serializing_if = "Option::is_none") )]
93272	pub intrmy: Option<PartyIdentification242Choice>,
93273	#[cfg_attr( feature = "derive_serde", serde(rename = "RcvgAgt") )]
93274	pub rcvg_agt: PartyIdentification242Choice,
93275	#[cfg_attr( feature = "derive_serde", serde(rename = "BnfcryInstn", skip_serializing_if = "Option::is_none") )]
93276	pub bnfcry_instn: Option<PartyIdentification242Choice>,
93277}
93278
93279impl SettlementParties120 {
93280	pub fn validate(&self) -> Result<(), ValidationError> {
93281		if let Some(ref val) = self.dlvry_agt { val.validate()? }
93282		if let Some(ref val) = self.intrmy { val.validate()? }
93283		self.rcvg_agt.validate()?;
93284		if let Some(ref val) = self.bnfcry_instn { val.validate()? }
93285		Ok(())
93286	}
93287}
93288
93289
93290// SettlementParties32 ...
93291#[cfg_attr(feature = "derive_debug", derive(Debug))]
93292#[cfg_attr(feature = "derive_default", derive(Default))]
93293#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93294#[cfg_attr(feature = "derive_clone", derive(Clone))]
93295#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93296pub struct SettlementParties32 {
93297	#[cfg_attr( feature = "derive_serde", serde(rename = "Dpstry") )]
93298	pub dpstry: PartyIdentification63,
93299	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty1", skip_serializing_if = "Option::is_none") )]
93300	pub pty1: Option<PartyIdentificationAndAccount95>,
93301	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty2", skip_serializing_if = "Option::is_none") )]
93302	pub pty2: Option<PartyIdentificationAndAccount95>,
93303	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty3", skip_serializing_if = "Option::is_none") )]
93304	pub pty3: Option<PartyIdentificationAndAccount95>,
93305	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty4", skip_serializing_if = "Option::is_none") )]
93306	pub pty4: Option<PartyIdentificationAndAccount95>,
93307	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty5", skip_serializing_if = "Option::is_none") )]
93308	pub pty5: Option<PartyIdentificationAndAccount95>,
93309}
93310
93311impl SettlementParties32 {
93312	pub fn validate(&self) -> Result<(), ValidationError> {
93313		self.dpstry.validate()?;
93314		if let Some(ref val) = self.pty1 { val.validate()? }
93315		if let Some(ref val) = self.pty2 { val.validate()? }
93316		if let Some(ref val) = self.pty3 { val.validate()? }
93317		if let Some(ref val) = self.pty4 { val.validate()? }
93318		if let Some(ref val) = self.pty5 { val.validate()? }
93319		Ok(())
93320	}
93321}
93322
93323
93324// SettlementParties34Choice ...
93325#[cfg_attr(feature = "derive_debug", derive(Debug))]
93326#[cfg_attr(feature = "derive_default", derive(Default))]
93327#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93328#[cfg_attr(feature = "derive_clone", derive(Clone))]
93329#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93330pub struct SettlementParties34Choice {
93331	#[cfg_attr( feature = "derive_serde", serde(rename = "CntrlSctiesDpstryPtcpt", skip_serializing_if = "Option::is_none") )]
93332	pub cntrl_scties_dpstry_ptcpt: Option<OrganisationIdentification15Choice>,
93333	#[cfg_attr( feature = "derive_serde", serde(rename = "IndrctPtcpt", skip_serializing_if = "Option::is_none") )]
93334	pub indrct_ptcpt: Option<OrganisationIdentification15Choice>,
93335}
93336
93337impl SettlementParties34Choice {
93338	pub fn validate(&self) -> Result<(), ValidationError> {
93339		if let Some(ref val) = self.cntrl_scties_dpstry_ptcpt { val.validate()? }
93340		if let Some(ref val) = self.indrct_ptcpt { val.validate()? }
93341		Ok(())
93342	}
93343}
93344
93345
93346// SettlementParties35 ...
93347#[cfg_attr(feature = "derive_debug", derive(Debug))]
93348#[cfg_attr(feature = "derive_default", derive(Default))]
93349#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93350#[cfg_attr(feature = "derive_clone", derive(Clone))]
93351#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93352pub struct SettlementParties35 {
93353	#[cfg_attr( feature = "derive_serde", serde(rename = "StgSttlmPties") )]
93354	pub stg_sttlm_pties: SettlementParties32,
93355	#[cfg_attr( feature = "derive_serde", serde(rename = "LclMktId", skip_serializing_if = "Option::is_none") )]
93356	pub lcl_mkt_id: Option<Vec<GenericIdentification49>>,
93357	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnDtls", skip_serializing_if = "Option::is_none") )]
93358	pub regn_dtls: Option<PartyIdentification99Choice>,
93359}
93360
93361impl SettlementParties35 {
93362	pub fn validate(&self) -> Result<(), ValidationError> {
93363		self.stg_sttlm_pties.validate()?;
93364		if let Some(ref vec) = self.lcl_mkt_id { for item in vec { item.validate()? } }
93365		if let Some(ref val) = self.regn_dtls { val.validate()? }
93366		Ok(())
93367	}
93368}
93369
93370
93371// SettlementStatus16Choice ...
93372#[cfg_attr(feature = "derive_debug", derive(Debug))]
93373#[cfg_attr(feature = "derive_default", derive(Default))]
93374#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93375#[cfg_attr(feature = "derive_clone", derive(Clone))]
93376#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93377pub struct SettlementStatus16Choice {
93378	#[cfg_attr( feature = "derive_serde", serde(rename = "Pdg", skip_serializing_if = "Option::is_none") )]
93379	pub pdg: Option<PendingStatus36Choice>,
93380	#[cfg_attr( feature = "derive_serde", serde(rename = "Flng", skip_serializing_if = "Option::is_none") )]
93381	pub flng: Option<FailingStatus9Choice>,
93382	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
93383	pub prtry: Option<ProprietaryStatusAndReason6>,
93384}
93385
93386impl SettlementStatus16Choice {
93387	pub fn validate(&self) -> Result<(), ValidationError> {
93388		if let Some(ref val) = self.pdg { val.validate()? }
93389		if let Some(ref val) = self.flng { val.validate()? }
93390		if let Some(ref val) = self.prtry { val.validate()? }
93391		Ok(())
93392	}
93393}
93394
93395
93396// SettlementStatus26Choice ...
93397#[cfg_attr(feature = "derive_debug", derive(Debug))]
93398#[cfg_attr(feature = "derive_default", derive(Default))]
93399#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93400#[cfg_attr(feature = "derive_clone", derive(Clone))]
93401#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93402pub struct SettlementStatus26Choice {
93403	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
93404	pub cd: Option<SecuritiesSettlementStatus1Code>,
93405	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
93406	pub prtry: Option<GenericIdentification30>,
93407}
93408
93409impl SettlementStatus26Choice {
93410	pub fn validate(&self) -> Result<(), ValidationError> {
93411		if let Some(ref val) = self.cd { val.validate()? }
93412		if let Some(ref val) = self.prtry { val.validate()? }
93413		Ok(())
93414	}
93415}
93416
93417
93418// SettlementSubTotalCalculatedTax2 ...
93419#[cfg_attr(feature = "derive_debug", derive(Debug))]
93420#[cfg_attr(feature = "derive_default", derive(Default))]
93421#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93422#[cfg_attr(feature = "derive_clone", derive(Clone))]
93423#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93424pub struct SettlementSubTotalCalculatedTax2 {
93425	#[cfg_attr( feature = "derive_serde", serde(rename = "TpCd", skip_serializing_if = "Option::is_none") )]
93426	pub tp_cd: Option<String>,
93427	#[cfg_attr( feature = "derive_serde", serde(rename = "ClctdRate", skip_serializing_if = "Option::is_none") )]
93428	pub clctd_rate: Option<f64>,
93429	#[cfg_attr( feature = "derive_serde", serde(rename = "BsisAmt", skip_serializing_if = "Option::is_none") )]
93430	pub bsis_amt: Option<Vec<CurrencyAndAmount>>,
93431	#[cfg_attr( feature = "derive_serde", serde(rename = "ClctdAmt", skip_serializing_if = "Option::is_none") )]
93432	pub clctd_amt: Option<Vec<CurrencyAndAmount>>,
93433	#[cfg_attr( feature = "derive_serde", serde(rename = "XmptnRsnCd", skip_serializing_if = "Option::is_none") )]
93434	pub xmptn_rsn_cd: Option<String>,
93435	#[cfg_attr( feature = "derive_serde", serde(rename = "XmptnRsnTxt", skip_serializing_if = "Option::is_none") )]
93436	pub xmptn_rsn_txt: Option<String>,
93437	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxCcyXchg", skip_serializing_if = "Option::is_none") )]
93438	pub tax_ccy_xchg: Option<CurrencyReference3>,
93439}
93440
93441impl SettlementSubTotalCalculatedTax2 {
93442	pub fn validate(&self) -> Result<(), ValidationError> {
93443		if let Some(ref val) = self.tp_cd {
93444			if val.chars().count() < 1 {
93445				return Err(ValidationError::new(1001, "tp_cd is shorter than the minimum length of 1".to_string()));
93446			}
93447			if val.chars().count() > 4 {
93448				return Err(ValidationError::new(1002, "tp_cd exceeds the maximum length of 4".to_string()));
93449			}
93450		}
93451		if let Some(ref vec) = self.bsis_amt { for item in vec { item.validate()? } }
93452		if let Some(ref vec) = self.clctd_amt { for item in vec { item.validate()? } }
93453		if let Some(ref val) = self.xmptn_rsn_cd {
93454			if val.chars().count() < 1 {
93455				return Err(ValidationError::new(1001, "xmptn_rsn_cd is shorter than the minimum length of 1".to_string()));
93456			}
93457			if val.chars().count() > 4 {
93458				return Err(ValidationError::new(1002, "xmptn_rsn_cd exceeds the maximum length of 4".to_string()));
93459			}
93460		}
93461		if let Some(ref val) = self.xmptn_rsn_txt {
93462			if val.chars().count() < 1 {
93463				return Err(ValidationError::new(1001, "xmptn_rsn_txt is shorter than the minimum length of 1".to_string()));
93464			}
93465			if val.chars().count() > 500 {
93466				return Err(ValidationError::new(1002, "xmptn_rsn_txt exceeds the maximum length of 500".to_string()));
93467			}
93468		}
93469		if let Some(ref val) = self.tax_ccy_xchg { val.validate()? }
93470		Ok(())
93471	}
93472}
93473
93474
93475// SettlementTimeRequest2 ...
93476#[cfg_attr(feature = "derive_debug", derive(Debug))]
93477#[cfg_attr(feature = "derive_default", derive(Default))]
93478#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93479#[cfg_attr(feature = "derive_clone", derive(Clone))]
93480#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93481pub struct SettlementTimeRequest2 {
93482	#[cfg_attr( feature = "derive_serde", serde(rename = "CLSTm", skip_serializing_if = "Option::is_none") )]
93483	pub cls_tm: Option<String>,
93484	#[cfg_attr( feature = "derive_serde", serde(rename = "TillTm", skip_serializing_if = "Option::is_none") )]
93485	pub till_tm: Option<String>,
93486	#[cfg_attr( feature = "derive_serde", serde(rename = "FrTm", skip_serializing_if = "Option::is_none") )]
93487	pub fr_tm: Option<String>,
93488	#[cfg_attr( feature = "derive_serde", serde(rename = "RjctTm", skip_serializing_if = "Option::is_none") )]
93489	pub rjct_tm: Option<String>,
93490}
93491
93492impl SettlementTimeRequest2 {
93493	pub fn validate(&self) -> Result<(), ValidationError> {
93494		Ok(())
93495	}
93496}
93497
93498
93499// SettlementTotalData1 ...
93500#[cfg_attr(feature = "derive_debug", derive(Debug))]
93501#[cfg_attr(feature = "derive_default", derive(Default))]
93502#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93503#[cfg_attr(feature = "derive_clone", derive(Clone))]
93504#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93505pub struct SettlementTotalData1 {
93506	#[cfg_attr( feature = "derive_serde", serde(rename = "Sttld") )]
93507	pub sttld: SettlementDataVolume2,
93508	#[cfg_attr( feature = "derive_serde", serde(rename = "Faild") )]
93509	pub faild: SettlementDataVolume2,
93510	#[cfg_attr( feature = "derive_serde", serde(rename = "Ttl") )]
93511	pub ttl: SettlementDataVolume2,
93512	#[cfg_attr( feature = "derive_serde", serde(rename = "FaildRate") )]
93513	pub faild_rate: SettlementDataRate2,
93514}
93515
93516impl SettlementTotalData1 {
93517	pub fn validate(&self) -> Result<(), ValidationError> {
93518		self.sttld.validate()?;
93519		self.faild.validate()?;
93520		self.ttl.validate()?;
93521		self.faild_rate.validate()?;
93522		Ok(())
93523	}
93524}
93525
93526
93527// SettlementTotalData1Choice ...
93528#[cfg_attr(feature = "derive_debug", derive(Debug))]
93529#[cfg_attr(feature = "derive_default", derive(Default))]
93530#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93531#[cfg_attr(feature = "derive_clone", derive(Clone))]
93532#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93533pub struct SettlementTotalData1Choice {
93534	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
93535	pub data_set_actn: Option<ReportPeriodActivity1Code>,
93536	#[cfg_attr( feature = "derive_serde", serde(rename = "Data", skip_serializing_if = "Option::is_none") )]
93537	pub data: Option<SettlementTotalData1>,
93538}
93539
93540impl SettlementTotalData1Choice {
93541	pub fn validate(&self) -> Result<(), ValidationError> {
93542		if let Some(ref val) = self.data_set_actn { val.validate()? }
93543		if let Some(ref val) = self.data { val.validate()? }
93544		Ok(())
93545	}
93546}
93547
93548
93549// SettlementType1Code ...
93550#[cfg_attr(feature = "derive_debug", derive(Debug))]
93551#[cfg_attr(feature = "derive_default", derive(Default))]
93552#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93553#[cfg_attr(feature = "derive_clone", derive(Clone))]
93554#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93555pub enum SettlementType1Code {
93556	#[cfg_attr(feature = "derive_default", default)]
93557	#[cfg_attr( feature = "derive_serde", serde(rename = "PRIN") )]
93558	CodePRIN,
93559	#[cfg_attr( feature = "derive_serde", serde(rename = "NETO") )]
93560	CodeNETO,
93561}
93562
93563impl SettlementType1Code {
93564	pub fn validate(&self) -> Result<(), ValidationError> {
93565		Ok(())
93566	}
93567}
93568
93569
93570// SettlementType3Choice ...
93571#[cfg_attr(feature = "derive_debug", derive(Debug))]
93572#[cfg_attr(feature = "derive_default", derive(Default))]
93573#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93574#[cfg_attr(feature = "derive_clone", derive(Clone))]
93575#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93576pub struct SettlementType3Choice {
93577	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
93578	pub cd: Option<SettlementType1Code>,
93579	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
93580	pub prtry: Option<GenericIdentification30>,
93581}
93582
93583impl SettlementType3Choice {
93584	pub fn validate(&self) -> Result<(), ValidationError> {
93585		if let Some(ref val) = self.cd { val.validate()? }
93586		if let Some(ref val) = self.prtry { val.validate()? }
93587		Ok(())
93588	}
93589}
93590
93591
93592// SettlementUnitType1Code ...
93593#[cfg_attr(feature = "derive_debug", derive(Debug))]
93594#[cfg_attr(feature = "derive_default", derive(Default))]
93595#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93596#[cfg_attr(feature = "derive_clone", derive(Clone))]
93597#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93598pub enum SettlementUnitType1Code {
93599	#[cfg_attr(feature = "derive_default", default)]
93600	#[cfg_attr( feature = "derive_serde", serde(rename = "FAMT") )]
93601	CodeFAMT,
93602	#[cfg_attr( feature = "derive_serde", serde(rename = "UNIT") )]
93603	CodeUNIT,
93604}
93605
93606impl SettlementUnitType1Code {
93607	pub fn validate(&self) -> Result<(), ValidationError> {
93608		Ok(())
93609	}
93610}
93611
93612
93613// SettlementUnitType3Choice ...
93614#[cfg_attr(feature = "derive_debug", derive(Debug))]
93615#[cfg_attr(feature = "derive_default", derive(Default))]
93616#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93617#[cfg_attr(feature = "derive_clone", derive(Clone))]
93618#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93619pub struct SettlementUnitType3Choice {
93620	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
93621	pub cd: Option<SettlementUnitType1Code>,
93622	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
93623	pub prtry: Option<GenericIdentification30>,
93624}
93625
93626impl SettlementUnitType3Choice {
93627	pub fn validate(&self) -> Result<(), ValidationError> {
93628		if let Some(ref val) = self.cd { val.validate()? }
93629		if let Some(ref val) = self.prtry { val.validate()? }
93630		Ok(())
93631	}
93632}
93633
93634
93635// ShipmentAttribute2 ...
93636#[cfg_attr(feature = "derive_debug", derive(Debug))]
93637#[cfg_attr(feature = "derive_default", derive(Default))]
93638#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93639#[cfg_attr(feature = "derive_clone", derive(Clone))]
93640#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93641pub struct ShipmentAttribute2 {
93642	#[cfg_attr( feature = "derive_serde", serde(rename = "Conds", skip_serializing_if = "Option::is_none") )]
93643	pub conds: Option<ShipmentCondition1Choice>,
93644	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdDt", skip_serializing_if = "Option::is_none") )]
93645	pub xpctd_dt: Option<String>,
93646	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryOfCntrPty", skip_serializing_if = "Option::is_none") )]
93647	pub ctry_of_cntr_pty: Option<String>,
93648}
93649
93650impl ShipmentAttribute2 {
93651	pub fn validate(&self) -> Result<(), ValidationError> {
93652		if let Some(ref val) = self.conds { val.validate()? }
93653		if let Some(ref val) = self.ctry_of_cntr_pty {
93654			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
93655			if !pattern.is_match(val) {
93656				return Err(ValidationError::new(1005, "ctry_of_cntr_pty does not match the required pattern".to_string()));
93657			}
93658		}
93659		Ok(())
93660	}
93661}
93662
93663
93664// ShipmentCondition1Choice ...
93665#[cfg_attr(feature = "derive_debug", derive(Debug))]
93666#[cfg_attr(feature = "derive_default", derive(Default))]
93667#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93668#[cfg_attr(feature = "derive_clone", derive(Clone))]
93669#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93670pub struct ShipmentCondition1Choice {
93671	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
93672	pub cd: Option<String>,
93673	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
93674	pub prtry: Option<String>,
93675}
93676
93677impl ShipmentCondition1Choice {
93678	pub fn validate(&self) -> Result<(), ValidationError> {
93679		if let Some(ref val) = self.cd {
93680			if val.chars().count() < 1 {
93681				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
93682			}
93683			if val.chars().count() > 4 {
93684				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
93685			}
93686		}
93687		if let Some(ref val) = self.prtry {
93688			if val.chars().count() < 1 {
93689				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
93690			}
93691			if val.chars().count() > 35 {
93692				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
93693			}
93694		}
93695		Ok(())
93696	}
93697}
93698
93699
93700// ShipmentDateRange1 ...
93701#[cfg_attr(feature = "derive_debug", derive(Debug))]
93702#[cfg_attr(feature = "derive_default", derive(Default))]
93703#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93704#[cfg_attr(feature = "derive_clone", derive(Clone))]
93705#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93706pub struct ShipmentDateRange1 {
93707	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlstShipmntDt", skip_serializing_if = "Option::is_none") )]
93708	pub earlst_shipmnt_dt: Option<String>,
93709	#[cfg_attr( feature = "derive_serde", serde(rename = "LatstShipmntDt", skip_serializing_if = "Option::is_none") )]
93710	pub latst_shipmnt_dt: Option<String>,
93711}
93712
93713impl ShipmentDateRange1 {
93714	pub fn validate(&self) -> Result<(), ValidationError> {
93715		Ok(())
93716	}
93717}
93718
93719
93720// ShipmentDateRange2 ...
93721#[cfg_attr(feature = "derive_debug", derive(Debug))]
93722#[cfg_attr(feature = "derive_default", derive(Default))]
93723#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93724#[cfg_attr(feature = "derive_clone", derive(Clone))]
93725#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93726pub struct ShipmentDateRange2 {
93727	#[cfg_attr( feature = "derive_serde", serde(rename = "SubQtyVal") )]
93728	pub sub_qty_val: f64,
93729	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlstShipmntDt", skip_serializing_if = "Option::is_none") )]
93730	pub earlst_shipmnt_dt: Option<String>,
93731	#[cfg_attr( feature = "derive_serde", serde(rename = "LatstShipmntDt", skip_serializing_if = "Option::is_none") )]
93732	pub latst_shipmnt_dt: Option<String>,
93733}
93734
93735impl ShipmentDateRange2 {
93736	pub fn validate(&self) -> Result<(), ValidationError> {
93737		Ok(())
93738	}
93739}
93740
93741
93742// ShipmentSchedule2Choice ...
93743#[cfg_attr(feature = "derive_debug", derive(Debug))]
93744#[cfg_attr(feature = "derive_default", derive(Default))]
93745#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93746#[cfg_attr(feature = "derive_clone", derive(Clone))]
93747#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93748pub struct ShipmentSchedule2Choice {
93749	#[cfg_attr( feature = "derive_serde", serde(rename = "ShipmntDtRg", skip_serializing_if = "Option::is_none") )]
93750	pub shipmnt_dt_rg: Option<ShipmentDateRange1>,
93751	#[cfg_attr( feature = "derive_serde", serde(rename = "ShipmntSubSchdl", skip_serializing_if = "Option::is_none") )]
93752	pub shipmnt_sub_schdl: Option<Vec<ShipmentDateRange2>>,
93753}
93754
93755impl ShipmentSchedule2Choice {
93756	pub fn validate(&self) -> Result<(), ValidationError> {
93757		if let Some(ref val) = self.shipmnt_dt_rg { val.validate()? }
93758		if let Some(ref vec) = self.shipmnt_sub_schdl { for item in vec { item.validate()? } }
93759		Ok(())
93760	}
93761}
93762
93763
93764// ShortPaymentIdentification4 ...
93765#[cfg_attr(feature = "derive_debug", derive(Debug))]
93766#[cfg_attr(feature = "derive_default", derive(Default))]
93767#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93768#[cfg_attr(feature = "derive_clone", derive(Clone))]
93769#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93770pub struct ShortPaymentIdentification4 {
93771	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
93772	pub tx_id: Option<String>,
93773	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
93774	pub uetr: Option<String>,
93775	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt") )]
93776	pub intr_bk_sttlm_dt: String,
93777	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt") )]
93778	pub instg_agt: BranchAndFinancialInstitutionIdentification8,
93779}
93780
93781impl ShortPaymentIdentification4 {
93782	pub fn validate(&self) -> Result<(), ValidationError> {
93783		if let Some(ref val) = self.tx_id {
93784			if val.chars().count() < 1 {
93785				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
93786			}
93787			if val.chars().count() > 35 {
93788				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
93789			}
93790		}
93791		if let Some(ref val) = self.uetr {
93792			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
93793			if !pattern.is_match(val) {
93794				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
93795			}
93796		}
93797		self.instg_agt.validate()?;
93798		Ok(())
93799	}
93800}
93801
93802
93803// Side5Code ...
93804#[cfg_attr(feature = "derive_debug", derive(Debug))]
93805#[cfg_attr(feature = "derive_default", derive(Default))]
93806#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93807#[cfg_attr(feature = "derive_clone", derive(Clone))]
93808#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93809pub enum Side5Code {
93810	#[cfg_attr(feature = "derive_default", default)]
93811	#[cfg_attr( feature = "derive_serde", serde(rename = "SESH") )]
93812	CodeSESH,
93813	#[cfg_attr( feature = "derive_serde", serde(rename = "SELL") )]
93814	CodeSELL,
93815	#[cfg_attr( feature = "derive_serde", serde(rename = "SSEX") )]
93816	CodeSSEX,
93817	#[cfg_attr( feature = "derive_serde", serde(rename = "UNDI") )]
93818	CodeUNDI,
93819}
93820
93821impl Side5Code {
93822	pub fn validate(&self) -> Result<(), ValidationError> {
93823		Ok(())
93824	}
93825}
93826
93827
93828// Side6Code ...
93829#[cfg_attr(feature = "derive_debug", derive(Debug))]
93830#[cfg_attr(feature = "derive_default", derive(Default))]
93831#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93832#[cfg_attr(feature = "derive_clone", derive(Clone))]
93833#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93834pub enum Side6Code {
93835	#[cfg_attr(feature = "derive_default", default)]
93836	#[cfg_attr( feature = "derive_serde", serde(rename = "BUYI") )]
93837	CodeBUYI,
93838	#[cfg_attr( feature = "derive_serde", serde(rename = "SELL") )]
93839	CodeSELL,
93840}
93841
93842impl Side6Code {
93843	pub fn validate(&self) -> Result<(), ValidationError> {
93844		Ok(())
93845	}
93846}
93847
93848
93849// SignatureEnvelope ...
93850#[cfg_attr(feature = "derive_debug", derive(Debug))]
93851#[cfg_attr(feature = "derive_default", derive(Default))]
93852#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93853#[cfg_attr(feature = "derive_clone", derive(Clone))]
93854#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93855pub struct SignatureEnvelope {
93856}
93857
93858impl SignatureEnvelope {
93859	pub fn validate(&self) -> Result<(), ValidationError> {
93860		Ok(())
93861	}
93862}
93863
93864
93865// SignatureEnvelopeReference ...
93866#[cfg_attr(feature = "derive_debug", derive(Debug))]
93867#[cfg_attr(feature = "derive_default", derive(Default))]
93868#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93869#[cfg_attr(feature = "derive_clone", derive(Clone))]
93870#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93871pub struct SignatureEnvelopeReference {
93872}
93873
93874impl SignatureEnvelopeReference {
93875	pub fn validate(&self) -> Result<(), ValidationError> {
93876		Ok(())
93877	}
93878}
93879
93880
93881// SignatureType1Code ...
93882#[cfg_attr(feature = "derive_debug", derive(Debug))]
93883#[cfg_attr(feature = "derive_default", derive(Default))]
93884#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93885#[cfg_attr(feature = "derive_clone", derive(Clone))]
93886#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93887pub enum SignatureType1Code {
93888	#[cfg_attr(feature = "derive_default", default)]
93889	#[cfg_attr( feature = "derive_serde", serde(rename = "ORIG") )]
93890	CodeORIG,
93891	#[cfg_attr( feature = "derive_serde", serde(rename = "DIGI") )]
93892	CodeDIGI,
93893	#[cfg_attr( feature = "derive_serde", serde(rename = "ELEC") )]
93894	CodeELEC,
93895	#[cfg_attr( feature = "derive_serde", serde(rename = "NONE") )]
93896	CodeNONE,
93897}
93898
93899impl SignatureType1Code {
93900	pub fn validate(&self) -> Result<(), ValidationError> {
93901		Ok(())
93902	}
93903}
93904
93905
93906// SimpleIdentificationInformation ...
93907#[cfg_attr(feature = "derive_debug", derive(Debug))]
93908#[cfg_attr(feature = "derive_default", derive(Default))]
93909#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93910#[cfg_attr(feature = "derive_clone", derive(Clone))]
93911#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93912pub struct SimpleIdentificationInformation {
93913	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
93914	pub id: String,
93915}
93916
93917impl SimpleIdentificationInformation {
93918	pub fn validate(&self) -> Result<(), ValidationError> {
93919		if self.id.chars().count() < 1 {
93920			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
93921		}
93922		if self.id.chars().count() > 35 {
93923			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
93924		}
93925		Ok(())
93926	}
93927}
93928
93929
93930// SimpleIdentificationInformation4 ...
93931#[cfg_attr(feature = "derive_debug", derive(Debug))]
93932#[cfg_attr(feature = "derive_default", derive(Default))]
93933#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93934#[cfg_attr(feature = "derive_clone", derive(Clone))]
93935#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93936pub struct SimpleIdentificationInformation4 {
93937	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
93938	pub id: String,
93939}
93940
93941impl SimpleIdentificationInformation4 {
93942	pub fn validate(&self) -> Result<(), ValidationError> {
93943		if self.id.chars().count() < 1 {
93944			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
93945		}
93946		if self.id.chars().count() > 35 {
93947			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
93948		}
93949		Ok(())
93950	}
93951}
93952
93953
93954// SkipPayload ...
93955#[cfg_attr(feature = "derive_debug", derive(Debug))]
93956#[cfg_attr(feature = "derive_default", derive(Default))]
93957#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93958#[cfg_attr(feature = "derive_clone", derive(Clone))]
93959#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93960pub struct SkipPayload {
93961}
93962
93963impl SkipPayload {
93964	pub fn validate(&self) -> Result<(), ValidationError> {
93965		Ok(())
93966	}
93967}
93968
93969
93970// SpecialCollateral1Code ...
93971#[cfg_attr(feature = "derive_debug", derive(Debug))]
93972#[cfg_attr(feature = "derive_default", derive(Default))]
93973#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93974#[cfg_attr(feature = "derive_clone", derive(Clone))]
93975#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93976pub enum SpecialCollateral1Code {
93977	#[cfg_attr(feature = "derive_default", default)]
93978	#[cfg_attr( feature = "derive_serde", serde(rename = "GENE") )]
93979	CodeGENE,
93980	#[cfg_attr( feature = "derive_serde", serde(rename = "SPEC") )]
93981	CodeSPEC,
93982}
93983
93984impl SpecialCollateral1Code {
93985	pub fn validate(&self) -> Result<(), ValidationError> {
93986		Ok(())
93987	}
93988}
93989
93990
93991// SpecialCollateral2Code ...
93992#[cfg_attr(feature = "derive_debug", derive(Debug))]
93993#[cfg_attr(feature = "derive_default", derive(Default))]
93994#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
93995#[cfg_attr(feature = "derive_clone", derive(Clone))]
93996#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
93997pub enum SpecialCollateral2Code {
93998	#[cfg_attr(feature = "derive_default", default)]
93999	#[cfg_attr( feature = "derive_serde", serde(rename = "GENE") )]
94000	CodeGENE,
94001	#[cfg_attr( feature = "derive_serde", serde(rename = "SPEC") )]
94002	CodeSPEC,
94003	#[cfg_attr( feature = "derive_serde", serde(rename = "MRRP") )]
94004	CodeMRRP,
94005}
94006
94007impl SpecialCollateral2Code {
94008	pub fn validate(&self) -> Result<(), ValidationError> {
94009		Ok(())
94010	}
94011}
94012
94013
94014// SpecialCondition1 ...
94015#[cfg_attr(feature = "derive_debug", derive(Debug))]
94016#[cfg_attr(feature = "derive_default", derive(Default))]
94017#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94018#[cfg_attr(feature = "derive_clone", derive(Clone))]
94019#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94020pub struct SpecialCondition1 {
94021	#[cfg_attr( feature = "derive_serde", serde(rename = "IncmgAmt") )]
94022	pub incmg_amt: ActiveCurrencyAndAmount,
94023	#[cfg_attr( feature = "derive_serde", serde(rename = "OutgngAmt") )]
94024	pub outgng_amt: ActiveCurrencyAndAmount,
94025	#[cfg_attr( feature = "derive_serde", serde(rename = "IncmgAmtToOthrAcct", skip_serializing_if = "Option::is_none") )]
94026	pub incmg_amt_to_othr_acct: Option<ActiveCurrencyAndAmount>,
94027	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtFrOthrAcct", skip_serializing_if = "Option::is_none") )]
94028	pub pmt_fr_othr_acct: Option<ActiveCurrencyAndAmount>,
94029}
94030
94031impl SpecialCondition1 {
94032	pub fn validate(&self) -> Result<(), ValidationError> {
94033		self.incmg_amt.validate()?;
94034		self.outgng_amt.validate()?;
94035		if let Some(ref val) = self.incmg_amt_to_othr_acct { val.validate()? }
94036		if let Some(ref val) = self.pmt_fr_othr_acct { val.validate()? }
94037		Ok(())
94038	}
94039}
94040
94041
94042// SpecialPurpose2Code ...
94043#[cfg_attr(feature = "derive_debug", derive(Debug))]
94044#[cfg_attr(feature = "derive_default", derive(Default))]
94045#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94046#[cfg_attr(feature = "derive_clone", derive(Clone))]
94047#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94048pub enum SpecialPurpose2Code {
94049	#[cfg_attr(feature = "derive_default", default)]
94050	#[cfg_attr( feature = "derive_serde", serde(rename = "BLNK") )]
94051	CodeBLNK,
94052	#[cfg_attr( feature = "derive_serde", serde(rename = "NTAV") )]
94053	CodeNTAV,
94054}
94055
94056impl SpecialPurpose2Code {
94057	pub fn validate(&self) -> Result<(), ValidationError> {
94058		Ok(())
94059	}
94060}
94061
94062
94063// SpecificCollateral2 ...
94064#[cfg_attr(feature = "derive_debug", derive(Debug))]
94065#[cfg_attr(feature = "derive_default", derive(Default))]
94066#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94067#[cfg_attr(feature = "derive_clone", derive(Clone))]
94068#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94069pub struct SpecificCollateral2 {
94070	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId") )]
94071	pub fin_instrm_id: FinancialInstrument59,
94072}
94073
94074impl SpecificCollateral2 {
94075	pub fn validate(&self) -> Result<(), ValidationError> {
94076		self.fin_instrm_id.validate()?;
94077		Ok(())
94078	}
94079}
94080
94081
94082// SpecificCollateral3 ...
94083#[cfg_attr(feature = "derive_debug", derive(Debug))]
94084#[cfg_attr(feature = "derive_default", derive(Default))]
94085#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94086#[cfg_attr(feature = "derive_clone", derive(Clone))]
94087#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94088pub struct SpecificCollateral3 {
94089	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmId") )]
94090	pub fin_instrm_id: FinancialInstrument104,
94091	#[cfg_attr( feature = "derive_serde", serde(rename = "MktVal") )]
94092	pub mkt_val: ActiveCurrencyAnd24Amount,
94093}
94094
94095impl SpecificCollateral3 {
94096	pub fn validate(&self) -> Result<(), ValidationError> {
94097		self.fin_instrm_id.validate()?;
94098		self.mkt_val.validate()?;
94099		Ok(())
94100	}
94101}
94102
94103
94104// Standardisation1Code ...
94105#[cfg_attr(feature = "derive_debug", derive(Debug))]
94106#[cfg_attr(feature = "derive_default", derive(Default))]
94107#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94108#[cfg_attr(feature = "derive_clone", derive(Clone))]
94109#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94110pub enum Standardisation1Code {
94111	#[cfg_attr(feature = "derive_default", default)]
94112	#[cfg_attr( feature = "derive_serde", serde(rename = "FLEX") )]
94113	CodeFLEX,
94114	#[cfg_attr( feature = "derive_serde", serde(rename = "NSTA") )]
94115	CodeNSTA,
94116	#[cfg_attr( feature = "derive_serde", serde(rename = "STAN") )]
94117	CodeSTAN,
94118}
94119
94120impl Standardisation1Code {
94121	pub fn validate(&self) -> Result<(), ValidationError> {
94122		Ok(())
94123	}
94124}
94125
94126
94127// Standardisation3Choice ...
94128#[cfg_attr(feature = "derive_debug", derive(Debug))]
94129#[cfg_attr(feature = "derive_default", derive(Default))]
94130#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94131#[cfg_attr(feature = "derive_clone", derive(Clone))]
94132#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94133pub struct Standardisation3Choice {
94134	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
94135	pub cd: Option<Vec<Standardisation1Code>>,
94136	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
94137	pub prtry: Option<GenericIdentification30>,
94138}
94139
94140impl Standardisation3Choice {
94141	pub fn validate(&self) -> Result<(), ValidationError> {
94142		if let Some(ref vec) = self.cd { for item in vec { item.validate()? } }
94143		if let Some(ref val) = self.prtry { val.validate()? }
94144		Ok(())
94145	}
94146}
94147
94148
94149// StandingOrder10 ...
94150#[cfg_attr(feature = "derive_debug", derive(Debug))]
94151#[cfg_attr(feature = "derive_default", derive(Default))]
94152#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94153#[cfg_attr(feature = "derive_clone", derive(Clone))]
94154#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94155pub struct StandingOrder10 {
94156	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
94157	pub amt: Option<Amount2Choice>,
94158	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
94159	pub cdtr: Option<BranchAndFinancialInstitutionIdentification8>,
94160	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
94161	pub cdtr_acct: Option<CashAccount40>,
94162	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
94163	pub dbtr: Option<BranchAndFinancialInstitutionIdentification8>,
94164	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
94165	pub dbtr_acct: Option<CashAccount40>,
94166	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnTp", skip_serializing_if = "Option::is_none") )]
94167	pub exctn_tp: Option<ExecutionType1Choice>,
94168	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy", skip_serializing_if = "Option::is_none") )]
94169	pub frqcy: Option<Frequency2Code>,
94170	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtyPrd", skip_serializing_if = "Option::is_none") )]
94171	pub vldty_prd: Option<DatePeriod2Choice>,
94172	#[cfg_attr( feature = "derive_serde", serde(rename = "ZeroSweepInd", skip_serializing_if = "Option::is_none") )]
94173	pub zero_sweep_ind: Option<bool>,
94174}
94175
94176impl StandingOrder10 {
94177	pub fn validate(&self) -> Result<(), ValidationError> {
94178		if let Some(ref val) = self.amt { val.validate()? }
94179		if let Some(ref val) = self.cdtr { val.validate()? }
94180		if let Some(ref val) = self.cdtr_acct { val.validate()? }
94181		if let Some(ref val) = self.dbtr { val.validate()? }
94182		if let Some(ref val) = self.dbtr_acct { val.validate()? }
94183		if let Some(ref val) = self.exctn_tp { val.validate()? }
94184		if let Some(ref val) = self.frqcy { val.validate()? }
94185		if let Some(ref val) = self.vldty_prd { val.validate()? }
94186		Ok(())
94187	}
94188}
94189
94190
94191// StandingOrder11 ...
94192#[cfg_attr(feature = "derive_debug", derive(Debug))]
94193#[cfg_attr(feature = "derive_default", derive(Default))]
94194#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94195#[cfg_attr(feature = "derive_clone", derive(Clone))]
94196#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94197pub struct StandingOrder11 {
94198	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
94199	pub amt: Amount2Choice,
94200	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
94201	pub cdt_dbt_ind: CreditDebitCode,
94202	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
94203	pub ccy: Option<String>,
94204	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
94205	pub tp: Option<StandingOrderType1Choice>,
94206	#[cfg_attr( feature = "derive_serde", serde(rename = "AssoctdPoolAcct", skip_serializing_if = "Option::is_none") )]
94207	pub assoctd_pool_acct: Option<AccountIdentification4Choice>,
94208	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref", skip_serializing_if = "Option::is_none") )]
94209	pub ref_attr: Option<String>,
94210	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy", skip_serializing_if = "Option::is_none") )]
94211	pub frqcy: Option<Frequency2Code>,
94212	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtyPrd", skip_serializing_if = "Option::is_none") )]
94213	pub vldty_prd: Option<DatePeriod3>,
94214	#[cfg_attr( feature = "derive_serde", serde(rename = "SysMmb", skip_serializing_if = "Option::is_none") )]
94215	pub sys_mmb: Option<BranchAndFinancialInstitutionIdentification8>,
94216	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnsblPty", skip_serializing_if = "Option::is_none") )]
94217	pub rspnsbl_pty: Option<BranchAndFinancialInstitutionIdentification8>,
94218	#[cfg_attr( feature = "derive_serde", serde(rename = "LkSetId", skip_serializing_if = "Option::is_none") )]
94219	pub lk_set_id: Option<String>,
94220	#[cfg_attr( feature = "derive_serde", serde(rename = "LkSetOrdrId", skip_serializing_if = "Option::is_none") )]
94221	pub lk_set_ordr_id: Option<String>,
94222	#[cfg_attr( feature = "derive_serde", serde(rename = "LkSetOrdrSeq", skip_serializing_if = "Option::is_none") )]
94223	pub lk_set_ordr_seq: Option<f64>,
94224	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnTp", skip_serializing_if = "Option::is_none") )]
94225	pub exctn_tp: Option<ExecutionType1Choice>,
94226	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
94227	pub cdtr: Option<BranchAndFinancialInstitutionIdentification8>,
94228	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
94229	pub cdtr_acct: Option<CashAccount40>,
94230	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
94231	pub dbtr: Option<BranchAndFinancialInstitutionIdentification8>,
94232	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
94233	pub dbtr_acct: Option<CashAccount40>,
94234	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlsPerStgOrdr", skip_serializing_if = "Option::is_none") )]
94235	pub ttls_per_stg_ordr: Option<StandingOrderTotalAmount1>,
94236	#[cfg_attr( feature = "derive_serde", serde(rename = "ZeroSweepInd", skip_serializing_if = "Option::is_none") )]
94237	pub zero_sweep_ind: Option<bool>,
94238}
94239
94240impl StandingOrder11 {
94241	pub fn validate(&self) -> Result<(), ValidationError> {
94242		self.amt.validate()?;
94243		self.cdt_dbt_ind.validate()?;
94244		if let Some(ref val) = self.ccy {
94245			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
94246			if !pattern.is_match(val) {
94247				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
94248			}
94249		}
94250		if let Some(ref val) = self.tp { val.validate()? }
94251		if let Some(ref val) = self.assoctd_pool_acct { val.validate()? }
94252		if let Some(ref val) = self.ref_attr {
94253			if val.chars().count() < 1 {
94254				return Err(ValidationError::new(1001, "ref_attr is shorter than the minimum length of 1".to_string()));
94255			}
94256			if val.chars().count() > 35 {
94257				return Err(ValidationError::new(1002, "ref_attr exceeds the maximum length of 35".to_string()));
94258			}
94259		}
94260		if let Some(ref val) = self.frqcy { val.validate()? }
94261		if let Some(ref val) = self.vldty_prd { val.validate()? }
94262		if let Some(ref val) = self.sys_mmb { val.validate()? }
94263		if let Some(ref val) = self.rspnsbl_pty { val.validate()? }
94264		if let Some(ref val) = self.lk_set_id {
94265			if val.chars().count() < 1 {
94266				return Err(ValidationError::new(1001, "lk_set_id is shorter than the minimum length of 1".to_string()));
94267			}
94268			if val.chars().count() > 35 {
94269				return Err(ValidationError::new(1002, "lk_set_id exceeds the maximum length of 35".to_string()));
94270			}
94271		}
94272		if let Some(ref val) = self.lk_set_ordr_id {
94273			if val.chars().count() < 1 {
94274				return Err(ValidationError::new(1001, "lk_set_ordr_id is shorter than the minimum length of 1".to_string()));
94275			}
94276			if val.chars().count() > 35 {
94277				return Err(ValidationError::new(1002, "lk_set_ordr_id exceeds the maximum length of 35".to_string()));
94278			}
94279		}
94280		if let Some(ref val) = self.exctn_tp { val.validate()? }
94281		if let Some(ref val) = self.cdtr { val.validate()? }
94282		if let Some(ref val) = self.cdtr_acct { val.validate()? }
94283		if let Some(ref val) = self.dbtr { val.validate()? }
94284		if let Some(ref val) = self.dbtr_acct { val.validate()? }
94285		if let Some(ref val) = self.ttls_per_stg_ordr { val.validate()? }
94286		Ok(())
94287	}
94288}
94289
94290
94291// StandingOrderCriteria5 ...
94292#[cfg_attr(feature = "derive_debug", derive(Debug))]
94293#[cfg_attr(feature = "derive_default", derive(Default))]
94294#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94295#[cfg_attr(feature = "derive_clone", derive(Clone))]
94296#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94297pub struct StandingOrderCriteria5 {
94298	#[cfg_attr( feature = "derive_serde", serde(rename = "NewQryNm", skip_serializing_if = "Option::is_none") )]
94299	pub new_qry_nm: Option<String>,
94300	#[cfg_attr( feature = "derive_serde", serde(rename = "SchCrit", skip_serializing_if = "Option::is_none") )]
94301	pub sch_crit: Option<Vec<StandingOrderSearchCriteria5>>,
94302	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrCrit", skip_serializing_if = "Option::is_none") )]
94303	pub rtr_crit: Option<StandingOrderReturnCriteria1>,
94304}
94305
94306impl StandingOrderCriteria5 {
94307	pub fn validate(&self) -> Result<(), ValidationError> {
94308		if let Some(ref val) = self.new_qry_nm {
94309			if val.chars().count() < 1 {
94310				return Err(ValidationError::new(1001, "new_qry_nm is shorter than the minimum length of 1".to_string()));
94311			}
94312			if val.chars().count() > 35 {
94313				return Err(ValidationError::new(1002, "new_qry_nm exceeds the maximum length of 35".to_string()));
94314			}
94315		}
94316		if let Some(ref vec) = self.sch_crit { for item in vec { item.validate()? } }
94317		if let Some(ref val) = self.rtr_crit { val.validate()? }
94318		Ok(())
94319	}
94320}
94321
94322
94323// StandingOrderCriteria5Choice ...
94324#[cfg_attr(feature = "derive_debug", derive(Debug))]
94325#[cfg_attr(feature = "derive_default", derive(Default))]
94326#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94327#[cfg_attr(feature = "derive_clone", derive(Clone))]
94328#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94329pub struct StandingOrderCriteria5Choice {
94330	#[cfg_attr( feature = "derive_serde", serde(rename = "QryNm", skip_serializing_if = "Option::is_none") )]
94331	pub qry_nm: Option<String>,
94332	#[cfg_attr( feature = "derive_serde", serde(rename = "NewCrit", skip_serializing_if = "Option::is_none") )]
94333	pub new_crit: Option<StandingOrderCriteria5>,
94334}
94335
94336impl StandingOrderCriteria5Choice {
94337	pub fn validate(&self) -> Result<(), ValidationError> {
94338		if let Some(ref val) = self.qry_nm {
94339			if val.chars().count() < 1 {
94340				return Err(ValidationError::new(1001, "qry_nm is shorter than the minimum length of 1".to_string()));
94341			}
94342			if val.chars().count() > 35 {
94343				return Err(ValidationError::new(1002, "qry_nm exceeds the maximum length of 35".to_string()));
94344			}
94345		}
94346		if let Some(ref val) = self.new_crit { val.validate()? }
94347		Ok(())
94348	}
94349}
94350
94351
94352// StandingOrderIdentification8 ...
94353#[cfg_attr(feature = "derive_debug", derive(Debug))]
94354#[cfg_attr(feature = "derive_default", derive(Default))]
94355#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94356#[cfg_attr(feature = "derive_clone", derive(Clone))]
94357#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94358pub struct StandingOrderIdentification8 {
94359	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
94360	pub id: Option<String>,
94361	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct") )]
94362	pub acct: CashAccount40,
94363	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
94364	pub acct_ownr: Option<BranchAndFinancialInstitutionIdentification8>,
94365}
94366
94367impl StandingOrderIdentification8 {
94368	pub fn validate(&self) -> Result<(), ValidationError> {
94369		if let Some(ref val) = self.id {
94370			if val.chars().count() < 1 {
94371				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
94372			}
94373			if val.chars().count() > 35 {
94374				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
94375			}
94376		}
94377		self.acct.validate()?;
94378		if let Some(ref val) = self.acct_ownr { val.validate()? }
94379		Ok(())
94380	}
94381}
94382
94383
94384// StandingOrderIdentification9 ...
94385#[cfg_attr(feature = "derive_debug", derive(Debug))]
94386#[cfg_attr(feature = "derive_default", derive(Default))]
94387#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94388#[cfg_attr(feature = "derive_clone", derive(Clone))]
94389#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94390pub struct StandingOrderIdentification9 {
94391	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct") )]
94392	pub acct: CashAccount40,
94393	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none") )]
94394	pub acct_ownr: Option<BranchAndFinancialInstitutionIdentification8>,
94395}
94396
94397impl StandingOrderIdentification9 {
94398	pub fn validate(&self) -> Result<(), ValidationError> {
94399		self.acct.validate()?;
94400		if let Some(ref val) = self.acct_ownr { val.validate()? }
94401		Ok(())
94402	}
94403}
94404
94405
94406// StandingOrderOrAll4Choice ...
94407#[cfg_attr(feature = "derive_debug", derive(Debug))]
94408#[cfg_attr(feature = "derive_default", derive(Default))]
94409#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94410#[cfg_attr(feature = "derive_clone", derive(Clone))]
94411#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94412pub struct StandingOrderOrAll4Choice {
94413	#[cfg_attr( feature = "derive_serde", serde(rename = "StgOrdr", skip_serializing_if = "Option::is_none") )]
94414	pub stg_ordr: Option<Vec<StandingOrderIdentification8>>,
94415	#[cfg_attr( feature = "derive_serde", serde(rename = "AllStgOrdrs", skip_serializing_if = "Option::is_none") )]
94416	pub all_stg_ordrs: Option<Vec<StandingOrderIdentification9>>,
94417}
94418
94419impl StandingOrderOrAll4Choice {
94420	pub fn validate(&self) -> Result<(), ValidationError> {
94421		if let Some(ref vec) = self.stg_ordr { for item in vec { item.validate()? } }
94422		if let Some(ref vec) = self.all_stg_ordrs { for item in vec { item.validate()? } }
94423		Ok(())
94424	}
94425}
94426
94427
94428// StandingOrderOrError10Choice ...
94429#[cfg_attr(feature = "derive_debug", derive(Debug))]
94430#[cfg_attr(feature = "derive_default", derive(Default))]
94431#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94432#[cfg_attr(feature = "derive_clone", derive(Clone))]
94433#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94434pub struct StandingOrderOrError10Choice {
94435	#[cfg_attr( feature = "derive_serde", serde(rename = "StgOrdr", skip_serializing_if = "Option::is_none") )]
94436	pub stg_ordr: Option<StandingOrder11>,
94437	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
94438	pub biz_err: Option<Vec<ErrorHandling5>>,
94439}
94440
94441impl StandingOrderOrError10Choice {
94442	pub fn validate(&self) -> Result<(), ValidationError> {
94443		if let Some(ref val) = self.stg_ordr { val.validate()? }
94444		if let Some(ref vec) = self.biz_err { for item in vec { item.validate()? } }
94445		Ok(())
94446	}
94447}
94448
94449
94450// StandingOrderOrError9Choice ...
94451#[cfg_attr(feature = "derive_debug", derive(Debug))]
94452#[cfg_attr(feature = "derive_default", derive(Default))]
94453#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94454#[cfg_attr(feature = "derive_clone", derive(Clone))]
94455#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94456pub struct StandingOrderOrError9Choice {
94457	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
94458	pub rpt: Option<Vec<StandingOrderReport3>>,
94459	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
94460	pub oprl_err: Option<Vec<ErrorHandling5>>,
94461}
94462
94463impl StandingOrderOrError9Choice {
94464	pub fn validate(&self) -> Result<(), ValidationError> {
94465		if let Some(ref vec) = self.rpt { for item in vec { item.validate()? } }
94466		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
94467		Ok(())
94468	}
94469}
94470
94471
94472// StandingOrderQuery5 ...
94473#[cfg_attr(feature = "derive_debug", derive(Debug))]
94474#[cfg_attr(feature = "derive_default", derive(Default))]
94475#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94476#[cfg_attr(feature = "derive_clone", derive(Clone))]
94477#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94478pub struct StandingOrderQuery5 {
94479	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp", skip_serializing_if = "Option::is_none") )]
94480	pub qry_tp: Option<QueryType2Code>,
94481	#[cfg_attr( feature = "derive_serde", serde(rename = "StgOrdrCrit", skip_serializing_if = "Option::is_none") )]
94482	pub stg_ordr_crit: Option<StandingOrderCriteria5Choice>,
94483}
94484
94485impl StandingOrderQuery5 {
94486	pub fn validate(&self) -> Result<(), ValidationError> {
94487		if let Some(ref val) = self.qry_tp { val.validate()? }
94488		if let Some(ref val) = self.stg_ordr_crit { val.validate()? }
94489		Ok(())
94490	}
94491}
94492
94493
94494// StandingOrderQueryType1Code ...
94495#[cfg_attr(feature = "derive_debug", derive(Debug))]
94496#[cfg_attr(feature = "derive_default", derive(Default))]
94497#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94498#[cfg_attr(feature = "derive_clone", derive(Clone))]
94499#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94500pub enum StandingOrderQueryType1Code {
94501	#[cfg_attr(feature = "derive_default", default)]
94502	#[cfg_attr( feature = "derive_serde", serde(rename = "SLST") )]
94503	CodeSLST,
94504	#[cfg_attr( feature = "derive_serde", serde(rename = "SDTL") )]
94505	CodeSDTL,
94506	#[cfg_attr( feature = "derive_serde", serde(rename = "TAPS") )]
94507	CodeTAPS,
94508	#[cfg_attr( feature = "derive_serde", serde(rename = "SLSL") )]
94509	CodeSLSL,
94510	#[cfg_attr( feature = "derive_serde", serde(rename = "SWLS") )]
94511	CodeSWLS,
94512}
94513
94514impl StandingOrderQueryType1Code {
94515	pub fn validate(&self) -> Result<(), ValidationError> {
94516		Ok(())
94517	}
94518}
94519
94520
94521// StandingOrderReport3 ...
94522#[cfg_attr(feature = "derive_debug", derive(Debug))]
94523#[cfg_attr(feature = "derive_default", derive(Default))]
94524#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94525#[cfg_attr(feature = "derive_clone", derive(Clone))]
94526#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94527pub struct StandingOrderReport3 {
94528	#[cfg_attr( feature = "derive_serde", serde(rename = "StgOrdrId") )]
94529	pub stg_ordr_id: StandingOrderIdentification8,
94530	#[cfg_attr( feature = "derive_serde", serde(rename = "StgOrdrOrErr") )]
94531	pub stg_ordr_or_err: StandingOrderOrError10Choice,
94532}
94533
94534impl StandingOrderReport3 {
94535	pub fn validate(&self) -> Result<(), ValidationError> {
94536		self.stg_ordr_id.validate()?;
94537		self.stg_ordr_or_err.validate()?;
94538		Ok(())
94539	}
94540}
94541
94542
94543// StandingOrderReturnCriteria1 ...
94544#[cfg_attr(feature = "derive_debug", derive(Debug))]
94545#[cfg_attr(feature = "derive_default", derive(Default))]
94546#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94547#[cfg_attr(feature = "derive_clone", derive(Clone))]
94548#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94549pub struct StandingOrderReturnCriteria1 {
94550	#[cfg_attr( feature = "derive_serde", serde(rename = "StgOrdrIdInd", skip_serializing_if = "Option::is_none") )]
94551	pub stg_ordr_id_ind: Option<bool>,
94552	#[cfg_attr( feature = "derive_serde", serde(rename = "TpInd", skip_serializing_if = "Option::is_none") )]
94553	pub tp_ind: Option<bool>,
94554	#[cfg_attr( feature = "derive_serde", serde(rename = "SysMmbInd", skip_serializing_if = "Option::is_none") )]
94555	pub sys_mmb_ind: Option<bool>,
94556	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnsblPtyInd", skip_serializing_if = "Option::is_none") )]
94557	pub rspnsbl_pty_ind: Option<bool>,
94558	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyInd", skip_serializing_if = "Option::is_none") )]
94559	pub ccy_ind: Option<bool>,
94560	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcctInd", skip_serializing_if = "Option::is_none") )]
94561	pub dbtr_acct_ind: Option<bool>,
94562	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcctInd", skip_serializing_if = "Option::is_none") )]
94563	pub cdtr_acct_ind: Option<bool>,
94564	#[cfg_attr( feature = "derive_serde", serde(rename = "AssoctdPoolAcct", skip_serializing_if = "Option::is_none") )]
94565	pub assoctd_pool_acct: Option<bool>,
94566	#[cfg_attr( feature = "derive_serde", serde(rename = "FrqcyInd", skip_serializing_if = "Option::is_none") )]
94567	pub frqcy_ind: Option<bool>,
94568	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnTpInd", skip_serializing_if = "Option::is_none") )]
94569	pub exctn_tp_ind: Option<bool>,
94570	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtyFrInd", skip_serializing_if = "Option::is_none") )]
94571	pub vldty_fr_ind: Option<bool>,
94572	#[cfg_attr( feature = "derive_serde", serde(rename = "VldToInd", skip_serializing_if = "Option::is_none") )]
94573	pub vld_to_ind: Option<bool>,
94574	#[cfg_attr( feature = "derive_serde", serde(rename = "LkSetIdInd", skip_serializing_if = "Option::is_none") )]
94575	pub lk_set_id_ind: Option<bool>,
94576	#[cfg_attr( feature = "derive_serde", serde(rename = "LkSetOrdrIdInd", skip_serializing_if = "Option::is_none") )]
94577	pub lk_set_ordr_id_ind: Option<bool>,
94578	#[cfg_attr( feature = "derive_serde", serde(rename = "LkSetOrdrSeqInd", skip_serializing_if = "Option::is_none") )]
94579	pub lk_set_ordr_seq_ind: Option<bool>,
94580	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlAmtInd", skip_serializing_if = "Option::is_none") )]
94581	pub ttl_amt_ind: Option<bool>,
94582	#[cfg_attr( feature = "derive_serde", serde(rename = "ZeroSweepInd", skip_serializing_if = "Option::is_none") )]
94583	pub zero_sweep_ind: Option<bool>,
94584}
94585
94586impl StandingOrderReturnCriteria1 {
94587	pub fn validate(&self) -> Result<(), ValidationError> {
94588		Ok(())
94589	}
94590}
94591
94592
94593// StandingOrderSearchCriteria5 ...
94594#[cfg_attr(feature = "derive_debug", derive(Debug))]
94595#[cfg_attr(feature = "derive_default", derive(Default))]
94596#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94597#[cfg_attr(feature = "derive_clone", derive(Clone))]
94598#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94599pub struct StandingOrderSearchCriteria5 {
94600	#[cfg_attr( feature = "derive_serde", serde(rename = "KeyAttrbtsInd", skip_serializing_if = "Option::is_none") )]
94601	pub key_attrbts_ind: Option<bool>,
94602	#[cfg_attr( feature = "derive_serde", serde(rename = "StgOrdrId", skip_serializing_if = "Option::is_none") )]
94603	pub stg_ordr_id: Option<String>,
94604	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
94605	pub tp: Option<StandingOrderType1Choice>,
94606	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
94607	pub acct: Option<CashAccount40>,
94608	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
94609	pub ccy: Option<String>,
94610	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtyPrd", skip_serializing_if = "Option::is_none") )]
94611	pub vldty_prd: Option<DatePeriod2Choice>,
94612	#[cfg_attr( feature = "derive_serde", serde(rename = "SysMmb", skip_serializing_if = "Option::is_none") )]
94613	pub sys_mmb: Option<BranchAndFinancialInstitutionIdentification8>,
94614	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnsblPty", skip_serializing_if = "Option::is_none") )]
94615	pub rspnsbl_pty: Option<BranchAndFinancialInstitutionIdentification8>,
94616	#[cfg_attr( feature = "derive_serde", serde(rename = "AssoctdPoolAcct", skip_serializing_if = "Option::is_none") )]
94617	pub assoctd_pool_acct: Option<AccountIdentification4Choice>,
94618	#[cfg_attr( feature = "derive_serde", serde(rename = "LkSetId", skip_serializing_if = "Option::is_none") )]
94619	pub lk_set_id: Option<String>,
94620	#[cfg_attr( feature = "derive_serde", serde(rename = "LkSetOrdrId", skip_serializing_if = "Option::is_none") )]
94621	pub lk_set_ordr_id: Option<String>,
94622	#[cfg_attr( feature = "derive_serde", serde(rename = "LkSetOrdrSeq", skip_serializing_if = "Option::is_none") )]
94623	pub lk_set_ordr_seq: Option<f64>,
94624	#[cfg_attr( feature = "derive_serde", serde(rename = "ZeroSweepInd", skip_serializing_if = "Option::is_none") )]
94625	pub zero_sweep_ind: Option<bool>,
94626}
94627
94628impl StandingOrderSearchCriteria5 {
94629	pub fn validate(&self) -> Result<(), ValidationError> {
94630		if let Some(ref val) = self.stg_ordr_id {
94631			if val.chars().count() < 1 {
94632				return Err(ValidationError::new(1001, "stg_ordr_id is shorter than the minimum length of 1".to_string()));
94633			}
94634			if val.chars().count() > 35 {
94635				return Err(ValidationError::new(1002, "stg_ordr_id exceeds the maximum length of 35".to_string()));
94636			}
94637		}
94638		if let Some(ref val) = self.tp { val.validate()? }
94639		if let Some(ref val) = self.acct { val.validate()? }
94640		if let Some(ref val) = self.ccy {
94641			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
94642			if !pattern.is_match(val) {
94643				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
94644			}
94645		}
94646		if let Some(ref val) = self.vldty_prd { val.validate()? }
94647		if let Some(ref val) = self.sys_mmb { val.validate()? }
94648		if let Some(ref val) = self.rspnsbl_pty { val.validate()? }
94649		if let Some(ref val) = self.assoctd_pool_acct { val.validate()? }
94650		if let Some(ref val) = self.lk_set_id {
94651			if val.chars().count() < 1 {
94652				return Err(ValidationError::new(1001, "lk_set_id is shorter than the minimum length of 1".to_string()));
94653			}
94654			if val.chars().count() > 35 {
94655				return Err(ValidationError::new(1002, "lk_set_id exceeds the maximum length of 35".to_string()));
94656			}
94657		}
94658		if let Some(ref val) = self.lk_set_ordr_id {
94659			if val.chars().count() < 1 {
94660				return Err(ValidationError::new(1001, "lk_set_ordr_id is shorter than the minimum length of 1".to_string()));
94661			}
94662			if val.chars().count() > 35 {
94663				return Err(ValidationError::new(1002, "lk_set_ordr_id exceeds the maximum length of 35".to_string()));
94664			}
94665		}
94666		Ok(())
94667	}
94668}
94669
94670
94671// StandingOrderTotalAmount1 ...
94672#[cfg_attr(feature = "derive_debug", derive(Debug))]
94673#[cfg_attr(feature = "derive_default", derive(Default))]
94674#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94675#[cfg_attr(feature = "derive_clone", derive(Clone))]
94676#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94677pub struct StandingOrderTotalAmount1 {
94678	#[cfg_attr( feature = "derive_serde", serde(rename = "SetPrdfndOrdr") )]
94679	pub set_prdfnd_ordr: TotalAmountAndCurrency1,
94680	#[cfg_attr( feature = "derive_serde", serde(rename = "PdgPrdfndOrdr") )]
94681	pub pdg_prdfnd_ordr: TotalAmountAndCurrency1,
94682	#[cfg_attr( feature = "derive_serde", serde(rename = "SetStgOrdr") )]
94683	pub set_stg_ordr: TotalAmountAndCurrency1,
94684	#[cfg_attr( feature = "derive_serde", serde(rename = "PdgStgOrdr") )]
94685	pub pdg_stg_ordr: TotalAmountAndCurrency1,
94686}
94687
94688impl StandingOrderTotalAmount1 {
94689	pub fn validate(&self) -> Result<(), ValidationError> {
94690		self.set_prdfnd_ordr.validate()?;
94691		self.pdg_prdfnd_ordr.validate()?;
94692		self.set_stg_ordr.validate()?;
94693		self.pdg_stg_ordr.validate()?;
94694		Ok(())
94695	}
94696}
94697
94698
94699// StandingOrderType1Choice ...
94700#[cfg_attr(feature = "derive_debug", derive(Debug))]
94701#[cfg_attr(feature = "derive_default", derive(Default))]
94702#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94703#[cfg_attr(feature = "derive_clone", derive(Clone))]
94704#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94705pub struct StandingOrderType1Choice {
94706	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
94707	pub cd: Option<StandingOrderType1Code>,
94708	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
94709	pub prtry: Option<GenericIdentification1>,
94710}
94711
94712impl StandingOrderType1Choice {
94713	pub fn validate(&self) -> Result<(), ValidationError> {
94714		if let Some(ref val) = self.cd { val.validate()? }
94715		if let Some(ref val) = self.prtry { val.validate()? }
94716		Ok(())
94717	}
94718}
94719
94720
94721// StandingOrderType1Code ...
94722#[cfg_attr(feature = "derive_debug", derive(Debug))]
94723#[cfg_attr(feature = "derive_default", derive(Default))]
94724#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94725#[cfg_attr(feature = "derive_clone", derive(Clone))]
94726#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94727pub enum StandingOrderType1Code {
94728	#[cfg_attr(feature = "derive_default", default)]
94729	#[cfg_attr( feature = "derive_serde", serde(rename = "USTO") )]
94730	CodeUSTO,
94731	#[cfg_attr( feature = "derive_serde", serde(rename = "PSTO") )]
94732	CodePSTO,
94733}
94734
94735impl StandingOrderType1Code {
94736	pub fn validate(&self) -> Result<(), ValidationError> {
94737		Ok(())
94738	}
94739}
94740
94741
94742// StatementFrequencyAndForm1 ...
94743#[cfg_attr(feature = "derive_debug", derive(Debug))]
94744#[cfg_attr(feature = "derive_default", derive(Default))]
94745#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94746#[cfg_attr(feature = "derive_clone", derive(Clone))]
94747#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94748pub struct StatementFrequencyAndForm1 {
94749	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy") )]
94750	pub frqcy: Frequency7Code,
94751	#[cfg_attr( feature = "derive_serde", serde(rename = "ComMtd") )]
94752	pub com_mtd: CommunicationMethod2Choice,
94753	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryAdr") )]
94754	pub dlvry_adr: String,
94755	#[cfg_attr( feature = "derive_serde", serde(rename = "Frmt") )]
94756	pub frmt: CommunicationFormat1Choice,
94757}
94758
94759impl StatementFrequencyAndForm1 {
94760	pub fn validate(&self) -> Result<(), ValidationError> {
94761		self.frqcy.validate()?;
94762		self.com_mtd.validate()?;
94763		if self.dlvry_adr.chars().count() < 1 {
94764			return Err(ValidationError::new(1001, "dlvry_adr is shorter than the minimum length of 1".to_string()));
94765		}
94766		if self.dlvry_adr.chars().count() > 350 {
94767			return Err(ValidationError::new(1002, "dlvry_adr exceeds the maximum length of 350".to_string()));
94768		}
94769		self.frmt.validate()?;
94770		Ok(())
94771	}
94772}
94773
94774
94775// StatementFrequencyAndFormModification1 ...
94776#[cfg_attr(feature = "derive_debug", derive(Debug))]
94777#[cfg_attr(feature = "derive_default", derive(Default))]
94778#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94779#[cfg_attr(feature = "derive_clone", derive(Clone))]
94780#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94781pub struct StatementFrequencyAndFormModification1 {
94782	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
94783	pub mod_cd: Option<Modification1Code>,
94784	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtFrqcyAndForm") )]
94785	pub stmt_frqcy_and_form: StatementFrequencyAndForm1,
94786}
94787
94788impl StatementFrequencyAndFormModification1 {
94789	pub fn validate(&self) -> Result<(), ValidationError> {
94790		if let Some(ref val) = self.mod_cd { val.validate()? }
94791		self.stmt_frqcy_and_form.validate()?;
94792		Ok(())
94793	}
94794}
94795
94796
94797// StatementFrequencyReason2Choice ...
94798#[cfg_attr(feature = "derive_debug", derive(Debug))]
94799#[cfg_attr(feature = "derive_default", derive(Default))]
94800#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94801#[cfg_attr(feature = "derive_clone", derive(Clone))]
94802#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94803pub struct StatementFrequencyReason2Choice {
94804	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
94805	pub cd: Option<EventFrequency9Code>,
94806	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
94807	pub prtry: Option<GenericIdentification47>,
94808}
94809
94810impl StatementFrequencyReason2Choice {
94811	pub fn validate(&self) -> Result<(), ValidationError> {
94812		if let Some(ref val) = self.cd { val.validate()? }
94813		if let Some(ref val) = self.prtry { val.validate()? }
94814		Ok(())
94815	}
94816}
94817
94818
94819// StatementGroup5 ...
94820#[cfg_attr(feature = "derive_debug", derive(Debug))]
94821#[cfg_attr(feature = "derive_default", derive(Default))]
94822#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94823#[cfg_attr(feature = "derive_clone", derive(Clone))]
94824#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94825pub struct StatementGroup5 {
94826	#[cfg_attr( feature = "derive_serde", serde(rename = "GrpId") )]
94827	pub grp_id: String,
94828	#[cfg_attr( feature = "derive_serde", serde(rename = "Sndr") )]
94829	pub sndr: PartyIdentification273,
94830	#[cfg_attr( feature = "derive_serde", serde(rename = "SndrIndvCtct", skip_serializing_if = "Option::is_none") )]
94831	pub sndr_indv_ctct: Option<Vec<Contact13>>,
94832	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcvr") )]
94833	pub rcvr: PartyIdentification273,
94834	#[cfg_attr( feature = "derive_serde", serde(rename = "RcvrIndvCtct", skip_serializing_if = "Option::is_none") )]
94835	pub rcvr_indv_ctct: Option<Vec<Contact13>>,
94836	#[cfg_attr( feature = "derive_serde", serde(rename = "BllgStmt") )]
94837	pub bllg_stmt: Vec<BillingStatement5>,
94838}
94839
94840impl StatementGroup5 {
94841	pub fn validate(&self) -> Result<(), ValidationError> {
94842		if self.grp_id.chars().count() < 1 {
94843			return Err(ValidationError::new(1001, "grp_id is shorter than the minimum length of 1".to_string()));
94844		}
94845		if self.grp_id.chars().count() > 35 {
94846			return Err(ValidationError::new(1002, "grp_id exceeds the maximum length of 35".to_string()));
94847		}
94848		self.sndr.validate()?;
94849		if let Some(ref vec) = self.sndr_indv_ctct { for item in vec { item.validate()? } }
94850		self.rcvr.validate()?;
94851		if let Some(ref vec) = self.rcvr_indv_ctct { for item in vec { item.validate()? } }
94852		for item in &self.bllg_stmt { item.validate()? }
94853		Ok(())
94854	}
94855}
94856
94857
94858// StatementResolutionEntry5 ...
94859#[cfg_attr(feature = "derive_debug", derive(Debug))]
94860#[cfg_attr(feature = "derive_default", derive(Default))]
94861#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94862#[cfg_attr(feature = "derive_clone", derive(Clone))]
94863#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94864pub struct StatementResolutionEntry5 {
94865	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
94866	pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
94867	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlStmtId", skip_serializing_if = "Option::is_none") )]
94868	pub orgnl_stmt_id: Option<String>,
94869	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
94870	pub uetr: Option<String>,
94871	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrRef", skip_serializing_if = "Option::is_none") )]
94872	pub acct_svcr_ref: Option<String>,
94873	#[cfg_attr( feature = "derive_serde", serde(rename = "CrrctdAmt", skip_serializing_if = "Option::is_none") )]
94874	pub crrctd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
94875	#[cfg_attr( feature = "derive_serde", serde(rename = "Chrgs", skip_serializing_if = "Option::is_none") )]
94876	pub chrgs: Option<Vec<Charges15>>,
94877	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp", skip_serializing_if = "Option::is_none") )]
94878	pub purp: Option<Purpose2Choice>,
94879}
94880
94881impl StatementResolutionEntry5 {
94882	pub fn validate(&self) -> Result<(), ValidationError> {
94883		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
94884		if let Some(ref val) = self.orgnl_stmt_id {
94885			if val.chars().count() < 1 {
94886				return Err(ValidationError::new(1001, "orgnl_stmt_id is shorter than the minimum length of 1".to_string()));
94887			}
94888			if val.chars().count() > 35 {
94889				return Err(ValidationError::new(1002, "orgnl_stmt_id exceeds the maximum length of 35".to_string()));
94890			}
94891		}
94892		if let Some(ref val) = self.uetr {
94893			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
94894			if !pattern.is_match(val) {
94895				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
94896			}
94897		}
94898		if let Some(ref val) = self.acct_svcr_ref {
94899			if val.chars().count() < 1 {
94900				return Err(ValidationError::new(1001, "acct_svcr_ref is shorter than the minimum length of 1".to_string()));
94901			}
94902			if val.chars().count() > 35 {
94903				return Err(ValidationError::new(1002, "acct_svcr_ref exceeds the maximum length of 35".to_string()));
94904			}
94905		}
94906		if let Some(ref val) = self.crrctd_amt { val.validate()? }
94907		if let Some(ref vec) = self.chrgs { for item in vec { item.validate()? } }
94908		if let Some(ref val) = self.purp { val.validate()? }
94909		Ok(())
94910	}
94911}
94912
94913
94914// StatementUpdateType1Code ...
94915#[cfg_attr(feature = "derive_debug", derive(Debug))]
94916#[cfg_attr(feature = "derive_default", derive(Default))]
94917#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94918#[cfg_attr(feature = "derive_clone", derive(Clone))]
94919#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94920pub enum StatementUpdateType1Code {
94921	#[cfg_attr(feature = "derive_default", default)]
94922	#[cfg_attr( feature = "derive_serde", serde(rename = "COMP") )]
94923	CodeCOMP,
94924	#[cfg_attr( feature = "derive_serde", serde(rename = "DELT") )]
94925	CodeDELT,
94926}
94927
94928impl StatementUpdateType1Code {
94929	pub fn validate(&self) -> Result<(), ValidationError> {
94930		Ok(())
94931	}
94932}
94933
94934
94935// StatisticalReportingStatus1Code ...
94936#[cfg_attr(feature = "derive_debug", derive(Debug))]
94937#[cfg_attr(feature = "derive_default", derive(Default))]
94938#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94939#[cfg_attr(feature = "derive_clone", derive(Clone))]
94940#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94941pub enum StatisticalReportingStatus1Code {
94942	#[cfg_attr(feature = "derive_default", default)]
94943	#[cfg_attr( feature = "derive_serde", serde(rename = "ACPT") )]
94944	CodeACPT,
94945	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTC") )]
94946	CodeACTC,
94947	#[cfg_attr( feature = "derive_serde", serde(rename = "PART") )]
94948	CodePART,
94949	#[cfg_attr( feature = "derive_serde", serde(rename = "PDNG") )]
94950	CodePDNG,
94951	#[cfg_attr( feature = "derive_serde", serde(rename = "RCVD") )]
94952	CodeRCVD,
94953	#[cfg_attr( feature = "derive_serde", serde(rename = "RJCT") )]
94954	CodeRJCT,
94955	#[cfg_attr( feature = "derive_serde", serde(rename = "RMDR") )]
94956	CodeRMDR,
94957	#[cfg_attr( feature = "derive_serde", serde(rename = "INCF") )]
94958	CodeINCF,
94959	#[cfg_attr( feature = "derive_serde", serde(rename = "CRPT") )]
94960	CodeCRPT,
94961}
94962
94963impl StatisticalReportingStatus1Code {
94964	pub fn validate(&self) -> Result<(), ValidationError> {
94965		Ok(())
94966	}
94967}
94968
94969
94970// StatisticalReportingStatus2Code ...
94971#[cfg_attr(feature = "derive_debug", derive(Debug))]
94972#[cfg_attr(feature = "derive_default", derive(Default))]
94973#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94974#[cfg_attr(feature = "derive_clone", derive(Clone))]
94975#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94976pub enum StatisticalReportingStatus2Code {
94977	#[cfg_attr(feature = "derive_default", default)]
94978	#[cfg_attr( feature = "derive_serde", serde(rename = "ACPT") )]
94979	CodeACPT,
94980	#[cfg_attr( feature = "derive_serde", serde(rename = "RJCT") )]
94981	CodeRJCT,
94982	#[cfg_attr( feature = "derive_serde", serde(rename = "WARN") )]
94983	CodeWARN,
94984}
94985
94986impl StatisticalReportingStatus2Code {
94987	pub fn validate(&self) -> Result<(), ValidationError> {
94988		Ok(())
94989	}
94990}
94991
94992
94993// StatisticsByPredefinedTimePeriods2 ...
94994#[cfg_attr(feature = "derive_debug", derive(Debug))]
94995#[cfg_attr(feature = "derive_default", derive(Default))]
94996#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
94997#[cfg_attr(feature = "derive_clone", derive(Clone))]
94998#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
94999pub struct StatisticsByPredefinedTimePeriods2 {
95000	#[cfg_attr( feature = "derive_serde", serde(rename = "HghstPricVal12Mnths", skip_serializing_if = "Option::is_none") )]
95001	pub hghst_pric_val12_mnths: Option<PriceValue5>,
95002	#[cfg_attr( feature = "derive_serde", serde(rename = "LwstPricVal12Mnths", skip_serializing_if = "Option::is_none") )]
95003	pub lwst_pric_val12_mnths: Option<PriceValue5>,
95004	#[cfg_attr( feature = "derive_serde", serde(rename = "OneYrPricChng", skip_serializing_if = "Option::is_none") )]
95005	pub one_yr_pric_chng: Option<PriceValueChange1>,
95006	#[cfg_attr( feature = "derive_serde", serde(rename = "ThreeYrPricChng", skip_serializing_if = "Option::is_none") )]
95007	pub three_yr_pric_chng: Option<PriceValueChange1>,
95008	#[cfg_attr( feature = "derive_serde", serde(rename = "FiveYrPricChng", skip_serializing_if = "Option::is_none") )]
95009	pub five_yr_pric_chng: Option<PriceValueChange1>,
95010}
95011
95012impl StatisticsByPredefinedTimePeriods2 {
95013	pub fn validate(&self) -> Result<(), ValidationError> {
95014		if let Some(ref val) = self.hghst_pric_val12_mnths { val.validate()? }
95015		if let Some(ref val) = self.lwst_pric_val12_mnths { val.validate()? }
95016		if let Some(ref val) = self.one_yr_pric_chng { val.validate()? }
95017		if let Some(ref val) = self.three_yr_pric_chng { val.validate()? }
95018		if let Some(ref val) = self.five_yr_pric_chng { val.validate()? }
95019		Ok(())
95020	}
95021}
95022
95023
95024// StatisticsByUserDefinedTimePeriod2 ...
95025#[cfg_attr(feature = "derive_debug", derive(Debug))]
95026#[cfg_attr(feature = "derive_default", derive(Default))]
95027#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95028#[cfg_attr(feature = "derive_clone", derive(Clone))]
95029#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95030pub struct StatisticsByUserDefinedTimePeriod2 {
95031	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd") )]
95032	pub prd: DateOrDateTimePeriodChoice,
95033	#[cfg_attr( feature = "derive_serde", serde(rename = "HghstPricVal", skip_serializing_if = "Option::is_none") )]
95034	pub hghst_pric_val: Option<PriceValue5>,
95035	#[cfg_attr( feature = "derive_serde", serde(rename = "LwstPricVal", skip_serializing_if = "Option::is_none") )]
95036	pub lwst_pric_val: Option<PriceValue5>,
95037	#[cfg_attr( feature = "derive_serde", serde(rename = "PricChng", skip_serializing_if = "Option::is_none") )]
95038	pub pric_chng: Option<PriceValueChange1>,
95039	#[cfg_attr( feature = "derive_serde", serde(rename = "Yld", skip_serializing_if = "Option::is_none") )]
95040	pub yld: Option<f64>,
95041}
95042
95043impl StatisticsByUserDefinedTimePeriod2 {
95044	pub fn validate(&self) -> Result<(), ValidationError> {
95045		self.prd.validate()?;
95046		if let Some(ref val) = self.hghst_pric_val { val.validate()? }
95047		if let Some(ref val) = self.lwst_pric_val { val.validate()? }
95048		if let Some(ref val) = self.pric_chng { val.validate()? }
95049		Ok(())
95050	}
95051}
95052
95053
95054// StatisticsPerCounterparty16Choice ...
95055#[cfg_attr(feature = "derive_debug", derive(Debug))]
95056#[cfg_attr(feature = "derive_default", derive(Default))]
95057#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95058#[cfg_attr(feature = "derive_clone", derive(Clone))]
95059#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95060pub struct StatisticsPerCounterparty16Choice {
95061	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
95062	pub data_set_actn: Option<ReportPeriodActivity1Code>,
95063	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
95064	pub rpt: Option<DetailedStatisticsPerCounterparty17>,
95065}
95066
95067impl StatisticsPerCounterparty16Choice {
95068	pub fn validate(&self) -> Result<(), ValidationError> {
95069		if let Some(ref val) = self.data_set_actn { val.validate()? }
95070		if let Some(ref val) = self.rpt { val.validate()? }
95071		Ok(())
95072	}
95073}
95074
95075
95076// StatisticsPerCounterparty18Choice ...
95077#[cfg_attr(feature = "derive_debug", derive(Debug))]
95078#[cfg_attr(feature = "derive_default", derive(Default))]
95079#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95080#[cfg_attr(feature = "derive_clone", derive(Clone))]
95081#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95082pub struct StatisticsPerCounterparty18Choice {
95083	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
95084	pub data_set_actn: Option<ReportPeriodActivity1Code>,
95085	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
95086	pub rpt: Option<DetailedStatisticsPerCounterparty19>,
95087}
95088
95089impl StatisticsPerCounterparty18Choice {
95090	pub fn validate(&self) -> Result<(), ValidationError> {
95091		if let Some(ref val) = self.data_set_actn { val.validate()? }
95092		if let Some(ref val) = self.rpt { val.validate()? }
95093		Ok(())
95094	}
95095}
95096
95097
95098// StatisticsPerCounterparty19Choice ...
95099#[cfg_attr(feature = "derive_debug", derive(Debug))]
95100#[cfg_attr(feature = "derive_default", derive(Default))]
95101#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95102#[cfg_attr(feature = "derive_clone", derive(Clone))]
95103#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95104pub struct StatisticsPerCounterparty19Choice {
95105	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
95106	pub data_set_actn: Option<ReportPeriodActivity1Code>,
95107	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
95108	pub rpt: Option<Vec<ReconciliationStatisticsPerCounterparty4>>,
95109}
95110
95111impl StatisticsPerCounterparty19Choice {
95112	pub fn validate(&self) -> Result<(), ValidationError> {
95113		if let Some(ref val) = self.data_set_actn { val.validate()? }
95114		if let Some(ref vec) = self.rpt { for item in vec { item.validate()? } }
95115		Ok(())
95116	}
95117}
95118
95119
95120// StatisticsTransparency2 ...
95121#[cfg_attr(feature = "derive_debug", derive(Debug))]
95122#[cfg_attr(feature = "derive_default", derive(Default))]
95123#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95124#[cfg_attr(feature = "derive_clone", derive(Clone))]
95125#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95126pub struct StatisticsTransparency2 {
95127	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfTxsExctd") )]
95128	pub ttl_nb_of_txs_exctd: f64,
95129	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlVolOfTxsExctd") )]
95130	pub ttl_vol_of_txs_exctd: f64,
95131}
95132
95133impl StatisticsTransparency2 {
95134	pub fn validate(&self) -> Result<(), ValidationError> {
95135		Ok(())
95136	}
95137}
95138
95139
95140// StatisticsTransparency3 ...
95141#[cfg_attr(feature = "derive_debug", derive(Debug))]
95142#[cfg_attr(feature = "derive_default", derive(Default))]
95143#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95144#[cfg_attr(feature = "derive_clone", derive(Clone))]
95145#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95146pub struct StatisticsTransparency3 {
95147	#[cfg_attr( feature = "derive_serde", serde(rename = "AvrgDalyTrnvr", skip_serializing_if = "Option::is_none") )]
95148	pub avrg_daly_trnvr: Option<ActiveCurrencyAndAmount>,
95149	#[cfg_attr( feature = "derive_serde", serde(rename = "AvrgTxVal", skip_serializing_if = "Option::is_none") )]
95150	pub avrg_tx_val: Option<ActiveCurrencyAndAmount>,
95151	#[cfg_attr( feature = "derive_serde", serde(rename = "LrgInScale", skip_serializing_if = "Option::is_none") )]
95152	pub lrg_in_scale: Option<f64>,
95153	#[cfg_attr( feature = "derive_serde", serde(rename = "StdMktSz", skip_serializing_if = "Option::is_none") )]
95154	pub std_mkt_sz: Option<f64>,
95155	#[cfg_attr( feature = "derive_serde", serde(rename = "AvrgDalyNbOfTxs", skip_serializing_if = "Option::is_none") )]
95156	pub avrg_daly_nb_of_txs: Option<f64>,
95157	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfTxsExctd", skip_serializing_if = "Option::is_none") )]
95158	pub ttl_nb_of_txs_exctd: Option<f64>,
95159	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlVolOfTxsExctd", skip_serializing_if = "Option::is_none") )]
95160	pub ttl_vol_of_txs_exctd: Option<f64>,
95161	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNbOfTradgDays", skip_serializing_if = "Option::is_none") )]
95162	pub ttl_nb_of_tradg_days: Option<f64>,
95163}
95164
95165impl StatisticsTransparency3 {
95166	pub fn validate(&self) -> Result<(), ValidationError> {
95167		if let Some(ref val) = self.avrg_daly_trnvr { val.validate()? }
95168		if let Some(ref val) = self.avrg_tx_val { val.validate()? }
95169		Ok(())
95170	}
95171}
95172
95173
95174// Status25Choice ...
95175#[cfg_attr(feature = "derive_debug", derive(Debug))]
95176#[cfg_attr(feature = "derive_default", derive(Default))]
95177#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95178#[cfg_attr(feature = "derive_clone", derive(Clone))]
95179#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95180pub struct Status25Choice {
95181	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
95182	pub sts: Option<AccountManagementStatus1Code>,
95183	#[cfg_attr( feature = "derive_serde", serde(rename = "Rjctd", skip_serializing_if = "Option::is_none") )]
95184	pub rjctd: Option<Vec<RejectionReason31>>,
95185}
95186
95187impl Status25Choice {
95188	pub fn validate(&self) -> Result<(), ValidationError> {
95189		if let Some(ref val) = self.sts { val.validate()? }
95190		if let Some(ref vec) = self.rjctd { for item in vec { item.validate()? } }
95191		Ok(())
95192	}
95193}
95194
95195
95196// Status6Code ...
95197#[cfg_attr(feature = "derive_debug", derive(Debug))]
95198#[cfg_attr(feature = "derive_default", derive(Default))]
95199#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95200#[cfg_attr(feature = "derive_clone", derive(Clone))]
95201#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95202pub enum Status6Code {
95203	#[cfg_attr(feature = "derive_default", default)]
95204	#[cfg_attr( feature = "derive_serde", serde(rename = "REJT") )]
95205	CodeREJT,
95206	#[cfg_attr( feature = "derive_serde", serde(rename = "COMP") )]
95207	CodeCOMP,
95208	#[cfg_attr( feature = "derive_serde", serde(rename = "QUED") )]
95209	CodeQUED,
95210}
95211
95212impl Status6Code {
95213	pub fn validate(&self) -> Result<(), ValidationError> {
95214		Ok(())
95215	}
95216}
95217
95218
95219// StatusAdviceReport3 ...
95220#[cfg_attr(feature = "derive_debug", derive(Debug))]
95221#[cfg_attr(feature = "derive_default", derive(Default))]
95222#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95223#[cfg_attr(feature = "derive_clone", derive(Clone))]
95224#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95225pub struct StatusAdviceReport3 {
95226	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
95227	pub sts: ReportingMessageStatus1Code,
95228	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtnRule", skip_serializing_if = "Option::is_none") )]
95229	pub vldtn_rule: Option<Vec<GenericValidationRuleIdentification1>>,
95230	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgDt", skip_serializing_if = "Option::is_none") )]
95231	pub msg_dt: Option<String>,
95232	#[cfg_attr( feature = "derive_serde", serde(rename = "Sttstcs", skip_serializing_if = "Option::is_none") )]
95233	pub sttstcs: Option<OriginalReportStatistics3>,
95234}
95235
95236impl StatusAdviceReport3 {
95237	pub fn validate(&self) -> Result<(), ValidationError> {
95238		self.sts.validate()?;
95239		if let Some(ref vec) = self.vldtn_rule { for item in vec { item.validate()? } }
95240		if let Some(ref val) = self.sttstcs { val.validate()? }
95241		Ok(())
95242	}
95243}
95244
95245
95246// StatusDetail1 ...
95247#[cfg_attr(feature = "derive_debug", derive(Debug))]
95248#[cfg_attr(feature = "derive_default", derive(Default))]
95249#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95250#[cfg_attr(feature = "derive_clone", derive(Clone))]
95251#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95252pub struct StatusDetail1 {
95253	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
95254	pub ctry: Option<String>,
95255	#[cfg_attr( feature = "derive_serde", serde(rename = "CmptntAuthrty") )]
95256	pub cmptnt_authrty: SupervisingAuthorityIdentification1,
95257	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts", skip_serializing_if = "Option::is_none") )]
95258	pub sts: Option<String>,
95259	#[cfg_attr( feature = "derive_serde", serde(rename = "StsRsn") )]
95260	pub sts_rsn: String,
95261	#[cfg_attr( feature = "derive_serde", serde(rename = "ActvtyPrd", skip_serializing_if = "Option::is_none") )]
95262	pub actvty_prd: Option<Period4Choice>,
95263	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmnt", skip_serializing_if = "Option::is_none") )]
95264	pub cmnt: Option<String>,
95265}
95266
95267impl StatusDetail1 {
95268	pub fn validate(&self) -> Result<(), ValidationError> {
95269		if let Some(ref val) = self.ctry {
95270			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
95271			if !pattern.is_match(val) {
95272				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
95273			}
95274		}
95275		self.cmptnt_authrty.validate()?;
95276		if let Some(ref val) = self.sts {
95277			if val.chars().count() < 1 {
95278				return Err(ValidationError::new(1001, "sts is shorter than the minimum length of 1".to_string()));
95279			}
95280			if val.chars().count() > 10 {
95281				return Err(ValidationError::new(1002, "sts exceeds the maximum length of 10".to_string()));
95282			}
95283		}
95284		if self.sts_rsn.chars().count() < 1 {
95285			return Err(ValidationError::new(1001, "sts_rsn is shorter than the minimum length of 1".to_string()));
95286		}
95287		if self.sts_rsn.chars().count() > 10 {
95288			return Err(ValidationError::new(1002, "sts_rsn exceeds the maximum length of 10".to_string()));
95289		}
95290		if let Some(ref val) = self.actvty_prd { val.validate()? }
95291		if let Some(ref val) = self.cmnt {
95292			if val.chars().count() < 1 {
95293				return Err(ValidationError::new(1001, "cmnt is shorter than the minimum length of 1".to_string()));
95294			}
95295			if val.chars().count() > 20000 {
95296				return Err(ValidationError::new(1002, "cmnt exceeds the maximum length of 20000".to_string()));
95297			}
95298		}
95299		Ok(())
95300	}
95301}
95302
95303
95304// StatusReason6Choice ...
95305#[cfg_attr(feature = "derive_debug", derive(Debug))]
95306#[cfg_attr(feature = "derive_default", derive(Default))]
95307#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95308#[cfg_attr(feature = "derive_clone", derive(Clone))]
95309#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95310pub struct StatusReason6Choice {
95311	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
95312	pub cd: Option<String>,
95313	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
95314	pub prtry: Option<String>,
95315}
95316
95317impl StatusReason6Choice {
95318	pub fn validate(&self) -> Result<(), ValidationError> {
95319		if let Some(ref val) = self.cd {
95320			if val.chars().count() < 1 {
95321				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
95322			}
95323			if val.chars().count() > 4 {
95324				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
95325			}
95326		}
95327		if let Some(ref val) = self.prtry {
95328			if val.chars().count() < 1 {
95329				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
95330			}
95331			if val.chars().count() > 35 {
95332				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
95333			}
95334		}
95335		Ok(())
95336	}
95337}
95338
95339
95340// StatusReasonInformation10 ...
95341#[cfg_attr(feature = "derive_debug", derive(Debug))]
95342#[cfg_attr(feature = "derive_default", derive(Default))]
95343#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95344#[cfg_attr(feature = "derive_clone", derive(Clone))]
95345#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95346pub struct StatusReasonInformation10 {
95347	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
95348	pub rsn: StatusReason6Choice,
95349	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
95350	pub addtl_inf: Option<String>,
95351}
95352
95353impl StatusReasonInformation10 {
95354	pub fn validate(&self) -> Result<(), ValidationError> {
95355		self.rsn.validate()?;
95356		if let Some(ref val) = self.addtl_inf {
95357			if val.chars().count() < 1 {
95358				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
95359			}
95360			if val.chars().count() > 140 {
95361				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
95362			}
95363		}
95364		Ok(())
95365	}
95366}
95367
95368
95369// StatusReasonInformation12 ...
95370#[cfg_attr(feature = "derive_debug", derive(Debug))]
95371#[cfg_attr(feature = "derive_default", derive(Default))]
95372#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95373#[cfg_attr(feature = "derive_clone", derive(Clone))]
95374#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95375pub struct StatusReasonInformation12 {
95376	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
95377	pub orgtr: Option<PartyIdentification135>,
95378	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
95379	pub rsn: Option<StatusReason6Choice>,
95380	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
95381	pub addtl_inf: Option<Vec<String>>,
95382}
95383
95384impl StatusReasonInformation12 {
95385	pub fn validate(&self) -> Result<(), ValidationError> {
95386		if let Some(ref val) = self.orgtr { val.validate()? }
95387		if let Some(ref val) = self.rsn { val.validate()? }
95388		if let Some(ref vec) = self.addtl_inf {
95389			for item in vec {
95390				if item.chars().count() < 1 {
95391					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
95392				}
95393				if item.chars().count() > 105 {
95394					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
95395				}
95396			}
95397		}
95398		Ok(())
95399	}
95400}
95401
95402
95403// StatusReasonInformation14 ...
95404#[cfg_attr(feature = "derive_debug", derive(Debug))]
95405#[cfg_attr(feature = "derive_default", derive(Default))]
95406#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95407#[cfg_attr(feature = "derive_clone", derive(Clone))]
95408#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95409pub struct StatusReasonInformation14 {
95410	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
95411	pub orgtr: Option<PartyIdentification272>,
95412	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
95413	pub rsn: Option<StatusReason6Choice>,
95414	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
95415	pub addtl_inf: Option<Vec<String>>,
95416}
95417
95418impl StatusReasonInformation14 {
95419	pub fn validate(&self) -> Result<(), ValidationError> {
95420		if let Some(ref val) = self.orgtr { val.validate()? }
95421		if let Some(ref val) = self.rsn { val.validate()? }
95422		if let Some(ref vec) = self.addtl_inf {
95423			for item in vec {
95424				if item.chars().count() < 1 {
95425					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
95426				}
95427				if item.chars().count() > 105 {
95428					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
95429				}
95430			}
95431		}
95432		Ok(())
95433	}
95434}
95435
95436
95437// StatusReportRecord3 ...
95438#[cfg_attr(feature = "derive_debug", derive(Debug))]
95439#[cfg_attr(feature = "derive_default", derive(Default))]
95440#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95441#[cfg_attr(feature = "derive_clone", derive(Clone))]
95442#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95443pub struct StatusReportRecord3 {
95444	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlRcrdId") )]
95445	pub orgnl_rcrd_id: String,
95446	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
95447	pub sts: ReportingRecordStatus1Code,
95448	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtnRule", skip_serializing_if = "Option::is_none") )]
95449	pub vldtn_rule: Option<Vec<GenericValidationRuleIdentification1>>,
95450	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
95451	pub splmtry_data: Option<Vec<SupplementaryData1>>,
95452}
95453
95454impl StatusReportRecord3 {
95455	pub fn validate(&self) -> Result<(), ValidationError> {
95456		if self.orgnl_rcrd_id.chars().count() < 1 {
95457			return Err(ValidationError::new(1001, "orgnl_rcrd_id is shorter than the minimum length of 1".to_string()));
95458		}
95459		if self.orgnl_rcrd_id.chars().count() > 140 {
95460			return Err(ValidationError::new(1002, "orgnl_rcrd_id exceeds the maximum length of 140".to_string()));
95461		}
95462		self.sts.validate()?;
95463		if let Some(ref vec) = self.vldtn_rule { for item in vec { item.validate()? } }
95464		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
95465		Ok(())
95466	}
95467}
95468
95469
95470// StatusResponse1Code ...
95471#[cfg_attr(feature = "derive_debug", derive(Debug))]
95472#[cfg_attr(feature = "derive_default", derive(Default))]
95473#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95474#[cfg_attr(feature = "derive_clone", derive(Clone))]
95475#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95476pub enum StatusResponse1Code {
95477	#[cfg_attr(feature = "derive_default", default)]
95478	#[cfg_attr( feature = "derive_serde", serde(rename = "NRES") )]
95479	CodeNRES,
95480	#[cfg_attr( feature = "derive_serde", serde(rename = "PART") )]
95481	CodePART,
95482	#[cfg_attr( feature = "derive_serde", serde(rename = "COMP") )]
95483	CodeCOMP,
95484}
95485
95486impl StatusResponse1Code {
95487	pub fn validate(&self) -> Result<(), ValidationError> {
95488		Ok(())
95489	}
95490}
95491
95492
95493// Strategy1 ...
95494#[cfg_attr(feature = "derive_debug", derive(Debug))]
95495#[cfg_attr(feature = "derive_default", derive(Default))]
95496#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95497#[cfg_attr(feature = "derive_clone", derive(Clone))]
95498#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95499pub struct Strategy1 {
95500	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
95501	pub id: String,
95502	#[cfg_attr( feature = "derive_serde", serde(rename = "StrssSz") )]
95503	pub strss_sz: StressSize1Choice,
95504}
95505
95506impl Strategy1 {
95507	pub fn validate(&self) -> Result<(), ValidationError> {
95508		if self.id.chars().count() < 1 {
95509			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
95510		}
95511		if self.id.chars().count() > 35 {
95512			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
95513		}
95514		self.strss_sz.validate()?;
95515		Ok(())
95516	}
95517}
95518
95519
95520// StrategyStressType1Code ...
95521#[cfg_attr(feature = "derive_debug", derive(Debug))]
95522#[cfg_attr(feature = "derive_default", derive(Default))]
95523#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95524#[cfg_attr(feature = "derive_clone", derive(Clone))]
95525#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95526pub enum StrategyStressType1Code {
95527	#[cfg_attr(feature = "derive_default", default)]
95528	#[cfg_attr( feature = "derive_serde", serde(rename = "FLEX") )]
95529	CodeFLEX,
95530	#[cfg_attr( feature = "derive_serde", serde(rename = "PRLL") )]
95531	CodePRLL,
95532	#[cfg_attr( feature = "derive_serde", serde(rename = "SPRD") )]
95533	CodeSPRD,
95534}
95535
95536impl StrategyStressType1Code {
95537	pub fn validate(&self) -> Result<(), ValidationError> {
95538		Ok(())
95539	}
95540}
95541
95542
95543// StressItem1 ...
95544#[cfg_attr(feature = "derive_debug", derive(Debug))]
95545#[cfg_attr(feature = "derive_default", derive(Default))]
95546#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95547#[cfg_attr(feature = "derive_clone", derive(Clone))]
95548#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95549pub struct StressItem1 {
95550	#[cfg_attr( feature = "derive_serde", serde(rename = "StrssPdct") )]
95551	pub strss_pdct: StressItem1Choice,
95552}
95553
95554impl StressItem1 {
95555	pub fn validate(&self) -> Result<(), ValidationError> {
95556		self.strss_pdct.validate()?;
95557		Ok(())
95558	}
95559}
95560
95561
95562// StressItem1Choice ...
95563#[cfg_attr(feature = "derive_debug", derive(Debug))]
95564#[cfg_attr(feature = "derive_default", derive(Default))]
95565#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95566#[cfg_attr(feature = "derive_clone", derive(Clone))]
95567#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95568pub struct StressItem1Choice {
95569	#[cfg_attr( feature = "derive_serde", serde(rename = "Pdct", skip_serializing_if = "Option::is_none") )]
95570	pub pdct: Option<StressedProduct1>,
95571	#[cfg_attr( feature = "derive_serde", serde(rename = "Strtgy", skip_serializing_if = "Option::is_none") )]
95572	pub strtgy: Option<Strategy1>,
95573	#[cfg_attr( feature = "derive_serde", serde(rename = "RskFctr", skip_serializing_if = "Option::is_none") )]
95574	pub rsk_fctr: Option<RiskFactor1>,
95575}
95576
95577impl StressItem1Choice {
95578	pub fn validate(&self) -> Result<(), ValidationError> {
95579		if let Some(ref val) = self.pdct { val.validate()? }
95580		if let Some(ref val) = self.strtgy { val.validate()? }
95581		if let Some(ref val) = self.rsk_fctr { val.validate()? }
95582		Ok(())
95583	}
95584}
95585
95586
95587// StressLiquidResourceRequirement1 ...
95588#[cfg_attr(feature = "derive_debug", derive(Debug))]
95589#[cfg_attr(feature = "derive_default", derive(Default))]
95590#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95591#[cfg_attr(feature = "derive_clone", derive(Clone))]
95592#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95593pub struct StressLiquidResourceRequirement1 {
95594	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlOutflw") )]
95595	pub oprl_outflw: AmountAndDirection102,
95596	#[cfg_attr( feature = "derive_serde", serde(rename = "VartnMrgnPmtOblgtn") )]
95597	pub vartn_mrgn_pmt_oblgtn: AmountAndDirection102,
95598	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmOrDlvry") )]
95599	pub sttlm_or_dlvry: AmountAndDirection102,
95600	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr") )]
95601	pub othr: AmountAndDirection102,
95602}
95603
95604impl StressLiquidResourceRequirement1 {
95605	pub fn validate(&self) -> Result<(), ValidationError> {
95606		self.oprl_outflw.validate()?;
95607		self.vartn_mrgn_pmt_oblgtn.validate()?;
95608		self.sttlm_or_dlvry.validate()?;
95609		self.othr.validate()?;
95610		Ok(())
95611	}
95612}
95613
95614
95615// StressSize1Choice ...
95616#[cfg_attr(feature = "derive_debug", derive(Debug))]
95617#[cfg_attr(feature = "derive_default", derive(Default))]
95618#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95619#[cfg_attr(feature = "derive_clone", derive(Clone))]
95620#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95621pub struct StressSize1Choice {
95622	#[cfg_attr( feature = "derive_serde", serde(rename = "Rltv", skip_serializing_if = "Option::is_none") )]
95623	pub rltv: Option<f64>,
95624	#[cfg_attr( feature = "derive_serde", serde(rename = "Abs", skip_serializing_if = "Option::is_none") )]
95625	pub abs: Option<Absolute1>,
95626}
95627
95628impl StressSize1Choice {
95629	pub fn validate(&self) -> Result<(), ValidationError> {
95630		if let Some(ref val) = self.abs { val.validate()? }
95631		Ok(())
95632	}
95633}
95634
95635
95636// StressedProduct1 ...
95637#[cfg_attr(feature = "derive_debug", derive(Debug))]
95638#[cfg_attr(feature = "derive_default", derive(Default))]
95639#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95640#[cfg_attr(feature = "derive_clone", derive(Clone))]
95641#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95642pub struct StressedProduct1 {
95643	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
95644	pub id: GenericIdentification168,
95645	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxStrssSz") )]
95646	pub max_strss_sz: StressSize1Choice,
95647	#[cfg_attr( feature = "derive_serde", serde(rename = "MinStrssSz") )]
95648	pub min_strss_sz: StressSize1Choice,
95649}
95650
95651impl StressedProduct1 {
95652	pub fn validate(&self) -> Result<(), ValidationError> {
95653		self.id.validate()?;
95654		self.max_strss_sz.validate()?;
95655		self.min_strss_sz.validate()?;
95656		Ok(())
95657	}
95658}
95659
95660
95661// StructuredLongPostalAddress1 ...
95662#[cfg_attr(feature = "derive_debug", derive(Debug))]
95663#[cfg_attr(feature = "derive_default", derive(Default))]
95664#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95665#[cfg_attr(feature = "derive_clone", derive(Clone))]
95666#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95667pub struct StructuredLongPostalAddress1 {
95668	#[cfg_attr( feature = "derive_serde", serde(rename = "BldgNm", skip_serializing_if = "Option::is_none") )]
95669	pub bldg_nm: Option<String>,
95670	#[cfg_attr( feature = "derive_serde", serde(rename = "StrtNm", skip_serializing_if = "Option::is_none") )]
95671	pub strt_nm: Option<String>,
95672	#[cfg_attr( feature = "derive_serde", serde(rename = "StrtBldgId", skip_serializing_if = "Option::is_none") )]
95673	pub strt_bldg_id: Option<String>,
95674	#[cfg_attr( feature = "derive_serde", serde(rename = "Flr", skip_serializing_if = "Option::is_none") )]
95675	pub flr: Option<String>,
95676	#[cfg_attr( feature = "derive_serde", serde(rename = "TwnNm") )]
95677	pub twn_nm: String,
95678	#[cfg_attr( feature = "derive_serde", serde(rename = "DstrctNm", skip_serializing_if = "Option::is_none") )]
95679	pub dstrct_nm: Option<String>,
95680	#[cfg_attr( feature = "derive_serde", serde(rename = "RgnId", skip_serializing_if = "Option::is_none") )]
95681	pub rgn_id: Option<String>,
95682	#[cfg_attr( feature = "derive_serde", serde(rename = "Stat", skip_serializing_if = "Option::is_none") )]
95683	pub stat: Option<String>,
95684	#[cfg_attr( feature = "derive_serde", serde(rename = "CtyId", skip_serializing_if = "Option::is_none") )]
95685	pub cty_id: Option<String>,
95686	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry") )]
95687	pub ctry: String,
95688	#[cfg_attr( feature = "derive_serde", serde(rename = "PstCdId") )]
95689	pub pst_cd_id: String,
95690	#[cfg_attr( feature = "derive_serde", serde(rename = "POB", skip_serializing_if = "Option::is_none") )]
95691	pub pob: Option<String>,
95692}
95693
95694impl StructuredLongPostalAddress1 {
95695	pub fn validate(&self) -> Result<(), ValidationError> {
95696		if let Some(ref val) = self.bldg_nm {
95697			if val.chars().count() < 1 {
95698				return Err(ValidationError::new(1001, "bldg_nm is shorter than the minimum length of 1".to_string()));
95699			}
95700			if val.chars().count() > 35 {
95701				return Err(ValidationError::new(1002, "bldg_nm exceeds the maximum length of 35".to_string()));
95702			}
95703		}
95704		if let Some(ref val) = self.strt_nm {
95705			if val.chars().count() < 1 {
95706				return Err(ValidationError::new(1001, "strt_nm is shorter than the minimum length of 1".to_string()));
95707			}
95708			if val.chars().count() > 35 {
95709				return Err(ValidationError::new(1002, "strt_nm exceeds the maximum length of 35".to_string()));
95710			}
95711		}
95712		if let Some(ref val) = self.strt_bldg_id {
95713			if val.chars().count() < 1 {
95714				return Err(ValidationError::new(1001, "strt_bldg_id is shorter than the minimum length of 1".to_string()));
95715			}
95716			if val.chars().count() > 35 {
95717				return Err(ValidationError::new(1002, "strt_bldg_id exceeds the maximum length of 35".to_string()));
95718			}
95719		}
95720		if let Some(ref val) = self.flr {
95721			if val.chars().count() < 1 {
95722				return Err(ValidationError::new(1001, "flr is shorter than the minimum length of 1".to_string()));
95723			}
95724			if val.chars().count() > 16 {
95725				return Err(ValidationError::new(1002, "flr exceeds the maximum length of 16".to_string()));
95726			}
95727		}
95728		if self.twn_nm.chars().count() < 1 {
95729			return Err(ValidationError::new(1001, "twn_nm is shorter than the minimum length of 1".to_string()));
95730		}
95731		if self.twn_nm.chars().count() > 35 {
95732			return Err(ValidationError::new(1002, "twn_nm exceeds the maximum length of 35".to_string()));
95733		}
95734		if let Some(ref val) = self.dstrct_nm {
95735			if val.chars().count() < 1 {
95736				return Err(ValidationError::new(1001, "dstrct_nm is shorter than the minimum length of 1".to_string()));
95737			}
95738			if val.chars().count() > 35 {
95739				return Err(ValidationError::new(1002, "dstrct_nm exceeds the maximum length of 35".to_string()));
95740			}
95741		}
95742		if let Some(ref val) = self.rgn_id {
95743			if val.chars().count() < 1 {
95744				return Err(ValidationError::new(1001, "rgn_id is shorter than the minimum length of 1".to_string()));
95745			}
95746			if val.chars().count() > 35 {
95747				return Err(ValidationError::new(1002, "rgn_id exceeds the maximum length of 35".to_string()));
95748			}
95749		}
95750		if let Some(ref val) = self.stat {
95751			if val.chars().count() < 1 {
95752				return Err(ValidationError::new(1001, "stat is shorter than the minimum length of 1".to_string()));
95753			}
95754			if val.chars().count() > 35 {
95755				return Err(ValidationError::new(1002, "stat exceeds the maximum length of 35".to_string()));
95756			}
95757		}
95758		if let Some(ref val) = self.cty_id {
95759			if val.chars().count() < 1 {
95760				return Err(ValidationError::new(1001, "cty_id is shorter than the minimum length of 1".to_string()));
95761			}
95762			if val.chars().count() > 35 {
95763				return Err(ValidationError::new(1002, "cty_id exceeds the maximum length of 35".to_string()));
95764			}
95765		}
95766		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
95767		if !pattern.is_match(&self.ctry) {
95768			return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
95769		}
95770		if self.pst_cd_id.chars().count() < 1 {
95771			return Err(ValidationError::new(1001, "pst_cd_id is shorter than the minimum length of 1".to_string()));
95772		}
95773		if self.pst_cd_id.chars().count() > 16 {
95774			return Err(ValidationError::new(1002, "pst_cd_id exceeds the maximum length of 16".to_string()));
95775		}
95776		if let Some(ref val) = self.pob {
95777			if val.chars().count() < 1 {
95778				return Err(ValidationError::new(1001, "pob is shorter than the minimum length of 1".to_string()));
95779			}
95780			if val.chars().count() > 16 {
95781				return Err(ValidationError::new(1002, "pob exceeds the maximum length of 16".to_string()));
95782			}
95783		}
95784		Ok(())
95785	}
95786}
95787
95788
95789// StructuredRegulatoryReporting3 ...
95790#[cfg_attr(feature = "derive_debug", derive(Debug))]
95791#[cfg_attr(feature = "derive_default", derive(Default))]
95792#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95793#[cfg_attr(feature = "derive_clone", derive(Clone))]
95794#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95795pub struct StructuredRegulatoryReporting3 {
95796	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
95797	pub tp: Option<String>,
95798	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
95799	pub dt: Option<String>,
95800	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
95801	pub ctry: Option<String>,
95802	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
95803	pub cd: Option<String>,
95804	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
95805	pub amt: Option<ActiveOrHistoricCurrencyAndAmount>,
95806	#[cfg_attr( feature = "derive_serde", serde(rename = "Inf", skip_serializing_if = "Option::is_none") )]
95807	pub inf: Option<Vec<String>>,
95808}
95809
95810impl StructuredRegulatoryReporting3 {
95811	pub fn validate(&self) -> Result<(), ValidationError> {
95812		if let Some(ref val) = self.tp {
95813			if val.chars().count() < 1 {
95814				return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
95815			}
95816			if val.chars().count() > 35 {
95817				return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
95818			}
95819		}
95820		if let Some(ref val) = self.ctry {
95821			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
95822			if !pattern.is_match(val) {
95823				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
95824			}
95825		}
95826		if let Some(ref val) = self.cd {
95827			if val.chars().count() < 1 {
95828				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
95829			}
95830			if val.chars().count() > 10 {
95831				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 10".to_string()));
95832			}
95833		}
95834		if let Some(ref val) = self.amt { val.validate()? }
95835		if let Some(ref vec) = self.inf {
95836			for item in vec {
95837				if item.chars().count() < 1 {
95838					return Err(ValidationError::new(1001, "inf is shorter than the minimum length of 1".to_string()));
95839				}
95840				if item.chars().count() > 35 {
95841					return Err(ValidationError::new(1002, "inf exceeds the maximum length of 35".to_string()));
95842				}
95843			}
95844		}
95845		Ok(())
95846	}
95847}
95848
95849
95850// StructuredRemittanceInformation16 ...
95851#[cfg_attr(feature = "derive_debug", derive(Debug))]
95852#[cfg_attr(feature = "derive_default", derive(Default))]
95853#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95854#[cfg_attr(feature = "derive_clone", derive(Clone))]
95855#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95856pub struct StructuredRemittanceInformation16 {
95857	#[cfg_attr( feature = "derive_serde", serde(rename = "RfrdDocInf", skip_serializing_if = "Option::is_none") )]
95858	pub rfrd_doc_inf: Option<Vec<ReferredDocumentInformation7>>,
95859	#[cfg_attr( feature = "derive_serde", serde(rename = "RfrdDocAmt", skip_serializing_if = "Option::is_none") )]
95860	pub rfrd_doc_amt: Option<RemittanceAmount2>,
95861	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrRefInf", skip_serializing_if = "Option::is_none") )]
95862	pub cdtr_ref_inf: Option<CreditorReferenceInformation2>,
95863	#[cfg_attr( feature = "derive_serde", serde(rename = "Invcr", skip_serializing_if = "Option::is_none") )]
95864	pub invcr: Option<PartyIdentification135>,
95865	#[cfg_attr( feature = "derive_serde", serde(rename = "Invcee", skip_serializing_if = "Option::is_none") )]
95866	pub invcee: Option<PartyIdentification135>,
95867	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRmt", skip_serializing_if = "Option::is_none") )]
95868	pub tax_rmt: Option<TaxInformation7>,
95869	#[cfg_attr( feature = "derive_serde", serde(rename = "GrnshmtRmt", skip_serializing_if = "Option::is_none") )]
95870	pub grnshmt_rmt: Option<Garnishment3>,
95871	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRmtInf", skip_serializing_if = "Option::is_none") )]
95872	pub addtl_rmt_inf: Option<Vec<String>>,
95873}
95874
95875impl StructuredRemittanceInformation16 {
95876	pub fn validate(&self) -> Result<(), ValidationError> {
95877		if let Some(ref vec) = self.rfrd_doc_inf { for item in vec { item.validate()? } }
95878		if let Some(ref val) = self.rfrd_doc_amt { val.validate()? }
95879		if let Some(ref val) = self.cdtr_ref_inf { val.validate()? }
95880		if let Some(ref val) = self.invcr { val.validate()? }
95881		if let Some(ref val) = self.invcee { val.validate()? }
95882		if let Some(ref val) = self.tax_rmt { val.validate()? }
95883		if let Some(ref val) = self.grnshmt_rmt { val.validate()? }
95884		if let Some(ref vec) = self.addtl_rmt_inf {
95885			for item in vec {
95886				if item.chars().count() < 1 {
95887					return Err(ValidationError::new(1001, "addtl_rmt_inf is shorter than the minimum length of 1".to_string()));
95888				}
95889				if item.chars().count() > 140 {
95890					return Err(ValidationError::new(1002, "addtl_rmt_inf exceeds the maximum length of 140".to_string()));
95891				}
95892			}
95893		}
95894		Ok(())
95895	}
95896}
95897
95898
95899// StructuredRemittanceInformation17 ...
95900#[cfg_attr(feature = "derive_debug", derive(Debug))]
95901#[cfg_attr(feature = "derive_default", derive(Default))]
95902#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95903#[cfg_attr(feature = "derive_clone", derive(Clone))]
95904#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95905pub struct StructuredRemittanceInformation17 {
95906	#[cfg_attr( feature = "derive_serde", serde(rename = "RfrdDocInf", skip_serializing_if = "Option::is_none") )]
95907	pub rfrd_doc_inf: Option<Vec<ReferredDocumentInformation7>>,
95908	#[cfg_attr( feature = "derive_serde", serde(rename = "RfrdDocAmt", skip_serializing_if = "Option::is_none") )]
95909	pub rfrd_doc_amt: Option<RemittanceAmount2>,
95910	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrRefInf", skip_serializing_if = "Option::is_none") )]
95911	pub cdtr_ref_inf: Option<CreditorReferenceInformation2>,
95912	#[cfg_attr( feature = "derive_serde", serde(rename = "Invcr", skip_serializing_if = "Option::is_none") )]
95913	pub invcr: Option<PartyIdentification135>,
95914	#[cfg_attr( feature = "derive_serde", serde(rename = "Invcee", skip_serializing_if = "Option::is_none") )]
95915	pub invcee: Option<PartyIdentification135>,
95916	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRmt", skip_serializing_if = "Option::is_none") )]
95917	pub tax_rmt: Option<TaxData1>,
95918	#[cfg_attr( feature = "derive_serde", serde(rename = "GrnshmtRmt", skip_serializing_if = "Option::is_none") )]
95919	pub grnshmt_rmt: Option<Garnishment3>,
95920	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRmtInf", skip_serializing_if = "Option::is_none") )]
95921	pub addtl_rmt_inf: Option<Vec<String>>,
95922}
95923
95924impl StructuredRemittanceInformation17 {
95925	pub fn validate(&self) -> Result<(), ValidationError> {
95926		if let Some(ref vec) = self.rfrd_doc_inf { for item in vec { item.validate()? } }
95927		if let Some(ref val) = self.rfrd_doc_amt { val.validate()? }
95928		if let Some(ref val) = self.cdtr_ref_inf { val.validate()? }
95929		if let Some(ref val) = self.invcr { val.validate()? }
95930		if let Some(ref val) = self.invcee { val.validate()? }
95931		if let Some(ref val) = self.tax_rmt { val.validate()? }
95932		if let Some(ref val) = self.grnshmt_rmt { val.validate()? }
95933		if let Some(ref vec) = self.addtl_rmt_inf {
95934			for item in vec {
95935				if item.chars().count() < 1 {
95936					return Err(ValidationError::new(1001, "addtl_rmt_inf is shorter than the minimum length of 1".to_string()));
95937				}
95938				if item.chars().count() > 140 {
95939					return Err(ValidationError::new(1002, "addtl_rmt_inf exceeds the maximum length of 140".to_string()));
95940				}
95941			}
95942		}
95943		Ok(())
95944	}
95945}
95946
95947
95948// StructuredRemittanceInformation18 ...
95949#[cfg_attr(feature = "derive_debug", derive(Debug))]
95950#[cfg_attr(feature = "derive_default", derive(Default))]
95951#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
95952#[cfg_attr(feature = "derive_clone", derive(Clone))]
95953#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
95954pub struct StructuredRemittanceInformation18 {
95955	#[cfg_attr( feature = "derive_serde", serde(rename = "RfrdDocInf", skip_serializing_if = "Option::is_none") )]
95956	pub rfrd_doc_inf: Option<Vec<ReferredDocumentInformation8>>,
95957	#[cfg_attr( feature = "derive_serde", serde(rename = "RfrdDocAmt", skip_serializing_if = "Option::is_none") )]
95958	pub rfrd_doc_amt: Option<RemittanceAmount4>,
95959	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrRefInf", skip_serializing_if = "Option::is_none") )]
95960	pub cdtr_ref_inf: Option<CreditorReferenceInformation3>,
95961	#[cfg_attr( feature = "derive_serde", serde(rename = "Invcr", skip_serializing_if = "Option::is_none") )]
95962	pub invcr: Option<PartyIdentification272>,
95963	#[cfg_attr( feature = "derive_serde", serde(rename = "Invcee", skip_serializing_if = "Option::is_none") )]
95964	pub invcee: Option<PartyIdentification272>,
95965	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRmt", skip_serializing_if = "Option::is_none") )]
95966	pub tax_rmt: Option<TaxData1>,
95967	#[cfg_attr( feature = "derive_serde", serde(rename = "GrnshmtRmt", skip_serializing_if = "Option::is_none") )]
95968	pub grnshmt_rmt: Option<Garnishment4>,
95969	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRmtInf", skip_serializing_if = "Option::is_none") )]
95970	pub addtl_rmt_inf: Option<Vec<String>>,
95971}
95972
95973impl StructuredRemittanceInformation18 {
95974	pub fn validate(&self) -> Result<(), ValidationError> {
95975		if let Some(ref vec) = self.rfrd_doc_inf { for item in vec { item.validate()? } }
95976		if let Some(ref val) = self.rfrd_doc_amt { val.validate()? }
95977		if let Some(ref val) = self.cdtr_ref_inf { val.validate()? }
95978		if let Some(ref val) = self.invcr { val.validate()? }
95979		if let Some(ref val) = self.invcee { val.validate()? }
95980		if let Some(ref val) = self.tax_rmt { val.validate()? }
95981		if let Some(ref val) = self.grnshmt_rmt { val.validate()? }
95982		if let Some(ref vec) = self.addtl_rmt_inf {
95983			for item in vec {
95984				if item.chars().count() < 1 {
95985					return Err(ValidationError::new(1001, "addtl_rmt_inf is shorter than the minimum length of 1".to_string()));
95986				}
95987				if item.chars().count() > 140 {
95988					return Err(ValidationError::new(1002, "addtl_rmt_inf exceeds the maximum length of 140".to_string()));
95989				}
95990			}
95991		}
95992		Ok(())
95993	}
95994}
95995
95996
95997// SupervisingAuthorityIdentification1 ...
95998#[cfg_attr(feature = "derive_debug", derive(Debug))]
95999#[cfg_attr(feature = "derive_default", derive(Default))]
96000#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96001#[cfg_attr(feature = "derive_clone", derive(Clone))]
96002#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96003pub struct SupervisingAuthorityIdentification1 {
96004	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
96005	pub id: Option<SupervisingAuthorityIdentification1Choice>,
96006	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
96007	pub lei: Option<String>,
96008}
96009
96010impl SupervisingAuthorityIdentification1 {
96011	pub fn validate(&self) -> Result<(), ValidationError> {
96012		if let Some(ref val) = self.id { val.validate()? }
96013		if let Some(ref val) = self.lei {
96014			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
96015			if !pattern.is_match(val) {
96016				return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
96017			}
96018		}
96019		Ok(())
96020	}
96021}
96022
96023
96024// SupervisingAuthorityIdentification1Choice ...
96025#[cfg_attr(feature = "derive_debug", derive(Debug))]
96026#[cfg_attr(feature = "derive_default", derive(Default))]
96027#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96028#[cfg_attr(feature = "derive_clone", derive(Clone))]
96029#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96030pub struct SupervisingAuthorityIdentification1Choice {
96031	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryId", skip_serializing_if = "Option::is_none") )]
96032	pub prtry_id: Option<String>,
96033	#[cfg_attr( feature = "derive_serde", serde(rename = "FullNm", skip_serializing_if = "Option::is_none") )]
96034	pub full_nm: Option<String>,
96035}
96036
96037impl SupervisingAuthorityIdentification1Choice {
96038	pub fn validate(&self) -> Result<(), ValidationError> {
96039		if let Some(ref val) = self.prtry_id {
96040			if val.chars().count() < 1 {
96041				return Err(ValidationError::new(1001, "prtry_id is shorter than the minimum length of 1".to_string()));
96042			}
96043			if val.chars().count() > 4 {
96044				return Err(ValidationError::new(1002, "prtry_id exceeds the maximum length of 4".to_string()));
96045			}
96046		}
96047		if let Some(ref val) = self.full_nm {
96048			if val.chars().count() < 1 {
96049				return Err(ValidationError::new(1001, "full_nm is shorter than the minimum length of 1".to_string()));
96050			}
96051			if val.chars().count() > 350 {
96052				return Err(ValidationError::new(1002, "full_nm exceeds the maximum length of 350".to_string()));
96053			}
96054		}
96055		Ok(())
96056	}
96057}
96058
96059
96060// SupplementaryData1 ...
96061#[cfg_attr(feature = "derive_debug", derive(Debug))]
96062#[cfg_attr(feature = "derive_default", derive(Default))]
96063#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96064#[cfg_attr(feature = "derive_clone", derive(Clone))]
96065#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96066pub struct SupplementaryData1 {
96067	#[cfg_attr( feature = "derive_serde", serde(rename = "PlcAndNm", skip_serializing_if = "Option::is_none") )]
96068	pub plc_and_nm: Option<String>,
96069	#[cfg_attr( feature = "derive_serde", serde(rename = "Envlp") )]
96070	pub envlp: SupplementaryDataEnvelope1,
96071}
96072
96073impl SupplementaryData1 {
96074	pub fn validate(&self) -> Result<(), ValidationError> {
96075		if let Some(ref val) = self.plc_and_nm {
96076			if val.chars().count() < 1 {
96077				return Err(ValidationError::new(1001, "plc_and_nm is shorter than the minimum length of 1".to_string()));
96078			}
96079			if val.chars().count() > 350 {
96080				return Err(ValidationError::new(1002, "plc_and_nm exceeds the maximum length of 350".to_string()));
96081			}
96082		}
96083		self.envlp.validate()?;
96084		Ok(())
96085	}
96086}
96087
96088
96089// SupplementaryDataEnvelope1 ...
96090#[cfg_attr(feature = "derive_debug", derive(Debug))]
96091#[cfg_attr(feature = "derive_default", derive(Default))]
96092#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96093#[cfg_attr(feature = "derive_clone", derive(Clone))]
96094#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96095pub struct SupplementaryDataEnvelope1 {
96096}
96097
96098impl SupplementaryDataEnvelope1 {
96099	pub fn validate(&self) -> Result<(), ValidationError> {
96100		Ok(())
96101	}
96102}
96103
96104
96105// SupportLetterType1Choice ...
96106#[cfg_attr(feature = "derive_debug", derive(Debug))]
96107#[cfg_attr(feature = "derive_default", derive(Default))]
96108#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96109#[cfg_attr(feature = "derive_clone", derive(Clone))]
96110#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96111pub struct SupportLetterType1Choice {
96112	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
96113	pub cd: Option<String>,
96114	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
96115	pub prtry: Option<String>,
96116}
96117
96118impl SupportLetterType1Choice {
96119	pub fn validate(&self) -> Result<(), ValidationError> {
96120		if let Some(ref val) = self.cd {
96121			if val.chars().count() < 1 {
96122				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
96123			}
96124			if val.chars().count() > 4 {
96125				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
96126			}
96127		}
96128		if let Some(ref val) = self.prtry {
96129			if val.chars().count() < 1 {
96130				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
96131			}
96132			if val.chars().count() > 35 {
96133				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
96134			}
96135		}
96136		Ok(())
96137	}
96138}
96139
96140
96141// SupportingDocument4 ...
96142#[cfg_attr(feature = "derive_debug", derive(Debug))]
96143#[cfg_attr(feature = "derive_default", derive(Default))]
96144#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96145#[cfg_attr(feature = "derive_clone", derive(Clone))]
96146#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96147pub struct SupportingDocument4 {
96148	#[cfg_attr( feature = "derive_serde", serde(rename = "SpprtgDocId") )]
96149	pub spprtg_doc_id: String,
96150	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlReqId", skip_serializing_if = "Option::is_none") )]
96151	pub orgnl_req_id: Option<String>,
96152	#[cfg_attr( feature = "derive_serde", serde(rename = "Cert") )]
96153	pub cert: DocumentIdentification28,
96154	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr") )]
96155	pub acct_ownr: PartyIdentification272,
96156	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcr") )]
96157	pub acct_svcr: BranchAndFinancialInstitutionIdentification8,
96158	#[cfg_attr( feature = "derive_serde", serde(rename = "Amdmnt", skip_serializing_if = "Option::is_none") )]
96159	pub amdmnt: Option<DocumentAmendment1>,
96160	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctRef") )]
96161	pub ctrct_ref: ContractRegistrationReference2Choice,
96162	#[cfg_attr( feature = "derive_serde", serde(rename = "Ntry") )]
96163	pub ntry: Vec<SupportingDocumentEntry2>,
96164	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
96165	pub splmtry_data: Option<Vec<SupplementaryData1>>,
96166}
96167
96168impl SupportingDocument4 {
96169	pub fn validate(&self) -> Result<(), ValidationError> {
96170		if self.spprtg_doc_id.chars().count() < 1 {
96171			return Err(ValidationError::new(1001, "spprtg_doc_id is shorter than the minimum length of 1".to_string()));
96172		}
96173		if self.spprtg_doc_id.chars().count() > 35 {
96174			return Err(ValidationError::new(1002, "spprtg_doc_id exceeds the maximum length of 35".to_string()));
96175		}
96176		if let Some(ref val) = self.orgnl_req_id {
96177			if val.chars().count() < 1 {
96178				return Err(ValidationError::new(1001, "orgnl_req_id is shorter than the minimum length of 1".to_string()));
96179			}
96180			if val.chars().count() > 35 {
96181				return Err(ValidationError::new(1002, "orgnl_req_id exceeds the maximum length of 35".to_string()));
96182			}
96183		}
96184		self.cert.validate()?;
96185		self.acct_ownr.validate()?;
96186		self.acct_svcr.validate()?;
96187		if let Some(ref val) = self.amdmnt { val.validate()? }
96188		self.ctrct_ref.validate()?;
96189		for item in &self.ntry { item.validate()? }
96190		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
96191		Ok(())
96192	}
96193}
96194
96195
96196// SupportingDocumentEntry2 ...
96197#[cfg_attr(feature = "derive_debug", derive(Debug))]
96198#[cfg_attr(feature = "derive_default", derive(Default))]
96199#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96200#[cfg_attr(feature = "derive_clone", derive(Clone))]
96201#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96202pub struct SupportingDocumentEntry2 {
96203	#[cfg_attr( feature = "derive_serde", serde(rename = "NtryId") )]
96204	pub ntry_id: String,
96205	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlDoc") )]
96206	pub orgnl_doc: DocumentIdentification22,
96207	#[cfg_attr( feature = "derive_serde", serde(rename = "DocTp") )]
96208	pub doc_tp: String,
96209	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlAmt", skip_serializing_if = "Option::is_none") )]
96210	pub ttl_amt: Option<ActiveCurrencyAndAmount>,
96211	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlAmtAftrShipmnt", skip_serializing_if = "Option::is_none") )]
96212	pub ttl_amt_aftr_shipmnt: Option<ActiveCurrencyAndAmount>,
96213	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlAmtInCtrctCcy", skip_serializing_if = "Option::is_none") )]
96214	pub ttl_amt_in_ctrct_ccy: Option<ActiveCurrencyAndAmount>,
96215	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlAmtAftrShipmntInCtrctCcy", skip_serializing_if = "Option::is_none") )]
96216	pub ttl_amt_aftr_shipmnt_in_ctrct_ccy: Option<ActiveCurrencyAndAmount>,
96217	#[cfg_attr( feature = "derive_serde", serde(rename = "ShipmntAttrbts") )]
96218	pub shipmnt_attrbts: ShipmentAttribute2,
96219	#[cfg_attr( feature = "derive_serde", serde(rename = "NtryAmdmntId", skip_serializing_if = "Option::is_none") )]
96220	pub ntry_amdmnt_id: Option<DocumentEntryAmendment1>,
96221	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyData", skip_serializing_if = "Option::is_none") )]
96222	pub mtrty_data: Option<String>,
96223	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
96224	pub addtl_inf: Option<String>,
96225	#[cfg_attr( feature = "derive_serde", serde(rename = "Attchmnt", skip_serializing_if = "Option::is_none") )]
96226	pub attchmnt: Option<Vec<DocumentGeneralInformation5>>,
96227}
96228
96229impl SupportingDocumentEntry2 {
96230	pub fn validate(&self) -> Result<(), ValidationError> {
96231		if self.ntry_id.chars().count() < 1 {
96232			return Err(ValidationError::new(1001, "ntry_id is shorter than the minimum length of 1".to_string()));
96233		}
96234		if self.ntry_id.chars().count() > 35 {
96235			return Err(ValidationError::new(1002, "ntry_id exceeds the maximum length of 35".to_string()));
96236		}
96237		self.orgnl_doc.validate()?;
96238		let pattern = Regex::new("[a-zA-Z0-9]{1}[a-zA-Z0-9_]{3}").unwrap();
96239		if !pattern.is_match(&self.doc_tp) {
96240			return Err(ValidationError::new(1005, "doc_tp does not match the required pattern".to_string()));
96241		}
96242		if let Some(ref val) = self.ttl_amt { val.validate()? }
96243		if let Some(ref val) = self.ttl_amt_aftr_shipmnt { val.validate()? }
96244		if let Some(ref val) = self.ttl_amt_in_ctrct_ccy { val.validate()? }
96245		if let Some(ref val) = self.ttl_amt_aftr_shipmnt_in_ctrct_ccy { val.validate()? }
96246		self.shipmnt_attrbts.validate()?;
96247		if let Some(ref val) = self.ntry_amdmnt_id { val.validate()? }
96248		if let Some(ref val) = self.mtrty_data {
96249			if val.chars().count() < 1 {
96250				return Err(ValidationError::new(1001, "mtrty_data is shorter than the minimum length of 1".to_string()));
96251			}
96252			if val.chars().count() > 35 {
96253				return Err(ValidationError::new(1002, "mtrty_data exceeds the maximum length of 35".to_string()));
96254			}
96255		}
96256		if let Some(ref val) = self.addtl_inf {
96257			if val.chars().count() < 1 {
96258				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
96259			}
96260			if val.chars().count() > 500 {
96261				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 500".to_string()));
96262			}
96263		}
96264		if let Some(ref vec) = self.attchmnt { for item in vec { item.validate()? } }
96265		Ok(())
96266	}
96267}
96268
96269
96270// SupportingDocumentRequestOrLetter4 ...
96271#[cfg_attr(feature = "derive_debug", derive(Debug))]
96272#[cfg_attr(feature = "derive_default", derive(Default))]
96273#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96274#[cfg_attr(feature = "derive_clone", derive(Clone))]
96275#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96276pub struct SupportingDocumentRequestOrLetter4 {
96277	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqOrLttrId") )]
96278	pub req_or_lttr_id: String,
96279	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
96280	pub dt: Option<String>,
96281	#[cfg_attr( feature = "derive_serde", serde(rename = "Sndr", skip_serializing_if = "Option::is_none") )]
96282	pub sndr: Option<Party50Choice>,
96283	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcvr", skip_serializing_if = "Option::is_none") )]
96284	pub rcvr: Option<Party50Choice>,
96285	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlRefs", skip_serializing_if = "Option::is_none") )]
96286	pub orgnl_refs: Option<Vec<OriginalMessage6>>,
96287	#[cfg_attr( feature = "derive_serde", serde(rename = "Sbjt") )]
96288	pub sbjt: String,
96289	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
96290	pub tp: SupportLetterType1Choice,
96291	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
96292	pub desc: Option<String>,
96293	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnReqrd") )]
96294	pub rspn_reqrd: bool,
96295	#[cfg_attr( feature = "derive_serde", serde(rename = "DueDt", skip_serializing_if = "Option::is_none") )]
96296	pub due_dt: Option<String>,
96297	#[cfg_attr( feature = "derive_serde", serde(rename = "Attchmnt", skip_serializing_if = "Option::is_none") )]
96298	pub attchmnt: Option<Vec<DocumentGeneralInformation5>>,
96299	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
96300	pub splmtry_data: Option<Vec<SupplementaryData1>>,
96301}
96302
96303impl SupportingDocumentRequestOrLetter4 {
96304	pub fn validate(&self) -> Result<(), ValidationError> {
96305		if self.req_or_lttr_id.chars().count() < 1 {
96306			return Err(ValidationError::new(1001, "req_or_lttr_id is shorter than the minimum length of 1".to_string()));
96307		}
96308		if self.req_or_lttr_id.chars().count() > 35 {
96309			return Err(ValidationError::new(1002, "req_or_lttr_id exceeds the maximum length of 35".to_string()));
96310		}
96311		if let Some(ref val) = self.sndr { val.validate()? }
96312		if let Some(ref val) = self.rcvr { val.validate()? }
96313		if let Some(ref vec) = self.orgnl_refs { for item in vec { item.validate()? } }
96314		if self.sbjt.chars().count() < 1 {
96315			return Err(ValidationError::new(1001, "sbjt is shorter than the minimum length of 1".to_string()));
96316		}
96317		if self.sbjt.chars().count() > 140 {
96318			return Err(ValidationError::new(1002, "sbjt exceeds the maximum length of 140".to_string()));
96319		}
96320		self.tp.validate()?;
96321		if let Some(ref val) = self.desc {
96322			if val.chars().count() < 1 {
96323				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
96324			}
96325			if val.chars().count() > 1025 {
96326				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 1025".to_string()));
96327			}
96328		}
96329		if let Some(ref vec) = self.attchmnt { for item in vec { item.validate()? } }
96330		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
96331		Ok(())
96332	}
96333}
96334
96335
96336// SuspendedStatusReason1Code ...
96337#[cfg_attr(feature = "derive_debug", derive(Debug))]
96338#[cfg_attr(feature = "derive_default", derive(Default))]
96339#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96340#[cfg_attr(feature = "derive_clone", derive(Clone))]
96341#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96342pub enum SuspendedStatusReason1Code {
96343	#[cfg_attr(feature = "derive_default", default)]
96344	#[cfg_attr( feature = "derive_serde", serde(rename = "SUBY") )]
96345	CodeSUBY,
96346	#[cfg_attr( feature = "derive_serde", serde(rename = "SUBS") )]
96347	CodeSUBS,
96348}
96349
96350impl SuspendedStatusReason1Code {
96351	pub fn validate(&self) -> Result<(), ValidationError> {
96352		Ok(())
96353	}
96354}
96355
96356
96357// SustainabilityPreferences2Code ...
96358#[cfg_attr(feature = "derive_debug", derive(Debug))]
96359#[cfg_attr(feature = "derive_default", derive(Default))]
96360#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96361#[cfg_attr(feature = "derive_clone", derive(Clone))]
96362#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96363pub enum SustainabilityPreferences2Code {
96364	#[cfg_attr(feature = "derive_default", default)]
96365	#[cfg_attr( feature = "derive_serde", serde(rename = "NEUT") )]
96366	CodeNEUT,
96367	#[cfg_attr( feature = "derive_serde", serde(rename = "YSCO") )]
96368	CodeYSCO,
96369}
96370
96371impl SustainabilityPreferences2Code {
96372	pub fn validate(&self) -> Result<(), ValidationError> {
96373		Ok(())
96374	}
96375}
96376
96377
96378// SwapLegIdentification2 ...
96379#[cfg_attr(feature = "derive_debug", derive(Debug))]
96380#[cfg_attr(feature = "derive_default", derive(Default))]
96381#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96382#[cfg_attr(feature = "derive_clone", derive(Clone))]
96383#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96384pub struct SwapLegIdentification2 {
96385	#[cfg_attr( feature = "derive_serde", serde(rename = "SwpIn", skip_serializing_if = "Option::is_none") )]
96386	pub swp_in: Option<FinancialInstrumentIdentification7Choice>,
96387	#[cfg_attr( feature = "derive_serde", serde(rename = "SwpOut", skip_serializing_if = "Option::is_none") )]
96388	pub swp_out: Option<FinancialInstrumentIdentification7Choice>,
96389}
96390
96391impl SwapLegIdentification2 {
96392	pub fn validate(&self) -> Result<(), ValidationError> {
96393		if let Some(ref val) = self.swp_in { val.validate()? }
96394		if let Some(ref val) = self.swp_out { val.validate()? }
96395		Ok(())
96396	}
96397}
96398
96399
96400// SwapType1Code ...
96401#[cfg_attr(feature = "derive_debug", derive(Debug))]
96402#[cfg_attr(feature = "derive_default", derive(Default))]
96403#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96404#[cfg_attr(feature = "derive_clone", derive(Clone))]
96405#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96406pub enum SwapType1Code {
96407	#[cfg_attr(feature = "derive_default", default)]
96408	#[cfg_attr( feature = "derive_serde", serde(rename = "OSSC") )]
96409	CodeOSSC,
96410	#[cfg_attr( feature = "derive_serde", serde(rename = "XFSC") )]
96411	CodeXFSC,
96412	#[cfg_attr( feature = "derive_serde", serde(rename = "XFMC") )]
96413	CodeXFMC,
96414	#[cfg_attr( feature = "derive_serde", serde(rename = "XXSC") )]
96415	CodeXXSC,
96416	#[cfg_attr( feature = "derive_serde", serde(rename = "XXMC") )]
96417	CodeXXMC,
96418	#[cfg_attr( feature = "derive_serde", serde(rename = "IFMC") )]
96419	CodeIFMC,
96420	#[cfg_attr( feature = "derive_serde", serde(rename = "FFSC") )]
96421	CodeFFSC,
96422	#[cfg_attr( feature = "derive_serde", serde(rename = "FFMC") )]
96423	CodeFFMC,
96424	#[cfg_attr( feature = "derive_serde", serde(rename = "IFSC") )]
96425	CodeIFSC,
96426	#[cfg_attr( feature = "derive_serde", serde(rename = "OSMC") )]
96427	CodeOSMC,
96428}
96429
96430impl SwapType1Code {
96431	pub fn validate(&self) -> Result<(), ValidationError> {
96432		Ok(())
96433	}
96434}
96435
96436
96437// SwitchStatus1Code ...
96438#[cfg_attr(feature = "derive_debug", derive(Debug))]
96439#[cfg_attr(feature = "derive_default", derive(Default))]
96440#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96441#[cfg_attr(feature = "derive_clone", derive(Clone))]
96442#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96443pub enum SwitchStatus1Code {
96444	#[cfg_attr(feature = "derive_default", default)]
96445	#[cfg_attr( feature = "derive_serde", serde(rename = "ACPT") )]
96446	CodeACPT,
96447	#[cfg_attr( feature = "derive_serde", serde(rename = "BTRQ") )]
96448	CodeBTRQ,
96449	#[cfg_attr( feature = "derive_serde", serde(rename = "BTRS") )]
96450	CodeBTRS,
96451	#[cfg_attr( feature = "derive_serde", serde(rename = "COMP") )]
96452	CodeCOMP,
96453	#[cfg_attr( feature = "derive_serde", serde(rename = "REDT") )]
96454	CodeREDT,
96455	#[cfg_attr( feature = "derive_serde", serde(rename = "REDE") )]
96456	CodeREDE,
96457	#[cfg_attr( feature = "derive_serde", serde(rename = "REJT") )]
96458	CodeREJT,
96459	#[cfg_attr( feature = "derive_serde", serde(rename = "REQU") )]
96460	CodeREQU,
96461	#[cfg_attr( feature = "derive_serde", serde(rename = "TMTN") )]
96462	CodeTMTN,
96463}
96464
96465impl SwitchStatus1Code {
96466	pub fn validate(&self) -> Result<(), ValidationError> {
96467		Ok(())
96468	}
96469}
96470
96471
96472// SwitchType1Code ...
96473#[cfg_attr(feature = "derive_debug", derive(Debug))]
96474#[cfg_attr(feature = "derive_default", derive(Default))]
96475#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96476#[cfg_attr(feature = "derive_clone", derive(Clone))]
96477#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96478pub enum SwitchType1Code {
96479	#[cfg_attr(feature = "derive_default", default)]
96480	#[cfg_attr( feature = "derive_serde", serde(rename = "FULL") )]
96481	CodeFULL,
96482	#[cfg_attr( feature = "derive_serde", serde(rename = "PART") )]
96483	CodePART,
96484}
96485
96486impl SwitchType1Code {
96487	pub fn validate(&self) -> Result<(), ValidationError> {
96488		Ok(())
96489	}
96490}
96491
96492
96493// SyndicatedLoan3 ...
96494#[cfg_attr(feature = "derive_debug", derive(Debug))]
96495#[cfg_attr(feature = "derive_default", derive(Default))]
96496#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96497#[cfg_attr(feature = "derive_clone", derive(Clone))]
96498#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96499pub struct SyndicatedLoan3 {
96500	#[cfg_attr( feature = "derive_serde", serde(rename = "Brrwr") )]
96501	pub brrwr: TradeParty6,
96502	#[cfg_attr( feature = "derive_serde", serde(rename = "Lndr", skip_serializing_if = "Option::is_none") )]
96503	pub lndr: Option<TradeParty6>,
96504	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
96505	pub amt: Option<ActiveCurrencyAndAmount>,
96506	#[cfg_attr( feature = "derive_serde", serde(rename = "Shr", skip_serializing_if = "Option::is_none") )]
96507	pub shr: Option<f64>,
96508	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRateInf", skip_serializing_if = "Option::is_none") )]
96509	pub xchg_rate_inf: Option<ExchangeRate1>,
96510}
96511
96512impl SyndicatedLoan3 {
96513	pub fn validate(&self) -> Result<(), ValidationError> {
96514		self.brrwr.validate()?;
96515		if let Some(ref val) = self.lndr { val.validate()? }
96516		if let Some(ref val) = self.amt { val.validate()? }
96517		if let Some(ref val) = self.xchg_rate_inf { val.validate()? }
96518		Ok(())
96519	}
96520}
96521
96522
96523// System3 ...
96524#[cfg_attr(feature = "derive_debug", derive(Debug))]
96525#[cfg_attr(feature = "derive_default", derive(Default))]
96526#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96527#[cfg_attr(feature = "derive_clone", derive(Clone))]
96528#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96529pub struct System3 {
96530	#[cfg_attr( feature = "derive_serde", serde(rename = "SysId", skip_serializing_if = "Option::is_none") )]
96531	pub sys_id: Option<MarketInfrastructureIdentification1Choice>,
96532	#[cfg_attr( feature = "derive_serde", serde(rename = "MmbId", skip_serializing_if = "Option::is_none") )]
96533	pub mmb_id: Option<BranchAndFinancialInstitutionIdentification8>,
96534	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
96535	pub ctry: Option<String>,
96536	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
96537	pub acct_id: Option<AccountIdentification4Choice>,
96538}
96539
96540impl System3 {
96541	pub fn validate(&self) -> Result<(), ValidationError> {
96542		if let Some(ref val) = self.sys_id { val.validate()? }
96543		if let Some(ref val) = self.mmb_id { val.validate()? }
96544		if let Some(ref val) = self.ctry {
96545			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
96546			if !pattern.is_match(val) {
96547				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
96548			}
96549		}
96550		if let Some(ref val) = self.acct_id { val.validate()? }
96551		Ok(())
96552	}
96553}
96554
96555
96556// SystemAndCurrency1 ...
96557#[cfg_attr(feature = "derive_debug", derive(Debug))]
96558#[cfg_attr(feature = "derive_default", derive(Default))]
96559#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96560#[cfg_attr(feature = "derive_clone", derive(Clone))]
96561#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96562pub struct SystemAndCurrency1 {
96563	#[cfg_attr( feature = "derive_serde", serde(rename = "SysId") )]
96564	pub sys_id: SystemIdentification2Choice,
96565	#[cfg_attr( feature = "derive_serde", serde(rename = "SysCcy", skip_serializing_if = "Option::is_none") )]
96566	pub sys_ccy: Option<String>,
96567}
96568
96569impl SystemAndCurrency1 {
96570	pub fn validate(&self) -> Result<(), ValidationError> {
96571		self.sys_id.validate()?;
96572		if let Some(ref val) = self.sys_ccy {
96573			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
96574			if !pattern.is_match(val) {
96575				return Err(ValidationError::new(1005, "sys_ccy does not match the required pattern".to_string()));
96576			}
96577		}
96578		Ok(())
96579	}
96580}
96581
96582
96583// SystemAvailabilityAndEvents3 ...
96584#[cfg_attr(feature = "derive_debug", derive(Debug))]
96585#[cfg_attr(feature = "derive_default", derive(Default))]
96586#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96587#[cfg_attr(feature = "derive_clone", derive(Clone))]
96588#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96589pub struct SystemAvailabilityAndEvents3 {
96590	#[cfg_attr( feature = "derive_serde", serde(rename = "SysCcy", skip_serializing_if = "Option::is_none") )]
96591	pub sys_ccy: Option<String>,
96592	#[cfg_attr( feature = "derive_serde", serde(rename = "SsnPrd", skip_serializing_if = "Option::is_none") )]
96593	pub ssn_prd: Option<TimePeriod1>,
96594	#[cfg_attr( feature = "derive_serde", serde(rename = "Evt", skip_serializing_if = "Option::is_none") )]
96595	pub evt: Option<Vec<SystemEvent3>>,
96596	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsrInf", skip_serializing_if = "Option::is_none") )]
96597	pub clsr_inf: Option<Vec<SystemClosure2>>,
96598}
96599
96600impl SystemAvailabilityAndEvents3 {
96601	pub fn validate(&self) -> Result<(), ValidationError> {
96602		if let Some(ref val) = self.sys_ccy {
96603			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
96604			if !pattern.is_match(val) {
96605				return Err(ValidationError::new(1005, "sys_ccy does not match the required pattern".to_string()));
96606			}
96607		}
96608		if let Some(ref val) = self.ssn_prd { val.validate()? }
96609		if let Some(ref vec) = self.evt { for item in vec { item.validate()? } }
96610		if let Some(ref vec) = self.clsr_inf { for item in vec { item.validate()? } }
96611		Ok(())
96612	}
96613}
96614
96615
96616// SystemBalanceType2Code ...
96617#[cfg_attr(feature = "derive_debug", derive(Debug))]
96618#[cfg_attr(feature = "derive_default", derive(Default))]
96619#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96620#[cfg_attr(feature = "derive_clone", derive(Clone))]
96621#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96622pub enum SystemBalanceType2Code {
96623	#[cfg_attr(feature = "derive_default", default)]
96624	#[cfg_attr( feature = "derive_serde", serde(rename = "OPNG") )]
96625	CodeOPNG,
96626	#[cfg_attr( feature = "derive_serde", serde(rename = "INTM") )]
96627	CodeINTM,
96628	#[cfg_attr( feature = "derive_serde", serde(rename = "CLSG") )]
96629	CodeCLSG,
96630	#[cfg_attr( feature = "derive_serde", serde(rename = "BOOK") )]
96631	CodeBOOK,
96632	#[cfg_attr( feature = "derive_serde", serde(rename = "CRRT") )]
96633	CodeCRRT,
96634	#[cfg_attr( feature = "derive_serde", serde(rename = "PDNG") )]
96635	CodePDNG,
96636	#[cfg_attr( feature = "derive_serde", serde(rename = "LRLD") )]
96637	CodeLRLD,
96638	#[cfg_attr( feature = "derive_serde", serde(rename = "AVLB") )]
96639	CodeAVLB,
96640	#[cfg_attr( feature = "derive_serde", serde(rename = "LTSF") )]
96641	CodeLTSF,
96642	#[cfg_attr( feature = "derive_serde", serde(rename = "CRDT") )]
96643	CodeCRDT,
96644	#[cfg_attr( feature = "derive_serde", serde(rename = "EAST") )]
96645	CodeEAST,
96646	#[cfg_attr( feature = "derive_serde", serde(rename = "PYMT") )]
96647	CodePYMT,
96648	#[cfg_attr( feature = "derive_serde", serde(rename = "BLCK") )]
96649	CodeBLCK,
96650	#[cfg_attr( feature = "derive_serde", serde(rename = "XPCD") )]
96651	CodeXPCD,
96652	#[cfg_attr( feature = "derive_serde", serde(rename = "DLOD") )]
96653	CodeDLOD,
96654	#[cfg_attr( feature = "derive_serde", serde(rename = "XCRD") )]
96655	CodeXCRD,
96656	#[cfg_attr( feature = "derive_serde", serde(rename = "XDBT") )]
96657	CodeXDBT,
96658	#[cfg_attr( feature = "derive_serde", serde(rename = "ADJT") )]
96659	CodeADJT,
96660	#[cfg_attr( feature = "derive_serde", serde(rename = "PRAV") )]
96661	CodePRAV,
96662	#[cfg_attr( feature = "derive_serde", serde(rename = "DBIT") )]
96663	CodeDBIT,
96664	#[cfg_attr( feature = "derive_serde", serde(rename = "THRE") )]
96665	CodeTHRE,
96666	#[cfg_attr( feature = "derive_serde", serde(rename = "NOTE") )]
96667	CodeNOTE,
96668	#[cfg_attr( feature = "derive_serde", serde(rename = "FSET") )]
96669	CodeFSET,
96670	#[cfg_attr( feature = "derive_serde", serde(rename = "BLOC") )]
96671	CodeBLOC,
96672	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHB") )]
96673	CodeOTHB,
96674	#[cfg_attr( feature = "derive_serde", serde(rename = "CUST") )]
96675	CodeCUST,
96676	#[cfg_attr( feature = "derive_serde", serde(rename = "FORC") )]
96677	CodeFORC,
96678	#[cfg_attr( feature = "derive_serde", serde(rename = "COLC") )]
96679	CodeCOLC,
96680	#[cfg_attr( feature = "derive_serde", serde(rename = "FUND") )]
96681	CodeFUND,
96682	#[cfg_attr( feature = "derive_serde", serde(rename = "PIPO") )]
96683	CodePIPO,
96684	#[cfg_attr( feature = "derive_serde", serde(rename = "XCHG") )]
96685	CodeXCHG,
96686	#[cfg_attr( feature = "derive_serde", serde(rename = "CCPS") )]
96687	CodeCCPS,
96688	#[cfg_attr( feature = "derive_serde", serde(rename = "TOHB") )]
96689	CodeTOHB,
96690	#[cfg_attr( feature = "derive_serde", serde(rename = "COHB") )]
96691	CodeCOHB,
96692	#[cfg_attr( feature = "derive_serde", serde(rename = "DOHB") )]
96693	CodeDOHB,
96694	#[cfg_attr( feature = "derive_serde", serde(rename = "TPBL") )]
96695	CodeTPBL,
96696	#[cfg_attr( feature = "derive_serde", serde(rename = "CPBL") )]
96697	CodeCPBL,
96698	#[cfg_attr( feature = "derive_serde", serde(rename = "DPBL") )]
96699	CodeDPBL,
96700	#[cfg_attr( feature = "derive_serde", serde(rename = "FUTB") )]
96701	CodeFUTB,
96702	#[cfg_attr( feature = "derive_serde", serde(rename = "REJB") )]
96703	CodeREJB,
96704	#[cfg_attr( feature = "derive_serde", serde(rename = "FCOL") )]
96705	CodeFCOL,
96706	#[cfg_attr( feature = "derive_serde", serde(rename = "FCOU") )]
96707	CodeFCOU,
96708	#[cfg_attr( feature = "derive_serde", serde(rename = "SCOL") )]
96709	CodeSCOL,
96710	#[cfg_attr( feature = "derive_serde", serde(rename = "SCOU") )]
96711	CodeSCOU,
96712	#[cfg_attr( feature = "derive_serde", serde(rename = "CUSA") )]
96713	CodeCUSA,
96714	#[cfg_attr( feature = "derive_serde", serde(rename = "XCHC") )]
96715	CodeXCHC,
96716	#[cfg_attr( feature = "derive_serde", serde(rename = "XCHN") )]
96717	CodeXCHN,
96718	#[cfg_attr( feature = "derive_serde", serde(rename = "DSET") )]
96719	CodeDSET,
96720	#[cfg_attr( feature = "derive_serde", serde(rename = "LACK") )]
96721	CodeLACK,
96722	#[cfg_attr( feature = "derive_serde", serde(rename = "NSET") )]
96723	CodeNSET,
96724	#[cfg_attr( feature = "derive_serde", serde(rename = "OTCC") )]
96725	CodeOTCC,
96726	#[cfg_attr( feature = "derive_serde", serde(rename = "OTCG") )]
96727	CodeOTCG,
96728	#[cfg_attr( feature = "derive_serde", serde(rename = "OTCN") )]
96729	CodeOTCN,
96730	#[cfg_attr( feature = "derive_serde", serde(rename = "SAPD") )]
96731	CodeSAPD,
96732	#[cfg_attr( feature = "derive_serde", serde(rename = "SAPC") )]
96733	CodeSAPC,
96734	#[cfg_attr( feature = "derive_serde", serde(rename = "REPD") )]
96735	CodeREPD,
96736	#[cfg_attr( feature = "derive_serde", serde(rename = "REPC") )]
96737	CodeREPC,
96738	#[cfg_attr( feature = "derive_serde", serde(rename = "BSCD") )]
96739	CodeBSCD,
96740	#[cfg_attr( feature = "derive_serde", serde(rename = "BSCC") )]
96741	CodeBSCC,
96742	#[cfg_attr( feature = "derive_serde", serde(rename = "SAPP") )]
96743	CodeSAPP,
96744	#[cfg_attr( feature = "derive_serde", serde(rename = "IRLT") )]
96745	CodeIRLT,
96746	#[cfg_attr( feature = "derive_serde", serde(rename = "IRDR") )]
96747	CodeIRDR,
96748	#[cfg_attr( feature = "derive_serde", serde(rename = "DWRD") )]
96749	CodeDWRD,
96750	#[cfg_attr( feature = "derive_serde", serde(rename = "ADWR") )]
96751	CodeADWR,
96752	#[cfg_attr( feature = "derive_serde", serde(rename = "AIDR") )]
96753	CodeAIDR,
96754}
96755
96756impl SystemBalanceType2Code {
96757	pub fn validate(&self) -> Result<(), ValidationError> {
96758		Ok(())
96759	}
96760}
96761
96762
96763// SystemClosure2 ...
96764#[cfg_attr(feature = "derive_debug", derive(Debug))]
96765#[cfg_attr(feature = "derive_default", derive(Default))]
96766#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96767#[cfg_attr(feature = "derive_clone", derive(Clone))]
96768#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96769pub struct SystemClosure2 {
96770	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd", skip_serializing_if = "Option::is_none") )]
96771	pub prd: Option<DateTimePeriod1Choice>,
96772	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn") )]
96773	pub rsn: ClosureReason2Choice,
96774}
96775
96776impl SystemClosure2 {
96777	pub fn validate(&self) -> Result<(), ValidationError> {
96778		if let Some(ref val) = self.prd { val.validate()? }
96779		self.rsn.validate()?;
96780		Ok(())
96781	}
96782}
96783
96784
96785// SystemClosureReason1Code ...
96786#[cfg_attr(feature = "derive_debug", derive(Debug))]
96787#[cfg_attr(feature = "derive_default", derive(Default))]
96788#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96789#[cfg_attr(feature = "derive_clone", derive(Clone))]
96790#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96791pub enum SystemClosureReason1Code {
96792	#[cfg_attr(feature = "derive_default", default)]
96793	#[cfg_attr( feature = "derive_serde", serde(rename = "BHOL") )]
96794	CodeBHOL,
96795	#[cfg_attr( feature = "derive_serde", serde(rename = "SMTN") )]
96796	CodeSMTN,
96797	#[cfg_attr( feature = "derive_serde", serde(rename = "NOOP") )]
96798	CodeNOOP,
96799	#[cfg_attr( feature = "derive_serde", serde(rename = "RCVR") )]
96800	CodeRCVR,
96801	#[cfg_attr( feature = "derive_serde", serde(rename = "ADTW") )]
96802	CodeADTW,
96803}
96804
96805impl SystemClosureReason1Code {
96806	pub fn validate(&self) -> Result<(), ValidationError> {
96807		Ok(())
96808	}
96809}
96810
96811
96812// SystemEvent3 ...
96813#[cfg_attr(feature = "derive_debug", derive(Debug))]
96814#[cfg_attr(feature = "derive_default", derive(Default))]
96815#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96816#[cfg_attr(feature = "derive_clone", derive(Clone))]
96817#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96818pub struct SystemEvent3 {
96819	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
96820	pub tp: SystemEventType4Choice,
96821	#[cfg_attr( feature = "derive_serde", serde(rename = "SchdldTm") )]
96822	pub schdld_tm: String,
96823	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvTm", skip_serializing_if = "Option::is_none") )]
96824	pub fctv_tm: Option<String>,
96825	#[cfg_attr( feature = "derive_serde", serde(rename = "StartTm", skip_serializing_if = "Option::is_none") )]
96826	pub start_tm: Option<String>,
96827	#[cfg_attr( feature = "derive_serde", serde(rename = "EndTm", skip_serializing_if = "Option::is_none") )]
96828	pub end_tm: Option<String>,
96829}
96830
96831impl SystemEvent3 {
96832	pub fn validate(&self) -> Result<(), ValidationError> {
96833		self.tp.validate()?;
96834		Ok(())
96835	}
96836}
96837
96838
96839// SystemEventType2Choice ...
96840#[cfg_attr(feature = "derive_debug", derive(Debug))]
96841#[cfg_attr(feature = "derive_default", derive(Default))]
96842#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96843#[cfg_attr(feature = "derive_clone", derive(Clone))]
96844#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96845pub struct SystemEventType2Choice {
96846	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
96847	pub cd: Option<SystemEventType2Code>,
96848	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
96849	pub prtry: Option<GenericIdentification1>,
96850}
96851
96852impl SystemEventType2Choice {
96853	pub fn validate(&self) -> Result<(), ValidationError> {
96854		if let Some(ref val) = self.cd { val.validate()? }
96855		if let Some(ref val) = self.prtry { val.validate()? }
96856		Ok(())
96857	}
96858}
96859
96860
96861// SystemEventType2Code ...
96862#[cfg_attr(feature = "derive_debug", derive(Debug))]
96863#[cfg_attr(feature = "derive_default", derive(Default))]
96864#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96865#[cfg_attr(feature = "derive_clone", derive(Clone))]
96866#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96867pub enum SystemEventType2Code {
96868	#[cfg_attr(feature = "derive_default", default)]
96869	#[cfg_attr( feature = "derive_serde", serde(rename = "LVCO") )]
96870	CodeLVCO,
96871	#[cfg_attr( feature = "derive_serde", serde(rename = "LVCC") )]
96872	CodeLVCC,
96873	#[cfg_attr( feature = "derive_serde", serde(rename = "LVRT") )]
96874	CodeLVRT,
96875	#[cfg_attr( feature = "derive_serde", serde(rename = "EUSU") )]
96876	CodeEUSU,
96877	#[cfg_attr( feature = "derive_serde", serde(rename = "STSU") )]
96878	CodeSTSU,
96879	#[cfg_attr( feature = "derive_serde", serde(rename = "LWSU") )]
96880	CodeLWSU,
96881	#[cfg_attr( feature = "derive_serde", serde(rename = "EUCO") )]
96882	CodeEUCO,
96883	#[cfg_attr( feature = "derive_serde", serde(rename = "FIRE") )]
96884	CodeFIRE,
96885	#[cfg_attr( feature = "derive_serde", serde(rename = "STDY") )]
96886	CodeSTDY,
96887	#[cfg_attr( feature = "derive_serde", serde(rename = "LTNC") )]
96888	CodeLTNC,
96889	#[cfg_attr( feature = "derive_serde", serde(rename = "CRCO") )]
96890	CodeCRCO,
96891	#[cfg_attr( feature = "derive_serde", serde(rename = "RECC") )]
96892	CodeRECC,
96893	#[cfg_attr( feature = "derive_serde", serde(rename = "LTGC") )]
96894	CodeLTGC,
96895	#[cfg_attr( feature = "derive_serde", serde(rename = "LTDC") )]
96896	CodeLTDC,
96897	#[cfg_attr( feature = "derive_serde", serde(rename = "CUSC") )]
96898	CodeCUSC,
96899	#[cfg_attr( feature = "derive_serde", serde(rename = "IBKC") )]
96900	CodeIBKC,
96901	#[cfg_attr( feature = "derive_serde", serde(rename = "SYSC") )]
96902	CodeSYSC,
96903	#[cfg_attr( feature = "derive_serde", serde(rename = "SSSC") )]
96904	CodeSSSC,
96905	#[cfg_attr( feature = "derive_serde", serde(rename = "REOP") )]
96906	CodeREOP,
96907	#[cfg_attr( feature = "derive_serde", serde(rename = "PCOT") )]
96908	CodePCOT,
96909	#[cfg_attr( feature = "derive_serde", serde(rename = "NPCT") )]
96910	CodeNPCT,
96911	#[cfg_attr( feature = "derive_serde", serde(rename = "ESTF") )]
96912	CodeESTF,
96913}
96914
96915impl SystemEventType2Code {
96916	pub fn validate(&self) -> Result<(), ValidationError> {
96917		Ok(())
96918	}
96919}
96920
96921
96922// SystemEventType4Choice ...
96923#[cfg_attr(feature = "derive_debug", derive(Debug))]
96924#[cfg_attr(feature = "derive_default", derive(Default))]
96925#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96926#[cfg_attr(feature = "derive_clone", derive(Clone))]
96927#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96928pub struct SystemEventType4Choice {
96929	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
96930	pub cd: Option<String>,
96931	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
96932	pub prtry: Option<GenericIdentification1>,
96933}
96934
96935impl SystemEventType4Choice {
96936	pub fn validate(&self) -> Result<(), ValidationError> {
96937		if let Some(ref val) = self.cd {
96938			if val.chars().count() < 1 {
96939				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
96940			}
96941			if val.chars().count() > 4 {
96942				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
96943			}
96944		}
96945		if let Some(ref val) = self.prtry { val.validate()? }
96946		Ok(())
96947	}
96948}
96949
96950
96951// SystemIdentification2Choice ...
96952#[cfg_attr(feature = "derive_debug", derive(Debug))]
96953#[cfg_attr(feature = "derive_default", derive(Default))]
96954#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96955#[cfg_attr(feature = "derive_clone", derive(Clone))]
96956#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96957pub struct SystemIdentification2Choice {
96958	#[cfg_attr( feature = "derive_serde", serde(rename = "MktInfrstrctrId", skip_serializing_if = "Option::is_none") )]
96959	pub mkt_infrstrctr_id: Option<MarketInfrastructureIdentification1Choice>,
96960	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
96961	pub ctry: Option<String>,
96962}
96963
96964impl SystemIdentification2Choice {
96965	pub fn validate(&self) -> Result<(), ValidationError> {
96966		if let Some(ref val) = self.mkt_infrstrctr_id { val.validate()? }
96967		if let Some(ref val) = self.ctry {
96968			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
96969			if !pattern.is_match(val) {
96970				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
96971			}
96972		}
96973		Ok(())
96974	}
96975}
96976
96977
96978// SystemMember3 ...
96979#[cfg_attr(feature = "derive_debug", derive(Debug))]
96980#[cfg_attr(feature = "derive_default", derive(Default))]
96981#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
96982#[cfg_attr(feature = "derive_clone", derive(Clone))]
96983#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
96984pub struct SystemMember3 {
96985	#[cfg_attr( feature = "derive_serde", serde(rename = "SysId", skip_serializing_if = "Option::is_none") )]
96986	pub sys_id: Option<SystemIdentification2Choice>,
96987	#[cfg_attr( feature = "derive_serde", serde(rename = "MmbId") )]
96988	pub mmb_id: MemberIdentification3Choice,
96989}
96990
96991impl SystemMember3 {
96992	pub fn validate(&self) -> Result<(), ValidationError> {
96993		if let Some(ref val) = self.sys_id { val.validate()? }
96994		self.mmb_id.validate()?;
96995		Ok(())
96996	}
96997}
96998
96999
97000// SystemMemberStatus1Choice ...
97001#[cfg_attr(feature = "derive_debug", derive(Debug))]
97002#[cfg_attr(feature = "derive_default", derive(Default))]
97003#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97004#[cfg_attr(feature = "derive_clone", derive(Clone))]
97005#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97006pub struct SystemMemberStatus1Choice {
97007	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
97008	pub cd: Option<MemberStatus1Code>,
97009	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
97010	pub prtry: Option<String>,
97011}
97012
97013impl SystemMemberStatus1Choice {
97014	pub fn validate(&self) -> Result<(), ValidationError> {
97015		if let Some(ref val) = self.cd { val.validate()? }
97016		if let Some(ref val) = self.prtry {
97017			if val.chars().count() < 1 {
97018				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
97019			}
97020			if val.chars().count() > 35 {
97021				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
97022			}
97023		}
97024		Ok(())
97025	}
97026}
97027
97028
97029// SystemMemberType1Choice ...
97030#[cfg_attr(feature = "derive_debug", derive(Debug))]
97031#[cfg_attr(feature = "derive_default", derive(Default))]
97032#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97033#[cfg_attr(feature = "derive_clone", derive(Clone))]
97034#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97035pub struct SystemMemberType1Choice {
97036	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
97037	pub cd: Option<String>,
97038	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
97039	pub prtry: Option<String>,
97040}
97041
97042impl SystemMemberType1Choice {
97043	pub fn validate(&self) -> Result<(), ValidationError> {
97044		if let Some(ref val) = self.cd {
97045			if val.chars().count() < 1 {
97046				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
97047			}
97048			if val.chars().count() > 4 {
97049				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
97050			}
97051		}
97052		if let Some(ref val) = self.prtry {
97053			if val.chars().count() < 1 {
97054				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
97055			}
97056			if val.chars().count() > 35 {
97057				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
97058			}
97059		}
97060		Ok(())
97061	}
97062}
97063
97064
97065// SystemParty2 ...
97066#[cfg_attr(feature = "derive_debug", derive(Debug))]
97067#[cfg_attr(feature = "derive_default", derive(Default))]
97068#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97069#[cfg_attr(feature = "derive_clone", derive(Clone))]
97070#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97071pub struct SystemParty2 {
97072	#[cfg_attr( feature = "derive_serde", serde(rename = "OpngDt", skip_serializing_if = "Option::is_none") )]
97073	pub opng_dt: Option<String>,
97074	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
97075	pub clsg_dt: Option<String>,
97076}
97077
97078impl SystemParty2 {
97079	pub fn validate(&self) -> Result<(), ValidationError> {
97080		Ok(())
97081	}
97082}
97083
97084
97085// SystemParty6 ...
97086#[cfg_attr(feature = "derive_debug", derive(Debug))]
97087#[cfg_attr(feature = "derive_default", derive(Default))]
97088#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97089#[cfg_attr(feature = "derive_clone", derive(Clone))]
97090#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97091pub struct SystemParty6 {
97092	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId", skip_serializing_if = "Option::is_none") )]
97093	pub pty_id: Option<SystemPartyIdentification9>,
97094	#[cfg_attr( feature = "derive_serde", serde(rename = "Adr", skip_serializing_if = "Option::is_none") )]
97095	pub adr: Option<PostalAddress28>,
97096	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctDtls", skip_serializing_if = "Option::is_none") )]
97097	pub ctct_dtls: Option<Vec<Contact14>>,
97098	#[cfg_attr( feature = "derive_serde", serde(rename = "OpngDt", skip_serializing_if = "Option::is_none") )]
97099	pub opng_dt: Option<String>,
97100	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
97101	pub clsg_dt: Option<String>,
97102	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
97103	pub tp: Option<SystemPartyType1Choice>,
97104	#[cfg_attr( feature = "derive_serde", serde(rename = "TechAdr", skip_serializing_if = "Option::is_none") )]
97105	pub tech_adr: Option<Vec<TechnicalIdentification2Choice>>,
97106	#[cfg_attr( feature = "derive_serde", serde(rename = "MktSpcfcAttr", skip_serializing_if = "Option::is_none") )]
97107	pub mkt_spcfc_attr: Option<Vec<MarketSpecificAttribute1>>,
97108	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
97109	pub nm: Option<PartyName4>,
97110	#[cfg_attr( feature = "derive_serde", serde(rename = "ResTp", skip_serializing_if = "Option::is_none") )]
97111	pub res_tp: Option<ResidenceType1Code>,
97112	#[cfg_attr( feature = "derive_serde", serde(rename = "LckSts", skip_serializing_if = "Option::is_none") )]
97113	pub lck_sts: Option<PartyLockStatus1>,
97114	#[cfg_attr( feature = "derive_serde", serde(rename = "Rstrctn", skip_serializing_if = "Option::is_none") )]
97115	pub rstrctn: Option<Vec<SystemRestriction1>>,
97116}
97117
97118impl SystemParty6 {
97119	pub fn validate(&self) -> Result<(), ValidationError> {
97120		if let Some(ref val) = self.pty_id { val.validate()? }
97121		if let Some(ref val) = self.adr { val.validate()? }
97122		if let Some(ref vec) = self.ctct_dtls { for item in vec { item.validate()? } }
97123		if let Some(ref val) = self.tp { val.validate()? }
97124		if let Some(ref vec) = self.tech_adr { for item in vec { item.validate()? } }
97125		if let Some(ref vec) = self.mkt_spcfc_attr { for item in vec { item.validate()? } }
97126		if let Some(ref val) = self.nm { val.validate()? }
97127		if let Some(ref val) = self.res_tp { val.validate()? }
97128		if let Some(ref val) = self.lck_sts { val.validate()? }
97129		if let Some(ref vec) = self.rstrctn { for item in vec { item.validate()? } }
97130		Ok(())
97131	}
97132}
97133
97134
97135// SystemParty7 ...
97136#[cfg_attr(feature = "derive_debug", derive(Debug))]
97137#[cfg_attr(feature = "derive_default", derive(Default))]
97138#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97139#[cfg_attr(feature = "derive_clone", derive(Clone))]
97140#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97141pub struct SystemParty7 {
97142	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId") )]
97143	pub pty_id: SystemPartyIdentification9,
97144	#[cfg_attr( feature = "derive_serde", serde(rename = "Adr", skip_serializing_if = "Option::is_none") )]
97145	pub adr: Option<Vec<PostalAddress28>>,
97146	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctDtls", skip_serializing_if = "Option::is_none") )]
97147	pub ctct_dtls: Option<Vec<Contact14>>,
97148	#[cfg_attr( feature = "derive_serde", serde(rename = "OpngDt", skip_serializing_if = "Option::is_none") )]
97149	pub opng_dt: Option<String>,
97150	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
97151	pub clsg_dt: Option<String>,
97152	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
97153	pub tp: SystemPartyType1Choice,
97154	#[cfg_attr( feature = "derive_serde", serde(rename = "TechAdr", skip_serializing_if = "Option::is_none") )]
97155	pub tech_adr: Option<Vec<TechnicalIdentification2Choice>>,
97156	#[cfg_attr( feature = "derive_serde", serde(rename = "MktSpcfcAttr", skip_serializing_if = "Option::is_none") )]
97157	pub mkt_spcfc_attr: Option<Vec<MarketSpecificAttribute1>>,
97158	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
97159	pub nm: Option<PartyName4>,
97160	#[cfg_attr( feature = "derive_serde", serde(rename = "ResTp", skip_serializing_if = "Option::is_none") )]
97161	pub res_tp: Option<ResidenceType1Code>,
97162	#[cfg_attr( feature = "derive_serde", serde(rename = "LckSts", skip_serializing_if = "Option::is_none") )]
97163	pub lck_sts: Option<PartyLockStatus1>,
97164	#[cfg_attr( feature = "derive_serde", serde(rename = "Rstrctn", skip_serializing_if = "Option::is_none") )]
97165	pub rstrctn: Option<Vec<SystemRestriction1>>,
97166}
97167
97168impl SystemParty7 {
97169	pub fn validate(&self) -> Result<(), ValidationError> {
97170		self.pty_id.validate()?;
97171		if let Some(ref vec) = self.adr { for item in vec { item.validate()? } }
97172		if let Some(ref vec) = self.ctct_dtls { for item in vec { item.validate()? } }
97173		self.tp.validate()?;
97174		if let Some(ref vec) = self.tech_adr { for item in vec { item.validate()? } }
97175		if let Some(ref vec) = self.mkt_spcfc_attr { for item in vec { item.validate()? } }
97176		if let Some(ref val) = self.nm { val.validate()? }
97177		if let Some(ref val) = self.res_tp { val.validate()? }
97178		if let Some(ref val) = self.lck_sts { val.validate()? }
97179		if let Some(ref vec) = self.rstrctn { for item in vec { item.validate()? } }
97180		Ok(())
97181	}
97182}
97183
97184
97185// SystemPartyIdentification10 ...
97186#[cfg_attr(feature = "derive_debug", derive(Debug))]
97187#[cfg_attr(feature = "derive_default", derive(Default))]
97188#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97189#[cfg_attr(feature = "derive_clone", derive(Clone))]
97190#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97191pub struct SystemPartyIdentification10 {
97192	#[cfg_attr( feature = "derive_serde", serde(rename = "VldFr", skip_serializing_if = "Option::is_none") )]
97193	pub vld_fr: Option<String>,
97194	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
97195	pub id: Option<PartyIdentification136>,
97196}
97197
97198impl SystemPartyIdentification10 {
97199	pub fn validate(&self) -> Result<(), ValidationError> {
97200		if let Some(ref val) = self.id { val.validate()? }
97201		Ok(())
97202	}
97203}
97204
97205
97206// SystemPartyIdentification2Choice ...
97207#[cfg_attr(feature = "derive_debug", derive(Debug))]
97208#[cfg_attr(feature = "derive_default", derive(Default))]
97209#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97210#[cfg_attr(feature = "derive_clone", derive(Clone))]
97211#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97212pub struct SystemPartyIdentification2Choice {
97213	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgId", skip_serializing_if = "Option::is_none") )]
97214	pub org_id: Option<PartyIdentification136>,
97215	#[cfg_attr( feature = "derive_serde", serde(rename = "CmbndId", skip_serializing_if = "Option::is_none") )]
97216	pub cmbnd_id: Option<SystemPartyIdentification8>,
97217}
97218
97219impl SystemPartyIdentification2Choice {
97220	pub fn validate(&self) -> Result<(), ValidationError> {
97221		if let Some(ref val) = self.org_id { val.validate()? }
97222		if let Some(ref val) = self.cmbnd_id { val.validate()? }
97223		Ok(())
97224	}
97225}
97226
97227
97228// SystemPartyIdentification8 ...
97229#[cfg_attr(feature = "derive_debug", derive(Debug))]
97230#[cfg_attr(feature = "derive_default", derive(Default))]
97231#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97232#[cfg_attr(feature = "derive_clone", derive(Clone))]
97233#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97234pub struct SystemPartyIdentification8 {
97235	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
97236	pub id: PartyIdentification136,
97237	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnsblPtyId", skip_serializing_if = "Option::is_none") )]
97238	pub rspnsbl_pty_id: Option<PartyIdentification136>,
97239}
97240
97241impl SystemPartyIdentification8 {
97242	pub fn validate(&self) -> Result<(), ValidationError> {
97243		self.id.validate()?;
97244		if let Some(ref val) = self.rspnsbl_pty_id { val.validate()? }
97245		Ok(())
97246	}
97247}
97248
97249
97250// SystemPartyIdentification9 ...
97251#[cfg_attr(feature = "derive_debug", derive(Debug))]
97252#[cfg_attr(feature = "derive_default", derive(Default))]
97253#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97254#[cfg_attr(feature = "derive_clone", derive(Clone))]
97255#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97256pub struct SystemPartyIdentification9 {
97257	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
97258	pub id: PartyIdentification136,
97259	#[cfg_attr( feature = "derive_serde", serde(rename = "RspnsblPtyId", skip_serializing_if = "Option::is_none") )]
97260	pub rspnsbl_pty_id: Option<PartyIdentification136>,
97261	#[cfg_attr( feature = "derive_serde", serde(rename = "VldFr", skip_serializing_if = "Option::is_none") )]
97262	pub vld_fr: Option<String>,
97263}
97264
97265impl SystemPartyIdentification9 {
97266	pub fn validate(&self) -> Result<(), ValidationError> {
97267		self.id.validate()?;
97268		if let Some(ref val) = self.rspnsbl_pty_id { val.validate()? }
97269		Ok(())
97270	}
97271}
97272
97273
97274// SystemPartyModification3 ...
97275#[cfg_attr(feature = "derive_debug", derive(Debug))]
97276#[cfg_attr(feature = "derive_default", derive(Default))]
97277#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97278#[cfg_attr(feature = "derive_clone", derive(Clone))]
97279#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97280pub struct SystemPartyModification3 {
97281	#[cfg_attr( feature = "derive_serde", serde(rename = "ScpIndctn") )]
97282	pub scp_indctn: DataModification1Code,
97283	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdMod") )]
97284	pub reqd_mod: SystemPartyModification3Choice,
97285}
97286
97287impl SystemPartyModification3 {
97288	pub fn validate(&self) -> Result<(), ValidationError> {
97289		self.scp_indctn.validate()?;
97290		self.reqd_mod.validate()?;
97291		Ok(())
97292	}
97293}
97294
97295
97296// SystemPartyModification3Choice ...
97297#[cfg_attr(feature = "derive_debug", derive(Debug))]
97298#[cfg_attr(feature = "derive_default", derive(Default))]
97299#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97300#[cfg_attr(feature = "derive_clone", derive(Clone))]
97301#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97302pub struct SystemPartyModification3Choice {
97303	#[cfg_attr( feature = "derive_serde", serde(rename = "SysPtyDt", skip_serializing_if = "Option::is_none") )]
97304	pub sys_pty_dt: Option<SystemParty2>,
97305	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId", skip_serializing_if = "Option::is_none") )]
97306	pub pty_id: Option<SystemPartyIdentification10>,
97307	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyNm", skip_serializing_if = "Option::is_none") )]
97308	pub pty_nm: Option<PartyName3>,
97309	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctDtls", skip_serializing_if = "Option::is_none") )]
97310	pub ctct_dtls: Option<Contact14>,
97311	#[cfg_attr( feature = "derive_serde", serde(rename = "TechAdr", skip_serializing_if = "Option::is_none") )]
97312	pub tech_adr: Option<TechnicalIdentification2Choice>,
97313	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyAdr", skip_serializing_if = "Option::is_none") )]
97314	pub pty_adr: Option<PostalAddress28>,
97315	#[cfg_attr( feature = "derive_serde", serde(rename = "ResTp", skip_serializing_if = "Option::is_none") )]
97316	pub res_tp: Option<ResidenceType1Code>,
97317	#[cfg_attr( feature = "derive_serde", serde(rename = "LckSts", skip_serializing_if = "Option::is_none") )]
97318	pub lck_sts: Option<PartyLockStatus1>,
97319	#[cfg_attr( feature = "derive_serde", serde(rename = "SysRstrctn", skip_serializing_if = "Option::is_none") )]
97320	pub sys_rstrctn: Option<SystemRestriction1>,
97321	#[cfg_attr( feature = "derive_serde", serde(rename = "MktSpcfcAttr", skip_serializing_if = "Option::is_none") )]
97322	pub mkt_spcfc_attr: Option<MarketSpecificAttribute1>,
97323}
97324
97325impl SystemPartyModification3Choice {
97326	pub fn validate(&self) -> Result<(), ValidationError> {
97327		if let Some(ref val) = self.sys_pty_dt { val.validate()? }
97328		if let Some(ref val) = self.pty_id { val.validate()? }
97329		if let Some(ref val) = self.pty_nm { val.validate()? }
97330		if let Some(ref val) = self.ctct_dtls { val.validate()? }
97331		if let Some(ref val) = self.tech_adr { val.validate()? }
97332		if let Some(ref val) = self.pty_adr { val.validate()? }
97333		if let Some(ref val) = self.res_tp { val.validate()? }
97334		if let Some(ref val) = self.lck_sts { val.validate()? }
97335		if let Some(ref val) = self.sys_rstrctn { val.validate()? }
97336		if let Some(ref val) = self.mkt_spcfc_attr { val.validate()? }
97337		Ok(())
97338	}
97339}
97340
97341
97342// SystemPartyType1Choice ...
97343#[cfg_attr(feature = "derive_debug", derive(Debug))]
97344#[cfg_attr(feature = "derive_default", derive(Default))]
97345#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97346#[cfg_attr(feature = "derive_clone", derive(Clone))]
97347#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97348pub struct SystemPartyType1Choice {
97349	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
97350	pub cd: Option<String>,
97351	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
97352	pub prtry: Option<String>,
97353}
97354
97355impl SystemPartyType1Choice {
97356	pub fn validate(&self) -> Result<(), ValidationError> {
97357		if let Some(ref val) = self.cd {
97358			if val.chars().count() < 1 {
97359				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
97360			}
97361			if val.chars().count() > 4 {
97362				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
97363			}
97364		}
97365		if let Some(ref val) = self.prtry {
97366			if val.chars().count() < 1 {
97367				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
97368			}
97369			if val.chars().count() > 35 {
97370				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
97371			}
97372		}
97373		Ok(())
97374	}
97375}
97376
97377
97378// SystemRestriction1 ...
97379#[cfg_attr(feature = "derive_debug", derive(Debug))]
97380#[cfg_attr(feature = "derive_default", derive(Default))]
97381#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97382#[cfg_attr(feature = "derive_clone", derive(Clone))]
97383#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97384pub struct SystemRestriction1 {
97385	#[cfg_attr( feature = "derive_serde", serde(rename = "VldFr") )]
97386	pub vld_fr: String,
97387	#[cfg_attr( feature = "derive_serde", serde(rename = "VldTo", skip_serializing_if = "Option::is_none") )]
97388	pub vld_to: Option<String>,
97389	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
97390	pub tp: String,
97391}
97392
97393impl SystemRestriction1 {
97394	pub fn validate(&self) -> Result<(), ValidationError> {
97395		if self.tp.chars().count() < 1 {
97396			return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
97397		}
97398		if self.tp.chars().count() > 35 {
97399			return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
97400		}
97401		Ok(())
97402	}
97403}
97404
97405
97406// SystemReturnCriteria2 ...
97407#[cfg_attr(feature = "derive_debug", derive(Debug))]
97408#[cfg_attr(feature = "derive_default", derive(Default))]
97409#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97410#[cfg_attr(feature = "derive_clone", derive(Clone))]
97411#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97412pub struct SystemReturnCriteria2 {
97413	#[cfg_attr( feature = "derive_serde", serde(rename = "SysIdInd", skip_serializing_if = "Option::is_none") )]
97414	pub sys_id_ind: Option<bool>,
97415	#[cfg_attr( feature = "derive_serde", serde(rename = "MmbIdInd", skip_serializing_if = "Option::is_none") )]
97416	pub mmb_id_ind: Option<bool>,
97417	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryIdInd", skip_serializing_if = "Option::is_none") )]
97418	pub ctry_id_ind: Option<bool>,
97419	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctIdInd", skip_serializing_if = "Option::is_none") )]
97420	pub acct_id_ind: Option<bool>,
97421}
97422
97423impl SystemReturnCriteria2 {
97424	pub fn validate(&self) -> Result<(), ValidationError> {
97425		Ok(())
97426	}
97427}
97428
97429
97430// SystemSearch5 ...
97431#[cfg_attr(feature = "derive_debug", derive(Debug))]
97432#[cfg_attr(feature = "derive_default", derive(Default))]
97433#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97434#[cfg_attr(feature = "derive_clone", derive(Clone))]
97435#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97436pub struct SystemSearch5 {
97437	#[cfg_attr( feature = "derive_serde", serde(rename = "SysId", skip_serializing_if = "Option::is_none") )]
97438	pub sys_id: Option<Vec<ClearingSystemIdentification3Choice>>,
97439	#[cfg_attr( feature = "derive_serde", serde(rename = "MmbId", skip_serializing_if = "Option::is_none") )]
97440	pub mmb_id: Option<Vec<BranchAndFinancialInstitutionIdentification8>>,
97441	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry", skip_serializing_if = "Option::is_none") )]
97442	pub ctry: Option<String>,
97443	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctId", skip_serializing_if = "Option::is_none") )]
97444	pub acct_id: Option<AccountIdentification4Choice>,
97445}
97446
97447impl SystemSearch5 {
97448	pub fn validate(&self) -> Result<(), ValidationError> {
97449		if let Some(ref vec) = self.sys_id { for item in vec { item.validate()? } }
97450		if let Some(ref vec) = self.mmb_id { for item in vec { item.validate()? } }
97451		if let Some(ref val) = self.ctry {
97452			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
97453			if !pattern.is_match(val) {
97454				return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
97455			}
97456		}
97457		if let Some(ref val) = self.acct_id { val.validate()? }
97458		Ok(())
97459	}
97460}
97461
97462
97463// SystemSecuritiesAccount5 ...
97464#[cfg_attr(feature = "derive_debug", derive(Debug))]
97465#[cfg_attr(feature = "derive_default", derive(Default))]
97466#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97467#[cfg_attr(feature = "derive_clone", derive(Clone))]
97468#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97469pub struct SystemSecuritiesAccount5 {
97470	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
97471	pub clsg_dt: Option<String>,
97472	#[cfg_attr( feature = "derive_serde", serde(rename = "HldInd", skip_serializing_if = "Option::is_none") )]
97473	pub hld_ind: Option<bool>,
97474	#[cfg_attr( feature = "derive_serde", serde(rename = "NegPos", skip_serializing_if = "Option::is_none") )]
97475	pub neg_pos: Option<bool>,
97476	#[cfg_attr( feature = "derive_serde", serde(rename = "EndInvstrFlg", skip_serializing_if = "Option::is_none") )]
97477	pub end_invstr_flg: Option<String>,
97478	#[cfg_attr( feature = "derive_serde", serde(rename = "PricgSchme", skip_serializing_if = "Option::is_none") )]
97479	pub pricg_schme: Option<String>,
97480}
97481
97482impl SystemSecuritiesAccount5 {
97483	pub fn validate(&self) -> Result<(), ValidationError> {
97484		if let Some(ref val) = self.end_invstr_flg {
97485			let pattern = Regex::new("[a-zA-Z0-9]{4}").unwrap();
97486			if !pattern.is_match(val) {
97487				return Err(ValidationError::new(1005, "end_invstr_flg does not match the required pattern".to_string()));
97488			}
97489		}
97490		if let Some(ref val) = self.pricg_schme {
97491			let pattern = Regex::new("[a-zA-Z0-9]{4}").unwrap();
97492			if !pattern.is_match(val) {
97493				return Err(ValidationError::new(1005, "pricg_schme does not match the required pattern".to_string()));
97494			}
97495		}
97496		Ok(())
97497	}
97498}
97499
97500
97501// SystemSecuritiesAccount6 ...
97502#[cfg_attr(feature = "derive_debug", derive(Debug))]
97503#[cfg_attr(feature = "derive_default", derive(Default))]
97504#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97505#[cfg_attr(feature = "derive_clone", derive(Clone))]
97506#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97507pub struct SystemSecuritiesAccount6 {
97508	#[cfg_attr( feature = "derive_serde", serde(rename = "OpngDt", skip_serializing_if = "Option::is_none") )]
97509	pub opng_dt: Option<String>,
97510	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
97511	pub clsg_dt: Option<String>,
97512	#[cfg_attr( feature = "derive_serde", serde(rename = "HldInd", skip_serializing_if = "Option::is_none") )]
97513	pub hld_ind: Option<bool>,
97514	#[cfg_attr( feature = "derive_serde", serde(rename = "NegPos", skip_serializing_if = "Option::is_none") )]
97515	pub neg_pos: Option<bool>,
97516	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
97517	pub tp: Option<SystemSecuritiesAccountType1Choice>,
97518	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr") )]
97519	pub acct_ownr: SystemPartyIdentification8,
97520	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyTp", skip_serializing_if = "Option::is_none") )]
97521	pub pty_tp: Option<SystemPartyType1Choice>,
97522	#[cfg_attr( feature = "derive_serde", serde(rename = "MktSpcfcAttr", skip_serializing_if = "Option::is_none") )]
97523	pub mkt_spcfc_attr: Option<Vec<MarketSpecificAttribute1>>,
97524	#[cfg_attr( feature = "derive_serde", serde(rename = "Rstrctn", skip_serializing_if = "Option::is_none") )]
97525	pub rstrctn: Option<Vec<SystemRestriction1>>,
97526	#[cfg_attr( feature = "derive_serde", serde(rename = "EndInvstrFlg", skip_serializing_if = "Option::is_none") )]
97527	pub end_invstr_flg: Option<String>,
97528	#[cfg_attr( feature = "derive_serde", serde(rename = "PricgSchme", skip_serializing_if = "Option::is_none") )]
97529	pub pricg_schme: Option<String>,
97530}
97531
97532impl SystemSecuritiesAccount6 {
97533	pub fn validate(&self) -> Result<(), ValidationError> {
97534		if let Some(ref val) = self.tp { val.validate()? }
97535		self.acct_ownr.validate()?;
97536		if let Some(ref val) = self.pty_tp { val.validate()? }
97537		if let Some(ref vec) = self.mkt_spcfc_attr { for item in vec { item.validate()? } }
97538		if let Some(ref vec) = self.rstrctn { for item in vec { item.validate()? } }
97539		if let Some(ref val) = self.end_invstr_flg {
97540			let pattern = Regex::new("[a-zA-Z0-9]{4}").unwrap();
97541			if !pattern.is_match(val) {
97542				return Err(ValidationError::new(1005, "end_invstr_flg does not match the required pattern".to_string()));
97543			}
97544		}
97545		if let Some(ref val) = self.pricg_schme {
97546			let pattern = Regex::new("[a-zA-Z0-9]{4}").unwrap();
97547			if !pattern.is_match(val) {
97548				return Err(ValidationError::new(1005, "pricg_schme does not match the required pattern".to_string()));
97549			}
97550		}
97551		Ok(())
97552	}
97553}
97554
97555
97556// SystemSecuritiesAccount7 ...
97557#[cfg_attr(feature = "derive_debug", derive(Debug))]
97558#[cfg_attr(feature = "derive_default", derive(Default))]
97559#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97560#[cfg_attr(feature = "derive_clone", derive(Clone))]
97561#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97562pub struct SystemSecuritiesAccount7 {
97563	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnr") )]
97564	pub acct_ownr: SystemPartyIdentification8,
97565	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
97566	pub id: String,
97567	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
97568	pub tp: SystemSecuritiesAccountType1Choice,
97569	#[cfg_attr( feature = "derive_serde", serde(rename = "OpngDt") )]
97570	pub opng_dt: String,
97571	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
97572	pub clsg_dt: Option<String>,
97573	#[cfg_attr( feature = "derive_serde", serde(rename = "HldInd") )]
97574	pub hld_ind: bool,
97575	#[cfg_attr( feature = "derive_serde", serde(rename = "NegPos") )]
97576	pub neg_pos: bool,
97577	#[cfg_attr( feature = "derive_serde", serde(rename = "MktSpcfcAttr", skip_serializing_if = "Option::is_none") )]
97578	pub mkt_spcfc_attr: Option<Vec<MarketSpecificAttribute1>>,
97579	#[cfg_attr( feature = "derive_serde", serde(rename = "Rstrctn", skip_serializing_if = "Option::is_none") )]
97580	pub rstrctn: Option<Vec<SystemRestriction1>>,
97581	#[cfg_attr( feature = "derive_serde", serde(rename = "EndInvstrFlg", skip_serializing_if = "Option::is_none") )]
97582	pub end_invstr_flg: Option<String>,
97583	#[cfg_attr( feature = "derive_serde", serde(rename = "PricgSchme", skip_serializing_if = "Option::is_none") )]
97584	pub pricg_schme: Option<String>,
97585}
97586
97587impl SystemSecuritiesAccount7 {
97588	pub fn validate(&self) -> Result<(), ValidationError> {
97589		self.acct_ownr.validate()?;
97590		if self.id.chars().count() < 1 {
97591			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
97592		}
97593		if self.id.chars().count() > 35 {
97594			return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
97595		}
97596		self.tp.validate()?;
97597		if let Some(ref vec) = self.mkt_spcfc_attr { for item in vec { item.validate()? } }
97598		if let Some(ref vec) = self.rstrctn { for item in vec { item.validate()? } }
97599		if let Some(ref val) = self.end_invstr_flg {
97600			let pattern = Regex::new("[a-zA-Z0-9]{4}").unwrap();
97601			if !pattern.is_match(val) {
97602				return Err(ValidationError::new(1005, "end_invstr_flg does not match the required pattern".to_string()));
97603			}
97604		}
97605		if let Some(ref val) = self.pricg_schme {
97606			let pattern = Regex::new("[a-zA-Z0-9]{4}").unwrap();
97607			if !pattern.is_match(val) {
97608				return Err(ValidationError::new(1005, "pricg_schme does not match the required pattern".to_string()));
97609			}
97610		}
97611		Ok(())
97612	}
97613}
97614
97615
97616// SystemSecuritiesAccountType1Choice ...
97617#[cfg_attr(feature = "derive_debug", derive(Debug))]
97618#[cfg_attr(feature = "derive_default", derive(Default))]
97619#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97620#[cfg_attr(feature = "derive_clone", derive(Clone))]
97621#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97622pub struct SystemSecuritiesAccountType1Choice {
97623	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
97624	pub cd: Option<SystemSecuritiesAccountType1Code>,
97625	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
97626	pub prtry: Option<GenericIdentification30>,
97627}
97628
97629impl SystemSecuritiesAccountType1Choice {
97630	pub fn validate(&self) -> Result<(), ValidationError> {
97631		if let Some(ref val) = self.cd { val.validate()? }
97632		if let Some(ref val) = self.prtry { val.validate()? }
97633		Ok(())
97634	}
97635}
97636
97637
97638// SystemSecuritiesAccountType1Code ...
97639#[cfg_attr(feature = "derive_debug", derive(Debug))]
97640#[cfg_attr(feature = "derive_default", derive(Default))]
97641#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97642#[cfg_attr(feature = "derive_clone", derive(Clone))]
97643#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97644pub enum SystemSecuritiesAccountType1Code {
97645	#[cfg_attr(feature = "derive_default", default)]
97646	#[cfg_attr( feature = "derive_serde", serde(rename = "CSDP") )]
97647	CodeCSDP,
97648	#[cfg_attr( feature = "derive_serde", serde(rename = "CSDM") )]
97649	CodeCSDM,
97650	#[cfg_attr( feature = "derive_serde", serde(rename = "ICSA") )]
97651	CodeICSA,
97652	#[cfg_attr( feature = "derive_serde", serde(rename = "TOFF") )]
97653	CodeTOFF,
97654	#[cfg_attr( feature = "derive_serde", serde(rename = "CSDO") )]
97655	CodeCSDO,
97656	#[cfg_attr( feature = "derive_serde", serde(rename = "ISSA") )]
97657	CodeISSA,
97658}
97659
97660impl SystemSecuritiesAccountType1Code {
97661	pub fn validate(&self) -> Result<(), ValidationError> {
97662		Ok(())
97663	}
97664}
97665
97666
97667// SystemStatus2Choice ...
97668#[cfg_attr(feature = "derive_debug", derive(Debug))]
97669#[cfg_attr(feature = "derive_default", derive(Default))]
97670#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97671#[cfg_attr(feature = "derive_clone", derive(Clone))]
97672#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97673pub struct SystemStatus2Choice {
97674	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
97675	pub cd: Option<SystemStatus2Code>,
97676	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
97677	pub prtry: Option<GenericIdentification1>,
97678}
97679
97680impl SystemStatus2Choice {
97681	pub fn validate(&self) -> Result<(), ValidationError> {
97682		if let Some(ref val) = self.cd { val.validate()? }
97683		if let Some(ref val) = self.prtry { val.validate()? }
97684		Ok(())
97685	}
97686}
97687
97688
97689// SystemStatus2Code ...
97690#[cfg_attr(feature = "derive_debug", derive(Debug))]
97691#[cfg_attr(feature = "derive_default", derive(Default))]
97692#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97693#[cfg_attr(feature = "derive_clone", derive(Clone))]
97694#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97695pub enum SystemStatus2Code {
97696	#[cfg_attr(feature = "derive_default", default)]
97697	#[cfg_attr( feature = "derive_serde", serde(rename = "SUSP") )]
97698	CodeSUSP,
97699	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTV") )]
97700	CodeACTV,
97701	#[cfg_attr( feature = "derive_serde", serde(rename = "CLSD") )]
97702	CodeCLSD,
97703	#[cfg_attr( feature = "derive_serde", serde(rename = "CLSG") )]
97704	CodeCLSG,
97705}
97706
97707impl SystemStatus2Code {
97708	pub fn validate(&self) -> Result<(), ValidationError> {
97709		Ok(())
97710	}
97711}
97712
97713
97714// SystemStatus3 ...
97715#[cfg_attr(feature = "derive_debug", derive(Debug))]
97716#[cfg_attr(feature = "derive_default", derive(Default))]
97717#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97718#[cfg_attr(feature = "derive_clone", derive(Clone))]
97719#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97720pub struct SystemStatus3 {
97721	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
97722	pub sts: SystemStatus2Choice,
97723	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtyTm", skip_serializing_if = "Option::is_none") )]
97724	pub vldty_tm: Option<DateTimePeriod1Choice>,
97725}
97726
97727impl SystemStatus3 {
97728	pub fn validate(&self) -> Result<(), ValidationError> {
97729		self.sts.validate()?;
97730		if let Some(ref val) = self.vldty_tm { val.validate()? }
97731		Ok(())
97732	}
97733}
97734
97735
97736// SystemStatus3Choice ...
97737#[cfg_attr(feature = "derive_debug", derive(Debug))]
97738#[cfg_attr(feature = "derive_default", derive(Default))]
97739#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97740#[cfg_attr(feature = "derive_clone", derive(Clone))]
97741#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97742pub struct SystemStatus3Choice {
97743	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
97744	pub cd: Option<SystemStatus3Code>,
97745	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
97746	pub prtry: Option<GenericIdentification1>,
97747}
97748
97749impl SystemStatus3Choice {
97750	pub fn validate(&self) -> Result<(), ValidationError> {
97751		if let Some(ref val) = self.cd { val.validate()? }
97752		if let Some(ref val) = self.prtry { val.validate()? }
97753		Ok(())
97754	}
97755}
97756
97757
97758// SystemStatus3Code ...
97759#[cfg_attr(feature = "derive_debug", derive(Debug))]
97760#[cfg_attr(feature = "derive_default", derive(Default))]
97761#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97762#[cfg_attr(feature = "derive_clone", derive(Clone))]
97763#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97764pub enum SystemStatus3Code {
97765	#[cfg_attr(feature = "derive_default", default)]
97766	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTV") )]
97767	CodeACTV,
97768	#[cfg_attr( feature = "derive_serde", serde(rename = "CLSD") )]
97769	CodeCLSD,
97770	#[cfg_attr( feature = "derive_serde", serde(rename = "RMPS") )]
97771	CodeRMPS,
97772}
97773
97774impl SystemStatus3Code {
97775	pub fn validate(&self) -> Result<(), ValidationError> {
97776		Ok(())
97777	}
97778}
97779
97780
97781// TEFRARules1Code ...
97782#[cfg_attr(feature = "derive_debug", derive(Debug))]
97783#[cfg_attr(feature = "derive_default", derive(Default))]
97784#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97785#[cfg_attr(feature = "derive_clone", derive(Clone))]
97786#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97787pub enum TEFRARules1Code {
97788	#[cfg_attr(feature = "derive_default", default)]
97789	#[cfg_attr( feature = "derive_serde", serde(rename = "RULC") )]
97790	CodeRULC,
97791	#[cfg_attr( feature = "derive_serde", serde(rename = "RULD") )]
97792	CodeRULD,
97793}
97794
97795impl TEFRARules1Code {
97796	pub fn validate(&self) -> Result<(), ValidationError> {
97797		Ok(())
97798	}
97799}
97800
97801
97802// TEFRARules3Choice ...
97803#[cfg_attr(feature = "derive_debug", derive(Debug))]
97804#[cfg_attr(feature = "derive_default", derive(Default))]
97805#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97806#[cfg_attr(feature = "derive_clone", derive(Clone))]
97807#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97808pub struct TEFRARules3Choice {
97809	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
97810	pub cd: Option<TEFRARules1Code>,
97811	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
97812	pub prtry: Option<GenericIdentification30>,
97813}
97814
97815impl TEFRARules3Choice {
97816	pub fn validate(&self) -> Result<(), ValidationError> {
97817		if let Some(ref val) = self.cd { val.validate()? }
97818		if let Some(ref val) = self.prtry { val.validate()? }
97819		Ok(())
97820	}
97821}
97822
97823
97824// TargetMarket1Choice ...
97825#[cfg_attr(feature = "derive_debug", derive(Debug))]
97826#[cfg_attr(feature = "derive_default", derive(Default))]
97827#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97828#[cfg_attr(feature = "derive_clone", derive(Clone))]
97829#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97830pub struct TargetMarket1Choice {
97831	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
97832	pub cd: Option<TargetMarket1Code>,
97833	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
97834	pub prtry: Option<GenericIdentification47>,
97835}
97836
97837impl TargetMarket1Choice {
97838	pub fn validate(&self) -> Result<(), ValidationError> {
97839		if let Some(ref val) = self.cd { val.validate()? }
97840		if let Some(ref val) = self.prtry { val.validate()? }
97841		Ok(())
97842	}
97843}
97844
97845
97846// TargetMarket1Code ...
97847#[cfg_attr(feature = "derive_debug", derive(Debug))]
97848#[cfg_attr(feature = "derive_default", derive(Default))]
97849#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97850#[cfg_attr(feature = "derive_clone", derive(Clone))]
97851#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97852pub enum TargetMarket1Code {
97853	#[cfg_attr(feature = "derive_default", default)]
97854	#[cfg_attr( feature = "derive_serde", serde(rename = "YSCO") )]
97855	CodeYSCO,
97856	#[cfg_attr( feature = "derive_serde", serde(rename = "NEUT") )]
97857	CodeNEUT,
97858	#[cfg_attr( feature = "derive_serde", serde(rename = "NSCO") )]
97859	CodeNSCO,
97860}
97861
97862impl TargetMarket1Code {
97863	pub fn validate(&self) -> Result<(), ValidationError> {
97864		Ok(())
97865	}
97866}
97867
97868
97869// TargetMarket2Code ...
97870#[cfg_attr(feature = "derive_debug", derive(Debug))]
97871#[cfg_attr(feature = "derive_default", derive(Default))]
97872#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97873#[cfg_attr(feature = "derive_clone", derive(Clone))]
97874#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97875pub enum TargetMarket2Code {
97876	#[cfg_attr(feature = "derive_default", default)]
97877	#[cfg_attr( feature = "derive_serde", serde(rename = "NEUT") )]
97878	CodeNEUT,
97879	#[cfg_attr( feature = "derive_serde", serde(rename = "YSCO") )]
97880	CodeYSCO,
97881}
97882
97883impl TargetMarket2Code {
97884	pub fn validate(&self) -> Result<(), ValidationError> {
97885		Ok(())
97886	}
97887}
97888
97889
97890// TargetMarket3Choice ...
97891#[cfg_attr(feature = "derive_debug", derive(Debug))]
97892#[cfg_attr(feature = "derive_default", derive(Default))]
97893#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97894#[cfg_attr(feature = "derive_clone", derive(Clone))]
97895#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97896pub struct TargetMarket3Choice {
97897	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
97898	pub tp: Option<InvestorType2Code>,
97899	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
97900	pub othr: Option<TargetMarket1Code>,
97901	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
97902	pub prtry: Option<GenericIdentification47>,
97903}
97904
97905impl TargetMarket3Choice {
97906	pub fn validate(&self) -> Result<(), ValidationError> {
97907		if let Some(ref val) = self.tp { val.validate()? }
97908		if let Some(ref val) = self.othr { val.validate()? }
97909		if let Some(ref val) = self.prtry { val.validate()? }
97910		Ok(())
97911	}
97912}
97913
97914
97915// TargetMarket3Code ...
97916#[cfg_attr(feature = "derive_debug", derive(Debug))]
97917#[cfg_attr(feature = "derive_default", derive(Default))]
97918#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97919#[cfg_attr(feature = "derive_clone", derive(Clone))]
97920#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97921pub enum TargetMarket3Code {
97922	#[cfg_attr(feature = "derive_default", default)]
97923	#[cfg_attr( feature = "derive_serde", serde(rename = "YSCO") )]
97924	CodeYSCO,
97925	#[cfg_attr( feature = "derive_serde", serde(rename = "NSCO") )]
97926	CodeNSCO,
97927}
97928
97929impl TargetMarket3Code {
97930	pub fn validate(&self) -> Result<(), ValidationError> {
97931		Ok(())
97932	}
97933}
97934
97935
97936// TargetMarket4 ...
97937#[cfg_attr(feature = "derive_debug", derive(Debug))]
97938#[cfg_attr(feature = "derive_default", derive(Default))]
97939#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97940#[cfg_attr(feature = "derive_clone", derive(Clone))]
97941#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97942pub struct TargetMarket4 {
97943	#[cfg_attr( feature = "derive_serde", serde(rename = "RefDt", skip_serializing_if = "Option::is_none") )]
97944	pub ref_dt: Option<String>,
97945	#[cfg_attr( feature = "derive_serde", serde(rename = "InvstrTp", skip_serializing_if = "Option::is_none") )]
97946	pub invstr_tp: Option<InvestorType2>,
97947	#[cfg_attr( feature = "derive_serde", serde(rename = "KnwldgAndOrExprnc", skip_serializing_if = "Option::is_none") )]
97948	pub knwldg_and_or_exprnc: Option<InvestorKnowledge1>,
97949	#[cfg_attr( feature = "derive_serde", serde(rename = "AbltyToBearLosses", skip_serializing_if = "Option::is_none") )]
97950	pub ablty_to_bear_losses: Option<LossBearing2>,
97951	#[cfg_attr( feature = "derive_serde", serde(rename = "RskTlrnce", skip_serializing_if = "Option::is_none") )]
97952	pub rsk_tlrnce: Option<RiskTolerance1>,
97953	#[cfg_attr( feature = "derive_serde", serde(rename = "ClntObjctvsAndNeeds", skip_serializing_if = "Option::is_none") )]
97954	pub clnt_objctvs_and_needs: Option<InvestorRequirements4>,
97955	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
97956	pub othr: Option<Vec<OtherTargetMarket1>>,
97957}
97958
97959impl TargetMarket4 {
97960	pub fn validate(&self) -> Result<(), ValidationError> {
97961		if let Some(ref val) = self.invstr_tp { val.validate()? }
97962		if let Some(ref val) = self.knwldg_and_or_exprnc { val.validate()? }
97963		if let Some(ref val) = self.ablty_to_bear_losses { val.validate()? }
97964		if let Some(ref val) = self.rsk_tlrnce { val.validate()? }
97965		if let Some(ref val) = self.clnt_objctvs_and_needs { val.validate()? }
97966		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
97967		Ok(())
97968	}
97969}
97970
97971
97972// TargetMarket5Choice ...
97973#[cfg_attr(feature = "derive_debug", derive(Debug))]
97974#[cfg_attr(feature = "derive_default", derive(Default))]
97975#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97976#[cfg_attr(feature = "derive_clone", derive(Clone))]
97977#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
97978pub struct TargetMarket5Choice {
97979	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
97980	pub tp: Option<InvestorType4Code>,
97981	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
97982	pub othr: Option<TargetMarket1Code>,
97983}
97984
97985impl TargetMarket5Choice {
97986	pub fn validate(&self) -> Result<(), ValidationError> {
97987		if let Some(ref val) = self.tp { val.validate()? }
97988		if let Some(ref val) = self.othr { val.validate()? }
97989		Ok(())
97990	}
97991}
97992
97993
97994// Tax17 ...
97995#[cfg_attr(feature = "derive_debug", derive(Debug))]
97996#[cfg_attr(feature = "derive_default", derive(Default))]
97997#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
97998#[cfg_attr(feature = "derive_clone", derive(Clone))]
97999#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98000pub struct Tax17 {
98001	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
98002	pub tp: Option<TaxType12Code>,
98003	#[cfg_attr( feature = "derive_serde", serde(rename = "XtndedTp", skip_serializing_if = "Option::is_none") )]
98004	pub xtnded_tp: Option<String>,
98005	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
98006	pub amt: Option<Vec<ActiveOrHistoricCurrencyAnd13DecimalAmount>>,
98007	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
98008	pub rate: Option<f64>,
98009	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctry") )]
98010	pub ctry: String,
98011	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxClctnDtls", skip_serializing_if = "Option::is_none") )]
98012	pub tax_clctn_dtls: Option<TaxCalculationInformation4>,
98013}
98014
98015impl Tax17 {
98016	pub fn validate(&self) -> Result<(), ValidationError> {
98017		if let Some(ref val) = self.tp { val.validate()? }
98018		if let Some(ref val) = self.xtnded_tp {
98019			if val.chars().count() < 1 {
98020				return Err(ValidationError::new(1001, "xtnded_tp is shorter than the minimum length of 1".to_string()));
98021			}
98022			if val.chars().count() > 350 {
98023				return Err(ValidationError::new(1002, "xtnded_tp exceeds the maximum length of 350".to_string()));
98024			}
98025		}
98026		if let Some(ref vec) = self.amt { for item in vec { item.validate()? } }
98027		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
98028		if !pattern.is_match(&self.ctry) {
98029			return Err(ValidationError::new(1005, "ctry does not match the required pattern".to_string()));
98030		}
98031		if let Some(ref val) = self.tax_clctn_dtls { val.validate()? }
98032		Ok(())
98033	}
98034}
98035
98036
98037// TaxAmount2 ...
98038#[cfg_attr(feature = "derive_debug", derive(Debug))]
98039#[cfg_attr(feature = "derive_default", derive(Default))]
98040#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98041#[cfg_attr(feature = "derive_clone", derive(Clone))]
98042#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98043pub struct TaxAmount2 {
98044	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
98045	pub rate: Option<f64>,
98046	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxblBaseAmt", skip_serializing_if = "Option::is_none") )]
98047	pub taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
98048	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlAmt", skip_serializing_if = "Option::is_none") )]
98049	pub ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
98050	#[cfg_attr( feature = "derive_serde", serde(rename = "Dtls", skip_serializing_if = "Option::is_none") )]
98051	pub dtls: Option<Vec<TaxRecordDetails2>>,
98052}
98053
98054impl TaxAmount2 {
98055	pub fn validate(&self) -> Result<(), ValidationError> {
98056		if let Some(ref val) = self.taxbl_base_amt { val.validate()? }
98057		if let Some(ref val) = self.ttl_amt { val.validate()? }
98058		if let Some(ref vec) = self.dtls { for item in vec { item.validate()? } }
98059		Ok(())
98060	}
98061}
98062
98063
98064// TaxAmount3 ...
98065#[cfg_attr(feature = "derive_debug", derive(Debug))]
98066#[cfg_attr(feature = "derive_default", derive(Default))]
98067#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98068#[cfg_attr(feature = "derive_clone", derive(Clone))]
98069#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98070pub struct TaxAmount3 {
98071	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
98072	pub rate: Option<f64>,
98073	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxblBaseAmt", skip_serializing_if = "Option::is_none") )]
98074	pub taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
98075	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlAmt", skip_serializing_if = "Option::is_none") )]
98076	pub ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
98077	#[cfg_attr( feature = "derive_serde", serde(rename = "Dtls", skip_serializing_if = "Option::is_none") )]
98078	pub dtls: Option<Vec<TaxRecordDetails3>>,
98079}
98080
98081impl TaxAmount3 {
98082	pub fn validate(&self) -> Result<(), ValidationError> {
98083		if let Some(ref val) = self.taxbl_base_amt { val.validate()? }
98084		if let Some(ref val) = self.ttl_amt { val.validate()? }
98085		if let Some(ref vec) = self.dtls { for item in vec { item.validate()? } }
98086		Ok(())
98087	}
98088}
98089
98090
98091// TaxAmountAndType1 ...
98092#[cfg_attr(feature = "derive_debug", derive(Debug))]
98093#[cfg_attr(feature = "derive_default", derive(Default))]
98094#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98095#[cfg_attr(feature = "derive_clone", derive(Clone))]
98096#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98097pub struct TaxAmountAndType1 {
98098	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
98099	pub tp: Option<TaxAmountType1Choice>,
98100	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
98101	pub amt: ActiveOrHistoricCurrencyAndAmount,
98102}
98103
98104impl TaxAmountAndType1 {
98105	pub fn validate(&self) -> Result<(), ValidationError> {
98106		if let Some(ref val) = self.tp { val.validate()? }
98107		self.amt.validate()?;
98108		Ok(())
98109	}
98110}
98111
98112
98113// TaxAmountType1Choice ...
98114#[cfg_attr(feature = "derive_debug", derive(Debug))]
98115#[cfg_attr(feature = "derive_default", derive(Default))]
98116#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98117#[cfg_attr(feature = "derive_clone", derive(Clone))]
98118#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98119pub struct TaxAmountType1Choice {
98120	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
98121	pub cd: Option<String>,
98122	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
98123	pub prtry: Option<String>,
98124}
98125
98126impl TaxAmountType1Choice {
98127	pub fn validate(&self) -> Result<(), ValidationError> {
98128		if let Some(ref val) = self.cd {
98129			if val.chars().count() < 1 {
98130				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
98131			}
98132			if val.chars().count() > 4 {
98133				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
98134			}
98135		}
98136		if let Some(ref val) = self.prtry {
98137			if val.chars().count() < 1 {
98138				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
98139			}
98140			if val.chars().count() > 35 {
98141				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
98142			}
98143		}
98144		Ok(())
98145	}
98146}
98147
98148
98149// TaxAuthorisation1 ...
98150#[cfg_attr(feature = "derive_debug", derive(Debug))]
98151#[cfg_attr(feature = "derive_default", derive(Default))]
98152#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98153#[cfg_attr(feature = "derive_clone", derive(Clone))]
98154#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98155pub struct TaxAuthorisation1 {
98156	#[cfg_attr( feature = "derive_serde", serde(rename = "Titl", skip_serializing_if = "Option::is_none") )]
98157	pub titl: Option<String>,
98158	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
98159	pub nm: Option<String>,
98160}
98161
98162impl TaxAuthorisation1 {
98163	pub fn validate(&self) -> Result<(), ValidationError> {
98164		if let Some(ref val) = self.titl {
98165			if val.chars().count() < 1 {
98166				return Err(ValidationError::new(1001, "titl is shorter than the minimum length of 1".to_string()));
98167			}
98168			if val.chars().count() > 35 {
98169				return Err(ValidationError::new(1002, "titl exceeds the maximum length of 35".to_string()));
98170			}
98171		}
98172		if let Some(ref val) = self.nm {
98173			if val.chars().count() < 1 {
98174				return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
98175			}
98176			if val.chars().count() > 140 {
98177				return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
98178			}
98179		}
98180		Ok(())
98181	}
98182}
98183
98184
98185// TaxCalculation1 ...
98186#[cfg_attr(feature = "derive_debug", derive(Debug))]
98187#[cfg_attr(feature = "derive_default", derive(Default))]
98188#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98189#[cfg_attr(feature = "derive_clone", derive(Clone))]
98190#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98191pub struct TaxCalculation1 {
98192	#[cfg_attr( feature = "derive_serde", serde(rename = "HstCcy") )]
98193	pub hst_ccy: String,
98194	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxblSvcChrgConvs") )]
98195	pub taxbl_svc_chrg_convs: Vec<BillingServicesAmount3>,
98196	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlTaxblSvcChrgHstAmt") )]
98197	pub ttl_taxbl_svc_chrg_hst_amt: AmountAndDirection34,
98198	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxId") )]
98199	pub tax_id: Vec<BillingServicesTax3>,
98200	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlTax") )]
98201	pub ttl_tax: AmountAndDirection34,
98202}
98203
98204impl TaxCalculation1 {
98205	pub fn validate(&self) -> Result<(), ValidationError> {
98206		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
98207		if !pattern.is_match(&self.hst_ccy) {
98208			return Err(ValidationError::new(1005, "hst_ccy does not match the required pattern".to_string()));
98209		}
98210		for item in &self.taxbl_svc_chrg_convs { item.validate()? }
98211		self.ttl_taxbl_svc_chrg_hst_amt.validate()?;
98212		for item in &self.tax_id { item.validate()? }
98213		self.ttl_tax.validate()?;
98214		Ok(())
98215	}
98216}
98217
98218
98219// TaxCalculationInformation4 ...
98220#[cfg_attr(feature = "derive_debug", derive(Debug))]
98221#[cfg_attr(feature = "derive_default", derive(Default))]
98222#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98223#[cfg_attr(feature = "derive_clone", derive(Clone))]
98224#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98225pub struct TaxCalculationInformation4 {
98226	#[cfg_attr( feature = "derive_serde", serde(rename = "EUCptlGn", skip_serializing_if = "Option::is_none") )]
98227	pub eu_cptl_gn: Option<EUCapitalGain2Code>,
98228	#[cfg_attr( feature = "derive_serde", serde(rename = "XtndedEUCptlGn", skip_serializing_if = "Option::is_none") )]
98229	pub xtnded_eu_cptl_gn: Option<String>,
98230	#[cfg_attr( feature = "derive_serde", serde(rename = "PctgOfDebtClm", skip_serializing_if = "Option::is_none") )]
98231	pub pctg_of_debt_clm: Option<f64>,
98232	#[cfg_attr( feature = "derive_serde", serde(rename = "PctgGrdfthdDebt", skip_serializing_if = "Option::is_none") )]
98233	pub pctg_grdfthd_debt: Option<f64>,
98234	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxblIncmPerDvdd", skip_serializing_if = "Option::is_none") )]
98235	pub taxbl_incm_per_dvdd: Option<ActiveOrHistoricCurrencyAnd13DecimalAmount>,
98236	#[cfg_attr( feature = "derive_serde", serde(rename = "EUDvddSts", skip_serializing_if = "Option::is_none") )]
98237	pub eu_dvdd_sts: Option<EUDividendStatus1Code>,
98238	#[cfg_attr( feature = "derive_serde", serde(rename = "XtndedEUDvddSts", skip_serializing_if = "Option::is_none") )]
98239	pub xtnded_eu_dvdd_sts: Option<String>,
98240}
98241
98242impl TaxCalculationInformation4 {
98243	pub fn validate(&self) -> Result<(), ValidationError> {
98244		if let Some(ref val) = self.eu_cptl_gn { val.validate()? }
98245		if let Some(ref val) = self.xtnded_eu_cptl_gn {
98246			if val.chars().count() < 1 {
98247				return Err(ValidationError::new(1001, "xtnded_eu_cptl_gn is shorter than the minimum length of 1".to_string()));
98248			}
98249			if val.chars().count() > 350 {
98250				return Err(ValidationError::new(1002, "xtnded_eu_cptl_gn exceeds the maximum length of 350".to_string()));
98251			}
98252		}
98253		if let Some(ref val) = self.taxbl_incm_per_dvdd { val.validate()? }
98254		if let Some(ref val) = self.eu_dvdd_sts { val.validate()? }
98255		if let Some(ref val) = self.xtnded_eu_dvdd_sts {
98256			if val.chars().count() < 1 {
98257				return Err(ValidationError::new(1001, "xtnded_eu_dvdd_sts is shorter than the minimum length of 1".to_string()));
98258			}
98259			if val.chars().count() > 350 {
98260				return Err(ValidationError::new(1002, "xtnded_eu_dvdd_sts exceeds the maximum length of 350".to_string()));
98261			}
98262		}
98263		Ok(())
98264	}
98265}
98266
98267
98268// TaxCharges2 ...
98269#[cfg_attr(feature = "derive_debug", derive(Debug))]
98270#[cfg_attr(feature = "derive_default", derive(Default))]
98271#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98272#[cfg_attr(feature = "derive_clone", derive(Clone))]
98273#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98274pub struct TaxCharges2 {
98275	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
98276	pub id: Option<String>,
98277	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate", skip_serializing_if = "Option::is_none") )]
98278	pub rate: Option<f64>,
98279	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
98280	pub amt: Option<ActiveOrHistoricCurrencyAndAmount>,
98281}
98282
98283impl TaxCharges2 {
98284	pub fn validate(&self) -> Result<(), ValidationError> {
98285		if let Some(ref val) = self.id {
98286			if val.chars().count() < 1 {
98287				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
98288			}
98289			if val.chars().count() > 35 {
98290				return Err(ValidationError::new(1002, "id exceeds the maximum length of 35".to_string()));
98291			}
98292		}
98293		if let Some(ref val) = self.amt { val.validate()? }
98294		Ok(())
98295	}
98296}
98297
98298
98299// TaxData1 ...
98300#[cfg_attr(feature = "derive_debug", derive(Debug))]
98301#[cfg_attr(feature = "derive_default", derive(Default))]
98302#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98303#[cfg_attr(feature = "derive_clone", derive(Clone))]
98304#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98305pub struct TaxData1 {
98306	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
98307	pub cdtr: Option<TaxParty1>,
98308	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
98309	pub dbtr: Option<TaxParty2>,
98310	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
98311	pub ultmt_dbtr: Option<TaxParty2>,
98312	#[cfg_attr( feature = "derive_serde", serde(rename = "AdmstnZone", skip_serializing_if = "Option::is_none") )]
98313	pub admstn_zone: Option<String>,
98314	#[cfg_attr( feature = "derive_serde", serde(rename = "RefNb", skip_serializing_if = "Option::is_none") )]
98315	pub ref_nb: Option<String>,
98316	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtd", skip_serializing_if = "Option::is_none") )]
98317	pub mtd: Option<String>,
98318	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlTaxblBaseAmt", skip_serializing_if = "Option::is_none") )]
98319	pub ttl_taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
98320	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlTaxAmt", skip_serializing_if = "Option::is_none") )]
98321	pub ttl_tax_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
98322	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
98323	pub dt: Option<String>,
98324	#[cfg_attr( feature = "derive_serde", serde(rename = "SeqNb", skip_serializing_if = "Option::is_none") )]
98325	pub seq_nb: Option<f64>,
98326	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcrd", skip_serializing_if = "Option::is_none") )]
98327	pub rcrd: Option<Vec<TaxRecord3>>,
98328}
98329
98330impl TaxData1 {
98331	pub fn validate(&self) -> Result<(), ValidationError> {
98332		if let Some(ref val) = self.cdtr { val.validate()? }
98333		if let Some(ref val) = self.dbtr { val.validate()? }
98334		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
98335		if let Some(ref val) = self.admstn_zone {
98336			if val.chars().count() < 1 {
98337				return Err(ValidationError::new(1001, "admstn_zone is shorter than the minimum length of 1".to_string()));
98338			}
98339			if val.chars().count() > 35 {
98340				return Err(ValidationError::new(1002, "admstn_zone exceeds the maximum length of 35".to_string()));
98341			}
98342		}
98343		if let Some(ref val) = self.ref_nb {
98344			if val.chars().count() < 1 {
98345				return Err(ValidationError::new(1001, "ref_nb is shorter than the minimum length of 1".to_string()));
98346			}
98347			if val.chars().count() > 140 {
98348				return Err(ValidationError::new(1002, "ref_nb exceeds the maximum length of 140".to_string()));
98349			}
98350		}
98351		if let Some(ref val) = self.mtd {
98352			if val.chars().count() < 1 {
98353				return Err(ValidationError::new(1001, "mtd is shorter than the minimum length of 1".to_string()));
98354			}
98355			if val.chars().count() > 35 {
98356				return Err(ValidationError::new(1002, "mtd exceeds the maximum length of 35".to_string()));
98357			}
98358		}
98359		if let Some(ref val) = self.ttl_taxbl_base_amt { val.validate()? }
98360		if let Some(ref val) = self.ttl_tax_amt { val.validate()? }
98361		if let Some(ref vec) = self.rcrd { for item in vec { item.validate()? } }
98362		Ok(())
98363	}
98364}
98365
98366
98367// TaxExemptReason1Code ...
98368#[cfg_attr(feature = "derive_debug", derive(Debug))]
98369#[cfg_attr(feature = "derive_default", derive(Default))]
98370#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98371#[cfg_attr(feature = "derive_clone", derive(Clone))]
98372#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98373pub enum TaxExemptReason1Code {
98374	#[cfg_attr(feature = "derive_default", default)]
98375	#[cfg_attr( feature = "derive_serde", serde(rename = "NONE") )]
98376	CodeNONE,
98377	#[cfg_attr( feature = "derive_serde", serde(rename = "MASA") )]
98378	CodeMASA,
98379	#[cfg_attr( feature = "derive_serde", serde(rename = "MISA") )]
98380	CodeMISA,
98381	#[cfg_attr( feature = "derive_serde", serde(rename = "SISA") )]
98382	CodeSISA,
98383	#[cfg_attr( feature = "derive_serde", serde(rename = "IISA") )]
98384	CodeIISA,
98385	#[cfg_attr( feature = "derive_serde", serde(rename = "CUYP") )]
98386	CodeCUYP,
98387	#[cfg_attr( feature = "derive_serde", serde(rename = "PRYP") )]
98388	CodePRYP,
98389	#[cfg_attr( feature = "derive_serde", serde(rename = "ASTR") )]
98390	CodeASTR,
98391	#[cfg_attr( feature = "derive_serde", serde(rename = "EMPY") )]
98392	CodeEMPY,
98393	#[cfg_attr( feature = "derive_serde", serde(rename = "EMCY") )]
98394	CodeEMCY,
98395	#[cfg_attr( feature = "derive_serde", serde(rename = "EPRY") )]
98396	CodeEPRY,
98397	#[cfg_attr( feature = "derive_serde", serde(rename = "ECYE") )]
98398	CodeECYE,
98399	#[cfg_attr( feature = "derive_serde", serde(rename = "NFPI") )]
98400	CodeNFPI,
98401	#[cfg_attr( feature = "derive_serde", serde(rename = "NFQP") )]
98402	CodeNFQP,
98403	#[cfg_attr( feature = "derive_serde", serde(rename = "DECP") )]
98404	CodeDECP,
98405	#[cfg_attr( feature = "derive_serde", serde(rename = "IRAC") )]
98406	CodeIRAC,
98407	#[cfg_attr( feature = "derive_serde", serde(rename = "IRAR") )]
98408	CodeIRAR,
98409	#[cfg_attr( feature = "derive_serde", serde(rename = "KEOG") )]
98410	CodeKEOG,
98411	#[cfg_attr( feature = "derive_serde", serde(rename = "PFSP") )]
98412	CodePFSP,
98413	#[cfg_attr( feature = "derive_serde", serde(rename = "401K") )]
98414	Code401K,
98415	#[cfg_attr( feature = "derive_serde", serde(rename = "SIRA") )]
98416	CodeSIRA,
98417	#[cfg_attr( feature = "derive_serde", serde(rename = "403B") )]
98418	Code403B,
98419	#[cfg_attr( feature = "derive_serde", serde(rename = "457X") )]
98420	Code457X,
98421	#[cfg_attr( feature = "derive_serde", serde(rename = "RIRA") )]
98422	CodeRIRA,
98423	#[cfg_attr( feature = "derive_serde", serde(rename = "RIAN") )]
98424	CodeRIAN,
98425	#[cfg_attr( feature = "derive_serde", serde(rename = "RCRF") )]
98426	CodeRCRF,
98427	#[cfg_attr( feature = "derive_serde", serde(rename = "RCIP") )]
98428	CodeRCIP,
98429	#[cfg_attr( feature = "derive_serde", serde(rename = "EIFP") )]
98430	CodeEIFP,
98431	#[cfg_attr( feature = "derive_serde", serde(rename = "EIOP") )]
98432	CodeEIOP,
98433}
98434
98435impl TaxExemptReason1Code {
98436	pub fn validate(&self) -> Result<(), ValidationError> {
98437		Ok(())
98438	}
98439}
98440
98441
98442// TaxExemptReason3Code ...
98443#[cfg_attr(feature = "derive_debug", derive(Debug))]
98444#[cfg_attr(feature = "derive_default", derive(Default))]
98445#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98446#[cfg_attr(feature = "derive_clone", derive(Clone))]
98447#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98448pub enum TaxExemptReason3Code {
98449	#[cfg_attr(feature = "derive_default", default)]
98450	#[cfg_attr( feature = "derive_serde", serde(rename = "NONE") )]
98451	CodeNONE,
98452	#[cfg_attr( feature = "derive_serde", serde(rename = "MASA") )]
98453	CodeMASA,
98454	#[cfg_attr( feature = "derive_serde", serde(rename = "MISA") )]
98455	CodeMISA,
98456	#[cfg_attr( feature = "derive_serde", serde(rename = "SISA") )]
98457	CodeSISA,
98458	#[cfg_attr( feature = "derive_serde", serde(rename = "IISA") )]
98459	CodeIISA,
98460	#[cfg_attr( feature = "derive_serde", serde(rename = "CUYP") )]
98461	CodeCUYP,
98462	#[cfg_attr( feature = "derive_serde", serde(rename = "PRYP") )]
98463	CodePRYP,
98464	#[cfg_attr( feature = "derive_serde", serde(rename = "ASTR") )]
98465	CodeASTR,
98466	#[cfg_attr( feature = "derive_serde", serde(rename = "EMPY") )]
98467	CodeEMPY,
98468	#[cfg_attr( feature = "derive_serde", serde(rename = "EMCY") )]
98469	CodeEMCY,
98470	#[cfg_attr( feature = "derive_serde", serde(rename = "EPRY") )]
98471	CodeEPRY,
98472	#[cfg_attr( feature = "derive_serde", serde(rename = "ECYE") )]
98473	CodeECYE,
98474	#[cfg_attr( feature = "derive_serde", serde(rename = "NFPI") )]
98475	CodeNFPI,
98476	#[cfg_attr( feature = "derive_serde", serde(rename = "NFQP") )]
98477	CodeNFQP,
98478	#[cfg_attr( feature = "derive_serde", serde(rename = "DECP") )]
98479	CodeDECP,
98480	#[cfg_attr( feature = "derive_serde", serde(rename = "IRAC") )]
98481	CodeIRAC,
98482	#[cfg_attr( feature = "derive_serde", serde(rename = "IRAR") )]
98483	CodeIRAR,
98484	#[cfg_attr( feature = "derive_serde", serde(rename = "KEOG") )]
98485	CodeKEOG,
98486	#[cfg_attr( feature = "derive_serde", serde(rename = "PFSP") )]
98487	CodePFSP,
98488	#[cfg_attr( feature = "derive_serde", serde(rename = "401K") )]
98489	Code401K,
98490	#[cfg_attr( feature = "derive_serde", serde(rename = "SIRA") )]
98491	CodeSIRA,
98492	#[cfg_attr( feature = "derive_serde", serde(rename = "403B") )]
98493	Code403B,
98494	#[cfg_attr( feature = "derive_serde", serde(rename = "457X") )]
98495	Code457X,
98496	#[cfg_attr( feature = "derive_serde", serde(rename = "RIRA") )]
98497	CodeRIRA,
98498	#[cfg_attr( feature = "derive_serde", serde(rename = "RIAN") )]
98499	CodeRIAN,
98500	#[cfg_attr( feature = "derive_serde", serde(rename = "RCRF") )]
98501	CodeRCRF,
98502	#[cfg_attr( feature = "derive_serde", serde(rename = "RCIP") )]
98503	CodeRCIP,
98504	#[cfg_attr( feature = "derive_serde", serde(rename = "EIFP") )]
98505	CodeEIFP,
98506	#[cfg_attr( feature = "derive_serde", serde(rename = "EIOP") )]
98507	CodeEIOP,
98508	#[cfg_attr( feature = "derive_serde", serde(rename = "FORE") )]
98509	CodeFORE,
98510	#[cfg_attr( feature = "derive_serde", serde(rename = "INCA") )]
98511	CodeINCA,
98512	#[cfg_attr( feature = "derive_serde", serde(rename = "MINO") )]
98513	CodeMINO,
98514	#[cfg_attr( feature = "derive_serde", serde(rename = "ASSO") )]
98515	CodeASSO,
98516	#[cfg_attr( feature = "derive_serde", serde(rename = "DIPL") )]
98517	CodeDIPL,
98518	#[cfg_attr( feature = "derive_serde", serde(rename = "DOME") )]
98519	CodeDOME,
98520	#[cfg_attr( feature = "derive_serde", serde(rename = "FORP") )]
98521	CodeFORP,
98522	#[cfg_attr( feature = "derive_serde", serde(rename = "ORDR") )]
98523	CodeORDR,
98524	#[cfg_attr( feature = "derive_serde", serde(rename = "PENF") )]
98525	CodePENF,
98526	#[cfg_attr( feature = "derive_serde", serde(rename = "REFU") )]
98527	CodeREFU,
98528	#[cfg_attr( feature = "derive_serde", serde(rename = "RIHO") )]
98529	CodeRIHO,
98530	#[cfg_attr( feature = "derive_serde", serde(rename = "ADMI") )]
98531	CodeADMI,
98532	#[cfg_attr( feature = "derive_serde", serde(rename = "TANR") )]
98533	CodeTANR,
98534	#[cfg_attr( feature = "derive_serde", serde(rename = "OANR") )]
98535	CodeOANR,
98536}
98537
98538impl TaxExemptReason3Code {
98539	pub fn validate(&self) -> Result<(), ValidationError> {
98540		Ok(())
98541	}
98542}
98543
98544
98545// TaxExemptionReason2Choice ...
98546#[cfg_attr(feature = "derive_debug", derive(Debug))]
98547#[cfg_attr(feature = "derive_default", derive(Default))]
98548#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98549#[cfg_attr(feature = "derive_clone", derive(Clone))]
98550#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98551pub struct TaxExemptionReason2Choice {
98552	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
98553	pub cd: Option<TaxExemptReason3Code>,
98554	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
98555	pub prtry: Option<GenericIdentification47>,
98556}
98557
98558impl TaxExemptionReason2Choice {
98559	pub fn validate(&self) -> Result<(), ValidationError> {
98560		if let Some(ref val) = self.cd { val.validate()? }
98561		if let Some(ref val) = self.prtry { val.validate()? }
98562		Ok(())
98563	}
98564}
98565
98566
98567// TaxExemptionReasonFormat1Choice ...
98568#[cfg_attr(feature = "derive_debug", derive(Debug))]
98569#[cfg_attr(feature = "derive_default", derive(Default))]
98570#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98571#[cfg_attr(feature = "derive_clone", derive(Clone))]
98572#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98573pub struct TaxExemptionReasonFormat1Choice {
98574	#[cfg_attr( feature = "derive_serde", serde(rename = "Ustrd", skip_serializing_if = "Option::is_none") )]
98575	pub ustrd: Option<String>,
98576	#[cfg_attr( feature = "derive_serde", serde(rename = "Strd", skip_serializing_if = "Option::is_none") )]
98577	pub strd: Option<TaxExemptReason1Code>,
98578}
98579
98580impl TaxExemptionReasonFormat1Choice {
98581	pub fn validate(&self) -> Result<(), ValidationError> {
98582		if let Some(ref val) = self.ustrd {
98583			if val.chars().count() < 1 {
98584				return Err(ValidationError::new(1001, "ustrd is shorter than the minimum length of 1".to_string()));
98585			}
98586			if val.chars().count() > 140 {
98587				return Err(ValidationError::new(1002, "ustrd exceeds the maximum length of 140".to_string()));
98588			}
98589		}
98590		if let Some(ref val) = self.strd { val.validate()? }
98591		Ok(())
98592	}
98593}
98594
98595
98596// TaxInformation7 ...
98597#[cfg_attr(feature = "derive_debug", derive(Debug))]
98598#[cfg_attr(feature = "derive_default", derive(Default))]
98599#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98600#[cfg_attr(feature = "derive_clone", derive(Clone))]
98601#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98602pub struct TaxInformation7 {
98603	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
98604	pub cdtr: Option<TaxParty1>,
98605	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
98606	pub dbtr: Option<TaxParty2>,
98607	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
98608	pub ultmt_dbtr: Option<TaxParty2>,
98609	#[cfg_attr( feature = "derive_serde", serde(rename = "AdmstnZone", skip_serializing_if = "Option::is_none") )]
98610	pub admstn_zone: Option<String>,
98611	#[cfg_attr( feature = "derive_serde", serde(rename = "RefNb", skip_serializing_if = "Option::is_none") )]
98612	pub ref_nb: Option<String>,
98613	#[cfg_attr( feature = "derive_serde", serde(rename = "Mtd", skip_serializing_if = "Option::is_none") )]
98614	pub mtd: Option<String>,
98615	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlTaxblBaseAmt", skip_serializing_if = "Option::is_none") )]
98616	pub ttl_taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
98617	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlTaxAmt", skip_serializing_if = "Option::is_none") )]
98618	pub ttl_tax_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
98619	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
98620	pub dt: Option<String>,
98621	#[cfg_attr( feature = "derive_serde", serde(rename = "SeqNb", skip_serializing_if = "Option::is_none") )]
98622	pub seq_nb: Option<f64>,
98623	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcrd", skip_serializing_if = "Option::is_none") )]
98624	pub rcrd: Option<Vec<TaxRecord2>>,
98625}
98626
98627impl TaxInformation7 {
98628	pub fn validate(&self) -> Result<(), ValidationError> {
98629		if let Some(ref val) = self.cdtr { val.validate()? }
98630		if let Some(ref val) = self.dbtr { val.validate()? }
98631		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
98632		if let Some(ref val) = self.admstn_zone {
98633			if val.chars().count() < 1 {
98634				return Err(ValidationError::new(1001, "admstn_zone is shorter than the minimum length of 1".to_string()));
98635			}
98636			if val.chars().count() > 35 {
98637				return Err(ValidationError::new(1002, "admstn_zone exceeds the maximum length of 35".to_string()));
98638			}
98639		}
98640		if let Some(ref val) = self.ref_nb {
98641			if val.chars().count() < 1 {
98642				return Err(ValidationError::new(1001, "ref_nb is shorter than the minimum length of 1".to_string()));
98643			}
98644			if val.chars().count() > 140 {
98645				return Err(ValidationError::new(1002, "ref_nb exceeds the maximum length of 140".to_string()));
98646			}
98647		}
98648		if let Some(ref val) = self.mtd {
98649			if val.chars().count() < 1 {
98650				return Err(ValidationError::new(1001, "mtd is shorter than the minimum length of 1".to_string()));
98651			}
98652			if val.chars().count() > 35 {
98653				return Err(ValidationError::new(1002, "mtd exceeds the maximum length of 35".to_string()));
98654			}
98655		}
98656		if let Some(ref val) = self.ttl_taxbl_base_amt { val.validate()? }
98657		if let Some(ref val) = self.ttl_tax_amt { val.validate()? }
98658		if let Some(ref vec) = self.rcrd { for item in vec { item.validate()? } }
98659		Ok(())
98660	}
98661}
98662
98663
98664// TaxOrganisationIdentification1 ...
98665#[cfg_attr(feature = "derive_debug", derive(Debug))]
98666#[cfg_attr(feature = "derive_default", derive(Default))]
98667#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98668#[cfg_attr(feature = "derive_clone", derive(Clone))]
98669#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98670pub struct TaxOrganisationIdentification1 {
98671	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm") )]
98672	pub nm: String,
98673	#[cfg_attr( feature = "derive_serde", serde(rename = "PstlAdr", skip_serializing_if = "Option::is_none") )]
98674	pub pstl_adr: Option<PostalAddress6>,
98675	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctDtls", skip_serializing_if = "Option::is_none") )]
98676	pub ctct_dtls: Option<ContactDetails2>,
98677}
98678
98679impl TaxOrganisationIdentification1 {
98680	pub fn validate(&self) -> Result<(), ValidationError> {
98681		if self.nm.chars().count() < 1 {
98682			return Err(ValidationError::new(1001, "nm is shorter than the minimum length of 1".to_string()));
98683		}
98684		if self.nm.chars().count() > 140 {
98685			return Err(ValidationError::new(1002, "nm exceeds the maximum length of 140".to_string()));
98686		}
98687		if let Some(ref val) = self.pstl_adr { val.validate()? }
98688		if let Some(ref val) = self.ctct_dtls { val.validate()? }
98689		Ok(())
98690	}
98691}
98692
98693
98694// TaxParty1 ...
98695#[cfg_attr(feature = "derive_debug", derive(Debug))]
98696#[cfg_attr(feature = "derive_default", derive(Default))]
98697#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98698#[cfg_attr(feature = "derive_clone", derive(Clone))]
98699#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98700pub struct TaxParty1 {
98701	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxId", skip_serializing_if = "Option::is_none") )]
98702	pub tax_id: Option<String>,
98703	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnId", skip_serializing_if = "Option::is_none") )]
98704	pub regn_id: Option<String>,
98705	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxTp", skip_serializing_if = "Option::is_none") )]
98706	pub tax_tp: Option<String>,
98707}
98708
98709impl TaxParty1 {
98710	pub fn validate(&self) -> Result<(), ValidationError> {
98711		if let Some(ref val) = self.tax_id {
98712			if val.chars().count() < 1 {
98713				return Err(ValidationError::new(1001, "tax_id is shorter than the minimum length of 1".to_string()));
98714			}
98715			if val.chars().count() > 35 {
98716				return Err(ValidationError::new(1002, "tax_id exceeds the maximum length of 35".to_string()));
98717			}
98718		}
98719		if let Some(ref val) = self.regn_id {
98720			if val.chars().count() < 1 {
98721				return Err(ValidationError::new(1001, "regn_id is shorter than the minimum length of 1".to_string()));
98722			}
98723			if val.chars().count() > 35 {
98724				return Err(ValidationError::new(1002, "regn_id exceeds the maximum length of 35".to_string()));
98725			}
98726		}
98727		if let Some(ref val) = self.tax_tp {
98728			if val.chars().count() < 1 {
98729				return Err(ValidationError::new(1001, "tax_tp is shorter than the minimum length of 1".to_string()));
98730			}
98731			if val.chars().count() > 35 {
98732				return Err(ValidationError::new(1002, "tax_tp exceeds the maximum length of 35".to_string()));
98733			}
98734		}
98735		Ok(())
98736	}
98737}
98738
98739
98740// TaxParty2 ...
98741#[cfg_attr(feature = "derive_debug", derive(Debug))]
98742#[cfg_attr(feature = "derive_default", derive(Default))]
98743#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98744#[cfg_attr(feature = "derive_clone", derive(Clone))]
98745#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98746pub struct TaxParty2 {
98747	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxId", skip_serializing_if = "Option::is_none") )]
98748	pub tax_id: Option<String>,
98749	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnId", skip_serializing_if = "Option::is_none") )]
98750	pub regn_id: Option<String>,
98751	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxTp", skip_serializing_if = "Option::is_none") )]
98752	pub tax_tp: Option<String>,
98753	#[cfg_attr( feature = "derive_serde", serde(rename = "Authstn", skip_serializing_if = "Option::is_none") )]
98754	pub authstn: Option<TaxAuthorisation1>,
98755}
98756
98757impl TaxParty2 {
98758	pub fn validate(&self) -> Result<(), ValidationError> {
98759		if let Some(ref val) = self.tax_id {
98760			if val.chars().count() < 1 {
98761				return Err(ValidationError::new(1001, "tax_id is shorter than the minimum length of 1".to_string()));
98762			}
98763			if val.chars().count() > 35 {
98764				return Err(ValidationError::new(1002, "tax_id exceeds the maximum length of 35".to_string()));
98765			}
98766		}
98767		if let Some(ref val) = self.regn_id {
98768			if val.chars().count() < 1 {
98769				return Err(ValidationError::new(1001, "regn_id is shorter than the minimum length of 1".to_string()));
98770			}
98771			if val.chars().count() > 35 {
98772				return Err(ValidationError::new(1002, "regn_id exceeds the maximum length of 35".to_string()));
98773			}
98774		}
98775		if let Some(ref val) = self.tax_tp {
98776			if val.chars().count() < 1 {
98777				return Err(ValidationError::new(1001, "tax_tp is shorter than the minimum length of 1".to_string()));
98778			}
98779			if val.chars().count() > 35 {
98780				return Err(ValidationError::new(1002, "tax_tp exceeds the maximum length of 35".to_string()));
98781			}
98782		}
98783		if let Some(ref val) = self.authstn { val.validate()? }
98784		Ok(())
98785	}
98786}
98787
98788
98789// TaxParty4 ...
98790#[cfg_attr(feature = "derive_debug", derive(Debug))]
98791#[cfg_attr(feature = "derive_default", derive(Default))]
98792#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98793#[cfg_attr(feature = "derive_clone", derive(Clone))]
98794#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98795pub struct TaxParty4 {
98796	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxId", skip_serializing_if = "Option::is_none") )]
98797	pub tax_id: Option<String>,
98798	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxTp", skip_serializing_if = "Option::is_none") )]
98799	pub tax_tp: Option<String>,
98800	#[cfg_attr( feature = "derive_serde", serde(rename = "RegnId", skip_serializing_if = "Option::is_none") )]
98801	pub regn_id: Option<String>,
98802	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxXmptnRsn", skip_serializing_if = "Option::is_none") )]
98803	pub tax_xmptn_rsn: Option<Vec<TaxExemptionReasonFormat1Choice>>,
98804}
98805
98806impl TaxParty4 {
98807	pub fn validate(&self) -> Result<(), ValidationError> {
98808		if let Some(ref val) = self.tax_id {
98809			if val.chars().count() < 1 {
98810				return Err(ValidationError::new(1001, "tax_id is shorter than the minimum length of 1".to_string()));
98811			}
98812			if val.chars().count() > 35 {
98813				return Err(ValidationError::new(1002, "tax_id exceeds the maximum length of 35".to_string()));
98814			}
98815		}
98816		if let Some(ref val) = self.tax_tp {
98817			if val.chars().count() < 1 {
98818				return Err(ValidationError::new(1001, "tax_tp is shorter than the minimum length of 1".to_string()));
98819			}
98820			if val.chars().count() > 35 {
98821				return Err(ValidationError::new(1002, "tax_tp exceeds the maximum length of 35".to_string()));
98822			}
98823		}
98824		if let Some(ref val) = self.regn_id {
98825			if val.chars().count() < 1 {
98826				return Err(ValidationError::new(1001, "regn_id is shorter than the minimum length of 1".to_string()));
98827			}
98828			if val.chars().count() > 35 {
98829				return Err(ValidationError::new(1002, "regn_id exceeds the maximum length of 35".to_string()));
98830			}
98831		}
98832		if let Some(ref vec) = self.tax_xmptn_rsn { for item in vec { item.validate()? } }
98833		Ok(())
98834	}
98835}
98836
98837
98838// TaxPeriod2 ...
98839#[cfg_attr(feature = "derive_debug", derive(Debug))]
98840#[cfg_attr(feature = "derive_default", derive(Default))]
98841#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98842#[cfg_attr(feature = "derive_clone", derive(Clone))]
98843#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98844pub struct TaxPeriod2 {
98845	#[cfg_attr( feature = "derive_serde", serde(rename = "Yr", skip_serializing_if = "Option::is_none") )]
98846	pub yr: Option<String>,
98847	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
98848	pub tp: Option<TaxRecordPeriod1Code>,
98849	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDt", skip_serializing_if = "Option::is_none") )]
98850	pub fr_to_dt: Option<DatePeriod2>,
98851}
98852
98853impl TaxPeriod2 {
98854	pub fn validate(&self) -> Result<(), ValidationError> {
98855		if let Some(ref val) = self.tp { val.validate()? }
98856		if let Some(ref val) = self.fr_to_dt { val.validate()? }
98857		Ok(())
98858	}
98859}
98860
98861
98862// TaxPeriod3 ...
98863#[cfg_attr(feature = "derive_debug", derive(Debug))]
98864#[cfg_attr(feature = "derive_default", derive(Default))]
98865#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98866#[cfg_attr(feature = "derive_clone", derive(Clone))]
98867#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98868pub struct TaxPeriod3 {
98869	#[cfg_attr( feature = "derive_serde", serde(rename = "Yr", skip_serializing_if = "Option::is_none") )]
98870	pub yr: Option<String>,
98871	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
98872	pub tp: Option<TaxRecordPeriod1Code>,
98873	#[cfg_attr( feature = "derive_serde", serde(rename = "FrToDt", skip_serializing_if = "Option::is_none") )]
98874	pub fr_to_dt: Option<DatePeriod2>,
98875}
98876
98877impl TaxPeriod3 {
98878	pub fn validate(&self) -> Result<(), ValidationError> {
98879		if let Some(ref val) = self.tp { val.validate()? }
98880		if let Some(ref val) = self.fr_to_dt { val.validate()? }
98881		Ok(())
98882	}
98883}
98884
98885
98886// TaxRateMarker1Code ...
98887#[cfg_attr(feature = "derive_debug", derive(Debug))]
98888#[cfg_attr(feature = "derive_default", derive(Default))]
98889#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98890#[cfg_attr(feature = "derive_clone", derive(Clone))]
98891#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98892pub enum TaxRateMarker1Code {
98893	#[cfg_attr(feature = "derive_default", default)]
98894	#[cfg_attr( feature = "derive_serde", serde(rename = "ALPR") )]
98895	CodeALPR,
98896	#[cfg_attr( feature = "derive_serde", serde(rename = "ALIT") )]
98897	CodeALIT,
98898	#[cfg_attr( feature = "derive_serde", serde(rename = "GRSS") )]
98899	CodeGRSS,
98900}
98901
98902impl TaxRateMarker1Code {
98903	pub fn validate(&self) -> Result<(), ValidationError> {
98904		Ok(())
98905	}
98906}
98907
98908
98909// TaxReason1 ...
98910#[cfg_attr(feature = "derive_debug", derive(Debug))]
98911#[cfg_attr(feature = "derive_default", derive(Default))]
98912#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98913#[cfg_attr(feature = "derive_clone", derive(Clone))]
98914#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98915pub struct TaxReason1 {
98916	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
98917	pub cd: String,
98918	#[cfg_attr( feature = "derive_serde", serde(rename = "Expltn") )]
98919	pub expltn: String,
98920}
98921
98922impl TaxReason1 {
98923	pub fn validate(&self) -> Result<(), ValidationError> {
98924		if self.cd.chars().count() < 1 {
98925			return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
98926		}
98927		if self.cd.chars().count() > 10 {
98928			return Err(ValidationError::new(1002, "cd exceeds the maximum length of 10".to_string()));
98929		}
98930		if self.expltn.chars().count() < 1 {
98931			return Err(ValidationError::new(1001, "expltn is shorter than the minimum length of 1".to_string()));
98932		}
98933		if self.expltn.chars().count() > 105 {
98934			return Err(ValidationError::new(1002, "expltn exceeds the maximum length of 105".to_string()));
98935		}
98936		Ok(())
98937	}
98938}
98939
98940
98941// TaxRecord2 ...
98942#[cfg_attr(feature = "derive_debug", derive(Debug))]
98943#[cfg_attr(feature = "derive_default", derive(Default))]
98944#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
98945#[cfg_attr(feature = "derive_clone", derive(Clone))]
98946#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
98947pub struct TaxRecord2 {
98948	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
98949	pub tp: Option<String>,
98950	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctgy", skip_serializing_if = "Option::is_none") )]
98951	pub ctgy: Option<String>,
98952	#[cfg_attr( feature = "derive_serde", serde(rename = "CtgyDtls", skip_serializing_if = "Option::is_none") )]
98953	pub ctgy_dtls: Option<String>,
98954	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrSts", skip_serializing_if = "Option::is_none") )]
98955	pub dbtr_sts: Option<String>,
98956	#[cfg_attr( feature = "derive_serde", serde(rename = "CertId", skip_serializing_if = "Option::is_none") )]
98957	pub cert_id: Option<String>,
98958	#[cfg_attr( feature = "derive_serde", serde(rename = "FrmsCd", skip_serializing_if = "Option::is_none") )]
98959	pub frms_cd: Option<String>,
98960	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd", skip_serializing_if = "Option::is_none") )]
98961	pub prd: Option<TaxPeriod2>,
98962	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxAmt", skip_serializing_if = "Option::is_none") )]
98963	pub tax_amt: Option<TaxAmount2>,
98964	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
98965	pub addtl_inf: Option<String>,
98966}
98967
98968impl TaxRecord2 {
98969	pub fn validate(&self) -> Result<(), ValidationError> {
98970		if let Some(ref val) = self.tp {
98971			if val.chars().count() < 1 {
98972				return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
98973			}
98974			if val.chars().count() > 35 {
98975				return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
98976			}
98977		}
98978		if let Some(ref val) = self.ctgy {
98979			if val.chars().count() < 1 {
98980				return Err(ValidationError::new(1001, "ctgy is shorter than the minimum length of 1".to_string()));
98981			}
98982			if val.chars().count() > 35 {
98983				return Err(ValidationError::new(1002, "ctgy exceeds the maximum length of 35".to_string()));
98984			}
98985		}
98986		if let Some(ref val) = self.ctgy_dtls {
98987			if val.chars().count() < 1 {
98988				return Err(ValidationError::new(1001, "ctgy_dtls is shorter than the minimum length of 1".to_string()));
98989			}
98990			if val.chars().count() > 35 {
98991				return Err(ValidationError::new(1002, "ctgy_dtls exceeds the maximum length of 35".to_string()));
98992			}
98993		}
98994		if let Some(ref val) = self.dbtr_sts {
98995			if val.chars().count() < 1 {
98996				return Err(ValidationError::new(1001, "dbtr_sts is shorter than the minimum length of 1".to_string()));
98997			}
98998			if val.chars().count() > 35 {
98999				return Err(ValidationError::new(1002, "dbtr_sts exceeds the maximum length of 35".to_string()));
99000			}
99001		}
99002		if let Some(ref val) = self.cert_id {
99003			if val.chars().count() < 1 {
99004				return Err(ValidationError::new(1001, "cert_id is shorter than the minimum length of 1".to_string()));
99005			}
99006			if val.chars().count() > 35 {
99007				return Err(ValidationError::new(1002, "cert_id exceeds the maximum length of 35".to_string()));
99008			}
99009		}
99010		if let Some(ref val) = self.frms_cd {
99011			if val.chars().count() < 1 {
99012				return Err(ValidationError::new(1001, "frms_cd is shorter than the minimum length of 1".to_string()));
99013			}
99014			if val.chars().count() > 35 {
99015				return Err(ValidationError::new(1002, "frms_cd exceeds the maximum length of 35".to_string()));
99016			}
99017		}
99018		if let Some(ref val) = self.prd { val.validate()? }
99019		if let Some(ref val) = self.tax_amt { val.validate()? }
99020		if let Some(ref val) = self.addtl_inf {
99021			if val.chars().count() < 1 {
99022				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
99023			}
99024			if val.chars().count() > 140 {
99025				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
99026			}
99027		}
99028		Ok(())
99029	}
99030}
99031
99032
99033// TaxRecord3 ...
99034#[cfg_attr(feature = "derive_debug", derive(Debug))]
99035#[cfg_attr(feature = "derive_default", derive(Default))]
99036#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99037#[cfg_attr(feature = "derive_clone", derive(Clone))]
99038#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99039pub struct TaxRecord3 {
99040	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
99041	pub tp: Option<String>,
99042	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctgy", skip_serializing_if = "Option::is_none") )]
99043	pub ctgy: Option<String>,
99044	#[cfg_attr( feature = "derive_serde", serde(rename = "CtgyDtls", skip_serializing_if = "Option::is_none") )]
99045	pub ctgy_dtls: Option<String>,
99046	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrSts", skip_serializing_if = "Option::is_none") )]
99047	pub dbtr_sts: Option<String>,
99048	#[cfg_attr( feature = "derive_serde", serde(rename = "CertId", skip_serializing_if = "Option::is_none") )]
99049	pub cert_id: Option<String>,
99050	#[cfg_attr( feature = "derive_serde", serde(rename = "FrmsCd", skip_serializing_if = "Option::is_none") )]
99051	pub frms_cd: Option<String>,
99052	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd", skip_serializing_if = "Option::is_none") )]
99053	pub prd: Option<TaxPeriod3>,
99054	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxAmt", skip_serializing_if = "Option::is_none") )]
99055	pub tax_amt: Option<TaxAmount3>,
99056	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
99057	pub addtl_inf: Option<String>,
99058}
99059
99060impl TaxRecord3 {
99061	pub fn validate(&self) -> Result<(), ValidationError> {
99062		if let Some(ref val) = self.tp {
99063			if val.chars().count() < 1 {
99064				return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
99065			}
99066			if val.chars().count() > 35 {
99067				return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
99068			}
99069		}
99070		if let Some(ref val) = self.ctgy {
99071			if val.chars().count() < 1 {
99072				return Err(ValidationError::new(1001, "ctgy is shorter than the minimum length of 1".to_string()));
99073			}
99074			if val.chars().count() > 35 {
99075				return Err(ValidationError::new(1002, "ctgy exceeds the maximum length of 35".to_string()));
99076			}
99077		}
99078		if let Some(ref val) = self.ctgy_dtls {
99079			if val.chars().count() < 1 {
99080				return Err(ValidationError::new(1001, "ctgy_dtls is shorter than the minimum length of 1".to_string()));
99081			}
99082			if val.chars().count() > 35 {
99083				return Err(ValidationError::new(1002, "ctgy_dtls exceeds the maximum length of 35".to_string()));
99084			}
99085		}
99086		if let Some(ref val) = self.dbtr_sts {
99087			if val.chars().count() < 1 {
99088				return Err(ValidationError::new(1001, "dbtr_sts is shorter than the minimum length of 1".to_string()));
99089			}
99090			if val.chars().count() > 35 {
99091				return Err(ValidationError::new(1002, "dbtr_sts exceeds the maximum length of 35".to_string()));
99092			}
99093		}
99094		if let Some(ref val) = self.cert_id {
99095			if val.chars().count() < 1 {
99096				return Err(ValidationError::new(1001, "cert_id is shorter than the minimum length of 1".to_string()));
99097			}
99098			if val.chars().count() > 35 {
99099				return Err(ValidationError::new(1002, "cert_id exceeds the maximum length of 35".to_string()));
99100			}
99101		}
99102		if let Some(ref val) = self.frms_cd {
99103			if val.chars().count() < 1 {
99104				return Err(ValidationError::new(1001, "frms_cd is shorter than the minimum length of 1".to_string()));
99105			}
99106			if val.chars().count() > 35 {
99107				return Err(ValidationError::new(1002, "frms_cd exceeds the maximum length of 35".to_string()));
99108			}
99109		}
99110		if let Some(ref val) = self.prd { val.validate()? }
99111		if let Some(ref val) = self.tax_amt { val.validate()? }
99112		if let Some(ref val) = self.addtl_inf {
99113			if val.chars().count() < 1 {
99114				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
99115			}
99116			if val.chars().count() > 140 {
99117				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 140".to_string()));
99118			}
99119		}
99120		Ok(())
99121	}
99122}
99123
99124
99125// TaxRecordDetails2 ...
99126#[cfg_attr(feature = "derive_debug", derive(Debug))]
99127#[cfg_attr(feature = "derive_default", derive(Default))]
99128#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99129#[cfg_attr(feature = "derive_clone", derive(Clone))]
99130#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99131pub struct TaxRecordDetails2 {
99132	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd", skip_serializing_if = "Option::is_none") )]
99133	pub prd: Option<TaxPeriod2>,
99134	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
99135	pub amt: ActiveOrHistoricCurrencyAndAmount,
99136}
99137
99138impl TaxRecordDetails2 {
99139	pub fn validate(&self) -> Result<(), ValidationError> {
99140		if let Some(ref val) = self.prd { val.validate()? }
99141		self.amt.validate()?;
99142		Ok(())
99143	}
99144}
99145
99146
99147// TaxRecordDetails3 ...
99148#[cfg_attr(feature = "derive_debug", derive(Debug))]
99149#[cfg_attr(feature = "derive_default", derive(Default))]
99150#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99151#[cfg_attr(feature = "derive_clone", derive(Clone))]
99152#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99153pub struct TaxRecordDetails3 {
99154	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd", skip_serializing_if = "Option::is_none") )]
99155	pub prd: Option<TaxPeriod3>,
99156	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
99157	pub amt: ActiveOrHistoricCurrencyAndAmount,
99158}
99159
99160impl TaxRecordDetails3 {
99161	pub fn validate(&self) -> Result<(), ValidationError> {
99162		if let Some(ref val) = self.prd { val.validate()? }
99163		self.amt.validate()?;
99164		Ok(())
99165	}
99166}
99167
99168
99169// TaxRecordPeriod1Code ...
99170#[cfg_attr(feature = "derive_debug", derive(Debug))]
99171#[cfg_attr(feature = "derive_default", derive(Default))]
99172#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99173#[cfg_attr(feature = "derive_clone", derive(Clone))]
99174#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99175pub enum TaxRecordPeriod1Code {
99176	#[cfg_attr(feature = "derive_default", default)]
99177	#[cfg_attr( feature = "derive_serde", serde(rename = "MM01") )]
99178	CodeMM01,
99179	#[cfg_attr( feature = "derive_serde", serde(rename = "MM02") )]
99180	CodeMM02,
99181	#[cfg_attr( feature = "derive_serde", serde(rename = "MM03") )]
99182	CodeMM03,
99183	#[cfg_attr( feature = "derive_serde", serde(rename = "MM04") )]
99184	CodeMM04,
99185	#[cfg_attr( feature = "derive_serde", serde(rename = "MM05") )]
99186	CodeMM05,
99187	#[cfg_attr( feature = "derive_serde", serde(rename = "MM06") )]
99188	CodeMM06,
99189	#[cfg_attr( feature = "derive_serde", serde(rename = "MM07") )]
99190	CodeMM07,
99191	#[cfg_attr( feature = "derive_serde", serde(rename = "MM08") )]
99192	CodeMM08,
99193	#[cfg_attr( feature = "derive_serde", serde(rename = "MM09") )]
99194	CodeMM09,
99195	#[cfg_attr( feature = "derive_serde", serde(rename = "MM10") )]
99196	CodeMM10,
99197	#[cfg_attr( feature = "derive_serde", serde(rename = "MM11") )]
99198	CodeMM11,
99199	#[cfg_attr( feature = "derive_serde", serde(rename = "MM12") )]
99200	CodeMM12,
99201	#[cfg_attr( feature = "derive_serde", serde(rename = "QTR1") )]
99202	CodeQTR1,
99203	#[cfg_attr( feature = "derive_serde", serde(rename = "QTR2") )]
99204	CodeQTR2,
99205	#[cfg_attr( feature = "derive_serde", serde(rename = "QTR3") )]
99206	CodeQTR3,
99207	#[cfg_attr( feature = "derive_serde", serde(rename = "QTR4") )]
99208	CodeQTR4,
99209	#[cfg_attr( feature = "derive_serde", serde(rename = "HLF1") )]
99210	CodeHLF1,
99211	#[cfg_attr( feature = "derive_serde", serde(rename = "HLF2") )]
99212	CodeHLF2,
99213}
99214
99215impl TaxRecordPeriod1Code {
99216	pub fn validate(&self) -> Result<(), ValidationError> {
99217		Ok(())
99218	}
99219}
99220
99221
99222// TaxReport1 ...
99223#[cfg_attr(feature = "derive_debug", derive(Debug))]
99224#[cfg_attr(feature = "derive_default", derive(Default))]
99225#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99226#[cfg_attr(feature = "derive_clone", derive(Clone))]
99227#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99228pub struct TaxReport1 {
99229	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRptHdr") )]
99230	pub tax_rpt_hdr: GroupHeader69,
99231	#[cfg_attr( feature = "derive_serde", serde(rename = "Sellr") )]
99232	pub sellr: PartyIdentification72,
99233	#[cfg_attr( feature = "derive_serde", serde(rename = "Buyr", skip_serializing_if = "Option::is_none") )]
99234	pub buyr: Option<PartyIdentification72>,
99235	#[cfg_attr( feature = "derive_serde", serde(rename = "TradSttlm") )]
99236	pub trad_sttlm: TradeSettlement2,
99237	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPty", skip_serializing_if = "Option::is_none") )]
99238	pub othr_pty: Option<Vec<PartyIdentification72>>,
99239	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
99240	pub addtl_inf: Option<Vec<AdditionalInformation1>>,
99241	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlRef", skip_serializing_if = "Option::is_none") )]
99242	pub addtl_ref: Option<Vec<DocumentGeneralInformation2>>,
99243	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
99244	pub splmtry_data: Option<Vec<SupplementaryData1>>,
99245}
99246
99247impl TaxReport1 {
99248	pub fn validate(&self) -> Result<(), ValidationError> {
99249		self.tax_rpt_hdr.validate()?;
99250		self.sellr.validate()?;
99251		if let Some(ref val) = self.buyr { val.validate()? }
99252		self.trad_sttlm.validate()?;
99253		if let Some(ref vec) = self.othr_pty { for item in vec { item.validate()? } }
99254		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
99255		if let Some(ref vec) = self.addtl_ref { for item in vec { item.validate()? } }
99256		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
99257		Ok(())
99258	}
99259}
99260
99261
99262// TaxReportHeader1 ...
99263#[cfg_attr(feature = "derive_debug", derive(Debug))]
99264#[cfg_attr(feature = "derive_default", derive(Default))]
99265#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99266#[cfg_attr(feature = "derive_clone", derive(Clone))]
99267#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99268pub struct TaxReportHeader1 {
99269	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId") )]
99270	pub msg_id: MessageIdentification1,
99271	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTaxRpts", skip_serializing_if = "Option::is_none") )]
99272	pub nb_of_tax_rpts: Option<f64>,
99273	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxAuthrty", skip_serializing_if = "Option::is_none") )]
99274	pub tax_authrty: Option<Vec<TaxOrganisationIdentification1>>,
99275}
99276
99277impl TaxReportHeader1 {
99278	pub fn validate(&self) -> Result<(), ValidationError> {
99279		self.msg_id.validate()?;
99280		if let Some(ref vec) = self.tax_authrty { for item in vec { item.validate()? } }
99281		Ok(())
99282	}
99283}
99284
99285
99286// TaxReporting3 ...
99287#[cfg_attr(feature = "derive_debug", derive(Debug))]
99288#[cfg_attr(feature = "derive_default", derive(Default))]
99289#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99290#[cfg_attr(feature = "derive_clone", derive(Clone))]
99291#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99292pub struct TaxReporting3 {
99293	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxtnCtry") )]
99294	pub taxtn_ctry: String,
99295	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRate", skip_serializing_if = "Option::is_none") )]
99296	pub tax_rate: Option<f64>,
99297	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxPyer", skip_serializing_if = "Option::is_none") )]
99298	pub tax_pyer: Option<PartyIdentification125Choice>,
99299	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRcpt", skip_serializing_if = "Option::is_none") )]
99300	pub tax_rcpt: Option<PartyIdentification125Choice>,
99301	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcctDtls", skip_serializing_if = "Option::is_none") )]
99302	pub csh_acct_dtls: Option<CashAccount204>,
99303	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
99304	pub desc: Option<String>,
99305}
99306
99307impl TaxReporting3 {
99308	pub fn validate(&self) -> Result<(), ValidationError> {
99309		let pattern = Regex::new("[A-Z]{2,2}").unwrap();
99310		if !pattern.is_match(&self.taxtn_ctry) {
99311			return Err(ValidationError::new(1005, "taxtn_ctry does not match the required pattern".to_string()));
99312		}
99313		if let Some(ref val) = self.tax_pyer { val.validate()? }
99314		if let Some(ref val) = self.tax_rcpt { val.validate()? }
99315		if let Some(ref val) = self.csh_acct_dtls { val.validate()? }
99316		if let Some(ref val) = self.desc {
99317			if val.chars().count() < 1 {
99318				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
99319			}
99320			if val.chars().count() > 350 {
99321				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 350".to_string()));
99322			}
99323		}
99324		Ok(())
99325	}
99326}
99327
99328
99329// TaxReportingStatus1Code ...
99330#[cfg_attr(feature = "derive_debug", derive(Debug))]
99331#[cfg_attr(feature = "derive_default", derive(Default))]
99332#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99333#[cfg_attr(feature = "derive_clone", derive(Clone))]
99334#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99335pub enum TaxReportingStatus1Code {
99336	#[cfg_attr(feature = "derive_default", default)]
99337	#[cfg_attr( feature = "derive_serde", serde(rename = "ACPT") )]
99338	CodeACPT,
99339	#[cfg_attr( feature = "derive_serde", serde(rename = "RCVD") )]
99340	CodeRCVD,
99341	#[cfg_attr( feature = "derive_serde", serde(rename = "RJCT") )]
99342	CodeRJCT,
99343	#[cfg_attr( feature = "derive_serde", serde(rename = "INCF") )]
99344	CodeINCF,
99345	#[cfg_attr( feature = "derive_serde", serde(rename = "CRPT") )]
99346	CodeCRPT,
99347	#[cfg_attr( feature = "derive_serde", serde(rename = "WARN") )]
99348	CodeWARN,
99349	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTC") )]
99350	CodeACTC,
99351	#[cfg_attr( feature = "derive_serde", serde(rename = "PART") )]
99352	CodePART,
99353}
99354
99355impl TaxReportingStatus1Code {
99356	pub fn validate(&self) -> Result<(), ValidationError> {
99357		Ok(())
99358	}
99359}
99360
99361
99362// TaxReportingStatus2Code ...
99363#[cfg_attr(feature = "derive_debug", derive(Debug))]
99364#[cfg_attr(feature = "derive_default", derive(Default))]
99365#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99366#[cfg_attr(feature = "derive_clone", derive(Clone))]
99367#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99368pub enum TaxReportingStatus2Code {
99369	#[cfg_attr(feature = "derive_default", default)]
99370	#[cfg_attr( feature = "derive_serde", serde(rename = "ACPT") )]
99371	CodeACPT,
99372	#[cfg_attr( feature = "derive_serde", serde(rename = "RJCT") )]
99373	CodeRJCT,
99374	#[cfg_attr( feature = "derive_serde", serde(rename = "WARN") )]
99375	CodeWARN,
99376}
99377
99378impl TaxReportingStatus2Code {
99379	pub fn validate(&self) -> Result<(), ValidationError> {
99380		Ok(())
99381	}
99382}
99383
99384
99385// TaxType12Code ...
99386#[cfg_attr(feature = "derive_debug", derive(Debug))]
99387#[cfg_attr(feature = "derive_default", derive(Default))]
99388#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99389#[cfg_attr(feature = "derive_clone", derive(Clone))]
99390#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99391pub enum TaxType12Code {
99392	#[cfg_attr(feature = "derive_default", default)]
99393	#[cfg_attr( feature = "derive_serde", serde(rename = "INPO") )]
99394	CodeINPO,
99395	#[cfg_attr( feature = "derive_serde", serde(rename = "EUTR") )]
99396	CodeEUTR,
99397	#[cfg_attr( feature = "derive_serde", serde(rename = "AKT1") )]
99398	CodeAKT1,
99399	#[cfg_attr( feature = "derive_serde", serde(rename = "AKT2") )]
99400	CodeAKT2,
99401	#[cfg_attr( feature = "derive_serde", serde(rename = "ZWIS") )]
99402	CodeZWIS,
99403	#[cfg_attr( feature = "derive_serde", serde(rename = "MIET") )]
99404	CodeMIET,
99405}
99406
99407impl TaxType12Code {
99408	pub fn validate(&self) -> Result<(), ValidationError> {
99409		Ok(())
99410	}
99411}
99412
99413
99414// TaxWithholdingMethod3Code ...
99415#[cfg_attr(feature = "derive_debug", derive(Debug))]
99416#[cfg_attr(feature = "derive_default", derive(Default))]
99417#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99418#[cfg_attr(feature = "derive_clone", derive(Clone))]
99419#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99420pub enum TaxWithholdingMethod3Code {
99421	#[cfg_attr(feature = "derive_default", default)]
99422	#[cfg_attr( feature = "derive_serde", serde(rename = "MITX") )]
99423	CodeMITX,
99424	#[cfg_attr( feature = "derive_serde", serde(rename = "INVE") )]
99425	CodeINVE,
99426	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCT") )]
99427	CodeACCT,
99428	#[cfg_attr( feature = "derive_serde", serde(rename = "EXMT") )]
99429	CodeEXMT,
99430	#[cfg_attr( feature = "derive_serde", serde(rename = "REPT") )]
99431	CodeREPT,
99432	#[cfg_attr( feature = "derive_serde", serde(rename = "CRTF") )]
99433	CodeCRTF,
99434	#[cfg_attr( feature = "derive_serde", serde(rename = "WHCO") )]
99435	CodeWHCO,
99436	#[cfg_attr( feature = "derive_serde", serde(rename = "WTHD") )]
99437	CodeWTHD,
99438	#[cfg_attr( feature = "derive_serde", serde(rename = "WTRE") )]
99439	CodeWTRE,
99440}
99441
99442impl TaxWithholdingMethod3Code {
99443	pub fn validate(&self) -> Result<(), ValidationError> {
99444		Ok(())
99445	}
99446}
99447
99448
99449// TaxableIncomePerShareCalculated2Code ...
99450#[cfg_attr(feature = "derive_debug", derive(Debug))]
99451#[cfg_attr(feature = "derive_default", derive(Default))]
99452#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99453#[cfg_attr(feature = "derive_clone", derive(Clone))]
99454#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99455pub enum TaxableIncomePerShareCalculated2Code {
99456	#[cfg_attr(feature = "derive_default", default)]
99457	#[cfg_attr( feature = "derive_serde", serde(rename = "TSIY") )]
99458	CodeTSIY,
99459	#[cfg_attr( feature = "derive_serde", serde(rename = "TSIN") )]
99460	CodeTSIN,
99461	#[cfg_attr( feature = "derive_serde", serde(rename = "UKWN") )]
99462	CodeUKWN,
99463}
99464
99465impl TaxableIncomePerShareCalculated2Code {
99466	pub fn validate(&self) -> Result<(), ValidationError> {
99467		Ok(())
99468	}
99469}
99470
99471
99472// TechnicalAttributes5 ...
99473#[cfg_attr(feature = "derive_debug", derive(Debug))]
99474#[cfg_attr(feature = "derive_default", derive(Default))]
99475#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99476#[cfg_attr(feature = "derive_clone", derive(Clone))]
99477#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99478pub struct TechnicalAttributes5 {
99479	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
99480	pub tech_rcrd_id: Option<String>,
99481	#[cfg_attr( feature = "derive_serde", serde(rename = "RcncltnFlg", skip_serializing_if = "Option::is_none") )]
99482	pub rcncltn_flg: Option<Reconciliation3Code>,
99483	#[cfg_attr( feature = "derive_serde", serde(rename = "RptRctTmStmp", skip_serializing_if = "Option::is_none") )]
99484	pub rpt_rct_tm_stmp: Option<String>,
99485}
99486
99487impl TechnicalAttributes5 {
99488	pub fn validate(&self) -> Result<(), ValidationError> {
99489		if let Some(ref val) = self.tech_rcrd_id {
99490			if val.chars().count() < 1 {
99491				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
99492			}
99493			if val.chars().count() > 140 {
99494				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
99495			}
99496		}
99497		if let Some(ref val) = self.rcncltn_flg { val.validate()? }
99498		Ok(())
99499	}
99500}
99501
99502
99503// TechnicalAttributes6 ...
99504#[cfg_attr(feature = "derive_debug", derive(Debug))]
99505#[cfg_attr(feature = "derive_default", derive(Default))]
99506#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99507#[cfg_attr(feature = "derive_clone", derive(Clone))]
99508#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99509pub struct TechnicalAttributes6 {
99510	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
99511	pub tech_rcrd_id: Option<String>,
99512	#[cfg_attr( feature = "derive_serde", serde(rename = "RptRctTmStmp", skip_serializing_if = "Option::is_none") )]
99513	pub rpt_rct_tm_stmp: Option<String>,
99514}
99515
99516impl TechnicalAttributes6 {
99517	pub fn validate(&self) -> Result<(), ValidationError> {
99518		if let Some(ref val) = self.tech_rcrd_id {
99519			if val.chars().count() < 1 {
99520				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
99521			}
99522			if val.chars().count() > 140 {
99523				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
99524			}
99525		}
99526		Ok(())
99527	}
99528}
99529
99530
99531// TechnicalIdentification2Choice ...
99532#[cfg_attr(feature = "derive_debug", derive(Debug))]
99533#[cfg_attr(feature = "derive_default", derive(Default))]
99534#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99535#[cfg_attr(feature = "derive_clone", derive(Clone))]
99536#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99537pub struct TechnicalIdentification2Choice {
99538	#[cfg_attr( feature = "derive_serde", serde(rename = "BICFI", skip_serializing_if = "Option::is_none") )]
99539	pub bicfi: Option<String>,
99540	#[cfg_attr( feature = "derive_serde", serde(rename = "TechAdr", skip_serializing_if = "Option::is_none") )]
99541	pub tech_adr: Option<String>,
99542}
99543
99544impl TechnicalIdentification2Choice {
99545	pub fn validate(&self) -> Result<(), ValidationError> {
99546		if let Some(ref val) = self.bicfi {
99547			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
99548			if !pattern.is_match(val) {
99549				return Err(ValidationError::new(1005, "bicfi does not match the required pattern".to_string()));
99550			}
99551		}
99552		if let Some(ref val) = self.tech_adr {
99553			if val.chars().count() < 1 {
99554				return Err(ValidationError::new(1001, "tech_adr is shorter than the minimum length of 1".to_string()));
99555			}
99556			if val.chars().count() > 256 {
99557				return Err(ValidationError::new(1002, "tech_adr exceeds the maximum length of 256".to_string()));
99558			}
99559		}
99560		Ok(())
99561	}
99562}
99563
99564
99565// TechnicalInputChannel1Choice ...
99566#[cfg_attr(feature = "derive_debug", derive(Debug))]
99567#[cfg_attr(feature = "derive_default", derive(Default))]
99568#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99569#[cfg_attr(feature = "derive_clone", derive(Clone))]
99570#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99571pub struct TechnicalInputChannel1Choice {
99572	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
99573	pub cd: Option<String>,
99574	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
99575	pub prtry: Option<String>,
99576}
99577
99578impl TechnicalInputChannel1Choice {
99579	pub fn validate(&self) -> Result<(), ValidationError> {
99580		if let Some(ref val) = self.cd {
99581			if val.chars().count() < 1 {
99582				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
99583			}
99584			if val.chars().count() > 4 {
99585				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
99586			}
99587		}
99588		if let Some(ref val) = self.prtry {
99589			if val.chars().count() < 1 {
99590				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
99591			}
99592			if val.chars().count() > 35 {
99593				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
99594			}
99595		}
99596		Ok(())
99597	}
99598}
99599
99600
99601// Term1 ...
99602#[cfg_attr(feature = "derive_debug", derive(Debug))]
99603#[cfg_attr(feature = "derive_default", derive(Default))]
99604#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99605#[cfg_attr(feature = "derive_clone", derive(Clone))]
99606#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99607pub struct Term1 {
99608	#[cfg_attr( feature = "derive_serde", serde(rename = "Oprtr") )]
99609	pub oprtr: Operator1Code,
99610	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
99611	pub val: RateOrAbsoluteValue1Choice,
99612}
99613
99614impl Term1 {
99615	pub fn validate(&self) -> Result<(), ValidationError> {
99616		self.oprtr.validate()?;
99617		self.val.validate()?;
99618		Ok(())
99619	}
99620}
99621
99622
99623// ThirdPartyRights2 ...
99624#[cfg_attr(feature = "derive_debug", derive(Debug))]
99625#[cfg_attr(feature = "derive_default", derive(Default))]
99626#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99627#[cfg_attr(feature = "derive_clone", derive(Clone))]
99628#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99629pub struct ThirdPartyRights2 {
99630	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
99631	pub tp: String,
99632	#[cfg_attr( feature = "derive_serde", serde(rename = "DtTm", skip_serializing_if = "Option::is_none") )]
99633	pub dt_tm: Option<String>,
99634	#[cfg_attr( feature = "derive_serde", serde(rename = "Hldr", skip_serializing_if = "Option::is_none") )]
99635	pub hldr: Option<PartyIdentification125Choice>,
99636	#[cfg_attr( feature = "derive_serde", serde(rename = "LglNttyIdr", skip_serializing_if = "Option::is_none") )]
99637	pub lgl_ntty_idr: Option<String>,
99638	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
99639	pub amt: Option<ActiveCurrencyAndAmount>,
99640	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
99641	pub desc: Option<String>,
99642}
99643
99644impl ThirdPartyRights2 {
99645	pub fn validate(&self) -> Result<(), ValidationError> {
99646		if self.tp.chars().count() < 1 {
99647			return Err(ValidationError::new(1001, "tp is shorter than the minimum length of 1".to_string()));
99648		}
99649		if self.tp.chars().count() > 35 {
99650			return Err(ValidationError::new(1002, "tp exceeds the maximum length of 35".to_string()));
99651		}
99652		if let Some(ref val) = self.hldr { val.validate()? }
99653		if let Some(ref val) = self.lgl_ntty_idr {
99654			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
99655			if !pattern.is_match(val) {
99656				return Err(ValidationError::new(1005, "lgl_ntty_idr does not match the required pattern".to_string()));
99657			}
99658		}
99659		if let Some(ref val) = self.amt { val.validate()? }
99660		if let Some(ref val) = self.desc {
99661			if val.chars().count() < 1 {
99662				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
99663			}
99664			if val.chars().count() > 350 {
99665				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 350".to_string()));
99666			}
99667		}
99668		Ok(())
99669	}
99670}
99671
99672
99673// TimeFrame10 ...
99674#[cfg_attr(feature = "derive_debug", derive(Debug))]
99675#[cfg_attr(feature = "derive_default", derive(Default))]
99676#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99677#[cfg_attr(feature = "derive_clone", derive(Clone))]
99678#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99679pub struct TimeFrame10 {
99680	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrTmFrameDesc", skip_serializing_if = "Option::is_none") )]
99681	pub othr_tm_frame_desc: Option<String>,
99682	#[cfg_attr( feature = "derive_serde", serde(rename = "TPlus", skip_serializing_if = "Option::is_none") )]
99683	pub t_plus: Option<f64>,
99684	#[cfg_attr( feature = "derive_serde", serde(rename = "NonWorkgDayAdjstmnt", skip_serializing_if = "Option::is_none") )]
99685	pub non_workg_day_adjstmnt: Option<BusinessDayConvention1Code>,
99686	#[cfg_attr( feature = "derive_serde", serde(rename = "RefrToOrdrDsk", skip_serializing_if = "Option::is_none") )]
99687	pub refr_to_ordr_dsk: Option<ReferToFundOrderDesk1Code>,
99688}
99689
99690impl TimeFrame10 {
99691	pub fn validate(&self) -> Result<(), ValidationError> {
99692		if let Some(ref val) = self.othr_tm_frame_desc {
99693			if val.chars().count() < 1 {
99694				return Err(ValidationError::new(1001, "othr_tm_frame_desc is shorter than the minimum length of 1".to_string()));
99695			}
99696			if val.chars().count() > 350 {
99697				return Err(ValidationError::new(1002, "othr_tm_frame_desc exceeds the maximum length of 350".to_string()));
99698			}
99699		}
99700		if let Some(ref val) = self.non_workg_day_adjstmnt { val.validate()? }
99701		if let Some(ref val) = self.refr_to_ordr_dsk { val.validate()? }
99702		Ok(())
99703	}
99704}
99705
99706
99707// TimeFrame11 ...
99708#[cfg_attr(feature = "derive_debug", derive(Debug))]
99709#[cfg_attr(feature = "derive_default", derive(Default))]
99710#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99711#[cfg_attr(feature = "derive_clone", derive(Clone))]
99712#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99713pub struct TimeFrame11 {
99714	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrTmFrameDesc", skip_serializing_if = "Option::is_none") )]
99715	pub othr_tm_frame_desc: Option<String>,
99716	#[cfg_attr( feature = "derive_serde", serde(rename = "TPlus", skip_serializing_if = "Option::is_none") )]
99717	pub t_plus: Option<f64>,
99718	#[cfg_attr( feature = "derive_serde", serde(rename = "NonWorkgDayAdjstmnt", skip_serializing_if = "Option::is_none") )]
99719	pub non_workg_day_adjstmnt: Option<BusinessDayConvention1Code>,
99720	#[cfg_attr( feature = "derive_serde", serde(rename = "RefrToOrdrDsk", skip_serializing_if = "Option::is_none") )]
99721	pub refr_to_ordr_dsk: Option<ReferToFundOrderDesk1Code>,
99722}
99723
99724impl TimeFrame11 {
99725	pub fn validate(&self) -> Result<(), ValidationError> {
99726		if let Some(ref val) = self.othr_tm_frame_desc {
99727			if val.chars().count() < 1 {
99728				return Err(ValidationError::new(1001, "othr_tm_frame_desc is shorter than the minimum length of 1".to_string()));
99729			}
99730			if val.chars().count() > 350 {
99731				return Err(ValidationError::new(1002, "othr_tm_frame_desc exceeds the maximum length of 350".to_string()));
99732			}
99733		}
99734		if let Some(ref val) = self.non_workg_day_adjstmnt { val.validate()? }
99735		if let Some(ref val) = self.refr_to_ordr_dsk { val.validate()? }
99736		Ok(())
99737	}
99738}
99739
99740
99741// TimeFrame2Code ...
99742#[cfg_attr(feature = "derive_debug", derive(Debug))]
99743#[cfg_attr(feature = "derive_default", derive(Default))]
99744#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99745#[cfg_attr(feature = "derive_clone", derive(Clone))]
99746#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99747pub enum TimeFrame2Code {
99748	#[cfg_attr(feature = "derive_default", default)]
99749	#[cfg_attr( feature = "derive_serde", serde(rename = "HOLD") )]
99750	CodeHOLD,
99751	#[cfg_attr( feature = "derive_serde", serde(rename = "LONG") )]
99752	CodeLONG,
99753	#[cfg_attr( feature = "derive_serde", serde(rename = "MEDM") )]
99754	CodeMEDM,
99755	#[cfg_attr( feature = "derive_serde", serde(rename = "SHOR") )]
99756	CodeSHOR,
99757	#[cfg_attr( feature = "derive_serde", serde(rename = "VSHT") )]
99758	CodeVSHT,
99759}
99760
99761impl TimeFrame2Code {
99762	pub fn validate(&self) -> Result<(), ValidationError> {
99763		Ok(())
99764	}
99765}
99766
99767
99768// TimeFrame7Choice ...
99769#[cfg_attr(feature = "derive_debug", derive(Debug))]
99770#[cfg_attr(feature = "derive_default", derive(Default))]
99771#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99772#[cfg_attr(feature = "derive_clone", derive(Clone))]
99773#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99774pub struct TimeFrame7Choice {
99775	#[cfg_attr( feature = "derive_serde", serde(rename = "TPlus", skip_serializing_if = "Option::is_none") )]
99776	pub t_plus: Option<f64>,
99777	#[cfg_attr( feature = "derive_serde", serde(rename = "Prepmt", skip_serializing_if = "Option::is_none") )]
99778	pub prepmt: Option<bool>,
99779}
99780
99781impl TimeFrame7Choice {
99782	pub fn validate(&self) -> Result<(), ValidationError> {
99783		Ok(())
99784	}
99785}
99786
99787
99788// TimeFrame8 ...
99789#[cfg_attr(feature = "derive_debug", derive(Debug))]
99790#[cfg_attr(feature = "derive_default", derive(Default))]
99791#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99792#[cfg_attr(feature = "derive_clone", derive(Clone))]
99793#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99794pub struct TimeFrame8 {
99795	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrTmFrameDesc", skip_serializing_if = "Option::is_none") )]
99796	pub othr_tm_frame_desc: Option<String>,
99797	#[cfg_attr( feature = "derive_serde", serde(rename = "TPlus", skip_serializing_if = "Option::is_none") )]
99798	pub t_plus: Option<f64>,
99799	#[cfg_attr( feature = "derive_serde", serde(rename = "NonWorkgDayAdjstmnt", skip_serializing_if = "Option::is_none") )]
99800	pub non_workg_day_adjstmnt: Option<BusinessDayConvention1Code>,
99801	#[cfg_attr( feature = "derive_serde", serde(rename = "RefrToOrdrDsk", skip_serializing_if = "Option::is_none") )]
99802	pub refr_to_ordr_dsk: Option<ReferToFundOrderDesk1Code>,
99803}
99804
99805impl TimeFrame8 {
99806	pub fn validate(&self) -> Result<(), ValidationError> {
99807		if let Some(ref val) = self.othr_tm_frame_desc {
99808			if val.chars().count() < 1 {
99809				return Err(ValidationError::new(1001, "othr_tm_frame_desc is shorter than the minimum length of 1".to_string()));
99810			}
99811			if val.chars().count() > 350 {
99812				return Err(ValidationError::new(1002, "othr_tm_frame_desc exceeds the maximum length of 350".to_string()));
99813			}
99814		}
99815		if let Some(ref val) = self.non_workg_day_adjstmnt { val.validate()? }
99816		if let Some(ref val) = self.refr_to_ordr_dsk { val.validate()? }
99817		Ok(())
99818	}
99819}
99820
99821
99822// TimeFrame8Choice ...
99823#[cfg_attr(feature = "derive_debug", derive(Debug))]
99824#[cfg_attr(feature = "derive_default", derive(Default))]
99825#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99826#[cfg_attr(feature = "derive_clone", derive(Clone))]
99827#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99828pub struct TimeFrame8Choice {
99829	#[cfg_attr( feature = "derive_serde", serde(rename = "TPlus", skip_serializing_if = "Option::is_none") )]
99830	pub t_plus: Option<f64>,
99831	#[cfg_attr( feature = "derive_serde", serde(rename = "RPlus", skip_serializing_if = "Option::is_none") )]
99832	pub r_plus: Option<f64>,
99833}
99834
99835impl TimeFrame8Choice {
99836	pub fn validate(&self) -> Result<(), ValidationError> {
99837		Ok(())
99838	}
99839}
99840
99841
99842// TimeFrame9 ...
99843#[cfg_attr(feature = "derive_debug", derive(Debug))]
99844#[cfg_attr(feature = "derive_default", derive(Default))]
99845#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99846#[cfg_attr(feature = "derive_clone", derive(Clone))]
99847#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99848pub struct TimeFrame9 {
99849	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrTmFrameDesc", skip_serializing_if = "Option::is_none") )]
99850	pub othr_tm_frame_desc: Option<String>,
99851	#[cfg_attr( feature = "derive_serde", serde(rename = "TMns", skip_serializing_if = "Option::is_none") )]
99852	pub t_mns: Option<f64>,
99853	#[cfg_attr( feature = "derive_serde", serde(rename = "NonWorkgDayAdjstmnt", skip_serializing_if = "Option::is_none") )]
99854	pub non_workg_day_adjstmnt: Option<BusinessDayConvention1Code>,
99855	#[cfg_attr( feature = "derive_serde", serde(rename = "RefrToOrdrDsk", skip_serializing_if = "Option::is_none") )]
99856	pub refr_to_ordr_dsk: Option<ReferToFundOrderDesk1Code>,
99857}
99858
99859impl TimeFrame9 {
99860	pub fn validate(&self) -> Result<(), ValidationError> {
99861		if let Some(ref val) = self.othr_tm_frame_desc {
99862			if val.chars().count() < 1 {
99863				return Err(ValidationError::new(1001, "othr_tm_frame_desc is shorter than the minimum length of 1".to_string()));
99864			}
99865			if val.chars().count() > 350 {
99866				return Err(ValidationError::new(1002, "othr_tm_frame_desc exceeds the maximum length of 350".to_string()));
99867			}
99868		}
99869		if let Some(ref val) = self.non_workg_day_adjstmnt { val.validate()? }
99870		if let Some(ref val) = self.refr_to_ordr_dsk { val.validate()? }
99871		Ok(())
99872	}
99873}
99874
99875
99876// TimeFrame9Choice ...
99877#[cfg_attr(feature = "derive_debug", derive(Debug))]
99878#[cfg_attr(feature = "derive_default", derive(Default))]
99879#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99880#[cfg_attr(feature = "derive_clone", derive(Clone))]
99881#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99882pub struct TimeFrame9Choice {
99883	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
99884	pub cd: Option<TimeFrame2Code>,
99885	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
99886	pub prtry: Option<GenericIdentification47>,
99887}
99888
99889impl TimeFrame9Choice {
99890	pub fn validate(&self) -> Result<(), ValidationError> {
99891		if let Some(ref val) = self.cd { val.validate()? }
99892		if let Some(ref val) = self.prtry { val.validate()? }
99893		Ok(())
99894	}
99895}
99896
99897
99898// TimeHorizon2Choice ...
99899#[cfg_attr(feature = "derive_debug", derive(Debug))]
99900#[cfg_attr(feature = "derive_default", derive(Default))]
99901#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99902#[cfg_attr(feature = "derive_clone", derive(Clone))]
99903#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99904pub struct TimeHorizon2Choice {
99905	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfYrs", skip_serializing_if = "Option::is_none") )]
99906	pub nb_of_yrs: Option<f64>,
99907	#[cfg_attr( feature = "derive_serde", serde(rename = "TmFrame", skip_serializing_if = "Option::is_none") )]
99908	pub tm_frame: Option<TimeFrame9Choice>,
99909}
99910
99911impl TimeHorizon2Choice {
99912	pub fn validate(&self) -> Result<(), ValidationError> {
99913		if let Some(ref val) = self.tm_frame { val.validate()? }
99914		Ok(())
99915	}
99916}
99917
99918
99919// TimePeriod1 ...
99920#[cfg_attr(feature = "derive_debug", derive(Debug))]
99921#[cfg_attr(feature = "derive_default", derive(Default))]
99922#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99923#[cfg_attr(feature = "derive_clone", derive(Clone))]
99924#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99925pub struct TimePeriod1 {
99926	#[cfg_attr( feature = "derive_serde", serde(rename = "FrTm") )]
99927	pub fr_tm: String,
99928	#[cfg_attr( feature = "derive_serde", serde(rename = "ToTm") )]
99929	pub to_tm: String,
99930}
99931
99932impl TimePeriod1 {
99933	pub fn validate(&self) -> Result<(), ValidationError> {
99934		Ok(())
99935	}
99936}
99937
99938
99939// TimePeriod2 ...
99940#[cfg_attr(feature = "derive_debug", derive(Debug))]
99941#[cfg_attr(feature = "derive_default", derive(Default))]
99942#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99943#[cfg_attr(feature = "derive_clone", derive(Clone))]
99944#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99945pub struct TimePeriod2 {
99946	#[cfg_attr( feature = "derive_serde", serde(rename = "FrTm") )]
99947	pub fr_tm: String,
99948	#[cfg_attr( feature = "derive_serde", serde(rename = "ToTm", skip_serializing_if = "Option::is_none") )]
99949	pub to_tm: Option<String>,
99950}
99951
99952impl TimePeriod2 {
99953	pub fn validate(&self) -> Result<(), ValidationError> {
99954		Ok(())
99955	}
99956}
99957
99958
99959// TimePeriod3 ...
99960#[cfg_attr(feature = "derive_debug", derive(Debug))]
99961#[cfg_attr(feature = "derive_default", derive(Default))]
99962#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99963#[cfg_attr(feature = "derive_clone", derive(Clone))]
99964#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99965pub struct TimePeriod3 {
99966	#[cfg_attr( feature = "derive_serde", serde(rename = "FrTm", skip_serializing_if = "Option::is_none") )]
99967	pub fr_tm: Option<String>,
99968	#[cfg_attr( feature = "derive_serde", serde(rename = "ToTm", skip_serializing_if = "Option::is_none") )]
99969	pub to_tm: Option<String>,
99970}
99971
99972impl TimePeriod3 {
99973	pub fn validate(&self) -> Result<(), ValidationError> {
99974		Ok(())
99975	}
99976}
99977
99978
99979// TimePeriodDetails1 ...
99980#[cfg_attr(feature = "derive_debug", derive(Debug))]
99981#[cfg_attr(feature = "derive_default", derive(Default))]
99982#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
99983#[cfg_attr(feature = "derive_clone", derive(Clone))]
99984#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
99985pub struct TimePeriodDetails1 {
99986	#[cfg_attr( feature = "derive_serde", serde(rename = "FrTm") )]
99987	pub fr_tm: String,
99988	#[cfg_attr( feature = "derive_serde", serde(rename = "ToTm", skip_serializing_if = "Option::is_none") )]
99989	pub to_tm: Option<String>,
99990}
99991
99992impl TimePeriodDetails1 {
99993	pub fn validate(&self) -> Result<(), ValidationError> {
99994		Ok(())
99995	}
99996}
99997
99998
99999// TimeToMaturity1Choice ...
100000#[cfg_attr(feature = "derive_debug", derive(Debug))]
100001#[cfg_attr(feature = "derive_default", derive(Default))]
100002#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100003#[cfg_attr(feature = "derive_clone", derive(Clone))]
100004#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100005pub struct TimeToMaturity1Choice {
100006	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd", skip_serializing_if = "Option::is_none") )]
100007	pub prd: Option<TimeToMaturityPeriod1>,
100008	#[cfg_attr( feature = "derive_serde", serde(rename = "Spcl", skip_serializing_if = "Option::is_none") )]
100009	pub spcl: Option<SpecialPurpose2Code>,
100010}
100011
100012impl TimeToMaturity1Choice {
100013	pub fn validate(&self) -> Result<(), ValidationError> {
100014		if let Some(ref val) = self.prd { val.validate()? }
100015		if let Some(ref val) = self.spcl { val.validate()? }
100016		Ok(())
100017	}
100018}
100019
100020
100021// TimeToMaturity2Choice ...
100022#[cfg_attr(feature = "derive_debug", derive(Debug))]
100023#[cfg_attr(feature = "derive_default", derive(Default))]
100024#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100025#[cfg_attr(feature = "derive_clone", derive(Clone))]
100026#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100027pub struct TimeToMaturity2Choice {
100028	#[cfg_attr( feature = "derive_serde", serde(rename = "Prd", skip_serializing_if = "Option::is_none") )]
100029	pub prd: Option<TimeToMaturityPeriod2>,
100030	#[cfg_attr( feature = "derive_serde", serde(rename = "Spcl", skip_serializing_if = "Option::is_none") )]
100031	pub spcl: Option<SpecialPurpose2Code>,
100032}
100033
100034impl TimeToMaturity2Choice {
100035	pub fn validate(&self) -> Result<(), ValidationError> {
100036		if let Some(ref val) = self.prd { val.validate()? }
100037		if let Some(ref val) = self.spcl { val.validate()? }
100038		Ok(())
100039	}
100040}
100041
100042
100043// TimeToMaturityPeriod1 ...
100044#[cfg_attr(feature = "derive_debug", derive(Debug))]
100045#[cfg_attr(feature = "derive_default", derive(Default))]
100046#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100047#[cfg_attr(feature = "derive_clone", derive(Clone))]
100048#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100049pub struct TimeToMaturityPeriod1 {
100050	#[cfg_attr( feature = "derive_serde", serde(rename = "Start", skip_serializing_if = "Option::is_none") )]
100051	pub start: Option<MaturityTerm2>,
100052	#[cfg_attr( feature = "derive_serde", serde(rename = "End", skip_serializing_if = "Option::is_none") )]
100053	pub end: Option<MaturityTerm2>,
100054}
100055
100056impl TimeToMaturityPeriod1 {
100057	pub fn validate(&self) -> Result<(), ValidationError> {
100058		if let Some(ref val) = self.start { val.validate()? }
100059		if let Some(ref val) = self.end { val.validate()? }
100060		Ok(())
100061	}
100062}
100063
100064
100065// TimeToMaturityPeriod2 ...
100066#[cfg_attr(feature = "derive_debug", derive(Debug))]
100067#[cfg_attr(feature = "derive_default", derive(Default))]
100068#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100069#[cfg_attr(feature = "derive_clone", derive(Clone))]
100070#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100071pub struct TimeToMaturityPeriod2 {
100072	#[cfg_attr( feature = "derive_serde", serde(rename = "Start", skip_serializing_if = "Option::is_none") )]
100073	pub start: Option<MaturityTerm2>,
100074	#[cfg_attr( feature = "derive_serde", serde(rename = "End", skip_serializing_if = "Option::is_none") )]
100075	pub end: Option<MaturityTerm2>,
100076}
100077
100078impl TimeToMaturityPeriod2 {
100079	pub fn validate(&self) -> Result<(), ValidationError> {
100080		if let Some(ref val) = self.start { val.validate()? }
100081		if let Some(ref val) = self.end { val.validate()? }
100082		Ok(())
100083	}
100084}
100085
100086
100087// TimeUnit1Code ...
100088#[cfg_attr(feature = "derive_debug", derive(Debug))]
100089#[cfg_attr(feature = "derive_default", derive(Default))]
100090#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100091#[cfg_attr(feature = "derive_clone", derive(Clone))]
100092#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100093pub enum TimeUnit1Code {
100094	#[cfg_attr(feature = "derive_default", default)]
100095	#[cfg_attr( feature = "derive_serde", serde(rename = "DAYC") )]
100096	CodeDAYC,
100097	#[cfg_attr( feature = "derive_serde", serde(rename = "HOUR") )]
100098	CodeHOUR,
100099	#[cfg_attr( feature = "derive_serde", serde(rename = "MINU") )]
100100	CodeMINU,
100101	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTH") )]
100102	CodeMNTH,
100103	#[cfg_attr( feature = "derive_serde", serde(rename = "SECO") )]
100104	CodeSECO,
100105	#[cfg_attr( feature = "derive_serde", serde(rename = "WEEK") )]
100106	CodeWEEK,
100107	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
100108	CodeYEAR,
100109}
100110
100111impl TimeUnit1Code {
100112	pub fn validate(&self) -> Result<(), ValidationError> {
100113		Ok(())
100114	}
100115}
100116
100117
100118// TimeUnit3Choice ...
100119#[cfg_attr(feature = "derive_debug", derive(Debug))]
100120#[cfg_attr(feature = "derive_default", derive(Default))]
100121#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100122#[cfg_attr(feature = "derive_clone", derive(Clone))]
100123#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100124pub struct TimeUnit3Choice {
100125	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
100126	pub cd: Option<TimeUnit1Code>,
100127	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
100128	pub prtry: Option<GenericIdentification30>,
100129}
100130
100131impl TimeUnit3Choice {
100132	pub fn validate(&self) -> Result<(), ValidationError> {
100133		if let Some(ref val) = self.cd { val.validate()? }
100134		if let Some(ref val) = self.prtry { val.validate()? }
100135		Ok(())
100136	}
100137}
100138
100139
100140// TonsOrCurrency2Choice ...
100141#[cfg_attr(feature = "derive_debug", derive(Debug))]
100142#[cfg_attr(feature = "derive_default", derive(Default))]
100143#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100144#[cfg_attr(feature = "derive_clone", derive(Clone))]
100145#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100146pub struct TonsOrCurrency2Choice {
100147	#[cfg_attr( feature = "derive_serde", serde(rename = "Nb", skip_serializing_if = "Option::is_none") )]
100148	pub nb: Option<f64>,
100149	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
100150	pub amt: Option<ActiveOrHistoricCurrencyAndAmount>,
100151}
100152
100153impl TonsOrCurrency2Choice {
100154	pub fn validate(&self) -> Result<(), ValidationError> {
100155		if let Some(ref val) = self.amt { val.validate()? }
100156		Ok(())
100157	}
100158}
100159
100160
100161// TotalAmountAndCurrency1 ...
100162#[cfg_attr(feature = "derive_debug", derive(Debug))]
100163#[cfg_attr(feature = "derive_default", derive(Default))]
100164#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100165#[cfg_attr(feature = "derive_clone", derive(Clone))]
100166#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100167pub struct TotalAmountAndCurrency1 {
100168	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlAmt") )]
100169	pub ttl_amt: f64,
100170	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
100171	pub cdt_dbt_ind: Option<CreditDebitCode>,
100172	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
100173	pub ccy: Option<String>,
100174}
100175
100176impl TotalAmountAndCurrency1 {
100177	pub fn validate(&self) -> Result<(), ValidationError> {
100178		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
100179		if let Some(ref val) = self.ccy {
100180			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
100181			if !pattern.is_match(val) {
100182				return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
100183			}
100184		}
100185		Ok(())
100186	}
100187}
100188
100189
100190// TotalCharges7 ...
100191#[cfg_attr(feature = "derive_debug", derive(Debug))]
100192#[cfg_attr(feature = "derive_default", derive(Default))]
100193#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100194#[cfg_attr(feature = "derive_clone", derive(Clone))]
100195#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100196pub struct TotalCharges7 {
100197	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfChrgsRcrds") )]
100198	pub nb_of_chrgs_rcrds: String,
100199	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
100200	pub ctrl_sum: Option<f64>,
100201	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlChrgsAmt", skip_serializing_if = "Option::is_none") )]
100202	pub ttl_chrgs_amt: Option<ActiveCurrencyAndAmount>,
100203	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
100204	pub cdt_dbt_ind: Option<CreditDebitCode>,
100205}
100206
100207impl TotalCharges7 {
100208	pub fn validate(&self) -> Result<(), ValidationError> {
100209		let pattern = Regex::new("[0-9]{1,15}").unwrap();
100210		if !pattern.is_match(&self.nb_of_chrgs_rcrds) {
100211			return Err(ValidationError::new(1005, "nb_of_chrgs_rcrds does not match the required pattern".to_string()));
100212		}
100213		if let Some(ref val) = self.ttl_chrgs_amt { val.validate()? }
100214		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
100215		Ok(())
100216	}
100217}
100218
100219
100220// TotalCharges8 ...
100221#[cfg_attr(feature = "derive_debug", derive(Debug))]
100222#[cfg_attr(feature = "derive_default", derive(Default))]
100223#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100224#[cfg_attr(feature = "derive_clone", derive(Clone))]
100225#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100226pub struct TotalCharges8 {
100227	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfChrgsBrkdwnItms") )]
100228	pub nb_of_chrgs_brkdwn_itms: String,
100229	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrlSum", skip_serializing_if = "Option::is_none") )]
100230	pub ctrl_sum: Option<f64>,
100231	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlChrgsAmt", skip_serializing_if = "Option::is_none") )]
100232	pub ttl_chrgs_amt: Option<ActiveCurrencyAndAmount>,
100233	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
100234	pub cdt_dbt_ind: Option<CreditDebitCode>,
100235}
100236
100237impl TotalCharges8 {
100238	pub fn validate(&self) -> Result<(), ValidationError> {
100239		let pattern = Regex::new("[0-9]{1,15}").unwrap();
100240		if !pattern.is_match(&self.nb_of_chrgs_brkdwn_itms) {
100241			return Err(ValidationError::new(1005, "nb_of_chrgs_brkdwn_itms does not match the required pattern".to_string()));
100242		}
100243		if let Some(ref val) = self.ttl_chrgs_amt { val.validate()? }
100244		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
100245		Ok(())
100246	}
100247}
100248
100249
100250// TotalNumber1 ...
100251#[cfg_attr(feature = "derive_debug", derive(Debug))]
100252#[cfg_attr(feature = "derive_default", derive(Default))]
100253#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100254#[cfg_attr(feature = "derive_clone", derive(Clone))]
100255#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100256pub struct TotalNumber1 {
100257	#[cfg_attr( feature = "derive_serde", serde(rename = "CurInstrNb") )]
100258	pub cur_instr_nb: String,
100259	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlOfLkdInstrs") )]
100260	pub ttl_of_lkd_instrs: String,
100261}
100262
100263impl TotalNumber1 {
100264	pub fn validate(&self) -> Result<(), ValidationError> {
100265		let pattern = Regex::new("[0-9]{3}").unwrap();
100266		if !pattern.is_match(&self.cur_instr_nb) {
100267			return Err(ValidationError::new(1005, "cur_instr_nb does not match the required pattern".to_string()));
100268		}
100269		let pattern = Regex::new("[0-9]{3}").unwrap();
100270		if !pattern.is_match(&self.ttl_of_lkd_instrs) {
100271			return Err(ValidationError::new(1005, "ttl_of_lkd_instrs does not match the required pattern".to_string()));
100272		}
100273		Ok(())
100274	}
100275}
100276
100277
100278// TotalTransactions6 ...
100279#[cfg_attr(feature = "derive_debug", derive(Debug))]
100280#[cfg_attr(feature = "derive_default", derive(Default))]
100281#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100282#[cfg_attr(feature = "derive_clone", derive(Clone))]
100283#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100284pub struct TotalTransactions6 {
100285	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNtries", skip_serializing_if = "Option::is_none") )]
100286	pub ttl_ntries: Option<NumberAndSumOfTransactions4>,
100287	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlCdtNtries", skip_serializing_if = "Option::is_none") )]
100288	pub ttl_cdt_ntries: Option<NumberAndSumOfTransactions1>,
100289	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlDbtNtries", skip_serializing_if = "Option::is_none") )]
100290	pub ttl_dbt_ntries: Option<NumberAndSumOfTransactions1>,
100291	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNtriesPerBkTxCd", skip_serializing_if = "Option::is_none") )]
100292	pub ttl_ntries_per_bk_tx_cd: Option<Vec<TotalsPerBankTransactionCode5>>,
100293}
100294
100295impl TotalTransactions6 {
100296	pub fn validate(&self) -> Result<(), ValidationError> {
100297		if let Some(ref val) = self.ttl_ntries { val.validate()? }
100298		if let Some(ref val) = self.ttl_cdt_ntries { val.validate()? }
100299		if let Some(ref val) = self.ttl_dbt_ntries { val.validate()? }
100300		if let Some(ref vec) = self.ttl_ntries_per_bk_tx_cd { for item in vec { item.validate()? } }
100301		Ok(())
100302	}
100303}
100304
100305
100306// TotalsPerBankTransactionCode5 ...
100307#[cfg_attr(feature = "derive_debug", derive(Debug))]
100308#[cfg_attr(feature = "derive_default", derive(Default))]
100309#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100310#[cfg_attr(feature = "derive_clone", derive(Clone))]
100311#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100312pub struct TotalsPerBankTransactionCode5 {
100313	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfNtries", skip_serializing_if = "Option::is_none") )]
100314	pub nb_of_ntries: Option<String>,
100315	#[cfg_attr( feature = "derive_serde", serde(rename = "Sum", skip_serializing_if = "Option::is_none") )]
100316	pub sum: Option<f64>,
100317	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNetNtry", skip_serializing_if = "Option::is_none") )]
100318	pub ttl_net_ntry: Option<AmountAndDirection35>,
100319	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtNtries", skip_serializing_if = "Option::is_none") )]
100320	pub cdt_ntries: Option<NumberAndSumOfTransactions1>,
100321	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtNtries", skip_serializing_if = "Option::is_none") )]
100322	pub dbt_ntries: Option<NumberAndSumOfTransactions1>,
100323	#[cfg_attr( feature = "derive_serde", serde(rename = "FcstInd", skip_serializing_if = "Option::is_none") )]
100324	pub fcst_ind: Option<bool>,
100325	#[cfg_attr( feature = "derive_serde", serde(rename = "BkTxCd") )]
100326	pub bk_tx_cd: BankTransactionCodeStructure4,
100327	#[cfg_attr( feature = "derive_serde", serde(rename = "Avlbty", skip_serializing_if = "Option::is_none") )]
100328	pub avlbty: Option<Vec<CashAvailability1>>,
100329	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
100330	pub dt: Option<DateAndDateTime2Choice>,
100331}
100332
100333impl TotalsPerBankTransactionCode5 {
100334	pub fn validate(&self) -> Result<(), ValidationError> {
100335		if let Some(ref val) = self.nb_of_ntries {
100336			let pattern = Regex::new("[0-9]{1,15}").unwrap();
100337			if !pattern.is_match(val) {
100338				return Err(ValidationError::new(1005, "nb_of_ntries does not match the required pattern".to_string()));
100339			}
100340		}
100341		if let Some(ref val) = self.ttl_net_ntry { val.validate()? }
100342		if let Some(ref val) = self.cdt_ntries { val.validate()? }
100343		if let Some(ref val) = self.dbt_ntries { val.validate()? }
100344		self.bk_tx_cd.validate()?;
100345		if let Some(ref vec) = self.avlbty { for item in vec { item.validate()? } }
100346		if let Some(ref val) = self.dt { val.validate()? }
100347		Ok(())
100348	}
100349}
100350
100351
100352// TrackData1 ...
100353#[cfg_attr(feature = "derive_debug", derive(Debug))]
100354#[cfg_attr(feature = "derive_default", derive(Default))]
100355#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100356#[cfg_attr(feature = "derive_clone", derive(Clone))]
100357#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100358pub struct TrackData1 {
100359	#[cfg_attr( feature = "derive_serde", serde(rename = "TrckNb", skip_serializing_if = "Option::is_none") )]
100360	pub trck_nb: Option<String>,
100361	#[cfg_attr( feature = "derive_serde", serde(rename = "TrckVal") )]
100362	pub trck_val: String,
100363}
100364
100365impl TrackData1 {
100366	pub fn validate(&self) -> Result<(), ValidationError> {
100367		if let Some(ref val) = self.trck_nb {
100368			let pattern = Regex::new("[0-9]").unwrap();
100369			if !pattern.is_match(val) {
100370				return Err(ValidationError::new(1005, "trck_nb does not match the required pattern".to_string()));
100371			}
100372		}
100373		if self.trck_val.chars().count() < 1 {
100374			return Err(ValidationError::new(1001, "trck_val is shorter than the minimum length of 1".to_string()));
100375		}
100376		if self.trck_val.chars().count() > 140 {
100377			return Err(ValidationError::new(1002, "trck_val exceeds the maximum length of 140".to_string()));
100378		}
100379		Ok(())
100380	}
100381}
100382
100383
100384// TrackerData7 ...
100385#[cfg_attr(feature = "derive_debug", derive(Debug))]
100386#[cfg_attr(feature = "derive_default", derive(Default))]
100387#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100388#[cfg_attr(feature = "derive_clone", derive(Clone))]
100389#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100390pub struct TrackerData7 {
100391	#[cfg_attr( feature = "derive_serde", serde(rename = "ConfdDt") )]
100392	pub confd_dt: DateAndDateTime2Choice,
100393	#[cfg_attr( feature = "derive_serde", serde(rename = "ConfdAmt") )]
100394	pub confd_amt: ActiveCurrencyAndAmount,
100395	#[cfg_attr( feature = "derive_serde", serde(rename = "TrckrRcrd") )]
100396	pub trckr_rcrd: Vec<TrackerRecord5>,
100397}
100398
100399impl TrackerData7 {
100400	pub fn validate(&self) -> Result<(), ValidationError> {
100401		self.confd_dt.validate()?;
100402		self.confd_amt.validate()?;
100403		for item in &self.trckr_rcrd { item.validate()? }
100404		Ok(())
100405	}
100406}
100407
100408
100409// TrackerRecord5 ...
100410#[cfg_attr(feature = "derive_debug", derive(Debug))]
100411#[cfg_attr(feature = "derive_default", derive(Default))]
100412#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100413#[cfg_attr(feature = "derive_clone", derive(Clone))]
100414#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100415pub struct TrackerRecord5 {
100416	#[cfg_attr( feature = "derive_serde", serde(rename = "Agt") )]
100417	pub agt: BranchAndFinancialInstitutionIdentification8,
100418	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgBr", skip_serializing_if = "Option::is_none") )]
100419	pub chrg_br: Option<ChargeBearerType1Code>,
100420	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgsAmt", skip_serializing_if = "Option::is_none") )]
100421	pub chrgs_amt: Option<ActiveCurrencyAndAmount>,
100422	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRateData", skip_serializing_if = "Option::is_none") )]
100423	pub xchg_rate_data: Option<CurrencyExchange13>,
100424}
100425
100426impl TrackerRecord5 {
100427	pub fn validate(&self) -> Result<(), ValidationError> {
100428		self.agt.validate()?;
100429		if let Some(ref val) = self.chrg_br { val.validate()? }
100430		if let Some(ref val) = self.chrgs_amt { val.validate()? }
100431		if let Some(ref val) = self.xchg_rate_data { val.validate()? }
100432		Ok(())
100433	}
100434}
100435
100436
100437// TradeAdditionalQueryCriteria7 ...
100438#[cfg_attr(feature = "derive_debug", derive(Debug))]
100439#[cfg_attr(feature = "derive_default", derive(Default))]
100440#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100441#[cfg_attr(feature = "derive_clone", derive(Clone))]
100442#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100443pub struct TradeAdditionalQueryCriteria7 {
100444	#[cfg_attr( feature = "derive_serde", serde(rename = "ActnTp", skip_serializing_if = "Option::is_none") )]
100445	pub actn_tp: Option<Vec<TransactionOperationType6Code>>,
100446	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnVn", skip_serializing_if = "Option::is_none") )]
100447	pub exctn_vn: Option<SecuritiesTradeVenueCriteria1Choice>,
100448	#[cfg_attr( feature = "derive_serde", serde(rename = "NtrOfCtrPty", skip_serializing_if = "Option::is_none") )]
100449	pub ntr_of_ctr_pty: Option<Vec<PartyNatureType1Code>>,
100450	#[cfg_attr( feature = "derive_serde", serde(rename = "CorpSctr", skip_serializing_if = "Option::is_none") )]
100451	pub corp_sctr: Option<Vec<CorporateSectorCriteria5>>,
100452}
100453
100454impl TradeAdditionalQueryCriteria7 {
100455	pub fn validate(&self) -> Result<(), ValidationError> {
100456		if let Some(ref vec) = self.actn_tp { for item in vec { item.validate()? } }
100457		if let Some(ref val) = self.exctn_vn { val.validate()? }
100458		if let Some(ref vec) = self.ntr_of_ctr_pty { for item in vec { item.validate()? } }
100459		if let Some(ref vec) = self.corp_sctr { for item in vec { item.validate()? } }
100460		Ok(())
100461	}
100462}
100463
100464
100465// TradeAdditionalQueryCriteria9 ...
100466#[cfg_attr(feature = "derive_debug", derive(Debug))]
100467#[cfg_attr(feature = "derive_default", derive(Default))]
100468#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100469#[cfg_attr(feature = "derive_clone", derive(Clone))]
100470#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100471pub struct TradeAdditionalQueryCriteria9 {
100472	#[cfg_attr( feature = "derive_serde", serde(rename = "ActnTp", skip_serializing_if = "Option::is_none") )]
100473	pub actn_tp: Option<Vec<TransactionOperationType8Code>>,
100474	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnVn", skip_serializing_if = "Option::is_none") )]
100475	pub exctn_vn: Option<SecuritiesTradeVenueCriteria1Choice>,
100476	#[cfg_attr( feature = "derive_serde", serde(rename = "NtrOfCtrPty", skip_serializing_if = "Option::is_none") )]
100477	pub ntr_of_ctr_pty: Option<PartyNatureType1Code>,
100478	#[cfg_attr( feature = "derive_serde", serde(rename = "CorpSctr", skip_serializing_if = "Option::is_none") )]
100479	pub corp_sctr: Option<CorporateSectorCriteria6>,
100480	#[cfg_attr( feature = "derive_serde", serde(rename = "AsstClss", skip_serializing_if = "Option::is_none") )]
100481	pub asst_clss: Option<Vec<ProductType4Code>>,
100482	#[cfg_attr( feature = "derive_serde", serde(rename = "PdctClssfctn", skip_serializing_if = "Option::is_none") )]
100483	pub pdct_clssfctn: Option<ProductClassificationCriteria1>,
100484	#[cfg_attr( feature = "derive_serde", serde(rename = "Lvl", skip_serializing_if = "Option::is_none") )]
100485	pub lvl: Option<ModificationLevel1Code>,
100486	#[cfg_attr( feature = "derive_serde", serde(rename = "EvtTp", skip_serializing_if = "Option::is_none") )]
100487	pub evt_tp: Option<Vec<DerivativeEventType3Code>>,
100488}
100489
100490impl TradeAdditionalQueryCriteria9 {
100491	pub fn validate(&self) -> Result<(), ValidationError> {
100492		if let Some(ref vec) = self.actn_tp { for item in vec { item.validate()? } }
100493		if let Some(ref val) = self.exctn_vn { val.validate()? }
100494		if let Some(ref val) = self.ntr_of_ctr_pty { val.validate()? }
100495		if let Some(ref val) = self.corp_sctr { val.validate()? }
100496		if let Some(ref vec) = self.asst_clss { for item in vec { item.validate()? } }
100497		if let Some(ref val) = self.pdct_clssfctn { val.validate()? }
100498		if let Some(ref val) = self.lvl { val.validate()? }
100499		if let Some(ref vec) = self.evt_tp { for item in vec { item.validate()? } }
100500		Ok(())
100501	}
100502}
100503
100504
100505// TradeClearing11 ...
100506#[cfg_attr(feature = "derive_debug", derive(Debug))]
100507#[cfg_attr(feature = "derive_default", derive(Default))]
100508#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100509#[cfg_attr(feature = "derive_clone", derive(Clone))]
100510#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100511pub struct TradeClearing11 {
100512	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrOblgtn", skip_serializing_if = "Option::is_none") )]
100513	pub clr_oblgtn: Option<ClearingObligationType1Code>,
100514	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSts", skip_serializing_if = "Option::is_none") )]
100515	pub clr_sts: Option<Cleared23Choice>,
100516	#[cfg_attr( feature = "derive_serde", serde(rename = "IntraGrp", skip_serializing_if = "Option::is_none") )]
100517	pub intra_grp: Option<bool>,
100518}
100519
100520impl TradeClearing11 {
100521	pub fn validate(&self) -> Result<(), ValidationError> {
100522		if let Some(ref val) = self.clr_oblgtn { val.validate()? }
100523		if let Some(ref val) = self.clr_sts { val.validate()? }
100524		Ok(())
100525	}
100526}
100527
100528
100529// TradeConfirmation3Choice ...
100530#[cfg_attr(feature = "derive_debug", derive(Debug))]
100531#[cfg_attr(feature = "derive_default", derive(Default))]
100532#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100533#[cfg_attr(feature = "derive_clone", derive(Clone))]
100534#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100535pub struct TradeConfirmation3Choice {
100536	#[cfg_attr( feature = "derive_serde", serde(rename = "Confd", skip_serializing_if = "Option::is_none") )]
100537	pub confd: Option<TradeConfirmation4>,
100538	#[cfg_attr( feature = "derive_serde", serde(rename = "NonConfd", skip_serializing_if = "Option::is_none") )]
100539	pub non_confd: Option<TradeNonConfirmation1>,
100540}
100541
100542impl TradeConfirmation3Choice {
100543	pub fn validate(&self) -> Result<(), ValidationError> {
100544		if let Some(ref val) = self.confd { val.validate()? }
100545		if let Some(ref val) = self.non_confd { val.validate()? }
100546		Ok(())
100547	}
100548}
100549
100550
100551// TradeConfirmation4 ...
100552#[cfg_attr(feature = "derive_debug", derive(Debug))]
100553#[cfg_attr(feature = "derive_default", derive(Default))]
100554#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100555#[cfg_attr(feature = "derive_clone", derive(Clone))]
100556#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100557pub struct TradeConfirmation4 {
100558	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
100559	pub tp: Option<TradeConfirmationType1Code>,
100560	#[cfg_attr( feature = "derive_serde", serde(rename = "TmStmp", skip_serializing_if = "Option::is_none") )]
100561	pub tm_stmp: Option<String>,
100562}
100563
100564impl TradeConfirmation4 {
100565	pub fn validate(&self) -> Result<(), ValidationError> {
100566		if let Some(ref val) = self.tp { val.validate()? }
100567		Ok(())
100568	}
100569}
100570
100571
100572// TradeConfirmation4Choice ...
100573#[cfg_attr(feature = "derive_debug", derive(Debug))]
100574#[cfg_attr(feature = "derive_default", derive(Default))]
100575#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100576#[cfg_attr(feature = "derive_clone", derive(Clone))]
100577#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100578pub struct TradeConfirmation4Choice {
100579	#[cfg_attr( feature = "derive_serde", serde(rename = "Confd", skip_serializing_if = "Option::is_none") )]
100580	pub confd: Option<TradeConfirmation5>,
100581	#[cfg_attr( feature = "derive_serde", serde(rename = "NonConfd", skip_serializing_if = "Option::is_none") )]
100582	pub non_confd: Option<TradeNonConfirmation1>,
100583}
100584
100585impl TradeConfirmation4Choice {
100586	pub fn validate(&self) -> Result<(), ValidationError> {
100587		if let Some(ref val) = self.confd { val.validate()? }
100588		if let Some(ref val) = self.non_confd { val.validate()? }
100589		Ok(())
100590	}
100591}
100592
100593
100594// TradeConfirmation5 ...
100595#[cfg_attr(feature = "derive_debug", derive(Debug))]
100596#[cfg_attr(feature = "derive_default", derive(Default))]
100597#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100598#[cfg_attr(feature = "derive_clone", derive(Clone))]
100599#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100600pub struct TradeConfirmation5 {
100601	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
100602	pub tp: TradeConfirmationType1Code,
100603	#[cfg_attr( feature = "derive_serde", serde(rename = "TmStmp", skip_serializing_if = "Option::is_none") )]
100604	pub tm_stmp: Option<String>,
100605}
100606
100607impl TradeConfirmation5 {
100608	pub fn validate(&self) -> Result<(), ValidationError> {
100609		self.tp.validate()?;
100610		Ok(())
100611	}
100612}
100613
100614
100615// TradeConfirmationType1Code ...
100616#[cfg_attr(feature = "derive_debug", derive(Debug))]
100617#[cfg_attr(feature = "derive_default", derive(Default))]
100618#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100619#[cfg_attr(feature = "derive_clone", derive(Clone))]
100620#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100621pub enum TradeConfirmationType1Code {
100622	#[cfg_attr(feature = "derive_default", default)]
100623	#[cfg_attr( feature = "derive_serde", serde(rename = "ECNF") )]
100624	CodeECNF,
100625	#[cfg_attr( feature = "derive_serde", serde(rename = "YCNF") )]
100626	CodeYCNF,
100627}
100628
100629impl TradeConfirmationType1Code {
100630	pub fn validate(&self) -> Result<(), ValidationError> {
100631		Ok(())
100632	}
100633}
100634
100635
100636// TradeConfirmationType2Code ...
100637#[cfg_attr(feature = "derive_debug", derive(Debug))]
100638#[cfg_attr(feature = "derive_default", derive(Default))]
100639#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100640#[cfg_attr(feature = "derive_clone", derive(Clone))]
100641#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100642pub enum TradeConfirmationType2Code {
100643	#[cfg_attr(feature = "derive_default", default)]
100644	#[cfg_attr( feature = "derive_serde", serde(rename = "NCNF") )]
100645	CodeNCNF,
100646}
100647
100648impl TradeConfirmationType2Code {
100649	pub fn validate(&self) -> Result<(), ValidationError> {
100650		Ok(())
100651	}
100652}
100653
100654
100655// TradeContract4 ...
100656#[cfg_attr(feature = "derive_debug", derive(Debug))]
100657#[cfg_attr(feature = "derive_default", derive(Default))]
100658#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100659#[cfg_attr(feature = "derive_clone", derive(Clone))]
100660#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100661pub struct TradeContract4 {
100662	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctDocId", skip_serializing_if = "Option::is_none") )]
100663	pub ctrct_doc_id: Option<DocumentIdentification22>,
100664	#[cfg_attr( feature = "derive_serde", serde(rename = "TradTpId", skip_serializing_if = "Option::is_none") )]
100665	pub trad_tp_id: Option<String>,
100666	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
100667	pub amt: Option<ActiveCurrencyAndAmount>,
100668	#[cfg_attr( feature = "derive_serde", serde(rename = "Buyr") )]
100669	pub buyr: Vec<TradeParty6>,
100670	#[cfg_attr( feature = "derive_serde", serde(rename = "Sellr") )]
100671	pub sellr: Vec<TradeParty6>,
100672	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
100673	pub mtrty_dt: Option<String>,
100674	#[cfg_attr( feature = "derive_serde", serde(rename = "PrlngtnFlg", skip_serializing_if = "Option::is_none") )]
100675	pub prlngtn_flg: Option<bool>,
100676	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
100677	pub start_dt: Option<String>,
100678	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmCcy", skip_serializing_if = "Option::is_none") )]
100679	pub sttlm_ccy: Option<String>,
100680	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRateInf", skip_serializing_if = "Option::is_none") )]
100681	pub xchg_rate_inf: Option<ExchangeRate1>,
100682	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtSchdl", skip_serializing_if = "Option::is_none") )]
100683	pub pmt_schdl: Option<InterestPaymentDateRange1>,
100684	#[cfg_attr( feature = "derive_serde", serde(rename = "ShipmntSchdl", skip_serializing_if = "Option::is_none") )]
100685	pub shipmnt_schdl: Option<ShipmentSchedule2Choice>,
100686	#[cfg_attr( feature = "derive_serde", serde(rename = "Attchmnt", skip_serializing_if = "Option::is_none") )]
100687	pub attchmnt: Option<Vec<DocumentGeneralInformation5>>,
100688}
100689
100690impl TradeContract4 {
100691	pub fn validate(&self) -> Result<(), ValidationError> {
100692		if let Some(ref val) = self.ctrct_doc_id { val.validate()? }
100693		if let Some(ref val) = self.trad_tp_id {
100694			if val.chars().count() < 1 {
100695				return Err(ValidationError::new(1001, "trad_tp_id is shorter than the minimum length of 1".to_string()));
100696			}
100697			if val.chars().count() > 35 {
100698				return Err(ValidationError::new(1002, "trad_tp_id exceeds the maximum length of 35".to_string()));
100699			}
100700		}
100701		if let Some(ref val) = self.amt { val.validate()? }
100702		for item in &self.buyr { item.validate()? }
100703		for item in &self.sellr { item.validate()? }
100704		if let Some(ref val) = self.sttlm_ccy {
100705			let pattern = Regex::new("[A-Z]{3,3}").unwrap();
100706			if !pattern.is_match(val) {
100707				return Err(ValidationError::new(1005, "sttlm_ccy does not match the required pattern".to_string()));
100708			}
100709		}
100710		if let Some(ref val) = self.xchg_rate_inf { val.validate()? }
100711		if let Some(ref val) = self.pmt_schdl { val.validate()? }
100712		if let Some(ref val) = self.shipmnt_schdl { val.validate()? }
100713		if let Some(ref vec) = self.attchmnt { for item in vec { item.validate()? } }
100714		Ok(())
100715	}
100716}
100717
100718
100719// TradeCounterpartyRelationship1Choice ...
100720#[cfg_attr(feature = "derive_debug", derive(Debug))]
100721#[cfg_attr(feature = "derive_default", derive(Default))]
100722#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100723#[cfg_attr(feature = "derive_clone", derive(Clone))]
100724#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100725pub struct TradeCounterpartyRelationship1Choice {
100726	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
100727	pub cd: Option<String>,
100728	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
100729	pub prtry: Option<String>,
100730}
100731
100732impl TradeCounterpartyRelationship1Choice {
100733	pub fn validate(&self) -> Result<(), ValidationError> {
100734		if let Some(ref val) = self.cd {
100735			if val.chars().count() < 1 {
100736				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
100737			}
100738			if val.chars().count() > 4 {
100739				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
100740			}
100741		}
100742		if let Some(ref val) = self.prtry {
100743			if val.chars().count() < 1 {
100744				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
100745			}
100746			if val.chars().count() > 100 {
100747				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 100".to_string()));
100748			}
100749		}
100750		Ok(())
100751	}
100752}
100753
100754
100755// TradeCounterpartyRelationshipRecord1 ...
100756#[cfg_attr(feature = "derive_debug", derive(Debug))]
100757#[cfg_attr(feature = "derive_default", derive(Default))]
100758#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100759#[cfg_attr(feature = "derive_clone", derive(Clone))]
100760#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100761pub struct TradeCounterpartyRelationshipRecord1 {
100762	#[cfg_attr( feature = "derive_serde", serde(rename = "StartRltshPty") )]
100763	pub start_rltsh_pty: TradeCounterpartyType1Code,
100764	#[cfg_attr( feature = "derive_serde", serde(rename = "EndRltshPty") )]
100765	pub end_rltsh_pty: TradeCounterpartyType1Code,
100766	#[cfg_attr( feature = "derive_serde", serde(rename = "RltshTp") )]
100767	pub rltsh_tp: TradeCounterpartyRelationship1Choice,
100768	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
100769	pub desc: Option<String>,
100770}
100771
100772impl TradeCounterpartyRelationshipRecord1 {
100773	pub fn validate(&self) -> Result<(), ValidationError> {
100774		self.start_rltsh_pty.validate()?;
100775		self.end_rltsh_pty.validate()?;
100776		self.rltsh_tp.validate()?;
100777		if let Some(ref val) = self.desc {
100778			if val.chars().count() < 1 {
100779				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
100780			}
100781			if val.chars().count() > 1000 {
100782				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 1000".to_string()));
100783			}
100784		}
100785		Ok(())
100786	}
100787}
100788
100789
100790// TradeCounterpartyReport20 ...
100791#[cfg_attr(feature = "derive_debug", derive(Debug))]
100792#[cfg_attr(feature = "derive_default", derive(Default))]
100793#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100794#[cfg_attr(feature = "derive_clone", derive(Clone))]
100795#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100796pub struct TradeCounterpartyReport20 {
100797	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty") )]
100798	pub rptg_ctr_pty: Counterparty45,
100799	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty") )]
100800	pub othr_ctr_pty: Counterparty46,
100801	#[cfg_attr( feature = "derive_serde", serde(rename = "Brkr", skip_serializing_if = "Option::is_none") )]
100802	pub brkr: Option<OrganisationIdentification15Choice>,
100803	#[cfg_attr( feature = "derive_serde", serde(rename = "SubmitgAgt", skip_serializing_if = "Option::is_none") )]
100804	pub submitg_agt: Option<OrganisationIdentification15Choice>,
100805	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrMmb", skip_serializing_if = "Option::is_none") )]
100806	pub clr_mmb: Option<PartyIdentification248Choice>,
100807	#[cfg_attr( feature = "derive_serde", serde(rename = "Bnfcry", skip_serializing_if = "Option::is_none") )]
100808	pub bnfcry: Option<Vec<PartyIdentification248Choice>>,
100809	#[cfg_attr( feature = "derive_serde", serde(rename = "NttyRspnsblForRpt", skip_serializing_if = "Option::is_none") )]
100810	pub ntty_rspnsbl_for_rpt: Option<OrganisationIdentification15Choice>,
100811	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnAgt", skip_serializing_if = "Option::is_none") )]
100812	pub exctn_agt: Option<Vec<OrganisationIdentification15Choice>>,
100813	#[cfg_attr( feature = "derive_serde", serde(rename = "RltshRcrd", skip_serializing_if = "Option::is_none") )]
100814	pub rltsh_rcrd: Option<Vec<TradeCounterpartyRelationshipRecord1>>,
100815}
100816
100817impl TradeCounterpartyReport20 {
100818	pub fn validate(&self) -> Result<(), ValidationError> {
100819		self.rptg_ctr_pty.validate()?;
100820		self.othr_ctr_pty.validate()?;
100821		if let Some(ref val) = self.brkr { val.validate()? }
100822		if let Some(ref val) = self.submitg_agt { val.validate()? }
100823		if let Some(ref val) = self.clr_mmb { val.validate()? }
100824		if let Some(ref vec) = self.bnfcry { for item in vec { item.validate()? } }
100825		if let Some(ref val) = self.ntty_rspnsbl_for_rpt { val.validate()? }
100826		if let Some(ref vec) = self.exctn_agt { for item in vec { item.validate()? } }
100827		if let Some(ref vec) = self.rltsh_rcrd { for item in vec { item.validate()? } }
100828		Ok(())
100829	}
100830}
100831
100832
100833// TradeCounterpartyType1Code ...
100834#[cfg_attr(feature = "derive_debug", derive(Debug))]
100835#[cfg_attr(feature = "derive_default", derive(Default))]
100836#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100837#[cfg_attr(feature = "derive_clone", derive(Clone))]
100838#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100839pub enum TradeCounterpartyType1Code {
100840	#[cfg_attr(feature = "derive_default", default)]
100841	#[cfg_attr( feature = "derive_serde", serde(rename = "BENE") )]
100842	CodeBENE,
100843	#[cfg_attr( feature = "derive_serde", serde(rename = "BROK") )]
100844	CodeBROK,
100845	#[cfg_attr( feature = "derive_serde", serde(rename = "CLEM") )]
100846	CodeCLEM,
100847	#[cfg_attr( feature = "derive_serde", serde(rename = "EXEA") )]
100848	CodeEXEA,
100849	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHC") )]
100850	CodeOTHC,
100851	#[cfg_attr( feature = "derive_serde", serde(rename = "REPC") )]
100852	CodeREPC,
100853	#[cfg_attr( feature = "derive_serde", serde(rename = "SBMA") )]
100854	CodeSBMA,
100855	#[cfg_attr( feature = "derive_serde", serde(rename = "ERFR") )]
100856	CodeERFR,
100857}
100858
100859impl TradeCounterpartyType1Code {
100860	pub fn validate(&self) -> Result<(), ValidationError> {
100861		Ok(())
100862	}
100863}
100864
100865
100866// TradeData28 ...
100867#[cfg_attr(feature = "derive_debug", derive(Debug))]
100868#[cfg_attr(feature = "derive_default", derive(Default))]
100869#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100870#[cfg_attr(feature = "derive_clone", derive(Clone))]
100871#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100872pub struct TradeData28 {
100873	#[cfg_attr( feature = "derive_serde", serde(rename = "PairgRcncltnSts", skip_serializing_if = "Option::is_none") )]
100874	pub pairg_rcncltn_sts: Option<Vec<NumberOfReportsPerStatus4>>,
100875	#[cfg_attr( feature = "derive_serde", serde(rename = "RcncltnRpt") )]
100876	pub rcncltn_rpt: Vec<ReconciliationReport8>,
100877	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
100878	pub splmtry_data: Option<Vec<SupplementaryData1>>,
100879}
100880
100881impl TradeData28 {
100882	pub fn validate(&self) -> Result<(), ValidationError> {
100883		if let Some(ref vec) = self.pairg_rcncltn_sts { for item in vec { item.validate()? } }
100884		for item in &self.rcncltn_rpt { item.validate()? }
100885		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
100886		Ok(())
100887	}
100888}
100889
100890
100891// TradeData29 ...
100892#[cfg_attr(feature = "derive_debug", derive(Debug))]
100893#[cfg_attr(feature = "derive_default", derive(Default))]
100894#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100895#[cfg_attr(feature = "derive_clone", derive(Clone))]
100896#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100897pub struct TradeData29 {
100898	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSttstcs") )]
100899	pub rpt_sttstcs: Vec<DetailedReportStatistics5>,
100900	#[cfg_attr( feature = "derive_serde", serde(rename = "TxSttstcs") )]
100901	pub tx_sttstcs: Vec<DetailedTransactionStatistics2Choice>,
100902	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
100903	pub splmtry_data: Option<Vec<SupplementaryData1>>,
100904}
100905
100906impl TradeData29 {
100907	pub fn validate(&self) -> Result<(), ValidationError> {
100908		for item in &self.rpt_sttstcs { item.validate()? }
100909		for item in &self.tx_sttstcs { item.validate()? }
100910		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
100911		Ok(())
100912	}
100913}
100914
100915
100916// TradeData34Choice ...
100917#[cfg_attr(feature = "derive_debug", derive(Debug))]
100918#[cfg_attr(feature = "derive_default", derive(Default))]
100919#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100920#[cfg_attr(feature = "derive_clone", derive(Clone))]
100921#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100922pub struct TradeData34Choice {
100923	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
100924	pub data_set_actn: Option<ReportPeriodActivity1Code>,
100925	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
100926	pub rpt: Option<Vec<TradeData28>>,
100927}
100928
100929impl TradeData34Choice {
100930	pub fn validate(&self) -> Result<(), ValidationError> {
100931		if let Some(ref val) = self.data_set_actn { val.validate()? }
100932		if let Some(ref vec) = self.rpt { for item in vec { item.validate()? } }
100933		Ok(())
100934	}
100935}
100936
100937
100938// TradeData35Choice ...
100939#[cfg_attr(feature = "derive_debug", derive(Debug))]
100940#[cfg_attr(feature = "derive_default", derive(Default))]
100941#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100942#[cfg_attr(feature = "derive_clone", derive(Clone))]
100943#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100944pub struct TradeData35Choice {
100945	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
100946	pub data_set_actn: Option<ReportPeriodActivity1Code>,
100947	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
100948	pub rpt: Option<Vec<TradeData29>>,
100949}
100950
100951impl TradeData35Choice {
100952	pub fn validate(&self) -> Result<(), ValidationError> {
100953		if let Some(ref val) = self.data_set_actn { val.validate()? }
100954		if let Some(ref vec) = self.rpt { for item in vec { item.validate()? } }
100955		Ok(())
100956	}
100957}
100958
100959
100960// TradeData36Choice ...
100961#[cfg_attr(feature = "derive_debug", derive(Debug))]
100962#[cfg_attr(feature = "derive_default", derive(Default))]
100963#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100964#[cfg_attr(feature = "derive_clone", derive(Clone))]
100965#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100966pub struct TradeData36Choice {
100967	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
100968	pub data_set_actn: Option<ReportPeriodActivity1Code>,
100969	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
100970	pub rpt: Option<Vec<ReuseDataReport6Choice>>,
100971}
100972
100973impl TradeData36Choice {
100974	pub fn validate(&self) -> Result<(), ValidationError> {
100975		if let Some(ref val) = self.data_set_actn { val.validate()? }
100976		if let Some(ref vec) = self.rpt { for item in vec { item.validate()? } }
100977		Ok(())
100978	}
100979}
100980
100981
100982// TradeData37Choice ...
100983#[cfg_attr(feature = "derive_debug", derive(Debug))]
100984#[cfg_attr(feature = "derive_default", derive(Default))]
100985#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
100986#[cfg_attr(feature = "derive_clone", derive(Clone))]
100987#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
100988pub struct TradeData37Choice {
100989	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
100990	pub data_set_actn: Option<ReportPeriodActivity1Code>,
100991	#[cfg_attr( feature = "derive_serde", serde(rename = "Stat", skip_serializing_if = "Option::is_none") )]
100992	pub stat: Option<Vec<ReuseDataReportCorrection15>>,
100993}
100994
100995impl TradeData37Choice {
100996	pub fn validate(&self) -> Result<(), ValidationError> {
100997		if let Some(ref val) = self.data_set_actn { val.validate()? }
100998		if let Some(ref vec) = self.stat { for item in vec { item.validate()? } }
100999		Ok(())
101000	}
101001}
101002
101003
101004// TradeData38Choice ...
101005#[cfg_attr(feature = "derive_debug", derive(Debug))]
101006#[cfg_attr(feature = "derive_default", derive(Default))]
101007#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101008#[cfg_attr(feature = "derive_clone", derive(Clone))]
101009#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101010pub struct TradeData38Choice {
101011	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
101012	pub data_set_actn: Option<ReportPeriodActivity1Code>,
101013	#[cfg_attr( feature = "derive_serde", serde(rename = "Stat", skip_serializing_if = "Option::is_none") )]
101014	pub stat: Option<Vec<CollateralMarginNew10>>,
101015}
101016
101017impl TradeData38Choice {
101018	pub fn validate(&self) -> Result<(), ValidationError> {
101019		if let Some(ref val) = self.data_set_actn { val.validate()? }
101020		if let Some(ref vec) = self.stat { for item in vec { item.validate()? } }
101021		Ok(())
101022	}
101023}
101024
101025
101026// TradeData39Choice ...
101027#[cfg_attr(feature = "derive_debug", derive(Debug))]
101028#[cfg_attr(feature = "derive_default", derive(Default))]
101029#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101030#[cfg_attr(feature = "derive_clone", derive(Clone))]
101031#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101032pub struct TradeData39Choice {
101033	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
101034	pub data_set_actn: Option<ReportPeriodActivity1Code>,
101035	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
101036	pub rpt: Option<Vec<TradeReport21Choice>>,
101037}
101038
101039impl TradeData39Choice {
101040	pub fn validate(&self) -> Result<(), ValidationError> {
101041		if let Some(ref val) = self.data_set_actn { val.validate()? }
101042		if let Some(ref vec) = self.rpt { for item in vec { item.validate()? } }
101043		Ok(())
101044	}
101045}
101046
101047
101048// TradeData40Choice ...
101049#[cfg_attr(feature = "derive_debug", derive(Debug))]
101050#[cfg_attr(feature = "derive_default", derive(Default))]
101051#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101052#[cfg_attr(feature = "derive_clone", derive(Clone))]
101053#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101054pub struct TradeData40Choice {
101055	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
101056	pub data_set_actn: Option<ReportPeriodActivity1Code>,
101057	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
101058	pub rpt: Option<Vec<TradeReport22Choice>>,
101059}
101060
101061impl TradeData40Choice {
101062	pub fn validate(&self) -> Result<(), ValidationError> {
101063		if let Some(ref val) = self.data_set_actn { val.validate()? }
101064		if let Some(ref vec) = self.rpt { for item in vec { item.validate()? } }
101065		Ok(())
101066	}
101067}
101068
101069
101070// TradeData43 ...
101071#[cfg_attr(feature = "derive_debug", derive(Debug))]
101072#[cfg_attr(feature = "derive_default", derive(Default))]
101073#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101074#[cfg_attr(feature = "derive_clone", derive(Clone))]
101075#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101076pub struct TradeData43 {
101077	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtySpcfcData") )]
101078	pub ctr_pty_spcfc_data: Vec<CounterpartySpecificData36>,
101079	#[cfg_attr( feature = "derive_serde", serde(rename = "CmonTradData") )]
101080	pub cmon_trad_data: CommonTradeDataReport71,
101081	#[cfg_attr( feature = "derive_serde", serde(rename = "Lvl", skip_serializing_if = "Option::is_none") )]
101082	pub lvl: Option<ModificationLevel1Code>,
101083	#[cfg_attr( feature = "derive_serde", serde(rename = "TechAttrbts", skip_serializing_if = "Option::is_none") )]
101084	pub tech_attrbts: Option<TechnicalAttributes5>,
101085	#[cfg_attr( feature = "derive_serde", serde(rename = "PblcDssmntnData", skip_serializing_if = "Option::is_none") )]
101086	pub pblc_dssmntn_data: Option<DisseminationData1>,
101087	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
101088	pub splmtry_data: Option<Vec<SupplementaryData1>>,
101089}
101090
101091impl TradeData43 {
101092	pub fn validate(&self) -> Result<(), ValidationError> {
101093		for item in &self.ctr_pty_spcfc_data { item.validate()? }
101094		self.cmon_trad_data.validate()?;
101095		if let Some(ref val) = self.lvl { val.validate()? }
101096		if let Some(ref val) = self.tech_attrbts { val.validate()? }
101097		if let Some(ref val) = self.pblc_dssmntn_data { val.validate()? }
101098		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
101099		Ok(())
101100	}
101101}
101102
101103
101104// TradeData59Choice ...
101105#[cfg_attr(feature = "derive_debug", derive(Debug))]
101106#[cfg_attr(feature = "derive_default", derive(Default))]
101107#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101108#[cfg_attr(feature = "derive_clone", derive(Clone))]
101109#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101110pub struct TradeData59Choice {
101111	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
101112	pub data_set_actn: Option<ReportPeriodActivity1Code>,
101113	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
101114	pub rpt: Option<Vec<TradeReport33Choice>>,
101115}
101116
101117impl TradeData59Choice {
101118	pub fn validate(&self) -> Result<(), ValidationError> {
101119		if let Some(ref val) = self.data_set_actn { val.validate()? }
101120		if let Some(ref vec) = self.rpt { for item in vec { item.validate()? } }
101121		Ok(())
101122	}
101123}
101124
101125
101126// TradeData60Choice ...
101127#[cfg_attr(feature = "derive_debug", derive(Debug))]
101128#[cfg_attr(feature = "derive_default", derive(Default))]
101129#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101130#[cfg_attr(feature = "derive_clone", derive(Clone))]
101131#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101132pub struct TradeData60Choice {
101133	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
101134	pub data_set_actn: Option<ReportPeriodActivity1Code>,
101135	#[cfg_attr( feature = "derive_serde", serde(rename = "Stat", skip_serializing_if = "Option::is_none") )]
101136	pub stat: Option<Vec<TradeStateReport23>>,
101137}
101138
101139impl TradeData60Choice {
101140	pub fn validate(&self) -> Result<(), ValidationError> {
101141		if let Some(ref val) = self.data_set_actn { val.validate()? }
101142		if let Some(ref vec) = self.stat { for item in vec { item.validate()? } }
101143		Ok(())
101144	}
101145}
101146
101147
101148// TradeData61Choice ...
101149#[cfg_attr(feature = "derive_debug", derive(Debug))]
101150#[cfg_attr(feature = "derive_default", derive(Default))]
101151#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101152#[cfg_attr(feature = "derive_clone", derive(Clone))]
101153#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101154pub struct TradeData61Choice {
101155	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
101156	pub data_set_actn: Option<ReportPeriodActivity1Code>,
101157	#[cfg_attr( feature = "derive_serde", serde(rename = "Rpt", skip_serializing_if = "Option::is_none") )]
101158	pub rpt: Option<Vec<TradeReport34Choice>>,
101159}
101160
101161impl TradeData61Choice {
101162	pub fn validate(&self) -> Result<(), ValidationError> {
101163		if let Some(ref val) = self.data_set_actn { val.validate()? }
101164		if let Some(ref vec) = self.rpt { for item in vec { item.validate()? } }
101165		Ok(())
101166	}
101167}
101168
101169
101170// TradeData62Choice ...
101171#[cfg_attr(feature = "derive_debug", derive(Debug))]
101172#[cfg_attr(feature = "derive_default", derive(Default))]
101173#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101174#[cfg_attr(feature = "derive_clone", derive(Clone))]
101175#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101176pub struct TradeData62Choice {
101177	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
101178	pub data_set_actn: Option<ReportPeriodActivity1Code>,
101179	#[cfg_attr( feature = "derive_serde", serde(rename = "Stat", skip_serializing_if = "Option::is_none") )]
101180	pub stat: Option<Vec<MarginReportData10>>,
101181}
101182
101183impl TradeData62Choice {
101184	pub fn validate(&self) -> Result<(), ValidationError> {
101185		if let Some(ref val) = self.data_set_actn { val.validate()? }
101186		if let Some(ref vec) = self.stat { for item in vec { item.validate()? } }
101187		Ok(())
101188	}
101189}
101190
101191
101192// TradeDateTimeQueryCriteria2 ...
101193#[cfg_attr(feature = "derive_debug", derive(Debug))]
101194#[cfg_attr(feature = "derive_default", derive(Default))]
101195#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101196#[cfg_attr(feature = "derive_clone", derive(Clone))]
101197#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101198pub struct TradeDateTimeQueryCriteria2 {
101199	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDtTm", skip_serializing_if = "Option::is_none") )]
101200	pub rptg_dt_tm: Option<DateTimePeriod1>,
101201	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnDtTm", skip_serializing_if = "Option::is_none") )]
101202	pub exctn_dt_tm: Option<DateTimePeriod1>,
101203	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
101204	pub mtrty_dt: Option<DateOrBlankQuery2Choice>,
101205	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
101206	pub termntn_dt: Option<DateOrBlankQuery2Choice>,
101207}
101208
101209impl TradeDateTimeQueryCriteria2 {
101210	pub fn validate(&self) -> Result<(), ValidationError> {
101211		if let Some(ref val) = self.rptg_dt_tm { val.validate()? }
101212		if let Some(ref val) = self.exctn_dt_tm { val.validate()? }
101213		if let Some(ref val) = self.mtrty_dt { val.validate()? }
101214		if let Some(ref val) = self.termntn_dt { val.validate()? }
101215		Ok(())
101216	}
101217}
101218
101219
101220// TradeDateTimeQueryCriteria6 ...
101221#[cfg_attr(feature = "derive_debug", derive(Debug))]
101222#[cfg_attr(feature = "derive_default", derive(Default))]
101223#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101224#[cfg_attr(feature = "derive_clone", derive(Clone))]
101225#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101226pub struct TradeDateTimeQueryCriteria6 {
101227	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDtTm", skip_serializing_if = "Option::is_none") )]
101228	pub rptg_dt_tm: Option<DateTimePeriod1>,
101229	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnDtTm", skip_serializing_if = "Option::is_none") )]
101230	pub exctn_dt_tm: Option<DateTimePeriod1>,
101231	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
101232	pub mtrty_dt: Option<DateOrBlankQuery2Choice>,
101233	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvDt", skip_serializing_if = "Option::is_none") )]
101234	pub fctv_dt: Option<DatePeriod1>,
101235	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnDtTm", skip_serializing_if = "Option::is_none") )]
101236	pub valtn_dt_tm: Option<DateTimePeriod1>,
101237	#[cfg_attr( feature = "derive_serde", serde(rename = "XprtnDt", skip_serializing_if = "Option::is_none") )]
101238	pub xprtn_dt: Option<DateOrBlankQuery2Choice>,
101239	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlyTermntnDt", skip_serializing_if = "Option::is_none") )]
101240	pub early_termntn_dt: Option<DatePeriod1>,
101241	#[cfg_attr( feature = "derive_serde", serde(rename = "CollTmStmp", skip_serializing_if = "Option::is_none") )]
101242	pub coll_tm_stmp: Option<DateTimeOrBlankQuery1Choice>,
101243	#[cfg_attr( feature = "derive_serde", serde(rename = "HstrclAsOfDt", skip_serializing_if = "Option::is_none") )]
101244	pub hstrcl_as_of_dt: Option<String>,
101245}
101246
101247impl TradeDateTimeQueryCriteria6 {
101248	pub fn validate(&self) -> Result<(), ValidationError> {
101249		if let Some(ref val) = self.rptg_dt_tm { val.validate()? }
101250		if let Some(ref val) = self.exctn_dt_tm { val.validate()? }
101251		if let Some(ref val) = self.mtrty_dt { val.validate()? }
101252		if let Some(ref val) = self.fctv_dt { val.validate()? }
101253		if let Some(ref val) = self.valtn_dt_tm { val.validate()? }
101254		if let Some(ref val) = self.xprtn_dt { val.validate()? }
101255		if let Some(ref val) = self.early_termntn_dt { val.validate()? }
101256		if let Some(ref val) = self.coll_tm_stmp { val.validate()? }
101257		Ok(())
101258	}
101259}
101260
101261
101262// TradeError9 ...
101263#[cfg_attr(feature = "derive_debug", derive(Debug))]
101264#[cfg_attr(feature = "derive_default", derive(Default))]
101265#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101266#[cfg_attr(feature = "derive_clone", derive(Clone))]
101267#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101268pub struct TradeError9 {
101269	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
101270	pub tech_rcrd_id: Option<String>,
101271	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtySpcfcData") )]
101272	pub ctr_pty_spcfc_data: CounterpartyData88,
101273	#[cfg_attr( feature = "derive_serde", serde(rename = "LnData") )]
101274	pub ln_data: LoanData86,
101275	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
101276	pub splmtry_data: Option<Vec<SupplementaryData1>>,
101277}
101278
101279impl TradeError9 {
101280	pub fn validate(&self) -> Result<(), ValidationError> {
101281		if let Some(ref val) = self.tech_rcrd_id {
101282			if val.chars().count() < 1 {
101283				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
101284			}
101285			if val.chars().count() > 140 {
101286				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
101287			}
101288		}
101289		self.ctr_pty_spcfc_data.validate()?;
101290		self.ln_data.validate()?;
101291		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
101292		Ok(())
101293	}
101294}
101295
101296
101297// TradeMarket2Code ...
101298#[cfg_attr(feature = "derive_debug", derive(Debug))]
101299#[cfg_attr(feature = "derive_default", derive(Default))]
101300#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101301#[cfg_attr(feature = "derive_clone", derive(Clone))]
101302#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101303pub enum TradeMarket2Code {
101304	#[cfg_attr(feature = "derive_default", default)]
101305	#[cfg_attr( feature = "derive_serde", serde(rename = "DMST") )]
101306	CodeDMST,
101307	#[cfg_attr( feature = "derive_serde", serde(rename = "FRGN") )]
101308	CodeFRGN,
101309}
101310
101311impl TradeMarket2Code {
101312	pub fn validate(&self) -> Result<(), ValidationError> {
101313		Ok(())
101314	}
101315}
101316
101317
101318// TradeNewTransaction13 ...
101319#[cfg_attr(feature = "derive_debug", derive(Debug))]
101320#[cfg_attr(feature = "derive_default", derive(Default))]
101321#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101322#[cfg_attr(feature = "derive_clone", derive(Clone))]
101323#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101324pub struct TradeNewTransaction13 {
101325	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
101326	pub tech_rcrd_id: Option<String>,
101327	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtySpcfcData") )]
101328	pub ctr_pty_spcfc_data: CounterpartyData88,
101329	#[cfg_attr( feature = "derive_serde", serde(rename = "LnData") )]
101330	pub ln_data: TransactionLoanData30Choice,
101331	#[cfg_attr( feature = "derive_serde", serde(rename = "CollData", skip_serializing_if = "Option::is_none") )]
101332	pub coll_data: Option<TransactionCollateralData18Choice>,
101333	#[cfg_attr( feature = "derive_serde", serde(rename = "LvlTp") )]
101334	pub lvl_tp: ModificationLevel1Code,
101335	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
101336	pub splmtry_data: Option<Vec<SupplementaryData1>>,
101337}
101338
101339impl TradeNewTransaction13 {
101340	pub fn validate(&self) -> Result<(), ValidationError> {
101341		if let Some(ref val) = self.tech_rcrd_id {
101342			if val.chars().count() < 1 {
101343				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
101344			}
101345			if val.chars().count() > 140 {
101346				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
101347			}
101348		}
101349		self.ctr_pty_spcfc_data.validate()?;
101350		self.ln_data.validate()?;
101351		if let Some(ref val) = self.coll_data { val.validate()? }
101352		self.lvl_tp.validate()?;
101353		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
101354		Ok(())
101355	}
101356}
101357
101358
101359// TradeNonConfirmation1 ...
101360#[cfg_attr(feature = "derive_debug", derive(Debug))]
101361#[cfg_attr(feature = "derive_default", derive(Default))]
101362#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101363#[cfg_attr(feature = "derive_clone", derive(Clone))]
101364#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101365pub struct TradeNonConfirmation1 {
101366	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
101367	pub tp: TradeConfirmationType2Code,
101368}
101369
101370impl TradeNonConfirmation1 {
101371	pub fn validate(&self) -> Result<(), ValidationError> {
101372		self.tp.validate()?;
101373		Ok(())
101374	}
101375}
101376
101377
101378// TradeParty6 ...
101379#[cfg_attr(feature = "derive_debug", derive(Debug))]
101380#[cfg_attr(feature = "derive_default", derive(Default))]
101381#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101382#[cfg_attr(feature = "derive_clone", derive(Clone))]
101383#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101384pub struct TradeParty6 {
101385	#[cfg_attr( feature = "derive_serde", serde(rename = "PtyId") )]
101386	pub pty_id: PartyIdentification272,
101387	#[cfg_attr( feature = "derive_serde", serde(rename = "LglOrg", skip_serializing_if = "Option::is_none") )]
101388	pub lgl_org: Option<LegalOrganisation2>,
101389	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxPty", skip_serializing_if = "Option::is_none") )]
101390	pub tax_pty: Option<Vec<TaxParty4>>,
101391}
101392
101393impl TradeParty6 {
101394	pub fn validate(&self) -> Result<(), ValidationError> {
101395		self.pty_id.validate()?;
101396		if let Some(ref val) = self.lgl_org { val.validate()? }
101397		if let Some(ref vec) = self.tax_pty { for item in vec { item.validate()? } }
101398		Ok(())
101399	}
101400}
101401
101402
101403// TradePartyIdentificationQuery10Choice ...
101404#[cfg_attr(feature = "derive_debug", derive(Debug))]
101405#[cfg_attr(feature = "derive_default", derive(Default))]
101406#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101407#[cfg_attr(feature = "derive_clone", derive(Clone))]
101408#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101409pub struct TradePartyIdentificationQuery10Choice {
101410	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
101411	pub id: Option<Vec<PartyIdentification248Choice>>,
101412	#[cfg_attr( feature = "derive_serde", serde(rename = "NotRptd", skip_serializing_if = "Option::is_none") )]
101413	pub not_rptd: Option<NotReported1Code>,
101414}
101415
101416impl TradePartyIdentificationQuery10Choice {
101417	pub fn validate(&self) -> Result<(), ValidationError> {
101418		if let Some(ref vec) = self.id { for item in vec { item.validate()? } }
101419		if let Some(ref val) = self.not_rptd { val.validate()? }
101420		Ok(())
101421	}
101422}
101423
101424
101425// TradePartyIdentificationQuery11Choice ...
101426#[cfg_attr(feature = "derive_debug", derive(Debug))]
101427#[cfg_attr(feature = "derive_default", derive(Default))]
101428#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101429#[cfg_attr(feature = "derive_clone", derive(Clone))]
101430#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101431pub struct TradePartyIdentificationQuery11Choice {
101432	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
101433	pub id: Option<Vec<OrganisationIdentification15Choice>>,
101434	#[cfg_attr( feature = "derive_serde", serde(rename = "NotRptd", skip_serializing_if = "Option::is_none") )]
101435	pub not_rptd: Option<NotReported1Code>,
101436}
101437
101438impl TradePartyIdentificationQuery11Choice {
101439	pub fn validate(&self) -> Result<(), ValidationError> {
101440		if let Some(ref vec) = self.id { for item in vec { item.validate()? } }
101441		if let Some(ref val) = self.not_rptd { val.validate()? }
101442		Ok(())
101443	}
101444}
101445
101446
101447// TradePartyIdentificationQuery8 ...
101448#[cfg_attr(feature = "derive_debug", derive(Debug))]
101449#[cfg_attr(feature = "derive_default", derive(Default))]
101450#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101451#[cfg_attr(feature = "derive_clone", derive(Clone))]
101452#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101453pub struct TradePartyIdentificationQuery8 {
101454	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
101455	pub lei: Option<Vec<String>>,
101456	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
101457	pub any_bic: Option<Vec<String>>,
101458	#[cfg_attr( feature = "derive_serde", serde(rename = "ClntId", skip_serializing_if = "Option::is_none") )]
101459	pub clnt_id: Option<Vec<String>>,
101460	#[cfg_attr( feature = "derive_serde", serde(rename = "NotRptd", skip_serializing_if = "Option::is_none") )]
101461	pub not_rptd: Option<NotReported1Code>,
101462}
101463
101464impl TradePartyIdentificationQuery8 {
101465	pub fn validate(&self) -> Result<(), ValidationError> {
101466		if let Some(ref vec) = self.lei {
101467			for item in vec {
101468				let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
101469				if !pattern.is_match(&item) {
101470					return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
101471				}
101472			}
101473		}
101474		if let Some(ref vec) = self.any_bic {
101475			for item in vec {
101476				let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
101477				if !pattern.is_match(&item) {
101478					return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
101479				}
101480			}
101481		}
101482		if let Some(ref vec) = self.clnt_id {
101483			for item in vec {
101484				if item.chars().count() < 1 {
101485					return Err(ValidationError::new(1001, "clnt_id is shorter than the minimum length of 1".to_string()));
101486				}
101487				if item.chars().count() > 50 {
101488					return Err(ValidationError::new(1002, "clnt_id exceeds the maximum length of 50".to_string()));
101489				}
101490			}
101491		}
101492		if let Some(ref val) = self.not_rptd { val.validate()? }
101493		Ok(())
101494	}
101495}
101496
101497
101498// TradePartyIdentificationQuery9 ...
101499#[cfg_attr(feature = "derive_debug", derive(Debug))]
101500#[cfg_attr(feature = "derive_default", derive(Default))]
101501#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101502#[cfg_attr(feature = "derive_clone", derive(Clone))]
101503#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101504pub struct TradePartyIdentificationQuery9 {
101505	#[cfg_attr( feature = "derive_serde", serde(rename = "LEI", skip_serializing_if = "Option::is_none") )]
101506	pub lei: Option<Vec<String>>,
101507	#[cfg_attr( feature = "derive_serde", serde(rename = "CtryCd", skip_serializing_if = "Option::is_none") )]
101508	pub ctry_cd: Option<Vec<String>>,
101509	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
101510	pub any_bic: Option<Vec<String>>,
101511	#[cfg_attr( feature = "derive_serde", serde(rename = "ClntId", skip_serializing_if = "Option::is_none") )]
101512	pub clnt_id: Option<Vec<String>>,
101513	#[cfg_attr( feature = "derive_serde", serde(rename = "NotRptd", skip_serializing_if = "Option::is_none") )]
101514	pub not_rptd: Option<NotReported1Code>,
101515}
101516
101517impl TradePartyIdentificationQuery9 {
101518	pub fn validate(&self) -> Result<(), ValidationError> {
101519		if let Some(ref vec) = self.lei {
101520			for item in vec {
101521				let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
101522				if !pattern.is_match(&item) {
101523					return Err(ValidationError::new(1005, "lei does not match the required pattern".to_string()));
101524				}
101525			}
101526		}
101527		if let Some(ref vec) = self.ctry_cd {
101528			for item in vec {
101529				let pattern = Regex::new("[A-Z]{2,2}").unwrap();
101530				if !pattern.is_match(&item) {
101531					return Err(ValidationError::new(1005, "ctry_cd does not match the required pattern".to_string()));
101532				}
101533			}
101534		}
101535		if let Some(ref vec) = self.any_bic {
101536			for item in vec {
101537				let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
101538				if !pattern.is_match(&item) {
101539					return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
101540				}
101541			}
101542		}
101543		if let Some(ref vec) = self.clnt_id {
101544			for item in vec {
101545				if item.chars().count() < 1 {
101546					return Err(ValidationError::new(1001, "clnt_id is shorter than the minimum length of 1".to_string()));
101547				}
101548				if item.chars().count() > 50 {
101549					return Err(ValidationError::new(1002, "clnt_id exceeds the maximum length of 50".to_string()));
101550				}
101551			}
101552		}
101553		if let Some(ref val) = self.not_rptd { val.validate()? }
101554		Ok(())
101555	}
101556}
101557
101558
101559// TradePartyQueryCriteria5 ...
101560#[cfg_attr(feature = "derive_debug", derive(Debug))]
101561#[cfg_attr(feature = "derive_default", derive(Default))]
101562#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101563#[cfg_attr(feature = "derive_clone", derive(Clone))]
101564#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101565pub struct TradePartyQueryCriteria5 {
101566	#[cfg_attr( feature = "derive_serde", serde(rename = "Oprtr") )]
101567	pub oprtr: Operation3Code,
101568	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty", skip_serializing_if = "Option::is_none") )]
101569	pub rptg_ctr_pty: Option<TradePartyIdentificationQuery8>,
101570	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPtyBrnch", skip_serializing_if = "Option::is_none") )]
101571	pub rptg_ctr_pty_brnch: Option<TradePartyIdentificationQuery9>,
101572	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty", skip_serializing_if = "Option::is_none") )]
101573	pub othr_ctr_pty: Option<TradePartyIdentificationQuery8>,
101574	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPtyBrnch", skip_serializing_if = "Option::is_none") )]
101575	pub othr_ctr_pty_brnch: Option<TradePartyIdentificationQuery9>,
101576	#[cfg_attr( feature = "derive_serde", serde(rename = "Bnfcry", skip_serializing_if = "Option::is_none") )]
101577	pub bnfcry: Option<TradePartyIdentificationQuery8>,
101578	#[cfg_attr( feature = "derive_serde", serde(rename = "SubmitgAgt", skip_serializing_if = "Option::is_none") )]
101579	pub submitg_agt: Option<TradePartyIdentificationQuery8>,
101580	#[cfg_attr( feature = "derive_serde", serde(rename = "Brkr", skip_serializing_if = "Option::is_none") )]
101581	pub brkr: Option<TradePartyIdentificationQuery8>,
101582	#[cfg_attr( feature = "derive_serde", serde(rename = "CCP", skip_serializing_if = "Option::is_none") )]
101583	pub ccp: Option<TradePartyIdentificationQuery8>,
101584	#[cfg_attr( feature = "derive_serde", serde(rename = "AgtLndr", skip_serializing_if = "Option::is_none") )]
101585	pub agt_lndr: Option<TradePartyIdentificationQuery8>,
101586	#[cfg_attr( feature = "derive_serde", serde(rename = "TrptyAgt", skip_serializing_if = "Option::is_none") )]
101587	pub trpty_agt: Option<TradePartyIdentificationQuery8>,
101588}
101589
101590impl TradePartyQueryCriteria5 {
101591	pub fn validate(&self) -> Result<(), ValidationError> {
101592		self.oprtr.validate()?;
101593		if let Some(ref val) = self.rptg_ctr_pty { val.validate()? }
101594		if let Some(ref val) = self.rptg_ctr_pty_brnch { val.validate()? }
101595		if let Some(ref val) = self.othr_ctr_pty { val.validate()? }
101596		if let Some(ref val) = self.othr_ctr_pty_brnch { val.validate()? }
101597		if let Some(ref val) = self.bnfcry { val.validate()? }
101598		if let Some(ref val) = self.submitg_agt { val.validate()? }
101599		if let Some(ref val) = self.brkr { val.validate()? }
101600		if let Some(ref val) = self.ccp { val.validate()? }
101601		if let Some(ref val) = self.agt_lndr { val.validate()? }
101602		if let Some(ref val) = self.trpty_agt { val.validate()? }
101603		Ok(())
101604	}
101605}
101606
101607
101608// TradePartyQueryCriteria7 ...
101609#[cfg_attr(feature = "derive_debug", derive(Debug))]
101610#[cfg_attr(feature = "derive_default", derive(Default))]
101611#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101612#[cfg_attr(feature = "derive_clone", derive(Clone))]
101613#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101614pub struct TradePartyQueryCriteria7 {
101615	#[cfg_attr( feature = "derive_serde", serde(rename = "Oprtr") )]
101616	pub oprtr: Operation3Code,
101617	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty", skip_serializing_if = "Option::is_none") )]
101618	pub rptg_ctr_pty: Option<TradePartyIdentificationQuery10Choice>,
101619	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty", skip_serializing_if = "Option::is_none") )]
101620	pub othr_ctr_pty: Option<TradePartyIdentificationQuery10Choice>,
101621	#[cfg_attr( feature = "derive_serde", serde(rename = "Bnfcry", skip_serializing_if = "Option::is_none") )]
101622	pub bnfcry: Option<TradePartyIdentificationQuery10Choice>,
101623	#[cfg_attr( feature = "derive_serde", serde(rename = "NttyRspnsblForRpt", skip_serializing_if = "Option::is_none") )]
101624	pub ntty_rspnsbl_for_rpt: Option<TradePartyIdentificationQuery11Choice>,
101625	#[cfg_attr( feature = "derive_serde", serde(rename = "SubmitgAgt", skip_serializing_if = "Option::is_none") )]
101626	pub submitg_agt: Option<TradePartyIdentificationQuery11Choice>,
101627	#[cfg_attr( feature = "derive_serde", serde(rename = "Brkr", skip_serializing_if = "Option::is_none") )]
101628	pub brkr: Option<TradePartyIdentificationQuery11Choice>,
101629	#[cfg_attr( feature = "derive_serde", serde(rename = "CCP", skip_serializing_if = "Option::is_none") )]
101630	pub ccp: Option<TradePartyIdentificationQuery11Choice>,
101631	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrMmb", skip_serializing_if = "Option::is_none") )]
101632	pub clr_mmb: Option<TradePartyIdentificationQuery10Choice>,
101633}
101634
101635impl TradePartyQueryCriteria7 {
101636	pub fn validate(&self) -> Result<(), ValidationError> {
101637		self.oprtr.validate()?;
101638		if let Some(ref val) = self.rptg_ctr_pty { val.validate()? }
101639		if let Some(ref val) = self.othr_ctr_pty { val.validate()? }
101640		if let Some(ref val) = self.bnfcry { val.validate()? }
101641		if let Some(ref val) = self.ntty_rspnsbl_for_rpt { val.validate()? }
101642		if let Some(ref val) = self.submitg_agt { val.validate()? }
101643		if let Some(ref val) = self.brkr { val.validate()? }
101644		if let Some(ref val) = self.ccp { val.validate()? }
101645		if let Some(ref val) = self.clr_mmb { val.validate()? }
101646		Ok(())
101647	}
101648}
101649
101650
101651// TradeQueryCriteria10 ...
101652#[cfg_attr(feature = "derive_debug", derive(Debug))]
101653#[cfg_attr(feature = "derive_default", derive(Default))]
101654#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101655#[cfg_attr(feature = "derive_clone", derive(Clone))]
101656#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101657pub struct TradeQueryCriteria10 {
101658	#[cfg_attr( feature = "derive_serde", serde(rename = "TradLifeCyclHstry") )]
101659	pub trad_life_cycl_hstry: bool,
101660	#[cfg_attr( feature = "derive_serde", serde(rename = "OutsdngTradInd") )]
101661	pub outsdng_trad_ind: bool,
101662	#[cfg_attr( feature = "derive_serde", serde(rename = "TradPtyCrit", skip_serializing_if = "Option::is_none") )]
101663	pub trad_pty_crit: Option<TradePartyQueryCriteria5>,
101664	#[cfg_attr( feature = "derive_serde", serde(rename = "TradTpCrit", skip_serializing_if = "Option::is_none") )]
101665	pub trad_tp_crit: Option<TradeTypeQueryCriteria2>,
101666	#[cfg_attr( feature = "derive_serde", serde(rename = "TmCrit", skip_serializing_if = "Option::is_none") )]
101667	pub tm_crit: Option<TradeDateTimeQueryCriteria2>,
101668	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCrit", skip_serializing_if = "Option::is_none") )]
101669	pub othr_crit: Option<TradeAdditionalQueryCriteria7>,
101670}
101671
101672impl TradeQueryCriteria10 {
101673	pub fn validate(&self) -> Result<(), ValidationError> {
101674		if let Some(ref val) = self.trad_pty_crit { val.validate()? }
101675		if let Some(ref val) = self.trad_tp_crit { val.validate()? }
101676		if let Some(ref val) = self.tm_crit { val.validate()? }
101677		if let Some(ref val) = self.othr_crit { val.validate()? }
101678		Ok(())
101679	}
101680}
101681
101682
101683// TradeQueryCriteria14 ...
101684#[cfg_attr(feature = "derive_debug", derive(Debug))]
101685#[cfg_attr(feature = "derive_default", derive(Default))]
101686#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101687#[cfg_attr(feature = "derive_clone", derive(Clone))]
101688#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101689pub struct TradeQueryCriteria14 {
101690	#[cfg_attr( feature = "derive_serde", serde(rename = "TradLifeCyclHstry", skip_serializing_if = "Option::is_none") )]
101691	pub trad_life_cycl_hstry: Option<bool>,
101692	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnLifeCyclHstry", skip_serializing_if = "Option::is_none") )]
101693	pub mrgn_life_cycl_hstry: Option<bool>,
101694	#[cfg_attr( feature = "derive_serde", serde(rename = "OutsdngTradInd") )]
101695	pub outsdng_trad_ind: bool,
101696	#[cfg_attr( feature = "derive_serde", serde(rename = "TradPtyCrit", skip_serializing_if = "Option::is_none") )]
101697	pub trad_pty_crit: Option<TradePartyQueryCriteria7>,
101698	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmCrit", skip_serializing_if = "Option::is_none") )]
101699	pub fin_instrm_crit: Option<TradeSecurityIdentificationQueryCriteria3>,
101700	#[cfg_attr( feature = "derive_serde", serde(rename = "TmCrit", skip_serializing_if = "Option::is_none") )]
101701	pub tm_crit: Option<TradeDateTimeQueryCriteria6>,
101702	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCrit", skip_serializing_if = "Option::is_none") )]
101703	pub othr_crit: Option<TradeAdditionalQueryCriteria9>,
101704}
101705
101706impl TradeQueryCriteria14 {
101707	pub fn validate(&self) -> Result<(), ValidationError> {
101708		if let Some(ref val) = self.trad_pty_crit { val.validate()? }
101709		if let Some(ref val) = self.fin_instrm_crit { val.validate()? }
101710		if let Some(ref val) = self.tm_crit { val.validate()? }
101711		if let Some(ref val) = self.othr_crit { val.validate()? }
101712		Ok(())
101713	}
101714}
101715
101716
101717// TradeQueryExecutionFrequency3 ...
101718#[cfg_attr(feature = "derive_debug", derive(Debug))]
101719#[cfg_attr(feature = "derive_default", derive(Default))]
101720#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101721#[cfg_attr(feature = "derive_clone", derive(Clone))]
101722#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101723pub struct TradeQueryExecutionFrequency3 {
101724	#[cfg_attr( feature = "derive_serde", serde(rename = "FrqcyTp") )]
101725	pub frqcy_tp: Frequency14Code,
101726	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryDay", skip_serializing_if = "Option::is_none") )]
101727	pub dlvry_day: Option<Vec<WeekDay3Code>>,
101728	#[cfg_attr( feature = "derive_serde", serde(rename = "DayOfMnth", skip_serializing_if = "Option::is_none") )]
101729	pub day_of_mnth: Option<Vec<f64>>,
101730}
101731
101732impl TradeQueryExecutionFrequency3 {
101733	pub fn validate(&self) -> Result<(), ValidationError> {
101734		self.frqcy_tp.validate()?;
101735		if let Some(ref vec) = self.dlvry_day { for item in vec { item.validate()? } }
101736		Ok(())
101737	}
101738}
101739
101740
101741// TradeRecurrentQuery5 ...
101742#[cfg_attr(feature = "derive_debug", derive(Debug))]
101743#[cfg_attr(feature = "derive_default", derive(Default))]
101744#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101745#[cfg_attr(feature = "derive_clone", derive(Clone))]
101746#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101747pub struct TradeRecurrentQuery5 {
101748	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp") )]
101749	pub qry_tp: String,
101750	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy") )]
101751	pub frqcy: TradeQueryExecutionFrequency3,
101752	#[cfg_attr( feature = "derive_serde", serde(rename = "VldUntil") )]
101753	pub vld_until: String,
101754}
101755
101756impl TradeRecurrentQuery5 {
101757	pub fn validate(&self) -> Result<(), ValidationError> {
101758		if self.qry_tp.chars().count() < 1 {
101759			return Err(ValidationError::new(1001, "qry_tp is shorter than the minimum length of 1".to_string()));
101760		}
101761		if self.qry_tp.chars().count() > 1000 {
101762			return Err(ValidationError::new(1002, "qry_tp exceeds the maximum length of 1000".to_string()));
101763		}
101764		self.frqcy.validate()?;
101765		Ok(())
101766	}
101767}
101768
101769
101770// TradeRecurrentQuery7 ...
101771#[cfg_attr(feature = "derive_debug", derive(Debug))]
101772#[cfg_attr(feature = "derive_default", derive(Default))]
101773#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101774#[cfg_attr(feature = "derive_clone", derive(Clone))]
101775#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101776pub struct TradeRecurrentQuery7 {
101777	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp") )]
101778	pub qry_tp: String,
101779	#[cfg_attr( feature = "derive_serde", serde(rename = "Frqcy") )]
101780	pub frqcy: Vec<TradeQueryExecutionFrequency3>,
101781	#[cfg_attr( feature = "derive_serde", serde(rename = "VldUntil") )]
101782	pub vld_until: String,
101783}
101784
101785impl TradeRecurrentQuery7 {
101786	pub fn validate(&self) -> Result<(), ValidationError> {
101787		if self.qry_tp.chars().count() < 1 {
101788			return Err(ValidationError::new(1001, "qry_tp is shorter than the minimum length of 1".to_string()));
101789		}
101790		if self.qry_tp.chars().count() > 1000 {
101791			return Err(ValidationError::new(1002, "qry_tp exceeds the maximum length of 1000".to_string()));
101792		}
101793		for item in &self.frqcy { item.validate()? }
101794		Ok(())
101795	}
101796}
101797
101798
101799// TradeReport21Choice ...
101800#[cfg_attr(feature = "derive_debug", derive(Debug))]
101801#[cfg_attr(feature = "derive_default", derive(Default))]
101802#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101803#[cfg_attr(feature = "derive_clone", derive(Clone))]
101804#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101805pub struct TradeReport21Choice {
101806	#[cfg_attr( feature = "derive_serde", serde(rename = "New", skip_serializing_if = "Option::is_none") )]
101807	pub new: Option<CollateralMarginCorrection6>,
101808	#[cfg_attr( feature = "derive_serde", serde(rename = "Err", skip_serializing_if = "Option::is_none") )]
101809	pub err: Option<CollateralMarginError4>,
101810	#[cfg_attr( feature = "derive_serde", serde(rename = "Crrctn", skip_serializing_if = "Option::is_none") )]
101811	pub crrctn: Option<CollateralMarginCorrection6>,
101812	#[cfg_attr( feature = "derive_serde", serde(rename = "TradUpd", skip_serializing_if = "Option::is_none") )]
101813	pub trad_upd: Option<CollateralMarginMarginUpdate5>,
101814}
101815
101816impl TradeReport21Choice {
101817	pub fn validate(&self) -> Result<(), ValidationError> {
101818		if let Some(ref val) = self.new { val.validate()? }
101819		if let Some(ref val) = self.err { val.validate()? }
101820		if let Some(ref val) = self.crrctn { val.validate()? }
101821		if let Some(ref val) = self.trad_upd { val.validate()? }
101822		Ok(())
101823	}
101824}
101825
101826
101827// TradeReport22Choice ...
101828#[cfg_attr(feature = "derive_debug", derive(Debug))]
101829#[cfg_attr(feature = "derive_default", derive(Default))]
101830#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101831#[cfg_attr(feature = "derive_clone", derive(Clone))]
101832#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101833pub struct TradeReport22Choice {
101834	#[cfg_attr( feature = "derive_serde", serde(rename = "New", skip_serializing_if = "Option::is_none") )]
101835	pub new: Option<TradeNewTransaction13>,
101836	#[cfg_attr( feature = "derive_serde", serde(rename = "Mod", skip_serializing_if = "Option::is_none") )]
101837	pub mod_attr: Option<TradeTransactionCorrection13>,
101838	#[cfg_attr( feature = "derive_serde", serde(rename = "Err", skip_serializing_if = "Option::is_none") )]
101839	pub err: Option<TradeError9>,
101840	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlyTermntn", skip_serializing_if = "Option::is_none") )]
101841	pub early_termntn: Option<TradeError9>,
101842	#[cfg_attr( feature = "derive_serde", serde(rename = "PosCmpnt", skip_serializing_if = "Option::is_none") )]
101843	pub pos_cmpnt: Option<TradeTransactionPositionComponent8>,
101844	#[cfg_attr( feature = "derive_serde", serde(rename = "CollUpd", skip_serializing_if = "Option::is_none") )]
101845	pub coll_upd: Option<TradeTransactionCollateralUpdate8>,
101846	#[cfg_attr( feature = "derive_serde", serde(rename = "Crrctn", skip_serializing_if = "Option::is_none") )]
101847	pub crrctn: Option<TradeTransactionCorrection13>,
101848	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnUpd", skip_serializing_if = "Option::is_none") )]
101849	pub valtn_upd: Option<TradeValuationUpdate9>,
101850}
101851
101852impl TradeReport22Choice {
101853	pub fn validate(&self) -> Result<(), ValidationError> {
101854		if let Some(ref val) = self.new { val.validate()? }
101855		if let Some(ref val) = self.mod_attr { val.validate()? }
101856		if let Some(ref val) = self.err { val.validate()? }
101857		if let Some(ref val) = self.early_termntn { val.validate()? }
101858		if let Some(ref val) = self.pos_cmpnt { val.validate()? }
101859		if let Some(ref val) = self.coll_upd { val.validate()? }
101860		if let Some(ref val) = self.crrctn { val.validate()? }
101861		if let Some(ref val) = self.valtn_upd { val.validate()? }
101862		Ok(())
101863	}
101864}
101865
101866
101867// TradeReport33Choice ...
101868#[cfg_attr(feature = "derive_debug", derive(Debug))]
101869#[cfg_attr(feature = "derive_default", derive(Default))]
101870#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101871#[cfg_attr(feature = "derive_clone", derive(Clone))]
101872#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101873pub struct TradeReport33Choice {
101874	#[cfg_attr( feature = "derive_serde", serde(rename = "New", skip_serializing_if = "Option::is_none") )]
101875	pub new: Option<TradeData43>,
101876	#[cfg_attr( feature = "derive_serde", serde(rename = "Mod", skip_serializing_if = "Option::is_none") )]
101877	pub mod_attr: Option<TradeData43>,
101878	#[cfg_attr( feature = "derive_serde", serde(rename = "Crrctn", skip_serializing_if = "Option::is_none") )]
101879	pub crrctn: Option<TradeData43>,
101880	#[cfg_attr( feature = "derive_serde", serde(rename = "Termntn", skip_serializing_if = "Option::is_none") )]
101881	pub termntn: Option<TradeData43>,
101882	#[cfg_attr( feature = "derive_serde", serde(rename = "PosCmpnt", skip_serializing_if = "Option::is_none") )]
101883	pub pos_cmpnt: Option<TradeData43>,
101884	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnUpd", skip_serializing_if = "Option::is_none") )]
101885	pub valtn_upd: Option<TradeData43>,
101886	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmprssn", skip_serializing_if = "Option::is_none") )]
101887	pub cmprssn: Option<TradeData43>,
101888	#[cfg_attr( feature = "derive_serde", serde(rename = "Err", skip_serializing_if = "Option::is_none") )]
101889	pub err: Option<TradeData43>,
101890	#[cfg_attr( feature = "derive_serde", serde(rename = "PortOut", skip_serializing_if = "Option::is_none") )]
101891	pub port_out: Option<TradeData43>,
101892	#[cfg_attr( feature = "derive_serde", serde(rename = "Rvv", skip_serializing_if = "Option::is_none") )]
101893	pub rvv: Option<TradeData43>,
101894	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
101895	pub othr: Option<TradeData43>,
101896}
101897
101898impl TradeReport33Choice {
101899	pub fn validate(&self) -> Result<(), ValidationError> {
101900		if let Some(ref val) = self.new { val.validate()? }
101901		if let Some(ref val) = self.mod_attr { val.validate()? }
101902		if let Some(ref val) = self.crrctn { val.validate()? }
101903		if let Some(ref val) = self.termntn { val.validate()? }
101904		if let Some(ref val) = self.pos_cmpnt { val.validate()? }
101905		if let Some(ref val) = self.valtn_upd { val.validate()? }
101906		if let Some(ref val) = self.cmprssn { val.validate()? }
101907		if let Some(ref val) = self.err { val.validate()? }
101908		if let Some(ref val) = self.port_out { val.validate()? }
101909		if let Some(ref val) = self.rvv { val.validate()? }
101910		if let Some(ref val) = self.othr { val.validate()? }
101911		Ok(())
101912	}
101913}
101914
101915
101916// TradeReport34Choice ...
101917#[cfg_attr(feature = "derive_debug", derive(Debug))]
101918#[cfg_attr(feature = "derive_default", derive(Default))]
101919#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101920#[cfg_attr(feature = "derive_clone", derive(Clone))]
101921#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101922pub struct TradeReport34Choice {
101923	#[cfg_attr( feature = "derive_serde", serde(rename = "New", skip_serializing_if = "Option::is_none") )]
101924	pub new: Option<MarginReportData9>,
101925	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnUpd", skip_serializing_if = "Option::is_none") )]
101926	pub mrgn_upd: Option<MarginReportData9>,
101927	#[cfg_attr( feature = "derive_serde", serde(rename = "Err", skip_serializing_if = "Option::is_none") )]
101928	pub err: Option<MarginReportData9>,
101929	#[cfg_attr( feature = "derive_serde", serde(rename = "Crrctn", skip_serializing_if = "Option::is_none") )]
101930	pub crrctn: Option<MarginReportData9>,
101931}
101932
101933impl TradeReport34Choice {
101934	pub fn validate(&self) -> Result<(), ValidationError> {
101935		if let Some(ref val) = self.new { val.validate()? }
101936		if let Some(ref val) = self.mrgn_upd { val.validate()? }
101937		if let Some(ref val) = self.err { val.validate()? }
101938		if let Some(ref val) = self.crrctn { val.validate()? }
101939		Ok(())
101940	}
101941}
101942
101943
101944// TradeReportHeader4 ...
101945#[cfg_attr(feature = "derive_debug", derive(Debug))]
101946#[cfg_attr(feature = "derive_default", derive(Default))]
101947#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101948#[cfg_attr(feature = "derive_clone", derive(Clone))]
101949#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
101950pub struct TradeReportHeader4 {
101951	#[cfg_attr( feature = "derive_serde", serde(rename = "RptExctnDt", skip_serializing_if = "Option::is_none") )]
101952	pub rpt_exctn_dt: Option<String>,
101953	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgPgntn", skip_serializing_if = "Option::is_none") )]
101954	pub msg_pgntn: Option<Pagination1>,
101955	#[cfg_attr( feature = "derive_serde", serde(rename = "NbRcrds") )]
101956	pub nb_rcrds: f64,
101957	#[cfg_attr( feature = "derive_serde", serde(rename = "CmptntAuthrty", skip_serializing_if = "Option::is_none") )]
101958	pub cmptnt_authrty: Option<Vec<String>>,
101959	#[cfg_attr( feature = "derive_serde", serde(rename = "NewTradRpstryIdr", skip_serializing_if = "Option::is_none") )]
101960	pub new_trad_rpstry_idr: Option<OrganisationIdentification15Choice>,
101961	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPurp", skip_serializing_if = "Option::is_none") )]
101962	pub rptg_purp: Option<Vec<String>>,
101963}
101964
101965impl TradeReportHeader4 {
101966	pub fn validate(&self) -> Result<(), ValidationError> {
101967		if let Some(ref val) = self.msg_pgntn { val.validate()? }
101968		if let Some(ref vec) = self.cmptnt_authrty {
101969			for item in vec {
101970				if item.chars().count() < 1 {
101971					return Err(ValidationError::new(1001, "cmptnt_authrty is shorter than the minimum length of 1".to_string()));
101972				}
101973				if item.chars().count() > 100 {
101974					return Err(ValidationError::new(1002, "cmptnt_authrty exceeds the maximum length of 100".to_string()));
101975				}
101976			}
101977		}
101978		if let Some(ref val) = self.new_trad_rpstry_idr { val.validate()? }
101979		if let Some(ref vec) = self.rptg_purp {
101980			for item in vec {
101981				if item.chars().count() < 1 {
101982					return Err(ValidationError::new(1001, "rptg_purp is shorter than the minimum length of 1".to_string()));
101983				}
101984				if item.chars().count() > 100 {
101985					return Err(ValidationError::new(1002, "rptg_purp exceeds the maximum length of 100".to_string()));
101986				}
101987			}
101988		}
101989		Ok(())
101990	}
101991}
101992
101993
101994// TradeReportQuery13Choice ...
101995#[cfg_attr(feature = "derive_debug", derive(Debug))]
101996#[cfg_attr(feature = "derive_default", derive(Default))]
101997#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
101998#[cfg_attr(feature = "derive_clone", derive(Clone))]
101999#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102000pub struct TradeReportQuery13Choice {
102001	#[cfg_attr( feature = "derive_serde", serde(rename = "AdHocQry", skip_serializing_if = "Option::is_none") )]
102002	pub ad_hoc_qry: Option<TradeQueryCriteria10>,
102003	#[cfg_attr( feature = "derive_serde", serde(rename = "RcrntQry", skip_serializing_if = "Option::is_none") )]
102004	pub rcrnt_qry: Option<TradeRecurrentQuery5>,
102005}
102006
102007impl TradeReportQuery13Choice {
102008	pub fn validate(&self) -> Result<(), ValidationError> {
102009		if let Some(ref val) = self.ad_hoc_qry { val.validate()? }
102010		if let Some(ref val) = self.rcrnt_qry { val.validate()? }
102011		Ok(())
102012	}
102013}
102014
102015
102016// TradeReportQuery18Choice ...
102017#[cfg_attr(feature = "derive_debug", derive(Debug))]
102018#[cfg_attr(feature = "derive_default", derive(Default))]
102019#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102020#[cfg_attr(feature = "derive_clone", derive(Clone))]
102021#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102022pub struct TradeReportQuery18Choice {
102023	#[cfg_attr( feature = "derive_serde", serde(rename = "AdHocQry", skip_serializing_if = "Option::is_none") )]
102024	pub ad_hoc_qry: Option<TradeQueryCriteria14>,
102025	#[cfg_attr( feature = "derive_serde", serde(rename = "RcrntQry", skip_serializing_if = "Option::is_none") )]
102026	pub rcrnt_qry: Option<TradeRecurrentQuery7>,
102027}
102028
102029impl TradeReportQuery18Choice {
102030	pub fn validate(&self) -> Result<(), ValidationError> {
102031		if let Some(ref val) = self.ad_hoc_qry { val.validate()? }
102032		if let Some(ref val) = self.rcrnt_qry { val.validate()? }
102033		Ok(())
102034	}
102035}
102036
102037
102038// TradeRepositoryReportingType1Code ...
102039#[cfg_attr(feature = "derive_debug", derive(Debug))]
102040#[cfg_attr(feature = "derive_default", derive(Default))]
102041#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102042#[cfg_attr(feature = "derive_clone", derive(Clone))]
102043#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102044pub enum TradeRepositoryReportingType1Code {
102045	#[cfg_attr(feature = "derive_default", default)]
102046	#[cfg_attr( feature = "derive_serde", serde(rename = "SWOS") )]
102047	CodeSWOS,
102048	#[cfg_attr( feature = "derive_serde", serde(rename = "TWOS") )]
102049	CodeTWOS,
102050}
102051
102052impl TradeRepositoryReportingType1Code {
102053	pub fn validate(&self) -> Result<(), ValidationError> {
102054		Ok(())
102055	}
102056}
102057
102058
102059// TradeSecurityIdentificationQueryCriteria3 ...
102060#[cfg_attr(feature = "derive_debug", derive(Debug))]
102061#[cfg_attr(feature = "derive_default", derive(Default))]
102062#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102063#[cfg_attr(feature = "derive_clone", derive(Clone))]
102064#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102065pub struct TradeSecurityIdentificationQueryCriteria3 {
102066	#[cfg_attr( feature = "derive_serde", serde(rename = "Oprtr") )]
102067	pub oprtr: Operation3Code,
102068	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
102069	pub id: Option<Vec<SecurityIdentificationQueryCriteria1>>,
102070	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctTp", skip_serializing_if = "Option::is_none") )]
102071	pub ctrct_tp: Option<Vec<FinancialInstrumentContractType2Code>>,
102072	#[cfg_attr( feature = "derive_serde", serde(rename = "ISIN", skip_serializing_if = "Option::is_none") )]
102073	pub isin: Option<Vec<ISINQueryCriteria1>>,
102074	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqPdctIdr", skip_serializing_if = "Option::is_none") )]
102075	pub unq_pdct_idr: Option<Vec<UPIQueryCriteria1>>,
102076	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygInstrmId", skip_serializing_if = "Option::is_none") )]
102077	pub undrlyg_instrm_id: Option<Vec<SecurityIdentificationQuery4Choice>>,
102078}
102079
102080impl TradeSecurityIdentificationQueryCriteria3 {
102081	pub fn validate(&self) -> Result<(), ValidationError> {
102082		self.oprtr.validate()?;
102083		if let Some(ref vec) = self.id { for item in vec { item.validate()? } }
102084		if let Some(ref vec) = self.ctrct_tp { for item in vec { item.validate()? } }
102085		if let Some(ref vec) = self.isin { for item in vec { item.validate()? } }
102086		if let Some(ref vec) = self.unq_pdct_idr { for item in vec { item.validate()? } }
102087		if let Some(ref vec) = self.undrlyg_instrm_id { for item in vec { item.validate()? } }
102088		Ok(())
102089	}
102090}
102091
102092
102093// TradeSettlement2 ...
102094#[cfg_attr(feature = "derive_debug", derive(Debug))]
102095#[cfg_attr(feature = "derive_default", derive(Default))]
102096#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102097#[cfg_attr(feature = "derive_clone", derive(Clone))]
102098#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102099pub struct TradeSettlement2 {
102100	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtRef", skip_serializing_if = "Option::is_none") )]
102101	pub pmt_ref: Option<CreditorReferenceInformation2>,
102102	#[cfg_attr( feature = "derive_serde", serde(rename = "DueDt", skip_serializing_if = "Option::is_none") )]
102103	pub due_dt: Option<String>,
102104	#[cfg_attr( feature = "derive_serde", serde(rename = "DuePyblAmt") )]
102105	pub due_pybl_amt: CurrencyAndAmount,
102106	#[cfg_attr( feature = "derive_serde", serde(rename = "InvcCcyXchg", skip_serializing_if = "Option::is_none") )]
102107	pub invc_ccy_xchg: Option<CurrencyReference3>,
102108	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryDt", skip_serializing_if = "Option::is_none") )]
102109	pub dlvry_dt: Option<String>,
102110	#[cfg_attr( feature = "derive_serde", serde(rename = "BllgPrd", skip_serializing_if = "Option::is_none") )]
102111	pub bllg_prd: Option<Period2>,
102112	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxTtlAmt") )]
102113	pub tax_ttl_amt: CurrencyAndAmount,
102114	#[cfg_attr( feature = "derive_serde", serde(rename = "XmptnRsnCd", skip_serializing_if = "Option::is_none") )]
102115	pub xmptn_rsn_cd: Option<String>,
102116	#[cfg_attr( feature = "derive_serde", serde(rename = "XmptnRsn", skip_serializing_if = "Option::is_none") )]
102117	pub xmptn_rsn: Option<String>,
102118	#[cfg_attr( feature = "derive_serde", serde(rename = "SubTtlClctdTax", skip_serializing_if = "Option::is_none") )]
102119	pub sub_ttl_clctd_tax: Option<Vec<SettlementSubTotalCalculatedTax2>>,
102120	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlyPmts", skip_serializing_if = "Option::is_none") )]
102121	pub early_pmts: Option<Vec<EarlyPayment1>>,
102122}
102123
102124impl TradeSettlement2 {
102125	pub fn validate(&self) -> Result<(), ValidationError> {
102126		if let Some(ref val) = self.pmt_ref { val.validate()? }
102127		self.due_pybl_amt.validate()?;
102128		if let Some(ref val) = self.invc_ccy_xchg { val.validate()? }
102129		if let Some(ref val) = self.bllg_prd { val.validate()? }
102130		self.tax_ttl_amt.validate()?;
102131		if let Some(ref val) = self.xmptn_rsn_cd {
102132			if val.chars().count() < 1 {
102133				return Err(ValidationError::new(1001, "xmptn_rsn_cd is shorter than the minimum length of 1".to_string()));
102134			}
102135			if val.chars().count() > 4 {
102136				return Err(ValidationError::new(1002, "xmptn_rsn_cd exceeds the maximum length of 4".to_string()));
102137			}
102138		}
102139		if let Some(ref val) = self.xmptn_rsn {
102140			if val.chars().count() < 1 {
102141				return Err(ValidationError::new(1001, "xmptn_rsn is shorter than the minimum length of 1".to_string()));
102142			}
102143			if val.chars().count() > 500 {
102144				return Err(ValidationError::new(1002, "xmptn_rsn exceeds the maximum length of 500".to_string()));
102145			}
102146		}
102147		if let Some(ref vec) = self.sub_ttl_clctd_tax { for item in vec { item.validate()? } }
102148		if let Some(ref vec) = self.early_pmts { for item in vec { item.validate()? } }
102149		Ok(())
102150	}
102151}
102152
102153
102154// TradeStateReport16 ...
102155#[cfg_attr(feature = "derive_debug", derive(Debug))]
102156#[cfg_attr(feature = "derive_default", derive(Default))]
102157#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102158#[cfg_attr(feature = "derive_clone", derive(Clone))]
102159#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102160pub struct TradeStateReport16 {
102161	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
102162	pub tech_rcrd_id: Option<String>,
102163	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtySpcfcData") )]
102164	pub ctr_pty_spcfc_data: CounterpartyData88,
102165	#[cfg_attr( feature = "derive_serde", serde(rename = "LnData", skip_serializing_if = "Option::is_none") )]
102166	pub ln_data: Option<TransactionLoanData31Choice>,
102167	#[cfg_attr( feature = "derive_serde", serde(rename = "CollData", skip_serializing_if = "Option::is_none") )]
102168	pub coll_data: Option<TransactionCollateralData18Choice>,
102169	#[cfg_attr( feature = "derive_serde", serde(rename = "RcncltnFlg", skip_serializing_if = "Option::is_none") )]
102170	pub rcncltn_flg: Option<ReconciliationFlag2>,
102171	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctMod") )]
102172	pub ctrct_mod: ContractModification3,
102173	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
102174	pub splmtry_data: Option<Vec<SupplementaryData1>>,
102175}
102176
102177impl TradeStateReport16 {
102178	pub fn validate(&self) -> Result<(), ValidationError> {
102179		if let Some(ref val) = self.tech_rcrd_id {
102180			if val.chars().count() < 1 {
102181				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
102182			}
102183			if val.chars().count() > 140 {
102184				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
102185			}
102186		}
102187		self.ctr_pty_spcfc_data.validate()?;
102188		if let Some(ref val) = self.ln_data { val.validate()? }
102189		if let Some(ref val) = self.coll_data { val.validate()? }
102190		if let Some(ref val) = self.rcncltn_flg { val.validate()? }
102191		self.ctrct_mod.validate()?;
102192		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
102193		Ok(())
102194	}
102195}
102196
102197
102198// TradeStateReport23 ...
102199#[cfg_attr(feature = "derive_debug", derive(Debug))]
102200#[cfg_attr(feature = "derive_default", derive(Default))]
102201#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102202#[cfg_attr(feature = "derive_clone", derive(Clone))]
102203#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102204pub struct TradeStateReport23 {
102205	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtySpcfcData") )]
102206	pub ctr_pty_spcfc_data: Vec<CounterpartySpecificData36>,
102207	#[cfg_attr( feature = "derive_serde", serde(rename = "CmonTradData") )]
102208	pub cmon_trad_data: CommonTradeDataReport72,
102209	#[cfg_attr( feature = "derive_serde", serde(rename = "TechAttrbts", skip_serializing_if = "Option::is_none") )]
102210	pub tech_attrbts: Option<TechnicalAttributes5>,
102211	#[cfg_attr( feature = "derive_serde", serde(rename = "PblcDssmntnData", skip_serializing_if = "Option::is_none") )]
102212	pub pblc_dssmntn_data: Option<DisseminationData1>,
102213	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
102214	pub splmtry_data: Option<Vec<SupplementaryData1>>,
102215}
102216
102217impl TradeStateReport23 {
102218	pub fn validate(&self) -> Result<(), ValidationError> {
102219		for item in &self.ctr_pty_spcfc_data { item.validate()? }
102220		self.cmon_trad_data.validate()?;
102221		if let Some(ref val) = self.tech_attrbts { val.validate()? }
102222		if let Some(ref val) = self.pblc_dssmntn_data { val.validate()? }
102223		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
102224		Ok(())
102225	}
102226}
102227
102228
102229// TradeStateReport5Choice ...
102230#[cfg_attr(feature = "derive_debug", derive(Debug))]
102231#[cfg_attr(feature = "derive_default", derive(Default))]
102232#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102233#[cfg_attr(feature = "derive_clone", derive(Clone))]
102234#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102235pub struct TradeStateReport5Choice {
102236	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
102237	pub data_set_actn: Option<ReportPeriodActivity1Code>,
102238	#[cfg_attr( feature = "derive_serde", serde(rename = "Stat", skip_serializing_if = "Option::is_none") )]
102239	pub stat: Option<Vec<TradeStateReport16>>,
102240}
102241
102242impl TradeStateReport5Choice {
102243	pub fn validate(&self) -> Result<(), ValidationError> {
102244		if let Some(ref val) = self.data_set_actn { val.validate()? }
102245		if let Some(ref vec) = self.stat { for item in vec { item.validate()? } }
102246		Ok(())
102247	}
102248}
102249
102250
102251// TradeTransaction50 ...
102252#[cfg_attr(feature = "derive_debug", derive(Debug))]
102253#[cfg_attr(feature = "derive_default", derive(Default))]
102254#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102255#[cfg_attr(feature = "derive_clone", derive(Clone))]
102256#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102257pub struct TradeTransaction50 {
102258	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
102259	pub tx_id: Option<UniqueTransactionIdentifier2Choice>,
102260	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndryTxId", skip_serializing_if = "Option::is_none") )]
102261	pub scndry_tx_id: Option<String>,
102262	#[cfg_attr( feature = "derive_serde", serde(rename = "PrrTxId", skip_serializing_if = "Option::is_none") )]
102263	pub prr_tx_id: Option<UniqueTransactionIdentifier3Choice>,
102264	#[cfg_attr( feature = "derive_serde", serde(rename = "SbsqntTxId", skip_serializing_if = "Option::is_none") )]
102265	pub sbsqnt_tx_id: Option<UniqueTransactionIdentifier3Choice>,
102266	#[cfg_attr( feature = "derive_serde", serde(rename = "CollPrtflCd", skip_serializing_if = "Option::is_none") )]
102267	pub coll_prtfl_cd: Option<CollateralPortfolioCode6Choice>,
102268	#[cfg_attr( feature = "derive_serde", serde(rename = "RptTrckgNb", skip_serializing_if = "Option::is_none") )]
102269	pub rpt_trckg_nb: Option<String>,
102270	#[cfg_attr( feature = "derive_serde", serde(rename = "PltfmIdr", skip_serializing_if = "Option::is_none") )]
102271	pub pltfm_idr: Option<String>,
102272	#[cfg_attr( feature = "derive_serde", serde(rename = "MrrrOrTrggrTx", skip_serializing_if = "Option::is_none") )]
102273	pub mrrr_or_trggr_tx: Option<bool>,
102274	#[cfg_attr( feature = "derive_serde", serde(rename = "TxPric", skip_serializing_if = "Option::is_none") )]
102275	pub tx_pric: Option<PriceData2>,
102276	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlAmt", skip_serializing_if = "Option::is_none") )]
102277	pub ntnl_amt: Option<NotionalAmountLegs5>,
102278	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlQty", skip_serializing_if = "Option::is_none") )]
102279	pub ntnl_qty: Option<NotionalQuantityLegs5>,
102280	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty", skip_serializing_if = "Option::is_none") )]
102281	pub qty: Option<FinancialInstrumentQuantity32Choice>,
102282	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryTp", skip_serializing_if = "Option::is_none") )]
102283	pub dlvry_tp: Option<PhysicalTransferType4Code>,
102284	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnTmStmp", skip_serializing_if = "Option::is_none") )]
102285	pub exctn_tm_stmp: Option<String>,
102286	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvDt", skip_serializing_if = "Option::is_none") )]
102287	pub fctv_dt: Option<String>,
102288	#[cfg_attr( feature = "derive_serde", serde(rename = "XprtnDt", skip_serializing_if = "Option::is_none") )]
102289	pub xprtn_dt: Option<String>,
102290	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlyTermntnDt", skip_serializing_if = "Option::is_none") )]
102291	pub early_termntn_dt: Option<String>,
102292	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmDt", skip_serializing_if = "Option::is_none") )]
102293	pub sttlm_dt: Option<Vec<String>>,
102294	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
102295	pub mstr_agrmt: Option<MasterAgreement8>,
102296	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmprssn", skip_serializing_if = "Option::is_none") )]
102297	pub cmprssn: Option<bool>,
102298	#[cfg_attr( feature = "derive_serde", serde(rename = "PstTradRskRdctnFlg", skip_serializing_if = "Option::is_none") )]
102299	pub pst_trad_rsk_rdctn_flg: Option<bool>,
102300	#[cfg_attr( feature = "derive_serde", serde(rename = "PstTradRskRdctnEvt", skip_serializing_if = "Option::is_none") )]
102301	pub pst_trad_rsk_rdctn_evt: Option<PTRREvent2>,
102302	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivEvt", skip_serializing_if = "Option::is_none") )]
102303	pub deriv_evt: Option<DerivativeEvent6>,
102304	#[cfg_attr( feature = "derive_serde", serde(rename = "TradConf", skip_serializing_if = "Option::is_none") )]
102305	pub trad_conf: Option<TradeConfirmation4Choice>,
102306	#[cfg_attr( feature = "derive_serde", serde(rename = "NonStdsdTerm", skip_serializing_if = "Option::is_none") )]
102307	pub non_stdsd_term: Option<bool>,
102308	#[cfg_attr( feature = "derive_serde", serde(rename = "TradClr", skip_serializing_if = "Option::is_none") )]
102309	pub trad_clr: Option<TradeClearing11>,
102310	#[cfg_attr( feature = "derive_serde", serde(rename = "BlckTradElctn", skip_serializing_if = "Option::is_none") )]
102311	pub blck_trad_elctn: Option<bool>,
102312	#[cfg_attr( feature = "derive_serde", serde(rename = "LrgNtnlOffFcltyElctn", skip_serializing_if = "Option::is_none") )]
102313	pub lrg_ntnl_off_fclty_elctn: Option<bool>,
102314	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRate", skip_serializing_if = "Option::is_none") )]
102315	pub intrst_rate: Option<InterestRateLegs14>,
102316	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy", skip_serializing_if = "Option::is_none") )]
102317	pub ccy: Option<CurrencyExchange22>,
102318	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmmdty", skip_serializing_if = "Option::is_none") )]
102319	pub cmmdty: Option<AssetClassCommodity7Choice>,
102320	#[cfg_attr( feature = "derive_serde", serde(rename = "Optn", skip_serializing_if = "Option::is_none") )]
102321	pub optn: Option<OptionOrSwaption11>,
102322	#[cfg_attr( feature = "derive_serde", serde(rename = "NrgySpcfcAttrbts", skip_serializing_if = "Option::is_none") )]
102323	pub nrgy_spcfc_attrbts: Option<EnergySpecificAttribute9>,
102324	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdt", skip_serializing_if = "Option::is_none") )]
102325	pub cdt: Option<CreditDerivative4>,
102326	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPmt", skip_serializing_if = "Option::is_none") )]
102327	pub othr_pmt: Option<Vec<OtherPayment5>>,
102328	#[cfg_attr( feature = "derive_serde", serde(rename = "Packg", skip_serializing_if = "Option::is_none") )]
102329	pub packg: Option<Package4>,
102330	#[cfg_attr( feature = "derive_serde", serde(rename = "TradAllcnSts", skip_serializing_if = "Option::is_none") )]
102331	pub trad_allcn_sts: Option<AllocationIndicator1Code>,
102332}
102333
102334impl TradeTransaction50 {
102335	pub fn validate(&self) -> Result<(), ValidationError> {
102336		if let Some(ref val) = self.tx_id { val.validate()? }
102337		if let Some(ref val) = self.scndry_tx_id {
102338			if val.chars().count() < 1 {
102339				return Err(ValidationError::new(1001, "scndry_tx_id is shorter than the minimum length of 1".to_string()));
102340			}
102341			if val.chars().count() > 72 {
102342				return Err(ValidationError::new(1002, "scndry_tx_id exceeds the maximum length of 72".to_string()));
102343			}
102344		}
102345		if let Some(ref val) = self.prr_tx_id { val.validate()? }
102346		if let Some(ref val) = self.sbsqnt_tx_id { val.validate()? }
102347		if let Some(ref val) = self.coll_prtfl_cd { val.validate()? }
102348		if let Some(ref val) = self.rpt_trckg_nb {
102349			if val.chars().count() < 1 {
102350				return Err(ValidationError::new(1001, "rpt_trckg_nb is shorter than the minimum length of 1".to_string()));
102351			}
102352			if val.chars().count() > 52 {
102353				return Err(ValidationError::new(1002, "rpt_trckg_nb exceeds the maximum length of 52".to_string()));
102354			}
102355		}
102356		if let Some(ref val) = self.pltfm_idr {
102357			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
102358			if !pattern.is_match(val) {
102359				return Err(ValidationError::new(1005, "pltfm_idr does not match the required pattern".to_string()));
102360			}
102361		}
102362		if let Some(ref val) = self.tx_pric { val.validate()? }
102363		if let Some(ref val) = self.ntnl_amt { val.validate()? }
102364		if let Some(ref val) = self.ntnl_qty { val.validate()? }
102365		if let Some(ref val) = self.qty { val.validate()? }
102366		if let Some(ref val) = self.dlvry_tp { val.validate()? }
102367		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
102368		if let Some(ref val) = self.pst_trad_rsk_rdctn_evt { val.validate()? }
102369		if let Some(ref val) = self.deriv_evt { val.validate()? }
102370		if let Some(ref val) = self.trad_conf { val.validate()? }
102371		if let Some(ref val) = self.trad_clr { val.validate()? }
102372		if let Some(ref val) = self.intrst_rate { val.validate()? }
102373		if let Some(ref val) = self.ccy { val.validate()? }
102374		if let Some(ref val) = self.cmmdty { val.validate()? }
102375		if let Some(ref val) = self.optn { val.validate()? }
102376		if let Some(ref val) = self.nrgy_spcfc_attrbts { val.validate()? }
102377		if let Some(ref val) = self.cdt { val.validate()? }
102378		if let Some(ref vec) = self.othr_pmt { for item in vec { item.validate()? } }
102379		if let Some(ref val) = self.packg { val.validate()? }
102380		if let Some(ref val) = self.trad_allcn_sts { val.validate()? }
102381		Ok(())
102382	}
102383}
102384
102385
102386// TradeTransactionCollateralUpdate8 ...
102387#[cfg_attr(feature = "derive_debug", derive(Debug))]
102388#[cfg_attr(feature = "derive_default", derive(Default))]
102389#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102390#[cfg_attr(feature = "derive_clone", derive(Clone))]
102391#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102392pub struct TradeTransactionCollateralUpdate8 {
102393	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
102394	pub tech_rcrd_id: Option<String>,
102395	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtySpcfcData") )]
102396	pub ctr_pty_spcfc_data: CounterpartyData88,
102397	#[cfg_attr( feature = "derive_serde", serde(rename = "LnData", skip_serializing_if = "Option::is_none") )]
102398	pub ln_data: Option<TransactionLoanData26Choice>,
102399	#[cfg_attr( feature = "derive_serde", serde(rename = "CollData") )]
102400	pub coll_data: TransactionCollateralData18Choice,
102401	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
102402	pub splmtry_data: Option<Vec<SupplementaryData1>>,
102403}
102404
102405impl TradeTransactionCollateralUpdate8 {
102406	pub fn validate(&self) -> Result<(), ValidationError> {
102407		if let Some(ref val) = self.tech_rcrd_id {
102408			if val.chars().count() < 1 {
102409				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
102410			}
102411			if val.chars().count() > 140 {
102412				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
102413			}
102414		}
102415		self.ctr_pty_spcfc_data.validate()?;
102416		if let Some(ref val) = self.ln_data { val.validate()? }
102417		self.coll_data.validate()?;
102418		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
102419		Ok(())
102420	}
102421}
102422
102423
102424// TradeTransactionCondition2Code ...
102425#[cfg_attr(feature = "derive_debug", derive(Debug))]
102426#[cfg_attr(feature = "derive_default", derive(Default))]
102427#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102428#[cfg_attr(feature = "derive_clone", derive(Clone))]
102429#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102430pub enum TradeTransactionCondition2Code {
102431	#[cfg_attr(feature = "derive_default", default)]
102432	#[cfg_attr( feature = "derive_serde", serde(rename = "SPCC") )]
102433	CodeSPCC,
102434	#[cfg_attr( feature = "derive_serde", serde(rename = "SECN") )]
102435	CodeSECN,
102436	#[cfg_attr( feature = "derive_serde", serde(rename = "SEBN") )]
102437	CodeSEBN,
102438	#[cfg_attr( feature = "derive_serde", serde(rename = "SCBN") )]
102439	CodeSCBN,
102440	#[cfg_attr( feature = "derive_serde", serde(rename = "SCRT") )]
102441	CodeSCRT,
102442	#[cfg_attr( feature = "derive_serde", serde(rename = "SERT") )]
102443	CodeSERT,
102444	#[cfg_attr( feature = "derive_serde", serde(rename = "SCCR") )]
102445	CodeSCCR,
102446	#[cfg_attr( feature = "derive_serde", serde(rename = "SECR") )]
102447	CodeSECR,
102448	#[cfg_attr( feature = "derive_serde", serde(rename = "CAST") )]
102449	CodeCAST,
102450	#[cfg_attr( feature = "derive_serde", serde(rename = "SPPR") )]
102451	CodeSPPR,
102452	#[cfg_attr( feature = "derive_serde", serde(rename = "SPCU") )]
102453	CodeSPCU,
102454	#[cfg_attr( feature = "derive_serde", serde(rename = "SPEX") )]
102455	CodeSPEX,
102456	#[cfg_attr( feature = "derive_serde", serde(rename = "GTDL") )]
102457	CodeGTDL,
102458}
102459
102460impl TradeTransactionCondition2Code {
102461	pub fn validate(&self) -> Result<(), ValidationError> {
102462		Ok(())
102463	}
102464}
102465
102466
102467// TradeTransactionCondition7Choice ...
102468#[cfg_attr(feature = "derive_debug", derive(Debug))]
102469#[cfg_attr(feature = "derive_default", derive(Default))]
102470#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102471#[cfg_attr(feature = "derive_clone", derive(Clone))]
102472#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102473pub struct TradeTransactionCondition7Choice {
102474	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
102475	pub cd: Option<TradeTransactionCondition2Code>,
102476	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
102477	pub prtry: Option<GenericIdentification30>,
102478}
102479
102480impl TradeTransactionCondition7Choice {
102481	pub fn validate(&self) -> Result<(), ValidationError> {
102482		if let Some(ref val) = self.cd { val.validate()? }
102483		if let Some(ref val) = self.prtry { val.validate()? }
102484		Ok(())
102485	}
102486}
102487
102488
102489// TradeTransactionCorrection13 ...
102490#[cfg_attr(feature = "derive_debug", derive(Debug))]
102491#[cfg_attr(feature = "derive_default", derive(Default))]
102492#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102493#[cfg_attr(feature = "derive_clone", derive(Clone))]
102494#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102495pub struct TradeTransactionCorrection13 {
102496	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
102497	pub tech_rcrd_id: Option<String>,
102498	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtySpcfcData") )]
102499	pub ctr_pty_spcfc_data: CounterpartyData88,
102500	#[cfg_attr( feature = "derive_serde", serde(rename = "LnData", skip_serializing_if = "Option::is_none") )]
102501	pub ln_data: Option<TransactionLoanData31Choice>,
102502	#[cfg_attr( feature = "derive_serde", serde(rename = "CollData", skip_serializing_if = "Option::is_none") )]
102503	pub coll_data: Option<TransactionCollateralData18Choice>,
102504	#[cfg_attr( feature = "derive_serde", serde(rename = "LvlTp") )]
102505	pub lvl_tp: ModificationLevel1Code,
102506	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
102507	pub splmtry_data: Option<Vec<SupplementaryData1>>,
102508}
102509
102510impl TradeTransactionCorrection13 {
102511	pub fn validate(&self) -> Result<(), ValidationError> {
102512		if let Some(ref val) = self.tech_rcrd_id {
102513			if val.chars().count() < 1 {
102514				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
102515			}
102516			if val.chars().count() > 140 {
102517				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
102518			}
102519		}
102520		self.ctr_pty_spcfc_data.validate()?;
102521		if let Some(ref val) = self.ln_data { val.validate()? }
102522		if let Some(ref val) = self.coll_data { val.validate()? }
102523		self.lvl_tp.validate()?;
102524		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
102525		Ok(())
102526	}
102527}
102528
102529
102530// TradeTransactionIdentification15 ...
102531#[cfg_attr(feature = "derive_debug", derive(Debug))]
102532#[cfg_attr(feature = "derive_default", derive(Default))]
102533#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102534#[cfg_attr(feature = "derive_clone", derive(Clone))]
102535#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102536pub struct TradeTransactionIdentification15 {
102537	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty") )]
102538	pub rptg_ctr_pty: OrganisationIdentification15Choice,
102539	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty") )]
102540	pub othr_ctr_pty: PartyIdentification236Choice,
102541	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr", skip_serializing_if = "Option::is_none") )]
102542	pub unq_trad_idr: Option<String>,
102543	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
102544	pub mstr_agrmt: Option<MasterAgreement7>,
102545	#[cfg_attr( feature = "derive_serde", serde(rename = "AgtLndr", skip_serializing_if = "Option::is_none") )]
102546	pub agt_lndr: Option<OrganisationIdentification15Choice>,
102547	#[cfg_attr( feature = "derive_serde", serde(rename = "TrptyAgt", skip_serializing_if = "Option::is_none") )]
102548	pub trpty_agt: Option<OrganisationIdentification15Choice>,
102549}
102550
102551impl TradeTransactionIdentification15 {
102552	pub fn validate(&self) -> Result<(), ValidationError> {
102553		self.rptg_ctr_pty.validate()?;
102554		self.othr_ctr_pty.validate()?;
102555		if let Some(ref val) = self.unq_trad_idr {
102556			if val.chars().count() < 1 {
102557				return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
102558			}
102559			if val.chars().count() > 52 {
102560				return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
102561			}
102562		}
102563		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
102564		if let Some(ref val) = self.agt_lndr { val.validate()? }
102565		if let Some(ref val) = self.trpty_agt { val.validate()? }
102566		Ok(())
102567	}
102568}
102569
102570
102571// TradeTransactionIdentification16 ...
102572#[cfg_attr(feature = "derive_debug", derive(Debug))]
102573#[cfg_attr(feature = "derive_default", derive(Default))]
102574#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102575#[cfg_attr(feature = "derive_clone", derive(Clone))]
102576#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102577pub struct TradeTransactionIdentification16 {
102578	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
102579	pub tech_rcrd_id: Option<String>,
102580	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty") )]
102581	pub rptg_ctr_pty: OrganisationIdentification15Choice,
102582	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty") )]
102583	pub othr_ctr_pty: PartyIdentification236Choice,
102584	#[cfg_attr( feature = "derive_serde", serde(rename = "NttyRspnsblForRpt", skip_serializing_if = "Option::is_none") )]
102585	pub ntty_rspnsbl_for_rpt: Option<OrganisationIdentification15Choice>,
102586	#[cfg_attr( feature = "derive_serde", serde(rename = "CollPrtflId", skip_serializing_if = "Option::is_none") )]
102587	pub coll_prtfl_id: Option<String>,
102588}
102589
102590impl TradeTransactionIdentification16 {
102591	pub fn validate(&self) -> Result<(), ValidationError> {
102592		if let Some(ref val) = self.tech_rcrd_id {
102593			if val.chars().count() < 1 {
102594				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
102595			}
102596			if val.chars().count() > 140 {
102597				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
102598			}
102599		}
102600		self.rptg_ctr_pty.validate()?;
102601		self.othr_ctr_pty.validate()?;
102602		if let Some(ref val) = self.ntty_rspnsbl_for_rpt { val.validate()? }
102603		if let Some(ref val) = self.coll_prtfl_id {
102604			if val.chars().count() < 1 {
102605				return Err(ValidationError::new(1001, "coll_prtfl_id is shorter than the minimum length of 1".to_string()));
102606			}
102607			if val.chars().count() > 52 {
102608				return Err(ValidationError::new(1002, "coll_prtfl_id exceeds the maximum length of 52".to_string()));
102609			}
102610		}
102611		Ok(())
102612	}
102613}
102614
102615
102616// TradeTransactionIdentification17 ...
102617#[cfg_attr(feature = "derive_debug", derive(Debug))]
102618#[cfg_attr(feature = "derive_default", derive(Default))]
102619#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102620#[cfg_attr(feature = "derive_clone", derive(Clone))]
102621#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102622pub struct TradeTransactionIdentification17 {
102623	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
102624	pub tech_rcrd_id: Option<String>,
102625	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty") )]
102626	pub rptg_ctr_pty: OrganisationIdentification15Choice,
102627	#[cfg_attr( feature = "derive_serde", serde(rename = "RptSubmitgNtty") )]
102628	pub rpt_submitg_ntty: OrganisationIdentification15Choice,
102629	#[cfg_attr( feature = "derive_serde", serde(rename = "NttyRspnsblForRpt", skip_serializing_if = "Option::is_none") )]
102630	pub ntty_rspnsbl_for_rpt: Option<OrganisationIdentification15Choice>,
102631}
102632
102633impl TradeTransactionIdentification17 {
102634	pub fn validate(&self) -> Result<(), ValidationError> {
102635		if let Some(ref val) = self.tech_rcrd_id {
102636			if val.chars().count() < 1 {
102637				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
102638			}
102639			if val.chars().count() > 140 {
102640				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
102641			}
102642		}
102643		self.rptg_ctr_pty.validate()?;
102644		self.rpt_submitg_ntty.validate()?;
102645		if let Some(ref val) = self.ntty_rspnsbl_for_rpt { val.validate()? }
102646		Ok(())
102647	}
102648}
102649
102650
102651// TradeTransactionIdentification18 ...
102652#[cfg_attr(feature = "derive_debug", derive(Debug))]
102653#[cfg_attr(feature = "derive_default", derive(Default))]
102654#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102655#[cfg_attr(feature = "derive_clone", derive(Clone))]
102656#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102657pub struct TradeTransactionIdentification18 {
102658	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty") )]
102659	pub rptg_ctr_pty: OrganisationIdentification15Choice,
102660	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty") )]
102661	pub othr_ctr_pty: PartyIdentification236Choice,
102662	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr", skip_serializing_if = "Option::is_none") )]
102663	pub unq_trad_idr: Option<String>,
102664	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
102665	pub mstr_agrmt: Option<MasterAgreement7>,
102666}
102667
102668impl TradeTransactionIdentification18 {
102669	pub fn validate(&self) -> Result<(), ValidationError> {
102670		self.rptg_ctr_pty.validate()?;
102671		self.othr_ctr_pty.validate()?;
102672		if let Some(ref val) = self.unq_trad_idr {
102673			if val.chars().count() < 1 {
102674				return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
102675			}
102676			if val.chars().count() > 52 {
102677				return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
102678			}
102679		}
102680		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
102681		Ok(())
102682	}
102683}
102684
102685
102686// TradeTransactionIdentification19 ...
102687#[cfg_attr(feature = "derive_debug", derive(Debug))]
102688#[cfg_attr(feature = "derive_default", derive(Default))]
102689#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102690#[cfg_attr(feature = "derive_clone", derive(Clone))]
102691#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102692pub struct TradeTransactionIdentification19 {
102693	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty") )]
102694	pub rptg_ctr_pty: OrganisationIdentification15Choice,
102695	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty") )]
102696	pub othr_ctr_pty: PartyIdentification236Choice,
102697	#[cfg_attr( feature = "derive_serde", serde(rename = "NttyRspnsblForRpt", skip_serializing_if = "Option::is_none") )]
102698	pub ntty_rspnsbl_for_rpt: Option<OrganisationIdentification15Choice>,
102699	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr", skip_serializing_if = "Option::is_none") )]
102700	pub unq_trad_idr: Option<String>,
102701	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
102702	pub mstr_agrmt: Option<MasterAgreement7>,
102703	#[cfg_attr( feature = "derive_serde", serde(rename = "AgtLndr", skip_serializing_if = "Option::is_none") )]
102704	pub agt_lndr: Option<OrganisationIdentification15Choice>,
102705	#[cfg_attr( feature = "derive_serde", serde(rename = "TrptyAgt", skip_serializing_if = "Option::is_none") )]
102706	pub trpty_agt: Option<OrganisationIdentification15Choice>,
102707}
102708
102709impl TradeTransactionIdentification19 {
102710	pub fn validate(&self) -> Result<(), ValidationError> {
102711		self.rptg_ctr_pty.validate()?;
102712		self.othr_ctr_pty.validate()?;
102713		if let Some(ref val) = self.ntty_rspnsbl_for_rpt { val.validate()? }
102714		if let Some(ref val) = self.unq_trad_idr {
102715			if val.chars().count() < 1 {
102716				return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
102717			}
102718			if val.chars().count() > 52 {
102719				return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
102720			}
102721		}
102722		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
102723		if let Some(ref val) = self.agt_lndr { val.validate()? }
102724		if let Some(ref val) = self.trpty_agt { val.validate()? }
102725		Ok(())
102726	}
102727}
102728
102729
102730// TradeTransactionIdentification20 ...
102731#[cfg_attr(feature = "derive_debug", derive(Debug))]
102732#[cfg_attr(feature = "derive_default", derive(Default))]
102733#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102734#[cfg_attr(feature = "derive_clone", derive(Clone))]
102735#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102736pub struct TradeTransactionIdentification20 {
102737	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
102738	pub tech_rcrd_id: Option<String>,
102739	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgCtrPty") )]
102740	pub rptg_ctr_pty: OrganisationIdentification15Choice,
102741	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty") )]
102742	pub othr_ctr_pty: PartyIdentification236Choice,
102743	#[cfg_attr( feature = "derive_serde", serde(rename = "NttyRspnsblForRpt", skip_serializing_if = "Option::is_none") )]
102744	pub ntty_rspnsbl_for_rpt: Option<OrganisationIdentification15Choice>,
102745	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTradIdr", skip_serializing_if = "Option::is_none") )]
102746	pub unq_trad_idr: Option<String>,
102747	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
102748	pub mstr_agrmt: Option<MasterAgreement7>,
102749	#[cfg_attr( feature = "derive_serde", serde(rename = "AgtLndr", skip_serializing_if = "Option::is_none") )]
102750	pub agt_lndr: Option<OrganisationIdentification15Choice>,
102751	#[cfg_attr( feature = "derive_serde", serde(rename = "TrptyAgt", skip_serializing_if = "Option::is_none") )]
102752	pub trpty_agt: Option<OrganisationIdentification15Choice>,
102753}
102754
102755impl TradeTransactionIdentification20 {
102756	pub fn validate(&self) -> Result<(), ValidationError> {
102757		if let Some(ref val) = self.tech_rcrd_id {
102758			if val.chars().count() < 1 {
102759				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
102760			}
102761			if val.chars().count() > 140 {
102762				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
102763			}
102764		}
102765		self.rptg_ctr_pty.validate()?;
102766		self.othr_ctr_pty.validate()?;
102767		if let Some(ref val) = self.ntty_rspnsbl_for_rpt { val.validate()? }
102768		if let Some(ref val) = self.unq_trad_idr {
102769			if val.chars().count() < 1 {
102770				return Err(ValidationError::new(1001, "unq_trad_idr is shorter than the minimum length of 1".to_string()));
102771			}
102772			if val.chars().count() > 52 {
102773				return Err(ValidationError::new(1002, "unq_trad_idr exceeds the maximum length of 52".to_string()));
102774			}
102775		}
102776		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
102777		if let Some(ref val) = self.agt_lndr { val.validate()? }
102778		if let Some(ref val) = self.trpty_agt { val.validate()? }
102779		Ok(())
102780	}
102781}
102782
102783
102784// TradeTransactionIdentification24 ...
102785#[cfg_attr(feature = "derive_debug", derive(Debug))]
102786#[cfg_attr(feature = "derive_default", derive(Default))]
102787#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102788#[cfg_attr(feature = "derive_clone", derive(Clone))]
102789#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102790pub struct TradeTransactionIdentification24 {
102791	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
102792	pub tech_rcrd_id: Option<String>,
102793	#[cfg_attr( feature = "derive_serde", serde(rename = "ActnTp", skip_serializing_if = "Option::is_none") )]
102794	pub actn_tp: Option<TransactionOperationType10Code>,
102795	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgTmStmp", skip_serializing_if = "Option::is_none") )]
102796	pub rptg_tm_stmp: Option<String>,
102797	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivEvtTp", skip_serializing_if = "Option::is_none") )]
102798	pub deriv_evt_tp: Option<DerivativeEventType3Code>,
102799	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivEvtTmStmp", skip_serializing_if = "Option::is_none") )]
102800	pub deriv_evt_tm_stmp: Option<DateAndDateTime2Choice>,
102801	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrCtrPty", skip_serializing_if = "Option::is_none") )]
102802	pub othr_ctr_pty: Option<PartyIdentification248Choice>,
102803	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqIdr", skip_serializing_if = "Option::is_none") )]
102804	pub unq_idr: Option<UniqueTransactionIdentifier2Choice>,
102805	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmt", skip_serializing_if = "Option::is_none") )]
102806	pub mstr_agrmt: Option<MasterAgreement8>,
102807	#[cfg_attr( feature = "derive_serde", serde(rename = "CollPrtflCd", skip_serializing_if = "Option::is_none") )]
102808	pub coll_prtfl_cd: Option<CollateralPortfolioCode5Choice>,
102809}
102810
102811impl TradeTransactionIdentification24 {
102812	pub fn validate(&self) -> Result<(), ValidationError> {
102813		if let Some(ref val) = self.tech_rcrd_id {
102814			if val.chars().count() < 1 {
102815				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
102816			}
102817			if val.chars().count() > 140 {
102818				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
102819			}
102820		}
102821		if let Some(ref val) = self.actn_tp { val.validate()? }
102822		if let Some(ref val) = self.deriv_evt_tp { val.validate()? }
102823		if let Some(ref val) = self.deriv_evt_tm_stmp { val.validate()? }
102824		if let Some(ref val) = self.othr_ctr_pty { val.validate()? }
102825		if let Some(ref val) = self.unq_idr { val.validate()? }
102826		if let Some(ref val) = self.mstr_agrmt { val.validate()? }
102827		if let Some(ref val) = self.coll_prtfl_cd { val.validate()? }
102828		Ok(())
102829	}
102830}
102831
102832
102833// TradeTransactionPositionComponent8 ...
102834#[cfg_attr(feature = "derive_debug", derive(Debug))]
102835#[cfg_attr(feature = "derive_default", derive(Default))]
102836#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102837#[cfg_attr(feature = "derive_clone", derive(Clone))]
102838#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102839pub struct TradeTransactionPositionComponent8 {
102840	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
102841	pub tech_rcrd_id: Option<String>,
102842	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtySpcfcData") )]
102843	pub ctr_pty_spcfc_data: CounterpartyData88,
102844	#[cfg_attr( feature = "derive_serde", serde(rename = "LnData", skip_serializing_if = "Option::is_none") )]
102845	pub ln_data: Option<TransactionLoanData32Choice>,
102846	#[cfg_attr( feature = "derive_serde", serde(rename = "CollData", skip_serializing_if = "Option::is_none") )]
102847	pub coll_data: Option<CollateralData35>,
102848	#[cfg_attr( feature = "derive_serde", serde(rename = "LvlTp") )]
102849	pub lvl_tp: ModificationLevel1Code,
102850	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
102851	pub splmtry_data: Option<Vec<SupplementaryData1>>,
102852}
102853
102854impl TradeTransactionPositionComponent8 {
102855	pub fn validate(&self) -> Result<(), ValidationError> {
102856		if let Some(ref val) = self.tech_rcrd_id {
102857			if val.chars().count() < 1 {
102858				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
102859			}
102860			if val.chars().count() > 140 {
102861				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
102862			}
102863		}
102864		self.ctr_pty_spcfc_data.validate()?;
102865		if let Some(ref val) = self.ln_data { val.validate()? }
102866		if let Some(ref val) = self.coll_data { val.validate()? }
102867		self.lvl_tp.validate()?;
102868		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
102869		Ok(())
102870	}
102871}
102872
102873
102874// TradeTypeQueryCriteria2 ...
102875#[cfg_attr(feature = "derive_debug", derive(Debug))]
102876#[cfg_attr(feature = "derive_default", derive(Default))]
102877#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102878#[cfg_attr(feature = "derive_clone", derive(Clone))]
102879#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102880pub struct TradeTypeQueryCriteria2 {
102881	#[cfg_attr( feature = "derive_serde", serde(rename = "Oprtr") )]
102882	pub oprtr: Operation3Code,
102883	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesFincgTxTp", skip_serializing_if = "Option::is_none") )]
102884	pub scties_fincg_tx_tp: Option<Vec<ExposureType10Code>>,
102885	#[cfg_attr( feature = "derive_serde", serde(rename = "CollCmpntTp", skip_serializing_if = "Option::is_none") )]
102886	pub coll_cmpnt_tp: Option<Vec<CollateralType6Code>>,
102887}
102888
102889impl TradeTypeQueryCriteria2 {
102890	pub fn validate(&self) -> Result<(), ValidationError> {
102891		self.oprtr.validate()?;
102892		if let Some(ref vec) = self.scties_fincg_tx_tp { for item in vec { item.validate()? } }
102893		if let Some(ref vec) = self.coll_cmpnt_tp { for item in vec { item.validate()? } }
102894		Ok(())
102895	}
102896}
102897
102898
102899// TradeValuationUpdate9 ...
102900#[cfg_attr(feature = "derive_debug", derive(Debug))]
102901#[cfg_attr(feature = "derive_default", derive(Default))]
102902#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102903#[cfg_attr(feature = "derive_clone", derive(Clone))]
102904#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102905pub struct TradeValuationUpdate9 {
102906	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
102907	pub tech_rcrd_id: Option<String>,
102908	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtySpcfcData") )]
102909	pub ctr_pty_spcfc_data: CounterpartyData88,
102910	#[cfg_attr( feature = "derive_serde", serde(rename = "LnData") )]
102911	pub ln_data: LoanData113,
102912	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
102913	pub splmtry_data: Option<Vec<SupplementaryData1>>,
102914}
102915
102916impl TradeValuationUpdate9 {
102917	pub fn validate(&self) -> Result<(), ValidationError> {
102918		if let Some(ref val) = self.tech_rcrd_id {
102919			if val.chars().count() < 1 {
102920				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
102921			}
102922			if val.chars().count() > 140 {
102923				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 140".to_string()));
102924			}
102925		}
102926		self.ctr_pty_spcfc_data.validate()?;
102927		self.ln_data.validate()?;
102928		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
102929		Ok(())
102930	}
102931}
102932
102933
102934// TradingCapacity7Code ...
102935#[cfg_attr(feature = "derive_debug", derive(Debug))]
102936#[cfg_attr(feature = "derive_default", derive(Default))]
102937#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102938#[cfg_attr(feature = "derive_clone", derive(Clone))]
102939#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102940pub enum TradingCapacity7Code {
102941	#[cfg_attr(feature = "derive_default", default)]
102942	#[cfg_attr( feature = "derive_serde", serde(rename = "AGEN") )]
102943	CodeAGEN,
102944	#[cfg_attr( feature = "derive_serde", serde(rename = "PRIN") )]
102945	CodePRIN,
102946}
102947
102948impl TradingCapacity7Code {
102949	pub fn validate(&self) -> Result<(), ValidationError> {
102950		Ok(())
102951	}
102952}
102953
102954
102955// TradingNameModification1 ...
102956#[cfg_attr(feature = "derive_debug", derive(Debug))]
102957#[cfg_attr(feature = "derive_default", derive(Default))]
102958#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102959#[cfg_attr(feature = "derive_clone", derive(Clone))]
102960#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102961pub struct TradingNameModification1 {
102962	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
102963	pub mod_cd: Option<Modification1Code>,
102964	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgNm") )]
102965	pub tradg_nm: String,
102966}
102967
102968impl TradingNameModification1 {
102969	pub fn validate(&self) -> Result<(), ValidationError> {
102970		if let Some(ref val) = self.mod_cd { val.validate()? }
102971		if self.tradg_nm.chars().count() < 1 {
102972			return Err(ValidationError::new(1001, "tradg_nm is shorter than the minimum length of 1".to_string()));
102973		}
102974		if self.tradg_nm.chars().count() > 350 {
102975			return Err(ValidationError::new(1002, "tradg_nm exceeds the maximum length of 350".to_string()));
102976		}
102977		Ok(())
102978	}
102979}
102980
102981
102982// TradingParameters2 ...
102983#[cfg_attr(feature = "derive_debug", derive(Debug))]
102984#[cfg_attr(feature = "derive_default", derive(Default))]
102985#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
102986#[cfg_attr(feature = "derive_clone", derive(Clone))]
102987#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
102988pub struct TradingParameters2 {
102989	#[cfg_attr( feature = "derive_serde", serde(rename = "MktId", skip_serializing_if = "Option::is_none") )]
102990	pub mkt_id: Option<String>,
102991	#[cfg_attr( feature = "derive_serde", serde(rename = "RndLot", skip_serializing_if = "Option::is_none") )]
102992	pub rnd_lot: Option<FinancialInstrumentQuantity1Choice>,
102993	#[cfg_attr( feature = "derive_serde", serde(rename = "TradLotSz", skip_serializing_if = "Option::is_none") )]
102994	pub trad_lot_sz: Option<FinancialInstrumentQuantity1Choice>,
102995	#[cfg_attr( feature = "derive_serde", serde(rename = "ScndryPlcOfListg", skip_serializing_if = "Option::is_none") )]
102996	pub scndry_plc_of_listg: Option<Vec<String>>,
102997	#[cfg_attr( feature = "derive_serde", serde(rename = "MinTraddNmnlQty", skip_serializing_if = "Option::is_none") )]
102998	pub min_tradd_nmnl_qty: Option<UnitOrFaceAmount1Choice>,
102999	#[cfg_attr( feature = "derive_serde", serde(rename = "MaxTraddNmnlQty", skip_serializing_if = "Option::is_none") )]
103000	pub max_tradd_nmnl_qty: Option<UnitOrFaceAmount1Choice>,
103001	#[cfg_attr( feature = "derive_serde", serde(rename = "MinTradgPricgIncrmt", skip_serializing_if = "Option::is_none") )]
103002	pub min_tradg_pricg_incrmt: Option<f64>,
103003	#[cfg_attr( feature = "derive_serde", serde(rename = "PmryPlcOfListgId", skip_serializing_if = "Option::is_none") )]
103004	pub pmry_plc_of_listg_id: Option<String>,
103005}
103006
103007impl TradingParameters2 {
103008	pub fn validate(&self) -> Result<(), ValidationError> {
103009		if let Some(ref val) = self.mkt_id {
103010			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
103011			if !pattern.is_match(val) {
103012				return Err(ValidationError::new(1005, "mkt_id does not match the required pattern".to_string()));
103013			}
103014		}
103015		if let Some(ref val) = self.rnd_lot { val.validate()? }
103016		if let Some(ref val) = self.trad_lot_sz { val.validate()? }
103017		if let Some(ref vec) = self.scndry_plc_of_listg {
103018			for item in vec {
103019				let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
103020				if !pattern.is_match(&item) {
103021					return Err(ValidationError::new(1005, "scndry_plc_of_listg does not match the required pattern".to_string()));
103022				}
103023			}
103024		}
103025		if let Some(ref val) = self.min_tradd_nmnl_qty { val.validate()? }
103026		if let Some(ref val) = self.max_tradd_nmnl_qty { val.validate()? }
103027		if let Some(ref val) = self.pmry_plc_of_listg_id {
103028			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
103029			if !pattern.is_match(val) {
103030				return Err(ValidationError::new(1005, "pmry_plc_of_listg_id does not match the required pattern".to_string()));
103031			}
103032		}
103033		Ok(())
103034	}
103035}
103036
103037
103038// TradingUnderWaiversPercentage1 ...
103039#[cfg_attr(feature = "derive_debug", derive(Debug))]
103040#[cfg_attr(feature = "derive_default", derive(Default))]
103041#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103042#[cfg_attr(feature = "derive_clone", derive(Clone))]
103043#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103044pub struct TradingUnderWaiversPercentage1 {
103045	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgUdrWvrPctg") )]
103046	pub tradg_udr_wvr_pctg: f64,
103047	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn") )]
103048	pub tradg_vn: String,
103049	#[cfg_attr( feature = "derive_serde", serde(rename = "Dsclmr", skip_serializing_if = "Option::is_none") )]
103050	pub dsclmr: Option<String>,
103051}
103052
103053impl TradingUnderWaiversPercentage1 {
103054	pub fn validate(&self) -> Result<(), ValidationError> {
103055		let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
103056		if !pattern.is_match(&self.tradg_vn) {
103057			return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
103058		}
103059		if let Some(ref val) = self.dsclmr {
103060			if val.chars().count() < 1 {
103061				return Err(ValidationError::new(1001, "dsclmr is shorter than the minimum length of 1".to_string()));
103062			}
103063			if val.chars().count() > 350 {
103064				return Err(ValidationError::new(1002, "dsclmr exceeds the maximum length of 350".to_string()));
103065			}
103066		}
103067		Ok(())
103068	}
103069}
103070
103071
103072// TradingVenue2Code ...
103073#[cfg_attr(feature = "derive_debug", derive(Debug))]
103074#[cfg_attr(feature = "derive_default", derive(Default))]
103075#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103076#[cfg_attr(feature = "derive_clone", derive(Clone))]
103077#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103078pub enum TradingVenue2Code {
103079	#[cfg_attr(feature = "derive_default", default)]
103080	#[cfg_attr( feature = "derive_serde", serde(rename = "APPA") )]
103081	CodeAPPA,
103082	#[cfg_attr( feature = "derive_serde", serde(rename = "CTPS") )]
103083	CodeCTPS,
103084}
103085
103086impl TradingVenue2Code {
103087	pub fn validate(&self) -> Result<(), ValidationError> {
103088		Ok(())
103089	}
103090}
103091
103092
103093// TradingVenueAttributes1 ...
103094#[cfg_attr(feature = "derive_debug", derive(Debug))]
103095#[cfg_attr(feature = "derive_default", derive(Default))]
103096#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103097#[cfg_attr(feature = "derive_clone", derive(Clone))]
103098#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103099pub struct TradingVenueAttributes1 {
103100	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
103101	pub id: String,
103102	#[cfg_attr( feature = "derive_serde", serde(rename = "IssrReq") )]
103103	pub issr_req: bool,
103104	#[cfg_attr( feature = "derive_serde", serde(rename = "AdmssnApprvlDtByIssr", skip_serializing_if = "Option::is_none") )]
103105	pub admssn_apprvl_dt_by_issr: Option<String>,
103106	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqForAdmssnDt", skip_serializing_if = "Option::is_none") )]
103107	pub req_for_admssn_dt: Option<String>,
103108	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstTradDt", skip_serializing_if = "Option::is_none") )]
103109	pub frst_trad_dt: Option<String>,
103110	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
103111	pub termntn_dt: Option<String>,
103112}
103113
103114impl TradingVenueAttributes1 {
103115	pub fn validate(&self) -> Result<(), ValidationError> {
103116		let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
103117		if !pattern.is_match(&self.id) {
103118			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
103119		}
103120		Ok(())
103121	}
103122}
103123
103124
103125// TradingVenueAttributes2 ...
103126#[cfg_attr(feature = "derive_debug", derive(Debug))]
103127#[cfg_attr(feature = "derive_default", derive(Default))]
103128#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103129#[cfg_attr(feature = "derive_clone", derive(Clone))]
103130#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103131pub struct TradingVenueAttributes2 {
103132	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
103133	pub id: String,
103134	#[cfg_attr( feature = "derive_serde", serde(rename = "IssrReq", skip_serializing_if = "Option::is_none") )]
103135	pub issr_req: Option<bool>,
103136	#[cfg_attr( feature = "derive_serde", serde(rename = "AdmssnApprvlDtByIssr", skip_serializing_if = "Option::is_none") )]
103137	pub admssn_apprvl_dt_by_issr: Option<String>,
103138	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqForAdmssnDt", skip_serializing_if = "Option::is_none") )]
103139	pub req_for_admssn_dt: Option<String>,
103140	#[cfg_attr( feature = "derive_serde", serde(rename = "FrstTradDt", skip_serializing_if = "Option::is_none") )]
103141	pub frst_trad_dt: Option<String>,
103142	#[cfg_attr( feature = "derive_serde", serde(rename = "TermntnDt", skip_serializing_if = "Option::is_none") )]
103143	pub termntn_dt: Option<String>,
103144}
103145
103146impl TradingVenueAttributes2 {
103147	pub fn validate(&self) -> Result<(), ValidationError> {
103148		let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
103149		if !pattern.is_match(&self.id) {
103150			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
103151		}
103152		Ok(())
103153	}
103154}
103155
103156
103157// TradingVenueIdentification1Choice ...
103158#[cfg_attr(feature = "derive_debug", derive(Debug))]
103159#[cfg_attr(feature = "derive_default", derive(Default))]
103160#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103161#[cfg_attr(feature = "derive_clone", derive(Clone))]
103162#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103163pub struct TradingVenueIdentification1Choice {
103164	#[cfg_attr( feature = "derive_serde", serde(rename = "MktIdCd", skip_serializing_if = "Option::is_none") )]
103165	pub mkt_id_cd: Option<String>,
103166	#[cfg_attr( feature = "derive_serde", serde(rename = "NtlCmptntAuthrty", skip_serializing_if = "Option::is_none") )]
103167	pub ntl_cmptnt_authrty: Option<String>,
103168	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
103169	pub othr: Option<TradingVenueIdentification2>,
103170}
103171
103172impl TradingVenueIdentification1Choice {
103173	pub fn validate(&self) -> Result<(), ValidationError> {
103174		if let Some(ref val) = self.mkt_id_cd {
103175			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
103176			if !pattern.is_match(val) {
103177				return Err(ValidationError::new(1005, "mkt_id_cd does not match the required pattern".to_string()));
103178			}
103179		}
103180		if let Some(ref val) = self.ntl_cmptnt_authrty {
103181			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
103182			if !pattern.is_match(val) {
103183				return Err(ValidationError::new(1005, "ntl_cmptnt_authrty does not match the required pattern".to_string()));
103184			}
103185		}
103186		if let Some(ref val) = self.othr { val.validate()? }
103187		Ok(())
103188	}
103189}
103190
103191
103192// TradingVenueIdentification2 ...
103193#[cfg_attr(feature = "derive_debug", derive(Debug))]
103194#[cfg_attr(feature = "derive_default", derive(Default))]
103195#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103196#[cfg_attr(feature = "derive_clone", derive(Clone))]
103197#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103198pub struct TradingVenueIdentification2 {
103199	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
103200	pub id: String,
103201	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
103202	pub tp: TradingVenue2Code,
103203}
103204
103205impl TradingVenueIdentification2 {
103206	pub fn validate(&self) -> Result<(), ValidationError> {
103207		if self.id.chars().count() < 1 {
103208			return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
103209		}
103210		if self.id.chars().count() > 50 {
103211			return Err(ValidationError::new(1002, "id exceeds the maximum length of 50".to_string()));
103212		}
103213		self.tp.validate()?;
103214		Ok(())
103215	}
103216}
103217
103218
103219// TradingVenueType1Choice ...
103220#[cfg_attr(feature = "derive_debug", derive(Debug))]
103221#[cfg_attr(feature = "derive_default", derive(Default))]
103222#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103223#[cfg_attr(feature = "derive_clone", derive(Clone))]
103224#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103225pub struct TradingVenueType1Choice {
103226	#[cfg_attr( feature = "derive_serde", serde(rename = "OnVn", skip_serializing_if = "Option::is_none") )]
103227	pub on_vn: Option<TradeMarket2Code>,
103228	#[cfg_attr( feature = "derive_serde", serde(rename = "OffVn", skip_serializing_if = "Option::is_none") )]
103229	pub off_vn: Option<NoReasonCode>,
103230}
103231
103232impl TradingVenueType1Choice {
103233	pub fn validate(&self) -> Result<(), ValidationError> {
103234		if let Some(ref val) = self.on_vn { val.validate()? }
103235		if let Some(ref val) = self.off_vn { val.validate()? }
103236		Ok(())
103237	}
103238}
103239
103240
103241// Tranche3 ...
103242#[cfg_attr(feature = "derive_debug", derive(Debug))]
103243#[cfg_attr(feature = "derive_default", derive(Default))]
103244#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103245#[cfg_attr(feature = "derive_clone", derive(Clone))]
103246#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103247pub struct Tranche3 {
103248	#[cfg_attr( feature = "derive_serde", serde(rename = "AttchmntPt", skip_serializing_if = "Option::is_none") )]
103249	pub attchmnt_pt: Option<f64>,
103250	#[cfg_attr( feature = "derive_serde", serde(rename = "DtchmntPt", skip_serializing_if = "Option::is_none") )]
103251	pub dtchmnt_pt: Option<f64>,
103252}
103253
103254impl Tranche3 {
103255	pub fn validate(&self) -> Result<(), ValidationError> {
103256		Ok(())
103257	}
103258}
103259
103260
103261// TrancheIndicator3Choice ...
103262#[cfg_attr(feature = "derive_debug", derive(Debug))]
103263#[cfg_attr(feature = "derive_default", derive(Default))]
103264#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103265#[cfg_attr(feature = "derive_clone", derive(Clone))]
103266#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103267pub struct TrancheIndicator3Choice {
103268	#[cfg_attr( feature = "derive_serde", serde(rename = "Trnchd", skip_serializing_if = "Option::is_none") )]
103269	pub trnchd: Option<Tranche3>,
103270	#[cfg_attr( feature = "derive_serde", serde(rename = "Utrnchd", skip_serializing_if = "Option::is_none") )]
103271	pub utrnchd: Option<NoReasonCode>,
103272}
103273
103274impl TrancheIndicator3Choice {
103275	pub fn validate(&self) -> Result<(), ValidationError> {
103276		if let Some(ref val) = self.trnchd { val.validate()? }
103277		if let Some(ref val) = self.utrnchd { val.validate()? }
103278		Ok(())
103279	}
103280}
103281
103282
103283// Transaction159 ...
103284#[cfg_attr(feature = "derive_debug", derive(Debug))]
103285#[cfg_attr(feature = "derive_default", derive(Default))]
103286#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103287#[cfg_attr(feature = "derive_clone", derive(Clone))]
103288#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103289pub struct Transaction159 {
103290	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTo", skip_serializing_if = "Option::is_none") )]
103291	pub pmt_to: Option<System3>,
103292	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtFr", skip_serializing_if = "Option::is_none") )]
103293	pub pmt_fr: Option<System3>,
103294	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd", skip_serializing_if = "Option::is_none") )]
103295	pub cdt_dbt_ind: Option<CreditDebitCode>,
103296	#[cfg_attr( feature = "derive_serde", serde(rename = "Pmt", skip_serializing_if = "Option::is_none") )]
103297	pub pmt: Option<PaymentInstruction47>,
103298	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctNtry", skip_serializing_if = "Option::is_none") )]
103299	pub acct_ntry: Option<CashAccountAndEntry5>,
103300	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesTxRefs", skip_serializing_if = "Option::is_none") )]
103301	pub scties_tx_refs: Option<SecuritiesTransactionReferences1>,
103302}
103303
103304impl Transaction159 {
103305	pub fn validate(&self) -> Result<(), ValidationError> {
103306		if let Some(ref val) = self.pmt_to { val.validate()? }
103307		if let Some(ref val) = self.pmt_fr { val.validate()? }
103308		if let Some(ref val) = self.cdt_dbt_ind { val.validate()? }
103309		if let Some(ref val) = self.pmt { val.validate()? }
103310		if let Some(ref val) = self.acct_ntry { val.validate()? }
103311		if let Some(ref val) = self.scties_tx_refs { val.validate()? }
103312		Ok(())
103313	}
103314}
103315
103316
103317// TransactionAgents6 ...
103318#[cfg_attr(feature = "derive_debug", derive(Debug))]
103319#[cfg_attr(feature = "derive_default", derive(Default))]
103320#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103321#[cfg_attr(feature = "derive_clone", derive(Clone))]
103322#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103323pub struct TransactionAgents6 {
103324	#[cfg_attr( feature = "derive_serde", serde(rename = "InstgAgt", skip_serializing_if = "Option::is_none") )]
103325	pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
103326	#[cfg_attr( feature = "derive_serde", serde(rename = "InstdAgt", skip_serializing_if = "Option::is_none") )]
103327	pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
103328	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
103329	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
103330	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
103331	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
103332	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1", skip_serializing_if = "Option::is_none") )]
103333	pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
103334	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2", skip_serializing_if = "Option::is_none") )]
103335	pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
103336	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3", skip_serializing_if = "Option::is_none") )]
103337	pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
103338	#[cfg_attr( feature = "derive_serde", serde(rename = "RcvgAgt", skip_serializing_if = "Option::is_none") )]
103339	pub rcvg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
103340	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvrgAgt", skip_serializing_if = "Option::is_none") )]
103341	pub dlvrg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
103342	#[cfg_attr( feature = "derive_serde", serde(rename = "IssgAgt", skip_serializing_if = "Option::is_none") )]
103343	pub issg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
103344	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmPlc", skip_serializing_if = "Option::is_none") )]
103345	pub sttlm_plc: Option<BranchAndFinancialInstitutionIdentification8>,
103346	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
103347	pub prtry: Option<Vec<ProprietaryAgent5>>,
103348}
103349
103350impl TransactionAgents6 {
103351	pub fn validate(&self) -> Result<(), ValidationError> {
103352		if let Some(ref val) = self.instg_agt { val.validate()? }
103353		if let Some(ref val) = self.instd_agt { val.validate()? }
103354		if let Some(ref val) = self.dbtr_agt { val.validate()? }
103355		if let Some(ref val) = self.cdtr_agt { val.validate()? }
103356		if let Some(ref val) = self.intrmy_agt1 { val.validate()? }
103357		if let Some(ref val) = self.intrmy_agt2 { val.validate()? }
103358		if let Some(ref val) = self.intrmy_agt3 { val.validate()? }
103359		if let Some(ref val) = self.rcvg_agt { val.validate()? }
103360		if let Some(ref val) = self.dlvrg_agt { val.validate()? }
103361		if let Some(ref val) = self.issg_agt { val.validate()? }
103362		if let Some(ref val) = self.sttlm_plc { val.validate()? }
103363		if let Some(ref vec) = self.prtry { for item in vec { item.validate()? } }
103364		Ok(())
103365	}
103366}
103367
103368
103369// TransactionAllocation1 ...
103370#[cfg_attr(feature = "derive_debug", derive(Debug))]
103371#[cfg_attr(feature = "derive_default", derive(Default))]
103372#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103373#[cfg_attr(feature = "derive_clone", derive(Clone))]
103374#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103375pub struct TransactionAllocation1 {
103376	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
103377	pub amt: ActiveOrHistoricCurrencyAndAmount,
103378	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
103379	pub cdt_dbt_ind: CreditDebitCode,
103380	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct") )]
103381	pub acct: CashAccount40,
103382	#[cfg_attr( feature = "derive_serde", serde(rename = "Purp") )]
103383	pub purp: Purpose2Choice,
103384	#[cfg_attr( feature = "derive_serde", serde(rename = "Ref") )]
103385	pub ref_attr: String,
103386	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdRefs", skip_serializing_if = "Option::is_none") )]
103387	pub rltd_refs: Option<Vec<References74Choice>>,
103388}
103389
103390impl TransactionAllocation1 {
103391	pub fn validate(&self) -> Result<(), ValidationError> {
103392		self.amt.validate()?;
103393		self.cdt_dbt_ind.validate()?;
103394		self.acct.validate()?;
103395		self.purp.validate()?;
103396		if self.ref_attr.chars().count() < 1 {
103397			return Err(ValidationError::new(1001, "ref_attr is shorter than the minimum length of 1".to_string()));
103398		}
103399		if self.ref_attr.chars().count() > 35 {
103400			return Err(ValidationError::new(1002, "ref_attr exceeds the maximum length of 35".to_string()));
103401		}
103402		if let Some(ref vec) = self.rltd_refs { for item in vec { item.validate()? } }
103403		Ok(())
103404	}
103405}
103406
103407
103408// TransactionAmendment1 ...
103409#[cfg_attr(feature = "derive_debug", derive(Debug))]
103410#[cfg_attr(feature = "derive_default", derive(Default))]
103411#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103412#[cfg_attr(feature = "derive_clone", derive(Clone))]
103413#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103414pub struct TransactionAmendment1 {
103415	#[cfg_attr( feature = "derive_serde", serde(rename = "Pth", skip_serializing_if = "Option::is_none") )]
103416	pub pth: Option<String>,
103417	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcrd") )]
103418	pub rcrd: TransactionAmendment1Choice,
103419}
103420
103421impl TransactionAmendment1 {
103422	pub fn validate(&self) -> Result<(), ValidationError> {
103423		if let Some(ref val) = self.pth {
103424			if val.chars().count() < 1 {
103425				return Err(ValidationError::new(1001, "pth is shorter than the minimum length of 1".to_string()));
103426			}
103427			if val.chars().count() > 2048 {
103428				return Err(ValidationError::new(1002, "pth exceeds the maximum length of 2048".to_string()));
103429			}
103430		}
103431		self.rcrd.validate()?;
103432		Ok(())
103433	}
103434}
103435
103436
103437// TransactionAmendment1Choice ...
103438#[cfg_attr(feature = "derive_debug", derive(Debug))]
103439#[cfg_attr(feature = "derive_default", derive(Default))]
103440#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103441#[cfg_attr(feature = "derive_clone", derive(Clone))]
103442#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103443pub struct TransactionAmendment1Choice {
103444	#[cfg_attr( feature = "derive_serde", serde(rename = "Agt", skip_serializing_if = "Option::is_none") )]
103445	pub agt: Option<BranchAndFinancialInstitutionIdentification6>,
103446	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
103447	pub amt: Option<ActiveCurrencyAndAmount>,
103448	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none") )]
103449	pub any_bic: Option<String>,
103450	#[cfg_attr( feature = "derive_serde", serde(rename = "BICFI", skip_serializing_if = "Option::is_none") )]
103451	pub bicfi: Option<String>,
103452	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAcct", skip_serializing_if = "Option::is_none") )]
103453	pub csh_acct: Option<CashAccount40>,
103454	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
103455	pub cd: Option<String>,
103456	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt", skip_serializing_if = "Option::is_none") )]
103457	pub dt: Option<String>,
103458	#[cfg_attr( feature = "derive_serde", serde(rename = "DtTm", skip_serializing_if = "Option::is_none") )]
103459	pub dt_tm: Option<String>,
103460	#[cfg_attr( feature = "derive_serde", serde(rename = "Pty", skip_serializing_if = "Option::is_none") )]
103461	pub pty: Option<PartyIdentification135>,
103462	#[cfg_attr( feature = "derive_serde", serde(rename = "Rmt", skip_serializing_if = "Option::is_none") )]
103463	pub rmt: Option<Remittance1>,
103464	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
103465	pub othr: Option<String>,
103466}
103467
103468impl TransactionAmendment1Choice {
103469	pub fn validate(&self) -> Result<(), ValidationError> {
103470		if let Some(ref val) = self.agt { val.validate()? }
103471		if let Some(ref val) = self.amt { val.validate()? }
103472		if let Some(ref val) = self.any_bic {
103473			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
103474			if !pattern.is_match(val) {
103475				return Err(ValidationError::new(1005, "any_bic does not match the required pattern".to_string()));
103476			}
103477		}
103478		if let Some(ref val) = self.bicfi {
103479			let pattern = Regex::new("[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}").unwrap();
103480			if !pattern.is_match(val) {
103481				return Err(ValidationError::new(1005, "bicfi does not match the required pattern".to_string()));
103482			}
103483		}
103484		if let Some(ref val) = self.csh_acct { val.validate()? }
103485		if let Some(ref val) = self.cd {
103486			if val.chars().count() < 1 {
103487				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
103488			}
103489			if val.chars().count() > 4 {
103490				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
103491			}
103492		}
103493		if let Some(ref val) = self.pty { val.validate()? }
103494		if let Some(ref val) = self.rmt { val.validate()? }
103495		if let Some(ref val) = self.othr {
103496			if val.chars().count() < 1 {
103497				return Err(ValidationError::new(1001, "othr is shorter than the minimum length of 1".to_string()));
103498			}
103499			if val.chars().count() > 140 {
103500				return Err(ValidationError::new(1002, "othr exceeds the maximum length of 140".to_string()));
103501			}
103502		}
103503		Ok(())
103504	}
103505}
103506
103507
103508// TransactionAndDocumentIdentification6 ...
103509#[cfg_attr(feature = "derive_debug", derive(Debug))]
103510#[cfg_attr(feature = "derive_default", derive(Default))]
103511#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103512#[cfg_attr(feature = "derive_clone", derive(Clone))]
103513#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103514pub struct TransactionAndDocumentIdentification6 {
103515	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId") )]
103516	pub tx_id: String,
103517	#[cfg_attr( feature = "derive_serde", serde(rename = "DocId", skip_serializing_if = "Option::is_none") )]
103518	pub doc_id: Option<String>,
103519	#[cfg_attr( feature = "derive_serde", serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none") )]
103520	pub cre_dt_tm: Option<DateAndDateTime2Choice>,
103521	#[cfg_attr( feature = "derive_serde", serde(rename = "CpyDplct", skip_serializing_if = "Option::is_none") )]
103522	pub cpy_dplct: Option<CopyDuplicate1Code>,
103523	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgOrgtr", skip_serializing_if = "Option::is_none") )]
103524	pub msg_orgtr: Option<PartyIdentification136>,
103525	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgRcpt", skip_serializing_if = "Option::is_none") )]
103526	pub msg_rcpt: Option<PartyIdentification136>,
103527}
103528
103529impl TransactionAndDocumentIdentification6 {
103530	pub fn validate(&self) -> Result<(), ValidationError> {
103531		if self.tx_id.chars().count() < 1 {
103532			return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
103533		}
103534		if self.tx_id.chars().count() > 35 {
103535			return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
103536		}
103537		if let Some(ref val) = self.doc_id {
103538			if val.chars().count() < 1 {
103539				return Err(ValidationError::new(1001, "doc_id is shorter than the minimum length of 1".to_string()));
103540			}
103541			if val.chars().count() > 35 {
103542				return Err(ValidationError::new(1002, "doc_id exceeds the maximum length of 35".to_string()));
103543			}
103544		}
103545		if let Some(ref val) = self.cre_dt_tm { val.validate()? }
103546		if let Some(ref val) = self.cpy_dplct { val.validate()? }
103547		if let Some(ref val) = self.msg_orgtr { val.validate()? }
103548		if let Some(ref val) = self.msg_rcpt { val.validate()? }
103549		Ok(())
103550	}
103551}
103552
103553
103554// TransactionCertificate4 ...
103555#[cfg_attr(feature = "derive_debug", derive(Debug))]
103556#[cfg_attr(feature = "derive_default", derive(Default))]
103557#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103558#[cfg_attr(feature = "derive_clone", derive(Clone))]
103559#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103560pub struct TransactionCertificate4 {
103561	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId") )]
103562	pub tx_id: String,
103563	#[cfg_attr( feature = "derive_serde", serde(rename = "Cert") )]
103564	pub cert: DocumentIdentification28,
103565	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
103566	pub acct: Option<CashAccount40>,
103567	#[cfg_attr( feature = "derive_serde", serde(rename = "BkAcctDmcltnCtry", skip_serializing_if = "Option::is_none") )]
103568	pub bk_acct_dmcltn_ctry: Option<String>,
103569	#[cfg_attr( feature = "derive_serde", serde(rename = "Amdmnt", skip_serializing_if = "Option::is_none") )]
103570	pub amdmnt: Option<DocumentAmendment1>,
103571	#[cfg_attr( feature = "derive_serde", serde(rename = "CertRcrd") )]
103572	pub cert_rcrd: Vec<TransactionCertificateRecord2>,
103573	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
103574	pub splmtry_data: Option<Vec<SupplementaryData1>>,
103575}
103576
103577impl TransactionCertificate4 {
103578	pub fn validate(&self) -> Result<(), ValidationError> {
103579		if self.tx_id.chars().count() < 1 {
103580			return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
103581		}
103582		if self.tx_id.chars().count() > 35 {
103583			return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
103584		}
103585		self.cert.validate()?;
103586		if let Some(ref val) = self.acct { val.validate()? }
103587		if let Some(ref val) = self.bk_acct_dmcltn_ctry {
103588			let pattern = Regex::new("[A-Z]{2,2}").unwrap();
103589			if !pattern.is_match(val) {
103590				return Err(ValidationError::new(1005, "bk_acct_dmcltn_ctry does not match the required pattern".to_string()));
103591			}
103592		}
103593		if let Some(ref val) = self.amdmnt { val.validate()? }
103594		for item in &self.cert_rcrd { item.validate()? }
103595		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
103596		Ok(())
103597	}
103598}
103599
103600
103601// TransactionCertificate5 ...
103602#[cfg_attr(feature = "derive_debug", derive(Debug))]
103603#[cfg_attr(feature = "derive_default", derive(Default))]
103604#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103605#[cfg_attr(feature = "derive_clone", derive(Clone))]
103606#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103607pub struct TransactionCertificate5 {
103608	#[cfg_attr( feature = "derive_serde", serde(rename = "RfrdDoc") )]
103609	pub rfrd_doc: CertificateReference2,
103610	#[cfg_attr( feature = "derive_serde", serde(rename = "TxDt") )]
103611	pub tx_dt: String,
103612	#[cfg_attr( feature = "derive_serde", serde(rename = "TxTp", skip_serializing_if = "Option::is_none") )]
103613	pub tx_tp: Option<String>,
103614	#[cfg_attr( feature = "derive_serde", serde(rename = "LclInstrm") )]
103615	pub lcl_instrm: String,
103616	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt") )]
103617	pub amt: ActiveCurrencyAndAmount,
103618}
103619
103620impl TransactionCertificate5 {
103621	pub fn validate(&self) -> Result<(), ValidationError> {
103622		self.rfrd_doc.validate()?;
103623		if let Some(ref val) = self.tx_tp {
103624			let pattern = Regex::new("[0-9]").unwrap();
103625			if !pattern.is_match(val) {
103626				return Err(ValidationError::new(1005, "tx_tp does not match the required pattern".to_string()));
103627			}
103628		}
103629		let pattern = Regex::new("[0-9]{5}").unwrap();
103630		if !pattern.is_match(&self.lcl_instrm) {
103631			return Err(ValidationError::new(1005, "lcl_instrm does not match the required pattern".to_string()));
103632		}
103633		self.amt.validate()?;
103634		Ok(())
103635	}
103636}
103637
103638
103639// TransactionCertificateContract2 ...
103640#[cfg_attr(feature = "derive_debug", derive(Debug))]
103641#[cfg_attr(feature = "derive_default", derive(Default))]
103642#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103643#[cfg_attr(feature = "derive_clone", derive(Clone))]
103644#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103645pub struct TransactionCertificateContract2 {
103646	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctRef", skip_serializing_if = "Option::is_none") )]
103647	pub ctrct_ref: Option<ContractRegistrationReference2Choice>,
103648	#[cfg_attr( feature = "derive_serde", serde(rename = "TxAmtInCtrctCcy", skip_serializing_if = "Option::is_none") )]
103649	pub tx_amt_in_ctrct_ccy: Option<ActiveCurrencyAndAmount>,
103650	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdShipmntDt", skip_serializing_if = "Option::is_none") )]
103651	pub xpctd_shipmnt_dt: Option<String>,
103652	#[cfg_attr( feature = "derive_serde", serde(rename = "XpctdAdvncPmtRtrDt", skip_serializing_if = "Option::is_none") )]
103653	pub xpctd_advnc_pmt_rtr_dt: Option<String>,
103654	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
103655	pub addtl_inf: Option<String>,
103656}
103657
103658impl TransactionCertificateContract2 {
103659	pub fn validate(&self) -> Result<(), ValidationError> {
103660		if let Some(ref val) = self.ctrct_ref { val.validate()? }
103661		if let Some(ref val) = self.tx_amt_in_ctrct_ccy { val.validate()? }
103662		if let Some(ref val) = self.addtl_inf {
103663			if val.chars().count() < 1 {
103664				return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
103665			}
103666			if val.chars().count() > 1025 {
103667				return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 1025".to_string()));
103668			}
103669		}
103670		Ok(())
103671	}
103672}
103673
103674
103675// TransactionCertificateRecord2 ...
103676#[cfg_attr(feature = "derive_debug", derive(Debug))]
103677#[cfg_attr(feature = "derive_default", derive(Default))]
103678#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103679#[cfg_attr(feature = "derive_clone", derive(Clone))]
103680#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103681pub struct TransactionCertificateRecord2 {
103682	#[cfg_attr( feature = "derive_serde", serde(rename = "CertRcrdId") )]
103683	pub cert_rcrd_id: String,
103684	#[cfg_attr( feature = "derive_serde", serde(rename = "DocSubmitgPrcdr", skip_serializing_if = "Option::is_none") )]
103685	pub doc_submitg_prcdr: Option<String>,
103686	#[cfg_attr( feature = "derive_serde", serde(rename = "Tx") )]
103687	pub tx: TransactionCertificate5,
103688	#[cfg_attr( feature = "derive_serde", serde(rename = "Ctrct", skip_serializing_if = "Option::is_none") )]
103689	pub ctrct: Option<TransactionCertificateContract2>,
103690	#[cfg_attr( feature = "derive_serde", serde(rename = "Attchmnt", skip_serializing_if = "Option::is_none") )]
103691	pub attchmnt: Option<Vec<DocumentGeneralInformation5>>,
103692}
103693
103694impl TransactionCertificateRecord2 {
103695	pub fn validate(&self) -> Result<(), ValidationError> {
103696		if self.cert_rcrd_id.chars().count() < 1 {
103697			return Err(ValidationError::new(1001, "cert_rcrd_id is shorter than the minimum length of 1".to_string()));
103698		}
103699		if self.cert_rcrd_id.chars().count() > 35 {
103700			return Err(ValidationError::new(1002, "cert_rcrd_id exceeds the maximum length of 35".to_string()));
103701		}
103702		if let Some(ref val) = self.doc_submitg_prcdr {
103703			let pattern = Regex::new("[0-9]").unwrap();
103704			if !pattern.is_match(val) {
103705				return Err(ValidationError::new(1005, "doc_submitg_prcdr does not match the required pattern".to_string()));
103706			}
103707		}
103708		self.tx.validate()?;
103709		if let Some(ref val) = self.ctrct { val.validate()? }
103710		if let Some(ref vec) = self.attchmnt { for item in vec { item.validate()? } }
103711		Ok(())
103712	}
103713}
103714
103715
103716// TransactionChannel1Code ...
103717#[cfg_attr(feature = "derive_debug", derive(Debug))]
103718#[cfg_attr(feature = "derive_default", derive(Default))]
103719#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103720#[cfg_attr(feature = "derive_clone", derive(Clone))]
103721#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103722pub enum TransactionChannel1Code {
103723	#[cfg_attr(feature = "derive_default", default)]
103724	#[cfg_attr( feature = "derive_serde", serde(rename = "MAIL") )]
103725	CodeMAIL,
103726	#[cfg_attr( feature = "derive_serde", serde(rename = "TLPH") )]
103727	CodeTLPH,
103728	#[cfg_attr( feature = "derive_serde", serde(rename = "ECOM") )]
103729	CodeECOM,
103730	#[cfg_attr( feature = "derive_serde", serde(rename = "TVPY") )]
103731	CodeTVPY,
103732}
103733
103734impl TransactionChannel1Code {
103735	pub fn validate(&self) -> Result<(), ValidationError> {
103736		Ok(())
103737	}
103738}
103739
103740
103741// TransactionChannel2Code ...
103742#[cfg_attr(feature = "derive_debug", derive(Debug))]
103743#[cfg_attr(feature = "derive_default", derive(Default))]
103744#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103745#[cfg_attr(feature = "derive_clone", derive(Clone))]
103746#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103747pub enum TransactionChannel2Code {
103748	#[cfg_attr(feature = "derive_default", default)]
103749	#[cfg_attr( feature = "derive_serde", serde(rename = "FIAD") )]
103750	CodeFIAD,
103751	#[cfg_attr( feature = "derive_serde", serde(rename = "HOBA") )]
103752	CodeHOBA,
103753	#[cfg_attr( feature = "derive_serde", serde(rename = "BRAN") )]
103754	CodeBRAN,
103755}
103756
103757impl TransactionChannel2Code {
103758	pub fn validate(&self) -> Result<(), ValidationError> {
103759		Ok(())
103760	}
103761}
103762
103763
103764// TransactionChannelType1Choice ...
103765#[cfg_attr(feature = "derive_debug", derive(Debug))]
103766#[cfg_attr(feature = "derive_default", derive(Default))]
103767#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103768#[cfg_attr(feature = "derive_clone", derive(Clone))]
103769#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103770pub struct TransactionChannelType1Choice {
103771	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
103772	pub cd: Option<TransactionChannel2Code>,
103773	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
103774	pub prtry: Option<GenericIdentification47>,
103775}
103776
103777impl TransactionChannelType1Choice {
103778	pub fn validate(&self) -> Result<(), ValidationError> {
103779		if let Some(ref val) = self.cd { val.validate()? }
103780		if let Some(ref val) = self.prtry { val.validate()? }
103781		Ok(())
103782	}
103783}
103784
103785
103786// TransactionCollateralData18Choice ...
103787#[cfg_attr(feature = "derive_debug", derive(Debug))]
103788#[cfg_attr(feature = "derive_default", derive(Default))]
103789#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103790#[cfg_attr(feature = "derive_clone", derive(Clone))]
103791#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103792pub struct TransactionCollateralData18Choice {
103793	#[cfg_attr( feature = "derive_serde", serde(rename = "RpTrad", skip_serializing_if = "Option::is_none") )]
103794	pub rp_trad: Option<Collateral52>,
103795	#[cfg_attr( feature = "derive_serde", serde(rename = "BuySellBck", skip_serializing_if = "Option::is_none") )]
103796	pub buy_sell_bck: Option<Collateral52>,
103797	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesLndg", skip_serializing_if = "Option::is_none") )]
103798	pub scties_lndg: Option<CollateralFlag13Choice>,
103799	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnLndg", skip_serializing_if = "Option::is_none") )]
103800	pub mrgn_lndg: Option<Vec<Security55>>,
103801}
103802
103803impl TransactionCollateralData18Choice {
103804	pub fn validate(&self) -> Result<(), ValidationError> {
103805		if let Some(ref val) = self.rp_trad { val.validate()? }
103806		if let Some(ref val) = self.buy_sell_bck { val.validate()? }
103807		if let Some(ref val) = self.scties_lndg { val.validate()? }
103808		if let Some(ref vec) = self.mrgn_lndg { for item in vec { item.validate()? } }
103809		Ok(())
103810	}
103811}
103812
103813
103814// TransactionCounterpartyData11 ...
103815#[cfg_attr(feature = "derive_debug", derive(Debug))]
103816#[cfg_attr(feature = "derive_default", derive(Default))]
103817#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103818#[cfg_attr(feature = "derive_clone", derive(Clone))]
103819#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103820pub struct TransactionCounterpartyData11 {
103821	#[cfg_attr( feature = "derive_serde", serde(rename = "Bnfcry", skip_serializing_if = "Option::is_none") )]
103822	pub bnfcry: Option<PartyIdentification236Choice>,
103823	#[cfg_attr( feature = "derive_serde", serde(rename = "TrptyAgt", skip_serializing_if = "Option::is_none") )]
103824	pub trpty_agt: Option<OrganisationIdentification15Choice>,
103825	#[cfg_attr( feature = "derive_serde", serde(rename = "Brkr", skip_serializing_if = "Option::is_none") )]
103826	pub brkr: Option<OrganisationIdentification15Choice>,
103827	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrMmb", skip_serializing_if = "Option::is_none") )]
103828	pub clr_mmb: Option<OrganisationIdentification15Choice>,
103829	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmPties", skip_serializing_if = "Option::is_none") )]
103830	pub sttlm_pties: Option<SettlementParties34Choice>,
103831	#[cfg_attr( feature = "derive_serde", serde(rename = "AgtLndr", skip_serializing_if = "Option::is_none") )]
103832	pub agt_lndr: Option<OrganisationIdentification15Choice>,
103833}
103834
103835impl TransactionCounterpartyData11 {
103836	pub fn validate(&self) -> Result<(), ValidationError> {
103837		if let Some(ref val) = self.bnfcry { val.validate()? }
103838		if let Some(ref val) = self.trpty_agt { val.validate()? }
103839		if let Some(ref val) = self.brkr { val.validate()? }
103840		if let Some(ref val) = self.clr_mmb { val.validate()? }
103841		if let Some(ref val) = self.sttlm_pties { val.validate()? }
103842		if let Some(ref val) = self.agt_lndr { val.validate()? }
103843		Ok(())
103844	}
103845}
103846
103847
103848// TransactionCriteria11 ...
103849#[cfg_attr(feature = "derive_debug", derive(Debug))]
103850#[cfg_attr(feature = "derive_default", derive(Default))]
103851#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103852#[cfg_attr(feature = "derive_clone", derive(Clone))]
103853#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103854pub struct TransactionCriteria11 {
103855	#[cfg_attr( feature = "derive_serde", serde(rename = "NewQryNm", skip_serializing_if = "Option::is_none") )]
103856	pub new_qry_nm: Option<String>,
103857	#[cfg_attr( feature = "derive_serde", serde(rename = "SchCrit", skip_serializing_if = "Option::is_none") )]
103858	pub sch_crit: Option<Vec<TransactionSearchCriteria11>>,
103859	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtRpt", skip_serializing_if = "Option::is_none") )]
103860	pub stmt_rpt: Option<ReportIndicator1Code>,
103861	#[cfg_attr( feature = "derive_serde", serde(rename = "RtrCrit", skip_serializing_if = "Option::is_none") )]
103862	pub rtr_crit: Option<TransactionReturnCriteria5>,
103863}
103864
103865impl TransactionCriteria11 {
103866	pub fn validate(&self) -> Result<(), ValidationError> {
103867		if let Some(ref val) = self.new_qry_nm {
103868			if val.chars().count() < 1 {
103869				return Err(ValidationError::new(1001, "new_qry_nm is shorter than the minimum length of 1".to_string()));
103870			}
103871			if val.chars().count() > 35 {
103872				return Err(ValidationError::new(1002, "new_qry_nm exceeds the maximum length of 35".to_string()));
103873			}
103874		}
103875		if let Some(ref vec) = self.sch_crit { for item in vec { item.validate()? } }
103876		if let Some(ref val) = self.stmt_rpt { val.validate()? }
103877		if let Some(ref val) = self.rtr_crit { val.validate()? }
103878		Ok(())
103879	}
103880}
103881
103882
103883// TransactionCriteria8Choice ...
103884#[cfg_attr(feature = "derive_debug", derive(Debug))]
103885#[cfg_attr(feature = "derive_default", derive(Default))]
103886#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103887#[cfg_attr(feature = "derive_clone", derive(Clone))]
103888#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103889pub struct TransactionCriteria8Choice {
103890	#[cfg_attr( feature = "derive_serde", serde(rename = "QryNm", skip_serializing_if = "Option::is_none") )]
103891	pub qry_nm: Option<String>,
103892	#[cfg_attr( feature = "derive_serde", serde(rename = "NewCrit", skip_serializing_if = "Option::is_none") )]
103893	pub new_crit: Option<TransactionCriteria11>,
103894}
103895
103896impl TransactionCriteria8Choice {
103897	pub fn validate(&self) -> Result<(), ValidationError> {
103898		if let Some(ref val) = self.qry_nm {
103899			if val.chars().count() < 1 {
103900				return Err(ValidationError::new(1001, "qry_nm is shorter than the minimum length of 1".to_string()));
103901			}
103902			if val.chars().count() > 35 {
103903				return Err(ValidationError::new(1002, "qry_nm exceeds the maximum length of 35".to_string()));
103904			}
103905		}
103906		if let Some(ref val) = self.new_crit { val.validate()? }
103907		Ok(())
103908	}
103909}
103910
103911
103912// TransactionData3 ...
103913#[cfg_attr(feature = "derive_debug", derive(Debug))]
103914#[cfg_attr(feature = "derive_default", derive(Default))]
103915#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103916#[cfg_attr(feature = "derive_clone", derive(Clone))]
103917#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103918pub struct TransactionData3 {
103919	#[cfg_attr( feature = "derive_serde", serde(rename = "TxPric", skip_serializing_if = "Option::is_none") )]
103920	pub tx_pric: Option<SecuritiesTransactionPrice4Choice>,
103921	#[cfg_attr( feature = "derive_serde", serde(rename = "TraddQty", skip_serializing_if = "Option::is_none") )]
103922	pub tradd_qty: Option<FinancialInstrumentQuantity25Choice>,
103923	#[cfg_attr( feature = "derive_serde", serde(rename = "PssvOrAggrssvInd", skip_serializing_if = "Option::is_none") )]
103924	pub pssv_or_aggrssv_ind: Option<PassiveOrAgressiveType1Code>,
103925	#[cfg_attr( feature = "derive_serde", serde(rename = "StrtgyLkdOrdrId", skip_serializing_if = "Option::is_none") )]
103926	pub strtgy_lkd_ordr_id: Option<String>,
103927	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
103928	pub tx_id: Option<String>,
103929}
103930
103931impl TransactionData3 {
103932	pub fn validate(&self) -> Result<(), ValidationError> {
103933		if let Some(ref val) = self.tx_pric { val.validate()? }
103934		if let Some(ref val) = self.tradd_qty { val.validate()? }
103935		if let Some(ref val) = self.pssv_or_aggrssv_ind { val.validate()? }
103936		if let Some(ref val) = self.strtgy_lkd_ordr_id {
103937			if val.chars().count() < 1 {
103938				return Err(ValidationError::new(1001, "strtgy_lkd_ordr_id is shorter than the minimum length of 1".to_string()));
103939			}
103940			if val.chars().count() > 50 {
103941				return Err(ValidationError::new(1002, "strtgy_lkd_ordr_id exceeds the maximum length of 50".to_string()));
103942			}
103943		}
103944		if let Some(ref val) = self.tx_id {
103945			if val.chars().count() < 1 {
103946				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
103947			}
103948			if val.chars().count() > 52 {
103949				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 52".to_string()));
103950			}
103951		}
103952		Ok(())
103953	}
103954}
103955
103956
103957// TransactionDates3 ...
103958#[cfg_attr(feature = "derive_debug", derive(Debug))]
103959#[cfg_attr(feature = "derive_default", derive(Default))]
103960#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103961#[cfg_attr(feature = "derive_clone", derive(Clone))]
103962#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103963pub struct TransactionDates3 {
103964	#[cfg_attr( feature = "derive_serde", serde(rename = "AccptncDtTm", skip_serializing_if = "Option::is_none") )]
103965	pub accptnc_dt_tm: Option<String>,
103966	#[cfg_attr( feature = "derive_serde", serde(rename = "TradActvtyCtrctlSttlmDt", skip_serializing_if = "Option::is_none") )]
103967	pub trad_actvty_ctrctl_sttlm_dt: Option<String>,
103968	#[cfg_attr( feature = "derive_serde", serde(rename = "TradDt", skip_serializing_if = "Option::is_none") )]
103969	pub trad_dt: Option<String>,
103970	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
103971	pub intr_bk_sttlm_dt: Option<String>,
103972	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
103973	pub start_dt: Option<String>,
103974	#[cfg_attr( feature = "derive_serde", serde(rename = "EndDt", skip_serializing_if = "Option::is_none") )]
103975	pub end_dt: Option<String>,
103976	#[cfg_attr( feature = "derive_serde", serde(rename = "TxDtTm", skip_serializing_if = "Option::is_none") )]
103977	pub tx_dt_tm: Option<String>,
103978	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
103979	pub prtry: Option<Vec<ProprietaryDate3>>,
103980}
103981
103982impl TransactionDates3 {
103983	pub fn validate(&self) -> Result<(), ValidationError> {
103984		if let Some(ref vec) = self.prtry { for item in vec { item.validate()? } }
103985		Ok(())
103986	}
103987}
103988
103989
103990// TransactionEnvironment1Code ...
103991#[cfg_attr(feature = "derive_debug", derive(Debug))]
103992#[cfg_attr(feature = "derive_default", derive(Default))]
103993#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
103994#[cfg_attr(feature = "derive_clone", derive(Clone))]
103995#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
103996pub enum TransactionEnvironment1Code {
103997	#[cfg_attr(feature = "derive_default", default)]
103998	#[cfg_attr( feature = "derive_serde", serde(rename = "MERC") )]
103999	CodeMERC,
104000	#[cfg_attr( feature = "derive_serde", serde(rename = "PRIV") )]
104001	CodePRIV,
104002	#[cfg_attr( feature = "derive_serde", serde(rename = "PUBL") )]
104003	CodePUBL,
104004}
104005
104006impl TransactionEnvironment1Code {
104007	pub fn validate(&self) -> Result<(), ValidationError> {
104008		Ok(())
104009	}
104010}
104011
104012
104013// TransactionIdentification3Choice ...
104014#[cfg_attr(feature = "derive_debug", derive(Debug))]
104015#[cfg_attr(feature = "derive_default", derive(Default))]
104016#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104017#[cfg_attr(feature = "derive_clone", derive(Clone))]
104018#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104019pub struct TransactionIdentification3Choice {
104020	#[cfg_attr( feature = "derive_serde", serde(rename = "Tx", skip_serializing_if = "Option::is_none") )]
104021	pub tx: Option<TradeTransactionIdentification20>,
104022	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnRptg", skip_serializing_if = "Option::is_none") )]
104023	pub mrgn_rptg: Option<TradeTransactionIdentification16>,
104024	#[cfg_attr( feature = "derive_serde", serde(rename = "CollReuse", skip_serializing_if = "Option::is_none") )]
104025	pub coll_reuse: Option<TradeTransactionIdentification17>,
104026}
104027
104028impl TransactionIdentification3Choice {
104029	pub fn validate(&self) -> Result<(), ValidationError> {
104030		if let Some(ref val) = self.tx { val.validate()? }
104031		if let Some(ref val) = self.mrgn_rptg { val.validate()? }
104032		if let Some(ref val) = self.coll_reuse { val.validate()? }
104033		Ok(())
104034	}
104035}
104036
104037
104038// TransactionIdentifications24 ...
104039#[cfg_attr(feature = "derive_debug", derive(Debug))]
104040#[cfg_attr(feature = "derive_default", derive(Default))]
104041#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104042#[cfg_attr(feature = "derive_clone", derive(Clone))]
104043#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104044pub struct TransactionIdentifications24 {
104045	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnrTxId") )]
104046	pub acct_ownr_tx_id: String,
104047	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrTxId", skip_serializing_if = "Option::is_none") )]
104048	pub acct_svcr_tx_id: Option<String>,
104049	#[cfg_attr( feature = "derive_serde", serde(rename = "MktInfrstrctrTxId", skip_serializing_if = "Option::is_none") )]
104050	pub mkt_infrstrctr_tx_id: Option<String>,
104051	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcrTxId", skip_serializing_if = "Option::is_none") )]
104052	pub prcr_tx_id: Option<String>,
104053}
104054
104055impl TransactionIdentifications24 {
104056	pub fn validate(&self) -> Result<(), ValidationError> {
104057		if self.acct_ownr_tx_id.chars().count() < 1 {
104058			return Err(ValidationError::new(1001, "acct_ownr_tx_id is shorter than the minimum length of 1".to_string()));
104059		}
104060		if self.acct_ownr_tx_id.chars().count() > 35 {
104061			return Err(ValidationError::new(1002, "acct_ownr_tx_id exceeds the maximum length of 35".to_string()));
104062		}
104063		if let Some(ref val) = self.acct_svcr_tx_id {
104064			if val.chars().count() < 1 {
104065				return Err(ValidationError::new(1001, "acct_svcr_tx_id is shorter than the minimum length of 1".to_string()));
104066			}
104067			if val.chars().count() > 35 {
104068				return Err(ValidationError::new(1002, "acct_svcr_tx_id exceeds the maximum length of 35".to_string()));
104069			}
104070		}
104071		if let Some(ref val) = self.mkt_infrstrctr_tx_id {
104072			if val.chars().count() < 1 {
104073				return Err(ValidationError::new(1001, "mkt_infrstrctr_tx_id is shorter than the minimum length of 1".to_string()));
104074			}
104075			if val.chars().count() > 35 {
104076				return Err(ValidationError::new(1002, "mkt_infrstrctr_tx_id exceeds the maximum length of 35".to_string()));
104077			}
104078		}
104079		if let Some(ref val) = self.prcr_tx_id {
104080			if val.chars().count() < 1 {
104081				return Err(ValidationError::new(1001, "prcr_tx_id is shorter than the minimum length of 1".to_string()));
104082			}
104083			if val.chars().count() > 35 {
104084				return Err(ValidationError::new(1002, "prcr_tx_id exceeds the maximum length of 35".to_string()));
104085			}
104086		}
104087		Ok(())
104088	}
104089}
104090
104091
104092// TransactionIdentifier1 ...
104093#[cfg_attr(feature = "derive_debug", derive(Debug))]
104094#[cfg_attr(feature = "derive_default", derive(Default))]
104095#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104096#[cfg_attr(feature = "derive_clone", derive(Clone))]
104097#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104098pub struct TransactionIdentifier1 {
104099	#[cfg_attr( feature = "derive_serde", serde(rename = "TxDtTm") )]
104100	pub tx_dt_tm: String,
104101	#[cfg_attr( feature = "derive_serde", serde(rename = "TxRef") )]
104102	pub tx_ref: String,
104103}
104104
104105impl TransactionIdentifier1 {
104106	pub fn validate(&self) -> Result<(), ValidationError> {
104107		if self.tx_ref.chars().count() < 1 {
104108			return Err(ValidationError::new(1001, "tx_ref is shorter than the minimum length of 1".to_string()));
104109		}
104110		if self.tx_ref.chars().count() > 35 {
104111			return Err(ValidationError::new(1002, "tx_ref exceeds the maximum length of 35".to_string()));
104112		}
104113		Ok(())
104114	}
104115}
104116
104117
104118// TransactionIndividualStatus1Code ...
104119#[cfg_attr(feature = "derive_debug", derive(Debug))]
104120#[cfg_attr(feature = "derive_default", derive(Default))]
104121#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104122#[cfg_attr(feature = "derive_clone", derive(Clone))]
104123#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104124pub enum TransactionIndividualStatus1Code {
104125	#[cfg_attr(feature = "derive_default", default)]
104126	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTC") )]
104127	CodeACTC,
104128	#[cfg_attr( feature = "derive_serde", serde(rename = "RJCT") )]
104129	CodeRJCT,
104130	#[cfg_attr( feature = "derive_serde", serde(rename = "PDNG") )]
104131	CodePDNG,
104132	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCP") )]
104133	CodeACCP,
104134	#[cfg_attr( feature = "derive_serde", serde(rename = "ACSP") )]
104135	CodeACSP,
104136	#[cfg_attr( feature = "derive_serde", serde(rename = "ACSC") )]
104137	CodeACSC,
104138	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCR") )]
104139	CodeACCR,
104140	#[cfg_attr( feature = "derive_serde", serde(rename = "ACWC") )]
104141	CodeACWC,
104142}
104143
104144impl TransactionIndividualStatus1Code {
104145	pub fn validate(&self) -> Result<(), ValidationError> {
104146		Ok(())
104147	}
104148}
104149
104150
104151// TransactionInterest4 ...
104152#[cfg_attr(feature = "derive_debug", derive(Debug))]
104153#[cfg_attr(feature = "derive_default", derive(Default))]
104154#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104155#[cfg_attr(feature = "derive_clone", derive(Clone))]
104156#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104157pub struct TransactionInterest4 {
104158	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlIntrstAndTaxAmt", skip_serializing_if = "Option::is_none") )]
104159	pub ttl_intrst_and_tax_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
104160	#[cfg_attr( feature = "derive_serde", serde(rename = "Rcrd", skip_serializing_if = "Option::is_none") )]
104161	pub rcrd: Option<Vec<InterestRecord2>>,
104162}
104163
104164impl TransactionInterest4 {
104165	pub fn validate(&self) -> Result<(), ValidationError> {
104166		if let Some(ref val) = self.ttl_intrst_and_tax_amt { val.validate()? }
104167		if let Some(ref vec) = self.rcrd { for item in vec { item.validate()? } }
104168		Ok(())
104169	}
104170}
104171
104172
104173// TransactionLoanData26Choice ...
104174#[cfg_attr(feature = "derive_debug", derive(Debug))]
104175#[cfg_attr(feature = "derive_default", derive(Default))]
104176#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104177#[cfg_attr(feature = "derive_clone", derive(Clone))]
104178#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104179pub struct TransactionLoanData26Choice {
104180	#[cfg_attr( feature = "derive_serde", serde(rename = "RpTrad", skip_serializing_if = "Option::is_none") )]
104181	pub rp_trad: Option<LoanData120>,
104182	#[cfg_attr( feature = "derive_serde", serde(rename = "BuySellBck", skip_serializing_if = "Option::is_none") )]
104183	pub buy_sell_bck: Option<LoanData120>,
104184	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesLndg", skip_serializing_if = "Option::is_none") )]
104185	pub scties_lndg: Option<LoanData120>,
104186	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnLndg", skip_serializing_if = "Option::is_none") )]
104187	pub mrgn_lndg: Option<LoanData120>,
104188}
104189
104190impl TransactionLoanData26Choice {
104191	pub fn validate(&self) -> Result<(), ValidationError> {
104192		if let Some(ref val) = self.rp_trad { val.validate()? }
104193		if let Some(ref val) = self.buy_sell_bck { val.validate()? }
104194		if let Some(ref val) = self.scties_lndg { val.validate()? }
104195		if let Some(ref val) = self.mrgn_lndg { val.validate()? }
104196		Ok(())
104197	}
104198}
104199
104200
104201// TransactionLoanData30Choice ...
104202#[cfg_attr(feature = "derive_debug", derive(Debug))]
104203#[cfg_attr(feature = "derive_default", derive(Default))]
104204#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104205#[cfg_attr(feature = "derive_clone", derive(Clone))]
104206#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104207pub struct TransactionLoanData30Choice {
104208	#[cfg_attr( feature = "derive_serde", serde(rename = "RpTrad", skip_serializing_if = "Option::is_none") )]
104209	pub rp_trad: Option<LoanData135>,
104210	#[cfg_attr( feature = "derive_serde", serde(rename = "BuySellBck", skip_serializing_if = "Option::is_none") )]
104211	pub buy_sell_bck: Option<LoanData136>,
104212	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesLndg", skip_serializing_if = "Option::is_none") )]
104213	pub scties_lndg: Option<LoanData137>,
104214	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnLndg", skip_serializing_if = "Option::is_none") )]
104215	pub mrgn_lndg: Option<LoanData138>,
104216}
104217
104218impl TransactionLoanData30Choice {
104219	pub fn validate(&self) -> Result<(), ValidationError> {
104220		if let Some(ref val) = self.rp_trad { val.validate()? }
104221		if let Some(ref val) = self.buy_sell_bck { val.validate()? }
104222		if let Some(ref val) = self.scties_lndg { val.validate()? }
104223		if let Some(ref val) = self.mrgn_lndg { val.validate()? }
104224		Ok(())
104225	}
104226}
104227
104228
104229// TransactionLoanData31Choice ...
104230#[cfg_attr(feature = "derive_debug", derive(Debug))]
104231#[cfg_attr(feature = "derive_default", derive(Default))]
104232#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104233#[cfg_attr(feature = "derive_clone", derive(Clone))]
104234#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104235pub struct TransactionLoanData31Choice {
104236	#[cfg_attr( feature = "derive_serde", serde(rename = "RpTrad", skip_serializing_if = "Option::is_none") )]
104237	pub rp_trad: Option<LoanData139>,
104238	#[cfg_attr( feature = "derive_serde", serde(rename = "BuySellBck", skip_serializing_if = "Option::is_none") )]
104239	pub buy_sell_bck: Option<LoanData140>,
104240	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesLndg", skip_serializing_if = "Option::is_none") )]
104241	pub scties_lndg: Option<LoanData141>,
104242	#[cfg_attr( feature = "derive_serde", serde(rename = "MrgnLndg", skip_serializing_if = "Option::is_none") )]
104243	pub mrgn_lndg: Option<LoanData142>,
104244}
104245
104246impl TransactionLoanData31Choice {
104247	pub fn validate(&self) -> Result<(), ValidationError> {
104248		if let Some(ref val) = self.rp_trad { val.validate()? }
104249		if let Some(ref val) = self.buy_sell_bck { val.validate()? }
104250		if let Some(ref val) = self.scties_lndg { val.validate()? }
104251		if let Some(ref val) = self.mrgn_lndg { val.validate()? }
104252		Ok(())
104253	}
104254}
104255
104256
104257// TransactionLoanData32Choice ...
104258#[cfg_attr(feature = "derive_debug", derive(Debug))]
104259#[cfg_attr(feature = "derive_default", derive(Default))]
104260#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104261#[cfg_attr(feature = "derive_clone", derive(Clone))]
104262#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104263pub struct TransactionLoanData32Choice {
104264	#[cfg_attr( feature = "derive_serde", serde(rename = "RpTrad", skip_serializing_if = "Option::is_none") )]
104265	pub rp_trad: Option<LoanData143>,
104266	#[cfg_attr( feature = "derive_serde", serde(rename = "BuySellBck", skip_serializing_if = "Option::is_none") )]
104267	pub buy_sell_bck: Option<LoanData144>,
104268	#[cfg_attr( feature = "derive_serde", serde(rename = "SctiesLndg", skip_serializing_if = "Option::is_none") )]
104269	pub scties_lndg: Option<LoanData145>,
104270}
104271
104272impl TransactionLoanData32Choice {
104273	pub fn validate(&self) -> Result<(), ValidationError> {
104274		if let Some(ref val) = self.rp_trad { val.validate()? }
104275		if let Some(ref val) = self.buy_sell_bck { val.validate()? }
104276		if let Some(ref val) = self.scties_lndg { val.validate()? }
104277		Ok(())
104278	}
104279}
104280
104281
104282// TransactionMatchingCriteria7 ...
104283#[cfg_attr(feature = "derive_debug", derive(Debug))]
104284#[cfg_attr(feature = "derive_default", derive(Default))]
104285#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104286#[cfg_attr(feature = "derive_clone", derive(Clone))]
104287#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104288pub struct TransactionMatchingCriteria7 {
104289	#[cfg_attr( feature = "derive_serde", serde(rename = "RptTrckgNb", skip_serializing_if = "Option::is_none") )]
104290	pub rpt_trckg_nb: Option<CompareText2>,
104291	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTxIdr", skip_serializing_if = "Option::is_none") )]
104292	pub unq_tx_idr: Option<CompareUniqueTransactionIdentifier2>,
104293	#[cfg_attr( feature = "derive_serde", serde(rename = "PrrUnqTxIdr", skip_serializing_if = "Option::is_none") )]
104294	pub prr_unq_tx_idr: Option<CompareUniqueTransactionIdentifier2>,
104295	#[cfg_attr( feature = "derive_serde", serde(rename = "SbsqntPosUnqTxIdr", skip_serializing_if = "Option::is_none") )]
104296	pub sbsqnt_pos_unq_tx_idr: Option<CompareUniqueTransactionIdentifier2>,
104297	#[cfg_attr( feature = "derive_serde", serde(rename = "Dlta", skip_serializing_if = "Option::is_none") )]
104298	pub dlta: Option<CompareLongFraction19DecimalNumber1>,
104299	#[cfg_attr( feature = "derive_serde", serde(rename = "TradConf", skip_serializing_if = "Option::is_none") )]
104300	pub trad_conf: Option<CompareTradeConfirmation2>,
104301	#[cfg_attr( feature = "derive_serde", serde(rename = "TradClrOblgtn", skip_serializing_if = "Option::is_none") )]
104302	pub trad_clr_oblgtn: Option<CompareTradeClearingObligation1>,
104303	#[cfg_attr( feature = "derive_serde", serde(rename = "TradClrSts", skip_serializing_if = "Option::is_none") )]
104304	pub trad_clr_sts: Option<CompareTradeClearingStatus3>,
104305	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmtTp", skip_serializing_if = "Option::is_none") )]
104306	pub mstr_agrmt_tp: Option<CompareMasterAgreementType1>,
104307	#[cfg_attr( feature = "derive_serde", serde(rename = "MstrAgrmtVrsn", skip_serializing_if = "Option::is_none") )]
104308	pub mstr_agrmt_vrsn: Option<CompareMax50Text1>,
104309	#[cfg_attr( feature = "derive_serde", serde(rename = "IntraGrp", skip_serializing_if = "Option::is_none") )]
104310	pub intra_grp: Option<CompareTrueFalseIndicator3>,
104311	#[cfg_attr( feature = "derive_serde", serde(rename = "PstTradRskRdctn", skip_serializing_if = "Option::is_none") )]
104312	pub pst_trad_rsk_rdctn: Option<ComparePostTradeRiskReduction2>,
104313	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivEvt", skip_serializing_if = "Option::is_none") )]
104314	pub deriv_evt: Option<CompareDerivativeEvent1>,
104315	#[cfg_attr( feature = "derive_serde", serde(rename = "PltfmIdr", skip_serializing_if = "Option::is_none") )]
104316	pub pltfm_idr: Option<CompareMICIdentifier3>,
104317	#[cfg_attr( feature = "derive_serde", serde(rename = "ExctnTmStmp", skip_serializing_if = "Option::is_none") )]
104318	pub exctn_tm_stmp: Option<CompareDateTime3>,
104319	#[cfg_attr( feature = "derive_serde", serde(rename = "FctvDt", skip_serializing_if = "Option::is_none") )]
104320	pub fctv_dt: Option<CompareDate3>,
104321	#[cfg_attr( feature = "derive_serde", serde(rename = "XprtnDt", skip_serializing_if = "Option::is_none") )]
104322	pub xprtn_dt: Option<CompareDate3>,
104323	#[cfg_attr( feature = "derive_serde", serde(rename = "EarlyTermntnDt", skip_serializing_if = "Option::is_none") )]
104324	pub early_termntn_dt: Option<CompareDate3>,
104325	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmDt", skip_serializing_if = "Option::is_none") )]
104326	pub sttlm_dt: Option<Vec<CompareDate3>>,
104327	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryTp", skip_serializing_if = "Option::is_none") )]
104328	pub dlvry_tp: Option<CompareDeliveryType1>,
104329	#[cfg_attr( feature = "derive_serde", serde(rename = "TxPric", skip_serializing_if = "Option::is_none") )]
104330	pub tx_pric: Option<CompareUnitPrice5>,
104331	#[cfg_attr( feature = "derive_serde", serde(rename = "PricSchdlUadjstdFctvDt", skip_serializing_if = "Option::is_none") )]
104332	pub pric_schdl_uadjstd_fctv_dt: Option<Vec<CompareDate3>>,
104333	#[cfg_attr( feature = "derive_serde", serde(rename = "PricSchdlUadjstdEndDt", skip_serializing_if = "Option::is_none") )]
104334	pub pric_schdl_uadjstd_end_dt: Option<Vec<CompareDate3>>,
104335	#[cfg_attr( feature = "derive_serde", serde(rename = "TxSchdlPric", skip_serializing_if = "Option::is_none") )]
104336	pub tx_schdl_pric: Option<Vec<CompareUnitPrice5>>,
104337	#[cfg_attr( feature = "derive_serde", serde(rename = "PackgPric", skip_serializing_if = "Option::is_none") )]
104338	pub packg_pric: Option<CompareUnitPrice5>,
104339	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlAmtFrstLeg", skip_serializing_if = "Option::is_none") )]
104340	pub ntnl_amt_frst_leg: Option<CompareAmountAndDirection3>,
104341	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlAmtFrstLegUadjstdFctvDt", skip_serializing_if = "Option::is_none") )]
104342	pub ntnl_amt_frst_leg_uadjstd_fctv_dt: Option<Vec<CompareDate3>>,
104343	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlAmtFrstLegUadjstdEndDt", skip_serializing_if = "Option::is_none") )]
104344	pub ntnl_amt_frst_leg_uadjstd_end_dt: Option<Vec<CompareDate3>>,
104345	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlAmtFrstLegSchdlAmt", skip_serializing_if = "Option::is_none") )]
104346	pub ntnl_amt_frst_leg_schdl_amt: Option<Vec<CompareAmountAndDirection3>>,
104347	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlQtyFrstLeg", skip_serializing_if = "Option::is_none") )]
104348	pub ntnl_qty_frst_leg: Option<CompareLongFraction19DecimalNumber1>,
104349	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlQtyFrstLegUadjstdFctvDt", skip_serializing_if = "Option::is_none") )]
104350	pub ntnl_qty_frst_leg_uadjstd_fctv_dt: Option<Vec<CompareDate3>>,
104351	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlQtyFrstLegUadjstdEndDt", skip_serializing_if = "Option::is_none") )]
104352	pub ntnl_qty_frst_leg_uadjstd_end_dt: Option<Vec<CompareDate3>>,
104353	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlQtyFrstLegSchdlQty", skip_serializing_if = "Option::is_none") )]
104354	pub ntnl_qty_frst_leg_schdl_qty: Option<Vec<CompareLongFraction19DecimalNumber1>>,
104355	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlAmtScndLeg", skip_serializing_if = "Option::is_none") )]
104356	pub ntnl_amt_scnd_leg: Option<CompareAmountAndDirection3>,
104357	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlAmtScndLegUadjstdFctvDt", skip_serializing_if = "Option::is_none") )]
104358	pub ntnl_amt_scnd_leg_uadjstd_fctv_dt: Option<Vec<CompareDate3>>,
104359	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlAmtScndLegUadjstdEndDt", skip_serializing_if = "Option::is_none") )]
104360	pub ntnl_amt_scnd_leg_uadjstd_end_dt: Option<Vec<CompareDate3>>,
104361	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlAmtScndLegSchdlAmt", skip_serializing_if = "Option::is_none") )]
104362	pub ntnl_amt_scnd_leg_schdl_amt: Option<Vec<CompareAmountAndDirection3>>,
104363	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlQtyScndLeg", skip_serializing_if = "Option::is_none") )]
104364	pub ntnl_qty_scnd_leg: Option<CompareLongFraction19DecimalNumber1>,
104365	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlQtyScndLegUadjstdFctvDt", skip_serializing_if = "Option::is_none") )]
104366	pub ntnl_qty_scnd_leg_uadjstd_fctv_dt: Option<Vec<CompareDate3>>,
104367	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlQtyScndLegUadjstdEndDt", skip_serializing_if = "Option::is_none") )]
104368	pub ntnl_qty_scnd_leg_uadjstd_end_dt: Option<Vec<CompareDate3>>,
104369	#[cfg_attr( feature = "derive_serde", serde(rename = "NtnlQtyScndLegSchdlQty", skip_serializing_if = "Option::is_none") )]
104370	pub ntnl_qty_scnd_leg_schdl_qty: Option<Vec<CompareLongFraction19DecimalNumber1>>,
104371	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrPmt", skip_serializing_if = "Option::is_none") )]
104372	pub othr_pmt: Option<Vec<CompareOtherPayment1>>,
104373	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFxdRateFrstLeg", skip_serializing_if = "Option::is_none") )]
104374	pub intrst_fxd_rate_frst_leg: Option<CompareUnitPrice7>,
104375	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFxdRateFrstLegDayCnt", skip_serializing_if = "Option::is_none") )]
104376	pub intrst_fxd_rate_frst_leg_day_cnt: Option<CompareDayCount1>,
104377	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFxdRateFrstLegPmtFrqcyUnit", skip_serializing_if = "Option::is_none") )]
104378	pub intrst_fxd_rate_frst_leg_pmt_frqcy_unit: Option<CompareFrequencyUnit1>,
104379	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFxdRateFrstLegPmtFrqcyVal", skip_serializing_if = "Option::is_none") )]
104380	pub intrst_fxd_rate_frst_leg_pmt_frqcy_val: Option<CompareNumber5>,
104381	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateFrstLegId", skip_serializing_if = "Option::is_none") )]
104382	pub intrst_fltg_rate_frst_leg_id: Option<CompareISINIdentifier4>,
104383	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateFrstLegCd", skip_serializing_if = "Option::is_none") )]
104384	pub intrst_fltg_rate_frst_leg_cd: Option<CompareBenchmarkCode1>,
104385	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateFrstLegNm", skip_serializing_if = "Option::is_none") )]
104386	pub intrst_fltg_rate_frst_leg_nm: Option<CompareMax350Text1>,
104387	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateFrstLegDayCnt", skip_serializing_if = "Option::is_none") )]
104388	pub intrst_fltg_rate_frst_leg_day_cnt: Option<CompareDayCount1>,
104389	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateFrstLegPmtFrqcyUnit", skip_serializing_if = "Option::is_none") )]
104390	pub intrst_fltg_rate_frst_leg_pmt_frqcy_unit: Option<CompareFrequencyUnit1>,
104391	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateFrstLegPmtFrqcyVal", skip_serializing_if = "Option::is_none") )]
104392	pub intrst_fltg_rate_frst_leg_pmt_frqcy_val: Option<CompareNumber5>,
104393	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateFrstLegRefPrdUnit", skip_serializing_if = "Option::is_none") )]
104394	pub intrst_fltg_rate_frst_leg_ref_prd_unit: Option<CompareFrequencyUnit1>,
104395	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateFrstLegRefPrdVal", skip_serializing_if = "Option::is_none") )]
104396	pub intrst_fltg_rate_frst_leg_ref_prd_val: Option<CompareNumber5>,
104397	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateFrstLegRstFrqcyUnit", skip_serializing_if = "Option::is_none") )]
104398	pub intrst_fltg_rate_frst_leg_rst_frqcy_unit: Option<CompareFrequencyUnit1>,
104399	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateFrstLegRstFrqcyVal", skip_serializing_if = "Option::is_none") )]
104400	pub intrst_fltg_rate_frst_leg_rst_frqcy_val: Option<CompareNumber5>,
104401	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateFrstLegSprd", skip_serializing_if = "Option::is_none") )]
104402	pub intrst_fltg_rate_frst_leg_sprd: Option<CompareUnitPrice8>,
104403	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstRateFxdScndLeg", skip_serializing_if = "Option::is_none") )]
104404	pub intrst_rate_fxd_scnd_leg: Option<CompareUnitPrice7>,
104405	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFxdRateScndLegDayCnt", skip_serializing_if = "Option::is_none") )]
104406	pub intrst_fxd_rate_scnd_leg_day_cnt: Option<CompareDayCount1>,
104407	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFxdRateScndLegPmtFrqcyUnit", skip_serializing_if = "Option::is_none") )]
104408	pub intrst_fxd_rate_scnd_leg_pmt_frqcy_unit: Option<CompareFrequencyUnit1>,
104409	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFxdRateScndLegPmtFrqcyVal", skip_serializing_if = "Option::is_none") )]
104410	pub intrst_fxd_rate_scnd_leg_pmt_frqcy_val: Option<CompareNumber5>,
104411	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateScndLegId", skip_serializing_if = "Option::is_none") )]
104412	pub intrst_fltg_rate_scnd_leg_id: Option<CompareISINIdentifier4>,
104413	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateScndLegCd", skip_serializing_if = "Option::is_none") )]
104414	pub intrst_fltg_rate_scnd_leg_cd: Option<CompareBenchmarkCode1>,
104415	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateScndLegNm", skip_serializing_if = "Option::is_none") )]
104416	pub intrst_fltg_rate_scnd_leg_nm: Option<CompareMax350Text1>,
104417	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateScndLegDayCnt", skip_serializing_if = "Option::is_none") )]
104418	pub intrst_fltg_rate_scnd_leg_day_cnt: Option<CompareDayCount1>,
104419	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateScndLegPmtFrqcyUnit", skip_serializing_if = "Option::is_none") )]
104420	pub intrst_fltg_rate_scnd_leg_pmt_frqcy_unit: Option<CompareFrequencyUnit1>,
104421	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateScndLegPmtFrqcyVal", skip_serializing_if = "Option::is_none") )]
104422	pub intrst_fltg_rate_scnd_leg_pmt_frqcy_val: Option<CompareNumber5>,
104423	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateScndLegRefPrdUnit", skip_serializing_if = "Option::is_none") )]
104424	pub intrst_fltg_rate_scnd_leg_ref_prd_unit: Option<CompareFrequencyUnit1>,
104425	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateScndLegRefPrdVal", skip_serializing_if = "Option::is_none") )]
104426	pub intrst_fltg_rate_scnd_leg_ref_prd_val: Option<CompareNumber5>,
104427	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateScndLegRstFrqcyUnit", skip_serializing_if = "Option::is_none") )]
104428	pub intrst_fltg_rate_scnd_leg_rst_frqcy_unit: Option<CompareFrequencyUnit1>,
104429	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateScndLegRstFrqcyVal", skip_serializing_if = "Option::is_none") )]
104430	pub intrst_fltg_rate_scnd_leg_rst_frqcy_val: Option<CompareNumber5>,
104431	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrstFltgRateScndLegSprd", skip_serializing_if = "Option::is_none") )]
104432	pub intrst_fltg_rate_scnd_leg_sprd: Option<CompareUnitPrice8>,
104433	#[cfg_attr( feature = "derive_serde", serde(rename = "PackgSprd", skip_serializing_if = "Option::is_none") )]
104434	pub packg_sprd: Option<CompareUnitPrice8>,
104435	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyXchgRate", skip_serializing_if = "Option::is_none") )]
104436	pub ccy_xchg_rate: Option<CompareExchangeRate1>,
104437	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyFwdXchgRate", skip_serializing_if = "Option::is_none") )]
104438	pub ccy_fwd_xchg_rate: Option<CompareExchangeRate1>,
104439	#[cfg_attr( feature = "derive_serde", serde(rename = "CcyXchgRateBsis", skip_serializing_if = "Option::is_none") )]
104440	pub ccy_xchg_rate_bsis: Option<CompareExchangeRateBasis1>,
104441	#[cfg_attr( feature = "derive_serde", serde(rename = "Cmmdty", skip_serializing_if = "Option::is_none") )]
104442	pub cmmdty: Option<CompareCommodityAssetClass4>,
104443	#[cfg_attr( feature = "derive_serde", serde(rename = "NrgyDlvryPtOrZone", skip_serializing_if = "Option::is_none") )]
104444	pub nrgy_dlvry_pt_or_zone: Option<Vec<CompareDeliveryInterconnectionPoint1>>,
104445	#[cfg_attr( feature = "derive_serde", serde(rename = "NrgyIntrCnnctnPt", skip_serializing_if = "Option::is_none") )]
104446	pub nrgy_intr_cnnctn_pt: Option<CompareDeliveryInterconnectionPoint1>,
104447	#[cfg_attr( feature = "derive_serde", serde(rename = "NrgyLdTp", skip_serializing_if = "Option::is_none") )]
104448	pub nrgy_ld_tp: Option<CompareEnergyLoadType1>,
104449	#[cfg_attr( feature = "derive_serde", serde(rename = "DlvryAttr", skip_serializing_if = "Option::is_none") )]
104450	pub dlvry_attr: Option<Vec<CompareEnergyDeliveryAttribute1>>,
104451	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnTp", skip_serializing_if = "Option::is_none") )]
104452	pub optn_tp: Option<CompareOptionType1>,
104453	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnExrcStyle", skip_serializing_if = "Option::is_none") )]
104454	pub optn_exrc_style: Option<Vec<CompareOptionStyle1>>,
104455	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnStrkPric", skip_serializing_if = "Option::is_none") )]
104456	pub optn_strk_pric: Option<CompareUnitPrice4>,
104457	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnStrkPricSchdlUadjstdFctvDt", skip_serializing_if = "Option::is_none") )]
104458	pub optn_strk_pric_schdl_uadjstd_fctv_dt: Option<Vec<CompareDate3>>,
104459	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnStrkPricSchdlUadjstdEndDt", skip_serializing_if = "Option::is_none") )]
104460	pub optn_strk_pric_schdl_uadjstd_end_dt: Option<Vec<CompareDate3>>,
104461	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnStrkPricSchdlAmt", skip_serializing_if = "Option::is_none") )]
104462	pub optn_strk_pric_schdl_amt: Option<Vec<CompareUnitPrice4>>,
104463	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnPrmAmt", skip_serializing_if = "Option::is_none") )]
104464	pub optn_prm_amt: Option<CompareActiveOrHistoricCurrencyAndAmount4>,
104465	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnPrmPmtDt", skip_serializing_if = "Option::is_none") )]
104466	pub optn_prm_pmt_dt: Option<CompareDate3>,
104467	#[cfg_attr( feature = "derive_serde", serde(rename = "OptnMtrtyDtOfUndrlyg", skip_serializing_if = "Option::is_none") )]
104468	pub optn_mtrty_dt_of_undrlyg: Option<CompareDate3>,
104469	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtSnrty", skip_serializing_if = "Option::is_none") )]
104470	pub cdt_snrty: Option<CompareSeniorityType1>,
104471	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtRefPty", skip_serializing_if = "Option::is_none") )]
104472	pub cdt_ref_pty: Option<CompareReferenceParty1>,
104473	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtSrs", skip_serializing_if = "Option::is_none") )]
104474	pub cdt_srs: Option<CompareNumber7>,
104475	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtVrsn", skip_serializing_if = "Option::is_none") )]
104476	pub cdt_vrsn: Option<CompareNumber7>,
104477	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtIndxFctr", skip_serializing_if = "Option::is_none") )]
104478	pub cdt_indx_fctr: Option<ComparePercentageRate3>,
104479	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtTrch", skip_serializing_if = "Option::is_none") )]
104480	pub cdt_trch: Option<CompareTrancheIndicator1>,
104481	#[cfg_attr( feature = "derive_serde", serde(rename = "Lvl", skip_serializing_if = "Option::is_none") )]
104482	pub lvl: Option<CompareReportingLevelType2>,
104483}
104484
104485impl TransactionMatchingCriteria7 {
104486	pub fn validate(&self) -> Result<(), ValidationError> {
104487		if let Some(ref val) = self.rpt_trckg_nb { val.validate()? }
104488		if let Some(ref val) = self.unq_tx_idr { val.validate()? }
104489		if let Some(ref val) = self.prr_unq_tx_idr { val.validate()? }
104490		if let Some(ref val) = self.sbsqnt_pos_unq_tx_idr { val.validate()? }
104491		if let Some(ref val) = self.dlta { val.validate()? }
104492		if let Some(ref val) = self.trad_conf { val.validate()? }
104493		if let Some(ref val) = self.trad_clr_oblgtn { val.validate()? }
104494		if let Some(ref val) = self.trad_clr_sts { val.validate()? }
104495		if let Some(ref val) = self.mstr_agrmt_tp { val.validate()? }
104496		if let Some(ref val) = self.mstr_agrmt_vrsn { val.validate()? }
104497		if let Some(ref val) = self.intra_grp { val.validate()? }
104498		if let Some(ref val) = self.pst_trad_rsk_rdctn { val.validate()? }
104499		if let Some(ref val) = self.deriv_evt { val.validate()? }
104500		if let Some(ref val) = self.pltfm_idr { val.validate()? }
104501		if let Some(ref val) = self.exctn_tm_stmp { val.validate()? }
104502		if let Some(ref val) = self.fctv_dt { val.validate()? }
104503		if let Some(ref val) = self.xprtn_dt { val.validate()? }
104504		if let Some(ref val) = self.early_termntn_dt { val.validate()? }
104505		if let Some(ref vec) = self.sttlm_dt { for item in vec { item.validate()? } }
104506		if let Some(ref val) = self.dlvry_tp { val.validate()? }
104507		if let Some(ref val) = self.tx_pric { val.validate()? }
104508		if let Some(ref vec) = self.pric_schdl_uadjstd_fctv_dt { for item in vec { item.validate()? } }
104509		if let Some(ref vec) = self.pric_schdl_uadjstd_end_dt { for item in vec { item.validate()? } }
104510		if let Some(ref vec) = self.tx_schdl_pric { for item in vec { item.validate()? } }
104511		if let Some(ref val) = self.packg_pric { val.validate()? }
104512		if let Some(ref val) = self.ntnl_amt_frst_leg { val.validate()? }
104513		if let Some(ref vec) = self.ntnl_amt_frst_leg_uadjstd_fctv_dt { for item in vec { item.validate()? } }
104514		if let Some(ref vec) = self.ntnl_amt_frst_leg_uadjstd_end_dt { for item in vec { item.validate()? } }
104515		if let Some(ref vec) = self.ntnl_amt_frst_leg_schdl_amt { for item in vec { item.validate()? } }
104516		if let Some(ref val) = self.ntnl_qty_frst_leg { val.validate()? }
104517		if let Some(ref vec) = self.ntnl_qty_frst_leg_uadjstd_fctv_dt { for item in vec { item.validate()? } }
104518		if let Some(ref vec) = self.ntnl_qty_frst_leg_uadjstd_end_dt { for item in vec { item.validate()? } }
104519		if let Some(ref vec) = self.ntnl_qty_frst_leg_schdl_qty { for item in vec { item.validate()? } }
104520		if let Some(ref val) = self.ntnl_amt_scnd_leg { val.validate()? }
104521		if let Some(ref vec) = self.ntnl_amt_scnd_leg_uadjstd_fctv_dt { for item in vec { item.validate()? } }
104522		if let Some(ref vec) = self.ntnl_amt_scnd_leg_uadjstd_end_dt { for item in vec { item.validate()? } }
104523		if let Some(ref vec) = self.ntnl_amt_scnd_leg_schdl_amt { for item in vec { item.validate()? } }
104524		if let Some(ref val) = self.ntnl_qty_scnd_leg { val.validate()? }
104525		if let Some(ref vec) = self.ntnl_qty_scnd_leg_uadjstd_fctv_dt { for item in vec { item.validate()? } }
104526		if let Some(ref vec) = self.ntnl_qty_scnd_leg_uadjstd_end_dt { for item in vec { item.validate()? } }
104527		if let Some(ref vec) = self.ntnl_qty_scnd_leg_schdl_qty { for item in vec { item.validate()? } }
104528		if let Some(ref vec) = self.othr_pmt { for item in vec { item.validate()? } }
104529		if let Some(ref val) = self.intrst_fxd_rate_frst_leg { val.validate()? }
104530		if let Some(ref val) = self.intrst_fxd_rate_frst_leg_day_cnt { val.validate()? }
104531		if let Some(ref val) = self.intrst_fxd_rate_frst_leg_pmt_frqcy_unit { val.validate()? }
104532		if let Some(ref val) = self.intrst_fxd_rate_frst_leg_pmt_frqcy_val { val.validate()? }
104533		if let Some(ref val) = self.intrst_fltg_rate_frst_leg_id { val.validate()? }
104534		if let Some(ref val) = self.intrst_fltg_rate_frst_leg_cd { val.validate()? }
104535		if let Some(ref val) = self.intrst_fltg_rate_frst_leg_nm { val.validate()? }
104536		if let Some(ref val) = self.intrst_fltg_rate_frst_leg_day_cnt { val.validate()? }
104537		if let Some(ref val) = self.intrst_fltg_rate_frst_leg_pmt_frqcy_unit { val.validate()? }
104538		if let Some(ref val) = self.intrst_fltg_rate_frst_leg_pmt_frqcy_val { val.validate()? }
104539		if let Some(ref val) = self.intrst_fltg_rate_frst_leg_ref_prd_unit { val.validate()? }
104540		if let Some(ref val) = self.intrst_fltg_rate_frst_leg_ref_prd_val { val.validate()? }
104541		if let Some(ref val) = self.intrst_fltg_rate_frst_leg_rst_frqcy_unit { val.validate()? }
104542		if let Some(ref val) = self.intrst_fltg_rate_frst_leg_rst_frqcy_val { val.validate()? }
104543		if let Some(ref val) = self.intrst_fltg_rate_frst_leg_sprd { val.validate()? }
104544		if let Some(ref val) = self.intrst_rate_fxd_scnd_leg { val.validate()? }
104545		if let Some(ref val) = self.intrst_fxd_rate_scnd_leg_day_cnt { val.validate()? }
104546		if let Some(ref val) = self.intrst_fxd_rate_scnd_leg_pmt_frqcy_unit { val.validate()? }
104547		if let Some(ref val) = self.intrst_fxd_rate_scnd_leg_pmt_frqcy_val { val.validate()? }
104548		if let Some(ref val) = self.intrst_fltg_rate_scnd_leg_id { val.validate()? }
104549		if let Some(ref val) = self.intrst_fltg_rate_scnd_leg_cd { val.validate()? }
104550		if let Some(ref val) = self.intrst_fltg_rate_scnd_leg_nm { val.validate()? }
104551		if let Some(ref val) = self.intrst_fltg_rate_scnd_leg_day_cnt { val.validate()? }
104552		if let Some(ref val) = self.intrst_fltg_rate_scnd_leg_pmt_frqcy_unit { val.validate()? }
104553		if let Some(ref val) = self.intrst_fltg_rate_scnd_leg_pmt_frqcy_val { val.validate()? }
104554		if let Some(ref val) = self.intrst_fltg_rate_scnd_leg_ref_prd_unit { val.validate()? }
104555		if let Some(ref val) = self.intrst_fltg_rate_scnd_leg_ref_prd_val { val.validate()? }
104556		if let Some(ref val) = self.intrst_fltg_rate_scnd_leg_rst_frqcy_unit { val.validate()? }
104557		if let Some(ref val) = self.intrst_fltg_rate_scnd_leg_rst_frqcy_val { val.validate()? }
104558		if let Some(ref val) = self.intrst_fltg_rate_scnd_leg_sprd { val.validate()? }
104559		if let Some(ref val) = self.packg_sprd { val.validate()? }
104560		if let Some(ref val) = self.ccy_xchg_rate { val.validate()? }
104561		if let Some(ref val) = self.ccy_fwd_xchg_rate { val.validate()? }
104562		if let Some(ref val) = self.ccy_xchg_rate_bsis { val.validate()? }
104563		if let Some(ref val) = self.cmmdty { val.validate()? }
104564		if let Some(ref vec) = self.nrgy_dlvry_pt_or_zone { for item in vec { item.validate()? } }
104565		if let Some(ref val) = self.nrgy_intr_cnnctn_pt { val.validate()? }
104566		if let Some(ref val) = self.nrgy_ld_tp { val.validate()? }
104567		if let Some(ref vec) = self.dlvry_attr { for item in vec { item.validate()? } }
104568		if let Some(ref val) = self.optn_tp { val.validate()? }
104569		if let Some(ref vec) = self.optn_exrc_style { for item in vec { item.validate()? } }
104570		if let Some(ref val) = self.optn_strk_pric { val.validate()? }
104571		if let Some(ref vec) = self.optn_strk_pric_schdl_uadjstd_fctv_dt { for item in vec { item.validate()? } }
104572		if let Some(ref vec) = self.optn_strk_pric_schdl_uadjstd_end_dt { for item in vec { item.validate()? } }
104573		if let Some(ref vec) = self.optn_strk_pric_schdl_amt { for item in vec { item.validate()? } }
104574		if let Some(ref val) = self.optn_prm_amt { val.validate()? }
104575		if let Some(ref val) = self.optn_prm_pmt_dt { val.validate()? }
104576		if let Some(ref val) = self.optn_mtrty_dt_of_undrlyg { val.validate()? }
104577		if let Some(ref val) = self.cdt_snrty { val.validate()? }
104578		if let Some(ref val) = self.cdt_ref_pty { val.validate()? }
104579		if let Some(ref val) = self.cdt_srs { val.validate()? }
104580		if let Some(ref val) = self.cdt_vrsn { val.validate()? }
104581		if let Some(ref val) = self.cdt_indx_fctr { val.validate()? }
104582		if let Some(ref val) = self.cdt_trch { val.validate()? }
104583		if let Some(ref val) = self.lvl { val.validate()? }
104584		Ok(())
104585	}
104586}
104587
104588
104589// TransactionModification7 ...
104590#[cfg_attr(feature = "derive_debug", derive(Debug))]
104591#[cfg_attr(feature = "derive_default", derive(Default))]
104592#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104593#[cfg_attr(feature = "derive_clone", derive(Clone))]
104594#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104595pub struct TransactionModification7 {
104596	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtId") )]
104597	pub pmt_id: PaymentIdentification8Choice,
104598	#[cfg_attr( feature = "derive_serde", serde(rename = "NewPmtValSet") )]
104599	pub new_pmt_val_set: PaymentInstruction33,
104600}
104601
104602impl TransactionModification7 {
104603	pub fn validate(&self) -> Result<(), ValidationError> {
104604		self.pmt_id.validate()?;
104605		self.new_pmt_val_set.validate()?;
104606		Ok(())
104607	}
104608}
104609
104610
104611// TransactionOperationType10Code ...
104612#[cfg_attr(feature = "derive_debug", derive(Debug))]
104613#[cfg_attr(feature = "derive_default", derive(Default))]
104614#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104615#[cfg_attr(feature = "derive_clone", derive(Clone))]
104616#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104617pub enum TransactionOperationType10Code {
104618	#[cfg_attr(feature = "derive_default", default)]
104619	#[cfg_attr( feature = "derive_serde", serde(rename = "COMP") )]
104620	CodeCOMP,
104621	#[cfg_attr( feature = "derive_serde", serde(rename = "CORR") )]
104622	CodeCORR,
104623	#[cfg_attr( feature = "derive_serde", serde(rename = "EROR") )]
104624	CodeEROR,
104625	#[cfg_attr( feature = "derive_serde", serde(rename = "MODI") )]
104626	CodeMODI,
104627	#[cfg_attr( feature = "derive_serde", serde(rename = "NEWT") )]
104628	CodeNEWT,
104629	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
104630	CodeOTHR,
104631	#[cfg_attr( feature = "derive_serde", serde(rename = "POSC") )]
104632	CodePOSC,
104633	#[cfg_attr( feature = "derive_serde", serde(rename = "REVI") )]
104634	CodeREVI,
104635	#[cfg_attr( feature = "derive_serde", serde(rename = "TERM") )]
104636	CodeTERM,
104637	#[cfg_attr( feature = "derive_serde", serde(rename = "VALU") )]
104638	CodeVALU,
104639	#[cfg_attr( feature = "derive_serde", serde(rename = "MARU") )]
104640	CodeMARU,
104641	#[cfg_attr( feature = "derive_serde", serde(rename = "PRTO") )]
104642	CodePRTO,
104643}
104644
104645impl TransactionOperationType10Code {
104646	pub fn validate(&self) -> Result<(), ValidationError> {
104647		Ok(())
104648	}
104649}
104650
104651
104652// TransactionOperationType11Code ...
104653#[cfg_attr(feature = "derive_debug", derive(Debug))]
104654#[cfg_attr(feature = "derive_default", derive(Default))]
104655#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104656#[cfg_attr(feature = "derive_clone", derive(Clone))]
104657#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104658pub enum TransactionOperationType11Code {
104659	#[cfg_attr(feature = "derive_default", default)]
104660	#[cfg_attr( feature = "derive_serde", serde(rename = "CORR") )]
104661	CodeCORR,
104662	#[cfg_attr( feature = "derive_serde", serde(rename = "MARU") )]
104663	CodeMARU,
104664	#[cfg_attr( feature = "derive_serde", serde(rename = "NEWT") )]
104665	CodeNEWT,
104666	#[cfg_attr( feature = "derive_serde", serde(rename = "EROR") )]
104667	CodeEROR,
104668}
104669
104670impl TransactionOperationType11Code {
104671	pub fn validate(&self) -> Result<(), ValidationError> {
104672		Ok(())
104673	}
104674}
104675
104676
104677// TransactionOperationType1Code ...
104678#[cfg_attr(feature = "derive_debug", derive(Debug))]
104679#[cfg_attr(feature = "derive_default", derive(Default))]
104680#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104681#[cfg_attr(feature = "derive_clone", derive(Clone))]
104682#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104683pub enum TransactionOperationType1Code {
104684	#[cfg_attr(feature = "derive_default", default)]
104685	#[cfg_attr( feature = "derive_serde", serde(rename = "AMND") )]
104686	CodeAMND,
104687	#[cfg_attr( feature = "derive_serde", serde(rename = "CANC") )]
104688	CodeCANC,
104689	#[cfg_attr( feature = "derive_serde", serde(rename = "CORR") )]
104690	CodeCORR,
104691	#[cfg_attr( feature = "derive_serde", serde(rename = "NEWT") )]
104692	CodeNEWT,
104693}
104694
104695impl TransactionOperationType1Code {
104696	pub fn validate(&self) -> Result<(), ValidationError> {
104697		Ok(())
104698	}
104699}
104700
104701
104702// TransactionOperationType4Code ...
104703#[cfg_attr(feature = "derive_debug", derive(Debug))]
104704#[cfg_attr(feature = "derive_default", derive(Default))]
104705#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104706#[cfg_attr(feature = "derive_clone", derive(Clone))]
104707#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104708pub enum TransactionOperationType4Code {
104709	#[cfg_attr(feature = "derive_default", default)]
104710	#[cfg_attr( feature = "derive_serde", serde(rename = "NEWT") )]
104711	CodeNEWT,
104712	#[cfg_attr( feature = "derive_serde", serde(rename = "AMND") )]
104713	CodeAMND,
104714	#[cfg_attr( feature = "derive_serde", serde(rename = "CANC") )]
104715	CodeCANC,
104716}
104717
104718impl TransactionOperationType4Code {
104719	pub fn validate(&self) -> Result<(), ValidationError> {
104720		Ok(())
104721	}
104722}
104723
104724
104725// TransactionOperationType6Code ...
104726#[cfg_attr(feature = "derive_debug", derive(Debug))]
104727#[cfg_attr(feature = "derive_default", derive(Default))]
104728#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104729#[cfg_attr(feature = "derive_clone", derive(Clone))]
104730#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104731pub enum TransactionOperationType6Code {
104732	#[cfg_attr(feature = "derive_default", default)]
104733	#[cfg_attr( feature = "derive_serde", serde(rename = "REUU") )]
104734	CodeREUU,
104735	#[cfg_attr( feature = "derive_serde", serde(rename = "COLU") )]
104736	CodeCOLU,
104737	#[cfg_attr( feature = "derive_serde", serde(rename = "CORR") )]
104738	CodeCORR,
104739	#[cfg_attr( feature = "derive_serde", serde(rename = "ETRM") )]
104740	CodeETRM,
104741	#[cfg_attr( feature = "derive_serde", serde(rename = "VALU") )]
104742	CodeVALU,
104743	#[cfg_attr( feature = "derive_serde", serde(rename = "POSC") )]
104744	CodePOSC,
104745	#[cfg_attr( feature = "derive_serde", serde(rename = "NEWT") )]
104746	CodeNEWT,
104747	#[cfg_attr( feature = "derive_serde", serde(rename = "MODI") )]
104748	CodeMODI,
104749	#[cfg_attr( feature = "derive_serde", serde(rename = "MARU") )]
104750	CodeMARU,
104751	#[cfg_attr( feature = "derive_serde", serde(rename = "EROR") )]
104752	CodeEROR,
104753}
104754
104755impl TransactionOperationType6Code {
104756	pub fn validate(&self) -> Result<(), ValidationError> {
104757		Ok(())
104758	}
104759}
104760
104761
104762// TransactionOperationType8Code ...
104763#[cfg_attr(feature = "derive_debug", derive(Debug))]
104764#[cfg_attr(feature = "derive_default", derive(Default))]
104765#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104766#[cfg_attr(feature = "derive_clone", derive(Clone))]
104767#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104768pub enum TransactionOperationType8Code {
104769	#[cfg_attr(feature = "derive_default", default)]
104770	#[cfg_attr( feature = "derive_serde", serde(rename = "COMP") )]
104771	CodeCOMP,
104772	#[cfg_attr( feature = "derive_serde", serde(rename = "CORR") )]
104773	CodeCORR,
104774	#[cfg_attr( feature = "derive_serde", serde(rename = "EROR") )]
104775	CodeEROR,
104776	#[cfg_attr( feature = "derive_serde", serde(rename = "MODI") )]
104777	CodeMODI,
104778	#[cfg_attr( feature = "derive_serde", serde(rename = "NEWT") )]
104779	CodeNEWT,
104780	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
104781	CodeOTHR,
104782	#[cfg_attr( feature = "derive_serde", serde(rename = "POSC") )]
104783	CodePOSC,
104784	#[cfg_attr( feature = "derive_serde", serde(rename = "REVI") )]
104785	CodeREVI,
104786	#[cfg_attr( feature = "derive_serde", serde(rename = "TERM") )]
104787	CodeTERM,
104788	#[cfg_attr( feature = "derive_serde", serde(rename = "VALU") )]
104789	CodeVALU,
104790	#[cfg_attr( feature = "derive_serde", serde(rename = "MARU") )]
104791	CodeMARU,
104792}
104793
104794impl TransactionOperationType8Code {
104795	pub fn validate(&self) -> Result<(), ValidationError> {
104796		Ok(())
104797	}
104798}
104799
104800
104801// TransactionOrError6Choice ...
104802#[cfg_attr(feature = "derive_debug", derive(Debug))]
104803#[cfg_attr(feature = "derive_default", derive(Default))]
104804#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104805#[cfg_attr(feature = "derive_clone", derive(Clone))]
104806#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104807pub struct TransactionOrError6Choice {
104808	#[cfg_attr( feature = "derive_serde", serde(rename = "Tx", skip_serializing_if = "Option::is_none") )]
104809	pub tx: Option<Transaction159>,
104810	#[cfg_attr( feature = "derive_serde", serde(rename = "BizErr", skip_serializing_if = "Option::is_none") )]
104811	pub biz_err: Option<Vec<ErrorHandling5>>,
104812}
104813
104814impl TransactionOrError6Choice {
104815	pub fn validate(&self) -> Result<(), ValidationError> {
104816		if let Some(ref val) = self.tx { val.validate()? }
104817		if let Some(ref vec) = self.biz_err { for item in vec { item.validate()? } }
104818		Ok(())
104819	}
104820}
104821
104822
104823// TransactionParties11 ...
104824#[cfg_attr(feature = "derive_debug", derive(Debug))]
104825#[cfg_attr(feature = "derive_default", derive(Default))]
104826#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104827#[cfg_attr(feature = "derive_clone", derive(Clone))]
104828#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104829pub struct TransactionParties11 {
104830	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
104831	pub ultmt_dbtr: Option<Party50Choice>,
104832	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr") )]
104833	pub dbtr: Party50Choice,
104834	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
104835	pub dbtr_acct: Option<CashAccount40>,
104836	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty", skip_serializing_if = "Option::is_none") )]
104837	pub initg_pty: Option<Party50Choice>,
104838	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgt", skip_serializing_if = "Option::is_none") )]
104839	pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
104840	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAgtAcct", skip_serializing_if = "Option::is_none") )]
104841	pub dbtr_agt_acct: Option<CashAccount40>,
104842	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt1", skip_serializing_if = "Option::is_none") )]
104843	pub prvs_instg_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
104844	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt1Acct", skip_serializing_if = "Option::is_none") )]
104845	pub prvs_instg_agt1_acct: Option<CashAccount40>,
104846	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt2", skip_serializing_if = "Option::is_none") )]
104847	pub prvs_instg_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
104848	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt2Acct", skip_serializing_if = "Option::is_none") )]
104849	pub prvs_instg_agt2_acct: Option<CashAccount40>,
104850	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt3", skip_serializing_if = "Option::is_none") )]
104851	pub prvs_instg_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
104852	#[cfg_attr( feature = "derive_serde", serde(rename = "PrvsInstgAgt3Acct", skip_serializing_if = "Option::is_none") )]
104853	pub prvs_instg_agt3_acct: Option<CashAccount40>,
104854	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1", skip_serializing_if = "Option::is_none") )]
104855	pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
104856	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt1Acct", skip_serializing_if = "Option::is_none") )]
104857	pub intrmy_agt1_acct: Option<CashAccount40>,
104858	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2", skip_serializing_if = "Option::is_none") )]
104859	pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
104860	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt2Acct", skip_serializing_if = "Option::is_none") )]
104861	pub intrmy_agt2_acct: Option<CashAccount40>,
104862	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3", skip_serializing_if = "Option::is_none") )]
104863	pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
104864	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrmyAgt3Acct", skip_serializing_if = "Option::is_none") )]
104865	pub intrmy_agt3_acct: Option<CashAccount40>,
104866	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgt", skip_serializing_if = "Option::is_none") )]
104867	pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
104868	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAgtAcct", skip_serializing_if = "Option::is_none") )]
104869	pub cdtr_agt_acct: Option<CashAccount40>,
104870	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr") )]
104871	pub cdtr: Party50Choice,
104872	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
104873	pub cdtr_acct: Option<CashAccount40>,
104874	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
104875	pub ultmt_cdtr: Option<Party50Choice>,
104876}
104877
104878impl TransactionParties11 {
104879	pub fn validate(&self) -> Result<(), ValidationError> {
104880		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
104881		self.dbtr.validate()?;
104882		if let Some(ref val) = self.dbtr_acct { val.validate()? }
104883		if let Some(ref val) = self.initg_pty { val.validate()? }
104884		if let Some(ref val) = self.dbtr_agt { val.validate()? }
104885		if let Some(ref val) = self.dbtr_agt_acct { val.validate()? }
104886		if let Some(ref val) = self.prvs_instg_agt1 { val.validate()? }
104887		if let Some(ref val) = self.prvs_instg_agt1_acct { val.validate()? }
104888		if let Some(ref val) = self.prvs_instg_agt2 { val.validate()? }
104889		if let Some(ref val) = self.prvs_instg_agt2_acct { val.validate()? }
104890		if let Some(ref val) = self.prvs_instg_agt3 { val.validate()? }
104891		if let Some(ref val) = self.prvs_instg_agt3_acct { val.validate()? }
104892		if let Some(ref val) = self.intrmy_agt1 { val.validate()? }
104893		if let Some(ref val) = self.intrmy_agt1_acct { val.validate()? }
104894		if let Some(ref val) = self.intrmy_agt2 { val.validate()? }
104895		if let Some(ref val) = self.intrmy_agt2_acct { val.validate()? }
104896		if let Some(ref val) = self.intrmy_agt3 { val.validate()? }
104897		if let Some(ref val) = self.intrmy_agt3_acct { val.validate()? }
104898		if let Some(ref val) = self.cdtr_agt { val.validate()? }
104899		if let Some(ref val) = self.cdtr_agt_acct { val.validate()? }
104900		self.cdtr.validate()?;
104901		if let Some(ref val) = self.cdtr_acct { val.validate()? }
104902		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
104903		Ok(())
104904	}
104905}
104906
104907
104908// TransactionParties12 ...
104909#[cfg_attr(feature = "derive_debug", derive(Debug))]
104910#[cfg_attr(feature = "derive_default", derive(Default))]
104911#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104912#[cfg_attr(feature = "derive_clone", derive(Clone))]
104913#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104914pub struct TransactionParties12 {
104915	#[cfg_attr( feature = "derive_serde", serde(rename = "InitgPty", skip_serializing_if = "Option::is_none") )]
104916	pub initg_pty: Option<Party50Choice>,
104917	#[cfg_attr( feature = "derive_serde", serde(rename = "Dbtr", skip_serializing_if = "Option::is_none") )]
104918	pub dbtr: Option<Party50Choice>,
104919	#[cfg_attr( feature = "derive_serde", serde(rename = "DbtrAcct", skip_serializing_if = "Option::is_none") )]
104920	pub dbtr_acct: Option<CashAccount40>,
104921	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtDbtr", skip_serializing_if = "Option::is_none") )]
104922	pub ultmt_dbtr: Option<Party50Choice>,
104923	#[cfg_attr( feature = "derive_serde", serde(rename = "Cdtr", skip_serializing_if = "Option::is_none") )]
104924	pub cdtr: Option<Party50Choice>,
104925	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrAcct", skip_serializing_if = "Option::is_none") )]
104926	pub cdtr_acct: Option<CashAccount40>,
104927	#[cfg_attr( feature = "derive_serde", serde(rename = "UltmtCdtr", skip_serializing_if = "Option::is_none") )]
104928	pub ultmt_cdtr: Option<Party50Choice>,
104929	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgPty", skip_serializing_if = "Option::is_none") )]
104930	pub tradg_pty: Option<Party50Choice>,
104931	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
104932	pub prtry: Option<Vec<ProprietaryParty6>>,
104933}
104934
104935impl TransactionParties12 {
104936	pub fn validate(&self) -> Result<(), ValidationError> {
104937		if let Some(ref val) = self.initg_pty { val.validate()? }
104938		if let Some(ref val) = self.dbtr { val.validate()? }
104939		if let Some(ref val) = self.dbtr_acct { val.validate()? }
104940		if let Some(ref val) = self.ultmt_dbtr { val.validate()? }
104941		if let Some(ref val) = self.cdtr { val.validate()? }
104942		if let Some(ref val) = self.cdtr_acct { val.validate()? }
104943		if let Some(ref val) = self.ultmt_cdtr { val.validate()? }
104944		if let Some(ref val) = self.tradg_pty { val.validate()? }
104945		if let Some(ref vec) = self.prtry { for item in vec { item.validate()? } }
104946		Ok(())
104947	}
104948}
104949
104950
104951// TransactionPrice4Choice ...
104952#[cfg_attr(feature = "derive_debug", derive(Debug))]
104953#[cfg_attr(feature = "derive_default", derive(Default))]
104954#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104955#[cfg_attr(feature = "derive_clone", derive(Clone))]
104956#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104957pub struct TransactionPrice4Choice {
104958	#[cfg_attr( feature = "derive_serde", serde(rename = "DealPric", skip_serializing_if = "Option::is_none") )]
104959	pub deal_pric: Option<Price7>,
104960	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
104961	pub prtry: Option<Vec<ProprietaryPrice2>>,
104962}
104963
104964impl TransactionPrice4Choice {
104965	pub fn validate(&self) -> Result<(), ValidationError> {
104966		if let Some(ref val) = self.deal_pric { val.validate()? }
104967		if let Some(ref vec) = self.prtry { for item in vec { item.validate()? } }
104968		Ok(())
104969	}
104970}
104971
104972
104973// TransactionProcessingStatus3Code ...
104974#[cfg_attr(feature = "derive_debug", derive(Debug))]
104975#[cfg_attr(feature = "derive_default", derive(Default))]
104976#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
104977#[cfg_attr(feature = "derive_clone", derive(Clone))]
104978#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
104979pub enum TransactionProcessingStatus3Code {
104980	#[cfg_attr(feature = "derive_default", default)]
104981	#[cfg_attr( feature = "derive_serde", serde(rename = "CAND") )]
104982	CodeCAND,
104983	#[cfg_attr( feature = "derive_serde", serde(rename = "PACK") )]
104984	CodePACK,
104985	#[cfg_attr( feature = "derive_serde", serde(rename = "REJT") )]
104986	CodeREJT,
104987	#[cfg_attr( feature = "derive_serde", serde(rename = "REPR") )]
104988	CodeREPR,
104989}
104990
104991impl TransactionProcessingStatus3Code {
104992	pub fn validate(&self) -> Result<(), ValidationError> {
104993		Ok(())
104994	}
104995}
104996
104997
104998// TransactionQuantities3Choice ...
104999#[cfg_attr(feature = "derive_debug", derive(Debug))]
105000#[cfg_attr(feature = "derive_default", derive(Default))]
105001#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105002#[cfg_attr(feature = "derive_clone", derive(Clone))]
105003#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105004pub struct TransactionQuantities3Choice {
105005	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty", skip_serializing_if = "Option::is_none") )]
105006	pub qty: Option<FinancialInstrumentQuantity1Choice>,
105007	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlAndCurFaceAmt", skip_serializing_if = "Option::is_none") )]
105008	pub orgnl_and_cur_face_amt: Option<OriginalAndCurrentQuantities1>,
105009	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
105010	pub prtry: Option<ProprietaryQuantity1>,
105011}
105012
105013impl TransactionQuantities3Choice {
105014	pub fn validate(&self) -> Result<(), ValidationError> {
105015		if let Some(ref val) = self.qty { val.validate()? }
105016		if let Some(ref val) = self.orgnl_and_cur_face_amt { val.validate()? }
105017		if let Some(ref val) = self.prtry { val.validate()? }
105018		Ok(())
105019	}
105020}
105021
105022
105023// TransactionQuery8 ...
105024#[cfg_attr(feature = "derive_debug", derive(Debug))]
105025#[cfg_attr(feature = "derive_default", derive(Default))]
105026#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105027#[cfg_attr(feature = "derive_clone", derive(Clone))]
105028#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105029pub struct TransactionQuery8 {
105030	#[cfg_attr( feature = "derive_serde", serde(rename = "QryTp", skip_serializing_if = "Option::is_none") )]
105031	pub qry_tp: Option<QueryType2Code>,
105032	#[cfg_attr( feature = "derive_serde", serde(rename = "TxCrit", skip_serializing_if = "Option::is_none") )]
105033	pub tx_crit: Option<TransactionCriteria8Choice>,
105034}
105035
105036impl TransactionQuery8 {
105037	pub fn validate(&self) -> Result<(), ValidationError> {
105038		if let Some(ref val) = self.qry_tp { val.validate()? }
105039		if let Some(ref val) = self.tx_crit { val.validate()? }
105040		Ok(())
105041	}
105042}
105043
105044
105045// TransactionReferences6 ...
105046#[cfg_attr(feature = "derive_debug", derive(Debug))]
105047#[cfg_attr(feature = "derive_default", derive(Default))]
105048#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105049#[cfg_attr(feature = "derive_clone", derive(Clone))]
105050#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105051pub struct TransactionReferences6 {
105052	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId", skip_serializing_if = "Option::is_none") )]
105053	pub msg_id: Option<String>,
105054	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrRef", skip_serializing_if = "Option::is_none") )]
105055	pub acct_svcr_ref: Option<String>,
105056	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfId", skip_serializing_if = "Option::is_none") )]
105057	pub pmt_inf_id: Option<String>,
105058	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
105059	pub instr_id: Option<String>,
105060	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId", skip_serializing_if = "Option::is_none") )]
105061	pub end_to_end_id: Option<String>,
105062	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
105063	pub uetr: Option<String>,
105064	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
105065	pub tx_id: Option<String>,
105066	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtId", skip_serializing_if = "Option::is_none") )]
105067	pub mndt_id: Option<String>,
105068	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqNb", skip_serializing_if = "Option::is_none") )]
105069	pub chq_nb: Option<String>,
105070	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysRef", skip_serializing_if = "Option::is_none") )]
105071	pub clr_sys_ref: Option<String>,
105072	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnrTxId", skip_serializing_if = "Option::is_none") )]
105073	pub acct_ownr_tx_id: Option<String>,
105074	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrTxId", skip_serializing_if = "Option::is_none") )]
105075	pub acct_svcr_tx_id: Option<String>,
105076	#[cfg_attr( feature = "derive_serde", serde(rename = "MktInfrstrctrTxId", skip_serializing_if = "Option::is_none") )]
105077	pub mkt_infrstrctr_tx_id: Option<String>,
105078	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgId", skip_serializing_if = "Option::is_none") )]
105079	pub prcg_id: Option<String>,
105080	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
105081	pub prtry: Option<Vec<ProprietaryReference1>>,
105082}
105083
105084impl TransactionReferences6 {
105085	pub fn validate(&self) -> Result<(), ValidationError> {
105086		if let Some(ref val) = self.msg_id {
105087			if val.chars().count() < 1 {
105088				return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
105089			}
105090			if val.chars().count() > 35 {
105091				return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
105092			}
105093		}
105094		if let Some(ref val) = self.acct_svcr_ref {
105095			if val.chars().count() < 1 {
105096				return Err(ValidationError::new(1001, "acct_svcr_ref is shorter than the minimum length of 1".to_string()));
105097			}
105098			if val.chars().count() > 35 {
105099				return Err(ValidationError::new(1002, "acct_svcr_ref exceeds the maximum length of 35".to_string()));
105100			}
105101		}
105102		if let Some(ref val) = self.pmt_inf_id {
105103			if val.chars().count() < 1 {
105104				return Err(ValidationError::new(1001, "pmt_inf_id is shorter than the minimum length of 1".to_string()));
105105			}
105106			if val.chars().count() > 35 {
105107				return Err(ValidationError::new(1002, "pmt_inf_id exceeds the maximum length of 35".to_string()));
105108			}
105109		}
105110		if let Some(ref val) = self.instr_id {
105111			if val.chars().count() < 1 {
105112				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
105113			}
105114			if val.chars().count() > 35 {
105115				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
105116			}
105117		}
105118		if let Some(ref val) = self.end_to_end_id {
105119			if val.chars().count() < 1 {
105120				return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
105121			}
105122			if val.chars().count() > 35 {
105123				return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
105124			}
105125		}
105126		if let Some(ref val) = self.uetr {
105127			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
105128			if !pattern.is_match(val) {
105129				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
105130			}
105131		}
105132		if let Some(ref val) = self.tx_id {
105133			if val.chars().count() < 1 {
105134				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
105135			}
105136			if val.chars().count() > 35 {
105137				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
105138			}
105139		}
105140		if let Some(ref val) = self.mndt_id {
105141			if val.chars().count() < 1 {
105142				return Err(ValidationError::new(1001, "mndt_id is shorter than the minimum length of 1".to_string()));
105143			}
105144			if val.chars().count() > 35 {
105145				return Err(ValidationError::new(1002, "mndt_id exceeds the maximum length of 35".to_string()));
105146			}
105147		}
105148		if let Some(ref val) = self.chq_nb {
105149			if val.chars().count() < 1 {
105150				return Err(ValidationError::new(1001, "chq_nb is shorter than the minimum length of 1".to_string()));
105151			}
105152			if val.chars().count() > 35 {
105153				return Err(ValidationError::new(1002, "chq_nb exceeds the maximum length of 35".to_string()));
105154			}
105155		}
105156		if let Some(ref val) = self.clr_sys_ref {
105157			if val.chars().count() < 1 {
105158				return Err(ValidationError::new(1001, "clr_sys_ref is shorter than the minimum length of 1".to_string()));
105159			}
105160			if val.chars().count() > 35 {
105161				return Err(ValidationError::new(1002, "clr_sys_ref exceeds the maximum length of 35".to_string()));
105162			}
105163		}
105164		if let Some(ref val) = self.acct_ownr_tx_id {
105165			if val.chars().count() < 1 {
105166				return Err(ValidationError::new(1001, "acct_ownr_tx_id is shorter than the minimum length of 1".to_string()));
105167			}
105168			if val.chars().count() > 35 {
105169				return Err(ValidationError::new(1002, "acct_ownr_tx_id exceeds the maximum length of 35".to_string()));
105170			}
105171		}
105172		if let Some(ref val) = self.acct_svcr_tx_id {
105173			if val.chars().count() < 1 {
105174				return Err(ValidationError::new(1001, "acct_svcr_tx_id is shorter than the minimum length of 1".to_string()));
105175			}
105176			if val.chars().count() > 35 {
105177				return Err(ValidationError::new(1002, "acct_svcr_tx_id exceeds the maximum length of 35".to_string()));
105178			}
105179		}
105180		if let Some(ref val) = self.mkt_infrstrctr_tx_id {
105181			if val.chars().count() < 1 {
105182				return Err(ValidationError::new(1001, "mkt_infrstrctr_tx_id is shorter than the minimum length of 1".to_string()));
105183			}
105184			if val.chars().count() > 35 {
105185				return Err(ValidationError::new(1002, "mkt_infrstrctr_tx_id exceeds the maximum length of 35".to_string()));
105186			}
105187		}
105188		if let Some(ref val) = self.prcg_id {
105189			if val.chars().count() < 1 {
105190				return Err(ValidationError::new(1001, "prcg_id is shorter than the minimum length of 1".to_string()));
105191			}
105192			if val.chars().count() > 35 {
105193				return Err(ValidationError::new(1002, "prcg_id exceeds the maximum length of 35".to_string()));
105194			}
105195		}
105196		if let Some(ref vec) = self.prtry { for item in vec { item.validate()? } }
105197		Ok(())
105198	}
105199}
105200
105201
105202// TransactionReferences7 ...
105203#[cfg_attr(feature = "derive_debug", derive(Debug))]
105204#[cfg_attr(feature = "derive_default", derive(Default))]
105205#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105206#[cfg_attr(feature = "derive_clone", derive(Clone))]
105207#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105208pub struct TransactionReferences7 {
105209	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgId", skip_serializing_if = "Option::is_none") )]
105210	pub msg_id: Option<String>,
105211	#[cfg_attr( feature = "derive_serde", serde(rename = "MsgNmId", skip_serializing_if = "Option::is_none") )]
105212	pub msg_nm_id: Option<String>,
105213	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrRef", skip_serializing_if = "Option::is_none") )]
105214	pub acct_svcr_ref: Option<String>,
105215	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfId", skip_serializing_if = "Option::is_none") )]
105216	pub pmt_inf_id: Option<String>,
105217	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
105218	pub instr_id: Option<String>,
105219	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId", skip_serializing_if = "Option::is_none") )]
105220	pub end_to_end_id: Option<String>,
105221	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
105222	pub uetr: Option<String>,
105223	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
105224	pub tx_id: Option<String>,
105225	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtId", skip_serializing_if = "Option::is_none") )]
105226	pub mndt_id: Option<String>,
105227	#[cfg_attr( feature = "derive_serde", serde(rename = "ChqNb", skip_serializing_if = "Option::is_none") )]
105228	pub chq_nb: Option<String>,
105229	#[cfg_attr( feature = "derive_serde", serde(rename = "ClrSysRef", skip_serializing_if = "Option::is_none") )]
105230	pub clr_sys_ref: Option<String>,
105231	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctOwnrTxId", skip_serializing_if = "Option::is_none") )]
105232	pub acct_ownr_tx_id: Option<String>,
105233	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctSvcrTxId", skip_serializing_if = "Option::is_none") )]
105234	pub acct_svcr_tx_id: Option<String>,
105235	#[cfg_attr( feature = "derive_serde", serde(rename = "MktInfrstrctrTxId", skip_serializing_if = "Option::is_none") )]
105236	pub mkt_infrstrctr_tx_id: Option<String>,
105237	#[cfg_attr( feature = "derive_serde", serde(rename = "PrcgId", skip_serializing_if = "Option::is_none") )]
105238	pub prcg_id: Option<String>,
105239	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
105240	pub prtry: Option<Vec<ProprietaryReference1>>,
105241}
105242
105243impl TransactionReferences7 {
105244	pub fn validate(&self) -> Result<(), ValidationError> {
105245		if let Some(ref val) = self.msg_id {
105246			if val.chars().count() < 1 {
105247				return Err(ValidationError::new(1001, "msg_id is shorter than the minimum length of 1".to_string()));
105248			}
105249			if val.chars().count() > 35 {
105250				return Err(ValidationError::new(1002, "msg_id exceeds the maximum length of 35".to_string()));
105251			}
105252		}
105253		if let Some(ref val) = self.msg_nm_id {
105254			if val.chars().count() < 1 {
105255				return Err(ValidationError::new(1001, "msg_nm_id is shorter than the minimum length of 1".to_string()));
105256			}
105257			if val.chars().count() > 35 {
105258				return Err(ValidationError::new(1002, "msg_nm_id exceeds the maximum length of 35".to_string()));
105259			}
105260		}
105261		if let Some(ref val) = self.acct_svcr_ref {
105262			if val.chars().count() < 1 {
105263				return Err(ValidationError::new(1001, "acct_svcr_ref is shorter than the minimum length of 1".to_string()));
105264			}
105265			if val.chars().count() > 35 {
105266				return Err(ValidationError::new(1002, "acct_svcr_ref exceeds the maximum length of 35".to_string()));
105267			}
105268		}
105269		if let Some(ref val) = self.pmt_inf_id {
105270			if val.chars().count() < 1 {
105271				return Err(ValidationError::new(1001, "pmt_inf_id is shorter than the minimum length of 1".to_string()));
105272			}
105273			if val.chars().count() > 35 {
105274				return Err(ValidationError::new(1002, "pmt_inf_id exceeds the maximum length of 35".to_string()));
105275			}
105276		}
105277		if let Some(ref val) = self.instr_id {
105278			if val.chars().count() < 1 {
105279				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
105280			}
105281			if val.chars().count() > 35 {
105282				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
105283			}
105284		}
105285		if let Some(ref val) = self.end_to_end_id {
105286			if val.chars().count() < 1 {
105287				return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
105288			}
105289			if val.chars().count() > 35 {
105290				return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
105291			}
105292		}
105293		if let Some(ref val) = self.uetr {
105294			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
105295			if !pattern.is_match(val) {
105296				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
105297			}
105298		}
105299		if let Some(ref val) = self.tx_id {
105300			if val.chars().count() < 1 {
105301				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
105302			}
105303			if val.chars().count() > 35 {
105304				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
105305			}
105306		}
105307		if let Some(ref val) = self.mndt_id {
105308			if val.chars().count() < 1 {
105309				return Err(ValidationError::new(1001, "mndt_id is shorter than the minimum length of 1".to_string()));
105310			}
105311			if val.chars().count() > 35 {
105312				return Err(ValidationError::new(1002, "mndt_id exceeds the maximum length of 35".to_string()));
105313			}
105314		}
105315		if let Some(ref val) = self.chq_nb {
105316			if val.chars().count() < 1 {
105317				return Err(ValidationError::new(1001, "chq_nb is shorter than the minimum length of 1".to_string()));
105318			}
105319			if val.chars().count() > 35 {
105320				return Err(ValidationError::new(1002, "chq_nb exceeds the maximum length of 35".to_string()));
105321			}
105322		}
105323		if let Some(ref val) = self.clr_sys_ref {
105324			if val.chars().count() < 1 {
105325				return Err(ValidationError::new(1001, "clr_sys_ref is shorter than the minimum length of 1".to_string()));
105326			}
105327			if val.chars().count() > 35 {
105328				return Err(ValidationError::new(1002, "clr_sys_ref exceeds the maximum length of 35".to_string()));
105329			}
105330		}
105331		if let Some(ref val) = self.acct_ownr_tx_id {
105332			if val.chars().count() < 1 {
105333				return Err(ValidationError::new(1001, "acct_ownr_tx_id is shorter than the minimum length of 1".to_string()));
105334			}
105335			if val.chars().count() > 35 {
105336				return Err(ValidationError::new(1002, "acct_ownr_tx_id exceeds the maximum length of 35".to_string()));
105337			}
105338		}
105339		if let Some(ref val) = self.acct_svcr_tx_id {
105340			if val.chars().count() < 1 {
105341				return Err(ValidationError::new(1001, "acct_svcr_tx_id is shorter than the minimum length of 1".to_string()));
105342			}
105343			if val.chars().count() > 35 {
105344				return Err(ValidationError::new(1002, "acct_svcr_tx_id exceeds the maximum length of 35".to_string()));
105345			}
105346		}
105347		if let Some(ref val) = self.mkt_infrstrctr_tx_id {
105348			if val.chars().count() < 1 {
105349				return Err(ValidationError::new(1001, "mkt_infrstrctr_tx_id is shorter than the minimum length of 1".to_string()));
105350			}
105351			if val.chars().count() > 35 {
105352				return Err(ValidationError::new(1002, "mkt_infrstrctr_tx_id exceeds the maximum length of 35".to_string()));
105353			}
105354		}
105355		if let Some(ref val) = self.prcg_id {
105356			if val.chars().count() < 1 {
105357				return Err(ValidationError::new(1001, "prcg_id is shorter than the minimum length of 1".to_string()));
105358			}
105359			if val.chars().count() > 35 {
105360				return Err(ValidationError::new(1002, "prcg_id exceeds the maximum length of 35".to_string()));
105361			}
105362		}
105363		if let Some(ref vec) = self.prtry { for item in vec { item.validate()? } }
105364		Ok(())
105365	}
105366}
105367
105368
105369// TransactionReferences8 ...
105370#[cfg_attr(feature = "derive_debug", derive(Debug))]
105371#[cfg_attr(feature = "derive_default", derive(Default))]
105372#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105373#[cfg_attr(feature = "derive_clone", derive(Clone))]
105374#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105375pub struct TransactionReferences8 {
105376	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtInfId", skip_serializing_if = "Option::is_none") )]
105377	pub pmt_inf_id: Option<String>,
105378	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrId", skip_serializing_if = "Option::is_none") )]
105379	pub instr_id: Option<String>,
105380	#[cfg_attr( feature = "derive_serde", serde(rename = "EndToEndId") )]
105381	pub end_to_end_id: String,
105382	#[cfg_attr( feature = "derive_serde", serde(rename = "TxId", skip_serializing_if = "Option::is_none") )]
105383	pub tx_id: Option<String>,
105384	#[cfg_attr( feature = "derive_serde", serde(rename = "UETR", skip_serializing_if = "Option::is_none") )]
105385	pub uetr: Option<String>,
105386	#[cfg_attr( feature = "derive_serde", serde(rename = "MndtId", skip_serializing_if = "Option::is_none") )]
105387	pub mndt_id: Option<String>,
105388	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtrSchmeId", skip_serializing_if = "Option::is_none") )]
105389	pub cdtr_schme_id: Option<PartyIdentification272>,
105390}
105391
105392impl TransactionReferences8 {
105393	pub fn validate(&self) -> Result<(), ValidationError> {
105394		if let Some(ref val) = self.pmt_inf_id {
105395			if val.chars().count() < 1 {
105396				return Err(ValidationError::new(1001, "pmt_inf_id is shorter than the minimum length of 1".to_string()));
105397			}
105398			if val.chars().count() > 35 {
105399				return Err(ValidationError::new(1002, "pmt_inf_id exceeds the maximum length of 35".to_string()));
105400			}
105401		}
105402		if let Some(ref val) = self.instr_id {
105403			if val.chars().count() < 1 {
105404				return Err(ValidationError::new(1001, "instr_id is shorter than the minimum length of 1".to_string()));
105405			}
105406			if val.chars().count() > 35 {
105407				return Err(ValidationError::new(1002, "instr_id exceeds the maximum length of 35".to_string()));
105408			}
105409		}
105410		if self.end_to_end_id.chars().count() < 1 {
105411			return Err(ValidationError::new(1001, "end_to_end_id is shorter than the minimum length of 1".to_string()));
105412		}
105413		if self.end_to_end_id.chars().count() > 35 {
105414			return Err(ValidationError::new(1002, "end_to_end_id exceeds the maximum length of 35".to_string()));
105415		}
105416		if let Some(ref val) = self.tx_id {
105417			if val.chars().count() < 1 {
105418				return Err(ValidationError::new(1001, "tx_id is shorter than the minimum length of 1".to_string()));
105419			}
105420			if val.chars().count() > 35 {
105421				return Err(ValidationError::new(1002, "tx_id exceeds the maximum length of 35".to_string()));
105422			}
105423		}
105424		if let Some(ref val) = self.uetr {
105425			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
105426			if !pattern.is_match(val) {
105427				return Err(ValidationError::new(1005, "uetr does not match the required pattern".to_string()));
105428			}
105429		}
105430		if let Some(ref val) = self.mndt_id {
105431			if val.chars().count() < 1 {
105432				return Err(ValidationError::new(1001, "mndt_id is shorter than the minimum length of 1".to_string()));
105433			}
105434			if val.chars().count() > 35 {
105435				return Err(ValidationError::new(1002, "mndt_id exceeds the maximum length of 35".to_string()));
105436			}
105437		}
105438		if let Some(ref val) = self.cdtr_schme_id { val.validate()? }
105439		Ok(())
105440	}
105441}
105442
105443
105444// TransactionReport8 ...
105445#[cfg_attr(feature = "derive_debug", derive(Debug))]
105446#[cfg_attr(feature = "derive_default", derive(Default))]
105447#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105448#[cfg_attr(feature = "derive_clone", derive(Clone))]
105449#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105450pub struct TransactionReport8 {
105451	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtId") )]
105452	pub pmt_id: PaymentIdentification8Choice,
105453	#[cfg_attr( feature = "derive_serde", serde(rename = "TxOrErr") )]
105454	pub tx_or_err: TransactionOrError6Choice,
105455}
105456
105457impl TransactionReport8 {
105458	pub fn validate(&self) -> Result<(), ValidationError> {
105459		self.pmt_id.validate()?;
105460		self.tx_or_err.validate()?;
105461		Ok(())
105462	}
105463}
105464
105465
105466// TransactionReportOrError7Choice ...
105467#[cfg_attr(feature = "derive_debug", derive(Debug))]
105468#[cfg_attr(feature = "derive_default", derive(Default))]
105469#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105470#[cfg_attr(feature = "derive_clone", derive(Clone))]
105471#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105472pub struct TransactionReportOrError7Choice {
105473	#[cfg_attr( feature = "derive_serde", serde(rename = "BizRpt", skip_serializing_if = "Option::is_none") )]
105474	pub biz_rpt: Option<Transactions11>,
105475	#[cfg_attr( feature = "derive_serde", serde(rename = "OprlErr", skip_serializing_if = "Option::is_none") )]
105476	pub oprl_err: Option<Vec<ErrorHandling5>>,
105477}
105478
105479impl TransactionReportOrError7Choice {
105480	pub fn validate(&self) -> Result<(), ValidationError> {
105481		if let Some(ref val) = self.biz_rpt { val.validate()? }
105482		if let Some(ref vec) = self.oprl_err { for item in vec { item.validate()? } }
105483		Ok(())
105484	}
105485}
105486
105487
105488// TransactionRequestType1Code ...
105489#[cfg_attr(feature = "derive_debug", derive(Debug))]
105490#[cfg_attr(feature = "derive_default", derive(Default))]
105491#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105492#[cfg_attr(feature = "derive_clone", derive(Clone))]
105493#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105494pub enum TransactionRequestType1Code {
105495	#[cfg_attr(feature = "derive_default", default)]
105496	#[cfg_attr( feature = "derive_serde", serde(rename = "DTTX") )]
105497	CodeDTTX,
105498	#[cfg_attr( feature = "derive_serde", serde(rename = "OREC") )]
105499	CodeOREC,
105500}
105501
105502impl TransactionRequestType1Code {
105503	pub fn validate(&self) -> Result<(), ValidationError> {
105504		Ok(())
105505	}
105506}
105507
105508
105509// TransactionReturnCriteria5 ...
105510#[cfg_attr(feature = "derive_debug", derive(Debug))]
105511#[cfg_attr(feature = "derive_default", derive(Default))]
105512#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105513#[cfg_attr(feature = "derive_clone", derive(Clone))]
105514#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105515pub struct TransactionReturnCriteria5 {
105516	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtToRtrCrit", skip_serializing_if = "Option::is_none") )]
105517	pub pmt_to_rtr_crit: Option<SystemReturnCriteria2>,
105518	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtFrRtrCrit", skip_serializing_if = "Option::is_none") )]
105519	pub pmt_fr_rtr_crit: Option<SystemReturnCriteria2>,
105520	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctCshNtryRtrCrit", skip_serializing_if = "Option::is_none") )]
105521	pub acct_csh_ntry_rtr_crit: Option<AccountCashEntryReturnCriteria3>,
105522	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtRtrCrit", skip_serializing_if = "Option::is_none") )]
105523	pub pmt_rtr_crit: Option<PaymentReturnCriteria4>,
105524}
105525
105526impl TransactionReturnCriteria5 {
105527	pub fn validate(&self) -> Result<(), ValidationError> {
105528		if let Some(ref val) = self.pmt_to_rtr_crit { val.validate()? }
105529		if let Some(ref val) = self.pmt_fr_rtr_crit { val.validate()? }
105530		if let Some(ref val) = self.acct_csh_ntry_rtr_crit { val.validate()? }
105531		if let Some(ref val) = self.pmt_rtr_crit { val.validate()? }
105532		Ok(())
105533	}
105534}
105535
105536
105537// TransactionSearchCriteria11 ...
105538#[cfg_attr(feature = "derive_debug", derive(Debug))]
105539#[cfg_attr(feature = "derive_default", derive(Default))]
105540#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105541#[cfg_attr(feature = "derive_clone", derive(Clone))]
105542#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105543pub struct TransactionSearchCriteria11 {
105544	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtTo", skip_serializing_if = "Option::is_none") )]
105545	pub pmt_to: Option<Vec<SystemSearch5>>,
105546	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtFr", skip_serializing_if = "Option::is_none") )]
105547	pub pmt_fr: Option<Vec<SystemSearch5>>,
105548	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtSch", skip_serializing_if = "Option::is_none") )]
105549	pub pmt_sch: Option<PaymentSearch10>,
105550	#[cfg_attr( feature = "derive_serde", serde(rename = "AcctNtrySch", skip_serializing_if = "Option::is_none") )]
105551	pub acct_ntry_sch: Option<CashAccountEntrySearch8>,
105552}
105553
105554impl TransactionSearchCriteria11 {
105555	pub fn validate(&self) -> Result<(), ValidationError> {
105556		if let Some(ref vec) = self.pmt_to { for item in vec { item.validate()? } }
105557		if let Some(ref vec) = self.pmt_fr { for item in vec { item.validate()? } }
105558		if let Some(ref val) = self.pmt_sch { val.validate()? }
105559		if let Some(ref val) = self.acct_ntry_sch { val.validate()? }
105560		Ok(())
105561	}
105562}
105563
105564
105565// TransactionStatus1Choice ...
105566#[cfg_attr(feature = "derive_debug", derive(Debug))]
105567#[cfg_attr(feature = "derive_default", derive(Default))]
105568#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105569#[cfg_attr(feature = "derive_clone", derive(Clone))]
105570#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105571pub struct TransactionStatus1Choice {
105572	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
105573	pub cd: Option<String>,
105574	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
105575	pub prtry: Option<String>,
105576}
105577
105578impl TransactionStatus1Choice {
105579	pub fn validate(&self) -> Result<(), ValidationError> {
105580		if let Some(ref val) = self.cd {
105581			if val.chars().count() < 1 {
105582				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
105583			}
105584			if val.chars().count() > 4 {
105585				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
105586			}
105587		}
105588		if let Some(ref val) = self.prtry {
105589			if val.chars().count() < 1 {
105590				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
105591			}
105592			if val.chars().count() > 35 {
105593				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
105594			}
105595		}
105596		Ok(())
105597	}
105598}
105599
105600
105601// TransactionType2 ...
105602#[cfg_attr(feature = "derive_debug", derive(Debug))]
105603#[cfg_attr(feature = "derive_default", derive(Default))]
105604#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105605#[cfg_attr(feature = "derive_clone", derive(Clone))]
105606#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105607pub struct TransactionType2 {
105608	#[cfg_attr( feature = "derive_serde", serde(rename = "Sts") )]
105609	pub sts: EntryStatus1Choice,
105610	#[cfg_attr( feature = "derive_serde", serde(rename = "CdtDbtInd") )]
105611	pub cdt_dbt_ind: CreditDebitCode,
105612	#[cfg_attr( feature = "derive_serde", serde(rename = "FlrLmt", skip_serializing_if = "Option::is_none") )]
105613	pub flr_lmt: Option<Vec<Limit2>>,
105614}
105615
105616impl TransactionType2 {
105617	pub fn validate(&self) -> Result<(), ValidationError> {
105618		self.sts.validate()?;
105619		self.cdt_dbt_ind.validate()?;
105620		if let Some(ref vec) = self.flr_lmt { for item in vec { item.validate()? } }
105621		Ok(())
105622	}
105623}
105624
105625
105626// TransactionType5Choice ...
105627#[cfg_attr(feature = "derive_debug", derive(Debug))]
105628#[cfg_attr(feature = "derive_default", derive(Default))]
105629#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105630#[cfg_attr(feature = "derive_clone", derive(Clone))]
105631#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105632pub struct TransactionType5Choice {
105633	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
105634	pub cd: Option<InvestmentFundTransactionType1Code>,
105635	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
105636	pub prtry: Option<GenericIdentification47>,
105637}
105638
105639impl TransactionType5Choice {
105640	pub fn validate(&self) -> Result<(), ValidationError> {
105641		if let Some(ref val) = self.cd { val.validate()? }
105642		if let Some(ref val) = self.prtry { val.validate()? }
105643		Ok(())
105644	}
105645}
105646
105647
105648// Transactions11 ...
105649#[cfg_attr(feature = "derive_debug", derive(Debug))]
105650#[cfg_attr(feature = "derive_default", derive(Default))]
105651#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105652#[cfg_attr(feature = "derive_clone", derive(Clone))]
105653#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105654pub struct Transactions11 {
105655	#[cfg_attr( feature = "derive_serde", serde(rename = "PmtCmonInf", skip_serializing_if = "Option::is_none") )]
105656	pub pmt_cmon_inf: Option<PaymentCommon6>,
105657	#[cfg_attr( feature = "derive_serde", serde(rename = "TxsSummry", skip_serializing_if = "Option::is_none") )]
105658	pub txs_summry: Option<NumberAndSumOfTransactions2>,
105659	#[cfg_attr( feature = "derive_serde", serde(rename = "TxRpt") )]
105660	pub tx_rpt: Vec<TransactionReport8>,
105661}
105662
105663impl Transactions11 {
105664	pub fn validate(&self) -> Result<(), ValidationError> {
105665		if let Some(ref val) = self.pmt_cmon_inf { val.validate()? }
105666		if let Some(ref val) = self.txs_summry { val.validate()? }
105667		for item in &self.tx_rpt { item.validate()? }
105668		Ok(())
105669	}
105670}
105671
105672
105673// TransactionsBin2 ...
105674#[cfg_attr(feature = "derive_debug", derive(Debug))]
105675#[cfg_attr(feature = "derive_default", derive(Default))]
105676#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105677#[cfg_attr(feature = "derive_clone", derive(Clone))]
105678#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105679pub struct TransactionsBin2 {
105680	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs") )]
105681	pub nb_of_txs: f64,
105682	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNtnlAmt") )]
105683	pub ttl_ntnl_amt: f64,
105684	#[cfg_attr( feature = "derive_serde", serde(rename = "Rg") )]
105685	pub rg: FromToQuantityRange2,
105686}
105687
105688impl TransactionsBin2 {
105689	pub fn validate(&self) -> Result<(), ValidationError> {
105690		self.rg.validate()?;
105691		Ok(())
105692	}
105693}
105694
105695
105696// TransferInstruction1 ...
105697#[cfg_attr(feature = "derive_debug", derive(Debug))]
105698#[cfg_attr(feature = "derive_default", derive(Default))]
105699#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105700#[cfg_attr(feature = "derive_clone", derive(Clone))]
105701#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105702pub struct TransferInstruction1 {
105703	#[cfg_attr( feature = "derive_serde", serde(rename = "TrfInd", skip_serializing_if = "Option::is_none") )]
105704	pub trf_ind: Option<bool>,
105705	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd") )]
105706	pub cd: String,
105707	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
105708	pub prtry: Option<String>,
105709	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDtTm", skip_serializing_if = "Option::is_none") )]
105710	pub start_dt_tm: Option<String>,
105711	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
105712	pub start_dt: Option<String>,
105713	#[cfg_attr( feature = "derive_serde", serde(rename = "Desc", skip_serializing_if = "Option::is_none") )]
105714	pub desc: Option<String>,
105715}
105716
105717impl TransferInstruction1 {
105718	pub fn validate(&self) -> Result<(), ValidationError> {
105719		if self.cd.chars().count() < 1 {
105720			return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
105721		}
105722		if self.cd.chars().count() > 35 {
105723			return Err(ValidationError::new(1002, "cd exceeds the maximum length of 35".to_string()));
105724		}
105725		if let Some(ref val) = self.prtry {
105726			if val.chars().count() < 1 {
105727				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
105728			}
105729			if val.chars().count() > 256 {
105730				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 256".to_string()));
105731			}
105732		}
105733		if let Some(ref val) = self.desc {
105734			if val.chars().count() < 1 {
105735				return Err(ValidationError::new(1001, "desc is shorter than the minimum length of 1".to_string()));
105736			}
105737			if val.chars().count() > 350 {
105738				return Err(ValidationError::new(1002, "desc exceeds the maximum length of 350".to_string()));
105739			}
105740		}
105741		Ok(())
105742	}
105743}
105744
105745
105746// TransparencyDataReport11 ...
105747#[cfg_attr(feature = "derive_debug", derive(Debug))]
105748#[cfg_attr(feature = "derive_default", derive(Default))]
105749#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105750#[cfg_attr(feature = "derive_clone", derive(Clone))]
105751#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105752pub struct TransparencyDataReport11 {
105753	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
105754	pub tech_rcrd_id: Option<String>,
105755	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
105756	pub id: String,
105757	#[cfg_attr( feature = "derive_serde", serde(rename = "FullNm", skip_serializing_if = "Option::is_none") )]
105758	pub full_nm: Option<String>,
105759	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
105760	pub tradg_vn: Option<String>,
105761	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDt", skip_serializing_if = "Option::is_none") )]
105762	pub rptg_dt: Option<String>,
105763	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmClssfctn") )]
105764	pub fin_instrm_clssfctn: EquityInstrumentReportingClassification1Code,
105765	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOutsdngInstrms", skip_serializing_if = "Option::is_none") )]
105766	pub nb_outsdng_instrms: Option<f64>,
105767	#[cfg_attr( feature = "derive_serde", serde(rename = "HldgsExcdgTtlVtngRghtThrshld", skip_serializing_if = "Option::is_none") )]
105768	pub hldgs_excdg_ttl_vtng_rght_thrshld: Option<f64>,
105769	#[cfg_attr( feature = "derive_serde", serde(rename = "IssncSz", skip_serializing_if = "Option::is_none") )]
105770	pub issnc_sz: Option<ActiveCurrencyAndAmount>,
105771	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrmPric", skip_serializing_if = "Option::is_none") )]
105772	pub instrm_pric: Option<ActiveCurrencyAnd13DecimalAmount>,
105773}
105774
105775impl TransparencyDataReport11 {
105776	pub fn validate(&self) -> Result<(), ValidationError> {
105777		if let Some(ref val) = self.tech_rcrd_id {
105778			if val.chars().count() < 1 {
105779				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
105780			}
105781			if val.chars().count() > 35 {
105782				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
105783			}
105784		}
105785		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
105786		if !pattern.is_match(&self.id) {
105787			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
105788		}
105789		if let Some(ref val) = self.full_nm {
105790			if val.chars().count() < 1 {
105791				return Err(ValidationError::new(1001, "full_nm is shorter than the minimum length of 1".to_string()));
105792			}
105793			if val.chars().count() > 350 {
105794				return Err(ValidationError::new(1002, "full_nm exceeds the maximum length of 350".to_string()));
105795			}
105796		}
105797		if let Some(ref val) = self.tradg_vn {
105798			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
105799			if !pattern.is_match(val) {
105800				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
105801			}
105802		}
105803		self.fin_instrm_clssfctn.validate()?;
105804		if let Some(ref val) = self.issnc_sz { val.validate()? }
105805		if let Some(ref val) = self.instrm_pric { val.validate()? }
105806		Ok(())
105807	}
105808}
105809
105810
105811// TransparencyDataReport13 ...
105812#[cfg_attr(feature = "derive_debug", derive(Debug))]
105813#[cfg_attr(feature = "derive_default", derive(Default))]
105814#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105815#[cfg_attr(feature = "derive_clone", derive(Clone))]
105816#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105817pub struct TransparencyDataReport13 {
105818	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
105819	pub tech_rcrd_id: Option<String>,
105820	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
105821	pub id: String,
105822	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDt", skip_serializing_if = "Option::is_none") )]
105823	pub rptg_dt: Option<String>,
105824	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
105825	pub tradg_vn: Option<String>,
105826	#[cfg_attr( feature = "derive_serde", serde(rename = "Sspnsn") )]
105827	pub sspnsn: bool,
105828	#[cfg_attr( feature = "derive_serde", serde(rename = "TxsExctd") )]
105829	pub txs_exctd: NumberAndVolume2,
105830	#[cfg_attr( feature = "derive_serde", serde(rename = "TxsExctdExclgPreTradWvr") )]
105831	pub txs_exctd_exclg_pre_trad_wvr: NumberAndVolume2,
105832	#[cfg_attr( feature = "derive_serde", serde(rename = "TxsExctdExclgPstTradLrgInScaleWvr") )]
105833	pub txs_exctd_exclg_pst_trad_lrg_in_scale_wvr: NumberAndVolume2,
105834}
105835
105836impl TransparencyDataReport13 {
105837	pub fn validate(&self) -> Result<(), ValidationError> {
105838		if let Some(ref val) = self.tech_rcrd_id {
105839			if val.chars().count() < 1 {
105840				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
105841			}
105842			if val.chars().count() > 35 {
105843				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
105844			}
105845		}
105846		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
105847		if !pattern.is_match(&self.id) {
105848			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
105849		}
105850		if let Some(ref val) = self.tradg_vn {
105851			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
105852			if !pattern.is_match(val) {
105853				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
105854			}
105855		}
105856		self.txs_exctd.validate()?;
105857		self.txs_exctd_exclg_pre_trad_wvr.validate()?;
105858		self.txs_exctd_exclg_pst_trad_lrg_in_scale_wvr.validate()?;
105859		Ok(())
105860	}
105861}
105862
105863
105864// TransparencyDataReport15 ...
105865#[cfg_attr(feature = "derive_debug", derive(Debug))]
105866#[cfg_attr(feature = "derive_default", derive(Default))]
105867#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105868#[cfg_attr(feature = "derive_clone", derive(Clone))]
105869#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105870pub struct TransparencyDataReport15 {
105871	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
105872	pub tech_rcrd_id: Option<String>,
105873	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
105874	pub id: String,
105875	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDt", skip_serializing_if = "Option::is_none") )]
105876	pub rptg_dt: Option<String>,
105877	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
105878	pub tradg_vn: Option<String>,
105879	#[cfg_attr( feature = "derive_serde", serde(rename = "Sspnsn") )]
105880	pub sspnsn: bool,
105881	#[cfg_attr( feature = "derive_serde", serde(rename = "NbTxs", skip_serializing_if = "Option::is_none") )]
105882	pub nb_txs: Option<f64>,
105883	#[cfg_attr( feature = "derive_serde", serde(rename = "AggtdQttvData", skip_serializing_if = "Option::is_none") )]
105884	pub aggtd_qttv_data: Option<Vec<TransactionsBin2>>,
105885}
105886
105887impl TransparencyDataReport15 {
105888	pub fn validate(&self) -> Result<(), ValidationError> {
105889		if let Some(ref val) = self.tech_rcrd_id {
105890			if val.chars().count() < 1 {
105891				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
105892			}
105893			if val.chars().count() > 35 {
105894				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
105895			}
105896		}
105897		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
105898		if !pattern.is_match(&self.id) {
105899			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
105900		}
105901		if let Some(ref val) = self.tradg_vn {
105902			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
105903			if !pattern.is_match(val) {
105904				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
105905			}
105906		}
105907		if let Some(ref vec) = self.aggtd_qttv_data { for item in vec { item.validate()? } }
105908		Ok(())
105909	}
105910}
105911
105912
105913// TransparencyDataReport17 ...
105914#[cfg_attr(feature = "derive_debug", derive(Debug))]
105915#[cfg_attr(feature = "derive_default", derive(Default))]
105916#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105917#[cfg_attr(feature = "derive_clone", derive(Clone))]
105918#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105919pub struct TransparencyDataReport17 {
105920	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
105921	pub tech_rcrd_id: Option<String>,
105922	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
105923	pub id: String,
105924	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmClssfctn", skip_serializing_if = "Option::is_none") )]
105925	pub fin_instrm_clssfctn: Option<EquityInstrumentReportingClassification1Code>,
105926	#[cfg_attr( feature = "derive_serde", serde(rename = "FullNm", skip_serializing_if = "Option::is_none") )]
105927	pub full_nm: Option<String>,
105928	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
105929	pub tradg_vn: Option<String>,
105930	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPrd", skip_serializing_if = "Option::is_none") )]
105931	pub rptg_prd: Option<Period4Choice>,
105932	#[cfg_attr( feature = "derive_serde", serde(rename = "Lqdty", skip_serializing_if = "Option::is_none") )]
105933	pub lqdty: Option<bool>,
105934	#[cfg_attr( feature = "derive_serde", serde(rename = "Mthdlgy", skip_serializing_if = "Option::is_none") )]
105935	pub mthdlgy: Option<TransparencyMethodology2Code>,
105936	#[cfg_attr( feature = "derive_serde", serde(rename = "Sttstcs", skip_serializing_if = "Option::is_none") )]
105937	pub sttstcs: Option<StatisticsTransparency3>,
105938	#[cfg_attr( feature = "derive_serde", serde(rename = "RlvntMkt", skip_serializing_if = "Option::is_none") )]
105939	pub rlvnt_mkt: Option<MarketDetail2>,
105940}
105941
105942impl TransparencyDataReport17 {
105943	pub fn validate(&self) -> Result<(), ValidationError> {
105944		if let Some(ref val) = self.tech_rcrd_id {
105945			if val.chars().count() < 1 {
105946				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
105947			}
105948			if val.chars().count() > 35 {
105949				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
105950			}
105951		}
105952		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
105953		if !pattern.is_match(&self.id) {
105954			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
105955		}
105956		if let Some(ref val) = self.fin_instrm_clssfctn { val.validate()? }
105957		if let Some(ref val) = self.full_nm {
105958			if val.chars().count() < 1 {
105959				return Err(ValidationError::new(1001, "full_nm is shorter than the minimum length of 1".to_string()));
105960			}
105961			if val.chars().count() > 350 {
105962				return Err(ValidationError::new(1002, "full_nm exceeds the maximum length of 350".to_string()));
105963			}
105964		}
105965		if let Some(ref val) = self.tradg_vn {
105966			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
105967			if !pattern.is_match(val) {
105968				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
105969			}
105970		}
105971		if let Some(ref val) = self.rptg_prd { val.validate()? }
105972		if let Some(ref val) = self.mthdlgy { val.validate()? }
105973		if let Some(ref val) = self.sttstcs { val.validate()? }
105974		if let Some(ref val) = self.rlvnt_mkt { val.validate()? }
105975		Ok(())
105976	}
105977}
105978
105979
105980// TransparencyDataReport20 ...
105981#[cfg_attr(feature = "derive_debug", derive(Debug))]
105982#[cfg_attr(feature = "derive_default", derive(Default))]
105983#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
105984#[cfg_attr(feature = "derive_clone", derive(Clone))]
105985#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
105986pub struct TransparencyDataReport20 {
105987	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
105988	pub tech_rcrd_id: Option<String>,
105989	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
105990	pub id: InstrumentOrSubClassIdentification2Choice,
105991	#[cfg_attr( feature = "derive_serde", serde(rename = "FullNm", skip_serializing_if = "Option::is_none") )]
105992	pub full_nm: Option<String>,
105993	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
105994	pub tradg_vn: Option<String>,
105995	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPrd", skip_serializing_if = "Option::is_none") )]
105996	pub rptg_prd: Option<Period4Choice>,
105997	#[cfg_attr( feature = "derive_serde", serde(rename = "Lqdty", skip_serializing_if = "Option::is_none") )]
105998	pub lqdty: Option<bool>,
105999	#[cfg_attr( feature = "derive_serde", serde(rename = "PreTradLrgInScaleThrshld", skip_serializing_if = "Option::is_none") )]
106000	pub pre_trad_lrg_in_scale_thrshld: Option<TonsOrCurrency2Choice>,
106001	#[cfg_attr( feature = "derive_serde", serde(rename = "PstTradLrgInScaleThrshld", skip_serializing_if = "Option::is_none") )]
106002	pub pst_trad_lrg_in_scale_thrshld: Option<TonsOrCurrency2Choice>,
106003	#[cfg_attr( feature = "derive_serde", serde(rename = "PreTradInstrmSzSpcfcThrshld", skip_serializing_if = "Option::is_none") )]
106004	pub pre_trad_instrm_sz_spcfc_thrshld: Option<TonsOrCurrency2Choice>,
106005	#[cfg_attr( feature = "derive_serde", serde(rename = "PstTradInstrmSzSpcfcThrshld", skip_serializing_if = "Option::is_none") )]
106006	pub pst_trad_instrm_sz_spcfc_thrshld: Option<TonsOrCurrency2Choice>,
106007	#[cfg_attr( feature = "derive_serde", serde(rename = "Sttstcs", skip_serializing_if = "Option::is_none") )]
106008	pub sttstcs: Option<StatisticsTransparency2>,
106009}
106010
106011impl TransparencyDataReport20 {
106012	pub fn validate(&self) -> Result<(), ValidationError> {
106013		if let Some(ref val) = self.tech_rcrd_id {
106014			if val.chars().count() < 1 {
106015				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
106016			}
106017			if val.chars().count() > 35 {
106018				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
106019			}
106020		}
106021		self.id.validate()?;
106022		if let Some(ref val) = self.full_nm {
106023			if val.chars().count() < 1 {
106024				return Err(ValidationError::new(1001, "full_nm is shorter than the minimum length of 1".to_string()));
106025			}
106026			if val.chars().count() > 350 {
106027				return Err(ValidationError::new(1002, "full_nm exceeds the maximum length of 350".to_string()));
106028			}
106029		}
106030		if let Some(ref val) = self.tradg_vn {
106031			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
106032			if !pattern.is_match(val) {
106033				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
106034			}
106035		}
106036		if let Some(ref val) = self.rptg_prd { val.validate()? }
106037		if let Some(ref val) = self.pre_trad_lrg_in_scale_thrshld { val.validate()? }
106038		if let Some(ref val) = self.pst_trad_lrg_in_scale_thrshld { val.validate()? }
106039		if let Some(ref val) = self.pre_trad_instrm_sz_spcfc_thrshld { val.validate()? }
106040		if let Some(ref val) = self.pst_trad_instrm_sz_spcfc_thrshld { val.validate()? }
106041		if let Some(ref val) = self.sttstcs { val.validate()? }
106042		Ok(())
106043	}
106044}
106045
106046
106047// TransparencyDataReport21 ...
106048#[cfg_attr(feature = "derive_debug", derive(Debug))]
106049#[cfg_attr(feature = "derive_default", derive(Default))]
106050#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106051#[cfg_attr(feature = "derive_clone", derive(Clone))]
106052#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106053pub struct TransparencyDataReport21 {
106054	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
106055	pub tech_rcrd_id: Option<String>,
106056	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
106057	pub id: String,
106058	#[cfg_attr( feature = "derive_serde", serde(rename = "FullNm", skip_serializing_if = "Option::is_none") )]
106059	pub full_nm: Option<String>,
106060	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
106061	pub tradg_vn: Option<String>,
106062	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgDt", skip_serializing_if = "Option::is_none") )]
106063	pub rptg_dt: Option<String>,
106064	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt", skip_serializing_if = "Option::is_none") )]
106065	pub mtrty_dt: Option<String>,
106066	#[cfg_attr( feature = "derive_serde", serde(rename = "FinInstrmClssfctn") )]
106067	pub fin_instrm_clssfctn: NonEquityInstrumentReportingClassification1Code,
106068	#[cfg_attr( feature = "derive_serde", serde(rename = "UndrlygInstrmAsstClss", skip_serializing_if = "Option::is_none") )]
106069	pub undrlyg_instrm_asst_clss: Option<String>,
106070	#[cfg_attr( feature = "derive_serde", serde(rename = "DerivCtrctTp", skip_serializing_if = "Option::is_none") )]
106071	pub deriv_ctrct_tp: Option<FinancialInstrumentContractType1Code>,
106072	#[cfg_attr( feature = "derive_serde", serde(rename = "Bd", skip_serializing_if = "Option::is_none") )]
106073	pub bd: Option<DebtInstrument5>,
106074	#[cfg_attr( feature = "derive_serde", serde(rename = "EmssnAllwncTp", skip_serializing_if = "Option::is_none") )]
106075	pub emssn_allwnc_tp: Option<String>,
106076	#[cfg_attr( feature = "derive_serde", serde(rename = "Deriv", skip_serializing_if = "Option::is_none") )]
106077	pub deriv: Option<Derivative3Choice>,
106078}
106079
106080impl TransparencyDataReport21 {
106081	pub fn validate(&self) -> Result<(), ValidationError> {
106082		if let Some(ref val) = self.tech_rcrd_id {
106083			if val.chars().count() < 1 {
106084				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
106085			}
106086			if val.chars().count() > 35 {
106087				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
106088			}
106089		}
106090		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
106091		if !pattern.is_match(&self.id) {
106092			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
106093		}
106094		if let Some(ref val) = self.full_nm {
106095			if val.chars().count() < 1 {
106096				return Err(ValidationError::new(1001, "full_nm is shorter than the minimum length of 1".to_string()));
106097			}
106098			if val.chars().count() > 350 {
106099				return Err(ValidationError::new(1002, "full_nm exceeds the maximum length of 350".to_string()));
106100			}
106101		}
106102		if let Some(ref val) = self.tradg_vn {
106103			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
106104			if !pattern.is_match(val) {
106105				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
106106			}
106107		}
106108		self.fin_instrm_clssfctn.validate()?;
106109		if let Some(ref val) = self.undrlyg_instrm_asst_clss {
106110			if val.chars().count() < 1 {
106111				return Err(ValidationError::new(1001, "undrlyg_instrm_asst_clss is shorter than the minimum length of 1".to_string()));
106112			}
106113			if val.chars().count() > 4 {
106114				return Err(ValidationError::new(1002, "undrlyg_instrm_asst_clss exceeds the maximum length of 4".to_string()));
106115			}
106116		}
106117		if let Some(ref val) = self.deriv_ctrct_tp { val.validate()? }
106118		if let Some(ref val) = self.bd { val.validate()? }
106119		if let Some(ref val) = self.emssn_allwnc_tp {
106120			if val.chars().count() < 1 {
106121				return Err(ValidationError::new(1001, "emssn_allwnc_tp is shorter than the minimum length of 1".to_string()));
106122			}
106123			if val.chars().count() > 4 {
106124				return Err(ValidationError::new(1002, "emssn_allwnc_tp exceeds the maximum length of 4".to_string()));
106125			}
106126		}
106127		if let Some(ref val) = self.deriv { val.validate()? }
106128		Ok(())
106129	}
106130}
106131
106132
106133// TransparencyMethodology2Code ...
106134#[cfg_attr(feature = "derive_debug", derive(Debug))]
106135#[cfg_attr(feature = "derive_default", derive(Default))]
106136#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106137#[cfg_attr(feature = "derive_clone", derive(Clone))]
106138#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106139pub enum TransparencyMethodology2Code {
106140	#[cfg_attr(feature = "derive_default", default)]
106141	#[cfg_attr( feature = "derive_serde", serde(rename = "YEAR") )]
106142	CodeYEAR,
106143	#[cfg_attr( feature = "derive_serde", serde(rename = "SINT") )]
106144	CodeSINT,
106145	#[cfg_attr( feature = "derive_serde", serde(rename = "FFWK") )]
106146	CodeFFWK,
106147	#[cfg_attr( feature = "derive_serde", serde(rename = "ESTM") )]
106148	CodeESTM,
106149}
106150
106151impl TransparencyMethodology2Code {
106152	pub fn validate(&self) -> Result<(), ValidationError> {
106153		Ok(())
106154	}
106155}
106156
106157
106158// TreasuryProfile1 ...
106159#[cfg_attr(feature = "derive_debug", derive(Debug))]
106160#[cfg_attr(feature = "derive_default", derive(Default))]
106161#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106162#[cfg_attr(feature = "derive_clone", derive(Clone))]
106163#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106164pub struct TreasuryProfile1 {
106165	#[cfg_attr( feature = "derive_serde", serde(rename = "Dt") )]
106166	pub dt: String,
106167	#[cfg_attr( feature = "derive_serde", serde(rename = "TradrTp") )]
106168	pub tradr_tp: PartyRole5Choice,
106169	#[cfg_attr( feature = "derive_serde", serde(rename = "Rate") )]
106170	pub rate: f64,
106171}
106172
106173impl TreasuryProfile1 {
106174	pub fn validate(&self) -> Result<(), ValidationError> {
106175		self.tradr_tp.validate()?;
106176		Ok(())
106177	}
106178}
106179
106180
106181// TripartyCollateralAndAmount1 ...
106182#[cfg_attr(feature = "derive_debug", derive(Debug))]
106183#[cfg_attr(feature = "derive_default", derive(Default))]
106184#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106185#[cfg_attr(feature = "derive_clone", derive(Clone))]
106186#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106187pub struct TripartyCollateralAndAmount1 {
106188	#[cfg_attr( feature = "derive_serde", serde(rename = "Trpty") )]
106189	pub trpty: ActiveCurrencyAndAmount,
106190	#[cfg_attr( feature = "derive_serde", serde(rename = "CollTp") )]
106191	pub coll_tp: CollateralType22Choice,
106192}
106193
106194impl TripartyCollateralAndAmount1 {
106195	pub fn validate(&self) -> Result<(), ValidationError> {
106196		self.trpty.validate()?;
106197		self.coll_tp.validate()?;
106198		Ok(())
106199	}
106200}
106201
106202
106203// TypeModification1 ...
106204#[cfg_attr(feature = "derive_debug", derive(Debug))]
106205#[cfg_attr(feature = "derive_default", derive(Default))]
106206#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106207#[cfg_attr(feature = "derive_clone", derive(Clone))]
106208#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106209pub struct TypeModification1 {
106210	#[cfg_attr( feature = "derive_serde", serde(rename = "ModCd", skip_serializing_if = "Option::is_none") )]
106211	pub mod_cd: Option<Modification1Code>,
106212	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
106213	pub tp: CashAccountType2Choice,
106214}
106215
106216impl TypeModification1 {
106217	pub fn validate(&self) -> Result<(), ValidationError> {
106218		if let Some(ref val) = self.mod_cd { val.validate()? }
106219		self.tp.validate()?;
106220		Ok(())
106221	}
106222}
106223
106224
106225// TypeOfPrice10Code ...
106226#[cfg_attr(feature = "derive_debug", derive(Debug))]
106227#[cfg_attr(feature = "derive_default", derive(Default))]
106228#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106229#[cfg_attr(feature = "derive_clone", derive(Clone))]
106230#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106231pub enum TypeOfPrice10Code {
106232	#[cfg_attr(feature = "derive_default", default)]
106233	#[cfg_attr( feature = "derive_serde", serde(rename = "BIDE") )]
106234	CodeBIDE,
106235	#[cfg_attr( feature = "derive_serde", serde(rename = "OFFR") )]
106236	CodeOFFR,
106237	#[cfg_attr( feature = "derive_serde", serde(rename = "NAVL") )]
106238	CodeNAVL,
106239	#[cfg_attr( feature = "derive_serde", serde(rename = "CREA") )]
106240	CodeCREA,
106241	#[cfg_attr( feature = "derive_serde", serde(rename = "CANC") )]
106242	CodeCANC,
106243	#[cfg_attr( feature = "derive_serde", serde(rename = "INTE") )]
106244	CodeINTE,
106245	#[cfg_attr( feature = "derive_serde", serde(rename = "SWNG") )]
106246	CodeSWNG,
106247	#[cfg_attr( feature = "derive_serde", serde(rename = "MIDD") )]
106248	CodeMIDD,
106249	#[cfg_attr( feature = "derive_serde", serde(rename = "RINV") )]
106250	CodeRINV,
106251	#[cfg_attr( feature = "derive_serde", serde(rename = "SWIC") )]
106252	CodeSWIC,
106253	#[cfg_attr( feature = "derive_serde", serde(rename = "DDVR") )]
106254	CodeDDVR,
106255	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTU") )]
106256	CodeACTU,
106257}
106258
106259impl TypeOfPrice10Code {
106260	pub fn validate(&self) -> Result<(), ValidationError> {
106261		Ok(())
106262	}
106263}
106264
106265
106266// TypeOfPrice1Code ...
106267#[cfg_attr(feature = "derive_debug", derive(Debug))]
106268#[cfg_attr(feature = "derive_default", derive(Default))]
106269#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106270#[cfg_attr(feature = "derive_clone", derive(Clone))]
106271#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106272pub enum TypeOfPrice1Code {
106273	#[cfg_attr(feature = "derive_default", default)]
106274	#[cfg_attr( feature = "derive_serde", serde(rename = "AVER") )]
106275	CodeAVER,
106276	#[cfg_attr( feature = "derive_serde", serde(rename = "AVOV") )]
106277	CodeAVOV,
106278	#[cfg_attr( feature = "derive_serde", serde(rename = "COMB") )]
106279	CodeCOMB,
106280	#[cfg_attr( feature = "derive_serde", serde(rename = "GREX") )]
106281	CodeGREX,
106282	#[cfg_attr( feature = "derive_serde", serde(rename = "LIMI") )]
106283	CodeLIMI,
106284	#[cfg_attr( feature = "derive_serde", serde(rename = "NET2") )]
106285	CodeNET2,
106286	#[cfg_attr( feature = "derive_serde", serde(rename = "NDIS") )]
106287	CodeNDIS,
106288	#[cfg_attr( feature = "derive_serde", serde(rename = "NET1") )]
106289	CodeNET1,
106290	#[cfg_attr( feature = "derive_serde", serde(rename = "NUND") )]
106291	CodeNUND,
106292	#[cfg_attr( feature = "derive_serde", serde(rename = "NOGR") )]
106293	CodeNOGR,
106294	#[cfg_attr( feature = "derive_serde", serde(rename = "PARV") )]
106295	CodePARV,
106296	#[cfg_attr( feature = "derive_serde", serde(rename = "RDAV") )]
106297	CodeRDAV,
106298	#[cfg_attr( feature = "derive_serde", serde(rename = "STOP") )]
106299	CodeSTOP,
106300}
106301
106302impl TypeOfPrice1Code {
106303	pub fn validate(&self) -> Result<(), ValidationError> {
106304		Ok(())
106305	}
106306}
106307
106308
106309// TypeOfPrice6Code ...
106310#[cfg_attr(feature = "derive_debug", derive(Debug))]
106311#[cfg_attr(feature = "derive_default", derive(Default))]
106312#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106313#[cfg_attr(feature = "derive_clone", derive(Clone))]
106314#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106315pub enum TypeOfPrice6Code {
106316	#[cfg_attr(feature = "derive_default", default)]
106317	#[cfg_attr( feature = "derive_serde", serde(rename = "BIDE") )]
106318	CodeBIDE,
106319	#[cfg_attr( feature = "derive_serde", serde(rename = "OFFR") )]
106320	CodeOFFR,
106321	#[cfg_attr( feature = "derive_serde", serde(rename = "NAVL") )]
106322	CodeNAVL,
106323	#[cfg_attr( feature = "derive_serde", serde(rename = "CREA") )]
106324	CodeCREA,
106325	#[cfg_attr( feature = "derive_serde", serde(rename = "CANC") )]
106326	CodeCANC,
106327	#[cfg_attr( feature = "derive_serde", serde(rename = "INTE") )]
106328	CodeINTE,
106329	#[cfg_attr( feature = "derive_serde", serde(rename = "SWNG") )]
106330	CodeSWNG,
106331	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
106332	CodeOTHR,
106333	#[cfg_attr( feature = "derive_serde", serde(rename = "MIDD") )]
106334	CodeMIDD,
106335	#[cfg_attr( feature = "derive_serde", serde(rename = "RINV") )]
106336	CodeRINV,
106337	#[cfg_attr( feature = "derive_serde", serde(rename = "SWIC") )]
106338	CodeSWIC,
106339	#[cfg_attr( feature = "derive_serde", serde(rename = "DDVR") )]
106340	CodeDDVR,
106341	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTU") )]
106342	CodeACTU,
106343	#[cfg_attr( feature = "derive_serde", serde(rename = "NAUP") )]
106344	CodeNAUP,
106345}
106346
106347impl TypeOfPrice6Code {
106348	pub fn validate(&self) -> Result<(), ValidationError> {
106349		Ok(())
106350	}
106351}
106352
106353
106354// TypeOfPrice9Code ...
106355#[cfg_attr(feature = "derive_debug", derive(Debug))]
106356#[cfg_attr(feature = "derive_default", derive(Default))]
106357#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106358#[cfg_attr(feature = "derive_clone", derive(Clone))]
106359#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106360pub enum TypeOfPrice9Code {
106361	#[cfg_attr(feature = "derive_default", default)]
106362	#[cfg_attr( feature = "derive_serde", serde(rename = "BIDE") )]
106363	CodeBIDE,
106364	#[cfg_attr( feature = "derive_serde", serde(rename = "OFFR") )]
106365	CodeOFFR,
106366	#[cfg_attr( feature = "derive_serde", serde(rename = "NAVL") )]
106367	CodeNAVL,
106368	#[cfg_attr( feature = "derive_serde", serde(rename = "CREA") )]
106369	CodeCREA,
106370	#[cfg_attr( feature = "derive_serde", serde(rename = "CANC") )]
106371	CodeCANC,
106372	#[cfg_attr( feature = "derive_serde", serde(rename = "INTE") )]
106373	CodeINTE,
106374	#[cfg_attr( feature = "derive_serde", serde(rename = "SWNG") )]
106375	CodeSWNG,
106376	#[cfg_attr( feature = "derive_serde", serde(rename = "MIDD") )]
106377	CodeMIDD,
106378	#[cfg_attr( feature = "derive_serde", serde(rename = "RINV") )]
106379	CodeRINV,
106380	#[cfg_attr( feature = "derive_serde", serde(rename = "SWIC") )]
106381	CodeSWIC,
106382	#[cfg_attr( feature = "derive_serde", serde(rename = "DDVR") )]
106383	CodeDDVR,
106384	#[cfg_attr( feature = "derive_serde", serde(rename = "ACTU") )]
106385	CodeACTU,
106386	#[cfg_attr( feature = "derive_serde", serde(rename = "NAUP") )]
106387	CodeNAUP,
106388	#[cfg_attr( feature = "derive_serde", serde(rename = "GUAR") )]
106389	CodeGUAR,
106390	#[cfg_attr( feature = "derive_serde", serde(rename = "ENAV") )]
106391	CodeENAV,
106392}
106393
106394impl TypeOfPrice9Code {
106395	pub fn validate(&self) -> Result<(), ValidationError> {
106396		Ok(())
106397	}
106398}
106399
106400
106401// UPIQueryCriteria1 ...
106402#[cfg_attr(feature = "derive_debug", derive(Debug))]
106403#[cfg_attr(feature = "derive_default", derive(Default))]
106404#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106405#[cfg_attr(feature = "derive_clone", derive(Clone))]
106406#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106407pub struct UPIQueryCriteria1 {
106408	#[cfg_attr( feature = "derive_serde", serde(rename = "Idr", skip_serializing_if = "Option::is_none") )]
106409	pub idr: Option<Vec<String>>,
106410	#[cfg_attr( feature = "derive_serde", serde(rename = "NotRptd", skip_serializing_if = "Option::is_none") )]
106411	pub not_rptd: Option<NotReported1Code>,
106412}
106413
106414impl UPIQueryCriteria1 {
106415	pub fn validate(&self) -> Result<(), ValidationError> {
106416		if let Some(ref vec) = self.idr {
106417			for item in vec {
106418				if item.chars().count() < 1 {
106419					return Err(ValidationError::new(1001, "idr is shorter than the minimum length of 1".to_string()));
106420				}
106421				if item.chars().count() > 52 {
106422					return Err(ValidationError::new(1002, "idr exceeds the maximum length of 52".to_string()));
106423				}
106424			}
106425		}
106426		if let Some(ref val) = self.not_rptd { val.validate()? }
106427		Ok(())
106428	}
106429}
106430
106431
106432// UTCOffset1 ...
106433#[cfg_attr(feature = "derive_debug", derive(Debug))]
106434#[cfg_attr(feature = "derive_default", derive(Default))]
106435#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106436#[cfg_attr(feature = "derive_clone", derive(Clone))]
106437#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106438pub struct UTCOffset1 {
106439	#[cfg_attr( feature = "derive_serde", serde(rename = "Sgn") )]
106440	pub sgn: bool,
106441	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfHrs") )]
106442	pub nb_of_hrs: String,
106443}
106444
106445impl UTCOffset1 {
106446	pub fn validate(&self) -> Result<(), ValidationError> {
106447		Ok(())
106448	}
106449}
106450
106451
106452// UnableToApplyIncorrect2 ...
106453#[cfg_attr(feature = "derive_debug", derive(Debug))]
106454#[cfg_attr(feature = "derive_default", derive(Default))]
106455#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106456#[cfg_attr(feature = "derive_clone", derive(Clone))]
106457#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106458pub struct UnableToApplyIncorrect2 {
106459	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
106460	pub tp: IncorrectData1Choice,
106461	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlIncrrctInf", skip_serializing_if = "Option::is_none") )]
106462	pub addtl_incrrct_inf: Option<String>,
106463}
106464
106465impl UnableToApplyIncorrect2 {
106466	pub fn validate(&self) -> Result<(), ValidationError> {
106467		self.tp.validate()?;
106468		if let Some(ref val) = self.addtl_incrrct_inf {
106469			if val.chars().count() < 1 {
106470				return Err(ValidationError::new(1001, "addtl_incrrct_inf is shorter than the minimum length of 1".to_string()));
106471			}
106472			if val.chars().count() > 140 {
106473				return Err(ValidationError::new(1002, "addtl_incrrct_inf exceeds the maximum length of 140".to_string()));
106474			}
106475		}
106476		Ok(())
106477	}
106478}
106479
106480
106481// UnableToApplyJustification4Choice ...
106482#[cfg_attr(feature = "derive_debug", derive(Debug))]
106483#[cfg_attr(feature = "derive_default", derive(Default))]
106484#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106485#[cfg_attr(feature = "derive_clone", derive(Clone))]
106486#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106487pub struct UnableToApplyJustification4Choice {
106488	#[cfg_attr( feature = "derive_serde", serde(rename = "AnyInf", skip_serializing_if = "Option::is_none") )]
106489	pub any_inf: Option<bool>,
106490	#[cfg_attr( feature = "derive_serde", serde(rename = "MssngOrIncrrctInf", skip_serializing_if = "Option::is_none") )]
106491	pub mssng_or_incrrct_inf: Option<MissingOrIncorrectData1>,
106492	#[cfg_attr( feature = "derive_serde", serde(rename = "PssblDplctInstr", skip_serializing_if = "Option::is_none") )]
106493	pub pssbl_dplct_instr: Option<bool>,
106494}
106495
106496impl UnableToApplyJustification4Choice {
106497	pub fn validate(&self) -> Result<(), ValidationError> {
106498		if let Some(ref val) = self.mssng_or_incrrct_inf { val.validate()? }
106499		Ok(())
106500	}
106501}
106502
106503
106504// UnableToApplyMissing2 ...
106505#[cfg_attr(feature = "derive_debug", derive(Debug))]
106506#[cfg_attr(feature = "derive_default", derive(Default))]
106507#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106508#[cfg_attr(feature = "derive_clone", derive(Clone))]
106509#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106510pub struct UnableToApplyMissing2 {
106511	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp") )]
106512	pub tp: MissingData1Choice,
106513	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlMssngInf", skip_serializing_if = "Option::is_none") )]
106514	pub addtl_mssng_inf: Option<String>,
106515}
106516
106517impl UnableToApplyMissing2 {
106518	pub fn validate(&self) -> Result<(), ValidationError> {
106519		self.tp.validate()?;
106520		if let Some(ref val) = self.addtl_mssng_inf {
106521			if val.chars().count() < 1 {
106522				return Err(ValidationError::new(1001, "addtl_mssng_inf is shorter than the minimum length of 1".to_string()));
106523			}
106524			if val.chars().count() > 140 {
106525				return Err(ValidationError::new(1002, "addtl_mssng_inf exceeds the maximum length of 140".to_string()));
106526			}
106527		}
106528		Ok(())
106529	}
106530}
106531
106532
106533// UnderlyingAttributes4 ...
106534#[cfg_attr(feature = "derive_debug", derive(Debug))]
106535#[cfg_attr(feature = "derive_default", derive(Default))]
106536#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106537#[cfg_attr(feature = "derive_clone", derive(Clone))]
106538#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106539pub struct UnderlyingAttributes4 {
106540	#[cfg_attr( feature = "derive_serde", serde(rename = "AllcnPctg", skip_serializing_if = "Option::is_none") )]
106541	pub allcn_pctg: Option<f64>,
106542	#[cfg_attr( feature = "derive_serde", serde(rename = "Qty", skip_serializing_if = "Option::is_none") )]
106543	pub qty: Option<UnitOrFaceAmount1Choice>,
106544	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmTp", skip_serializing_if = "Option::is_none") )]
106545	pub sttlm_tp: Option<SettlementType3Choice>,
106546	#[cfg_attr( feature = "derive_serde", serde(rename = "CshAmt", skip_serializing_if = "Option::is_none") )]
106547	pub csh_amt: Option<ActiveCurrencyAndAmount>,
106548	#[cfg_attr( feature = "derive_serde", serde(rename = "CshTp", skip_serializing_if = "Option::is_none") )]
106549	pub csh_tp: Option<String>,
106550	#[cfg_attr( feature = "derive_serde", serde(rename = "Pric", skip_serializing_if = "Option::is_none") )]
106551	pub pric: Option<Price8>,
106552	#[cfg_attr( feature = "derive_serde", serde(rename = "DrtyPric", skip_serializing_if = "Option::is_none") )]
106553	pub drty_pric: Option<Price8>,
106554	#[cfg_attr( feature = "derive_serde", serde(rename = "EndPric", skip_serializing_if = "Option::is_none") )]
106555	pub end_pric: Option<Price8>,
106556	#[cfg_attr( feature = "derive_serde", serde(rename = "StartVal", skip_serializing_if = "Option::is_none") )]
106557	pub start_val: Option<ActiveCurrencyAndAmount>,
106558	#[cfg_attr( feature = "derive_serde", serde(rename = "CurVal", skip_serializing_if = "Option::is_none") )]
106559	pub cur_val: Option<ActiveCurrencyAndAmount>,
106560	#[cfg_attr( feature = "derive_serde", serde(rename = "EndVal", skip_serializing_if = "Option::is_none") )]
106561	pub end_val: Option<ActiveCurrencyAndAmount>,
106562	#[cfg_attr( feature = "derive_serde", serde(rename = "AdjstdQty", skip_serializing_if = "Option::is_none") )]
106563	pub adjstd_qty: Option<UnitOrFaceAmount1Choice>,
106564	#[cfg_attr( feature = "derive_serde", serde(rename = "XchgRate", skip_serializing_if = "Option::is_none") )]
106565	pub xchg_rate: Option<f64>,
106566	#[cfg_attr( feature = "derive_serde", serde(rename = "CapVal", skip_serializing_if = "Option::is_none") )]
106567	pub cap_val: Option<ActiveCurrencyAndAmount>,
106568}
106569
106570impl UnderlyingAttributes4 {
106571	pub fn validate(&self) -> Result<(), ValidationError> {
106572		if let Some(ref val) = self.qty { val.validate()? }
106573		if let Some(ref val) = self.sttlm_tp { val.validate()? }
106574		if let Some(ref val) = self.csh_amt { val.validate()? }
106575		if let Some(ref val) = self.csh_tp {
106576			if val.chars().count() < 1 {
106577				return Err(ValidationError::new(1001, "csh_tp is shorter than the minimum length of 1".to_string()));
106578			}
106579			if val.chars().count() > 35 {
106580				return Err(ValidationError::new(1002, "csh_tp exceeds the maximum length of 35".to_string()));
106581			}
106582		}
106583		if let Some(ref val) = self.pric { val.validate()? }
106584		if let Some(ref val) = self.drty_pric { val.validate()? }
106585		if let Some(ref val) = self.end_pric { val.validate()? }
106586		if let Some(ref val) = self.start_val { val.validate()? }
106587		if let Some(ref val) = self.cur_val { val.validate()? }
106588		if let Some(ref val) = self.end_val { val.validate()? }
106589		if let Some(ref val) = self.adjstd_qty { val.validate()? }
106590		if let Some(ref val) = self.cap_val { val.validate()? }
106591		Ok(())
106592	}
106593}
106594
106595
106596// UnderlyingContract4Choice ...
106597#[cfg_attr(feature = "derive_debug", derive(Debug))]
106598#[cfg_attr(feature = "derive_default", derive(Default))]
106599#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106600#[cfg_attr(feature = "derive_clone", derive(Clone))]
106601#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106602pub struct UnderlyingContract4Choice {
106603	#[cfg_attr( feature = "derive_serde", serde(rename = "Ln", skip_serializing_if = "Option::is_none") )]
106604	pub ln: Option<LoanContract4>,
106605	#[cfg_attr( feature = "derive_serde", serde(rename = "Trad", skip_serializing_if = "Option::is_none") )]
106606	pub trad: Option<TradeContract4>,
106607}
106608
106609impl UnderlyingContract4Choice {
106610	pub fn validate(&self) -> Result<(), ValidationError> {
106611		if let Some(ref val) = self.ln { val.validate()? }
106612		if let Some(ref val) = self.trad { val.validate()? }
106613		Ok(())
106614	}
106615}
106616
106617
106618// UnderlyingContractForDifferenceType3Code ...
106619#[cfg_attr(feature = "derive_debug", derive(Debug))]
106620#[cfg_attr(feature = "derive_default", derive(Default))]
106621#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106622#[cfg_attr(feature = "derive_clone", derive(Clone))]
106623#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106624pub enum UnderlyingContractForDifferenceType3Code {
106625	#[cfg_attr(feature = "derive_default", default)]
106626	#[cfg_attr( feature = "derive_serde", serde(rename = "BOND") )]
106627	CodeBOND,
106628	#[cfg_attr( feature = "derive_serde", serde(rename = "COMM") )]
106629	CodeCOMM,
106630	#[cfg_attr( feature = "derive_serde", serde(rename = "CURR") )]
106631	CodeCURR,
106632	#[cfg_attr( feature = "derive_serde", serde(rename = "EMAL") )]
106633	CodeEMAL,
106634	#[cfg_attr( feature = "derive_serde", serde(rename = "EQUI") )]
106635	CodeEQUI,
106636	#[cfg_attr( feature = "derive_serde", serde(rename = "FTEQ") )]
106637	CodeFTEQ,
106638	#[cfg_attr( feature = "derive_serde", serde(rename = "OPEQ") )]
106639	CodeOPEQ,
106640	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
106641	CodeOTHR,
106642}
106643
106644impl UnderlyingContractForDifferenceType3Code {
106645	pub fn validate(&self) -> Result<(), ValidationError> {
106646		Ok(())
106647	}
106648}
106649
106650
106651// UnderlyingData2Choice ...
106652#[cfg_attr(feature = "derive_debug", derive(Debug))]
106653#[cfg_attr(feature = "derive_default", derive(Default))]
106654#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106655#[cfg_attr(feature = "derive_clone", derive(Clone))]
106656#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106657pub struct UnderlyingData2Choice {
106658	#[cfg_attr( feature = "derive_serde", serde(rename = "Initn", skip_serializing_if = "Option::is_none") )]
106659	pub initn: Option<UnderlyingPaymentInstruction8>,
106660	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBk", skip_serializing_if = "Option::is_none") )]
106661	pub intr_bk: Option<UnderlyingPaymentTransaction7>,
106662	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtNtry", skip_serializing_if = "Option::is_none") )]
106663	pub stmt_ntry: Option<UnderlyingStatementEntry5>,
106664	#[cfg_attr( feature = "derive_serde", serde(rename = "Acct", skip_serializing_if = "Option::is_none") )]
106665	pub acct: Option<CashAccount40>,
106666	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
106667	pub othr: Option<GenericIdentification1>,
106668}
106669
106670impl UnderlyingData2Choice {
106671	pub fn validate(&self) -> Result<(), ValidationError> {
106672		if let Some(ref val) = self.initn { val.validate()? }
106673		if let Some(ref val) = self.intr_bk { val.validate()? }
106674		if let Some(ref val) = self.stmt_ntry { val.validate()? }
106675		if let Some(ref val) = self.acct { val.validate()? }
106676		if let Some(ref val) = self.othr { val.validate()? }
106677		Ok(())
106678	}
106679}
106680
106681
106682// UnderlyingEquityType3Code ...
106683#[cfg_attr(feature = "derive_debug", derive(Debug))]
106684#[cfg_attr(feature = "derive_default", derive(Default))]
106685#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106686#[cfg_attr(feature = "derive_clone", derive(Clone))]
106687#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106688pub enum UnderlyingEquityType3Code {
106689	#[cfg_attr(feature = "derive_default", default)]
106690	#[cfg_attr( feature = "derive_serde", serde(rename = "BSKT") )]
106691	CodeBSKT,
106692}
106693
106694impl UnderlyingEquityType3Code {
106695	pub fn validate(&self) -> Result<(), ValidationError> {
106696		Ok(())
106697	}
106698}
106699
106700
106701// UnderlyingEquityType4Code ...
106702#[cfg_attr(feature = "derive_debug", derive(Debug))]
106703#[cfg_attr(feature = "derive_default", derive(Default))]
106704#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106705#[cfg_attr(feature = "derive_clone", derive(Clone))]
106706#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106707pub enum UnderlyingEquityType4Code {
106708	#[cfg_attr(feature = "derive_default", default)]
106709	#[cfg_attr( feature = "derive_serde", serde(rename = "STIX") )]
106710	CodeSTIX,
106711	#[cfg_attr( feature = "derive_serde", serde(rename = "DIVI") )]
106712	CodeDIVI,
106713	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
106714	CodeOTHR,
106715	#[cfg_attr( feature = "derive_serde", serde(rename = "VOLI") )]
106716	CodeVOLI,
106717}
106718
106719impl UnderlyingEquityType4Code {
106720	pub fn validate(&self) -> Result<(), ValidationError> {
106721		Ok(())
106722	}
106723}
106724
106725
106726// UnderlyingEquityType5Code ...
106727#[cfg_attr(feature = "derive_debug", derive(Debug))]
106728#[cfg_attr(feature = "derive_default", derive(Default))]
106729#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106730#[cfg_attr(feature = "derive_clone", derive(Clone))]
106731#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106732pub enum UnderlyingEquityType5Code {
106733	#[cfg_attr(feature = "derive_default", default)]
106734	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
106735	CodeOTHR,
106736	#[cfg_attr( feature = "derive_serde", serde(rename = "ETFS") )]
106737	CodeETFS,
106738	#[cfg_attr( feature = "derive_serde", serde(rename = "SHRS") )]
106739	CodeSHRS,
106740	#[cfg_attr( feature = "derive_serde", serde(rename = "DVSE") )]
106741	CodeDVSE,
106742}
106743
106744impl UnderlyingEquityType5Code {
106745	pub fn validate(&self) -> Result<(), ValidationError> {
106746		Ok(())
106747	}
106748}
106749
106750
106751// UnderlyingEquityType6Code ...
106752#[cfg_attr(feature = "derive_debug", derive(Debug))]
106753#[cfg_attr(feature = "derive_default", derive(Default))]
106754#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106755#[cfg_attr(feature = "derive_clone", derive(Clone))]
106756#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106757pub enum UnderlyingEquityType6Code {
106758	#[cfg_attr(feature = "derive_default", default)]
106759	#[cfg_attr( feature = "derive_serde", serde(rename = "BSKT") )]
106760	CodeBSKT,
106761	#[cfg_attr( feature = "derive_serde", serde(rename = "DIVI") )]
106762	CodeDIVI,
106763	#[cfg_attr( feature = "derive_serde", serde(rename = "ETFS") )]
106764	CodeETFS,
106765	#[cfg_attr( feature = "derive_serde", serde(rename = "OTHR") )]
106766	CodeOTHR,
106767	#[cfg_attr( feature = "derive_serde", serde(rename = "SHRS") )]
106768	CodeSHRS,
106769	#[cfg_attr( feature = "derive_serde", serde(rename = "DVSE") )]
106770	CodeDVSE,
106771	#[cfg_attr( feature = "derive_serde", serde(rename = "STIX") )]
106772	CodeSTIX,
106773	#[cfg_attr( feature = "derive_serde", serde(rename = "VOLI") )]
106774	CodeVOLI,
106775}
106776
106777impl UnderlyingEquityType6Code {
106778	pub fn validate(&self) -> Result<(), ValidationError> {
106779		Ok(())
106780	}
106781}
106782
106783
106784// UnderlyingGroupInformation1 ...
106785#[cfg_attr(feature = "derive_debug", derive(Debug))]
106786#[cfg_attr(feature = "derive_default", derive(Default))]
106787#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106788#[cfg_attr(feature = "derive_clone", derive(Clone))]
106789#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106790pub struct UnderlyingGroupInformation1 {
106791	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgId") )]
106792	pub orgnl_msg_id: String,
106793	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgNmId") )]
106794	pub orgnl_msg_nm_id: String,
106795	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlCreDtTm", skip_serializing_if = "Option::is_none") )]
106796	pub orgnl_cre_dt_tm: Option<String>,
106797	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlMsgDlvryChanl", skip_serializing_if = "Option::is_none") )]
106798	pub orgnl_msg_dlvry_chanl: Option<String>,
106799}
106800
106801impl UnderlyingGroupInformation1 {
106802	pub fn validate(&self) -> Result<(), ValidationError> {
106803		if self.orgnl_msg_id.chars().count() < 1 {
106804			return Err(ValidationError::new(1001, "orgnl_msg_id is shorter than the minimum length of 1".to_string()));
106805		}
106806		if self.orgnl_msg_id.chars().count() > 35 {
106807			return Err(ValidationError::new(1002, "orgnl_msg_id exceeds the maximum length of 35".to_string()));
106808		}
106809		if self.orgnl_msg_nm_id.chars().count() < 1 {
106810			return Err(ValidationError::new(1001, "orgnl_msg_nm_id is shorter than the minimum length of 1".to_string()));
106811		}
106812		if self.orgnl_msg_nm_id.chars().count() > 35 {
106813			return Err(ValidationError::new(1002, "orgnl_msg_nm_id exceeds the maximum length of 35".to_string()));
106814		}
106815		if let Some(ref val) = self.orgnl_msg_dlvry_chanl {
106816			if val.chars().count() < 1 {
106817				return Err(ValidationError::new(1001, "orgnl_msg_dlvry_chanl is shorter than the minimum length of 1".to_string()));
106818			}
106819			if val.chars().count() > 35 {
106820				return Err(ValidationError::new(1002, "orgnl_msg_dlvry_chanl exceeds the maximum length of 35".to_string()));
106821			}
106822		}
106823		Ok(())
106824	}
106825}
106826
106827
106828// UnderlyingIdentification1Code ...
106829#[cfg_attr(feature = "derive_debug", derive(Debug))]
106830#[cfg_attr(feature = "derive_default", derive(Default))]
106831#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106832#[cfg_attr(feature = "derive_clone", derive(Clone))]
106833#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106834pub enum UnderlyingIdentification1Code {
106835	#[cfg_attr(feature = "derive_default", default)]
106836	#[cfg_attr( feature = "derive_serde", serde(rename = "UKWN") )]
106837	CodeUKWN,
106838	#[cfg_attr( feature = "derive_serde", serde(rename = "BSKT") )]
106839	CodeBSKT,
106840	#[cfg_attr( feature = "derive_serde", serde(rename = "INDX") )]
106841	CodeINDX,
106842}
106843
106844impl UnderlyingIdentification1Code {
106845	pub fn validate(&self) -> Result<(), ValidationError> {
106846		Ok(())
106847	}
106848}
106849
106850
106851// UnderlyingIdentification2Choice ...
106852#[cfg_attr(feature = "derive_debug", derive(Debug))]
106853#[cfg_attr(feature = "derive_default", derive(Default))]
106854#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106855#[cfg_attr(feature = "derive_clone", derive(Clone))]
106856#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106857pub struct UnderlyingIdentification2Choice {
106858	#[cfg_attr( feature = "derive_serde", serde(rename = "Swp", skip_serializing_if = "Option::is_none") )]
106859	pub swp: Option<SwapLegIdentification2>,
106860	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
106861	pub othr: Option<FinancialInstrumentIdentification7Choice>,
106862}
106863
106864impl UnderlyingIdentification2Choice {
106865	pub fn validate(&self) -> Result<(), ValidationError> {
106866		if let Some(ref val) = self.swp { val.validate()? }
106867		if let Some(ref val) = self.othr { val.validate()? }
106868		Ok(())
106869	}
106870}
106871
106872
106873// UnderlyingInterestRateType3Code ...
106874#[cfg_attr(feature = "derive_debug", derive(Debug))]
106875#[cfg_attr(feature = "derive_default", derive(Default))]
106876#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106877#[cfg_attr(feature = "derive_clone", derive(Clone))]
106878#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106879pub enum UnderlyingInterestRateType3Code {
106880	#[cfg_attr(feature = "derive_default", default)]
106881	#[cfg_attr( feature = "derive_serde", serde(rename = "BOND") )]
106882	CodeBOND,
106883	#[cfg_attr( feature = "derive_serde", serde(rename = "BNDF") )]
106884	CodeBNDF,
106885	#[cfg_attr( feature = "derive_serde", serde(rename = "INTR") )]
106886	CodeINTR,
106887	#[cfg_attr( feature = "derive_serde", serde(rename = "IFUT") )]
106888	CodeIFUT,
106889}
106890
106891impl UnderlyingInterestRateType3Code {
106892	pub fn validate(&self) -> Result<(), ValidationError> {
106893		Ok(())
106894	}
106895}
106896
106897
106898// UnderlyingInvestigationInstrument1Choice ...
106899#[cfg_attr(feature = "derive_debug", derive(Debug))]
106900#[cfg_attr(feature = "derive_default", derive(Default))]
106901#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106902#[cfg_attr(feature = "derive_clone", derive(Clone))]
106903#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106904pub struct UnderlyingInvestigationInstrument1Choice {
106905	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
106906	pub cd: Option<String>,
106907	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
106908	pub prtry: Option<String>,
106909}
106910
106911impl UnderlyingInvestigationInstrument1Choice {
106912	pub fn validate(&self) -> Result<(), ValidationError> {
106913		if let Some(ref val) = self.cd {
106914			if val.chars().count() < 1 {
106915				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
106916			}
106917			if val.chars().count() > 4 {
106918				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
106919			}
106920		}
106921		if let Some(ref val) = self.prtry {
106922			if val.chars().count() < 1 {
106923				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
106924			}
106925			if val.chars().count() > 35 {
106926				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
106927			}
106928		}
106929		Ok(())
106930	}
106931}
106932
106933
106934// UnderlyingPaymentInstruction8 ...
106935#[cfg_attr(feature = "derive_debug", derive(Debug))]
106936#[cfg_attr(feature = "derive_default", derive(Default))]
106937#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
106938#[cfg_attr(feature = "derive_clone", derive(Clone))]
106939#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
106940pub struct UnderlyingPaymentInstruction8 {
106941	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
106942	pub orgnl_grp_inf: Option<UnderlyingGroupInformation1>,
106943	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPmtInfId", skip_serializing_if = "Option::is_none") )]
106944	pub orgnl_pmt_inf_id: Option<String>,
106945	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
106946	pub orgnl_instr_id: Option<String>,
106947	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
106948	pub orgnl_end_to_end_id: Option<String>,
106949	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
106950	pub orgnl_uetr: Option<String>,
106951	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstdAmt", skip_serializing_if = "Option::is_none") )]
106952	pub orgnl_instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
106953	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
106954	pub reqd_exctn_dt: Option<DateAndDateTime2Choice>,
106955	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdColltnDt", skip_serializing_if = "Option::is_none") )]
106956	pub reqd_colltn_dt: Option<String>,
106957	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
106958	pub orgnl_tx_ref: Option<OriginalTransactionReference35>,
106959	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlSvcLvl", skip_serializing_if = "Option::is_none") )]
106960	pub orgnl_svc_lvl: Option<ServiceLevel8Choice>,
106961}
106962
106963impl UnderlyingPaymentInstruction8 {
106964	pub fn validate(&self) -> Result<(), ValidationError> {
106965		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
106966		if let Some(ref val) = self.orgnl_pmt_inf_id {
106967			if val.chars().count() < 1 {
106968				return Err(ValidationError::new(1001, "orgnl_pmt_inf_id is shorter than the minimum length of 1".to_string()));
106969			}
106970			if val.chars().count() > 35 {
106971				return Err(ValidationError::new(1002, "orgnl_pmt_inf_id exceeds the maximum length of 35".to_string()));
106972			}
106973		}
106974		if let Some(ref val) = self.orgnl_instr_id {
106975			if val.chars().count() < 1 {
106976				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
106977			}
106978			if val.chars().count() > 35 {
106979				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
106980			}
106981		}
106982		if let Some(ref val) = self.orgnl_end_to_end_id {
106983			if val.chars().count() < 1 {
106984				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
106985			}
106986			if val.chars().count() > 35 {
106987				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
106988			}
106989		}
106990		if let Some(ref val) = self.orgnl_uetr {
106991			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
106992			if !pattern.is_match(val) {
106993				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
106994			}
106995		}
106996		if let Some(ref val) = self.orgnl_instd_amt { val.validate()? }
106997		if let Some(ref val) = self.reqd_exctn_dt { val.validate()? }
106998		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
106999		if let Some(ref val) = self.orgnl_svc_lvl { val.validate()? }
107000		Ok(())
107001	}
107002}
107003
107004
107005// UnderlyingPaymentInstruction9 ...
107006#[cfg_attr(feature = "derive_debug", derive(Debug))]
107007#[cfg_attr(feature = "derive_default", derive(Default))]
107008#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107009#[cfg_attr(feature = "derive_clone", derive(Clone))]
107010#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107011pub struct UnderlyingPaymentInstruction9 {
107012	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
107013	pub orgnl_grp_inf: Option<UnderlyingGroupInformation1>,
107014	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPmtInfId", skip_serializing_if = "Option::is_none") )]
107015	pub orgnl_pmt_inf_id: Option<String>,
107016	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
107017	pub orgnl_instr_id: Option<String>,
107018	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
107019	pub orgnl_end_to_end_id: Option<String>,
107020	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
107021	pub orgnl_uetr: Option<String>,
107022	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstdAmt", skip_serializing_if = "Option::is_none") )]
107023	pub orgnl_instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
107024	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdExctnDt", skip_serializing_if = "Option::is_none") )]
107025	pub reqd_exctn_dt: Option<DateAndDateTime2Choice>,
107026	#[cfg_attr( feature = "derive_serde", serde(rename = "ReqdColltnDt", skip_serializing_if = "Option::is_none") )]
107027	pub reqd_colltn_dt: Option<String>,
107028	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
107029	pub orgnl_tx_ref: Option<OriginalTransactionReference42>,
107030	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlSvcLvl", skip_serializing_if = "Option::is_none") )]
107031	pub orgnl_svc_lvl: Option<ServiceLevel8Choice>,
107032}
107033
107034impl UnderlyingPaymentInstruction9 {
107035	pub fn validate(&self) -> Result<(), ValidationError> {
107036		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
107037		if let Some(ref val) = self.orgnl_pmt_inf_id {
107038			if val.chars().count() < 1 {
107039				return Err(ValidationError::new(1001, "orgnl_pmt_inf_id is shorter than the minimum length of 1".to_string()));
107040			}
107041			if val.chars().count() > 35 {
107042				return Err(ValidationError::new(1002, "orgnl_pmt_inf_id exceeds the maximum length of 35".to_string()));
107043			}
107044		}
107045		if let Some(ref val) = self.orgnl_instr_id {
107046			if val.chars().count() < 1 {
107047				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
107048			}
107049			if val.chars().count() > 35 {
107050				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
107051			}
107052		}
107053		if let Some(ref val) = self.orgnl_end_to_end_id {
107054			if val.chars().count() < 1 {
107055				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
107056			}
107057			if val.chars().count() > 35 {
107058				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
107059			}
107060		}
107061		if let Some(ref val) = self.orgnl_uetr {
107062			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
107063			if !pattern.is_match(val) {
107064				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
107065			}
107066		}
107067		if let Some(ref val) = self.orgnl_instd_amt { val.validate()? }
107068		if let Some(ref val) = self.reqd_exctn_dt { val.validate()? }
107069		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
107070		if let Some(ref val) = self.orgnl_svc_lvl { val.validate()? }
107071		Ok(())
107072	}
107073}
107074
107075
107076// UnderlyingPaymentTransaction7 ...
107077#[cfg_attr(feature = "derive_debug", derive(Debug))]
107078#[cfg_attr(feature = "derive_default", derive(Default))]
107079#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107080#[cfg_attr(feature = "derive_clone", derive(Clone))]
107081#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107082pub struct UnderlyingPaymentTransaction7 {
107083	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
107084	pub orgnl_grp_inf: Option<UnderlyingGroupInformation1>,
107085	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
107086	pub orgnl_instr_id: Option<String>,
107087	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
107088	pub orgnl_end_to_end_id: Option<String>,
107089	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxId", skip_serializing_if = "Option::is_none") )]
107090	pub orgnl_tx_id: Option<String>,
107091	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
107092	pub orgnl_uetr: Option<String>,
107093	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
107094	pub orgnl_intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
107095	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
107096	pub orgnl_intr_bk_sttlm_dt: Option<String>,
107097	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
107098	pub orgnl_tx_ref: Option<OriginalTransactionReference35>,
107099	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlSvcLvl", skip_serializing_if = "Option::is_none") )]
107100	pub orgnl_svc_lvl: Option<ServiceLevel8Choice>,
107101}
107102
107103impl UnderlyingPaymentTransaction7 {
107104	pub fn validate(&self) -> Result<(), ValidationError> {
107105		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
107106		if let Some(ref val) = self.orgnl_instr_id {
107107			if val.chars().count() < 1 {
107108				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
107109			}
107110			if val.chars().count() > 35 {
107111				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
107112			}
107113		}
107114		if let Some(ref val) = self.orgnl_end_to_end_id {
107115			if val.chars().count() < 1 {
107116				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
107117			}
107118			if val.chars().count() > 35 {
107119				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
107120			}
107121		}
107122		if let Some(ref val) = self.orgnl_tx_id {
107123			if val.chars().count() < 1 {
107124				return Err(ValidationError::new(1001, "orgnl_tx_id is shorter than the minimum length of 1".to_string()));
107125			}
107126			if val.chars().count() > 35 {
107127				return Err(ValidationError::new(1002, "orgnl_tx_id exceeds the maximum length of 35".to_string()));
107128			}
107129		}
107130		if let Some(ref val) = self.orgnl_uetr {
107131			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
107132			if !pattern.is_match(val) {
107133				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
107134			}
107135		}
107136		if let Some(ref val) = self.orgnl_intr_bk_sttlm_amt { val.validate()? }
107137		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
107138		if let Some(ref val) = self.orgnl_svc_lvl { val.validate()? }
107139		Ok(())
107140	}
107141}
107142
107143
107144// UnderlyingPaymentTransaction8 ...
107145#[cfg_attr(feature = "derive_debug", derive(Debug))]
107146#[cfg_attr(feature = "derive_default", derive(Default))]
107147#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107148#[cfg_attr(feature = "derive_clone", derive(Clone))]
107149#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107150pub struct UnderlyingPaymentTransaction8 {
107151	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
107152	pub orgnl_grp_inf: Option<UnderlyingGroupInformation1>,
107153	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlInstrId", skip_serializing_if = "Option::is_none") )]
107154	pub orgnl_instr_id: Option<String>,
107155	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlEndToEndId", skip_serializing_if = "Option::is_none") )]
107156	pub orgnl_end_to_end_id: Option<String>,
107157	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxId", skip_serializing_if = "Option::is_none") )]
107158	pub orgnl_tx_id: Option<String>,
107159	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
107160	pub orgnl_uetr: Option<String>,
107161	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIntrBkSttlmAmt", skip_serializing_if = "Option::is_none") )]
107162	pub orgnl_intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
107163	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlIntrBkSttlmDt", skip_serializing_if = "Option::is_none") )]
107164	pub orgnl_intr_bk_sttlm_dt: Option<String>,
107165	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlTxRef", skip_serializing_if = "Option::is_none") )]
107166	pub orgnl_tx_ref: Option<OriginalTransactionReference42>,
107167	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlSvcLvl", skip_serializing_if = "Option::is_none") )]
107168	pub orgnl_svc_lvl: Option<ServiceLevel8Choice>,
107169}
107170
107171impl UnderlyingPaymentTransaction8 {
107172	pub fn validate(&self) -> Result<(), ValidationError> {
107173		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
107174		if let Some(ref val) = self.orgnl_instr_id {
107175			if val.chars().count() < 1 {
107176				return Err(ValidationError::new(1001, "orgnl_instr_id is shorter than the minimum length of 1".to_string()));
107177			}
107178			if val.chars().count() > 35 {
107179				return Err(ValidationError::new(1002, "orgnl_instr_id exceeds the maximum length of 35".to_string()));
107180			}
107181		}
107182		if let Some(ref val) = self.orgnl_end_to_end_id {
107183			if val.chars().count() < 1 {
107184				return Err(ValidationError::new(1001, "orgnl_end_to_end_id is shorter than the minimum length of 1".to_string()));
107185			}
107186			if val.chars().count() > 35 {
107187				return Err(ValidationError::new(1002, "orgnl_end_to_end_id exceeds the maximum length of 35".to_string()));
107188			}
107189		}
107190		if let Some(ref val) = self.orgnl_tx_id {
107191			if val.chars().count() < 1 {
107192				return Err(ValidationError::new(1001, "orgnl_tx_id is shorter than the minimum length of 1".to_string()));
107193			}
107194			if val.chars().count() > 35 {
107195				return Err(ValidationError::new(1002, "orgnl_tx_id exceeds the maximum length of 35".to_string()));
107196			}
107197		}
107198		if let Some(ref val) = self.orgnl_uetr {
107199			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
107200			if !pattern.is_match(val) {
107201				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
107202			}
107203		}
107204		if let Some(ref val) = self.orgnl_intr_bk_sttlm_amt { val.validate()? }
107205		if let Some(ref val) = self.orgnl_tx_ref { val.validate()? }
107206		if let Some(ref val) = self.orgnl_svc_lvl { val.validate()? }
107207		Ok(())
107208	}
107209}
107210
107211
107212// UnderlyingStatementEntry3 ...
107213#[cfg_attr(feature = "derive_debug", derive(Debug))]
107214#[cfg_attr(feature = "derive_default", derive(Default))]
107215#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107216#[cfg_attr(feature = "derive_clone", derive(Clone))]
107217#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107218pub struct UnderlyingStatementEntry3 {
107219	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
107220	pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
107221	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlStmtId", skip_serializing_if = "Option::is_none") )]
107222	pub orgnl_stmt_id: Option<String>,
107223	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNtryId", skip_serializing_if = "Option::is_none") )]
107224	pub orgnl_ntry_id: Option<String>,
107225	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
107226	pub orgnl_uetr: Option<String>,
107227}
107228
107229impl UnderlyingStatementEntry3 {
107230	pub fn validate(&self) -> Result<(), ValidationError> {
107231		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
107232		if let Some(ref val) = self.orgnl_stmt_id {
107233			if val.chars().count() < 1 {
107234				return Err(ValidationError::new(1001, "orgnl_stmt_id is shorter than the minimum length of 1".to_string()));
107235			}
107236			if val.chars().count() > 35 {
107237				return Err(ValidationError::new(1002, "orgnl_stmt_id exceeds the maximum length of 35".to_string()));
107238			}
107239		}
107240		if let Some(ref val) = self.orgnl_ntry_id {
107241			if val.chars().count() < 1 {
107242				return Err(ValidationError::new(1001, "orgnl_ntry_id is shorter than the minimum length of 1".to_string()));
107243			}
107244			if val.chars().count() > 35 {
107245				return Err(ValidationError::new(1002, "orgnl_ntry_id exceeds the maximum length of 35".to_string()));
107246			}
107247		}
107248		if let Some(ref val) = self.orgnl_uetr {
107249			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
107250			if !pattern.is_match(val) {
107251				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
107252			}
107253		}
107254		Ok(())
107255	}
107256}
107257
107258
107259// UnderlyingStatementEntry5 ...
107260#[cfg_attr(feature = "derive_debug", derive(Debug))]
107261#[cfg_attr(feature = "derive_default", derive(Default))]
107262#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107263#[cfg_attr(feature = "derive_clone", derive(Clone))]
107264#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107265pub struct UnderlyingStatementEntry5 {
107266	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlAcct", skip_serializing_if = "Option::is_none") )]
107267	pub orgnl_acct: Option<CashAccount40>,
107268	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInf", skip_serializing_if = "Option::is_none") )]
107269	pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
107270	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlStmtId", skip_serializing_if = "Option::is_none") )]
107271	pub orgnl_stmt_id: Option<String>,
107272	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNtryRef", skip_serializing_if = "Option::is_none") )]
107273	pub orgnl_ntry_ref: Option<String>,
107274	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlUETR", skip_serializing_if = "Option::is_none") )]
107275	pub orgnl_uetr: Option<String>,
107276	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNtryAmt", skip_serializing_if = "Option::is_none") )]
107277	pub orgnl_ntry_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
107278	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlNtryValDt", skip_serializing_if = "Option::is_none") )]
107279	pub orgnl_ntry_val_dt: Option<DateAndDateTime2Choice>,
107280}
107281
107282impl UnderlyingStatementEntry5 {
107283	pub fn validate(&self) -> Result<(), ValidationError> {
107284		if let Some(ref val) = self.orgnl_acct { val.validate()? }
107285		if let Some(ref val) = self.orgnl_grp_inf { val.validate()? }
107286		if let Some(ref val) = self.orgnl_stmt_id {
107287			if val.chars().count() < 1 {
107288				return Err(ValidationError::new(1001, "orgnl_stmt_id is shorter than the minimum length of 1".to_string()));
107289			}
107290			if val.chars().count() > 35 {
107291				return Err(ValidationError::new(1002, "orgnl_stmt_id exceeds the maximum length of 35".to_string()));
107292			}
107293		}
107294		if let Some(ref val) = self.orgnl_ntry_ref {
107295			if val.chars().count() < 1 {
107296				return Err(ValidationError::new(1001, "orgnl_ntry_ref is shorter than the minimum length of 1".to_string()));
107297			}
107298			if val.chars().count() > 35 {
107299				return Err(ValidationError::new(1002, "orgnl_ntry_ref exceeds the maximum length of 35".to_string()));
107300			}
107301		}
107302		if let Some(ref val) = self.orgnl_uetr {
107303			let pattern = Regex::new("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}").unwrap();
107304			if !pattern.is_match(val) {
107305				return Err(ValidationError::new(1005, "orgnl_uetr does not match the required pattern".to_string()));
107306			}
107307		}
107308		if let Some(ref val) = self.orgnl_ntry_amt { val.validate()? }
107309		if let Some(ref val) = self.orgnl_ntry_val_dt { val.validate()? }
107310		Ok(())
107311	}
107312}
107313
107314
107315// UnderlyingTransaction32 ...
107316#[cfg_attr(feature = "derive_debug", derive(Debug))]
107317#[cfg_attr(feature = "derive_default", derive(Default))]
107318#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107319#[cfg_attr(feature = "derive_clone", derive(Clone))]
107320#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107321pub struct UnderlyingTransaction32 {
107322	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInfAndSts", skip_serializing_if = "Option::is_none") )]
107323	pub orgnl_grp_inf_and_sts: Option<OriginalGroupHeader23>,
107324	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPmtInfAndSts", skip_serializing_if = "Option::is_none") )]
107325	pub orgnl_pmt_inf_and_sts: Option<Vec<OriginalPaymentInstruction48>>,
107326	#[cfg_attr( feature = "derive_serde", serde(rename = "TxInfAndSts", skip_serializing_if = "Option::is_none") )]
107327	pub tx_inf_and_sts: Option<Vec<PaymentTransaction152>>,
107328}
107329
107330impl UnderlyingTransaction32 {
107331	pub fn validate(&self) -> Result<(), ValidationError> {
107332		if let Some(ref val) = self.orgnl_grp_inf_and_sts { val.validate()? }
107333		if let Some(ref vec) = self.orgnl_pmt_inf_and_sts { for item in vec { item.validate()? } }
107334		if let Some(ref vec) = self.tx_inf_and_sts { for item in vec { item.validate()? } }
107335		Ok(())
107336	}
107337}
107338
107339
107340// UnderlyingTransaction33 ...
107341#[cfg_attr(feature = "derive_debug", derive(Debug))]
107342#[cfg_attr(feature = "derive_default", derive(Default))]
107343#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107344#[cfg_attr(feature = "derive_clone", derive(Clone))]
107345#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107346pub struct UnderlyingTransaction33 {
107347	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInfAndCxl", skip_serializing_if = "Option::is_none") )]
107348	pub orgnl_grp_inf_and_cxl: Option<OriginalGroupHeader21>,
107349	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPmtInfAndCxl", skip_serializing_if = "Option::is_none") )]
107350	pub orgnl_pmt_inf_and_cxl: Option<Vec<OriginalPaymentInstruction49>>,
107351}
107352
107353impl UnderlyingTransaction33 {
107354	pub fn validate(&self) -> Result<(), ValidationError> {
107355		if let Some(ref val) = self.orgnl_grp_inf_and_cxl { val.validate()? }
107356		if let Some(ref vec) = self.orgnl_pmt_inf_and_cxl { for item in vec { item.validate()? } }
107357		Ok(())
107358	}
107359}
107360
107361
107362// UnderlyingTransaction34 ...
107363#[cfg_attr(feature = "derive_debug", derive(Debug))]
107364#[cfg_attr(feature = "derive_default", derive(Default))]
107365#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107366#[cfg_attr(feature = "derive_clone", derive(Clone))]
107367#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107368pub struct UnderlyingTransaction34 {
107369	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlGrpInfAndCxl", skip_serializing_if = "Option::is_none") )]
107370	pub orgnl_grp_inf_and_cxl: Option<OriginalGroupHeader21>,
107371	#[cfg_attr( feature = "derive_serde", serde(rename = "TxInf", skip_serializing_if = "Option::is_none") )]
107372	pub tx_inf: Option<Vec<PaymentTransaction155>>,
107373}
107374
107375impl UnderlyingTransaction34 {
107376	pub fn validate(&self) -> Result<(), ValidationError> {
107377		if let Some(ref val) = self.orgnl_grp_inf_and_cxl { val.validate()? }
107378		if let Some(ref vec) = self.tx_inf { for item in vec { item.validate()? } }
107379		Ok(())
107380	}
107381}
107382
107383
107384// UnderlyingTransaction8Choice ...
107385#[cfg_attr(feature = "derive_debug", derive(Debug))]
107386#[cfg_attr(feature = "derive_default", derive(Default))]
107387#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107388#[cfg_attr(feature = "derive_clone", derive(Clone))]
107389#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107390pub struct UnderlyingTransaction8Choice {
107391	#[cfg_attr( feature = "derive_serde", serde(rename = "Initn", skip_serializing_if = "Option::is_none") )]
107392	pub initn: Option<UnderlyingPaymentInstruction9>,
107393	#[cfg_attr( feature = "derive_serde", serde(rename = "IntrBk", skip_serializing_if = "Option::is_none") )]
107394	pub intr_bk: Option<UnderlyingPaymentTransaction8>,
107395	#[cfg_attr( feature = "derive_serde", serde(rename = "StmtNtry", skip_serializing_if = "Option::is_none") )]
107396	pub stmt_ntry: Option<UnderlyingStatementEntry3>,
107397}
107398
107399impl UnderlyingTransaction8Choice {
107400	pub fn validate(&self) -> Result<(), ValidationError> {
107401		if let Some(ref val) = self.initn { val.validate()? }
107402		if let Some(ref val) = self.intr_bk { val.validate()? }
107403		if let Some(ref val) = self.stmt_ntry { val.validate()? }
107404		Ok(())
107405	}
107406}
107407
107408
107409// UniqueProductIdentifier1Choice ...
107410#[cfg_attr(feature = "derive_debug", derive(Debug))]
107411#[cfg_attr(feature = "derive_default", derive(Default))]
107412#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107413#[cfg_attr(feature = "derive_clone", derive(Clone))]
107414#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107415pub struct UniqueProductIdentifier1Choice {
107416	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
107417	pub id: Option<String>,
107418	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
107419	pub prtry: Option<GenericIdentification175>,
107420}
107421
107422impl UniqueProductIdentifier1Choice {
107423	pub fn validate(&self) -> Result<(), ValidationError> {
107424		if let Some(ref val) = self.id {
107425			if val.chars().count() < 1 {
107426				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
107427			}
107428			if val.chars().count() > 52 {
107429				return Err(ValidationError::new(1002, "id exceeds the maximum length of 52".to_string()));
107430			}
107431		}
107432		if let Some(ref val) = self.prtry { val.validate()? }
107433		Ok(())
107434	}
107435}
107436
107437
107438// UniqueProductIdentifier2Choice ...
107439#[cfg_attr(feature = "derive_debug", derive(Debug))]
107440#[cfg_attr(feature = "derive_default", derive(Default))]
107441#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107442#[cfg_attr(feature = "derive_clone", derive(Clone))]
107443#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107444pub struct UniqueProductIdentifier2Choice {
107445	#[cfg_attr( feature = "derive_serde", serde(rename = "Id", skip_serializing_if = "Option::is_none") )]
107446	pub id: Option<String>,
107447	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
107448	pub prtry: Option<GenericIdentification185>,
107449}
107450
107451impl UniqueProductIdentifier2Choice {
107452	pub fn validate(&self) -> Result<(), ValidationError> {
107453		if let Some(ref val) = self.id {
107454			if val.chars().count() < 1 {
107455				return Err(ValidationError::new(1001, "id is shorter than the minimum length of 1".to_string()));
107456			}
107457			if val.chars().count() > 52 {
107458				return Err(ValidationError::new(1002, "id exceeds the maximum length of 52".to_string()));
107459			}
107460		}
107461		if let Some(ref val) = self.prtry { val.validate()? }
107462		Ok(())
107463	}
107464}
107465
107466
107467// UniqueTransactionIdentifier1Choice ...
107468#[cfg_attr(feature = "derive_debug", derive(Debug))]
107469#[cfg_attr(feature = "derive_default", derive(Default))]
107470#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107471#[cfg_attr(feature = "derive_clone", derive(Clone))]
107472#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107473pub struct UniqueTransactionIdentifier1Choice {
107474	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTxIdr", skip_serializing_if = "Option::is_none") )]
107475	pub unq_tx_idr: Option<String>,
107476	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
107477	pub prtry: Option<GenericIdentification179>,
107478}
107479
107480impl UniqueTransactionIdentifier1Choice {
107481	pub fn validate(&self) -> Result<(), ValidationError> {
107482		if let Some(ref val) = self.unq_tx_idr {
107483			let pattern = Regex::new("[A-Z0-9]{18}[0-9]{2}[A-Z0-9]{0,32}").unwrap();
107484			if !pattern.is_match(val) {
107485				return Err(ValidationError::new(1005, "unq_tx_idr does not match the required pattern".to_string()));
107486			}
107487		}
107488		if let Some(ref val) = self.prtry { val.validate()? }
107489		Ok(())
107490	}
107491}
107492
107493
107494// UniqueTransactionIdentifier2Choice ...
107495#[cfg_attr(feature = "derive_debug", derive(Debug))]
107496#[cfg_attr(feature = "derive_default", derive(Default))]
107497#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107498#[cfg_attr(feature = "derive_clone", derive(Clone))]
107499#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107500pub struct UniqueTransactionIdentifier2Choice {
107501	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTxIdr", skip_serializing_if = "Option::is_none") )]
107502	pub unq_tx_idr: Option<String>,
107503	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
107504	pub prtry: Option<GenericIdentification175>,
107505}
107506
107507impl UniqueTransactionIdentifier2Choice {
107508	pub fn validate(&self) -> Result<(), ValidationError> {
107509		if let Some(ref val) = self.unq_tx_idr {
107510			let pattern = Regex::new("[A-Z0-9]{18}[0-9]{2}[A-Z0-9]{0,32}").unwrap();
107511			if !pattern.is_match(val) {
107512				return Err(ValidationError::new(1005, "unq_tx_idr does not match the required pattern".to_string()));
107513			}
107514		}
107515		if let Some(ref val) = self.prtry { val.validate()? }
107516		Ok(())
107517	}
107518}
107519
107520
107521// UniqueTransactionIdentifier3Choice ...
107522#[cfg_attr(feature = "derive_debug", derive(Debug))]
107523#[cfg_attr(feature = "derive_default", derive(Default))]
107524#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107525#[cfg_attr(feature = "derive_clone", derive(Clone))]
107526#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107527pub struct UniqueTransactionIdentifier3Choice {
107528	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTxIdr", skip_serializing_if = "Option::is_none") )]
107529	pub unq_tx_idr: Option<String>,
107530	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
107531	pub prtry: Option<GenericIdentification175>,
107532	#[cfg_attr( feature = "derive_serde", serde(rename = "NotAvlbl", skip_serializing_if = "Option::is_none") )]
107533	pub not_avlbl: Option<NoReasonCode>,
107534}
107535
107536impl UniqueTransactionIdentifier3Choice {
107537	pub fn validate(&self) -> Result<(), ValidationError> {
107538		if let Some(ref val) = self.unq_tx_idr {
107539			let pattern = Regex::new("[A-Z0-9]{18}[0-9]{2}[A-Z0-9]{0,32}").unwrap();
107540			if !pattern.is_match(val) {
107541				return Err(ValidationError::new(1005, "unq_tx_idr does not match the required pattern".to_string()));
107542			}
107543		}
107544		if let Some(ref val) = self.prtry { val.validate()? }
107545		if let Some(ref val) = self.not_avlbl { val.validate()? }
107546		Ok(())
107547	}
107548}
107549
107550
107551// UnitOfMeasure11Code ...
107552#[cfg_attr(feature = "derive_debug", derive(Debug))]
107553#[cfg_attr(feature = "derive_default", derive(Default))]
107554#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107555#[cfg_attr(feature = "derive_clone", derive(Clone))]
107556#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107557pub enum UnitOfMeasure11Code {
107558	#[cfg_attr(feature = "derive_default", default)]
107559	#[cfg_attr( feature = "derive_serde", serde(rename = "ALOW") )]
107560	CodeALOW,
107561	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCY") )]
107562	CodeACCY,
107563	#[cfg_attr( feature = "derive_serde", serde(rename = "BARL") )]
107564	CodeBARL,
107565	#[cfg_attr( feature = "derive_serde", serde(rename = "BCUF") )]
107566	CodeBCUF,
107567	#[cfg_attr( feature = "derive_serde", serde(rename = "BDFT") )]
107568	CodeBDFT,
107569	#[cfg_attr( feature = "derive_serde", serde(rename = "BUSL") )]
107570	CodeBUSL,
107571	#[cfg_attr( feature = "derive_serde", serde(rename = "CEER") )]
107572	CodeCEER,
107573	#[cfg_attr( feature = "derive_serde", serde(rename = "CLRT") )]
107574	CodeCLRT,
107575	#[cfg_attr( feature = "derive_serde", serde(rename = "KILO") )]
107576	CodeKILO,
107577	#[cfg_attr( feature = "derive_serde", serde(rename = "PIEC") )]
107578	CodePIEC,
107579	#[cfg_attr( feature = "derive_serde", serde(rename = "TONS") )]
107580	CodeTONS,
107581	#[cfg_attr( feature = "derive_serde", serde(rename = "METR") )]
107582	CodeMETR,
107583	#[cfg_attr( feature = "derive_serde", serde(rename = "INCH") )]
107584	CodeINCH,
107585	#[cfg_attr( feature = "derive_serde", serde(rename = "YARD") )]
107586	CodeYARD,
107587	#[cfg_attr( feature = "derive_serde", serde(rename = "GBGA") )]
107588	CodeGBGA,
107589	#[cfg_attr( feature = "derive_serde", serde(rename = "GRAM") )]
107590	CodeGRAM,
107591	#[cfg_attr( feature = "derive_serde", serde(rename = "CMET") )]
107592	CodeCMET,
107593	#[cfg_attr( feature = "derive_serde", serde(rename = "SMET") )]
107594	CodeSMET,
107595	#[cfg_attr( feature = "derive_serde", serde(rename = "FOOT") )]
107596	CodeFOOT,
107597	#[cfg_attr( feature = "derive_serde", serde(rename = "MILE") )]
107598	CodeMILE,
107599	#[cfg_attr( feature = "derive_serde", serde(rename = "SQIN") )]
107600	CodeSQIN,
107601	#[cfg_attr( feature = "derive_serde", serde(rename = "SQFO") )]
107602	CodeSQFO,
107603	#[cfg_attr( feature = "derive_serde", serde(rename = "SQMI") )]
107604	CodeSQMI,
107605	#[cfg_attr( feature = "derive_serde", serde(rename = "GBOU") )]
107606	CodeGBOU,
107607	#[cfg_attr( feature = "derive_serde", serde(rename = "USOU") )]
107608	CodeUSOU,
107609	#[cfg_attr( feature = "derive_serde", serde(rename = "GBPI") )]
107610	CodeGBPI,
107611	#[cfg_attr( feature = "derive_serde", serde(rename = "USPI") )]
107612	CodeUSPI,
107613	#[cfg_attr( feature = "derive_serde", serde(rename = "GBQA") )]
107614	CodeGBQA,
107615	#[cfg_attr( feature = "derive_serde", serde(rename = "USGA") )]
107616	CodeUSGA,
107617	#[cfg_attr( feature = "derive_serde", serde(rename = "MMET") )]
107618	CodeMMET,
107619	#[cfg_attr( feature = "derive_serde", serde(rename = "KMET") )]
107620	CodeKMET,
107621	#[cfg_attr( feature = "derive_serde", serde(rename = "SQYA") )]
107622	CodeSQYA,
107623	#[cfg_attr( feature = "derive_serde", serde(rename = "ACRE") )]
107624	CodeACRE,
107625	#[cfg_attr( feature = "derive_serde", serde(rename = "ARES") )]
107626	CodeARES,
107627	#[cfg_attr( feature = "derive_serde", serde(rename = "SMIL") )]
107628	CodeSMIL,
107629	#[cfg_attr( feature = "derive_serde", serde(rename = "SCMT") )]
107630	CodeSCMT,
107631	#[cfg_attr( feature = "derive_serde", serde(rename = "HECT") )]
107632	CodeHECT,
107633	#[cfg_attr( feature = "derive_serde", serde(rename = "SQKI") )]
107634	CodeSQKI,
107635	#[cfg_attr( feature = "derive_serde", serde(rename = "MILI") )]
107636	CodeMILI,
107637	#[cfg_attr( feature = "derive_serde", serde(rename = "CELI") )]
107638	CodeCELI,
107639	#[cfg_attr( feature = "derive_serde", serde(rename = "LITR") )]
107640	CodeLITR,
107641	#[cfg_attr( feature = "derive_serde", serde(rename = "PUND") )]
107642	CodePUND,
107643	#[cfg_attr( feature = "derive_serde", serde(rename = "CBME") )]
107644	CodeCBME,
107645	#[cfg_attr( feature = "derive_serde", serde(rename = "DAYS") )]
107646	CodeDAYS,
107647	#[cfg_attr( feature = "derive_serde", serde(rename = "DMET") )]
107648	CodeDMET,
107649	#[cfg_attr( feature = "derive_serde", serde(rename = "ENVC") )]
107650	CodeENVC,
107651	#[cfg_attr( feature = "derive_serde", serde(rename = "ENVO") )]
107652	CodeENVO,
107653	#[cfg_attr( feature = "derive_serde", serde(rename = "HUWG") )]
107654	CodeHUWG,
107655	#[cfg_attr( feature = "derive_serde", serde(rename = "KWDC") )]
107656	CodeKWDC,
107657	#[cfg_attr( feature = "derive_serde", serde(rename = "KWHO") )]
107658	CodeKWHO,
107659	#[cfg_attr( feature = "derive_serde", serde(rename = "KWHC") )]
107660	CodeKWHC,
107661	#[cfg_attr( feature = "derive_serde", serde(rename = "KMOC") )]
107662	CodeKMOC,
107663	#[cfg_attr( feature = "derive_serde", serde(rename = "KWMC") )]
107664	CodeKWMC,
107665	#[cfg_attr( feature = "derive_serde", serde(rename = "KWYC") )]
107666	CodeKWYC,
107667	#[cfg_attr( feature = "derive_serde", serde(rename = "MWDC") )]
107668	CodeMWDC,
107669	#[cfg_attr( feature = "derive_serde", serde(rename = "MWHO") )]
107670	CodeMWHO,
107671	#[cfg_attr( feature = "derive_serde", serde(rename = "MWHC") )]
107672	CodeMWHC,
107673	#[cfg_attr( feature = "derive_serde", serde(rename = "MWMC") )]
107674	CodeMWMC,
107675	#[cfg_attr( feature = "derive_serde", serde(rename = "MMOC") )]
107676	CodeMMOC,
107677	#[cfg_attr( feature = "derive_serde", serde(rename = "MWYC") )]
107678	CodeMWYC,
107679	#[cfg_attr( feature = "derive_serde", serde(rename = "TONE") )]
107680	CodeTONE,
107681	#[cfg_attr( feature = "derive_serde", serde(rename = "MIBA") )]
107682	CodeMIBA,
107683	#[cfg_attr( feature = "derive_serde", serde(rename = "MBTU") )]
107684	CodeMBTU,
107685	#[cfg_attr( feature = "derive_serde", serde(rename = "OZTR") )]
107686	CodeOZTR,
107687	#[cfg_attr( feature = "derive_serde", serde(rename = "UCWT") )]
107688	CodeUCWT,
107689	#[cfg_attr( feature = "derive_serde", serde(rename = "IPNT") )]
107690	CodeIPNT,
107691	#[cfg_attr( feature = "derive_serde", serde(rename = "PWRD") )]
107692	CodePWRD,
107693	#[cfg_attr( feature = "derive_serde", serde(rename = "DGEU") )]
107694	CodeDGEU,
107695	#[cfg_attr( feature = "derive_serde", serde(rename = "TOCD") )]
107696	CodeTOCD,
107697	#[cfg_attr( feature = "derive_serde", serde(rename = "GGEU") )]
107698	CodeGGEU,
107699	#[cfg_attr( feature = "derive_serde", serde(rename = "USQA") )]
107700	CodeUSQA,
107701}
107702
107703impl UnitOfMeasure11Code {
107704	pub fn validate(&self) -> Result<(), ValidationError> {
107705		Ok(())
107706	}
107707}
107708
107709
107710// UnitOfMeasure1Code ...
107711#[cfg_attr(feature = "derive_debug", derive(Debug))]
107712#[cfg_attr(feature = "derive_default", derive(Default))]
107713#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107714#[cfg_attr(feature = "derive_clone", derive(Clone))]
107715#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107716pub enum UnitOfMeasure1Code {
107717	#[cfg_attr(feature = "derive_default", default)]
107718	#[cfg_attr( feature = "derive_serde", serde(rename = "PIEC") )]
107719	CodePIEC,
107720	#[cfg_attr( feature = "derive_serde", serde(rename = "TONS") )]
107721	CodeTONS,
107722	#[cfg_attr( feature = "derive_serde", serde(rename = "FOOT") )]
107723	CodeFOOT,
107724	#[cfg_attr( feature = "derive_serde", serde(rename = "GBGA") )]
107725	CodeGBGA,
107726	#[cfg_attr( feature = "derive_serde", serde(rename = "USGA") )]
107727	CodeUSGA,
107728	#[cfg_attr( feature = "derive_serde", serde(rename = "GRAM") )]
107729	CodeGRAM,
107730	#[cfg_attr( feature = "derive_serde", serde(rename = "INCH") )]
107731	CodeINCH,
107732	#[cfg_attr( feature = "derive_serde", serde(rename = "KILO") )]
107733	CodeKILO,
107734	#[cfg_attr( feature = "derive_serde", serde(rename = "PUND") )]
107735	CodePUND,
107736	#[cfg_attr( feature = "derive_serde", serde(rename = "METR") )]
107737	CodeMETR,
107738	#[cfg_attr( feature = "derive_serde", serde(rename = "CMET") )]
107739	CodeCMET,
107740	#[cfg_attr( feature = "derive_serde", serde(rename = "MMET") )]
107741	CodeMMET,
107742	#[cfg_attr( feature = "derive_serde", serde(rename = "LITR") )]
107743	CodeLITR,
107744	#[cfg_attr( feature = "derive_serde", serde(rename = "CELI") )]
107745	CodeCELI,
107746	#[cfg_attr( feature = "derive_serde", serde(rename = "MILI") )]
107747	CodeMILI,
107748	#[cfg_attr( feature = "derive_serde", serde(rename = "GBOU") )]
107749	CodeGBOU,
107750	#[cfg_attr( feature = "derive_serde", serde(rename = "USOU") )]
107751	CodeUSOU,
107752	#[cfg_attr( feature = "derive_serde", serde(rename = "GBQA") )]
107753	CodeGBQA,
107754	#[cfg_attr( feature = "derive_serde", serde(rename = "USQA") )]
107755	CodeUSQA,
107756	#[cfg_attr( feature = "derive_serde", serde(rename = "GBPI") )]
107757	CodeGBPI,
107758	#[cfg_attr( feature = "derive_serde", serde(rename = "USPI") )]
107759	CodeUSPI,
107760	#[cfg_attr( feature = "derive_serde", serde(rename = "MILE") )]
107761	CodeMILE,
107762	#[cfg_attr( feature = "derive_serde", serde(rename = "KMET") )]
107763	CodeKMET,
107764	#[cfg_attr( feature = "derive_serde", serde(rename = "YARD") )]
107765	CodeYARD,
107766	#[cfg_attr( feature = "derive_serde", serde(rename = "SQKI") )]
107767	CodeSQKI,
107768	#[cfg_attr( feature = "derive_serde", serde(rename = "HECT") )]
107769	CodeHECT,
107770	#[cfg_attr( feature = "derive_serde", serde(rename = "ARES") )]
107771	CodeARES,
107772	#[cfg_attr( feature = "derive_serde", serde(rename = "SMET") )]
107773	CodeSMET,
107774	#[cfg_attr( feature = "derive_serde", serde(rename = "SCMT") )]
107775	CodeSCMT,
107776	#[cfg_attr( feature = "derive_serde", serde(rename = "SMIL") )]
107777	CodeSMIL,
107778	#[cfg_attr( feature = "derive_serde", serde(rename = "SQMI") )]
107779	CodeSQMI,
107780	#[cfg_attr( feature = "derive_serde", serde(rename = "SQYA") )]
107781	CodeSQYA,
107782	#[cfg_attr( feature = "derive_serde", serde(rename = "SQFO") )]
107783	CodeSQFO,
107784	#[cfg_attr( feature = "derive_serde", serde(rename = "SQIN") )]
107785	CodeSQIN,
107786	#[cfg_attr( feature = "derive_serde", serde(rename = "ACRE") )]
107787	CodeACRE,
107788}
107789
107790impl UnitOfMeasure1Code {
107791	pub fn validate(&self) -> Result<(), ValidationError> {
107792		Ok(())
107793	}
107794}
107795
107796
107797// UnitOfMeasure5Choice ...
107798#[cfg_attr(feature = "derive_debug", derive(Debug))]
107799#[cfg_attr(feature = "derive_default", derive(Default))]
107800#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107801#[cfg_attr(feature = "derive_clone", derive(Clone))]
107802#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107803pub struct UnitOfMeasure5Choice {
107804	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
107805	pub cd: Option<UnitOfMeasure8Code>,
107806	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
107807	pub prtry: Option<GenericIdentification36>,
107808}
107809
107810impl UnitOfMeasure5Choice {
107811	pub fn validate(&self) -> Result<(), ValidationError> {
107812		if let Some(ref val) = self.cd { val.validate()? }
107813		if let Some(ref val) = self.prtry { val.validate()? }
107814		Ok(())
107815	}
107816}
107817
107818
107819// UnitOfMeasure7Choice ...
107820#[cfg_attr(feature = "derive_debug", derive(Debug))]
107821#[cfg_attr(feature = "derive_default", derive(Default))]
107822#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107823#[cfg_attr(feature = "derive_clone", derive(Clone))]
107824#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107825pub struct UnitOfMeasure7Choice {
107826	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
107827	pub cd: Option<UnitOfMeasure9Code>,
107828	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
107829	pub prtry: Option<GenericIdentification30>,
107830}
107831
107832impl UnitOfMeasure7Choice {
107833	pub fn validate(&self) -> Result<(), ValidationError> {
107834		if let Some(ref val) = self.cd { val.validate()? }
107835		if let Some(ref val) = self.prtry { val.validate()? }
107836		Ok(())
107837	}
107838}
107839
107840
107841// UnitOfMeasure8Choice ...
107842#[cfg_attr(feature = "derive_debug", derive(Debug))]
107843#[cfg_attr(feature = "derive_default", derive(Default))]
107844#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107845#[cfg_attr(feature = "derive_clone", derive(Clone))]
107846#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107847pub struct UnitOfMeasure8Choice {
107848	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
107849	pub cd: Option<String>,
107850	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
107851	pub prtry: Option<GenericIdentification175>,
107852}
107853
107854impl UnitOfMeasure8Choice {
107855	pub fn validate(&self) -> Result<(), ValidationError> {
107856		if let Some(ref val) = self.cd {
107857			if val.chars().count() < 1 {
107858				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
107859			}
107860			if val.chars().count() > 4 {
107861				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
107862			}
107863		}
107864		if let Some(ref val) = self.prtry { val.validate()? }
107865		Ok(())
107866	}
107867}
107868
107869
107870// UnitOfMeasure8Code ...
107871#[cfg_attr(feature = "derive_debug", derive(Debug))]
107872#[cfg_attr(feature = "derive_default", derive(Default))]
107873#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
107874#[cfg_attr(feature = "derive_clone", derive(Clone))]
107875#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
107876pub enum UnitOfMeasure8Code {
107877	#[cfg_attr(feature = "derive_default", default)]
107878	#[cfg_attr( feature = "derive_serde", serde(rename = "KILO") )]
107879	CodeKILO,
107880	#[cfg_attr( feature = "derive_serde", serde(rename = "KMET") )]
107881	CodeKMET,
107882	#[cfg_attr( feature = "derive_serde", serde(rename = "KWDC") )]
107883	CodeKWDC,
107884	#[cfg_attr( feature = "derive_serde", serde(rename = "KWHO") )]
107885	CodeKWHO,
107886	#[cfg_attr( feature = "derive_serde", serde(rename = "KWHC") )]
107887	CodeKWHC,
107888	#[cfg_attr( feature = "derive_serde", serde(rename = "KMOC") )]
107889	CodeKMOC,
107890	#[cfg_attr( feature = "derive_serde", serde(rename = "KWMC") )]
107891	CodeKWMC,
107892	#[cfg_attr( feature = "derive_serde", serde(rename = "KWYC") )]
107893	CodeKWYC,
107894	#[cfg_attr( feature = "derive_serde", serde(rename = "LITR") )]
107895	CodeLITR,
107896	#[cfg_attr( feature = "derive_serde", serde(rename = "MWDC") )]
107897	CodeMWDC,
107898	#[cfg_attr( feature = "derive_serde", serde(rename = "MWHO") )]
107899	CodeMWHO,
107900	#[cfg_attr( feature = "derive_serde", serde(rename = "MWHC") )]
107901	CodeMWHC,
107902	#[cfg_attr( feature = "derive_serde", serde(rename = "MWMC") )]
107903	CodeMWMC,
107904	#[cfg_attr( feature = "derive_serde", serde(rename = "MMOC") )]
107905	CodeMMOC,
107906	#[cfg_attr( feature = "derive_serde", serde(rename = "MWYC") )]
107907	CodeMWYC,
107908	#[cfg_attr( feature = "derive_serde", serde(rename = "METR") )]
107909	CodeMETR,
107910	#[cfg_attr( feature = "derive_serde", serde(rename = "TONE") )]
107911	CodeTONE,
107912	#[cfg_attr( feature = "derive_serde", serde(rename = "MILE") )]
107913	CodeMILE,
107914	#[cfg_attr( feature = "derive_serde", serde(rename = "MILI") )]
107915	CodeMILI,
107916	#[cfg_attr( feature = "derive_serde", serde(rename = "MMET") )]
107917	CodeMMET,
107918	#[cfg_attr( feature = "derive_serde", serde(rename = "MIBA") )]
107919	CodeMIBA,
107920	#[cfg_attr( feature = "derive_serde", serde(rename = "MBTU") )]
107921	CodeMBTU,
107922	#[cfg_attr( feature = "derive_serde", serde(rename = "PIEC") )]
107923	CodePIEC,
107924	#[cfg_attr( feature = "derive_serde", serde(rename = "PUND") )]
107925	CodePUND,
107926	#[cfg_attr( feature = "derive_serde", serde(rename = "PWRD") )]
107927	CodePWRD,
107928	#[cfg_attr( feature = "derive_serde", serde(rename = "SHAS") )]
107929	CodeSHAS,
107930	#[cfg_attr( feature = "derive_serde", serde(rename = "SCMT") )]
107931	CodeSCMT,
107932	#[cfg_attr( feature = "derive_serde", serde(rename = "SQFO") )]
107933	CodeSQFO,
107934	#[cfg_attr( feature = "derive_serde", serde(rename = "SQIN") )]
107935	CodeSQIN,
107936	#[cfg_attr( feature = "derive_serde", serde(rename = "SQKI") )]
107937	CodeSQKI,
107938	#[cfg_attr( feature = "derive_serde", serde(rename = "SMET") )]
107939	CodeSMET,
107940	#[cfg_attr( feature = "derive_serde", serde(rename = "SQMI") )]
107941	CodeSQMI,
107942	#[cfg_attr( feature = "derive_serde", serde(rename = "SMIL") )]
107943	CodeSMIL,
107944	#[cfg_attr( feature = "derive_serde", serde(rename = "SQYA") )]
107945	CodeSQYA,
107946	#[cfg_attr( feature = "derive_serde", serde(rename = "THMS") )]
107947	CodeTHMS,
107948	#[cfg_attr( feature = "derive_serde", serde(rename = "TONS") )]
107949	CodeTONS,
107950	#[cfg_attr( feature = "derive_serde", serde(rename = "TOCD") )]
107951	CodeTOCD,
107952	#[cfg_attr( feature = "derive_serde", serde(rename = "OZTR") )]
107953	CodeOZTR,
107954	#[cfg_attr( feature = "derive_serde", serde(rename = "USGA") )]
107955	CodeUSGA,
107956	#[cfg_attr( feature = "derive_serde", serde(rename = "UCWT") )]
107957	CodeUCWT,
107958	#[cfg_attr( feature = "derive_serde", serde(rename = "USOU") )]
107959	CodeUSOU,
107960	#[cfg_attr( feature = "derive_serde", serde(rename = "USPI") )]
107961	CodeUSPI,
107962	#[cfg_attr( feature = "derive_serde", serde(rename = "USQA") )]
107963	CodeUSQA,
107964	#[cfg_attr( feature = "derive_serde", serde(rename = "YARD") )]
107965	CodeYARD,
107966	#[cfg_attr( feature = "derive_serde", serde(rename = "ACRE") )]
107967	CodeACRE,
107968	#[cfg_attr( feature = "derive_serde", serde(rename = "ALOW") )]
107969	CodeALOW,
107970	#[cfg_attr( feature = "derive_serde", serde(rename = "ACCY") )]
107971	CodeACCY,
107972	#[cfg_attr( feature = "derive_serde", serde(rename = "ARES") )]
107973	CodeARES,
107974	#[cfg_attr( feature = "derive_serde", serde(rename = "BARL") )]
107975	CodeBARL,
107976	#[cfg_attr( feature = "derive_serde", serde(rename = "BCUF") )]
107977	CodeBCUF,
107978	#[cfg_attr( feature = "derive_serde", serde(rename = "BDFT") )]
107979	CodeBDFT,
107980	#[cfg_attr( feature = "derive_serde", serde(rename = "BUSL") )]
107981	CodeBUSL,
107982	#[cfg_attr( feature = "derive_serde", serde(rename = "CELI") )]
107983	CodeCELI,
107984	#[cfg_attr( feature = "derive_serde", serde(rename = "CMET") )]
107985	CodeCMET,
107986	#[cfg_attr( feature = "derive_serde", serde(rename = "CEER") )]
107987	CodeCEER,
107988	#[cfg_attr( feature = "derive_serde", serde(rename = "CLRT") )]
107989	CodeCLRT,
107990	#[cfg_attr( feature = "derive_serde", serde(rename = "CBME") )]
107991	CodeCBME,
107992	#[cfg_attr( feature = "derive_serde", serde(rename = "DAYS") )]
107993	CodeDAYS,
107994	#[cfg_attr( feature = "derive_serde", serde(rename = "DGEU") )]
107995	CodeDGEU,
107996	#[cfg_attr( feature = "derive_serde", serde(rename = "DMET") )]
107997	CodeDMET,
107998	#[cfg_attr( feature = "derive_serde", serde(rename = "ENVC") )]
107999	CodeENVC,
108000	#[cfg_attr( feature = "derive_serde", serde(rename = "ENVO") )]
108001	CodeENVO,
108002	#[cfg_attr( feature = "derive_serde", serde(rename = "FOOT") )]
108003	CodeFOOT,
108004	#[cfg_attr( feature = "derive_serde", serde(rename = "GGEU") )]
108005	CodeGGEU,
108006	#[cfg_attr( feature = "derive_serde", serde(rename = "GBGA") )]
108007	CodeGBGA,
108008	#[cfg_attr( feature = "derive_serde", serde(rename = "GBOU") )]
108009	CodeGBOU,
108010	#[cfg_attr( feature = "derive_serde", serde(rename = "GBPI") )]
108011	CodeGBPI,
108012	#[cfg_attr( feature = "derive_serde", serde(rename = "GBQA") )]
108013	CodeGBQA,
108014	#[cfg_attr( feature = "derive_serde", serde(rename = "GRAM") )]
108015	CodeGRAM,
108016	#[cfg_attr( feature = "derive_serde", serde(rename = "HECT") )]
108017	CodeHECT,
108018	#[cfg_attr( feature = "derive_serde", serde(rename = "HUWG") )]
108019	CodeHUWG,
108020	#[cfg_attr( feature = "derive_serde", serde(rename = "INCH") )]
108021	CodeINCH,
108022	#[cfg_attr( feature = "derive_serde", serde(rename = "IPNT") )]
108023	CodeIPNT,
108024	#[cfg_attr( feature = "derive_serde", serde(rename = "FUTU") )]
108025	CodeFUTU,
108026	#[cfg_attr( feature = "derive_serde", serde(rename = "USTN") )]
108027	CodeUSTN,
108028}
108029
108030impl UnitOfMeasure8Code {
108031	pub fn validate(&self) -> Result<(), ValidationError> {
108032		Ok(())
108033	}
108034}
108035
108036
108037// UnitOfMeasure9Code ...
108038#[cfg_attr(feature = "derive_debug", derive(Debug))]
108039#[cfg_attr(feature = "derive_default", derive(Default))]
108040#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108041#[cfg_attr(feature = "derive_clone", derive(Clone))]
108042#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108043pub enum UnitOfMeasure9Code {
108044	#[cfg_attr(feature = "derive_default", default)]
108045	#[cfg_attr( feature = "derive_serde", serde(rename = "BAGG") )]
108046	CodeBAGG,
108047	#[cfg_attr( feature = "derive_serde", serde(rename = "BALE") )]
108048	CodeBALE,
108049	#[cfg_attr( feature = "derive_serde", serde(rename = "BOTL") )]
108050	CodeBOTL,
108051	#[cfg_attr( feature = "derive_serde", serde(rename = "BOXX") )]
108052	CodeBOXX,
108053	#[cfg_attr( feature = "derive_serde", serde(rename = "CRTN") )]
108054	CodeCRTN,
108055	#[cfg_attr( feature = "derive_serde", serde(rename = "CELI") )]
108056	CodeCELI,
108057	#[cfg_attr( feature = "derive_serde", serde(rename = "CMET") )]
108058	CodeCMET,
108059	#[cfg_attr( feature = "derive_serde", serde(rename = "CNTR") )]
108060	CodeCNTR,
108061	#[cfg_attr( feature = "derive_serde", serde(rename = "CRAT") )]
108062	CodeCRAT,
108063	#[cfg_attr( feature = "derive_serde", serde(rename = "CBIN") )]
108064	CodeCBIN,
108065	#[cfg_attr( feature = "derive_serde", serde(rename = "CBME") )]
108066	CodeCBME,
108067	#[cfg_attr( feature = "derive_serde", serde(rename = "CBML") )]
108068	CodeCBML,
108069	#[cfg_attr( feature = "derive_serde", serde(rename = "PIEC") )]
108070	CodePIEC,
108071	#[cfg_attr( feature = "derive_serde", serde(rename = "FOOT") )]
108072	CodeFOOT,
108073	#[cfg_attr( feature = "derive_serde", serde(rename = "GBFO") )]
108074	CodeGBFO,
108075	#[cfg_attr( feature = "derive_serde", serde(rename = "GBGA") )]
108076	CodeGBGA,
108077	#[cfg_attr( feature = "derive_serde", serde(rename = "GBPI") )]
108078	CodeGBPI,
108079	#[cfg_attr( feature = "derive_serde", serde(rename = "GBQA") )]
108080	CodeGBQA,
108081	#[cfg_attr( feature = "derive_serde", serde(rename = "GBTN") )]
108082	CodeGBTN,
108083	#[cfg_attr( feature = "derive_serde", serde(rename = "GRAM") )]
108084	CodeGRAM,
108085	#[cfg_attr( feature = "derive_serde", serde(rename = "INCH") )]
108086	CodeINCH,
108087	#[cfg_attr( feature = "derive_serde", serde(rename = "KILO") )]
108088	CodeKILO,
108089	#[cfg_attr( feature = "derive_serde", serde(rename = "KMET") )]
108090	CodeKMET,
108091	#[cfg_attr( feature = "derive_serde", serde(rename = "LITR") )]
108092	CodeLITR,
108093	#[cfg_attr( feature = "derive_serde", serde(rename = "METR") )]
108094	CodeMETR,
108095	#[cfg_attr( feature = "derive_serde", serde(rename = "TONE") )]
108096	CodeTONE,
108097	#[cfg_attr( feature = "derive_serde", serde(rename = "MILE") )]
108098	CodeMILE,
108099	#[cfg_attr( feature = "derive_serde", serde(rename = "MMET") )]
108100	CodeMMET,
108101	#[cfg_attr( feature = "derive_serde", serde(rename = "MILI") )]
108102	CodeMILI,
108103	#[cfg_attr( feature = "derive_serde", serde(rename = "PUND") )]
108104	CodePUND,
108105	#[cfg_attr( feature = "derive_serde", serde(rename = "USOU") )]
108106	CodeUSOU,
108107	#[cfg_attr( feature = "derive_serde", serde(rename = "SCMT") )]
108108	CodeSCMT,
108109	#[cfg_attr( feature = "derive_serde", serde(rename = "SQFO") )]
108110	CodeSQFO,
108111	#[cfg_attr( feature = "derive_serde", serde(rename = "SQIN") )]
108112	CodeSQIN,
108113	#[cfg_attr( feature = "derive_serde", serde(rename = "SQKI") )]
108114	CodeSQKI,
108115	#[cfg_attr( feature = "derive_serde", serde(rename = "SMET") )]
108116	CodeSMET,
108117	#[cfg_attr( feature = "derive_serde", serde(rename = "SQMI") )]
108118	CodeSQMI,
108119	#[cfg_attr( feature = "derive_serde", serde(rename = "SMIL") )]
108120	CodeSMIL,
108121	#[cfg_attr( feature = "derive_serde", serde(rename = "SQYA") )]
108122	CodeSQYA,
108123	#[cfg_attr( feature = "derive_serde", serde(rename = "USBA") )]
108124	CodeUSBA,
108125	#[cfg_attr( feature = "derive_serde", serde(rename = "USFO") )]
108126	CodeUSFO,
108127	#[cfg_attr( feature = "derive_serde", serde(rename = "USGA") )]
108128	CodeUSGA,
108129	#[cfg_attr( feature = "derive_serde", serde(rename = "USPI") )]
108130	CodeUSPI,
108131	#[cfg_attr( feature = "derive_serde", serde(rename = "USQA") )]
108132	CodeUSQA,
108133	#[cfg_attr( feature = "derive_serde", serde(rename = "USTN") )]
108134	CodeUSTN,
108135	#[cfg_attr( feature = "derive_serde", serde(rename = "YARD") )]
108136	CodeYARD,
108137	#[cfg_attr( feature = "derive_serde", serde(rename = "GBOU") )]
108138	CodeGBOU,
108139	#[cfg_attr( feature = "derive_serde", serde(rename = "ACRE") )]
108140	CodeACRE,
108141	#[cfg_attr( feature = "derive_serde", serde(rename = "ARES") )]
108142	CodeARES,
108143	#[cfg_attr( feature = "derive_serde", serde(rename = "HECT") )]
108144	CodeHECT,
108145}
108146
108147impl UnitOfMeasure9Code {
108148	pub fn validate(&self) -> Result<(), ValidationError> {
108149		Ok(())
108150	}
108151}
108152
108153
108154// UnitOrFaceAmount1Choice ...
108155#[cfg_attr(feature = "derive_debug", derive(Debug))]
108156#[cfg_attr(feature = "derive_default", derive(Default))]
108157#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108158#[cfg_attr(feature = "derive_clone", derive(Clone))]
108159#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108160pub struct UnitOrFaceAmount1Choice {
108161	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit", skip_serializing_if = "Option::is_none") )]
108162	pub unit: Option<f64>,
108163	#[cfg_attr( feature = "derive_serde", serde(rename = "FaceAmt", skip_serializing_if = "Option::is_none") )]
108164	pub face_amt: Option<ActiveCurrencyAndAmount>,
108165}
108166
108167impl UnitOrFaceAmount1Choice {
108168	pub fn validate(&self) -> Result<(), ValidationError> {
108169		if let Some(ref val) = self.face_amt { val.validate()? }
108170		Ok(())
108171	}
108172}
108173
108174
108175// UnitPrice15 ...
108176#[cfg_attr(feature = "derive_debug", derive(Debug))]
108177#[cfg_attr(feature = "derive_default", derive(Default))]
108178#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108179#[cfg_attr(feature = "derive_clone", derive(Clone))]
108180#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108181pub struct UnitPrice15 {
108182	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
108183	pub tp: Option<TypeOfPrice9Code>,
108184	#[cfg_attr( feature = "derive_serde", serde(rename = "XtndedTp", skip_serializing_if = "Option::is_none") )]
108185	pub xtnded_tp: Option<String>,
108186	#[cfg_attr( feature = "derive_serde", serde(rename = "PricMtd", skip_serializing_if = "Option::is_none") )]
108187	pub pric_mtd: Option<PriceMethod1Code>,
108188	#[cfg_attr( feature = "derive_serde", serde(rename = "ValInInvstmtCcy") )]
108189	pub val_in_invstmt_ccy: Vec<PriceValue1>,
108190	#[cfg_attr( feature = "derive_serde", serde(rename = "ValInAltrntvCcy", skip_serializing_if = "Option::is_none") )]
108191	pub val_in_altrntv_ccy: Option<Vec<PriceValue1>>,
108192	#[cfg_attr( feature = "derive_serde", serde(rename = "ForExctnInd") )]
108193	pub for_exctn_ind: bool,
108194	#[cfg_attr( feature = "derive_serde", serde(rename = "CumDvddInd") )]
108195	pub cum_dvdd_ind: bool,
108196	#[cfg_attr( feature = "derive_serde", serde(rename = "ClctnBsis", skip_serializing_if = "Option::is_none") )]
108197	pub clctn_bsis: Option<f64>,
108198	#[cfg_attr( feature = "derive_serde", serde(rename = "EstmtdPricInd") )]
108199	pub estmtd_pric_ind: bool,
108200	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfDaysAcrd", skip_serializing_if = "Option::is_none") )]
108201	pub nb_of_days_acrd: Option<f64>,
108202	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxblIncmPerShr", skip_serializing_if = "Option::is_none") )]
108203	pub taxbl_incm_per_shr: Option<ActiveOrHistoricCurrencyAnd13DecimalAmount>,
108204	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxblIncmPerShrClctd", skip_serializing_if = "Option::is_none") )]
108205	pub taxbl_incm_per_shr_clctd: Option<TaxableIncomePerShareCalculated2Code>,
108206	#[cfg_attr( feature = "derive_serde", serde(rename = "XtndedTaxblIncmPerShrClctd", skip_serializing_if = "Option::is_none") )]
108207	pub xtnded_taxbl_incm_per_shr_clctd: Option<String>,
108208	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxblIncmPerDvdd", skip_serializing_if = "Option::is_none") )]
108209	pub taxbl_incm_per_dvdd: Option<ActiveOrHistoricCurrencyAnd13DecimalAmount>,
108210	#[cfg_attr( feature = "derive_serde", serde(rename = "EUDvddSts", skip_serializing_if = "Option::is_none") )]
108211	pub eu_dvdd_sts: Option<EUDividendStatus1Code>,
108212	#[cfg_attr( feature = "derive_serde", serde(rename = "XtndedEUDvddSts", skip_serializing_if = "Option::is_none") )]
108213	pub xtnded_eu_dvdd_sts: Option<String>,
108214	#[cfg_attr( feature = "derive_serde", serde(rename = "ChrgDtls", skip_serializing_if = "Option::is_none") )]
108215	pub chrg_dtls: Option<Vec<Charge15>>,
108216	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxLbltyDtls", skip_serializing_if = "Option::is_none") )]
108217	pub tax_lblty_dtls: Option<Vec<Tax17>>,
108218	#[cfg_attr( feature = "derive_serde", serde(rename = "TaxRfndDtls", skip_serializing_if = "Option::is_none") )]
108219	pub tax_rfnd_dtls: Option<Vec<Tax17>>,
108220}
108221
108222impl UnitPrice15 {
108223	pub fn validate(&self) -> Result<(), ValidationError> {
108224		if let Some(ref val) = self.tp { val.validate()? }
108225		if let Some(ref val) = self.xtnded_tp {
108226			if val.chars().count() < 1 {
108227				return Err(ValidationError::new(1001, "xtnded_tp is shorter than the minimum length of 1".to_string()));
108228			}
108229			if val.chars().count() > 350 {
108230				return Err(ValidationError::new(1002, "xtnded_tp exceeds the maximum length of 350".to_string()));
108231			}
108232		}
108233		if let Some(ref val) = self.pric_mtd { val.validate()? }
108234		for item in &self.val_in_invstmt_ccy { item.validate()? }
108235		if let Some(ref vec) = self.val_in_altrntv_ccy { for item in vec { item.validate()? } }
108236		if let Some(ref val) = self.taxbl_incm_per_shr { val.validate()? }
108237		if let Some(ref val) = self.taxbl_incm_per_shr_clctd { val.validate()? }
108238		if let Some(ref val) = self.xtnded_taxbl_incm_per_shr_clctd {
108239			if val.chars().count() < 1 {
108240				return Err(ValidationError::new(1001, "xtnded_taxbl_incm_per_shr_clctd is shorter than the minimum length of 1".to_string()));
108241			}
108242			if val.chars().count() > 350 {
108243				return Err(ValidationError::new(1002, "xtnded_taxbl_incm_per_shr_clctd exceeds the maximum length of 350".to_string()));
108244			}
108245		}
108246		if let Some(ref val) = self.taxbl_incm_per_dvdd { val.validate()? }
108247		if let Some(ref val) = self.eu_dvdd_sts { val.validate()? }
108248		if let Some(ref val) = self.xtnded_eu_dvdd_sts {
108249			if val.chars().count() < 1 {
108250				return Err(ValidationError::new(1001, "xtnded_eu_dvdd_sts is shorter than the minimum length of 1".to_string()));
108251			}
108252			if val.chars().count() > 350 {
108253				return Err(ValidationError::new(1002, "xtnded_eu_dvdd_sts exceeds the maximum length of 350".to_string()));
108254			}
108255		}
108256		if let Some(ref vec) = self.chrg_dtls { for item in vec { item.validate()? } }
108257		if let Some(ref vec) = self.tax_lblty_dtls { for item in vec { item.validate()? } }
108258		if let Some(ref vec) = self.tax_rfnd_dtls { for item in vec { item.validate()? } }
108259		Ok(())
108260	}
108261}
108262
108263
108264// UnitPrice19 ...
108265#[cfg_attr(feature = "derive_debug", derive(Debug))]
108266#[cfg_attr(feature = "derive_default", derive(Default))]
108267#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108268#[cfg_attr(feature = "derive_clone", derive(Clone))]
108269#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108270pub struct UnitPrice19 {
108271	#[cfg_attr( feature = "derive_serde", serde(rename = "PricTp") )]
108272	pub pric_tp: UnitPriceType2Choice,
108273	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
108274	pub val: PriceValue1,
108275}
108276
108277impl UnitPrice19 {
108278	pub fn validate(&self) -> Result<(), ValidationError> {
108279		self.pric_tp.validate()?;
108280		self.val.validate()?;
108281		Ok(())
108282	}
108283}
108284
108285
108286// UnitPriceType2Choice ...
108287#[cfg_attr(feature = "derive_debug", derive(Debug))]
108288#[cfg_attr(feature = "derive_default", derive(Default))]
108289#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108290#[cfg_attr(feature = "derive_clone", derive(Clone))]
108291#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108292pub struct UnitPriceType2Choice {
108293	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
108294	pub cd: Option<TypeOfPrice10Code>,
108295	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
108296	pub prtry: Option<GenericIdentification47>,
108297}
108298
108299impl UnitPriceType2Choice {
108300	pub fn validate(&self) -> Result<(), ValidationError> {
108301		if let Some(ref val) = self.cd { val.validate()? }
108302		if let Some(ref val) = self.prtry { val.validate()? }
108303		Ok(())
108304	}
108305}
108306
108307
108308// UnitsOrAmount1Choice ...
108309#[cfg_attr(feature = "derive_debug", derive(Debug))]
108310#[cfg_attr(feature = "derive_default", derive(Default))]
108311#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108312#[cfg_attr(feature = "derive_clone", derive(Clone))]
108313#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108314pub struct UnitsOrAmount1Choice {
108315	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
108316	pub amt: Option<ActiveCurrencyAndAmount>,
108317	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit", skip_serializing_if = "Option::is_none") )]
108318	pub unit: Option<f64>,
108319}
108320
108321impl UnitsOrAmount1Choice {
108322	pub fn validate(&self) -> Result<(), ValidationError> {
108323		if let Some(ref val) = self.amt { val.validate()? }
108324		Ok(())
108325	}
108326}
108327
108328
108329// UnitsOrAmountOrPercentage1Choice ...
108330#[cfg_attr(feature = "derive_debug", derive(Debug))]
108331#[cfg_attr(feature = "derive_default", derive(Default))]
108332#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108333#[cfg_attr(feature = "derive_clone", derive(Clone))]
108334#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108335pub struct UnitsOrAmountOrPercentage1Choice {
108336	#[cfg_attr( feature = "derive_serde", serde(rename = "Amt", skip_serializing_if = "Option::is_none") )]
108337	pub amt: Option<ActiveCurrencyAndAmount>,
108338	#[cfg_attr( feature = "derive_serde", serde(rename = "Unit", skip_serializing_if = "Option::is_none") )]
108339	pub unit: Option<f64>,
108340	#[cfg_attr( feature = "derive_serde", serde(rename = "Pctg", skip_serializing_if = "Option::is_none") )]
108341	pub pctg: Option<f64>,
108342}
108343
108344impl UnitsOrAmountOrPercentage1Choice {
108345	pub fn validate(&self) -> Result<(), ValidationError> {
108346		if let Some(ref val) = self.amt { val.validate()? }
108347		Ok(())
108348	}
108349}
108350
108351
108352// UnmatchedStatusReason1Code ...
108353#[cfg_attr(feature = "derive_debug", derive(Debug))]
108354#[cfg_attr(feature = "derive_default", derive(Default))]
108355#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108356#[cfg_attr(feature = "derive_clone", derive(Clone))]
108357#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108358pub enum UnmatchedStatusReason1Code {
108359	#[cfg_attr(feature = "derive_default", default)]
108360	#[cfg_attr( feature = "derive_serde", serde(rename = "CMIS") )]
108361	CodeCMIS,
108362	#[cfg_attr( feature = "derive_serde", serde(rename = "DDAT") )]
108363	CodeDDAT,
108364	#[cfg_attr( feature = "derive_serde", serde(rename = "DELN") )]
108365	CodeDELN,
108366	#[cfg_attr( feature = "derive_serde", serde(rename = "DEPT") )]
108367	CodeDEPT,
108368	#[cfg_attr( feature = "derive_serde", serde(rename = "DMON") )]
108369	CodeDMON,
108370	#[cfg_attr( feature = "derive_serde", serde(rename = "DDEA") )]
108371	CodeDDEA,
108372	#[cfg_attr( feature = "derive_serde", serde(rename = "DQUA") )]
108373	CodeDQUA,
108374	#[cfg_attr( feature = "derive_serde", serde(rename = "CADE") )]
108375	CodeCADE,
108376	#[cfg_attr( feature = "derive_serde", serde(rename = "SETR") )]
108377	CodeSETR,
108378	#[cfg_attr( feature = "derive_serde", serde(rename = "DSEC") )]
108379	CodeDSEC,
108380	#[cfg_attr( feature = "derive_serde", serde(rename = "VASU") )]
108381	CodeVASU,
108382	#[cfg_attr( feature = "derive_serde", serde(rename = "DTRA") )]
108383	CodeDTRA,
108384	#[cfg_attr( feature = "derive_serde", serde(rename = "RSPR") )]
108385	CodeRSPR,
108386	#[cfg_attr( feature = "derive_serde", serde(rename = "REPO") )]
108387	CodeREPO,
108388	#[cfg_attr( feature = "derive_serde", serde(rename = "CLAT") )]
108389	CodeCLAT,
108390	#[cfg_attr( feature = "derive_serde", serde(rename = "RERT") )]
108391	CodeRERT,
108392	#[cfg_attr( feature = "derive_serde", serde(rename = "REPA") )]
108393	CodeREPA,
108394	#[cfg_attr( feature = "derive_serde", serde(rename = "REPP") )]
108395	CodeREPP,
108396	#[cfg_attr( feature = "derive_serde", serde(rename = "PHYS") )]
108397	CodePHYS,
108398	#[cfg_attr( feature = "derive_serde", serde(rename = "IIND") )]
108399	CodeIIND,
108400	#[cfg_attr( feature = "derive_serde", serde(rename = "FRAP") )]
108401	CodeFRAP,
108402	#[cfg_attr( feature = "derive_serde", serde(rename = "PLCE") )]
108403	CodePLCE,
108404	#[cfg_attr( feature = "derive_serde", serde(rename = "PODU") )]
108405	CodePODU,
108406	#[cfg_attr( feature = "derive_serde", serde(rename = "FORF") )]
108407	CodeFORF,
108408	#[cfg_attr( feature = "derive_serde", serde(rename = "REGD") )]
108409	CodeREGD,
108410	#[cfg_attr( feature = "derive_serde", serde(rename = "RTGS") )]
108411	CodeRTGS,
108412	#[cfg_attr( feature = "derive_serde", serde(rename = "ICAG") )]
108413	CodeICAG,
108414	#[cfg_attr( feature = "derive_serde", serde(rename = "CPCA") )]
108415	CodeCPCA,
108416	#[cfg_attr( feature = "derive_serde", serde(rename = "CHAR") )]
108417	CodeCHAR,
108418	#[cfg_attr( feature = "derive_serde", serde(rename = "IEXE") )]
108419	CodeIEXE,
108420	#[cfg_attr( feature = "derive_serde", serde(rename = "NCRR") )]
108421	CodeNCRR,
108422	#[cfg_attr( feature = "derive_serde", serde(rename = "NMAS") )]
108423	CodeNMAS,
108424	#[cfg_attr( feature = "derive_serde", serde(rename = "SAFE") )]
108425	CodeSAFE,
108426	#[cfg_attr( feature = "derive_serde", serde(rename = "DTRD") )]
108427	CodeDTRD,
108428	#[cfg_attr( feature = "derive_serde", serde(rename = "LATE") )]
108429	CodeLATE,
108430	#[cfg_attr( feature = "derive_serde", serde(rename = "TERM") )]
108431	CodeTERM,
108432	#[cfg_attr( feature = "derive_serde", serde(rename = "ICUS") )]
108433	CodeICUS,
108434}
108435
108436impl UnmatchedStatusReason1Code {
108437	pub fn validate(&self) -> Result<(), ValidationError> {
108438		Ok(())
108439	}
108440}
108441
108442
108443// UnsecuredMarketReport4Choice ...
108444#[cfg_attr(feature = "derive_debug", derive(Debug))]
108445#[cfg_attr(feature = "derive_default", derive(Default))]
108446#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108447#[cfg_attr(feature = "derive_clone", derive(Clone))]
108448#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108449pub struct UnsecuredMarketReport4Choice {
108450	#[cfg_attr( feature = "derive_serde", serde(rename = "DataSetActn", skip_serializing_if = "Option::is_none") )]
108451	pub data_set_actn: Option<ReportPeriodActivity3Code>,
108452	#[cfg_attr( feature = "derive_serde", serde(rename = "Tx", skip_serializing_if = "Option::is_none") )]
108453	pub tx: Option<Vec<UnsecuredMarketTransaction4>>,
108454}
108455
108456impl UnsecuredMarketReport4Choice {
108457	pub fn validate(&self) -> Result<(), ValidationError> {
108458		if let Some(ref val) = self.data_set_actn { val.validate()? }
108459		if let Some(ref vec) = self.tx { for item in vec { item.validate()? } }
108460		Ok(())
108461	}
108462}
108463
108464
108465// UnsecuredMarketTransaction4 ...
108466#[cfg_attr(feature = "derive_debug", derive(Debug))]
108467#[cfg_attr(feature = "derive_default", derive(Default))]
108468#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108469#[cfg_attr(feature = "derive_clone", derive(Clone))]
108470#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108471pub struct UnsecuredMarketTransaction4 {
108472	#[cfg_attr( feature = "derive_serde", serde(rename = "RptdTxSts") )]
108473	pub rptd_tx_sts: TransactionOperationType1Code,
108474	#[cfg_attr( feature = "derive_serde", serde(rename = "NvtnSts", skip_serializing_if = "Option::is_none") )]
108475	pub nvtn_sts: Option<NovationStatus1Code>,
108476	#[cfg_attr( feature = "derive_serde", serde(rename = "BrnchId", skip_serializing_if = "Option::is_none") )]
108477	pub brnch_id: Option<String>,
108478	#[cfg_attr( feature = "derive_serde", serde(rename = "UnqTxIdr", skip_serializing_if = "Option::is_none") )]
108479	pub unq_tx_idr: Option<String>,
108480	#[cfg_attr( feature = "derive_serde", serde(rename = "PrtryTxId") )]
108481	pub prtry_tx_id: String,
108482	#[cfg_attr( feature = "derive_serde", serde(rename = "RltdPrtryTxId", skip_serializing_if = "Option::is_none") )]
108483	pub rltd_prtry_tx_id: Option<String>,
108484	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyPrtryTxId", skip_serializing_if = "Option::is_none") )]
108485	pub ctr_pty_prtry_tx_id: Option<String>,
108486	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrPtyId") )]
108487	pub ctr_pty_id: CounterpartyIdentification3Choice,
108488	#[cfg_attr( feature = "derive_serde", serde(rename = "TradDt") )]
108489	pub trad_dt: DateAndDateTimeChoice,
108490	#[cfg_attr( feature = "derive_serde", serde(rename = "SttlmDt") )]
108491	pub sttlm_dt: String,
108492	#[cfg_attr( feature = "derive_serde", serde(rename = "MtrtyDt") )]
108493	pub mtrty_dt: String,
108494	#[cfg_attr( feature = "derive_serde", serde(rename = "TxTp") )]
108495	pub tx_tp: MoneyMarketTransactionType1Code,
108496	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrmTp") )]
108497	pub instrm_tp: FinancialInstrumentProductType1Code,
108498	#[cfg_attr( feature = "derive_serde", serde(rename = "TxNmnlAmt") )]
108499	pub tx_nmnl_amt: ActiveCurrencyAndAmount,
108500	#[cfg_attr( feature = "derive_serde", serde(rename = "DealPric") )]
108501	pub deal_pric: f64,
108502	#[cfg_attr( feature = "derive_serde", serde(rename = "RateTp") )]
108503	pub rate_tp: InterestRateType1Code,
108504	#[cfg_attr( feature = "derive_serde", serde(rename = "DealRate", skip_serializing_if = "Option::is_none") )]
108505	pub deal_rate: Option<f64>,
108506	#[cfg_attr( feature = "derive_serde", serde(rename = "FltgRateNote", skip_serializing_if = "Option::is_none") )]
108507	pub fltg_rate_note: Option<FloatingRateNote2>,
108508	#[cfg_attr( feature = "derive_serde", serde(rename = "BrkrdDeal", skip_serializing_if = "Option::is_none") )]
108509	pub brkrd_deal: Option<BrokeredDeal1Code>,
108510	#[cfg_attr( feature = "derive_serde", serde(rename = "CallPutOptn", skip_serializing_if = "Option::is_none") )]
108511	pub call_put_optn: Option<Vec<Option12>>,
108512	#[cfg_attr( feature = "derive_serde", serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none") )]
108513	pub splmtry_data: Option<Vec<SupplementaryData1>>,
108514}
108515
108516impl UnsecuredMarketTransaction4 {
108517	pub fn validate(&self) -> Result<(), ValidationError> {
108518		self.rptd_tx_sts.validate()?;
108519		if let Some(ref val) = self.nvtn_sts { val.validate()? }
108520		if let Some(ref val) = self.brnch_id {
108521			let pattern = Regex::new("[A-Z0-9]{18,18}[0-9]{2,2}").unwrap();
108522			if !pattern.is_match(val) {
108523				return Err(ValidationError::new(1005, "brnch_id does not match the required pattern".to_string()));
108524			}
108525		}
108526		if let Some(ref val) = self.unq_tx_idr {
108527			if val.chars().count() < 1 {
108528				return Err(ValidationError::new(1001, "unq_tx_idr is shorter than the minimum length of 1".to_string()));
108529			}
108530			if val.chars().count() > 105 {
108531				return Err(ValidationError::new(1002, "unq_tx_idr exceeds the maximum length of 105".to_string()));
108532			}
108533		}
108534		if self.prtry_tx_id.chars().count() < 1 {
108535			return Err(ValidationError::new(1001, "prtry_tx_id is shorter than the minimum length of 1".to_string()));
108536		}
108537		if self.prtry_tx_id.chars().count() > 105 {
108538			return Err(ValidationError::new(1002, "prtry_tx_id exceeds the maximum length of 105".to_string()));
108539		}
108540		if let Some(ref val) = self.rltd_prtry_tx_id {
108541			if val.chars().count() < 1 {
108542				return Err(ValidationError::new(1001, "rltd_prtry_tx_id is shorter than the minimum length of 1".to_string()));
108543			}
108544			if val.chars().count() > 105 {
108545				return Err(ValidationError::new(1002, "rltd_prtry_tx_id exceeds the maximum length of 105".to_string()));
108546			}
108547		}
108548		if let Some(ref val) = self.ctr_pty_prtry_tx_id {
108549			if val.chars().count() < 1 {
108550				return Err(ValidationError::new(1001, "ctr_pty_prtry_tx_id is shorter than the minimum length of 1".to_string()));
108551			}
108552			if val.chars().count() > 105 {
108553				return Err(ValidationError::new(1002, "ctr_pty_prtry_tx_id exceeds the maximum length of 105".to_string()));
108554			}
108555		}
108556		self.ctr_pty_id.validate()?;
108557		self.trad_dt.validate()?;
108558		self.tx_tp.validate()?;
108559		self.instrm_tp.validate()?;
108560		self.tx_nmnl_amt.validate()?;
108561		self.rate_tp.validate()?;
108562		if let Some(ref val) = self.fltg_rate_note { val.validate()? }
108563		if let Some(ref val) = self.brkrd_deal { val.validate()? }
108564		if let Some(ref vec) = self.call_put_optn { for item in vec { item.validate()? } }
108565		if let Some(ref vec) = self.splmtry_data { for item in vec { item.validate()? } }
108566		Ok(())
108567	}
108568}
108569
108570
108571// UpdateLogAddress2 ...
108572#[cfg_attr(feature = "derive_debug", derive(Debug))]
108573#[cfg_attr(feature = "derive_default", derive(Default))]
108574#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108575#[cfg_attr(feature = "derive_clone", derive(Clone))]
108576#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108577pub struct UpdateLogAddress2 {
108578	#[cfg_attr( feature = "derive_serde", serde(rename = "Od") )]
108579	pub od: PostalAddress28,
108580	#[cfg_attr( feature = "derive_serde", serde(rename = "New") )]
108581	pub new: PostalAddress28,
108582}
108583
108584impl UpdateLogAddress2 {
108585	pub fn validate(&self) -> Result<(), ValidationError> {
108586		self.od.validate()?;
108587		self.new.validate()?;
108588		Ok(())
108589	}
108590}
108591
108592
108593// UpdateLogContact2 ...
108594#[cfg_attr(feature = "derive_debug", derive(Debug))]
108595#[cfg_attr(feature = "derive_default", derive(Default))]
108596#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108597#[cfg_attr(feature = "derive_clone", derive(Clone))]
108598#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108599pub struct UpdateLogContact2 {
108600	#[cfg_attr( feature = "derive_serde", serde(rename = "Od") )]
108601	pub od: Contact14,
108602	#[cfg_attr( feature = "derive_serde", serde(rename = "New") )]
108603	pub new: Contact14,
108604}
108605
108606impl UpdateLogContact2 {
108607	pub fn validate(&self) -> Result<(), ValidationError> {
108608		self.od.validate()?;
108609		self.new.validate()?;
108610		Ok(())
108611	}
108612}
108613
108614
108615// UpdateLogDate1 ...
108616#[cfg_attr(feature = "derive_debug", derive(Debug))]
108617#[cfg_attr(feature = "derive_default", derive(Default))]
108618#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108619#[cfg_attr(feature = "derive_clone", derive(Clone))]
108620#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108621pub struct UpdateLogDate1 {
108622	#[cfg_attr( feature = "derive_serde", serde(rename = "Od") )]
108623	pub od: String,
108624	#[cfg_attr( feature = "derive_serde", serde(rename = "New") )]
108625	pub new: String,
108626}
108627
108628impl UpdateLogDate1 {
108629	pub fn validate(&self) -> Result<(), ValidationError> {
108630		Ok(())
108631	}
108632}
108633
108634
108635// UpdateLogMarketSpecificAttribute1 ...
108636#[cfg_attr(feature = "derive_debug", derive(Debug))]
108637#[cfg_attr(feature = "derive_default", derive(Default))]
108638#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108639#[cfg_attr(feature = "derive_clone", derive(Clone))]
108640#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108641pub struct UpdateLogMarketSpecificAttribute1 {
108642	#[cfg_attr( feature = "derive_serde", serde(rename = "Od") )]
108643	pub od: MarketSpecificAttribute1,
108644	#[cfg_attr( feature = "derive_serde", serde(rename = "New") )]
108645	pub new: MarketSpecificAttribute1,
108646}
108647
108648impl UpdateLogMarketSpecificAttribute1 {
108649	pub fn validate(&self) -> Result<(), ValidationError> {
108650		self.od.validate()?;
108651		self.new.validate()?;
108652		Ok(())
108653	}
108654}
108655
108656
108657// UpdateLogPartyLockStatus1 ...
108658#[cfg_attr(feature = "derive_debug", derive(Debug))]
108659#[cfg_attr(feature = "derive_default", derive(Default))]
108660#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108661#[cfg_attr(feature = "derive_clone", derive(Clone))]
108662#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108663pub struct UpdateLogPartyLockStatus1 {
108664	#[cfg_attr( feature = "derive_serde", serde(rename = "Od") )]
108665	pub od: PartyLockStatus1,
108666	#[cfg_attr( feature = "derive_serde", serde(rename = "New") )]
108667	pub new: PartyLockStatus1,
108668}
108669
108670impl UpdateLogPartyLockStatus1 {
108671	pub fn validate(&self) -> Result<(), ValidationError> {
108672		self.od.validate()?;
108673		self.new.validate()?;
108674		Ok(())
108675	}
108676}
108677
108678
108679// UpdateLogPartyName1 ...
108680#[cfg_attr(feature = "derive_debug", derive(Debug))]
108681#[cfg_attr(feature = "derive_default", derive(Default))]
108682#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108683#[cfg_attr(feature = "derive_clone", derive(Clone))]
108684#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108685pub struct UpdateLogPartyName1 {
108686	#[cfg_attr( feature = "derive_serde", serde(rename = "Od") )]
108687	pub od: PartyName4,
108688	#[cfg_attr( feature = "derive_serde", serde(rename = "New") )]
108689	pub new: PartyName4,
108690}
108691
108692impl UpdateLogPartyName1 {
108693	pub fn validate(&self) -> Result<(), ValidationError> {
108694		self.od.validate()?;
108695		self.new.validate()?;
108696		Ok(())
108697	}
108698}
108699
108700
108701// UpdateLogPartyRecord2Choice ...
108702#[cfg_attr(feature = "derive_debug", derive(Debug))]
108703#[cfg_attr(feature = "derive_default", derive(Default))]
108704#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108705#[cfg_attr(feature = "derive_clone", derive(Clone))]
108706#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108707pub struct UpdateLogPartyRecord2Choice {
108708	#[cfg_attr( feature = "derive_serde", serde(rename = "Adr", skip_serializing_if = "Option::is_none") )]
108709	pub adr: Option<UpdateLogAddress2>,
108710	#[cfg_attr( feature = "derive_serde", serde(rename = "CtctDtls", skip_serializing_if = "Option::is_none") )]
108711	pub ctct_dtls: Option<UpdateLogContact2>,
108712	#[cfg_attr( feature = "derive_serde", serde(rename = "OpngDt", skip_serializing_if = "Option::is_none") )]
108713	pub opng_dt: Option<UpdateLogDate1>,
108714	#[cfg_attr( feature = "derive_serde", serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none") )]
108715	pub clsg_dt: Option<UpdateLogDate1>,
108716	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
108717	pub tp: Option<UpdateLogSystemPartyType1>,
108718	#[cfg_attr( feature = "derive_serde", serde(rename = "TechAdr", skip_serializing_if = "Option::is_none") )]
108719	pub tech_adr: Option<UpdateLogTechnicalAddress1>,
108720	#[cfg_attr( feature = "derive_serde", serde(rename = "MktSpcfcAttr", skip_serializing_if = "Option::is_none") )]
108721	pub mkt_spcfc_attr: Option<UpdateLogMarketSpecificAttribute1>,
108722	#[cfg_attr( feature = "derive_serde", serde(rename = "Nm", skip_serializing_if = "Option::is_none") )]
108723	pub nm: Option<UpdateLogPartyName1>,
108724	#[cfg_attr( feature = "derive_serde", serde(rename = "ResTp", skip_serializing_if = "Option::is_none") )]
108725	pub res_tp: Option<UpdateLogResidenceType1>,
108726	#[cfg_attr( feature = "derive_serde", serde(rename = "LckSts", skip_serializing_if = "Option::is_none") )]
108727	pub lck_sts: Option<UpdateLogPartyLockStatus1>,
108728	#[cfg_attr( feature = "derive_serde", serde(rename = "Rstrctn", skip_serializing_if = "Option::is_none") )]
108729	pub rstrctn: Option<UpdateLogRestriction1>,
108730	#[cfg_attr( feature = "derive_serde", serde(rename = "Othr", skip_serializing_if = "Option::is_none") )]
108731	pub othr: Option<Vec<UpdateLogProprietary1>>,
108732}
108733
108734impl UpdateLogPartyRecord2Choice {
108735	pub fn validate(&self) -> Result<(), ValidationError> {
108736		if let Some(ref val) = self.adr { val.validate()? }
108737		if let Some(ref val) = self.ctct_dtls { val.validate()? }
108738		if let Some(ref val) = self.opng_dt { val.validate()? }
108739		if let Some(ref val) = self.clsg_dt { val.validate()? }
108740		if let Some(ref val) = self.tp { val.validate()? }
108741		if let Some(ref val) = self.tech_adr { val.validate()? }
108742		if let Some(ref val) = self.mkt_spcfc_attr { val.validate()? }
108743		if let Some(ref val) = self.nm { val.validate()? }
108744		if let Some(ref val) = self.res_tp { val.validate()? }
108745		if let Some(ref val) = self.lck_sts { val.validate()? }
108746		if let Some(ref val) = self.rstrctn { val.validate()? }
108747		if let Some(ref vec) = self.othr { for item in vec { item.validate()? } }
108748		Ok(())
108749	}
108750}
108751
108752
108753// UpdateLogProprietary1 ...
108754#[cfg_attr(feature = "derive_debug", derive(Debug))]
108755#[cfg_attr(feature = "derive_default", derive(Default))]
108756#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108757#[cfg_attr(feature = "derive_clone", derive(Clone))]
108758#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108759pub struct UpdateLogProprietary1 {
108760	#[cfg_attr( feature = "derive_serde", serde(rename = "FldNm") )]
108761	pub fld_nm: String,
108762	#[cfg_attr( feature = "derive_serde", serde(rename = "OdFldVal") )]
108763	pub od_fld_val: String,
108764	#[cfg_attr( feature = "derive_serde", serde(rename = "NewFldVal") )]
108765	pub new_fld_val: String,
108766}
108767
108768impl UpdateLogProprietary1 {
108769	pub fn validate(&self) -> Result<(), ValidationError> {
108770		if self.fld_nm.chars().count() < 1 {
108771			return Err(ValidationError::new(1001, "fld_nm is shorter than the minimum length of 1".to_string()));
108772		}
108773		if self.fld_nm.chars().count() > 35 {
108774			return Err(ValidationError::new(1002, "fld_nm exceeds the maximum length of 35".to_string()));
108775		}
108776		if self.od_fld_val.chars().count() < 1 {
108777			return Err(ValidationError::new(1001, "od_fld_val is shorter than the minimum length of 1".to_string()));
108778		}
108779		if self.od_fld_val.chars().count() > 350 {
108780			return Err(ValidationError::new(1002, "od_fld_val exceeds the maximum length of 350".to_string()));
108781		}
108782		if self.new_fld_val.chars().count() < 1 {
108783			return Err(ValidationError::new(1001, "new_fld_val is shorter than the minimum length of 1".to_string()));
108784		}
108785		if self.new_fld_val.chars().count() > 350 {
108786			return Err(ValidationError::new(1002, "new_fld_val exceeds the maximum length of 350".to_string()));
108787		}
108788		Ok(())
108789	}
108790}
108791
108792
108793// UpdateLogResidenceType1 ...
108794#[cfg_attr(feature = "derive_debug", derive(Debug))]
108795#[cfg_attr(feature = "derive_default", derive(Default))]
108796#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108797#[cfg_attr(feature = "derive_clone", derive(Clone))]
108798#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108799pub struct UpdateLogResidenceType1 {
108800	#[cfg_attr( feature = "derive_serde", serde(rename = "Od") )]
108801	pub od: ResidenceType1Code,
108802	#[cfg_attr( feature = "derive_serde", serde(rename = "New") )]
108803	pub new: ResidenceType1Code,
108804}
108805
108806impl UpdateLogResidenceType1 {
108807	pub fn validate(&self) -> Result<(), ValidationError> {
108808		self.od.validate()?;
108809		self.new.validate()?;
108810		Ok(())
108811	}
108812}
108813
108814
108815// UpdateLogRestriction1 ...
108816#[cfg_attr(feature = "derive_debug", derive(Debug))]
108817#[cfg_attr(feature = "derive_default", derive(Default))]
108818#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108819#[cfg_attr(feature = "derive_clone", derive(Clone))]
108820#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108821pub struct UpdateLogRestriction1 {
108822	#[cfg_attr( feature = "derive_serde", serde(rename = "Od") )]
108823	pub od: Restriction1,
108824	#[cfg_attr( feature = "derive_serde", serde(rename = "New") )]
108825	pub new: Restriction1,
108826}
108827
108828impl UpdateLogRestriction1 {
108829	pub fn validate(&self) -> Result<(), ValidationError> {
108830		self.od.validate()?;
108831		self.new.validate()?;
108832		Ok(())
108833	}
108834}
108835
108836
108837// UpdateLogSystemPartyType1 ...
108838#[cfg_attr(feature = "derive_debug", derive(Debug))]
108839#[cfg_attr(feature = "derive_default", derive(Default))]
108840#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108841#[cfg_attr(feature = "derive_clone", derive(Clone))]
108842#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108843pub struct UpdateLogSystemPartyType1 {
108844	#[cfg_attr( feature = "derive_serde", serde(rename = "Od") )]
108845	pub od: SystemPartyType1Choice,
108846	#[cfg_attr( feature = "derive_serde", serde(rename = "New") )]
108847	pub new: SystemPartyType1Choice,
108848}
108849
108850impl UpdateLogSystemPartyType1 {
108851	pub fn validate(&self) -> Result<(), ValidationError> {
108852		self.od.validate()?;
108853		self.new.validate()?;
108854		Ok(())
108855	}
108856}
108857
108858
108859// UpdateLogTechnicalAddress1 ...
108860#[cfg_attr(feature = "derive_debug", derive(Debug))]
108861#[cfg_attr(feature = "derive_default", derive(Default))]
108862#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108863#[cfg_attr(feature = "derive_clone", derive(Clone))]
108864#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108865pub struct UpdateLogTechnicalAddress1 {
108866	#[cfg_attr( feature = "derive_serde", serde(rename = "Od") )]
108867	pub od: TechnicalIdentification2Choice,
108868	#[cfg_attr( feature = "derive_serde", serde(rename = "New") )]
108869	pub new: TechnicalIdentification2Choice,
108870}
108871
108872impl UpdateLogTechnicalAddress1 {
108873	pub fn validate(&self) -> Result<(), ValidationError> {
108874		self.od.validate()?;
108875		self.new.validate()?;
108876		Ok(())
108877	}
108878}
108879
108880
108881// UpdateType15Choice ...
108882#[cfg_attr(feature = "derive_debug", derive(Debug))]
108883#[cfg_attr(feature = "derive_default", derive(Default))]
108884#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108885#[cfg_attr(feature = "derive_clone", derive(Clone))]
108886#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108887pub struct UpdateType15Choice {
108888	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
108889	pub cd: Option<StatementUpdateType1Code>,
108890	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
108891	pub prtry: Option<GenericIdentification30>,
108892}
108893
108894impl UpdateType15Choice {
108895	pub fn validate(&self) -> Result<(), ValidationError> {
108896		if let Some(ref val) = self.cd { val.validate()? }
108897		if let Some(ref val) = self.prtry { val.validate()? }
108898		Ok(())
108899	}
108900}
108901
108902
108903// UpdateType35Choice ...
108904#[cfg_attr(feature = "derive_debug", derive(Debug))]
108905#[cfg_attr(feature = "derive_default", derive(Default))]
108906#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108907#[cfg_attr(feature = "derive_clone", derive(Clone))]
108908#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108909pub struct UpdateType35Choice {
108910	#[cfg_attr( feature = "derive_serde", serde(rename = "Add", skip_serializing_if = "Option::is_none") )]
108911	pub add: Option<SecurityAttributes12>,
108912	#[cfg_attr( feature = "derive_serde", serde(rename = "Del", skip_serializing_if = "Option::is_none") )]
108913	pub del: Option<SecurityAttributes12>,
108914	#[cfg_attr( feature = "derive_serde", serde(rename = "Modfy", skip_serializing_if = "Option::is_none") )]
108915	pub modfy: Option<SecurityAttributes12>,
108916}
108917
108918impl UpdateType35Choice {
108919	pub fn validate(&self) -> Result<(), ValidationError> {
108920		if let Some(ref val) = self.add { val.validate()? }
108921		if let Some(ref val) = self.del { val.validate()? }
108922		if let Some(ref val) = self.modfy { val.validate()? }
108923		Ok(())
108924	}
108925}
108926
108927
108928// UpdateType36Choice ...
108929#[cfg_attr(feature = "derive_debug", derive(Debug))]
108930#[cfg_attr(feature = "derive_default", derive(Default))]
108931#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108932#[cfg_attr(feature = "derive_clone", derive(Clone))]
108933#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108934pub struct UpdateType36Choice {
108935	#[cfg_attr( feature = "derive_serde", serde(rename = "UpdTp", skip_serializing_if = "Option::is_none") )]
108936	pub upd_tp: Option<Vec<UpdateType35Choice>>,
108937	#[cfg_attr( feature = "derive_serde", serde(rename = "Rplc", skip_serializing_if = "Option::is_none") )]
108938	pub rplc: Option<SecurityAttributes12>,
108939}
108940
108941impl UpdateType36Choice {
108942	pub fn validate(&self) -> Result<(), ValidationError> {
108943		if let Some(ref vec) = self.upd_tp { for item in vec { item.validate()? } }
108944		if let Some(ref val) = self.rplc { val.validate()? }
108945		Ok(())
108946	}
108947}
108948
108949
108950// UseCases1Code ...
108951#[cfg_attr(feature = "derive_debug", derive(Debug))]
108952#[cfg_attr(feature = "derive_default", derive(Default))]
108953#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108954#[cfg_attr(feature = "derive_clone", derive(Clone))]
108955#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108956pub enum UseCases1Code {
108957	#[cfg_attr(feature = "derive_default", default)]
108958	#[cfg_attr( feature = "derive_serde", serde(rename = "OPEN") )]
108959	CodeOPEN,
108960	#[cfg_attr( feature = "derive_serde", serde(rename = "MNTN") )]
108961	CodeMNTN,
108962	#[cfg_attr( feature = "derive_serde", serde(rename = "CLSG") )]
108963	CodeCLSG,
108964	#[cfg_attr( feature = "derive_serde", serde(rename = "VIEW") )]
108965	CodeVIEW,
108966}
108967
108968impl UseCases1Code {
108969	pub fn validate(&self) -> Result<(), ValidationError> {
108970		Ok(())
108971	}
108972}
108973
108974
108975// UserInterface2Code ...
108976#[cfg_attr(feature = "derive_debug", derive(Debug))]
108977#[cfg_attr(feature = "derive_default", derive(Default))]
108978#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
108979#[cfg_attr(feature = "derive_clone", derive(Clone))]
108980#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
108981pub enum UserInterface2Code {
108982	#[cfg_attr(feature = "derive_default", default)]
108983	#[cfg_attr( feature = "derive_serde", serde(rename = "MDSP") )]
108984	CodeMDSP,
108985	#[cfg_attr( feature = "derive_serde", serde(rename = "CDSP") )]
108986	CodeCDSP,
108987}
108988
108989impl UserInterface2Code {
108990	pub fn validate(&self) -> Result<(), ValidationError> {
108991		Ok(())
108992	}
108993}
108994
108995
108996// ValidationRuleSchemeName1Choice ...
108997#[cfg_attr(feature = "derive_debug", derive(Debug))]
108998#[cfg_attr(feature = "derive_default", derive(Default))]
108999#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109000#[cfg_attr(feature = "derive_clone", derive(Clone))]
109001#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109002pub struct ValidationRuleSchemeName1Choice {
109003	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
109004	pub cd: Option<String>,
109005	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
109006	pub prtry: Option<String>,
109007}
109008
109009impl ValidationRuleSchemeName1Choice {
109010	pub fn validate(&self) -> Result<(), ValidationError> {
109011		if let Some(ref val) = self.cd {
109012			if val.chars().count() < 1 {
109013				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
109014			}
109015			if val.chars().count() > 4 {
109016				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
109017			}
109018		}
109019		if let Some(ref val) = self.prtry {
109020			if val.chars().count() < 1 {
109021				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
109022			}
109023			if val.chars().count() > 35 {
109024				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
109025			}
109026		}
109027		Ok(())
109028	}
109029}
109030
109031
109032// ValidationStatusReason3 ...
109033#[cfg_attr(feature = "derive_debug", derive(Debug))]
109034#[cfg_attr(feature = "derive_default", derive(Default))]
109035#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109036#[cfg_attr(feature = "derive_clone", derive(Clone))]
109037#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109038pub struct ValidationStatusReason3 {
109039	#[cfg_attr( feature = "derive_serde", serde(rename = "Orgtr", skip_serializing_if = "Option::is_none") )]
109040	pub orgtr: Option<PartyIdentification272>,
109041	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
109042	pub rsn: Option<StatusReason6Choice>,
109043	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtnRule", skip_serializing_if = "Option::is_none") )]
109044	pub vldtn_rule: Option<Vec<GenericValidationRuleIdentification1>>,
109045	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
109046	pub addtl_inf: Option<Vec<String>>,
109047}
109048
109049impl ValidationStatusReason3 {
109050	pub fn validate(&self) -> Result<(), ValidationError> {
109051		if let Some(ref val) = self.orgtr { val.validate()? }
109052		if let Some(ref val) = self.rsn { val.validate()? }
109053		if let Some(ref vec) = self.vldtn_rule { for item in vec { item.validate()? } }
109054		if let Some(ref vec) = self.addtl_inf {
109055			for item in vec {
109056				if item.chars().count() < 1 {
109057					return Err(ValidationError::new(1001, "addtl_inf is shorter than the minimum length of 1".to_string()));
109058				}
109059				if item.chars().count() > 105 {
109060					return Err(ValidationError::new(1002, "addtl_inf exceeds the maximum length of 105".to_string()));
109061				}
109062			}
109063		}
109064		Ok(())
109065	}
109066}
109067
109068
109069// ValidityPeriod1Choice ...
109070#[cfg_attr(feature = "derive_debug", derive(Debug))]
109071#[cfg_attr(feature = "derive_default", derive(Default))]
109072#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109073#[cfg_attr(feature = "derive_clone", derive(Clone))]
109074#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109075pub struct ValidityPeriod1Choice {
109076	#[cfg_attr( feature = "derive_serde", serde(rename = "VldtyPrdCd", skip_serializing_if = "Option::is_none") )]
109077	pub vldty_prd_cd: Option<ValidityPeriodType1Code>,
109078	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
109079	pub prtry: Option<GenericIdentification30>,
109080}
109081
109082impl ValidityPeriod1Choice {
109083	pub fn validate(&self) -> Result<(), ValidationError> {
109084		if let Some(ref val) = self.vldty_prd_cd { val.validate()? }
109085		if let Some(ref val) = self.prtry { val.validate()? }
109086		Ok(())
109087	}
109088}
109089
109090
109091// ValidityPeriodType1Code ...
109092#[cfg_attr(feature = "derive_debug", derive(Debug))]
109093#[cfg_attr(feature = "derive_default", derive(Default))]
109094#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109095#[cfg_attr(feature = "derive_clone", derive(Clone))]
109096#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109097pub enum ValidityPeriodType1Code {
109098	#[cfg_attr(feature = "derive_default", default)]
109099	#[cfg_attr( feature = "derive_serde", serde(rename = "FOKV") )]
109100	CodeFOKV,
109101	#[cfg_attr( feature = "derive_serde", serde(rename = "GADV") )]
109102	CodeGADV,
109103	#[cfg_attr( feature = "derive_serde", serde(rename = "GASV") )]
109104	CodeGASV,
109105	#[cfg_attr( feature = "derive_serde", serde(rename = "GATV") )]
109106	CodeGATV,
109107	#[cfg_attr( feature = "derive_serde", serde(rename = "DAVY") )]
109108	CodeDAVY,
109109	#[cfg_attr( feature = "derive_serde", serde(rename = "GTCV") )]
109110	CodeGTCV,
109111	#[cfg_attr( feature = "derive_serde", serde(rename = "GTDV") )]
109112	CodeGTDV,
109113	#[cfg_attr( feature = "derive_serde", serde(rename = "GTSV") )]
109114	CodeGTSV,
109115	#[cfg_attr( feature = "derive_serde", serde(rename = "GTTV") )]
109116	CodeGTTV,
109117	#[cfg_attr( feature = "derive_serde", serde(rename = "IOCV") )]
109118	CodeIOCV,
109119}
109120
109121impl ValidityPeriodType1Code {
109122	pub fn validate(&self) -> Result<(), ValidationError> {
109123		Ok(())
109124	}
109125}
109126
109127
109128// ValuationDealingProcessingCharacteristics3 ...
109129#[cfg_attr(feature = "derive_debug", derive(Debug))]
109130#[cfg_attr(feature = "derive_default", derive(Default))]
109131#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109132#[cfg_attr(feature = "derive_clone", derive(Clone))]
109133#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109134pub struct ValuationDealingProcessingCharacteristics3 {
109135	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnFrqcy", skip_serializing_if = "Option::is_none") )]
109136	pub valtn_frqcy: Option<EventFrequency5Code>,
109137	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnFrqcyDesc", skip_serializing_if = "Option::is_none") )]
109138	pub valtn_frqcy_desc: Option<String>,
109139	#[cfg_attr( feature = "derive_serde", serde(rename = "ValtnTm", skip_serializing_if = "Option::is_none") )]
109140	pub valtn_tm: Option<String>,
109141	#[cfg_attr( feature = "derive_serde", serde(rename = "DcmlstnUnits", skip_serializing_if = "Option::is_none") )]
109142	pub dcmlstn_units: Option<f64>,
109143	#[cfg_attr( feature = "derive_serde", serde(rename = "DcmlstnPric", skip_serializing_if = "Option::is_none") )]
109144	pub dcmlstn_pric: Option<f64>,
109145	#[cfg_attr( feature = "derive_serde", serde(rename = "DualFndInd", skip_serializing_if = "Option::is_none") )]
109146	pub dual_fnd_ind: Option<bool>,
109147	#[cfg_attr( feature = "derive_serde", serde(rename = "PricMtd", skip_serializing_if = "Option::is_none") )]
109148	pub pric_mtd: Option<PriceMethod1Code>,
109149	#[cfg_attr( feature = "derive_serde", serde(rename = "PricCcy", skip_serializing_if = "Option::is_none") )]
109150	pub pric_ccy: Option<Vec<String>>,
109151	#[cfg_attr( feature = "derive_serde", serde(rename = "AddtlInf", skip_serializing_if = "Option::is_none") )]
109152	pub addtl_inf: Option<Vec<AdditionalInformation15>>,
109153}
109154
109155impl ValuationDealingProcessingCharacteristics3 {
109156	pub fn validate(&self) -> Result<(), ValidationError> {
109157		if let Some(ref val) = self.valtn_frqcy { val.validate()? }
109158		if let Some(ref val) = self.valtn_frqcy_desc {
109159			if val.chars().count() < 1 {
109160				return Err(ValidationError::new(1001, "valtn_frqcy_desc is shorter than the minimum length of 1".to_string()));
109161			}
109162			if val.chars().count() > 350 {
109163				return Err(ValidationError::new(1002, "valtn_frqcy_desc exceeds the maximum length of 350".to_string()));
109164			}
109165		}
109166		if let Some(ref val) = self.pric_mtd { val.validate()? }
109167		if let Some(ref vec) = self.pric_ccy {
109168			for item in vec {
109169				let pattern = Regex::new("[A-Z]{3,3}").unwrap();
109170				if !pattern.is_match(&item) {
109171					return Err(ValidationError::new(1005, "pric_ccy does not match the required pattern".to_string()));
109172				}
109173			}
109174		}
109175		if let Some(ref vec) = self.addtl_inf { for item in vec { item.validate()? } }
109176		Ok(())
109177	}
109178}
109179
109180
109181// ValuationMatchingCriteria1 ...
109182#[cfg_attr(feature = "derive_debug", derive(Debug))]
109183#[cfg_attr(feature = "derive_default", derive(Default))]
109184#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109185#[cfg_attr(feature = "derive_clone", derive(Clone))]
109186#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109187pub struct ValuationMatchingCriteria1 {
109188	#[cfg_attr( feature = "derive_serde", serde(rename = "CtrctVal", skip_serializing_if = "Option::is_none") )]
109189	pub ctrct_val: Option<CompareAmountAndDirection3>,
109190	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
109191	pub tp: Option<CompareValuationType1>,
109192}
109193
109194impl ValuationMatchingCriteria1 {
109195	pub fn validate(&self) -> Result<(), ValidationError> {
109196		if let Some(ref val) = self.ctrct_val { val.validate()? }
109197		if let Some(ref val) = self.tp { val.validate()? }
109198		Ok(())
109199	}
109200}
109201
109202
109203// ValuationStatistics3 ...
109204#[cfg_attr(feature = "derive_debug", derive(Debug))]
109205#[cfg_attr(feature = "derive_default", derive(Default))]
109206#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109207#[cfg_attr(feature = "derive_clone", derive(Clone))]
109208#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109209pub struct ValuationStatistics3 {
109210	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
109211	pub ccy: String,
109212	#[cfg_attr( feature = "derive_serde", serde(rename = "PricTpChngBsis") )]
109213	pub pric_tp_chng_bsis: PriceType2,
109214	#[cfg_attr( feature = "derive_serde", serde(rename = "PricChng") )]
109215	pub pric_chng: PriceValueChange1,
109216	#[cfg_attr( feature = "derive_serde", serde(rename = "Yld", skip_serializing_if = "Option::is_none") )]
109217	pub yld: Option<f64>,
109218	#[cfg_attr( feature = "derive_serde", serde(rename = "ByPrdfndTmPrds", skip_serializing_if = "Option::is_none") )]
109219	pub by_prdfnd_tm_prds: Option<StatisticsByPredefinedTimePeriods2>,
109220	#[cfg_attr( feature = "derive_serde", serde(rename = "ByUsrDfndTmPrd", skip_serializing_if = "Option::is_none") )]
109221	pub by_usr_dfnd_tm_prd: Option<Vec<StatisticsByUserDefinedTimePeriod2>>,
109222}
109223
109224impl ValuationStatistics3 {
109225	pub fn validate(&self) -> Result<(), ValidationError> {
109226		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
109227		if !pattern.is_match(&self.ccy) {
109228			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
109229		}
109230		self.pric_tp_chng_bsis.validate()?;
109231		self.pric_chng.validate()?;
109232		if let Some(ref val) = self.by_prdfnd_tm_prds { val.validate()? }
109233		if let Some(ref vec) = self.by_usr_dfnd_tm_prd { for item in vec { item.validate()? } }
109234		Ok(())
109235	}
109236}
109237
109238
109239// ValuationTiming1Code ...
109240#[cfg_attr(feature = "derive_debug", derive(Debug))]
109241#[cfg_attr(feature = "derive_default", derive(Default))]
109242#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109243#[cfg_attr(feature = "derive_clone", derive(Clone))]
109244#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109245pub enum ValuationTiming1Code {
109246	#[cfg_attr(feature = "derive_default", default)]
109247	#[cfg_attr( feature = "derive_serde", serde(rename = "EXCP") )]
109248	CodeEXCP,
109249	#[cfg_attr( feature = "derive_serde", serde(rename = "USUA") )]
109250	CodeUSUA,
109251	#[cfg_attr( feature = "derive_serde", serde(rename = "PATC") )]
109252	CodePATC,
109253}
109254
109255impl ValuationTiming1Code {
109256	pub fn validate(&self) -> Result<(), ValidationError> {
109257		Ok(())
109258	}
109259}
109260
109261
109262// ValuationType1Code ...
109263#[cfg_attr(feature = "derive_debug", derive(Debug))]
109264#[cfg_attr(feature = "derive_default", derive(Default))]
109265#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109266#[cfg_attr(feature = "derive_clone", derive(Clone))]
109267#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109268pub enum ValuationType1Code {
109269	#[cfg_attr(feature = "derive_default", default)]
109270	#[cfg_attr( feature = "derive_serde", serde(rename = "CCPV") )]
109271	CodeCCPV,
109272	#[cfg_attr( feature = "derive_serde", serde(rename = "MTMA") )]
109273	CodeMTMA,
109274	#[cfg_attr( feature = "derive_serde", serde(rename = "MTMO") )]
109275	CodeMTMO,
109276}
109277
109278impl ValuationType1Code {
109279	pub fn validate(&self) -> Result<(), ValidationError> {
109280		Ok(())
109281	}
109282}
109283
109284
109285// Value ...
109286#[cfg_attr(feature = "derive_debug", derive(Debug))]
109287#[cfg_attr(feature = "derive_default", derive(Default))]
109288#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109289#[cfg_attr(feature = "derive_clone", derive(Clone))]
109290#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109291pub struct Value {
109292	#[cfg_attr( feature = "derive_serde", serde(rename = "BaseCcyItm") )]
109293	pub base_ccy_itm: ActiveOrHistoricCurrencyAndAmount,
109294	#[cfg_attr( feature = "derive_serde", serde(rename = "AltrnCcyItm") )]
109295	pub altrn_ccy_itm: Vec<ActiveOrHistoricCurrencyAndAmount>,
109296}
109297
109298impl Value {
109299	pub fn validate(&self) -> Result<(), ValidationError> {
109300		self.base_ccy_itm.validate()?;
109301		for item in &self.altrn_ccy_itm { item.validate()? }
109302		Ok(())
109303	}
109304}
109305
109306
109307// ValueForMoney1 ...
109308#[cfg_attr(feature = "derive_debug", derive(Debug))]
109309#[cfg_attr(feature = "derive_default", derive(Default))]
109310#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109311#[cfg_attr(feature = "derive_clone", derive(Clone))]
109312#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109313pub struct ValueForMoney1 {
109314	#[cfg_attr( feature = "derive_serde", serde(rename = "EMTDataRptgVFMUK", skip_serializing_if = "Option::is_none") )]
109315	pub emt_data_rptg_vfmuk: Option<EMTDataReportingVFMUKType1Code>,
109316	#[cfg_attr( feature = "derive_serde", serde(rename = "AssmntOfValReqrdUdrCOLLUK", skip_serializing_if = "Option::is_none") )]
109317	pub assmnt_of_val_reqrd_udr_colluk: Option<AssessmentOfValueRequiredUnderCOLLUKType1Code>,
109318	#[cfg_attr( feature = "derive_serde", serde(rename = "OutcmOfCOLLAssmntOfValUK", skip_serializing_if = "Option::is_none") )]
109319	pub outcm_of_coll_assmnt_of_val_uk: Option<OutcomeOfCOLLAssessmentOfValueUKType1Code>,
109320	#[cfg_attr( feature = "derive_serde", serde(rename = "OutcmOfPRINValAssmntOrRvwUK", skip_serializing_if = "Option::is_none") )]
109321	pub outcm_of_prin_val_assmnt_or_rvw_uk: Option<OutcomeOfPRINValueAssessmentOrReviewUKType1Code>,
109322	#[cfg_attr( feature = "derive_serde", serde(rename = "OthrRvwRltdToValAndOrChrgsUK", skip_serializing_if = "Option::is_none") )]
109323	pub othr_rvw_rltd_to_val_and_or_chrgs_uk: Option<OtherReviewRelatedToValueAndOrChargesUKType1Code>,
109324	#[cfg_attr( feature = "derive_serde", serde(rename = "FrthrInfUK", skip_serializing_if = "Option::is_none") )]
109325	pub frthr_inf_uk: Option<String>,
109326	#[cfg_attr( feature = "derive_serde", serde(rename = "RvwDtUK", skip_serializing_if = "Option::is_none") )]
109327	pub rvw_dt_uk: Option<String>,
109328	#[cfg_attr( feature = "derive_serde", serde(rename = "RvwNxtDueUK", skip_serializing_if = "Option::is_none") )]
109329	pub rvw_nxt_due_uk: Option<String>,
109330}
109331
109332impl ValueForMoney1 {
109333	pub fn validate(&self) -> Result<(), ValidationError> {
109334		if let Some(ref val) = self.emt_data_rptg_vfmuk { val.validate()? }
109335		if let Some(ref val) = self.assmnt_of_val_reqrd_udr_colluk { val.validate()? }
109336		if let Some(ref val) = self.outcm_of_coll_assmnt_of_val_uk { val.validate()? }
109337		if let Some(ref val) = self.outcm_of_prin_val_assmnt_or_rvw_uk { val.validate()? }
109338		if let Some(ref val) = self.othr_rvw_rltd_to_val_and_or_chrgs_uk { val.validate()? }
109339		if let Some(ref val) = self.frthr_inf_uk {
109340			if val.chars().count() < 1 {
109341				return Err(ValidationError::new(1001, "frthr_inf_uk is shorter than the minimum length of 1".to_string()));
109342			}
109343			if val.chars().count() > 350 {
109344				return Err(ValidationError::new(1002, "frthr_inf_uk exceeds the maximum length of 350".to_string()));
109345			}
109346		}
109347		Ok(())
109348	}
109349}
109350
109351
109352// VariationType1Code ...
109353#[cfg_attr(feature = "derive_debug", derive(Debug))]
109354#[cfg_attr(feature = "derive_default", derive(Default))]
109355#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109356#[cfg_attr(feature = "derive_clone", derive(Clone))]
109357#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109358pub enum VariationType1Code {
109359	#[cfg_attr(feature = "derive_default", default)]
109360	#[cfg_attr( feature = "derive_serde", serde(rename = "DECR") )]
109361	CodeDECR,
109362	#[cfg_attr( feature = "derive_serde", serde(rename = "INCR") )]
109363	CodeINCR,
109364}
109365
109366impl VariationType1Code {
109367	pub fn validate(&self) -> Result<(), ValidationError> {
109368		Ok(())
109369	}
109370}
109371
109372
109373// VerificationReason1Choice ...
109374#[cfg_attr(feature = "derive_debug", derive(Debug))]
109375#[cfg_attr(feature = "derive_default", derive(Default))]
109376#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109377#[cfg_attr(feature = "derive_clone", derive(Clone))]
109378#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109379pub struct VerificationReason1Choice {
109380	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
109381	pub cd: Option<String>,
109382	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
109383	pub prtry: Option<String>,
109384}
109385
109386impl VerificationReason1Choice {
109387	pub fn validate(&self) -> Result<(), ValidationError> {
109388		if let Some(ref val) = self.cd {
109389			if val.chars().count() < 1 {
109390				return Err(ValidationError::new(1001, "cd is shorter than the minimum length of 1".to_string()));
109391			}
109392			if val.chars().count() > 4 {
109393				return Err(ValidationError::new(1002, "cd exceeds the maximum length of 4".to_string()));
109394			}
109395		}
109396		if let Some(ref val) = self.prtry {
109397			if val.chars().count() < 1 {
109398				return Err(ValidationError::new(1001, "prtry is shorter than the minimum length of 1".to_string()));
109399			}
109400			if val.chars().count() > 35 {
109401				return Err(ValidationError::new(1002, "prtry exceeds the maximum length of 35".to_string()));
109402			}
109403		}
109404		Ok(())
109405	}
109406}
109407
109408
109409// VerificationReport5 ...
109410#[cfg_attr(feature = "derive_debug", derive(Debug))]
109411#[cfg_attr(feature = "derive_default", derive(Default))]
109412#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109413#[cfg_attr(feature = "derive_clone", derive(Clone))]
109414#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109415pub struct VerificationReport5 {
109416	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlId") )]
109417	pub orgnl_id: String,
109418	#[cfg_attr( feature = "derive_serde", serde(rename = "Vrfctn") )]
109419	pub vrfctn: bool,
109420	#[cfg_attr( feature = "derive_serde", serde(rename = "Rsn", skip_serializing_if = "Option::is_none") )]
109421	pub rsn: Option<VerificationReason1Choice>,
109422	#[cfg_attr( feature = "derive_serde", serde(rename = "OrgnlPtyAndAcctId", skip_serializing_if = "Option::is_none") )]
109423	pub orgnl_pty_and_acct_id: Option<IdentificationInformation5>,
109424	#[cfg_attr( feature = "derive_serde", serde(rename = "UpdtdPtyAndAcctId", skip_serializing_if = "Option::is_none") )]
109425	pub updtd_pty_and_acct_id: Option<IdentificationInformation5>,
109426}
109427
109428impl VerificationReport5 {
109429	pub fn validate(&self) -> Result<(), ValidationError> {
109430		if self.orgnl_id.chars().count() < 1 {
109431			return Err(ValidationError::new(1001, "orgnl_id is shorter than the minimum length of 1".to_string()));
109432		}
109433		if self.orgnl_id.chars().count() > 35 {
109434			return Err(ValidationError::new(1002, "orgnl_id exceeds the maximum length of 35".to_string()));
109435		}
109436		if let Some(ref val) = self.rsn { val.validate()? }
109437		if let Some(ref val) = self.orgnl_pty_and_acct_id { val.validate()? }
109438		if let Some(ref val) = self.updtd_pty_and_acct_id { val.validate()? }
109439		Ok(())
109440	}
109441}
109442
109443
109444// Visibilty1 ...
109445#[cfg_attr(feature = "derive_debug", derive(Debug))]
109446#[cfg_attr(feature = "derive_default", derive(Default))]
109447#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109448#[cfg_attr(feature = "derive_clone", derive(Clone))]
109449#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109450pub struct Visibilty1 {
109451	#[cfg_attr( feature = "derive_serde", serde(rename = "StartDt", skip_serializing_if = "Option::is_none") )]
109452	pub start_dt: Option<DateAndDateTime2Choice>,
109453	#[cfg_attr( feature = "derive_serde", serde(rename = "EndDt", skip_serializing_if = "Option::is_none") )]
109454	pub end_dt: Option<DateAndDateTime2Choice>,
109455	#[cfg_attr( feature = "derive_serde", serde(rename = "LtdVsblty", skip_serializing_if = "Option::is_none") )]
109456	pub ltd_vsblty: Option<bool>,
109457}
109458
109459impl Visibilty1 {
109460	pub fn validate(&self) -> Result<(), ValidationError> {
109461		if let Some(ref val) = self.start_dt { val.validate()? }
109462		if let Some(ref val) = self.end_dt { val.validate()? }
109463		Ok(())
109464	}
109465}
109466
109467
109468// VolumeCapReport1 ...
109469#[cfg_attr(feature = "derive_debug", derive(Debug))]
109470#[cfg_attr(feature = "derive_default", derive(Default))]
109471#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109472#[cfg_attr(feature = "derive_clone", derive(Clone))]
109473#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109474pub struct VolumeCapReport1 {
109475	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPrd", skip_serializing_if = "Option::is_none") )]
109476	pub rptg_prd: Option<Period4Choice>,
109477	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgVn", skip_serializing_if = "Option::is_none") )]
109478	pub tradg_vn: Option<String>,
109479	#[cfg_attr( feature = "derive_serde", serde(rename = "InstrmRpt") )]
109480	pub instrm_rpt: Vec<VolumeCapReport2>,
109481}
109482
109483impl VolumeCapReport1 {
109484	pub fn validate(&self) -> Result<(), ValidationError> {
109485		if let Some(ref val) = self.rptg_prd { val.validate()? }
109486		if let Some(ref val) = self.tradg_vn {
109487			let pattern = Regex::new("[A-Z0-9]{4,4}").unwrap();
109488			if !pattern.is_match(val) {
109489				return Err(ValidationError::new(1005, "tradg_vn does not match the required pattern".to_string()));
109490			}
109491		}
109492		for item in &self.instrm_rpt { item.validate()? }
109493		Ok(())
109494	}
109495}
109496
109497
109498// VolumeCapReport2 ...
109499#[cfg_attr(feature = "derive_debug", derive(Debug))]
109500#[cfg_attr(feature = "derive_default", derive(Default))]
109501#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109502#[cfg_attr(feature = "derive_clone", derive(Clone))]
109503#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109504pub struct VolumeCapReport2 {
109505	#[cfg_attr( feature = "derive_serde", serde(rename = "TechRcrdId", skip_serializing_if = "Option::is_none") )]
109506	pub tech_rcrd_id: Option<String>,
109507	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
109508	pub id: String,
109509	#[cfg_attr( feature = "derive_serde", serde(rename = "Ccy") )]
109510	pub ccy: String,
109511	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlTradgVol") )]
109512	pub ttl_tradg_vol: f64,
109513	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlRefPricTradgVol") )]
109514	pub ttl_ref_pric_tradg_vol: f64,
109515	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlNgtdTxsTradgVol") )]
109516	pub ttl_ngtd_txs_tradg_vol: f64,
109517}
109518
109519impl VolumeCapReport2 {
109520	pub fn validate(&self) -> Result<(), ValidationError> {
109521		if let Some(ref val) = self.tech_rcrd_id {
109522			if val.chars().count() < 1 {
109523				return Err(ValidationError::new(1001, "tech_rcrd_id is shorter than the minimum length of 1".to_string()));
109524			}
109525			if val.chars().count() > 35 {
109526				return Err(ValidationError::new(1002, "tech_rcrd_id exceeds the maximum length of 35".to_string()));
109527			}
109528		}
109529		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
109530		if !pattern.is_match(&self.id) {
109531			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
109532		}
109533		let pattern = Regex::new("[A-Z]{3,3}").unwrap();
109534		if !pattern.is_match(&self.ccy) {
109535			return Err(ValidationError::new(1005, "ccy does not match the required pattern".to_string()));
109536		}
109537		Ok(())
109538	}
109539}
109540
109541
109542// VolumeCapResult1 ...
109543#[cfg_attr(feature = "derive_debug", derive(Debug))]
109544#[cfg_attr(feature = "derive_default", derive(Default))]
109545#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109546#[cfg_attr(feature = "derive_clone", derive(Clone))]
109547#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109548pub struct VolumeCapResult1 {
109549	#[cfg_attr( feature = "derive_serde", serde(rename = "Id") )]
109550	pub id: String,
109551	#[cfg_attr( feature = "derive_serde", serde(rename = "RptgPrd") )]
109552	pub rptg_prd: Period4Choice,
109553	#[cfg_attr( feature = "derive_serde", serde(rename = "LastUpdDt", skip_serializing_if = "Option::is_none") )]
109554	pub last_upd_dt: Option<String>,
109555	#[cfg_attr( feature = "derive_serde", serde(rename = "TtlTradgVol") )]
109556	pub ttl_tradg_vol: ActiveCurrencyAndAmount,
109557	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgUdrWvrPctg") )]
109558	pub tradg_udr_wvr_pctg: f64,
109559	#[cfg_attr( feature = "derive_serde", serde(rename = "TradgUdrWvrBrkdwn", skip_serializing_if = "Option::is_none") )]
109560	pub tradg_udr_wvr_brkdwn: Option<Vec<TradingUnderWaiversPercentage1>>,
109561	#[cfg_attr( feature = "derive_serde", serde(rename = "Dsclmr", skip_serializing_if = "Option::is_none") )]
109562	pub dsclmr: Option<String>,
109563}
109564
109565impl VolumeCapResult1 {
109566	pub fn validate(&self) -> Result<(), ValidationError> {
109567		let pattern = Regex::new("[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}").unwrap();
109568		if !pattern.is_match(&self.id) {
109569			return Err(ValidationError::new(1005, "id does not match the required pattern".to_string()));
109570		}
109571		self.rptg_prd.validate()?;
109572		self.ttl_tradg_vol.validate()?;
109573		if let Some(ref vec) = self.tradg_udr_wvr_brkdwn { for item in vec { item.validate()? } }
109574		if let Some(ref val) = self.dsclmr {
109575			if val.chars().count() < 1 {
109576				return Err(ValidationError::new(1001, "dsclmr is shorter than the minimum length of 1".to_string()));
109577			}
109578			if val.chars().count() > 350 {
109579				return Err(ValidationError::new(1002, "dsclmr exceeds the maximum length of 350".to_string()));
109580			}
109581		}
109582		Ok(())
109583	}
109584}
109585
109586
109587// VolumeMetrics4 ...
109588#[cfg_attr(feature = "derive_debug", derive(Debug))]
109589#[cfg_attr(feature = "derive_default", derive(Default))]
109590#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109591#[cfg_attr(feature = "derive_clone", derive(Clone))]
109592#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109593pub struct VolumeMetrics4 {
109594	#[cfg_attr( feature = "derive_serde", serde(rename = "ReuseVal", skip_serializing_if = "Option::is_none") )]
109595	pub reuse_val: Option<ReuseValue1Choice>,
109596	#[cfg_attr( feature = "derive_serde", serde(rename = "RinvstdCshAmt", skip_serializing_if = "Option::is_none") )]
109597	pub rinvstd_csh_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
109598}
109599
109600impl VolumeMetrics4 {
109601	pub fn validate(&self) -> Result<(), ValidationError> {
109602		if let Some(ref val) = self.reuse_val { val.validate()? }
109603		if let Some(ref val) = self.rinvstd_csh_amt { val.validate()? }
109604		Ok(())
109605	}
109606}
109607
109608
109609// VolumeMetrics5 ...
109610#[cfg_attr(feature = "derive_debug", derive(Debug))]
109611#[cfg_attr(feature = "derive_default", derive(Default))]
109612#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109613#[cfg_attr(feature = "derive_clone", derive(Clone))]
109614#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109615pub struct VolumeMetrics5 {
109616	#[cfg_attr( feature = "derive_serde", serde(rename = "NbOfTxs", skip_serializing_if = "Option::is_none") )]
109617	pub nb_of_txs: Option<String>,
109618	#[cfg_attr( feature = "derive_serde", serde(rename = "Xpsr", skip_serializing_if = "Option::is_none") )]
109619	pub xpsr: Option<ExposureMetrics4>,
109620}
109621
109622impl VolumeMetrics5 {
109623	pub fn validate(&self) -> Result<(), ValidationError> {
109624		if let Some(ref val) = self.nb_of_txs {
109625			let pattern = Regex::new("[0-9]{1,15}").unwrap();
109626			if !pattern.is_match(val) {
109627				return Err(ValidationError::new(1005, "nb_of_txs does not match the required pattern".to_string()));
109628			}
109629		}
109630		if let Some(ref val) = self.xpsr { val.validate()? }
109631		Ok(())
109632	}
109633}
109634
109635
109636// VolumeMetrics6 ...
109637#[cfg_attr(feature = "derive_debug", derive(Debug))]
109638#[cfg_attr(feature = "derive_default", derive(Default))]
109639#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109640#[cfg_attr(feature = "derive_clone", derive(Clone))]
109641#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109642pub struct VolumeMetrics6 {
109643	#[cfg_attr( feature = "derive_serde", serde(rename = "Postv", skip_serializing_if = "Option::is_none") )]
109644	pub postv: Option<ExposureMetrics5>,
109645	#[cfg_attr( feature = "derive_serde", serde(rename = "Neg", skip_serializing_if = "Option::is_none") )]
109646	pub neg: Option<ExposureMetrics5>,
109647}
109648
109649impl VolumeMetrics6 {
109650	pub fn validate(&self) -> Result<(), ValidationError> {
109651		if let Some(ref val) = self.postv { val.validate()? }
109652		if let Some(ref val) = self.neg { val.validate()? }
109653		Ok(())
109654	}
109655}
109656
109657
109658// Warrant4 ...
109659#[cfg_attr(feature = "derive_debug", derive(Debug))]
109660#[cfg_attr(feature = "derive_default", derive(Default))]
109661#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109662#[cfg_attr(feature = "derive_clone", derive(Clone))]
109663#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109664pub struct Warrant4 {
109665	#[cfg_attr( feature = "derive_serde", serde(rename = "Mltplr", skip_serializing_if = "Option::is_none") )]
109666	pub mltplr: Option<f64>,
109667	#[cfg_attr( feature = "derive_serde", serde(rename = "SbcptPric", skip_serializing_if = "Option::is_none") )]
109668	pub sbcpt_pric: Option<Price8>,
109669	#[cfg_attr( feature = "derive_serde", serde(rename = "Tp", skip_serializing_if = "Option::is_none") )]
109670	pub tp: Option<WarrantStyle3Choice>,
109671	#[cfg_attr( feature = "derive_serde", serde(rename = "WarrtAgt", skip_serializing_if = "Option::is_none") )]
109672	pub warrt_agt: Option<Vec<Organisation38>>,
109673}
109674
109675impl Warrant4 {
109676	pub fn validate(&self) -> Result<(), ValidationError> {
109677		if let Some(ref val) = self.sbcpt_pric { val.validate()? }
109678		if let Some(ref val) = self.tp { val.validate()? }
109679		if let Some(ref vec) = self.warrt_agt { for item in vec { item.validate()? } }
109680		Ok(())
109681	}
109682}
109683
109684
109685// WarrantStyle1Code ...
109686#[cfg_attr(feature = "derive_debug", derive(Debug))]
109687#[cfg_attr(feature = "derive_default", derive(Default))]
109688#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109689#[cfg_attr(feature = "derive_clone", derive(Clone))]
109690#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109691pub enum WarrantStyle1Code {
109692	#[cfg_attr(feature = "derive_default", default)]
109693	#[cfg_attr( feature = "derive_serde", serde(rename = "AMER") )]
109694	CodeAMER,
109695	#[cfg_attr( feature = "derive_serde", serde(rename = "EURO") )]
109696	CodeEURO,
109697	#[cfg_attr( feature = "derive_serde", serde(rename = "BERM") )]
109698	CodeBERM,
109699}
109700
109701impl WarrantStyle1Code {
109702	pub fn validate(&self) -> Result<(), ValidationError> {
109703		Ok(())
109704	}
109705}
109706
109707
109708// WarrantStyle3Choice ...
109709#[cfg_attr(feature = "derive_debug", derive(Debug))]
109710#[cfg_attr(feature = "derive_default", derive(Default))]
109711#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109712#[cfg_attr(feature = "derive_clone", derive(Clone))]
109713#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109714pub struct WarrantStyle3Choice {
109715	#[cfg_attr( feature = "derive_serde", serde(rename = "Cd", skip_serializing_if = "Option::is_none") )]
109716	pub cd: Option<WarrantStyle1Code>,
109717	#[cfg_attr( feature = "derive_serde", serde(rename = "Prtry", skip_serializing_if = "Option::is_none") )]
109718	pub prtry: Option<GenericIdentification30>,
109719}
109720
109721impl WarrantStyle3Choice {
109722	pub fn validate(&self) -> Result<(), ValidationError> {
109723		if let Some(ref val) = self.cd { val.validate()? }
109724		if let Some(ref val) = self.prtry { val.validate()? }
109725		Ok(())
109726	}
109727}
109728
109729
109730// WeekDay3Code ...
109731#[cfg_attr(feature = "derive_debug", derive(Debug))]
109732#[cfg_attr(feature = "derive_default", derive(Default))]
109733#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109734#[cfg_attr(feature = "derive_clone", derive(Clone))]
109735#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109736pub enum WeekDay3Code {
109737	#[cfg_attr(feature = "derive_default", default)]
109738	#[cfg_attr( feature = "derive_serde", serde(rename = "ALLD") )]
109739	CodeALLD,
109740	#[cfg_attr( feature = "derive_serde", serde(rename = "XBHL") )]
109741	CodeXBHL,
109742	#[cfg_attr( feature = "derive_serde", serde(rename = "IBHL") )]
109743	CodeIBHL,
109744	#[cfg_attr( feature = "derive_serde", serde(rename = "FRID") )]
109745	CodeFRID,
109746	#[cfg_attr( feature = "derive_serde", serde(rename = "MOND") )]
109747	CodeMOND,
109748	#[cfg_attr( feature = "derive_serde", serde(rename = "SATD") )]
109749	CodeSATD,
109750	#[cfg_attr( feature = "derive_serde", serde(rename = "SUND") )]
109751	CodeSUND,
109752	#[cfg_attr( feature = "derive_serde", serde(rename = "THUD") )]
109753	CodeTHUD,
109754	#[cfg_attr( feature = "derive_serde", serde(rename = "TUED") )]
109755	CodeTUED,
109756	#[cfg_attr( feature = "derive_serde", serde(rename = "WEDD") )]
109757	CodeWEDD,
109758	#[cfg_attr( feature = "derive_serde", serde(rename = "WDAY") )]
109759	CodeWDAY,
109760	#[cfg_attr( feature = "derive_serde", serde(rename = "WEND") )]
109761	CodeWEND,
109762}
109763
109764impl WeekDay3Code {
109765	pub fn validate(&self) -> Result<(), ValidationError> {
109766		Ok(())
109767	}
109768}
109769
109770
109771// YieldCalculation6 ...
109772#[cfg_attr(feature = "derive_debug", derive(Debug))]
109773#[cfg_attr(feature = "derive_default", derive(Default))]
109774#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109775#[cfg_attr(feature = "derive_clone", derive(Clone))]
109776#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109777pub struct YieldCalculation6 {
109778	#[cfg_attr( feature = "derive_serde", serde(rename = "Val") )]
109779	pub val: f64,
109780	#[cfg_attr( feature = "derive_serde", serde(rename = "ClctnTp", skip_serializing_if = "Option::is_none") )]
109781	pub clctn_tp: Option<CalculationType3Choice>,
109782	#[cfg_attr( feature = "derive_serde", serde(rename = "RedPric", skip_serializing_if = "Option::is_none") )]
109783	pub red_pric: Option<Price8>,
109784	#[cfg_attr( feature = "derive_serde", serde(rename = "ValDt") )]
109785	pub val_dt: String,
109786	#[cfg_attr( feature = "derive_serde", serde(rename = "ValPrd") )]
109787	pub val_prd: DateTimePeriod1Choice,
109788	#[cfg_attr( feature = "derive_serde", serde(rename = "ClctnDt") )]
109789	pub clctn_dt: String,
109790}
109791
109792impl YieldCalculation6 {
109793	pub fn validate(&self) -> Result<(), ValidationError> {
109794		if let Some(ref val) = self.clctn_tp { val.validate()? }
109795		if let Some(ref val) = self.red_pric { val.validate()? }
109796		self.val_prd.validate()?;
109797		Ok(())
109798	}
109799}
109800
109801
109802// YieldedOrValueType1Choice ...
109803#[cfg_attr(feature = "derive_debug", derive(Debug))]
109804#[cfg_attr(feature = "derive_default", derive(Default))]
109805#[cfg_attr(feature = "derive_serde", derive(Serialize, Deserialize))]
109806#[cfg_attr(feature = "derive_clone", derive(Clone))]
109807#[cfg_attr(feature = "derive_partial_eq", derive(PartialEq))]
109808pub struct YieldedOrValueType1Choice {
109809	#[cfg_attr( feature = "derive_serde", serde(rename = "Yldd", skip_serializing_if = "Option::is_none") )]
109810	pub yldd: Option<bool>,
109811	#[cfg_attr( feature = "derive_serde", serde(rename = "ValTp", skip_serializing_if = "Option::is_none") )]
109812	pub val_tp: Option<PriceValueType1Code>,
109813}
109814
109815impl YieldedOrValueType1Choice {
109816	pub fn validate(&self) -> Result<(), ValidationError> {
109817		if let Some(ref val) = self.val_tp { val.validate()? }
109818		Ok(())
109819	}
109820}
109821