1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*
* 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 ConfigAccessGetAdResponseDataInner {
/// 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 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 ConfigAccessGetAdResponseDataInner {
pub fn new(realm: String, server1: String) -> ConfigAccessGetAdResponseDataInner {
ConfigAccessGetAdResponseDataInner {
base_dn: None,
bind_dn: None,
capath: None,
comment: None,
default: None,
filter: None,
mode: None,
port: None,
realm,
server1,
server2: None,
sync_attributes: None,
sync_defaults_options: None,
user_classes: None,
verify: None,
}
}
}