authentik_rust/models/
patched_ldap_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/// PatchedLdapProviderRequest : LDAPProvider Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PatchedLdapProviderRequest {
16    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
17    pub name: Option<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", skip_serializing_if = "Option::is_none")]
23    pub authorization_flow: Option<uuid::Uuid>,
24    #[serde(rename = "property_mappings", skip_serializing_if = "Option::is_none")]
25    pub property_mappings: Option<Vec<uuid::Uuid>>,
26    /// DN under which objects are accessible.
27    #[serde(rename = "base_dn", skip_serializing_if = "Option::is_none")]
28    pub base_dn: Option<String>,
29    /// Users in this group can do search queries. If not set, every user can execute search queries.
30    #[serde(rename = "search_group", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
31    pub search_group: Option<Option<uuid::Uuid>>,
32    #[serde(rename = "certificate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
33    pub certificate: Option<Option<uuid::Uuid>>,
34    #[serde(rename = "tls_server_name", skip_serializing_if = "Option::is_none")]
35    pub tls_server_name: Option<String>,
36    /// The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber
37    #[serde(rename = "uid_start_number", skip_serializing_if = "Option::is_none")]
38    pub uid_start_number: Option<i32>,
39    /// The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber
40    #[serde(rename = "gid_start_number", skip_serializing_if = "Option::is_none")]
41    pub gid_start_number: Option<i32>,
42    #[serde(rename = "search_mode", skip_serializing_if = "Option::is_none")]
43    pub search_mode: Option<models::LdapapiAccessMode>,
44    #[serde(rename = "bind_mode", skip_serializing_if = "Option::is_none")]
45    pub bind_mode: Option<models::LdapapiAccessMode>,
46    /// 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.
47    #[serde(rename = "mfa_support", skip_serializing_if = "Option::is_none")]
48    pub mfa_support: Option<bool>,
49}
50
51impl PatchedLdapProviderRequest {
52    /// LDAPProvider Serializer
53    pub fn new() -> PatchedLdapProviderRequest {
54        PatchedLdapProviderRequest {
55            name: None,
56            authentication_flow: None,
57            authorization_flow: None,
58            property_mappings: None,
59            base_dn: None,
60            search_group: None,
61            certificate: None,
62            tls_server_name: None,
63            uid_start_number: None,
64            gid_start_number: None,
65            search_mode: None,
66            bind_mode: None,
67            mfa_support: None,
68        }
69    }
70}
71