authentik_client/models/
rac_provider_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.10.2
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// RacProviderRequest : RACProvider Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RacProviderRequest {
17    #[serde(rename = "name")]
18    pub name: String,
19    /// Flow used for authentication when the associated application is accessed by an un-authenticated user.
20    #[serde(
21        rename = "authentication_flow",
22        default,
23        with = "::serde_with::rust::double_option",
24        skip_serializing_if = "Option::is_none"
25    )]
26    pub authentication_flow: Option<Option<uuid::Uuid>>,
27    /// Flow used when authorizing this provider.
28    #[serde(rename = "authorization_flow")]
29    pub authorization_flow: uuid::Uuid,
30    #[serde(rename = "property_mappings", skip_serializing_if = "Option::is_none")]
31    pub property_mappings: Option<Vec<uuid::Uuid>>,
32    #[serde(rename = "settings", skip_serializing_if = "Option::is_none")]
33    pub settings: Option<std::collections::HashMap<String, serde_json::Value>>,
34    /// Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3)
35    #[serde(rename = "connection_expiry", skip_serializing_if = "Option::is_none")]
36    pub connection_expiry: Option<String>,
37    /// When set to true, connection tokens will be deleted upon disconnect.
38    #[serde(rename = "delete_token_on_disconnect", skip_serializing_if = "Option::is_none")]
39    pub delete_token_on_disconnect: Option<bool>,
40}
41
42impl RacProviderRequest {
43    /// RACProvider Serializer
44    pub fn new(name: String, authorization_flow: uuid::Uuid) -> RacProviderRequest {
45        RacProviderRequest {
46            name,
47            authentication_flow: None,
48            authorization_flow,
49            property_mappings: None,
50            settings: None,
51            connection_expiry: None,
52            delete_token_on_disconnect: None,
53        }
54    }
55}