authentik_rust/models/
flow_set.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/// FlowSet : Stripped down flow serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct FlowSet {
16    #[serde(rename = "pk")]
17    pub pk: uuid::Uuid,
18    #[serde(rename = "policybindingmodel_ptr_id")]
19    pub policybindingmodel_ptr_id: uuid::Uuid,
20    #[serde(rename = "name")]
21    pub name: String,
22    /// Visible in the URL.
23    #[serde(rename = "slug")]
24    pub slug: String,
25    /// Shown as the Title in Flow pages.
26    #[serde(rename = "title")]
27    pub title: String,
28    /// 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
29    #[serde(rename = "designation")]
30    pub designation: models::FlowDesignationEnum,
31    /// Get the URL to the background image. If the name is /static or starts with http it is returned as-is
32    #[serde(rename = "background")]
33    pub background: String,
34    #[serde(rename = "policy_engine_mode", skip_serializing_if = "Option::is_none")]
35    pub policy_engine_mode: Option<models::PolicyEngineMode>,
36    /// Enable compatibility mode, increases compatibility with password managers on mobile devices.
37    #[serde(rename = "compatibility_mode", skip_serializing_if = "Option::is_none")]
38    pub compatibility_mode: Option<bool>,
39    /// Get export URL for flow
40    #[serde(rename = "export_url")]
41    pub export_url: String,
42    #[serde(rename = "layout", skip_serializing_if = "Option::is_none")]
43    pub layout: Option<models::FlowLayoutEnum>,
44    /// Configure what should happen when a flow denies access to a user.  * `message_continue` - Message Continue * `message` - Message * `continue` - Continue
45    #[serde(rename = "denied_action", skip_serializing_if = "Option::is_none")]
46    pub denied_action: Option<models::DeniedActionEnum>,
47}
48
49impl FlowSet {
50    /// Stripped down flow serializer
51    pub fn new(pk: uuid::Uuid, policybindingmodel_ptr_id: uuid::Uuid, name: String, slug: String, title: String, designation: models::FlowDesignationEnum, background: String, export_url: String) -> FlowSet {
52        FlowSet {
53            pk,
54            policybindingmodel_ptr_id,
55            name,
56            slug,
57            title,
58            designation,
59            background,
60            policy_engine_mode: None,
61            compatibility_mode: None,
62            export_url,
63            layout: None,
64            denied_action: None,
65        }
66    }
67}
68