dtz-identity 2.1.6

a generated client for the DTZ Identity API
Documentation
/*
 * DTZ Identity
 *
 * a generated client for the DTZ Identity API
 *
 * Contact: jens@apimeister.com
 * Generated by: https://openapi-generator.tech
 */

#[allow(unused_imports)]
use crate::models;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContextRole {
    #[serde(rename = "roleId")]
    pub role_id: dtz_identifier::RoleId,
    #[serde(rename = "abstractRoleId", skip_serializing_if = "Option::is_none")]
    pub abstract_role_id: Option<dtz_identifier::RoleId>,
    #[serde(rename = "roleAlias")]
    pub role_alias: String,
    #[serde(rename = "roleScope")]
    pub role_scope: String,
    #[serde(rename = "assignedToUser", skip_serializing_if = "Option::is_none")]
    pub assigned_to_user: Option<bool>,
}

impl ContextRole {
    pub fn new(role_id: dtz_identifier::RoleId, role_alias: String, role_scope: String) -> ContextRole {
        ContextRole {
            role_id,
            abstract_role_id: None,
            role_alias,
            role_scope,
            assigned_to_user: None,
        }
    }
}