p7m_userauth/models/list_wrapper_account_data_inner.rs
1/*
2 * User and Authentication Backend
3 *
4 * # API for authentication and managing user accounts This is the API of the service at P7M that manages tenants, accounts and authentication. It is the basis of many services of P7M. The caller has to be authenticated with the system and provide a JWT token in the Authorization header of the HTTP request. When using the API you typically get this token by authenticating first with OAuth 2.0. When you are trying this API using the Swagger interface, you need to click the `Authorize` button and then again the Authorize button in the pop-up that gets opened.
5 *
6 * The version of the OpenAPI document: 0.14.2
7 * Contact: tech@p7m.de
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ListWrapperAccountDataInner : An account that can be used to authenticate
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ListWrapperAccountDataInner {
17 /// ID of the account
18 #[serde(rename = "accountId")]
19 pub account_id: uuid::Uuid,
20 /// Tenant this account belongs to
21 #[serde(rename = "tenantId")]
22 pub tenant_id: uuid::Uuid,
23 /// Username of the account
24 #[serde(rename = "username")]
25 pub username: String,
26 /// Real name of the account holder
27 #[serde(rename = "realname")]
28 pub realname: String,
29 /// Type of the account
30 #[serde(rename = "userType")]
31 pub user_type: models::UserType,
32 /// Phone number of the account holder
33 #[serde(rename = "phone")]
34 pub phone: String,
35 /// Last change of the account
36 #[serde(rename = "lastChange")]
37 pub last_change: String,
38}
39
40impl ListWrapperAccountDataInner {
41 /// An account that can be used to authenticate
42 pub fn new(account_id: uuid::Uuid, tenant_id: uuid::Uuid, username: String, realname: String, user_type: models::UserType, phone: String, last_change: String) -> ListWrapperAccountDataInner {
43 ListWrapperAccountDataInner {
44 account_id,
45 tenant_id,
46 username,
47 realname,
48 user_type,
49 phone,
50 last_change,
51 }
52 }
53}
54