Skip to main content

dtz_identity/models/
role.rs

1/*
2 * DTZ Identity
3 *
4 * a generated client for the DTZ Identity API
5 *
6 * Contact: jens@apimeister.com
7 * Generated by: https://openapi-generator.tech
8 */
9
10#[allow(unused_imports)]
11use crate::models;
12#[allow(unused_imports)]
13use serde::{Deserialize, Serialize};
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Role {
17    #[serde(rename = "roleId")]
18    pub role_id: dtz_identifier::RoleId,
19    #[serde(rename = "roleAlias")]
20    pub role_alias: String,
21    #[serde(rename = "roleScope")]
22    pub role_scope: String,
23    #[serde(rename = "contextId", skip_serializing_if = "Option::is_none")]
24    pub context_id: Option<dtz_identifier::ContextId>,
25    #[serde(rename = "assignedToUser", skip_serializing_if = "Option::is_none")]
26    pub assigned_to_user: Option<bool>,
27}
28
29impl Role {
30    pub fn new(role_id: dtz_identifier::RoleId, role_alias: String, role_scope: String) -> Role {
31        Role {
32            role_id,
33            role_alias,
34            role_scope,
35            context_id: None,
36            assigned_to_user: None,
37        }
38    }
39}
40