clientapi-pbs 2026.5.24

Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/docs/api-viewer/ for the upstream documentation.
Documentation
/*
 * Proxmox Backup Server API
 *
 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/docs/api-viewer/ for the upstream documentation.
 *
 * The version of the OpenAPI document: 9.x
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ConfigAccessCreateAdRequest {

    /// LDAP Domain
    #[serde(rename = "base-dn", skip_serializing_if = "Option::is_none")]
    pub base_dn: Option<String>,

    /// LDAP Domain
    #[serde(rename = "bind-dn", skip_serializing_if = "Option::is_none")]
    pub bind_dn: Option<String>,

    /// CA certificate to use for the server. The path can point to either a file, or a directory. If it points to a file, the PEM-formatted X.509 certificate stored at the path will be added as a trusted certificate. If the path points to a directory, the directory replaces the system's default certificate store at `/etc/ssl/certs` - Every file in the directory will be loaded as a trusted certificate.
    #[serde(rename = "capath", skip_serializing_if = "Option::is_none")]
    pub capath: Option<String>,

    /// Comment.
    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
    pub comment: Option<String>,

    /// True if you want this to be the default realm selected on login.
    #[serde(rename = "default", skip_serializing_if = "Option::is_none")]
    pub default: Option<bool>,

    /// Custom LDAP search filter for user sync
    #[serde(rename = "filter", skip_serializing_if = "Option::is_none")]
    pub filter: Option<String>,

    /// LDAP connection type
    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
    pub mode: Option<models::PbsModeEnum>,

    /// AD bind password
    #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
    pub password: Option<String>,

    /// AD server Port
    #[serde(rename = "port", skip_serializing_if = "Option::is_none")]
    pub port: Option<i32>,

    /// Realm name.
    #[serde(rename = "realm")]
    pub realm: String,

    /// AD server address
    #[serde(rename = "server1")]
    pub server1: String,

    /// Fallback AD server address
    #[serde(rename = "server2", skip_serializing_if = "Option::is_none")]
    pub server2: Option<String>,

    /// Comma-separated list of key=value pairs for specifying which LDAP attributes map to which PBS user field. For example, to map the LDAP attribute ``mail`` to PBS's ``email``, write ``email=mail``.
    #[serde(rename = "sync-attributes", skip_serializing_if = "Option::is_none")]
    pub sync_attributes: Option<Box<models::PbsSyncAttributesField>>,

    /// sync defaults options
    #[serde(rename = "sync-defaults-options", skip_serializing_if = "Option::is_none")]
    pub sync_defaults_options: Option<Box<models::PbsSyncDefaultsOptionsField>>,

    /// Comma-separated list of allowed objectClass values for user synchronization. For instance, if ``user-classes`` is set to ``person,user``, then user synchronization will consider all LDAP entities where ``objectClass: person`` `or` ``objectClass: user``.
    #[serde(rename = "user-classes", skip_serializing_if = "Option::is_none")]
    pub user_classes: Option<Box<models::PbsUserClassesField>>,

    /// Verify server certificate
    #[serde(rename = "verify", skip_serializing_if = "Option::is_none")]
    pub verify: Option<bool>,


}

impl ConfigAccessCreateAdRequest {
    pub fn new(realm: String, server1: String) -> ConfigAccessCreateAdRequest {
        ConfigAccessCreateAdRequest {
            
            base_dn: None,
            
            bind_dn: None,
            
            capath: None,
            
            comment: None,
            
            default: None,
            
            filter: None,
            
            mode: None,
            
            password: None,
            
            port: None,
            
            realm,
            
            server1,
            
            server2: None,
            
            sync_attributes: None,
            
            sync_defaults_options: None,
            
            user_classes: None,
            
            verify: None,
            
        }
    }
}