authentik_rust/models/
rac_provider_request.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/// RacProviderRequest : RACProvider Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct RacProviderRequest {
16    #[serde(rename = "name")]
17    pub name: String,
18    /// Flow used for authentication when the associated application is accessed by an un-authenticated user.
19    #[serde(rename = "authentication_flow", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub authentication_flow: Option<Option<uuid::Uuid>>,
21    /// Flow used when authorizing this provider.
22    #[serde(rename = "authorization_flow")]
23    pub authorization_flow: uuid::Uuid,
24    #[serde(rename = "property_mappings", skip_serializing_if = "Option::is_none")]
25    pub property_mappings: Option<Vec<uuid::Uuid>>,
26    #[serde(rename = "settings", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub settings: Option<Option<serde_json::Value>>,
28    /// 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)
29    #[serde(rename = "connection_expiry", skip_serializing_if = "Option::is_none")]
30    pub connection_expiry: Option<String>,
31    /// When set to true, connection tokens will be deleted upon disconnect.
32    #[serde(rename = "delete_token_on_disconnect", skip_serializing_if = "Option::is_none")]
33    pub delete_token_on_disconnect: Option<bool>,
34}
35
36impl RacProviderRequest {
37    /// RACProvider Serializer
38    pub fn new(name: String, authorization_flow: uuid::Uuid) -> RacProviderRequest {
39        RacProviderRequest {
40            name,
41            authentication_flow: None,
42            authorization_flow,
43            property_mappings: None,
44            settings: None,
45            connection_expiry: None,
46            delete_token_on_disconnect: None,
47        }
48    }
49}
50