Skip to main content

clientapi_pbs/models/
config_access_create_ad_request.rs

1/*
2 * Proxmox Backup Server API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ConfigAccessCreateAdRequest {
16
17    /// LDAP Domain
18    #[serde(rename = "base-dn", skip_serializing_if = "Option::is_none")]
19    pub base_dn: Option<String>,
20
21    /// LDAP Domain
22    #[serde(rename = "bind-dn", skip_serializing_if = "Option::is_none")]
23    pub bind_dn: Option<String>,
24
25    /// 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.
26    #[serde(rename = "capath", skip_serializing_if = "Option::is_none")]
27    pub capath: Option<String>,
28
29    /// Comment.
30    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
31    pub comment: Option<String>,
32
33    /// True if you want this to be the default realm selected on login.
34    #[serde(rename = "default", skip_serializing_if = "Option::is_none")]
35    pub default: Option<bool>,
36
37    /// Custom LDAP search filter for user sync
38    #[serde(rename = "filter", skip_serializing_if = "Option::is_none")]
39    pub filter: Option<String>,
40
41    /// LDAP connection type
42    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
43    pub mode: Option<models::PbsModeEnum>,
44
45    /// AD bind password
46    #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
47    pub password: Option<String>,
48
49    /// AD server Port
50    #[serde(rename = "port", skip_serializing_if = "Option::is_none")]
51    pub port: Option<i32>,
52
53    /// Realm name.
54    #[serde(rename = "realm")]
55    pub realm: String,
56
57    /// AD server address
58    #[serde(rename = "server1")]
59    pub server1: String,
60
61    /// Fallback AD server address
62    #[serde(rename = "server2", skip_serializing_if = "Option::is_none")]
63    pub server2: Option<String>,
64
65    /// 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``.
66    #[serde(rename = "sync-attributes", skip_serializing_if = "Option::is_none")]
67    pub sync_attributes: Option<Box<models::PbsSyncAttributesField>>,
68
69    /// sync defaults options
70    #[serde(rename = "sync-defaults-options", skip_serializing_if = "Option::is_none")]
71    pub sync_defaults_options: Option<Box<models::PbsSyncDefaultsOptionsField>>,
72
73    /// 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``.
74    #[serde(rename = "user-classes", skip_serializing_if = "Option::is_none")]
75    pub user_classes: Option<Box<models::PbsUserClassesField>>,
76
77    /// Verify server certificate
78    #[serde(rename = "verify", skip_serializing_if = "Option::is_none")]
79    pub verify: Option<bool>,
80
81
82}
83
84impl ConfigAccessCreateAdRequest {
85    pub fn new(realm: String, server1: String) -> ConfigAccessCreateAdRequest {
86        ConfigAccessCreateAdRequest {
87            
88            base_dn: None,
89            
90            bind_dn: None,
91            
92            capath: None,
93            
94            comment: None,
95            
96            default: None,
97            
98            filter: None,
99            
100            mode: None,
101            
102            password: None,
103            
104            port: None,
105            
106            realm,
107            
108            server1,
109            
110            server2: None,
111            
112            sync_attributes: None,
113            
114            sync_defaults_options: None,
115            
116            user_classes: None,
117            
118            verify: None,
119            
120        }
121    }
122}
123
124