authentik_rust/models/
event_actions.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/// EventActions : * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix
14/// * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum EventActions {
17    #[serde(rename = "login")]
18    Login,
19    #[serde(rename = "login_failed")]
20    LoginFailed,
21    #[serde(rename = "logout")]
22    Logout,
23    #[serde(rename = "user_write")]
24    UserWrite,
25    #[serde(rename = "suspicious_request")]
26    SuspiciousRequest,
27    #[serde(rename = "password_set")]
28    PasswordSet,
29    #[serde(rename = "secret_view")]
30    SecretView,
31    #[serde(rename = "secret_rotate")]
32    SecretRotate,
33    #[serde(rename = "invitation_used")]
34    InvitationUsed,
35    #[serde(rename = "authorize_application")]
36    AuthorizeApplication,
37    #[serde(rename = "source_linked")]
38    SourceLinked,
39    #[serde(rename = "impersonation_started")]
40    ImpersonationStarted,
41    #[serde(rename = "impersonation_ended")]
42    ImpersonationEnded,
43    #[serde(rename = "flow_execution")]
44    FlowExecution,
45    #[serde(rename = "policy_execution")]
46    PolicyExecution,
47    #[serde(rename = "policy_exception")]
48    PolicyException,
49    #[serde(rename = "property_mapping_exception")]
50    PropertyMappingException,
51    #[serde(rename = "system_task_execution")]
52    SystemTaskExecution,
53    #[serde(rename = "system_task_exception")]
54    SystemTaskException,
55    #[serde(rename = "system_exception")]
56    SystemException,
57    #[serde(rename = "configuration_error")]
58    ConfigurationError,
59    #[serde(rename = "model_created")]
60    ModelCreated,
61    #[serde(rename = "model_updated")]
62    ModelUpdated,
63    #[serde(rename = "model_deleted")]
64    ModelDeleted,
65    #[serde(rename = "email_sent")]
66    EmailSent,
67    #[serde(rename = "update_available")]
68    UpdateAvailable,
69    #[serde(rename = "custom_")]
70    Custom,
71
72}
73
74impl ToString for EventActions {
75    fn to_string(&self) -> String {
76        match self {
77            Self::Login => String::from("login"),
78            Self::LoginFailed => String::from("login_failed"),
79            Self::Logout => String::from("logout"),
80            Self::UserWrite => String::from("user_write"),
81            Self::SuspiciousRequest => String::from("suspicious_request"),
82            Self::PasswordSet => String::from("password_set"),
83            Self::SecretView => String::from("secret_view"),
84            Self::SecretRotate => String::from("secret_rotate"),
85            Self::InvitationUsed => String::from("invitation_used"),
86            Self::AuthorizeApplication => String::from("authorize_application"),
87            Self::SourceLinked => String::from("source_linked"),
88            Self::ImpersonationStarted => String::from("impersonation_started"),
89            Self::ImpersonationEnded => String::from("impersonation_ended"),
90            Self::FlowExecution => String::from("flow_execution"),
91            Self::PolicyExecution => String::from("policy_execution"),
92            Self::PolicyException => String::from("policy_exception"),
93            Self::PropertyMappingException => String::from("property_mapping_exception"),
94            Self::SystemTaskExecution => String::from("system_task_execution"),
95            Self::SystemTaskException => String::from("system_task_exception"),
96            Self::SystemException => String::from("system_exception"),
97            Self::ConfigurationError => String::from("configuration_error"),
98            Self::ModelCreated => String::from("model_created"),
99            Self::ModelUpdated => String::from("model_updated"),
100            Self::ModelDeleted => String::from("model_deleted"),
101            Self::EmailSent => String::from("email_sent"),
102            Self::UpdateAvailable => String::from("update_available"),
103            Self::Custom => String::from("custom_"),
104        }
105    }
106}
107
108impl Default for EventActions {
109    fn default() -> EventActions {
110        Self::Login
111    }
112}
113