open_payments_iso20022_reda/
reda_023_001_01.rsuse serde::{Deserialize, Serialize};
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
pub enum DataModification1Code {
#[default]
#[serde(rename = "INSE")]
CodeINSE,
#[serde(rename = "UPDT")]
CodeUPDT,
#[serde(rename = "DELT")]
CodeDELT,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
#[serde(transparent)]
pub struct Exact4AlphaNumericText {
#[serde(rename = "$value")]
pub exact4_alpha_numeric_text: String,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
pub struct GenericIdentification30 {
#[serde(rename = "Id")]
pub id: Exact4AlphaNumericText,
#[serde(rename = "Issr")]
pub issr: Max35Text,
#[serde(rename = "SchmeNm", skip_serializing_if = "Option::is_none")]
pub schme_nm: Option<Max35Text>,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
#[serde(transparent)]
pub struct ISODate {
#[serde(rename = "$value")]
pub iso_date: String,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
#[serde(transparent)]
pub struct ISODateTime {
#[serde(rename = "$value")]
pub iso_date_time: String,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
pub struct MarketSpecificAttribute1 {
#[serde(rename = "Nm")]
pub nm: Max35Text,
#[serde(rename = "Val")]
pub val: Max350Text,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
#[serde(transparent)]
pub struct Max350Text {
#[serde(rename = "$value")]
pub max350_text: String,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
#[serde(transparent)]
pub struct Max35Text {
#[serde(rename = "$value")]
pub max35_text: String,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
#[serde(transparent)]
pub struct Max70Text {
#[serde(rename = "$value")]
pub max70_text: String,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
pub struct MessageHeader1 {
#[serde(rename = "MsgId")]
pub msg_id: Max35Text,
#[serde(rename = "CreDtTm", skip_serializing_if = "Option::is_none")]
pub cre_dt_tm: Option<String>,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
pub struct SecuritiesAccount19 {
#[serde(rename = "Id")]
pub id: Max35Text,
#[serde(rename = "Tp", skip_serializing_if = "Option::is_none")]
pub tp: Option<GenericIdentification30>,
#[serde(rename = "Nm", skip_serializing_if = "Option::is_none")]
pub nm: Option<Max70Text>,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
pub struct SecuritiesAccountModification2 {
#[serde(rename = "ScpIndctn")]
pub scp_indctn: DataModification1Code,
#[serde(rename = "ReqdMod")]
pub reqd_mod: SecuritiesAccountModification2Choice,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
pub struct SecuritiesAccountModification2Choice {
#[serde(rename = "SysSctiesAcct", skip_serializing_if = "Option::is_none")]
pub sys_scties_acct: Option<SystemSecuritiesAccount5>,
#[serde(rename = "SysRstrctn", skip_serializing_if = "Option::is_none")]
pub sys_rstrctn: Option<SystemRestriction1>,
#[serde(rename = "MktSpcfcAttr", skip_serializing_if = "Option::is_none")]
pub mkt_spcfc_attr: Option<MarketSpecificAttribute1>,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
pub struct SecuritiesAccountModificationRequestV01 {
#[serde(rename = "MsgHdr", skip_serializing_if = "Option::is_none")]
pub msg_hdr: Option<MessageHeader1>,
#[serde(rename = "AcctId")]
pub acct_id: SecuritiesAccount19,
#[serde(rename = "Mod")]
pub mod_attr: Vec<SecuritiesAccountModification2>,
#[serde(rename = "SplmtryData", skip_serializing_if = "Option::is_none")]
pub splmtry_data: Option<Vec<SupplementaryData1>>,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
pub struct SupplementaryData1 {
#[serde(rename = "PlcAndNm", skip_serializing_if = "Option::is_none")]
pub plc_and_nm: Option<Max350Text>,
#[serde(rename = "Envlp")]
pub envlp: SupplementaryDataEnvelope1,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
pub struct SupplementaryDataEnvelope1 {
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
pub struct SystemRestriction1 {
#[serde(rename = "VldFr")]
pub vld_fr: String,
#[serde(rename = "VldTo", skip_serializing_if = "Option::is_none")]
pub vld_to: Option<String>,
#[serde(rename = "Tp")]
pub tp: Max35Text,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
pub struct SystemSecuritiesAccount5 {
#[serde(rename = "ClsgDt", skip_serializing_if = "Option::is_none")]
pub clsg_dt: Option<String>,
#[serde(rename = "HldInd", skip_serializing_if = "Option::is_none")]
pub hld_ind: Option<bool>,
#[serde(rename = "NegPos", skip_serializing_if = "Option::is_none")]
pub neg_pos: Option<bool>,
#[serde(rename = "EndInvstrFlg", skip_serializing_if = "Option::is_none")]
pub end_invstr_flg: Option<Exact4AlphaNumericText>,
#[serde(rename = "PricgSchme", skip_serializing_if = "Option::is_none")]
pub pricg_schme: Option<Exact4AlphaNumericText>,
}
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
#[serde(transparent)]
pub struct TrueFalseIndicator {
#[serde(rename = "$value")]
pub true_false_indicator: bool,
}