Skip to main content

akeyless_api/models/
set_role_rule.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 SetRoleRule {
16    /// List of the approved/denied capabilities in the path options: [read, create, update, delete, list, deny]
17    #[serde(rename = "capability")]
18    pub capability: Vec<String>,
19    /// Set output format to JSON
20    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
21    pub json: Option<bool>,
22    /// The path the rule refers to
23    #[serde(rename = "path")]
24    pub path: String,
25    /// The role name to be updated
26    #[serde(rename = "role-name")]
27    pub role_name: String,
28    /// item-rule, target-rule, role-rule, auth-method-rule, search-rule, reports-rule, gw-reports-rule or sra-reports-rule, sra-rule
29    #[serde(rename = "rule-type", skip_serializing_if = "Option::is_none")]
30    pub rule_type: Option<String>,
31    /// Authentication token (see `/auth` and `/configure`)
32    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
33    pub token: Option<String>,
34    /// RoleRule ttl
35    #[serde(rename = "ttl", skip_serializing_if = "Option::is_none")]
36    pub ttl: Option<i32>,
37    /// The universal identity token, Required only for universal_identity authentication
38    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
39    pub uid_token: Option<String>,
40}
41
42impl SetRoleRule {
43    pub fn new(capability: Vec<String>, path: String, role_name: String) -> SetRoleRule {
44        SetRoleRule {
45            capability,
46            json: None,
47            path,
48            role_name,
49            rule_type: None,
50            token: None,
51            ttl: None,
52            uid_token: None,
53        }
54    }
55}
56