use evidence_chain::EvidenceChain;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct HeuristicMatch {
pub id: String,
pub version: String,
pub event_type: String,
pub pattern: String,
pub trigger_scope: String,
pub summary: String,
pub features: serde_json::Value,
pub evidence: Option<EvidenceChain>,
}
impl HeuristicMatch {
pub fn new(
id: &'static str,
version: &'static str,
event_type: &'static str,
pattern: &'static str,
trigger_scope: &'static str,
summary: String,
features: serde_json::Value,
) -> Self {
Self {
id: id.to_string(),
version: version.to_string(),
event_type: event_type.to_string(),
pattern: pattern.to_string(),
trigger_scope: trigger_scope.to_string(),
summary,
features,
evidence: None,
}
}
}