thehive_client/models/
output_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 OutputProcedure {
16    #[serde(rename = "_id")]
17    pub _id: String,
18    #[serde(rename = "_createdAt")]
19    pub _created_at: i64,
20    #[serde(rename = "_createdBy")]
21    pub _created_by: String,
22    #[serde(rename = "_updatedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub _updated_at: Option<Option<i64>>,
24    #[serde(rename = "_updatedBy", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub _updated_by: Option<Option<String>>,
26    #[serde(rename = "occurDate")]
27    pub occur_date: i64,
28    #[serde(rename = "tactic")]
29    pub tactic: String,
30    #[serde(rename = "tacticLabel")]
31    pub tactic_label: String,
32    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
33    pub description: Option<Option<String>>,
34    #[serde(rename = "patternId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
35    pub pattern_id: Option<Option<String>>,
36    #[serde(rename = "patternName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
37    pub pattern_name: Option<Option<String>>,
38    #[serde(rename = "extraData")]
39    pub extra_data: std::collections::HashMap<String, serde_json::Value>,
40}
41
42impl OutputProcedure {
43    pub fn new(_id: String, _created_at: i64, _created_by: String, occur_date: i64, tactic: String, tactic_label: String, extra_data: std::collections::HashMap<String, serde_json::Value>) -> OutputProcedure {
44        OutputProcedure {
45            _id,
46            _created_at,
47            _created_by,
48            _updated_at: None,
49            _updated_by: None,
50            occur_date,
51            tactic,
52            tactic_label,
53            description: None,
54            pattern_id: None,
55            pattern_name: None,
56            extra_data,
57        }
58    }
59}
60