thehive_client/models/
output_task.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 OutputTask {
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 = "title")]
29    pub title: String,
30    #[serde(rename = "group")]
31    pub group: 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 = "status")]
35    pub status: String,
36    #[serde(rename = "flag")]
37    pub flag: bool,
38    #[serde(rename = "startDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
39    pub start_date: Option<Option<i64>>,
40    #[serde(rename = "endDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
41    pub end_date: Option<Option<i64>>,
42    #[serde(rename = "order")]
43    pub order: i32,
44    #[serde(rename = "assignee", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
45    pub assignee: Option<Option<String>>,
46    #[serde(rename = "dueDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
47    pub due_date: Option<Option<i64>>,
48    #[serde(rename = "mandatory")]
49    pub mandatory: bool,
50    #[serde(rename = "extraData")]
51    pub extra_data: std::collections::HashMap<String, serde_json::Value>,
52}
53
54impl OutputTask {
55    pub fn new(_id: String, _type: String, _created_by: String, _created_at: i64, title: String, group: String, status: String, flag: bool, order: i32, mandatory: bool, extra_data: std::collections::HashMap<String, serde_json::Value>) -> OutputTask {
56        OutputTask {
57            _id,
58            _type,
59            _created_by,
60            _created_at,
61            _updated_by: None,
62            _updated_at: None,
63            title,
64            group,
65            description: None,
66            status,
67            flag,
68            start_date: None,
69            end_date: None,
70            order,
71            assignee: None,
72            due_date: None,
73            mandatory,
74            extra_data,
75        }
76    }
77}
78