Skip to main content

authentik_client/models/
radius_provider.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.12.4
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// RadiusProvider : RadiusProvider Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RadiusProvider {
17    #[serde(rename = "pk")]
18    pub pk: i32,
19    #[serde(rename = "name")]
20    pub name: String,
21    /// Flow used for authentication when the associated application is accessed by an un-authenticated user.
22    #[serde(
23        rename = "authentication_flow",
24        default,
25        with = "::serde_with::rust::double_option",
26        skip_serializing_if = "Option::is_none"
27    )]
28    pub authentication_flow: Option<Option<uuid::Uuid>>,
29    /// Flow used when authorizing this provider.
30    #[serde(rename = "authorization_flow")]
31    pub authorization_flow: uuid::Uuid,
32    /// Flow used ending the session from a provider.
33    #[serde(rename = "invalidation_flow")]
34    pub invalidation_flow: uuid::Uuid,
35    #[serde(rename = "property_mappings", skip_serializing_if = "Option::is_none")]
36    pub property_mappings: Option<Vec<uuid::Uuid>>,
37    /// Get object component so that we know how to edit the object
38    #[serde(rename = "component")]
39    pub component: String,
40    /// Internal application name, used in URLs.
41    #[serde(rename = "assigned_application_slug", deserialize_with = "Option::deserialize")]
42    pub assigned_application_slug: Option<String>,
43    /// Application's display Name.
44    #[serde(rename = "assigned_application_name", deserialize_with = "Option::deserialize")]
45    pub assigned_application_name: Option<String>,
46    /// Internal application name, used in URLs.
47    #[serde(
48        rename = "assigned_backchannel_application_slug",
49        deserialize_with = "Option::deserialize"
50    )]
51    pub assigned_backchannel_application_slug: Option<String>,
52    /// Application's display Name.
53    #[serde(
54        rename = "assigned_backchannel_application_name",
55        deserialize_with = "Option::deserialize"
56    )]
57    pub assigned_backchannel_application_name: Option<String>,
58    /// Return object's verbose_name
59    #[serde(rename = "verbose_name")]
60    pub verbose_name: String,
61    /// Return object's plural verbose_name
62    #[serde(rename = "verbose_name_plural")]
63    pub verbose_name_plural: String,
64    /// Return internal model name
65    #[serde(rename = "meta_model_name")]
66    pub meta_model_name: String,
67    /// List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped.
68    #[serde(rename = "client_networks", skip_serializing_if = "Option::is_none")]
69    pub client_networks: Option<String>,
70    /// Shared secret between clients and server to hash packets.
71    #[serde(rename = "shared_secret", skip_serializing_if = "Option::is_none")]
72    pub shared_secret: Option<String>,
73    #[serde(rename = "outpost_set")]
74    pub outpost_set: Vec<String>,
75    /// When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon.
76    #[serde(rename = "mfa_support", skip_serializing_if = "Option::is_none")]
77    pub mfa_support: Option<bool>,
78    #[serde(
79        rename = "certificate",
80        default,
81        with = "::serde_with::rust::double_option",
82        skip_serializing_if = "Option::is_none"
83    )]
84    pub certificate: Option<Option<uuid::Uuid>>,
85}
86
87impl RadiusProvider {
88    /// RadiusProvider Serializer
89    pub fn new(
90        pk: i32,
91        name: String,
92        authorization_flow: uuid::Uuid,
93        invalidation_flow: uuid::Uuid,
94        component: String,
95        assigned_application_slug: Option<String>,
96        assigned_application_name: Option<String>,
97        assigned_backchannel_application_slug: Option<String>,
98        assigned_backchannel_application_name: Option<String>,
99        verbose_name: String,
100        verbose_name_plural: String,
101        meta_model_name: String,
102        outpost_set: Vec<String>,
103    ) -> RadiusProvider {
104        RadiusProvider {
105            pk,
106            name,
107            authentication_flow: None,
108            authorization_flow,
109            invalidation_flow,
110            property_mappings: None,
111            component,
112            assigned_application_slug,
113            assigned_application_name,
114            assigned_backchannel_application_slug,
115            assigned_backchannel_application_name,
116            verbose_name,
117            verbose_name_plural,
118            meta_model_name,
119            client_networks: None,
120            shared_secret: None,
121            outpost_set,
122            mfa_support: None,
123            certificate: None,
124        }
125    }
126}