authentik_client/models/
flow_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.12.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// FlowRequest : Flow Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FlowRequest {
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    /// Background shown during execution
29    #[serde(rename = "background", skip_serializing_if = "Option::is_none")]
30    pub background: Option<String>,
31    #[serde(rename = "policy_engine_mode", skip_serializing_if = "Option::is_none")]
32    pub policy_engine_mode: Option<models::PolicyEngineMode>,
33    /// Enable compatibility mode, increases compatibility with password managers on mobile devices.
34    #[serde(rename = "compatibility_mode", skip_serializing_if = "Option::is_none")]
35    pub compatibility_mode: Option<bool>,
36    #[serde(rename = "layout", skip_serializing_if = "Option::is_none")]
37    pub layout: Option<models::FlowLayoutEnum>,
38    /// Configure what should happen when a flow denies access to a user.
39    #[serde(rename = "denied_action", skip_serializing_if = "Option::is_none")]
40    pub denied_action: Option<models::DeniedActionEnum>,
41    /// Required level of authentication and authorization to access a flow.
42    #[serde(rename = "authentication", skip_serializing_if = "Option::is_none")]
43    pub authentication: Option<models::AuthenticationEnum>,
44}
45
46impl FlowRequest {
47    /// Flow Serializer
48    pub fn new(name: String, slug: String, title: String, designation: models::FlowDesignationEnum) -> FlowRequest {
49        FlowRequest {
50            name,
51            slug,
52            title,
53            designation,
54            background: None,
55            policy_engine_mode: None,
56            compatibility_mode: None,
57            layout: None,
58            denied_action: None,
59            authentication: None,
60        }
61    }
62}