thehive_client/models/
input_user.rs

1/*
2 * TheHive API
3 *
4 * 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. 
5 *
6 * The version of the OpenAPI document: 2.1.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct InputUser {
16    #[serde(rename = "login")]
17    pub login: String,
18    #[serde(rename = "name")]
19    pub name: String,
20    #[serde(rename = "profile")]
21    pub profile: String,
22    #[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub email: Option<Option<String>>,
24    #[serde(rename = "password", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub password: Option<Option<String>>,
26    #[serde(rename = "organisation", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub organisation: Option<Option<String>>,
28    #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub r#type: Option<Option<String>>,
30}
31
32impl InputUser {
33    pub fn new(login: String, name: String, profile: String) -> InputUser {
34        InputUser {
35            login,
36            name,
37            profile,
38            email: None,
39            password: None,
40            organisation: None,
41            r#type: None,
42        }
43    }
44}
45