// 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 ANY_BIC_DEC_2014_IDENTIFIER_REGEX: ::regex::Regex = ::regex::Regex::new(r#"[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}"#).unwrap(); } ::lazy_static::lazy_static! { static ref IBAN_2007_IDENTIFIER_REGEX: ::regex::Regex = ::regex::Regex::new(r#"[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"#).unwrap(); } ::lazy_static::lazy_static! { static ref ISIN_OCT_2015_IDENTIFIER_REGEX: ::regex::Regex = ::regex::Regex::new(r#"[A-Z]{2,2}[A-Z0-9]{9,9}[0-9]{1,1}"#).unwrap(); } ::lazy_static::lazy_static! { static ref EXACT_4_ALPHA_NUMERIC_TEXT_REGEX: ::regex::Regex = ::regex::Regex::new(r#"[a-zA-Z0-9]{4}"#).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 ACTIVE_CURRENCY_CODE_REGEX: ::regex::Regex = ::regex::Regex::new(r#"[A-Z]{3,3}"#).unwrap(); } ::lazy_static::lazy_static! { static ref COUNTRY_CODE_REGEX: ::regex::Regex = ::regex::Regex::new(r#"[A-Z]{2,2}"#).unwrap(); } /// Returns the namespace of the schema pub fn namespace() -> String { "urn:iso:std:iso:20022:tech:xsd:seev.050.001.01".to_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 CashOption76 { #[serde(rename = "CdtDbtInd")] pub cdt_dbt_ind: CreditDebitCode, #[serde(rename = "CshAcctId", skip_serializing_if = "Option::is_none")] pub csh_acct_id: Option, #[serde(rename = "GrssCshAmt", skip_serializing_if = "Option::is_none")] pub grss_csh_amt: Option, #[serde(rename = "NetCshAmt", skip_serializing_if = "Option::is_none")] pub net_csh_amt: Option, #[serde(rename = "EntitldAmt", skip_serializing_if = "Option::is_none")] pub entitld_amt: Option, #[validate(length(min = 0,))] #[serde(rename = "WhldgTaxRate", default)] pub whldg_tax_rate: Vec, #[serde(rename = "WhldgTaxAmt", skip_serializing_if = "Option::is_none")] pub whldg_tax_amt: Option, #[serde(rename = "EarlstPmtDt", skip_serializing_if = "Option::is_none")] pub earlst_pmt_dt: Option, #[serde(rename = "PmtDt")] pub pmt_dt: DateFormat43Choice, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct FinancialInstrumentQuantity18ChoiceEnum { #[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 FinancialInstrumentQuantity18Choice { #[serde(flatten)] pub value: FinancialInstrumentQuantity18ChoiceEnum, } #[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 GenericIdentification78 { #[validate] #[serde(rename = "Tp")] pub tp: GenericIdentification30, #[serde(rename = "Id", skip_serializing_if = "Option::is_none")] pub id: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct RateType42ChoiceEnum { #[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 RateType42Choice { #[serde(flatten)] pub value: RateType42ChoiceEnum, } #[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, ::derive_builder::Builder, ::validator::Validate, )] pub struct DateFormat43ChoiceEnum { #[serde(rename = "DtCd", skip_serializing_if = "Option::is_none")] pub dt_cd: Option, #[serde(rename = "Dt", skip_serializing_if = "Option::is_none")] pub dt: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct DateFormat43Choice { #[serde(flatten)] pub value: DateFormat43ChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct RelatedSettlementInstruction1 { #[validate] #[serde(rename = "RltdSttlmInstrId")] pub rltd_sttlm_instr_id: Max35Text, #[serde(rename = "RltdSttlmQty", skip_serializing_if = "Option::is_none")] pub rltd_sttlm_qty: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct SupplementaryDataEnvelope1< A: std::fmt::Debug + Default + Clone + PartialEq + ::serde::Serialize + ::validator::Validate, > { #[validate] #[serde(flatten)] pub value: A, } #[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 CorporateAction59 { #[serde(rename = "RcrdDt", skip_serializing_if = "Option::is_none")] pub rcrd_dt: Option, #[serde(rename = "ExDvddDt", skip_serializing_if = "Option::is_none")] pub ex_dvdd_dt: Option, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum CorporateActionEventType29Code { #[serde(rename = "ACTV")] Actv, #[serde(rename = "ATTI")] Atti, #[serde(rename = "BRUP")] Brup, #[serde(rename = "DFLT")] Dflt, #[serde(rename = "BONU")] Bonu, #[serde(rename = "EXRI")] Exri, #[serde(rename = "CAPD")] Capd, #[serde(rename = "CAPG")] Capg, #[serde(rename = "CAPI")] Capi, #[serde(rename = "DRCA")] Drca, #[serde(rename = "DVCA")] Dvca, #[serde(rename = "CHAN")] Chan, #[serde(rename = "COOP")] Coop, #[serde(rename = "CLSA")] Clsa, #[serde(rename = "CONS")] Cons, #[serde(rename = "CONV")] Conv, #[serde(rename = "CREV")] Crev, #[serde(rename = "DECR")] Decr, #[serde(rename = "DETI")] Deti, #[serde(rename = "DSCL")] Dscl, #[serde(rename = "DVOP")] Dvop, #[serde(rename = "DRIP")] Drip, #[serde(rename = "DRAW")] Draw, #[serde(rename = "DTCH")] Dtch, #[serde(rename = "EXOF")] Exof, #[serde(rename = "REDM")] Redm, #[serde(rename = "MCAL")] Mcal, #[serde(rename = "INCR")] Incr, #[serde(rename = "PPMT")] Ppmt, #[serde(rename = "INTR")] Intr, #[serde(rename = "RHDI")] Rhdi, #[serde(rename = "LIQU")] Liqu, #[serde(rename = "EXTM")] Extm, #[serde(rename = "MRGR")] Mrgr, #[serde(rename = "NOOF")] Noof, #[serde(rename = "CERT")] Cert, #[serde(rename = "ODLT")] Odlt, #[serde(rename = "OTHR")] Othr, #[serde(rename = "PARI")] Pari, #[serde(rename = "PCAL")] Pcal, #[serde(rename = "PRED")] Pred, #[serde(rename = "PINK")] Pink, #[serde(rename = "PLAC")] Plac, #[serde(rename = "PDEF")] Pdef, #[serde(rename = "PRIO")] Prio, #[serde(rename = "BPUT")] Bput, #[serde(rename = "REDO")] Redo, #[serde(rename = "REMK")] Remk, #[serde(rename = "BIDS")] Bids, #[serde(rename = "SPLR")] Splr, #[serde(rename = "RHTS")] Rhts, #[serde(rename = "DVSC")] Dvsc, #[serde(rename = "SHPR")] Shpr, #[serde(rename = "SMAL")] Smal, #[serde(rename = "SOFF")] Soff, #[serde(rename = "DVSE")] Dvse, #[serde(rename = "SPLF")] Splf, #[serde(rename = "TREC")] Trec, #[serde(rename = "TEND")] Tend, #[serde(rename = "DLST")] Dlst, #[serde(rename = "SUSP")] Susp, #[serde(rename = "EXWA")] Exwa, #[serde(rename = "WTRC")] Wtrc, #[serde(rename = "WRTH")] Wrth, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct ActiveCurrencyAnd13DecimalAmountSimpleType { #[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 SecuritiesOption76 { #[validate] #[serde(rename = "FinInstrmId")] pub fin_instrm_id: SecurityIdentification19, #[serde(rename = "CdtDbtInd")] pub cdt_dbt_ind: CreditDebitCode, #[serde(rename = "EntitldQty")] pub entitld_qty: Quantity6Choice, #[serde(rename = "PmtDt")] pub pmt_dt: DateFormat58Choice, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum SafekeepingPlace2Code { #[serde(rename = "SHHE")] Shhe, #[serde(rename = "ALLP")] Allp, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct PercentageRate { #[serde(rename = "$text")] pub value: f64, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct PartyIdentification127ChoiceEnum { #[serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none")] pub any_bic: Option, #[serde(rename = "PrtryId", skip_serializing_if = "Option::is_none")] pub prtry_id: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct PartyIdentification127Choice { #[serde(flatten)] pub value: PartyIdentification127ChoiceEnum, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum SafekeepingPlace1Code { #[serde(rename = "CUST")] Cust, #[serde(rename = "ICSD")] Icsd, #[serde(rename = "NCSD")] Ncsd, #[serde(rename = "SHHE")] Shhe, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct DateFormat58ChoiceEnum { #[serde(rename = "DtOrDtTm", skip_serializing_if = "Option::is_none")] pub dt_or_dt_tm: Option, #[serde(rename = "DtCd", skip_serializing_if = "Option::is_none")] pub dt_cd: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct DateFormat58Choice { #[serde(flatten)] pub value: DateFormat58ChoiceEnum, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum MarketClaimType1Code { #[serde(rename = "MKTC")] Mktc, #[serde(rename = "RVMC")] Rvmc, #[default] Unknown, } #[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 AnyBicDec2014Identifier { #[validate(regex = "ANY_BIC_DEC_2014_IDENTIFIER_REGEX")] #[serde(rename = "$text")] pub value: String, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum DateType1Code { #[serde(rename = "UKWN")] Ukwn, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct GenericIdentification30 { #[validate] #[serde(rename = "Id")] pub id: Exact4AlphaNumericText, #[validate] #[serde(rename = "Issr")] pub issr: Max35Text, #[serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none")] pub schme_nm: Option, } #[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 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 SecurityIdentification19 { #[serde(rename = "ISIN", skip_serializing_if = "Option::is_none")] pub isin: Option, #[validate(length(min = 0,))] #[serde(rename = "OthrId", default)] pub othr_id: Vec, #[serde(rename = "Desc", skip_serializing_if = "Option::is_none")] pub desc: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct IdentificationType42ChoiceEnum { #[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 IdentificationType42Choice { #[serde(flatten)] pub value: IdentificationType42ChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct IdentificationSource3ChoiceEnum { #[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 IdentificationSource3Choice { #[serde(flatten)] pub value: IdentificationSource3ChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct FinancialInstrumentQuantity1ChoiceEnum { #[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, #[serde(rename = "AmtsdVal", skip_serializing_if = "Option::is_none")] pub amtsd_val: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct FinancialInstrumentQuantity1Choice { #[serde(flatten)] pub value: FinancialInstrumentQuantity1ChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CorporateActionOption185 { #[validate] #[serde(rename = "OptnNb")] pub optn_nb: Exact3NumericText, #[serde(rename = "OptnTp")] pub optn_tp: CorporateActionOption30Choice, #[validate(length(min = 0,))] #[serde(rename = "SctiesMvmntDtls", default)] pub scties_mvmnt_dtls: Vec, #[validate(length(min = 0,))] #[serde(rename = "CshMvmntDtls", default)] pub csh_mvmnt_dtls: Vec, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum DateType8Code { #[serde(rename = "UKWN")] Ukwn, #[serde(rename = "ONGO")] Ongo, #[default] Unknown, } #[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, ::derive_builder::Builder, ::validator::Validate, )] pub struct PartyIdentification122ChoiceEnum { #[serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none")] pub any_bic: Option, #[serde(rename = "NmAndAdr", skip_serializing_if = "Option::is_none")] pub nm_and_adr: Option, #[serde(rename = "Ctry", skip_serializing_if = "Option::is_none")] pub ctry: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct PartyIdentification122Choice { #[serde(flatten)] pub value: PartyIdentification122ChoiceEnum, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum WithholdingTaxRateType1Code { #[serde(rename = "BWIT")] Bwit, #[serde(rename = "FTCA")] Ftca, #[serde(rename = "NRAT")] Nrat, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct SafekeepingPlaceTypeAndText6 { #[serde(rename = "SfkpgPlcTp")] pub sfkpg_plc_tp: SafekeepingPlace2Code, #[serde(rename = "Id", skip_serializing_if = "Option::is_none")] pub id: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct PartyIdentification120ChoiceEnum { #[serde(rename = "PrtryId", skip_serializing_if = "Option::is_none")] pub prtry_id: Option, #[serde(rename = "AnyBIC", skip_serializing_if = "Option::is_none")] pub any_bic: 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 PartyIdentification120Choice { #[serde(flatten)] pub value: PartyIdentification120ChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct Iban2007Identifier { #[validate(regex = "IBAN_2007_IDENTIFIER_REGEX")] #[serde(rename = "$text")] pub value: String, } #[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 Quantity6ChoiceEnum { #[serde(rename = "Qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "OrgnlAndCurFace", skip_serializing_if = "Option::is_none")] pub orgnl_and_cur_face: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct Quantity6Choice { #[serde(flatten)] pub value: Quantity6ChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct IsinOct2015Identifier { #[validate(regex = "ISIN_OCT_2015_IDENTIFIER_REGEX")] #[serde(rename = "$text")] pub value: String, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CashAccountIdentification5ChoiceEnum { #[serde(rename = "Prtry", skip_serializing_if = "Option::is_none")] pub prtry: Option, #[serde(rename = "IBAN", skip_serializing_if = "Option::is_none")] pub iban: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CashAccountIdentification5Choice { #[serde(flatten)] pub value: CashAccountIdentification5ChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct GenericIdentification36 { #[validate] #[serde(rename = "Id")] pub id: Max35Text, #[validate] #[serde(rename = "Issr")] pub issr: Max35Text, #[serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none")] pub schme_nm: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct Max34Text { #[validate(length(min = 1, max = 34,))] #[serde(rename = "$text")] pub value: String, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct SafekeepingPlaceTypeAndIdentification1 { #[serde(rename = "SfkpgPlcTp")] pub sfkpg_plc_tp: SafekeepingPlace1Code, #[validate] #[serde(rename = "Id")] pub id: AnyBicDec2014Identifier, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct PartyIdentification143 { #[serde(rename = "Id")] pub id: PartyIdentification122Choice, #[serde(rename = "PrcgId", skip_serializing_if = "Option::is_none")] pub prcg_id: Option, #[validate(length(min = 0,))] #[serde(rename = "AltrnId", default)] pub altrn_id: Vec, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct AlternatePartyIdentification7 { #[serde(rename = "IdTp")] pub id_tp: IdentificationType42Choice, #[serde(rename = "Ctry")] pub ctry: CountryCode, #[validate] #[serde(rename = "AltrnId")] pub altrn_id: Max35Text, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct ActiveCurrencyAnd13DecimalAmount { #[serde(rename = "ActiveCurrencyAnd13DecimalAmount")] pub value: ActiveCurrencyAnd13DecimalAmountSimpleType, #[serde(rename = "@Ccy")] pub ccy: ActiveCurrencyCode, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CorporateActionEventType85ChoiceEnum { #[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 CorporateActionEventType85Choice { #[serde(flatten)] pub value: CorporateActionEventType85ChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct SupplementaryData1< A: std::fmt::Debug + Default + Clone + PartialEq + ::serde::Serialize + ::validator::Validate, > { #[serde(rename = "PlcAndNm", skip_serializing_if = "Option::is_none")] pub plc_and_nm: Option, #[validate] #[serde(rename = "Envlp")] pub envlp: SupplementaryDataEnvelope1, } #[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 CorporateActionOption11Code { #[serde(rename = "ABST")] Abst, #[serde(rename = "BSPL")] Bspl, #[serde(rename = "BUYA")] Buya, #[serde(rename = "CASE")] Case, #[serde(rename = "CASH")] Cash, #[serde(rename = "CEXC")] Cexc, #[serde(rename = "CONN")] Conn, #[serde(rename = "CONY")] Cony, #[serde(rename = "CTEN")] Cten, #[serde(rename = "EXER")] Exer, #[serde(rename = "LAPS")] Laps, #[serde(rename = "MPUT")] Mput, #[serde(rename = "NOAC")] Noac, #[serde(rename = "NOQU")] Noqu, #[serde(rename = "OFFR")] Offr, #[serde(rename = "OTHR")] Othr, #[serde(rename = "OVER")] Over, #[serde(rename = "QINV")] Qinv, #[serde(rename = "SECU")] Secu, #[serde(rename = "SLLE")] Slle, #[serde(rename = "PRUN")] Prun, #[default] Unknown, } #[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, )] #[serde(rename = "Document")] pub struct Document< A: std::fmt::Debug + Default + Clone + PartialEq + ::serde::Serialize + ::validator::Validate, > { #[validate] #[serde(rename = "MktClmCre")] pub mkt_clm_cre: MarketClaimCreationV01, #[serde(rename = "@xmlns", default = "namespace")] pub xmlns: String, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct Exact4AlphaNumericText { #[validate(regex = "EXACT_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 RateTypeAndPercentageRate8 { #[serde(rename = "RateTp")] pub rate_tp: RateType42Choice, #[validate] #[serde(rename = "Rate")] pub rate: PercentageRate, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct DateCode19ChoiceEnum { #[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 DateCode19Choice { #[serde(flatten)] pub value: DateCode19ChoiceEnum, } #[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, ::derive_builder::Builder, ::validator::Validate, )] pub struct ImpliedCurrencyAndAmount { #[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 SettlementParties75 { #[serde(rename = "Dpstry", skip_serializing_if = "Option::is_none")] pub dpstry: Option, #[serde(rename = "Pty1", skip_serializing_if = "Option::is_none")] pub pty_1: Option, #[serde(rename = "Pty2", skip_serializing_if = "Option::is_none")] pub pty_2: Option, #[serde(rename = "Pty3", skip_serializing_if = "Option::is_none")] pub pty_3: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct DateAndDateTime2ChoiceEnum { #[serde(rename = "DtTm", skip_serializing_if = "Option::is_none")] pub dt_tm: Option, #[serde(rename = "Dt", skip_serializing_if = "Option::is_none")] pub dt: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct DateAndDateTime2Choice { #[serde(flatten)] pub value: DateAndDateTime2ChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct ExternalFinancialInstrumentIdentificationType1Code { #[validate(length(min = 1, max = 4,))] #[serde(rename = "$text")] pub value: String, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct RateAndAmountFormat40ChoiceEnum { #[serde(rename = "RateTpAndRate", skip_serializing_if = "Option::is_none")] pub rate_tp_and_rate: Option, #[serde(rename = "Rate", skip_serializing_if = "Option::is_none")] pub rate: Option, #[serde(rename = "Amt", skip_serializing_if = "Option::is_none")] pub amt: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct RateAndAmountFormat40Choice { #[serde(flatten)] pub value: RateAndAmountFormat40ChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct References25 { #[validate] #[serde(rename = "AcctSvcrTxId")] pub acct_svcr_tx_id: Max35Text, #[serde(rename = "MktInfrstrctrTxId", skip_serializing_if = "Option::is_none")] pub mkt_infrstrctr_tx_id: Option, #[serde(rename = "PrcrTxId", skip_serializing_if = "Option::is_none")] pub prcr_tx_id: Option, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CorporateActionGeneralInformation157 { #[validate] #[serde(rename = "CorpActnEvtId")] pub corp_actn_evt_id: Max35Text, #[serde(rename = "OffclCorpActnEvtId", skip_serializing_if = "Option::is_none")] pub offcl_corp_actn_evt_id: Option, #[serde(rename = "EvtTp")] pub evt_tp: CorporateActionEventType85Choice, #[serde(rename = "FinInstrmId", skip_serializing_if = "Option::is_none")] pub fin_instrm_id: 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 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 ActiveCurrencyCode { #[validate(regex = "ACTIVE_CURRENCY_CODE_REGEX")] #[serde(rename = "$text")] pub value: String, } #[derive(Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize)] pub enum TypeOfIdentification1Code { #[serde(rename = "ARNU")] Arnu, #[serde(rename = "CCPT")] Ccpt, #[serde(rename = "CHTY")] Chty, #[serde(rename = "CORP")] Corp, #[serde(rename = "DRLC")] Drlc, #[serde(rename = "FIIN")] Fiin, #[serde(rename = "TXID")] Txid, #[default] Unknown, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct SafekeepingPlaceFormat28ChoiceEnum { #[serde(rename = "TpAndId", skip_serializing_if = "Option::is_none")] pub tp_and_id: Option, #[serde(rename = "Id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "Ctry", skip_serializing_if = "Option::is_none")] pub ctry: 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 SafekeepingPlaceFormat28Choice { #[serde(flatten)] pub value: SafekeepingPlaceFormat28ChoiceEnum, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct PartyIdentificationAndAccount163 { #[serde(rename = "Id")] pub id: PartyIdentification120Choice, #[serde(rename = "SfkpgAcct", skip_serializing_if = "Option::is_none")] pub sfkpg_acct: Option, #[serde(rename = "PrcgId", skip_serializing_if = "Option::is_none")] pub prcg_id: Option, #[validate(length(min = 0,))] #[serde(rename = "AltrnId", default)] pub altrn_id: Vec, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct CorporateActionOption30ChoiceEnum { #[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 CorporateActionOption30Choice { #[serde(flatten)] pub value: CorporateActionOption30ChoiceEnum, } #[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 CountryCode { #[validate(regex = "COUNTRY_CODE_REGEX")] #[serde(rename = "$text")] pub value: String, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct MarketClaimCreationV01< A: std::fmt::Debug + Default + Clone + PartialEq + ::serde::Serialize + ::validator::Validate, > { #[validate] #[serde(rename = "TxRef")] pub tx_ref: References25, #[validate] #[serde(rename = "CorpActnGnlInf")] pub corp_actn_gnl_inf: CorporateActionGeneralInformation157, #[validate] #[serde(rename = "RltdSttlmInstrDtls")] pub rltd_sttlm_instr_dtls: RelatedSettlementInstruction1, #[validate] #[serde(rename = "AcctDtls")] pub acct_dtls: AccountIdentification46, #[serde(rename = "CorpActnDtls", skip_serializing_if = "Option::is_none")] pub corp_actn_dtls: Option, #[serde(rename = "MktClmTp")] pub mkt_clm_tp: MarketClaimType1Code, #[validate] #[serde(rename = "MktClmDtls")] pub mkt_clm_dtls: CorporateActionOption185, #[serde(rename = "DlvrgSttlmPties", skip_serializing_if = "Option::is_none")] pub dlvrg_sttlm_pties: Option, #[serde(rename = "RcvgSttlmPties", skip_serializing_if = "Option::is_none")] pub rcvg_sttlm_pties: Option, #[validate(length(min = 0,))] #[serde(rename = "SplmtryData", default)] pub splmtry_data: Vec>, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct AccountIdentification46 { #[validate] #[serde(rename = "SfkpgAcct")] pub sfkpg_acct: Max35Text, #[serde(rename = "AcctOwnr", skip_serializing_if = "Option::is_none")] pub acct_ownr: 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 OriginalAndCurrentQuantities1 { #[validate] #[serde(rename = "FaceAmt")] pub face_amt: ImpliedCurrencyAndAmount, #[validate] #[serde(rename = "AmtsdVal")] pub amtsd_val: ImpliedCurrencyAndAmount, } #[derive( Debug, Default, Clone, PartialEq, ::serde::Serialize, ::serde::Deserialize, ::derive_builder::Builder, ::validator::Validate, )] pub struct OtherIdentification1 { #[validate] #[serde(rename = "Id")] pub id: Max35Text, #[serde(rename = "Sfx", skip_serializing_if = "Option::is_none")] pub sfx: Option, #[serde(rename = "Tp")] pub tp: IdentificationSource3Choice, }