authentik_client/models/
radius_provider.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/// 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")]
42    pub assigned_application_slug: String,
43    /// Application's display Name.
44    #[serde(rename = "assigned_application_name")]
45    pub assigned_application_name: String,
46    /// Internal application name, used in URLs.
47    #[serde(rename = "assigned_backchannel_application_slug")]
48    pub assigned_backchannel_application_slug: String,
49    /// Application's display Name.
50    #[serde(rename = "assigned_backchannel_application_name")]
51    pub assigned_backchannel_application_name: String,
52    /// Return object's verbose_name
53    #[serde(rename = "verbose_name")]
54    pub verbose_name: String,
55    /// Return object's plural verbose_name
56    #[serde(rename = "verbose_name_plural")]
57    pub verbose_name_plural: String,
58    /// Return internal model name
59    #[serde(rename = "meta_model_name")]
60    pub meta_model_name: String,
61    /// 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.
62    #[serde(rename = "client_networks", skip_serializing_if = "Option::is_none")]
63    pub client_networks: Option<String>,
64    /// Shared secret between clients and server to hash packets.
65    #[serde(rename = "shared_secret", skip_serializing_if = "Option::is_none")]
66    pub shared_secret: Option<String>,
67    #[serde(rename = "outpost_set")]
68    pub outpost_set: Vec<String>,
69    /// 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.
70    #[serde(rename = "mfa_support", skip_serializing_if = "Option::is_none")]
71    pub mfa_support: Option<bool>,
72    #[serde(
73        rename = "certificate",
74        default,
75        with = "::serde_with::rust::double_option",
76        skip_serializing_if = "Option::is_none"
77    )]
78    pub certificate: Option<Option<uuid::Uuid>>,
79}
80
81impl RadiusProvider {
82    /// RadiusProvider Serializer
83    pub fn new(
84        pk: i32,
85        name: String,
86        authorization_flow: uuid::Uuid,
87        invalidation_flow: uuid::Uuid,
88        component: String,
89        assigned_application_slug: String,
90        assigned_application_name: String,
91        assigned_backchannel_application_slug: String,
92        assigned_backchannel_application_name: String,
93        verbose_name: String,
94        verbose_name_plural: String,
95        meta_model_name: String,
96        outpost_set: Vec<String>,
97    ) -> RadiusProvider {
98        RadiusProvider {
99            pk,
100            name,
101            authentication_flow: None,
102            authorization_flow,
103            invalidation_flow,
104            property_mappings: None,
105            component,
106            assigned_application_slug,
107            assigned_application_name,
108            assigned_backchannel_application_slug,
109            assigned_backchannel_application_name,
110            verbose_name,
111            verbose_name_plural,
112            meta_model_name,
113            client_networks: None,
114            shared_secret: None,
115            outpost_set,
116            mfa_support: None,
117            certificate: None,
118        }
119    }
120}