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 OutputAnalyzerJob {
    #[serde(rename = "_id")]
    pub _id: String,
    #[serde(rename = "_type")]
    pub _type: String,
    #[serde(rename = "_createdBy")]
    pub _created_by: String,
    #[serde(rename = "_createdAt")]
    pub _created_at: 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 = "_updatedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub _updated_at: Option<Option<i64>>,
    #[serde(rename = "analyzerId")]
    pub analyzer_id: String,
    #[serde(rename = "analyzerName")]
    pub analyzer_name: String,
    #[serde(rename = "analyzerDefinition")]
    pub analyzer_definition: String,
    #[serde(rename = "status")]
    pub status: String,
    #[serde(rename = "startDate")]
    pub start_date: i64,
    #[serde(rename = "endDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub end_date: Option<Option<i64>>,
    #[serde(rename = "cortexId")]
    pub cortex_id: String,
    #[serde(rename = "cortexJobId")]
    pub cortex_job_id: String,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "operations", deserialize_with = "Option::deserialize")]
    pub operations: Option<String>,
    #[serde(rename = "report", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub report: Option<Option<std::collections::HashMap<String, serde_json::Value>>>,
    #[serde(rename = "case_artifact", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub case_artifact: Option<Option<std::collections::HashMap<String, serde_json::Value>>>,
}

impl OutputAnalyzerJob {
    pub fn new(_id: String, _type: String, _created_by: String, _created_at: i64, analyzer_id: String, analyzer_name: String, analyzer_definition: String, status: String, start_date: i64, cortex_id: String, cortex_job_id: String, id: String, operations: Option<String>) -> OutputAnalyzerJob {
        OutputAnalyzerJob {
            _id,
            _type,
            _created_by,
            _created_at,
            _updated_by: None,
            _updated_at: None,
            analyzer_id,
            analyzer_name,
            analyzer_definition,
            status,
            start_date,
            end_date: None,
            cortex_id,
            cortex_job_id,
            id,
            operations,
            report: None,
            case_artifact: None,
        }
    }
}