Skip to main content

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.815.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", skip_serializing_if = "Option::is_none")]
19    pub password: Option<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    /// password (default, requires `password`), pending_oauth (no credential until the first OAuth login proving the address adopts the account), or a configured OAuth login client key
30    #[serde(rename = "login_type", skip_serializing_if = "Option::is_none")]
31    pub login_type: Option<String>,
32}
33
34impl CreateUserGloballyRequest {
35    pub fn new(email: String, super_admin: bool) -> CreateUserGloballyRequest {
36        CreateUserGloballyRequest {
37            email,
38            password: None,
39            super_admin,
40            name: None,
41            company: None,
42            skip_email: None,
43            login_type: None,
44        }
45    }
46}
47