Skip to main content

akeyless_api/models/
auth_method_update_ldap.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/// AuthMethodUpdateLdap : authMethodUpdateLdap is a command that updates a new auth method that will be able to authenticate using LDAP.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AuthMethodUpdateLdap {
17    /// Access expiration date in Unix timestamp (select 0 for access without expiry date)
18    #[serde(rename = "access-expires", skip_serializing_if = "Option::is_none")]
19    pub access_expires: Option<i64>,
20    /// limit the auth method usage for specific client types [cli,ui,gateway-admin,sdk,mobile,extension]
21    #[serde(rename = "allowed-client-type", skip_serializing_if = "Option::is_none")]
22    pub allowed_client_type: Option<Vec<String>>,
23    /// Subclaims to include in audit logs, e.g \"--audit-logs-claims email --audit-logs-claims username\"
24    #[serde(rename = "audit-logs-claims", skip_serializing_if = "Option::is_none")]
25    pub audit_logs_claims: Option<Vec<String>>,
26    /// A CIDR whitelist with the IPs that the access is restricted to
27    #[serde(rename = "bound-ips", skip_serializing_if = "Option::is_none")]
28    pub bound_ips: Option<Vec<String>>,
29    /// Protection from accidental deletion of this object [true/false]
30    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
31    pub delete_protection: Option<String>,
32    /// Auth Method description
33    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
34    pub description: Option<String>,
35    /// How many days before the expiration of the auth method would you like to be notified.
36    #[serde(rename = "expiration-event-in", skip_serializing_if = "Option::is_none")]
37    pub expiration_event_in: Option<Vec<String>>,
38    /// if true: enforce role-association must include sub claims
39    #[serde(rename = "force-sub-claims", skip_serializing_if = "Option::is_none")]
40    pub force_sub_claims: Option<bool>,
41    /// Automatically generate key-pair for LDAP configuration. If set to false, a public key needs to be provided [true/false]
42    #[serde(rename = "gen-key", skip_serializing_if = "Option::is_none")]
43    pub gen_key: Option<String>,
44    /// A CIDR whitelist with the GW IPs that the access is restricted to
45    #[serde(rename = "gw-bound-ips", skip_serializing_if = "Option::is_none")]
46    pub gw_bound_ips: Option<Vec<String>>,
47    /// Set output format to JSON
48    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
49    pub json: Option<bool>,
50    /// Jwt TTL
51    #[serde(rename = "jwt-ttl", skip_serializing_if = "Option::is_none")]
52    pub jwt_ttl: Option<i64>,
53    /// Auth Method name
54    #[serde(rename = "name")]
55    pub name: String,
56    /// Auth Method new name
57    #[serde(rename = "new-name", skip_serializing_if = "Option::is_none")]
58    pub new_name: Option<String>,
59    /// Choose the relevant product type for the auth method [sm, sra, pm, dp, ca]
60    #[serde(rename = "product-type", skip_serializing_if = "Option::is_none")]
61    pub product_type: Option<Vec<String>>,
62    /// A public key generated for LDAP authentication method on Akeyless in base64 or PEM format [RSA2048]
63    #[serde(rename = "public-key-data", skip_serializing_if = "Option::is_none")]
64    pub public_key_data: Option<String>,
65    /// Authentication token (see `/auth` and `/configure`)
66    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
67    pub token: Option<String>,
68    /// The universal identity token, Required only for universal_identity authentication
69    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
70    pub uid_token: Option<String>,
71    /// A unique identifier (ID) value should be configured for OAuth2, LDAP and SAML authentication method types and is usually a value such as the email, username, or upn for example. Whenever a user logs in with a token, these authentication types issue a \"sub claim\" that contains details uniquely identifying that user. This sub claim includes a key containing the ID value that you configured, and is used to distinguish between different users from within the same organization.
72    #[serde(rename = "unique-identifier", skip_serializing_if = "Option::is_none")]
73    pub unique_identifier: Option<String>,
74}
75
76impl AuthMethodUpdateLdap {
77    /// authMethodUpdateLdap is a command that updates a new auth method that will be able to authenticate using LDAP.
78    pub fn new(name: String) -> AuthMethodUpdateLdap {
79        AuthMethodUpdateLdap {
80            access_expires: None,
81            allowed_client_type: None,
82            audit_logs_claims: None,
83            bound_ips: None,
84            delete_protection: None,
85            description: None,
86            expiration_event_in: None,
87            force_sub_claims: None,
88            gen_key: None,
89            gw_bound_ips: None,
90            json: None,
91            jwt_ttl: None,
92            name,
93            new_name: None,
94            product_type: None,
95            public_key_data: None,
96            token: None,
97            uid_token: None,
98            unique_identifier: None,
99        }
100    }
101}
102