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