authentik-client 3.2024122.1

Making authentication simple.
Documentation
/*
 * authentik
 *
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2024.12.2
 * Contact: hello@goauthentik.io
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// PatchedKerberosSourceRequest : Kerberos Source Serializer
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PatchedKerberosSourceRequest {
    /// Source's display Name.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Internal source name, used in URLs.
    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
    pub slug: Option<String>,
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    /// Flow to use when authenticating existing users.
    #[serde(
        rename = "authentication_flow",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub authentication_flow: Option<Option<uuid::Uuid>>,
    /// Flow to use when enrolling new users.
    #[serde(
        rename = "enrollment_flow",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub enrollment_flow: Option<Option<uuid::Uuid>>,
    #[serde(rename = "user_property_mappings", skip_serializing_if = "Option::is_none")]
    pub user_property_mappings: Option<Vec<uuid::Uuid>>,
    #[serde(rename = "group_property_mappings", skip_serializing_if = "Option::is_none")]
    pub group_property_mappings: Option<Vec<uuid::Uuid>>,
    #[serde(rename = "policy_engine_mode", skip_serializing_if = "Option::is_none")]
    pub policy_engine_mode: Option<models::PolicyEngineMode>,
    /// How the source determines if an existing user should be authenticated or a new user enrolled.
    #[serde(rename = "user_matching_mode", skip_serializing_if = "Option::is_none")]
    pub user_matching_mode: Option<models::UserMatchingModeEnum>,
    #[serde(rename = "user_path_template", skip_serializing_if = "Option::is_none")]
    pub user_path_template: Option<String>,
    /// How the source determines if an existing group should be used or a new group created.
    #[serde(rename = "group_matching_mode", skip_serializing_if = "Option::is_none")]
    pub group_matching_mode: Option<models::GroupMatchingModeEnum>,
    /// Kerberos realm
    #[serde(rename = "realm", skip_serializing_if = "Option::is_none")]
    pub realm: Option<String>,
    /// Custom krb5.conf to use. Uses the system one by default
    #[serde(rename = "krb5_conf", skip_serializing_if = "Option::is_none")]
    pub krb5_conf: Option<String>,
    /// KAdmin server type
    #[serde(rename = "kadmin_type", skip_serializing_if = "Option::is_none")]
    pub kadmin_type: Option<models::KadminTypeEnum>,
    /// Sync users from Kerberos into authentik
    #[serde(rename = "sync_users", skip_serializing_if = "Option::is_none")]
    pub sync_users: Option<bool>,
    /// When a user changes their password, sync it back to Kerberos
    #[serde(rename = "sync_users_password", skip_serializing_if = "Option::is_none")]
    pub sync_users_password: Option<bool>,
    /// Principal to authenticate to kadmin for sync.
    #[serde(rename = "sync_principal", skip_serializing_if = "Option::is_none")]
    pub sync_principal: Option<String>,
    /// Password to authenticate to kadmin for sync
    #[serde(rename = "sync_password", skip_serializing_if = "Option::is_none")]
    pub sync_password: Option<String>,
    /// Keytab to authenticate to kadmin for sync. Must be base64-encoded or in the form TYPE:residual
    #[serde(rename = "sync_keytab", skip_serializing_if = "Option::is_none")]
    pub sync_keytab: Option<String>,
    /// Credentials cache to authenticate to kadmin for sync. Must be in the form TYPE:residual
    #[serde(rename = "sync_ccache", skip_serializing_if = "Option::is_none")]
    pub sync_ccache: Option<String>,
    /// Force the use of a specific server name for SPNEGO. Must be in the form HTTP@hostname
    #[serde(rename = "spnego_server_name", skip_serializing_if = "Option::is_none")]
    pub spnego_server_name: Option<String>,
    /// SPNEGO keytab base64-encoded or path to keytab in the form FILE:path
    #[serde(rename = "spnego_keytab", skip_serializing_if = "Option::is_none")]
    pub spnego_keytab: Option<String>,
    /// Credential cache to use for SPNEGO in form type:residual
    #[serde(rename = "spnego_ccache", skip_serializing_if = "Option::is_none")]
    pub spnego_ccache: Option<String>,
    /// If enabled, the authentik-stored password will be updated upon login with the Kerberos password backend
    #[serde(
        rename = "password_login_update_internal_password",
        skip_serializing_if = "Option::is_none"
    )]
    pub password_login_update_internal_password: Option<bool>,
}

impl PatchedKerberosSourceRequest {
    /// Kerberos Source Serializer
    pub fn new() -> PatchedKerberosSourceRequest {
        PatchedKerberosSourceRequest {
            name: None,
            slug: None,
            enabled: None,
            authentication_flow: None,
            enrollment_flow: None,
            user_property_mappings: None,
            group_property_mappings: None,
            policy_engine_mode: None,
            user_matching_mode: None,
            user_path_template: None,
            group_matching_mode: None,
            realm: None,
            krb5_conf: None,
            kadmin_type: None,
            sync_users: None,
            sync_users_password: None,
            sync_principal: None,
            sync_password: None,
            sync_keytab: None,
            sync_ccache: None,
            spnego_server_name: None,
            spnego_keytab: None,
            spnego_ccache: None,
            password_login_update_internal_password: None,
        }
    }
}