/*
 * Artifact Keeper API
 *
 * Enterprise artifact registry supporting 45+ package formats.  ## Authentication  The JSON management API under `/api/v1/_*` accepts **API tokens only as `Authorization: Bearer <token>`**. This is the canonical scheme for programmatic access; JWTs issued by the login flow also use `Bearer`. HTTP Basic credentials on `/api/v1/_*` are validated *only* as a real `username:password` login — the password half is **not** retried as an API token. A request to `/api/v1/_*` that sends an API token in the password field of Basic auth therefore returns `401 AUTH_ERROR`; switch to `Authorization: Bearer <token>`.  Format (package-manager) endpoints such as `/v2/_*` (OCI), `/incus/_*`, `/debian/_*`, and the language registries are intentionally more permissive for client compatibility: in addition to Bearer, they accept HTTP **Basic** auth with the API token supplied in the *password* field (any username), matching the `pip` netrc / Artifactory-style `token:<api_token>` convention used by package managers that cannot send a Bearer header. This Basic-with-token fallback applies to format endpoints only, never to `/api/v1/_*`.
 *
 * The version of the OpenAPI document: 1.4.1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateLdapConfigRequest {
    #[serde(rename = "admin_group_dn", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub admin_group_dn: Option<Option<String>>,
    #[serde(rename = "bind_dn", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub bind_dn: Option<Option<String>>,
    #[serde(rename = "bind_password", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub bind_password: Option<Option<String>>,
    #[serde(rename = "display_name_attribute", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub display_name_attribute: Option<Option<String>>,
    #[serde(rename = "email_attribute", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub email_attribute: Option<Option<String>>,
    #[serde(rename = "group_base_dn", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub group_base_dn: Option<Option<String>>,
    #[serde(rename = "group_filter", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub group_filter: Option<Option<String>>,
    #[serde(rename = "groups_attribute", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub groups_attribute: Option<Option<String>>,
    #[serde(rename = "is_enabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub is_enabled: Option<Option<bool>>,
    #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub name: Option<Option<String>>,
    #[serde(rename = "priority", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub priority: Option<Option<i32>>,
    #[serde(rename = "server_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub server_url: Option<Option<String>>,
    #[serde(rename = "use_starttls", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub use_starttls: Option<Option<bool>>,
    #[serde(rename = "user_base_dn", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub user_base_dn: Option<Option<String>>,
    #[serde(rename = "user_filter", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub user_filter: Option<Option<String>>,
    #[serde(rename = "username_attribute", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub username_attribute: Option<Option<String>>,
}

impl UpdateLdapConfigRequest {
    pub fn new() -> UpdateLdapConfigRequest {
        UpdateLdapConfigRequest {
            admin_group_dn: None,
            bind_dn: None,
            bind_password: None,
            display_name_attribute: None,
            email_attribute: None,
            group_base_dn: None,
            group_filter: None,
            groups_attribute: None,
            is_enabled: None,
            name: None,
            priority: None,
            server_url: None,
            use_starttls: None,
            user_base_dn: None,
            user_filter: None,
            username_attribute: None,
        }
    }
}

