authentik_rust/models/
used_by_action_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/// UsedByActionEnum : * `cascade` - CASCADE * `cascade_many` - CASCADE_MANY * `set_null` - SET_NULL * `set_default` - SET_DEFAULT
14/// * `cascade` - CASCADE * `cascade_many` - CASCADE_MANY * `set_null` - SET_NULL * `set_default` - SET_DEFAULT
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum UsedByActionEnum {
17    #[serde(rename = "cascade")]
18    Cascade,
19    #[serde(rename = "cascade_many")]
20    CascadeMany,
21    #[serde(rename = "set_null")]
22    SetNull,
23    #[serde(rename = "set_default")]
24    SetDefault,
25
26}
27
28impl ToString for UsedByActionEnum {
29    fn to_string(&self) -> String {
30        match self {
31            Self::Cascade => String::from("cascade"),
32            Self::CascadeMany => String::from("cascade_many"),
33            Self::SetNull => String::from("set_null"),
34            Self::SetDefault => String::from("set_default"),
35        }
36    }
37}
38
39impl Default for UsedByActionEnum {
40    fn default() -> UsedByActionEnum {
41        Self::Cascade
42    }
43}
44