pub struct AmlScenario {Show 16 fields
pub scenario_id: String,
pub typology: AmlTypology,
pub secondary_typologies: Vec<AmlTypology>,
pub stages: Vec<LaunderingStage>,
pub start_date: NaiveDate,
pub end_date: NaiveDate,
pub involved_customers: Vec<Uuid>,
pub involved_accounts: Vec<Uuid>,
pub involved_transactions: Vec<Uuid>,
pub total_amount: Decimal,
pub evasion_tactics: Vec<EvasionTactic>,
pub sophistication: Sophistication,
pub detectability: f64,
pub narrative: CaseNarrative,
pub expected_alerts: Vec<ExpectedAlert>,
pub was_successful: bool,
}Expand description
An AML scenario (ground truth case).
Fields§
§scenario_id: StringUnique scenario identifier
typology: AmlTypologyPrimary AML typology
secondary_typologies: Vec<AmlTypology>Secondary typologies (if multiple)
stages: Vec<LaunderingStage>Money laundering stages involved
start_date: NaiveDateScenario start date
end_date: NaiveDateScenario end date
involved_customers: Vec<Uuid>Customer IDs involved
involved_accounts: Vec<Uuid>Account IDs involved
involved_transactions: Vec<Uuid>Transaction IDs involved
total_amount: DecimalTotal amount laundered/defrauded
evasion_tactics: Vec<EvasionTactic>Evasion tactics employed
sophistication: SophisticationSophistication level
detectability: f64Detectability score (0.0-1.0, higher = easier to detect)
narrative: CaseNarrativeCase narrative
expected_alerts: Vec<ExpectedAlert>Alert triggers that should fire
was_successful: boolWhether scenario was successfully completed
Implementations§
Source§impl AmlScenario
impl AmlScenario
Sourcepub fn new(
scenario_id: &str,
typology: AmlTypology,
start_date: NaiveDate,
end_date: NaiveDate,
) -> Self
pub fn new( scenario_id: &str, typology: AmlTypology, start_date: NaiveDate, end_date: NaiveDate, ) -> Self
Create a new AML scenario.
Sourcepub fn add_stage(&mut self, stage: LaunderingStage)
pub fn add_stage(&mut self, stage: LaunderingStage)
Add a stage.
Sourcepub fn add_customer(&mut self, customer_id: Uuid)
pub fn add_customer(&mut self, customer_id: Uuid)
Add a customer.
Sourcepub fn add_account(&mut self, account_id: Uuid)
pub fn add_account(&mut self, account_id: Uuid)
Add an account.
Sourcepub fn add_transaction(&mut self, transaction_id: Uuid, amount: Decimal)
pub fn add_transaction(&mut self, transaction_id: Uuid, amount: Decimal)
Add a transaction.
Sourcepub fn add_evasion_tactic(&mut self, tactic: EvasionTactic)
pub fn add_evasion_tactic(&mut self, tactic: EvasionTactic)
Add an evasion tactic.
Sourcepub fn with_sophistication(self, sophistication: Sophistication) -> Self
pub fn with_sophistication(self, sophistication: Sophistication) -> Self
Set sophistication level.
Sourcepub fn complexity_score(&self) -> u8
pub fn complexity_score(&self) -> u8
Calculate case complexity score.
Trait Implementations§
Source§impl Clone for AmlScenario
impl Clone for AmlScenario
Source§fn clone(&self) -> AmlScenario
fn clone(&self) -> AmlScenario
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AmlScenario
impl Debug for AmlScenario
Source§impl<'de> Deserialize<'de> for AmlScenario
impl<'de> Deserialize<'de> for AmlScenario
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AmlScenario
impl RefUnwindSafe for AmlScenario
impl Send for AmlScenario
impl Sync for AmlScenario
impl Unpin for AmlScenario
impl UnwindSafe for AmlScenario
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more