authentik-rust 0.0.1

Making authentication simple.
Documentation
/*
 * 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;

/// 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
/// * `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
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum EventActions {
    #[serde(rename = "login")]
    Login,
    #[serde(rename = "login_failed")]
    LoginFailed,
    #[serde(rename = "logout")]
    Logout,
    #[serde(rename = "user_write")]
    UserWrite,
    #[serde(rename = "suspicious_request")]
    SuspiciousRequest,
    #[serde(rename = "password_set")]
    PasswordSet,
    #[serde(rename = "secret_view")]
    SecretView,
    #[serde(rename = "secret_rotate")]
    SecretRotate,
    #[serde(rename = "invitation_used")]
    InvitationUsed,
    #[serde(rename = "authorize_application")]
    AuthorizeApplication,
    #[serde(rename = "source_linked")]
    SourceLinked,
    #[serde(rename = "impersonation_started")]
    ImpersonationStarted,
    #[serde(rename = "impersonation_ended")]
    ImpersonationEnded,
    #[serde(rename = "flow_execution")]
    FlowExecution,
    #[serde(rename = "policy_execution")]
    PolicyExecution,
    #[serde(rename = "policy_exception")]
    PolicyException,
    #[serde(rename = "property_mapping_exception")]
    PropertyMappingException,
    #[serde(rename = "system_task_execution")]
    SystemTaskExecution,
    #[serde(rename = "system_task_exception")]
    SystemTaskException,
    #[serde(rename = "system_exception")]
    SystemException,
    #[serde(rename = "configuration_error")]
    ConfigurationError,
    #[serde(rename = "model_created")]
    ModelCreated,
    #[serde(rename = "model_updated")]
    ModelUpdated,
    #[serde(rename = "model_deleted")]
    ModelDeleted,
    #[serde(rename = "email_sent")]
    EmailSent,
    #[serde(rename = "update_available")]
    UpdateAvailable,
    #[serde(rename = "custom_")]
    Custom,

}

impl ToString for EventActions {
    fn to_string(&self) -> String {
        match self {
            Self::Login => String::from("login"),
            Self::LoginFailed => String::from("login_failed"),
            Self::Logout => String::from("logout"),
            Self::UserWrite => String::from("user_write"),
            Self::SuspiciousRequest => String::from("suspicious_request"),
            Self::PasswordSet => String::from("password_set"),
            Self::SecretView => String::from("secret_view"),
            Self::SecretRotate => String::from("secret_rotate"),
            Self::InvitationUsed => String::from("invitation_used"),
            Self::AuthorizeApplication => String::from("authorize_application"),
            Self::SourceLinked => String::from("source_linked"),
            Self::ImpersonationStarted => String::from("impersonation_started"),
            Self::ImpersonationEnded => String::from("impersonation_ended"),
            Self::FlowExecution => String::from("flow_execution"),
            Self::PolicyExecution => String::from("policy_execution"),
            Self::PolicyException => String::from("policy_exception"),
            Self::PropertyMappingException => String::from("property_mapping_exception"),
            Self::SystemTaskExecution => String::from("system_task_execution"),
            Self::SystemTaskException => String::from("system_task_exception"),
            Self::SystemException => String::from("system_exception"),
            Self::ConfigurationError => String::from("configuration_error"),
            Self::ModelCreated => String::from("model_created"),
            Self::ModelUpdated => String::from("model_updated"),
            Self::ModelDeleted => String::from("model_deleted"),
            Self::EmailSent => String::from("email_sent"),
            Self::UpdateAvailable => String::from("update_available"),
            Self::Custom => String::from("custom_"),
        }
    }
}

impl Default for EventActions {
    fn default() -> EventActions {
        Self::Login
    }
}