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 OutputProcedure {
    #[serde(rename = "_id")]
    pub _id: String,
    #[serde(rename = "_createdAt")]
    pub _created_at: i64,
    #[serde(rename = "_createdBy")]
    pub _created_by: String,
    #[serde(rename = "_updatedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub _updated_at: Option<Option<i64>>,
    #[serde(rename = "_updatedBy", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub _updated_by: Option<Option<String>>,
    #[serde(rename = "occurDate")]
    pub occur_date: i64,
    #[serde(rename = "tactic")]
    pub tactic: String,
    #[serde(rename = "tacticLabel")]
    pub tactic_label: String,
    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub description: Option<Option<String>>,
    #[serde(rename = "patternId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub pattern_id: Option<Option<String>>,
    #[serde(rename = "patternName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub pattern_name: Option<Option<String>>,
    #[serde(rename = "extraData")]
    pub extra_data: std::collections::HashMap<String, serde_json::Value>,
}

impl OutputProcedure {
    pub fn new(_id: String, _created_at: i64, _created_by: String, occur_date: i64, tactic: String, tactic_label: String, extra_data: std::collections::HashMap<String, serde_json::Value>) -> OutputProcedure {
        OutputProcedure {
            _id,
            _created_at,
            _created_by,
            _updated_at: None,
            _updated_by: None,
            occur_date,
            tactic,
            tactic_label,
            description: None,
            pattern_id: None,
            pattern_name: None,
            extra_data,
        }
    }
}