1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* authentik
*
* Making authentication simple.
*
* The version of the OpenAPI document: 2024.2.1
* Contact: hello@goauthentik.io
* Generated by: https://openapi-generator.tech
*/
use crate::models;
/// SubModeEnum : * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains.
/// * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SubModeEnum {
#[serde(rename = "hashed_user_id")]
HashedUserId,
#[serde(rename = "user_id")]
UserId,
#[serde(rename = "user_uuid")]
UserUuid,
#[serde(rename = "user_username")]
UserUsername,
#[serde(rename = "user_email")]
UserEmail,
#[serde(rename = "user_upn")]
UserUpn,
}
impl ToString for SubModeEnum {
fn to_string(&self) -> String {
match self {
Self::HashedUserId => String::from("hashed_user_id"),
Self::UserId => String::from("user_id"),
Self::UserUuid => String::from("user_uuid"),
Self::UserUsername => String::from("user_username"),
Self::UserEmail => String::from("user_email"),
Self::UserUpn => String::from("user_upn"),
}
}
}
impl Default for SubModeEnum {
fn default() -> SubModeEnum {
Self::HashedUserId
}
}