authentik_rust/models/
intent_enum.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2024.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// IntentEnum : * `verification` - Intent Verification * `api` - Intent Api * `recovery` - Intent Recovery * `app_password` - Intent App Password
14/// * `verification` - Intent Verification * `api` - Intent Api * `recovery` - Intent Recovery * `app_password` - Intent App Password
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum IntentEnum {
17    #[serde(rename = "verification")]
18    Verification,
19    #[serde(rename = "api")]
20    Api,
21    #[serde(rename = "recovery")]
22    Recovery,
23    #[serde(rename = "app_password")]
24    AppPassword,
25
26}
27
28impl ToString for IntentEnum {
29    fn to_string(&self) -> String {
30        match self {
31            Self::Verification => String::from("verification"),
32            Self::Api => String::from("api"),
33            Self::Recovery => String::from("recovery"),
34            Self::AppPassword => String::from("app_password"),
35        }
36    }
37}
38
39impl Default for IntentEnum {
40    fn default() -> IntentEnum {
41        Self::Verification
42    }
43}
44