thehive_client/models/
output_analyzer_job.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 OutputAnalyzerJob {
16    #[serde(rename = "_id")]
17    pub _id: String,
18    #[serde(rename = "_type")]
19    pub _type: String,
20    #[serde(rename = "_createdBy")]
21    pub _created_by: String,
22    #[serde(rename = "_createdAt")]
23    pub _created_at: 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 = "_updatedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub _updated_at: Option<Option<i64>>,
28    #[serde(rename = "analyzerId")]
29    pub analyzer_id: String,
30    #[serde(rename = "analyzerName")]
31    pub analyzer_name: String,
32    #[serde(rename = "analyzerDefinition")]
33    pub analyzer_definition: String,
34    #[serde(rename = "status")]
35    pub status: String,
36    #[serde(rename = "startDate")]
37    pub start_date: i64,
38    #[serde(rename = "endDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
39    pub end_date: Option<Option<i64>>,
40    #[serde(rename = "cortexId")]
41    pub cortex_id: String,
42    #[serde(rename = "cortexJobId")]
43    pub cortex_job_id: String,
44    #[serde(rename = "id")]
45    pub id: String,
46    #[serde(rename = "operations", deserialize_with = "Option::deserialize")]
47    pub operations: Option<String>,
48    #[serde(rename = "report", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
49    pub report: Option<Option<std::collections::HashMap<String, serde_json::Value>>>,
50    #[serde(rename = "case_artifact", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
51    pub case_artifact: Option<Option<std::collections::HashMap<String, serde_json::Value>>>,
52}
53
54impl OutputAnalyzerJob {
55    pub fn new(_id: String, _type: String, _created_by: String, _created_at: i64, analyzer_id: String, analyzer_name: String, analyzer_definition: String, status: String, start_date: i64, cortex_id: String, cortex_job_id: String, id: String, operations: Option<String>) -> OutputAnalyzerJob {
56        OutputAnalyzerJob {
57            _id,
58            _type,
59            _created_by,
60            _created_at,
61            _updated_by: None,
62            _updated_at: None,
63            analyzer_id,
64            analyzer_name,
65            analyzer_definition,
66            status,
67            start_date,
68            end_date: None,
69            cortex_id,
70            cortex_job_id,
71            id,
72            operations,
73            report: None,
74            case_artifact: None,
75        }
76    }
77}
78