authentik_rust/models/
policy_engine_mode.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/// PolicyEngineMode : * `all` - all, all policies must pass * `any` - any, any policy must pass
14/// * `all` - all, all policies must pass * `any` - any, any policy must pass
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum PolicyEngineMode {
17    #[serde(rename = "all")]
18    All,
19    #[serde(rename = "any")]
20    Any,
21
22}
23
24impl ToString for PolicyEngineMode {
25    fn to_string(&self) -> String {
26        match self {
27            Self::All => String::from("all"),
28            Self::Any => String::from("any"),
29        }
30    }
31}
32
33impl Default for PolicyEngineMode {
34    fn default() -> PolicyEngineMode {
35        Self::All
36    }
37}
38