thehive-client 0.1.0

Rust client for TheHive API, enabling programmatic management of alerts, cases, observables, tasks, and other security incident response entities.
Documentation
/*
 * TheHive API
 *
 * 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. 
 *
 * The version of the OpenAPI document: 2.1.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InputCustomField {
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "displayName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub display_name: Option<Option<String>>,
    #[serde(rename = "group")]
    pub group: String,
    #[serde(rename = "description")]
    pub description: String,
    #[serde(rename = "type")]
    pub r#type: String,
    #[serde(rename = "mandatory", skip_serializing_if = "Option::is_none")]
    pub mandatory: Option<bool>,
    #[serde(rename = "options", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub options: Option<Option<Vec<String>>>,
}

impl InputCustomField {
    pub fn new(name: String, group: String, description: String, r#type: String) -> InputCustomField {
        InputCustomField {
            name,
            display_name: None,
            group,
            description,
            r#type,
            mandatory: None,
            options: None,
        }
    }
}