Skip to main content

akeyless_api/models/
assoc_role_auth_method.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/// AssocRoleAuthMethod : assocRoleAuthMethod is a command that creates an association between role and auth method.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AssocRoleAuthMethod {
17    /// The auth method to associate
18    #[serde(rename = "am-name")]
19    pub am_name: String,
20    /// Treat sub claims as case-sensitive [true/false]
21    #[serde(rename = "case-sensitive", skip_serializing_if = "Option::is_none")]
22    pub case_sensitive: Option<String>,
23    /// Set output format to JSON
24    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
25    pub json: Option<bool>,
26    /// The role to associate
27    #[serde(rename = "role-name")]
28    pub role_name: String,
29    /// key/val of sub claims, e.g group=admins,developers
30    #[serde(rename = "sub-claims", skip_serializing_if = "Option::is_none")]
31    pub sub_claims: Option<std::collections::HashMap<String, String>>,
32    /// Authentication token (see `/auth` and `/configure`)
33    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
34    pub token: Option<String>,
35    /// The universal identity token, Required only for universal_identity authentication
36    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
37    pub uid_token: Option<String>,
38}
39
40impl AssocRoleAuthMethod {
41    /// assocRoleAuthMethod is a command that creates an association between role and auth method.
42    pub fn new(am_name: String, role_name: String) -> AssocRoleAuthMethod {
43        AssocRoleAuthMethod {
44            am_name,
45            case_sensitive: None,
46            json: None,
47            role_name,
48            sub_claims: None,
49            token: None,
50            uid_token: None,
51        }
52    }
53}
54