Skip to main content

harbor_api/models/
ldap_conf.rs

1/*
2 * Harbor API
3 *
4 * These APIs provide services for manipulating Harbor project.
5 *
6 * The version of the OpenAPI document: 2.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// LdapConf : The ldap configure properties
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct LdapConf {
17    /// The url of ldap service.
18    #[serde(rename = "ldap_url", skip_serializing_if = "Option::is_none")]
19    pub ldap_url: Option<String>,
20    /// The search dn of ldap service.
21    #[serde(rename = "ldap_search_dn", skip_serializing_if = "Option::is_none")]
22    pub ldap_search_dn: Option<String>,
23    /// The search password of ldap service.
24    #[serde(rename = "ldap_search_password", skip_serializing_if = "Option::is_none")]
25    pub ldap_search_password: Option<String>,
26    /// The base dn of ldap service.
27    #[serde(rename = "ldap_base_dn", skip_serializing_if = "Option::is_none")]
28    pub ldap_base_dn: Option<String>,
29    /// The serach filter of ldap service.
30    #[serde(rename = "ldap_filter", skip_serializing_if = "Option::is_none")]
31    pub ldap_filter: Option<String>,
32    /// The serach uid from ldap service attributes.
33    #[serde(rename = "ldap_uid", skip_serializing_if = "Option::is_none")]
34    pub ldap_uid: Option<String>,
35    /// The serach scope of ldap service.
36    #[serde(rename = "ldap_scope", skip_serializing_if = "Option::is_none")]
37    pub ldap_scope: Option<i64>,
38    /// The connect timeout of ldap service(second).
39    #[serde(rename = "ldap_connection_timeout", skip_serializing_if = "Option::is_none")]
40    pub ldap_connection_timeout: Option<i64>,
41    /// Verify Ldap server certificate.
42    #[serde(rename = "ldap_verify_cert", skip_serializing_if = "Option::is_none")]
43    pub ldap_verify_cert: Option<bool>,
44}
45
46impl LdapConf {
47    /// The ldap configure properties
48    pub fn new() -> LdapConf {
49        LdapConf {
50            ldap_url: None,
51            ldap_search_dn: None,
52            ldap_search_password: None,
53            ldap_base_dn: None,
54            ldap_filter: None,
55            ldap_uid: None,
56            ldap_scope: None,
57            ldap_connection_timeout: None,
58            ldap_verify_cert: None,
59        }
60    }
61}
62