Skip to main content

akeyless_api/models/
create_ldap_target.rs

1/*
2 * Akeyless API
3 *
4 * The purpose of this application is to provide access to Akeyless API.
5 *
6 * The version of the OpenAPI document: 3.0
7 * Contact: support@akeyless.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CreateLdapTarget : createldapTarget is a command that creates a new target. [Deprecated: Use target-create-ldap command]
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateLdapTarget {
17    /// Bind DN
18    #[serde(rename = "bind-dn")]
19    pub bind_dn: String,
20    /// Bind DN Password
21    #[serde(rename = "bind-dn-password")]
22    pub bind_dn_password: String,
23    /// Deprecated - use description
24    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
25    pub comment: Option<String>,
26    /// Description of the object
27    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
28    pub description: Option<String>,
29    /// Set output format to JSON
30    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
31    pub json: Option<bool>,
32    /// The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
33    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
34    pub key: Option<String>,
35    /// CA Certificate File Content
36    #[serde(rename = "ldap-ca-cert", skip_serializing_if = "Option::is_none")]
37    pub ldap_ca_cert: Option<String>,
38    /// LDAP Server URL
39    #[serde(rename = "ldap-url")]
40    pub ldap_url: String,
41    /// Set the maximum number of versions, limited by the account settings defaults.
42    #[serde(rename = "max-versions", skip_serializing_if = "Option::is_none")]
43    pub max_versions: Option<String>,
44    /// Target name
45    #[serde(rename = "name")]
46    pub name: String,
47    /// Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
48    #[serde(rename = "server-type", skip_serializing_if = "Option::is_none")]
49    pub server_type: Option<String>,
50    /// Authentication token (see `/auth` and `/configure`)
51    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
52    pub token: Option<String>,
53    /// Token expiration
54    #[serde(rename = "token-expiration", skip_serializing_if = "Option::is_none")]
55    pub token_expiration: Option<String>,
56    /// The universal identity token, Required only for universal_identity authentication
57    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
58    pub uid_token: Option<String>,
59}
60
61impl CreateLdapTarget {
62    /// createldapTarget is a command that creates a new target. [Deprecated: Use target-create-ldap command]
63    pub fn new(bind_dn: String, bind_dn_password: String, ldap_url: String, name: String) -> CreateLdapTarget {
64        CreateLdapTarget {
65            bind_dn,
66            bind_dn_password,
67            comment: None,
68            description: None,
69            json: None,
70            key: None,
71            ldap_ca_cert: None,
72            ldap_url,
73            max_versions: None,
74            name,
75            server_type: None,
76            token: None,
77            token_expiration: None,
78            uid_token: None,
79        }
80    }
81}
82