Skip to main content

akeyless_api/models/
update_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 UpdateRole {
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    /// Protection from accidental deletion of this object [true/false]
23    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
24    pub delete_protection: Option<String>,
25    /// Description of the object
26    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
27    pub description: Option<String>,
28    /// Allow this role to view Event Center. Currently only 'none', 'scoped' and 'all' values are supported
29    #[serde(rename = "event-center-access", skip_serializing_if = "Option::is_none")]
30    pub event_center_access: Option<String>,
31    /// Allow this role to manage Event Forwarders. Currently only 'none' and 'all' values are supported.
32    #[serde(rename = "event-forwarder-access", skip_serializing_if = "Option::is_none")]
33    pub event_forwarder_access: Option<String>,
34    /// 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.
35    #[serde(rename = "gw-analytics-access", skip_serializing_if = "Option::is_none")]
36    pub gw_analytics_access: Option<String>,
37    /// Set output format to JSON
38    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
39    pub json: Option<bool>,
40    /// Role name
41    #[serde(rename = "name")]
42    pub name: String,
43    /// Deprecated - use description
44    #[serde(rename = "new-comment", skip_serializing_if = "Option::is_none")]
45    pub new_comment: Option<String>,
46    /// New Role name
47    #[serde(rename = "new-name", skip_serializing_if = "Option::is_none")]
48    pub new_name: Option<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 UpdateRole {
67    pub fn new(name: String) -> UpdateRole {
68        UpdateRole {
69            analytics_access: None,
70            audit_access: None,
71            delete_protection: None,
72            description: None,
73            event_center_access: None,
74            event_forwarder_access: None,
75            gw_analytics_access: None,
76            json: None,
77            name,
78            new_comment: None,
79            new_name: None,
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