58 lines
1.8 KiB
Rust
58 lines
1.8 KiB
Rust
/*
|
|
* Gitea API.
|
|
*
|
|
* This documentation describes the Gitea API.
|
|
*
|
|
* The version of the OpenAPI document: 1.17.3
|
|
*
|
|
* Generated by: https://openapi-generator.tech
|
|
*/
|
|
|
|
/// CreateUserOption : CreateUserOption create user options
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
|
pub struct CreateUserOption {
|
|
#[serde(rename = "email")]
|
|
pub email: String,
|
|
#[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
|
|
pub full_name: Option<String>,
|
|
#[serde(rename = "login_name", skip_serializing_if = "Option::is_none")]
|
|
pub login_name: Option<String>,
|
|
#[serde(rename = "must_change_password", skip_serializing_if = "Option::is_none")]
|
|
pub must_change_password: Option<bool>,
|
|
#[serde(rename = "password")]
|
|
pub password: String,
|
|
#[serde(rename = "restricted", skip_serializing_if = "Option::is_none")]
|
|
pub restricted: Option<bool>,
|
|
#[serde(rename = "send_notify", skip_serializing_if = "Option::is_none")]
|
|
pub send_notify: Option<bool>,
|
|
#[serde(rename = "source_id", skip_serializing_if = "Option::is_none")]
|
|
pub source_id: Option<i64>,
|
|
#[serde(rename = "username")]
|
|
pub username: String,
|
|
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
|
|
pub visibility: Option<String>,
|
|
}
|
|
|
|
impl CreateUserOption {
|
|
/// CreateUserOption create user options
|
|
pub fn new(email: String, password: String, username: String) -> CreateUserOption {
|
|
CreateUserOption {
|
|
email,
|
|
full_name: None,
|
|
login_name: None,
|
|
must_change_password: None,
|
|
password,
|
|
restricted: None,
|
|
send_notify: None,
|
|
source_id: None,
|
|
username,
|
|
visibility: None,
|
|
}
|
|
}
|
|
}
|
|
|
|
|