From c3aff3dd3b6cfa05f4d11bfa7bb312f50154a6ab Mon Sep 17 00:00:00 2001 From: Matthew Mauer Date: Mon, 13 Jan 2025 17:57:06 -0500 Subject: [PATCH] capture role_in_org and additional_roles_in_org when using fetch_users_in_org --- src/models/user_metadata.rs | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/models/user_metadata.rs b/src/models/user_metadata.rs index bf7daac..b8eda28 100644 --- a/src/models/user_metadata.rs +++ b/src/models/user_metadata.rs @@ -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; @@ -51,10 +48,28 @@ pub struct UserMetadata { pub metadata: Option>, #[serde(rename = "properties", skip_serializing_if = "Option::is_none")] pub properties: Option>, + /// `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, + /// `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>, } 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, @@ -73,8 +88,8 @@ impl UserMetadata { legacy_user_id: None, metadata: None, properties: None, + role_in_org: None, + additional_roles_in_org: None, } } } - -