Skip to main content

authentik_client/models/
flow_set.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.10.4
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// FlowSet : Stripped down flow serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FlowSet {
17    #[serde(rename = "pk")]
18    pub pk: uuid::Uuid,
19    #[serde(rename = "policybindingmodel_ptr_id")]
20    pub policybindingmodel_ptr_id: uuid::Uuid,
21    #[serde(rename = "name")]
22    pub name: String,
23    /// Visible in the URL.
24    #[serde(rename = "slug")]
25    pub slug: String,
26    /// Shown as the Title in Flow pages.
27    #[serde(rename = "title")]
28    pub title: String,
29    /// Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik.
30    #[serde(rename = "designation")]
31    pub designation: models::FlowDesignationEnum,
32    /// Get the URL to the background image. If the name is /static or starts with http it is returned as-is
33    #[serde(rename = "background")]
34    pub background: String,
35    #[serde(rename = "policy_engine_mode", skip_serializing_if = "Option::is_none")]
36    pub policy_engine_mode: Option<models::PolicyEngineMode>,
37    /// Enable compatibility mode, increases compatibility with password managers on mobile devices.
38    #[serde(rename = "compatibility_mode", skip_serializing_if = "Option::is_none")]
39    pub compatibility_mode: Option<bool>,
40    /// Get export URL for flow
41    #[serde(rename = "export_url")]
42    pub export_url: String,
43    #[serde(rename = "layout", skip_serializing_if = "Option::is_none")]
44    pub layout: Option<models::FlowLayoutEnum>,
45    /// Configure what should happen when a flow denies access to a user.
46    #[serde(rename = "denied_action", skip_serializing_if = "Option::is_none")]
47    pub denied_action: Option<models::DeniedActionEnum>,
48}
49
50impl FlowSet {
51    /// Stripped down flow serializer
52    pub fn new(
53        pk: uuid::Uuid,
54        policybindingmodel_ptr_id: uuid::Uuid,
55        name: String,
56        slug: String,
57        title: String,
58        designation: models::FlowDesignationEnum,
59        background: String,
60        export_url: String,
61    ) -> FlowSet {
62        FlowSet {
63            pk,
64            policybindingmodel_ptr_id,
65            name,
66            slug,
67            title,
68            designation,
69            background,
70            policy_engine_mode: None,
71            compatibility_mode: None,
72            export_url,
73            layout: None,
74            denied_action: None,
75        }
76    }
77}