Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions src/models/user_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.1.0
*
*
* Generated by: https://openapi-generator.tech
*/




use std::collections::HashMap;

use serde_json::Value;
Expand Down Expand Up @@ -51,10 +48,28 @@ pub struct UserMetadata {
pub metadata: Option<HashMap<String, Value>>,
#[serde(rename = "properties", skip_serializing_if = "Option::is_none")]
pub properties: Option<HashMap<String, Value>>,
/// `role_in_org` is only returned when using `fetch_users_in_org`
/// and is their role for the org specified in the query.
#[serde(rename = "role_in_org", default)]
pub role_in_org: Option<String>,
/// `additional_roles_in_org` is only returned when using `fetch_users_in_org`
/// and is their additional roles for the org specified in the query.
#[serde(rename = "additional_roles_in_org", default)]
pub additional_roles_in_org: Option<Vec<String>>,
}

impl UserMetadata {
pub fn new(user_id: String, email: String, email_confirmed: bool, has_password: bool, locked: bool, enabled: bool, mfa_enabled: bool, created_at: i64, last_active_at: i64) -> UserMetadata {
pub fn new(
user_id: String,
email: String,
email_confirmed: bool,
has_password: bool,
locked: bool,
enabled: bool,
mfa_enabled: bool,
created_at: i64,
last_active_at: i64,
) -> UserMetadata {
UserMetadata {
user_id,
email,
Expand All @@ -73,8 +88,8 @@ impl UserMetadata {
legacy_user_id: None,
metadata: None,
properties: None,
role_in_org: None,
additional_roles_in_org: None,
}
}
}