authentik_rust/models/
radius_provider.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/// RadiusProvider : RadiusProvider Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct RadiusProvider {
16    #[serde(rename = "pk")]
17    pub pk: i32,
18    #[serde(rename = "name")]
19    pub name: String,
20    /// Flow used for authentication when the associated application is accessed by an un-authenticated user.
21    #[serde(rename = "authentication_flow", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22    pub authentication_flow: Option<Option<uuid::Uuid>>,
23    /// Flow used when authorizing this provider.
24    #[serde(rename = "authorization_flow")]
25    pub authorization_flow: uuid::Uuid,
26    #[serde(rename = "property_mappings", skip_serializing_if = "Option::is_none")]
27    pub property_mappings: Option<Vec<uuid::Uuid>>,
28    /// Get object component so that we know how to edit the object
29    #[serde(rename = "component")]
30    pub component: String,
31    /// Internal application name, used in URLs.
32    #[serde(rename = "assigned_application_slug")]
33    pub assigned_application_slug: String,
34    /// Application's display Name.
35    #[serde(rename = "assigned_application_name")]
36    pub assigned_application_name: String,
37    /// Internal application name, used in URLs.
38    #[serde(rename = "assigned_backchannel_application_slug")]
39    pub assigned_backchannel_application_slug: String,
40    /// Application's display Name.
41    #[serde(rename = "assigned_backchannel_application_name")]
42    pub assigned_backchannel_application_name: String,
43    /// Return object's verbose_name
44    #[serde(rename = "verbose_name")]
45    pub verbose_name: String,
46    /// Return object's plural verbose_name
47    #[serde(rename = "verbose_name_plural")]
48    pub verbose_name_plural: String,
49    /// Return internal model name
50    #[serde(rename = "meta_model_name")]
51    pub meta_model_name: String,
52    /// 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.
53    #[serde(rename = "client_networks", skip_serializing_if = "Option::is_none")]
54    pub client_networks: Option<String>,
55    /// Shared secret between clients and server to hash packets.
56    #[serde(rename = "shared_secret", skip_serializing_if = "Option::is_none")]
57    pub shared_secret: Option<String>,
58    #[serde(rename = "outpost_set")]
59    pub outpost_set: Vec<String>,
60    /// 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.
61    #[serde(rename = "mfa_support", skip_serializing_if = "Option::is_none")]
62    pub mfa_support: Option<bool>,
63}
64
65impl RadiusProvider {
66    /// RadiusProvider Serializer
67    pub fn new(pk: i32, name: String, authorization_flow: uuid::Uuid, component: String, assigned_application_slug: String, assigned_application_name: String, assigned_backchannel_application_slug: String, assigned_backchannel_application_name: String, verbose_name: String, verbose_name_plural: String, meta_model_name: String, outpost_set: Vec<String>) -> RadiusProvider {
68        RadiusProvider {
69            pk,
70            name,
71            authentication_flow: None,
72            authorization_flow,
73            property_mappings: None,
74            component,
75            assigned_application_slug,
76            assigned_application_name,
77            assigned_backchannel_application_slug,
78            assigned_backchannel_application_name,
79            verbose_name,
80            verbose_name_plural,
81            meta_model_name,
82            client_networks: None,
83            shared_secret: None,
84            outpost_set,
85            mfa_support: None,
86        }
87    }
88}
89