// Copyright 2023 Emergent Financial, LLC - All Rights Reserved // // // This software is licensed under the Emergent Financial Limited Public License Version 1.0 // (EF-LPLv1). You may use, copy, modify, and distribute this software under the terms and // conditions of the EF-LPL. For more information, please refer to the full text of the license // at https://github.com/emergentfinancial/ef-lpl. // // // THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // // See ISO-20022 Intellectual Property Rights Policy at // // for more information. use validator::Validate; ::lazy_static::lazy_static! { static ref COUNTRY_CODE_REGEX: ::regex::Regex = ::regex::Regex::new(r#"[A-Z]{2,2}"#).unwrap(); } ::lazy_static::lazy_static! { static ref ACTIVE_CURRENCY_CODE_REGEX: ::regex::Regex = ::regex::Regex::new(r#"[A-Z]{3,3}"#).unwrap(); } ::lazy_static::lazy_static! { static ref ANY_BIC_IDENTIFIER_REGEX: ::regex::Regex = ::regex::Regex::new(r#"[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"#).unwrap(); } ::lazy_static::lazy_static! { static ref EXACT_3_NUMERIC_TEXT_REGEX: ::regex::Regex = ::regex::Regex::new(r#"[0-9]{3}"#).unwrap(); } ::lazy_static::lazy_static! { static ref MIC_IDENTIFIER_REGEX: ::regex::Regex = ::regex::Regex::new(r#"[A-Z0-9]{4,4}"#).unwrap(); } ::lazy_static::lazy_static! { static ref MAX_4_ALPHA_NUMERIC_TEXT_REGEX: ::regex::Regex = ::regex::Regex::new(r#"[a-zA-Z0-9]{1,4}"#).unwrap(); } ::lazy_static::lazy_static! { static ref ISIN_IDENTIFIER_REGEX: ::regex::Regex = ::regex::Regex::new(r#"[A-Z0-9]{12,12}"#).unwrap(); } /// Returns the namespace of the schema pub fn namespace() -> String { "urn:iso:std:iso:20022:tech:xsd:seev.017.001.01".to_string() } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CountryCode { #[validate(regex = "COUNTRY_CODE_REGEX")] #[serde(rename = "$text")] pub value: String, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum AddressType2Code { #[serde(rename = "ADDR")] Addr, #[serde(rename = "PBOX")] Pbox, #[serde(rename = "HOME")] Home, #[serde(rename = "BIZZ")] Bizz, #[serde(rename = "MLTO")] Mlto, #[serde(rename = "DLVY")] Dlvy, #[default] Unknown, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum CorporateActionOptionType1Code { #[serde(rename = "BSPL")] Bspl, #[serde(rename = "BUYA")] Buya, #[serde(rename = "CASE")] Case, #[serde(rename = "CASH")] Cash, #[serde(rename = "CEXC")] Cexc, #[serde(rename = "CTEN")] Cten, #[serde(rename = "CONN")] Conn, #[serde(rename = "CONY")] Cony, #[serde(rename = "EXER")] Exer, #[serde(rename = "LAPS")] Laps, #[serde(rename = "MPUT")] Mput, #[serde(rename = "NOAC")] Noac, #[serde(rename = "OFFR")] Offr, #[serde(rename = "OVER")] Over, #[serde(rename = "SECU")] Secu, #[serde(rename = "SLLE")] Slle, #[serde(rename = "SPLI")] Spli, #[serde(rename = "NOQU")] Noqu, #[serde(rename = "OTHR")] Othr, #[serde(rename = "QINV")] Qinv, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct AccountIdentification2ChoiceEnum { #[serde(rename = "SctiesAcctId", skip_serializing_if = "Option::is_none")] pub scties_acct_id: Option, #[serde(rename = "CshAcctId", skip_serializing_if = "Option::is_none")] pub csh_acct_id: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct AccountIdentification2Choice { #[serde(flatten)] pub value: AccountIdentification2ChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct SecuritiesAccount12 { #[serde(rename = "CdtDbtInd")] pub cdt_dbt_ind: CreditDebitCode, #[serde(rename = "AcctOwnrId", skip_serializing_if = "Option::is_none")] pub acct_ownr_id: Option, #[validate] #[serde(rename = "AcctId")] pub acct_id: Max35Text, #[serde(rename = "BalTp", skip_serializing_if = "Option::is_none")] pub bal_tp: Option, #[serde(rename = "SctyHldgForm", skip_serializing_if = "Option::is_none")] pub scty_hldg_form: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct ActiveCurrencyCode { #[validate(regex = "ACTIVE_CURRENCY_CODE_REGEX")] #[serde(rename = "$text")] pub value: String, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum CreditDebitCode { #[serde(rename = "CRDT")] Crdt, #[serde(rename = "DBIT")] Dbit, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct DateFormat4ChoiceEnum { #[serde(rename = "Dt", skip_serializing_if = "Option::is_none")] pub dt: Option, #[serde(rename = "NotSpcfdDt", skip_serializing_if = "Option::is_none")] pub not_spcfd_dt: Option, #[serde(rename = "Prtry", skip_serializing_if = "Option::is_none")] pub prtry: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct DateFormat4Choice { #[serde(flatten)] pub value: DateFormat4ChoiceEnum, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum DateType6Code { #[serde(rename = "OPEN")] Open, #[serde(rename = "UKWN")] Ukwn, #[serde(rename = "ONGO")] Ongo, #[default] Unknown, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum FormOfSecurity1Code { #[serde(rename = "BEAR")] Bear, #[serde(rename = "REGD")] Regd, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct ChargeType2FormatChoiceEnum { #[serde(rename = "Cd", skip_serializing_if = "Option::is_none")] pub cd: Option, #[serde(rename = "Prtry", skip_serializing_if = "Option::is_none")] pub prtry: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct ChargeType2FormatChoice { #[serde(flatten)] pub value: ChargeType2FormatChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct Max140Text { #[validate(length(min = 1, max = 140,))] #[serde(rename = "$text")] pub value: String, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CorporateActionInformation1 { #[serde(rename = "AgtId")] pub agt_id: PartyIdentification2Choice, #[serde(rename = "IssrCorpActnId", skip_serializing_if = "Option::is_none")] pub issr_corp_actn_id: Option, #[serde(rename = "CorpActnPrcgId", skip_serializing_if = "Option::is_none")] pub corp_actn_prcg_id: Option, #[serde(rename = "EvtTp")] pub evt_tp: CorporateActionEventType2FormatChoice, #[serde(rename = "MndtryVlntryEvtTp")] pub mndtry_vlntry_evt_tp: CorporateActionMandatoryVoluntary1FormatChoice, #[serde(rename = "EvtPrcgTp", skip_serializing_if = "Option::is_none")] pub evt_prcg_tp: Option, #[validate] #[serde(rename = "UndrlygScty")] pub undrlyg_scty: FinancialInstrumentDescription3, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct SecurityIdentification7Enum { #[serde(rename = "Desc", skip_serializing_if = "Option::is_none")] pub desc: Option, #[serde(rename = "OthrId", skip_serializing_if = "Option::is_none")] pub othr_id: Option, #[serde(rename = "ISIN", skip_serializing_if = "Option::is_none")] pub isin: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct SecurityIdentification7 { #[serde(flatten)] pub value: SecurityIdentification7Enum, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum SecuritiesBalanceType6Code { #[serde(rename = "AVLB")] Avlb, #[serde(rename = "REST")] Rest, #[serde(rename = "TENT")] Tent, #[serde(rename = "RDIS")] Rdis, #[serde(rename = "RREM")] Rrem, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct GlobalDistributionRequest1 { #[validate] #[serde(rename = "PradvcInd")] pub pradvc_ind: YesNoIndicator, #[validate] #[serde(rename = "OptnNb")] pub optn_nb: Exact3NumericText, #[serde(rename = "OptnTp")] pub optn_tp: CorporateActionOption1FormatChoice, #[serde(rename = "RcrdDt")] pub rcrd_dt: DateFormat4Choice, #[serde(rename = "PmtDt")] pub pmt_dt: DateFormat4Choice, #[validate(length(min = 0,))] #[serde(rename = "SctiesMvmnt", default)] pub scties_mvmnt: Vec, #[validate(length(min = 0,))] #[serde(rename = "CshMvmnt", default)] pub csh_mvmnt: Vec, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct ActiveCurrencyAndAmountSimpleType { #[validate(range(min = 0,))] #[serde(rename = "$text")] pub value: f64, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct FinancialInstrumentDescription3 { #[serde(rename = "SctyId")] pub scty_id: SecurityIdentification7, #[serde(rename = "PlcOfListg", skip_serializing_if = "Option::is_none")] pub plc_of_listg: Option, #[serde(rename = "SfkpgPlc", skip_serializing_if = "Option::is_none")] pub sfkpg_plc: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct UnitOrFaceAmount1ChoiceEnum { #[serde(rename = "Unit", skip_serializing_if = "Option::is_none")] pub unit: Option, #[serde(rename = "FaceAmt", skip_serializing_if = "Option::is_none")] pub face_amt: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct UnitOrFaceAmount1Choice { #[serde(flatten)] pub value: UnitOrFaceAmount1ChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct Max70Text { #[validate(length(min = 1, max = 70,))] #[serde(rename = "$text")] pub value: String, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CorporateActionOption1FormatChoiceEnum { #[serde(rename = "Prtry", skip_serializing_if = "Option::is_none")] pub prtry: Option, #[serde(rename = "Cd", skip_serializing_if = "Option::is_none")] pub cd: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CorporateActionOption1FormatChoice { #[serde(flatten)] pub value: CorporateActionOption1FormatChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CashAccount18 { #[serde(rename = "CdtDbtInd")] pub cdt_dbt_ind: CreditDebitCode, #[serde(rename = "AcctOwnrId", skip_serializing_if = "Option::is_none")] pub acct_ownr_id: Option, #[serde(rename = "AcctId")] pub acct_id: AccountIdentification2Choice, #[serde(rename = "BalTp", skip_serializing_if = "Option::is_none")] pub bal_tp: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct NameAndAddress5 { #[validate] #[serde(rename = "Nm")] pub nm: Max350Text, #[serde(rename = "Adr", skip_serializing_if = "Option::is_none")] pub adr: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct Max35Text { #[validate(length(min = 1, max = 35,))] #[serde(rename = "$text")] pub value: String, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct AgentCaGlobalDistributionAuthorisationRequestV01 { #[validate] #[serde(rename = "Id")] pub id: DocumentIdentification8, #[validate] #[serde(rename = "CorpActnGnlInf")] pub corp_actn_gnl_inf: CorporateActionInformation1, #[validate] #[serde(rename = "GblDstrbtnDtls")] pub gbl_dstrbtn_dtls: GlobalDistributionRequest1, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CorporateActionMandatoryVoluntary1FormatChoiceEnum { #[serde(rename = "Cd", skip_serializing_if = "Option::is_none")] pub cd: Option, #[serde(rename = "Prtry", skip_serializing_if = "Option::is_none")] pub prtry: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CorporateActionMandatoryVoluntary1FormatChoice { #[serde(flatten)] pub value: CorporateActionMandatoryVoluntary1FormatChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct DocumentIdentification8 { #[validate] #[serde(rename = "Id")] pub id: Max35Text, #[serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none")] pub cre_dt_tm: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct ActiveCurrencyAndAmount { #[serde(rename = "ActiveCurrencyAndAmount")] pub value: ActiveCurrencyAndAmountSimpleType, #[serde(rename = "@Ccy")] pub ccy: ActiveCurrencyCode, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct IsoDateTime { #[serde(rename = "$text")] pub value: ::chrono::DateTime<::chrono::Utc>, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct PartyIdentification2ChoiceEnum { #[serde(rename = "BICOrBEI", skip_serializing_if = "Option::is_none")] pub bic_or_bei: Option, #[serde(rename = "PrtryId", skip_serializing_if = "Option::is_none")] pub prtry_id: Option, #[serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none")] pub nm_and_adr: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct PartyIdentification2Choice { #[serde(flatten)] pub value: PartyIdentification2ChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct AlternateSecurityIdentification3Enum { #[serde(rename = "PrtryIdSrc", skip_serializing_if = "Option::is_none")] pub prtry_id_src: Option, #[serde(rename = "DmstIdSrc", skip_serializing_if = "Option::is_none")] pub dmst_id_src: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct AlternateSecurityIdentification3 { #[serde(flatten)] pub value: AlternateSecurityIdentification3Enum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct Max16Text { #[validate(length(min = 1, max = 16,))] #[serde(rename = "$text")] pub value: String, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum CorporateActionEventType2Code { #[serde(rename = "ACTV")] Actv, #[serde(rename = "ATTI")] Atti, #[serde(rename = "BIDS")] Bids, #[serde(rename = "BONU")] Bonu, #[serde(rename = "BPUT")] Bput, #[serde(rename = "BRUP")] Brup, #[serde(rename = "CAPG")] Capg, #[serde(rename = "CAPI")] Capi, #[serde(rename = "CERT")] Cert, #[serde(rename = "CHAN")] Chan, #[serde(rename = "CLSA")] Clsa, #[serde(rename = "CONS")] Cons, #[serde(rename = "CONV")] Conv, #[serde(rename = "COOP")] Coop, #[serde(rename = "DECR")] Decr, #[serde(rename = "DETI")] Deti, #[serde(rename = "DFLT")] Dflt, #[serde(rename = "DLST")] Dlst, #[serde(rename = "DRAW")] Draw, #[serde(rename = "DRIP")] Drip, #[serde(rename = "DSCL")] Dscl, #[serde(rename = "DTCH")] Dtch, #[serde(rename = "DVCA")] Dvca, #[serde(rename = "DVOP")] Dvop, #[serde(rename = "DVSC")] Dvsc, #[serde(rename = "DVSE")] Dvse, #[serde(rename = "EXOF")] Exof, #[serde(rename = "EXRI")] Exri, #[serde(rename = "EXTM")] Extm, #[serde(rename = "EXWA")] Exwa, #[serde(rename = "INCR")] Incr, #[serde(rename = "INTR")] Intr, #[serde(rename = "LIQU")] Liqu, #[serde(rename = "MCAL")] Mcal, #[serde(rename = "MRGR")] Mrgr, #[serde(rename = "ODLT")] Odlt, #[serde(rename = "PARI")] Pari, #[serde(rename = "PCAL")] Pcal, #[serde(rename = "PDEF")] Pdef, #[serde(rename = "PINK")] Pink, #[serde(rename = "PLAC")] Plac, #[serde(rename = "PPMT")] Ppmt, #[serde(rename = "PRED")] Pred, #[serde(rename = "PRII")] Prii, #[serde(rename = "PRIO")] Prio, #[serde(rename = "REDM")] Redm, #[serde(rename = "REDO")] Redo, #[serde(rename = "REMK")] Remk, #[serde(rename = "RHDI")] Rhdi, #[serde(rename = "RHTS")] Rhts, #[serde(rename = "SHPR")] Shpr, #[serde(rename = "SMAL")] Smal, #[serde(rename = "SOFF")] Soff, #[serde(rename = "SPLF")] Splf, #[serde(rename = "SPLR")] Splr, #[serde(rename = "SUSP")] Susp, #[serde(rename = "TEND")] Tend, #[serde(rename = "TREC")] Trec, #[serde(rename = "WRTH")] Wrth, #[serde(rename = "WTRC")] Wtrc, #[serde(rename = "OTHR")] Othr, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct DecimalNumber { #[serde(rename = "$text")] pub value: f64, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum CorporateActionMandatoryVoluntary1Code { #[serde(rename = "MAND")] Mand, #[serde(rename = "CHOS")] Chos, #[serde(rename = "VOLU")] Volu, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct AnyBicIdentifier { #[validate(regex = "ANY_BIC_IDENTIFIER_REGEX")] #[serde(rename = "$text")] pub value: String, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct PostalAddress1 { #[serde(rename = "AdrTp", skip_serializing_if = "Option::is_none")] pub adr_tp: Option, #[validate(length(min = 0, max = 5,))] #[serde(rename = "AdrLine", default)] pub adr_line: Vec, #[serde(rename = "StrtNm", skip_serializing_if = "Option::is_none")] pub strt_nm: Option, #[serde(rename = "BldgNb", skip_serializing_if = "Option::is_none")] pub bldg_nb: Option, #[serde(rename = "PstCd", skip_serializing_if = "Option::is_none")] pub pst_cd: Option, #[serde(rename = "TwnNm", skip_serializing_if = "Option::is_none")] pub twn_nm: Option, #[serde(rename = "CtrySubDvsn", skip_serializing_if = "Option::is_none")] pub ctry_sub_dvsn: Option, #[serde(rename = "Ctry")] pub ctry: CountryCode, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CashBalanceType1FormatTypeEnum { #[serde(rename = "Cd", skip_serializing_if = "Option::is_none")] pub cd: Option, #[serde(rename = "Prtry", skip_serializing_if = "Option::is_none")] pub prtry: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CashBalanceType1FormatType { #[serde(flatten)] pub value: CashBalanceType1FormatTypeEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct Exact3NumericText { #[validate(regex = "EXACT_3_NUMERIC_TEXT_REGEX")] #[serde(rename = "$text")] pub value: String, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum CorporateActionEventProcessingType1Code { #[serde(rename = "GENL")] Genl, #[serde(rename = "DISN")] Disn, #[serde(rename = "REOR")] Reor, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct MicIdentifier { #[validate(regex = "MIC_IDENTIFIER_REGEX")] #[serde(rename = "$text")] pub value: String, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct Charges1 { #[serde(rename = "Tp", skip_serializing_if = "Option::is_none")] pub tp: Option, #[validate] #[serde(rename = "Amt")] pub amt: ActiveCurrencyAndAmount, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] #[serde(rename = "Document")] pub struct Document { #[serde(rename = "AgtCAGblDstrbtnAuthstnReq")] pub agt_ca_gbl_dstrbtn_authstn_req: AgentCaGlobalDistributionAuthorisationRequestV01, #[serde(rename = "@xmlns", default = "namespace")] pub xmlns: String, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CorporateActionEventType2FormatChoiceEnum { #[serde(rename = "Cd", skip_serializing_if = "Option::is_none")] pub cd: Option, #[serde(rename = "Prtry", skip_serializing_if = "Option::is_none")] pub prtry: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CorporateActionEventType2FormatChoice { #[serde(flatten)] pub value: CorporateActionEventType2FormatChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct Max4AlphaNumericText { #[validate(length(min = 1, max = 4,), regex = "MAX_4_ALPHA_NUMERIC_TEXT_REGEX")] #[serde(rename = "$text")] pub value: String, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct YesNoIndicator { #[serde(rename = "$text")] pub value: bool, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum ChargeType14Code { #[serde(rename = "ADRF")] Adrf, #[serde(rename = "ISSC")] Issc, #[serde(rename = "CUST")] Cust, #[serde(rename = "CHAR")] Char, #[serde(rename = "MISC")] Misc, #[serde(rename = "ISSU")] Issu, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct SecurityMovement1 { #[serde(rename = "MvmntId", skip_serializing_if = "Option::is_none")] pub mvmnt_id: Option, #[serde(rename = "SctyId")] pub scty_id: SecurityIdentification7, #[serde(rename = "SctiesQty")] pub scties_qty: UnitOrFaceAmount1Choice, #[validate(length(min = 1, max = 2,))] #[serde(rename = "AcctDtls", default)] pub acct_dtls: Vec, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct Max350Text { #[validate(length(min = 1, max = 350,))] #[serde(rename = "$text")] pub value: String, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct IsinIdentifier { #[validate(regex = "ISIN_IDENTIFIER_REGEX")] #[serde(rename = "$text")] pub value: String, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct DateAndDateTimeChoiceEnum { #[serde(rename = "Dt", skip_serializing_if = "Option::is_none")] pub dt: Option, #[serde(rename = "DtTm", skip_serializing_if = "Option::is_none")] pub dt_tm: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct DateAndDateTimeChoice { #[serde(flatten)] pub value: DateAndDateTimeChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct SecuritiesBalanceType6FormatChoiceEnum { #[serde(rename = "Cd", skip_serializing_if = "Option::is_none")] pub cd: Option, #[serde(rename = "Prtry", skip_serializing_if = "Option::is_none")] pub prtry: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct SecuritiesBalanceType6FormatChoice { #[serde(flatten)] pub value: SecuritiesBalanceType6FormatChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct GenericIdentification1 { #[validate] #[serde(rename = "Id")] pub id: Max35Text, #[serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none")] pub schme_nm: Option, #[serde(rename = "Issr", skip_serializing_if = "Option::is_none")] pub issr: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct GenericIdentification13 { #[validate] #[serde(rename = "Id")] pub id: Max4AlphaNumericText, #[serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none")] pub schme_nm: Option, #[validate] #[serde(rename = "Issr")] pub issr: Max35Text, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct IsoDate { #[serde(rename = "$text")] pub value: ::chrono::NaiveDate, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CashMovement1 { #[serde(rename = "MvmntId", skip_serializing_if = "Option::is_none")] pub mvmnt_id: Option, #[validate] #[serde(rename = "Amt")] pub amt: ActiveCurrencyAndAmount, #[serde(rename = "TaxAmt", skip_serializing_if = "Option::is_none")] pub tax_amt: Option, #[validate(length(min = 0,))] #[serde(rename = "Chrgs", default)] pub chrgs: Vec, #[validate(length(min = 1, max = 2,))] #[serde(rename = "AcctDtls", default)] pub acct_dtls: Vec, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum CashBalanceType1Code { #[serde(rename = "AVLB")] Avlb, #[serde(rename = "REST")] Rest, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CorporateActionEventProcessingType1FormatChoiceEnum { #[serde(rename = "Prtry", skip_serializing_if = "Option::is_none")] pub prtry: Option, #[serde(rename = "Cd", skip_serializing_if = "Option::is_none")] pub cd: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CorporateActionEventProcessingType1FormatChoice { #[serde(flatten)] pub value: CorporateActionEventProcessingType1FormatChoiceEnum, }