Skip to main content

authentik_client/models/
invitation_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2026.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// InvitationRequest : Invitation Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct InvitationRequest {
17    #[serde(rename = "name")]
18    pub name: String,
19    #[serde(
20        rename = "expires",
21        default,
22        with = "::serde_with::rust::double_option",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub expires: Option<Option<String>>,
26    #[serde(rename = "fixed_data", skip_serializing_if = "Option::is_none")]
27    pub fixed_data: Option<std::collections::HashMap<String, serde_json::Value>>,
28    /// When enabled, the invitation will be deleted after usage.
29    #[serde(rename = "single_use", skip_serializing_if = "Option::is_none")]
30    pub single_use: Option<bool>,
31    /// When set, only the configured flow can use this invitation.
32    #[serde(
33        rename = "flow",
34        default,
35        with = "::serde_with::rust::double_option",
36        skip_serializing_if = "Option::is_none"
37    )]
38    pub flow: Option<Option<uuid::Uuid>>,
39}
40
41impl InvitationRequest {
42    /// Invitation Serializer
43    pub fn new(name: String) -> InvitationRequest {
44        InvitationRequest {
45            name,
46            expires: None,
47            fixed_data: None,
48            single_use: None,
49            flow: None,
50        }
51    }
52}