thehive_client/models/
input_procedure.rs

1/*
2 * TheHive API
3 *
4 * Comprehensive OpenAPI specification inferred from the TheHive4py client library. This API allows interaction with TheHive platform for managing alerts, cases, observables, tasks, users, and other entities. 
5 *
6 * The version of the OpenAPI document: 2.1.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct InputProcedure {
16    /// Epoch milliseconds
17    #[serde(rename = "occurDate")]
18    pub occur_date: i64,
19    /// MITRE ATT&CK pattern ID (e.g., T1566)
20    #[serde(rename = "patternId")]
21    pub pattern_id: String,
22    #[serde(rename = "tactic", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub tactic: Option<Option<String>>,
24    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub description: Option<Option<String>>,
26}
27
28impl InputProcedure {
29    pub fn new(occur_date: i64, pattern_id: String) -> InputProcedure {
30        InputProcedure {
31            occur_date,
32            pattern_id,
33            tactic: None,
34            description: None,
35        }
36    }
37}
38