authentik_client/models/
flow_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.8.4
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    #[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    /// Required level of authentication and authorization to access a flow.
39    #[serde(rename = "authentication", skip_serializing_if = "Option::is_none")]
40    pub authentication: Option<models::AuthenticationEnum>,
41}
42
43impl FlowRequest {
44    /// Flow Serializer
45    pub fn new(name: String, slug: String, title: String, designation: models::FlowDesignationEnum) -> FlowRequest {
46        FlowRequest {
47            name,
48            slug,
49            title,
50            designation,
51            policy_engine_mode: None,
52            compatibility_mode: None,
53            layout: None,
54            denied_action: None,
55            authentication: None,
56        }
57    }
58}