Skip to main content

authentik_client/models/
flow_set_request.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/// FlowSetRequest : Stripped down flow serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FlowSetRequest {
17    #[serde(rename = "name")]
18    pub name: String,
19    /// Visible in the URL.
20    #[serde(rename = "slug")]
21    pub slug: String,
22    /// Shown as the Title in Flow pages.
23    #[serde(rename = "title")]
24    pub title: String,
25    /// Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik.
26    #[serde(rename = "designation")]
27    pub designation: models::FlowDesignationEnum,
28    #[serde(rename = "policy_engine_mode", skip_serializing_if = "Option::is_none")]
29    pub policy_engine_mode: Option<models::PolicyEngineMode>,
30    /// Enable compatibility mode, increases compatibility with password managers on mobile devices.
31    #[serde(rename = "compatibility_mode", skip_serializing_if = "Option::is_none")]
32    pub compatibility_mode: Option<bool>,
33    #[serde(rename = "layout", skip_serializing_if = "Option::is_none")]
34    pub layout: Option<models::FlowLayoutEnum>,
35    /// Configure what should happen when a flow denies access to a user.
36    #[serde(rename = "denied_action", skip_serializing_if = "Option::is_none")]
37    pub denied_action: Option<models::DeniedActionEnum>,
38}
39
40impl FlowSetRequest {
41    /// Stripped down flow serializer
42    pub fn new(name: String, slug: String, title: String, designation: models::FlowDesignationEnum) -> FlowSetRequest {
43        FlowSetRequest {
44            name,
45            slug,
46            title,
47            designation,
48            policy_engine_mode: None,
49            compatibility_mode: None,
50            layout: None,
51            denied_action: None,
52        }
53    }
54}