windmill_api/models/
create_user_globally_request.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.505.0
7 * Contact: contact@windmill.dev
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 CreateUserGloballyRequest {
16    #[serde(rename = "email")]
17    pub email: String,
18    #[serde(rename = "password")]
19    pub password: String,
20    #[serde(rename = "super_admin")]
21    pub super_admin: bool,
22    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
23    pub name: Option<String>,
24    #[serde(rename = "company", skip_serializing_if = "Option::is_none")]
25    pub company: Option<String>,
26    /// Skip sending email notifications to the user
27    #[serde(rename = "skip_email", skip_serializing_if = "Option::is_none")]
28    pub skip_email: Option<bool>,
29}
30
31impl CreateUserGloballyRequest {
32    pub fn new(email: String, password: String, super_admin: bool) -> CreateUserGloballyRequest {
33        CreateUserGloballyRequest {
34            email,
35            password,
36            super_admin,
37            name: None,
38            company: None,
39            skip_email: None,
40        }
41    }
42}
43