mattermost_client/openapi/models/
role.rs

1/*
2 * Mattermost API Reference
3 *
4 * There is also a work-in-progress [Postman API reference](https://documenter.getpostman.com/view/4508214/RW8FERUn).
5 *
6 * The version of the OpenAPI document: 4.0.0
7 * Contact: feedback@mattermost.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)]
12pub struct Role {
13    /// The unique identifier of the role.
14    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
15    pub id: Option<String>,
16    /// The unique name of the role, used when assigning roles to users/groups in contexts.
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18    pub name: Option<String>,
19    /// The human readable name for the role.
20    #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")]
21    pub display_name: Option<String>,
22    /// A human readable description of the role.
23    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
24    pub description: Option<String>,
25    /// A list of the unique names of the permissions this role grants.
26    #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")]
27    pub permissions: Option<Vec<String>>,
28    /// indicates if this role is managed by a scheme (true), or is a custom stand-alone role (false).
29    #[serde(rename = "scheme_managed", skip_serializing_if = "Option::is_none")]
30    pub scheme_managed: Option<bool>,
31}
32
33impl Role {
34    pub fn new() -> Role {
35        Role {
36            id: None,
37            name: None,
38            display_name: None,
39            description: None,
40            permissions: None,
41            scheme_managed: None,
42        }
43    }
44}