Skip to main content

akeyless_api/models/
create_role.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 CreateRole {
16    /// Allow this role to view analytics. Currently only 'none', 'own', 'all' values are supported, allowing associated auth methods to view reports produced by the same auth methods.
17    #[serde(rename = "analytics-access", skip_serializing_if = "Option::is_none")]
18    pub analytics_access: Option<String>,
19    /// Allow this role to view audit logs. Currently only 'none', 'own', 'scoped' and 'all' values are supported, allowing associated auth methods to view audit logs produced by the same auth methods.
20    #[serde(rename = "audit-access", skip_serializing_if = "Option::is_none")]
21    pub audit_access: Option<String>,
22    /// Deprecated - use description
23    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
24    pub comment: Option<String>,
25    /// Protection from accidental deletion of this object [true/false]
26    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
27    pub delete_protection: Option<String>,
28    /// Description of the object
29    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
30    pub description: Option<String>,
31    /// Allow this role to view Event Center. Currently only 'none', 'scoped' and 'all' values are supported
32    #[serde(rename = "event-center-access", skip_serializing_if = "Option::is_none")]
33    pub event_center_access: Option<String>,
34    /// Allow this role to manage Event Forwarders. Currently only 'none' and 'all' values are supported.
35    #[serde(rename = "event-forwarders-access", skip_serializing_if = "Option::is_none")]
36    pub event_forwarders_access: Option<String>,
37    /// Allow this role to manage the following Event Forwarders.
38    #[serde(rename = "event-forwarders-name", skip_serializing_if = "Option::is_none")]
39    pub event_forwarders_name: Option<Vec<String>>,
40    /// Allow this role to view gw analytics. Currently only 'none', 'scoped', 'all' values are supported, allowing associated auth methods to view reports produced by the same auth methods.
41    #[serde(rename = "gw-analytics-access", skip_serializing_if = "Option::is_none")]
42    pub gw_analytics_access: Option<String>,
43    /// Set output format to JSON
44    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
45    pub json: Option<bool>,
46    /// Role name
47    #[serde(rename = "name")]
48    pub name: String,
49    /// Allow this role to view Reverse RBAC. Supported values: 'scoped', 'all'.
50    #[serde(rename = "reverse-rbac-access", skip_serializing_if = "Option::is_none")]
51    pub reverse_rbac_access: Option<String>,
52    /// Allow this role to view SRA Clusters. Currently only 'none', 'scoped', 'all' values are supported.
53    #[serde(rename = "sra-reports-access", skip_serializing_if = "Option::is_none")]
54    pub sra_reports_access: Option<String>,
55    /// Authentication token (see `/auth` and `/configure`)
56    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
57    pub token: Option<String>,
58    /// The universal identity token, Required only for universal_identity authentication
59    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
60    pub uid_token: Option<String>,
61    /// Allow this role to view Usage Report. Currently only 'none' and 'all' values are supported.
62    #[serde(rename = "usage-reports-access", skip_serializing_if = "Option::is_none")]
63    pub usage_reports_access: Option<String>,
64}
65
66impl CreateRole {
67    pub fn new(name: String) -> CreateRole {
68        CreateRole {
69            analytics_access: None,
70            audit_access: None,
71            comment: None,
72            delete_protection: None,
73            description: None,
74            event_center_access: None,
75            event_forwarders_access: None,
76            event_forwarders_name: None,
77            gw_analytics_access: None,
78            json: None,
79            name,
80            reverse_rbac_access: None,
81            sra_reports_access: None,
82            token: None,
83            uid_token: None,
84            usage_reports_access: None,
85        }
86    }
87}
88