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 OutputCasePage {
    #[serde(rename = "_id")]
    pub _id: String,
    #[serde(rename = "id")]
    pub id: 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 = "title")]
    pub title: String,
    #[serde(rename = "content")]
    pub content: String,
    #[serde(rename = "_type")]
    pub _type: String,
    #[serde(rename = "slug")]
    pub slug: String,
    #[serde(rename = "order")]
    pub order: i32,
    #[serde(rename = "category")]
    pub category: String,
}

impl OutputCasePage {
    pub fn new(_id: String, id: String, created_by: String, created_at: i64, title: String, content: String, _type: String, slug: String, order: i32, category: String) -> OutputCasePage {
        OutputCasePage {
            _id,
            id,
            created_by,
            created_at,
            updated_by: None,
            updated_at: None,
            title,
            content,
            _type,
            slug,
            order,
            category,
        }
    }
}