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