Rewrite rust (#38)
Co-authored-by: kjuulh <contact@kjuulh.io> Reviewed-on: https://git.front.kjuulh.io/kjuulh/octopush/pulls/38
This commit was merged in pull request #38.
This commit is contained in:
57
crates/gitea_raw_client/src/models/create_user_option.rs
Normal file
57
crates/gitea_raw_client/src/models/create_user_option.rs
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user