authentik_rust/models/
invitation_stage.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/// InvitationStage : InvitationStage Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct InvitationStage {
16    #[serde(rename = "pk")]
17    pub pk: uuid::Uuid,
18    #[serde(rename = "name")]
19    pub name: String,
20    /// Get object type so that we know how to edit the object
21    #[serde(rename = "component")]
22    pub component: String,
23    /// Return object's verbose_name
24    #[serde(rename = "verbose_name")]
25    pub verbose_name: String,
26    /// Return object's plural verbose_name
27    #[serde(rename = "verbose_name_plural")]
28    pub verbose_name_plural: String,
29    /// Return internal model name
30    #[serde(rename = "meta_model_name")]
31    pub meta_model_name: String,
32    #[serde(rename = "flow_set", skip_serializing_if = "Option::is_none")]
33    pub flow_set: Option<Vec<models::FlowSet>>,
34    /// If this flag is set, this Stage will jump to the next Stage when no Invitation is given. By default this Stage will cancel the Flow when no invitation is given.
35    #[serde(rename = "continue_flow_without_invitation", skip_serializing_if = "Option::is_none")]
36    pub continue_flow_without_invitation: Option<bool>,
37}
38
39impl InvitationStage {
40    /// InvitationStage Serializer
41    pub fn new(pk: uuid::Uuid, name: String, component: String, verbose_name: String, verbose_name_plural: String, meta_model_name: String) -> InvitationStage {
42        InvitationStage {
43            pk,
44            name,
45            component,
46            verbose_name,
47            verbose_name_plural,
48            meta_model_name,
49            flow_set: None,
50            continue_flow_without_invitation: None,
51        }
52    }
53}
54