thehive_client/models/
input_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 InputCustomField {
16    #[serde(rename = "name")]
17    pub name: String,
18    #[serde(rename = "displayName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub display_name: Option<Option<String>>,
20    #[serde(rename = "group")]
21    pub group: String,
22    #[serde(rename = "description")]
23    pub description: String,
24    #[serde(rename = "type")]
25    pub r#type: String,
26    #[serde(rename = "mandatory", skip_serializing_if = "Option::is_none")]
27    pub mandatory: Option<bool>,
28    #[serde(rename = "options", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub options: Option<Option<Vec<String>>>,
30}
31
32impl InputCustomField {
33    pub fn new(name: String, group: String, description: String, r#type: String) -> InputCustomField {
34        InputCustomField {
35            name,
36            display_name: None,
37            group,
38            description,
39            r#type,
40            mandatory: None,
41            options: None,
42        }
43    }
44}
45