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 InputUser {
    #[serde(rename = "login")]
    pub login: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "profile")]
    pub profile: String,
    #[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub email: Option<Option<String>>,
    #[serde(rename = "password", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub password: Option<Option<String>>,
    #[serde(rename = "organisation", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub organisation: Option<Option<String>>,
    #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<Option<String>>,
}

impl InputUser {
    pub fn new(login: String, name: String, profile: String) -> InputUser {
        InputUser {
            login,
            name,
            profile,
            email: None,
            password: None,
            organisation: None,
            r#type: None,
        }
    }
}