gitea_client/models/
user.rs

1/*
2 * Gitea API
3 *
4 * This documentation describes the Gitea API.
5 *
6 * The version of the OpenAPI document: 1.22.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// User : User represents a user
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct User {
17    /// Is user active
18    #[serde(rename = "active", skip_serializing_if = "Option::is_none")]
19    pub active: Option<bool>,
20    /// URL to the user's avatar
21    #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")]
22    pub avatar_url: Option<String>,
23    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
24    pub created: Option<String>,
25    /// the user's description
26    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
27    pub description: Option<String>,
28    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
29    pub email: Option<String>,
30    /// user counts
31    #[serde(rename = "followers_count", skip_serializing_if = "Option::is_none")]
32    pub followers_count: Option<i64>,
33    #[serde(rename = "following_count", skip_serializing_if = "Option::is_none")]
34    pub following_count: Option<i64>,
35    /// the user's full name
36    #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
37    pub full_name: Option<String>,
38    /// URL to the user's gitea page
39    #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")]
40    pub html_url: Option<String>,
41    /// the user's id
42    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
43    pub id: Option<i64>,
44    /// Is the user an administrator
45    #[serde(rename = "is_admin", skip_serializing_if = "Option::is_none")]
46    pub is_admin: Option<bool>,
47    /// User locale
48    #[serde(rename = "language", skip_serializing_if = "Option::is_none")]
49    pub language: Option<String>,
50    #[serde(rename = "last_login", skip_serializing_if = "Option::is_none")]
51    pub last_login: Option<String>,
52    /// the user's location
53    #[serde(rename = "location", skip_serializing_if = "Option::is_none")]
54    pub location: Option<String>,
55    /// the user's username
56    #[serde(rename = "login", skip_serializing_if = "Option::is_none")]
57    pub login: Option<String>,
58    /// the user's authentication sign-in name.
59    #[serde(rename = "login_name", skip_serializing_if = "Option::is_none")]
60    pub login_name: Option<String>,
61    /// Is user login prohibited
62    #[serde(rename = "prohibit_login", skip_serializing_if = "Option::is_none")]
63    pub prohibit_login: Option<bool>,
64    /// Is user restricted
65    #[serde(rename = "restricted", skip_serializing_if = "Option::is_none")]
66    pub restricted: Option<bool>,
67    /// The ID of the user's Authentication Source
68    #[serde(rename = "source_id", skip_serializing_if = "Option::is_none")]
69    pub source_id: Option<i64>,
70    #[serde(rename = "starred_repos_count", skip_serializing_if = "Option::is_none")]
71    pub starred_repos_count: Option<i64>,
72    /// User visibility level option: public, limited, private
73    #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
74    pub visibility: Option<String>,
75    /// the user's website
76    #[serde(rename = "website", skip_serializing_if = "Option::is_none")]
77    pub website: Option<String>,
78}
79
80impl User {
81    /// User represents a user
82    pub fn new() -> User {
83        User {
84            active: None,
85            avatar_url: None,
86            created: None,
87            description: None,
88            email: None,
89            followers_count: None,
90            following_count: None,
91            full_name: None,
92            html_url: None,
93            id: None,
94            is_admin: None,
95            language: None,
96            last_login: None,
97            location: None,
98            login: None,
99            login_name: None,
100            prohibit_login: None,
101            restricted: None,
102            source_id: None,
103            starred_repos_count: None,
104            visibility: None,
105            website: None,
106        }
107    }
108}
109