thehive_client/models/
output_custom_field.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 OutputCustomField {
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 = "name")]
29    pub name: String,
30    #[serde(rename = "displayName")]
31    pub display_name: String,
32    #[serde(rename = "group")]
33    pub group: String,
34    #[serde(rename = "description")]
35    pub description: String,
36    #[serde(rename = "type")]
37    pub r#type: String,
38    #[serde(rename = "mandatory")]
39    pub mandatory: bool,
40    #[serde(rename = "options", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
41    pub options: Option<Option<Vec<String>>>,
42}
43
44impl OutputCustomField {
45    pub fn new(_id: String, _type: String, _created_by: String, _created_at: i64, name: String, display_name: String, group: String, description: String, r#type: String, mandatory: bool) -> OutputCustomField {
46        OutputCustomField {
47            _id,
48            _type,
49            _created_by,
50            _created_at,
51            _updated_by: None,
52            _updated_at: None,
53            name,
54            display_name,
55            group,
56            description,
57            r#type,
58            mandatory,
59            options: None,
60        }
61    }
62}
63