Skip to main content

akeyless_api/models/
auth_method_update_api_key.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AuthMethodUpdateApiKey {
16    /// Access expiration date in Unix timestamp (select 0 for access without expiry date)
17    #[serde(rename = "access-expires", skip_serializing_if = "Option::is_none")]
18    pub access_expires: Option<i64>,
19    /// limit the auth method usage for specific client types [cli,ui,gateway-admin,sdk,mobile,extension]
20    #[serde(rename = "allowed-client-type", skip_serializing_if = "Option::is_none")]
21    pub allowed_client_type: Option<Vec<String>>,
22    /// Subclaims to include in audit logs, e.g \"--audit-logs-claims email --audit-logs-claims username\"
23    #[serde(rename = "audit-logs-claims", skip_serializing_if = "Option::is_none")]
24    pub audit_logs_claims: Option<Vec<String>>,
25    /// A CIDR whitelist with the IPs that the access is restricted to
26    #[serde(rename = "bound-ips", skip_serializing_if = "Option::is_none")]
27    pub bound_ips: Option<Vec<String>>,
28    /// Protection from accidental deletion of this object [true/false]
29    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
30    pub delete_protection: Option<String>,
31    /// Auth Method description
32    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
33    pub description: Option<String>,
34    /// How many days before the expiration of the auth method would you like to be notified.
35    #[serde(rename = "expiration-event-in", skip_serializing_if = "Option::is_none")]
36    pub expiration_event_in: Option<Vec<String>>,
37    /// if true: enforce role-association must include sub claims
38    #[serde(rename = "force-sub-claims", skip_serializing_if = "Option::is_none")]
39    pub force_sub_claims: Option<bool>,
40    /// A CIDR whitelist with the GW IPs that the access is restricted to
41    #[serde(rename = "gw-bound-ips", skip_serializing_if = "Option::is_none")]
42    pub gw_bound_ips: Option<Vec<String>>,
43    /// Set output format to JSON
44    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
45    pub json: Option<bool>,
46    /// Jwt TTL
47    #[serde(rename = "jwt-ttl", skip_serializing_if = "Option::is_none")]
48    pub jwt_ttl: Option<i64>,
49    /// Auth Method name
50    #[serde(rename = "name")]
51    pub name: String,
52    /// Auth Method new name
53    #[serde(rename = "new-name", skip_serializing_if = "Option::is_none")]
54    pub new_name: Option<String>,
55    /// Choose the relevant product type for the auth method [sm, sra, pm, dp, ca]
56    #[serde(rename = "product-type", skip_serializing_if = "Option::is_none")]
57    pub product_type: Option<Vec<String>>,
58    /// Authentication token (see `/auth` and `/configure`)
59    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
60    pub token: Option<String>,
61    /// The universal identity token, Required only for universal_identity authentication
62    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
63    pub uid_token: Option<String>,
64}
65
66impl AuthMethodUpdateApiKey {
67    pub fn new(name: String) -> AuthMethodUpdateApiKey {
68        AuthMethodUpdateApiKey {
69            access_expires: None,
70            allowed_client_type: None,
71            audit_logs_claims: None,
72            bound_ips: None,
73            delete_protection: None,
74            description: None,
75            expiration_event_in: None,
76            force_sub_claims: None,
77            gw_bound_ips: None,
78            json: None,
79            jwt_ttl: None,
80            name,
81            new_name: None,
82            product_type: None,
83            token: None,
84            uid_token: None,
85        }
86    }
87}
88