octopush/crates/gitea_raw_client/src/models/user.rs
Kasper Juul Hermansen 991861db99
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Rewrite rust (#38)
Co-authored-by: kjuulh <contact@kjuulh.io>
Reviewed-on: #38
2022-11-27 11:21:35 +00:00

99 lines
3.4 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
*/
/// User : User represents a user
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct User {
/// Is user active
#[serde(rename = "active", skip_serializing_if = "Option::is_none")]
pub active: Option<bool>,
/// URL to the user's avatar
#[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")]
pub avatar_url: Option<String>,
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
pub created: Option<String>,
/// the user's description
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
/// user counts
#[serde(rename = "followers_count", skip_serializing_if = "Option::is_none")]
pub followers_count: Option<i64>,
#[serde(rename = "following_count", skip_serializing_if = "Option::is_none")]
pub following_count: Option<i64>,
/// the user's full name
#[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
pub full_name: Option<String>,
/// the user's id
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i64>,
/// Is the user an administrator
#[serde(rename = "is_admin", skip_serializing_if = "Option::is_none")]
pub is_admin: Option<bool>,
/// User locale
#[serde(rename = "language", skip_serializing_if = "Option::is_none")]
pub language: Option<String>,
#[serde(rename = "last_login", skip_serializing_if = "Option::is_none")]
pub last_login: Option<String>,
/// the user's location
#[serde(rename = "location", skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
/// the user's username
#[serde(rename = "login", skip_serializing_if = "Option::is_none")]
pub login: Option<String>,
/// Is user login prohibited
#[serde(rename = "prohibit_login", skip_serializing_if = "Option::is_none")]
pub prohibit_login: Option<bool>,
/// Is user restricted
#[serde(rename = "restricted", skip_serializing_if = "Option::is_none")]
pub restricted: Option<bool>,
#[serde(rename = "starred_repos_count", skip_serializing_if = "Option::is_none")]
pub starred_repos_count: Option<i64>,
/// User visibility level option: public, limited, private
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
pub visibility: Option<String>,
/// the user's website
#[serde(rename = "website", skip_serializing_if = "Option::is_none")]
pub website: Option<String>,
}
impl User {
/// User represents a user
pub fn new() -> User {
User {
active: None,
avatar_url: None,
created: None,
description: None,
email: None,
followers_count: None,
following_count: None,
full_name: None,
id: None,
is_admin: None,
language: None,
last_login: None,
location: None,
login: None,
prohibit_login: None,
restricted: None,
starred_repos_count: None,
visibility: None,
website: None,
}
}
}