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 InputCaseTemplate {
    #[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 = "titlePrefix", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub title_prefix: Option<Option<String>>,
    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub description: Option<Option<String>>,
    #[serde(rename = "severity", skip_serializing_if = "Option::is_none")]
    pub severity: Option<models::SeverityValue>,
    #[serde(rename = "tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Option<Vec<String>>>,
    #[serde(rename = "flag", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub flag: Option<Option<bool>>,
    #[serde(rename = "tlp", skip_serializing_if = "Option::is_none")]
    pub tlp: Option<models::TlpValue>,
    #[serde(rename = "pap", skip_serializing_if = "Option::is_none")]
    pub pap: Option<models::PapValue>,
    #[serde(rename = "summary", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub summary: Option<Option<String>>,
    #[serde(rename = "tasks", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub tasks: Option<Option<Vec<models::InputTask>>>,
    #[serde(rename = "pageTemplateIds", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub page_template_ids: Option<Option<Vec<String>>>,
    #[serde(rename = "customFields", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub custom_fields: Option<Option<Vec<models::InputCustomFieldValue>>>,
}

impl InputCaseTemplate {
    pub fn new(name: String) -> InputCaseTemplate {
        InputCaseTemplate {
            name,
            display_name: None,
            title_prefix: None,
            description: None,
            severity: None,
            tags: None,
            flag: None,
            tlp: None,
            pap: None,
            summary: None,
            tasks: None,
            page_template_ids: None,
            custom_fields: None,
        }
    }
}