1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Code generated by oagen. DO NOT EDIT.
#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DirectoryUserWithGroups {
/// Distinguishes the Directory User object.
pub object: String,
/// Unique identifier for the Directory User.
pub id: String,
/// The identifier of the Directory the Directory User belongs to.
pub directory_id: String,
/// The identifier for the Organization in which the Directory resides.
pub organization_id: String,
/// Unique identifier for the user, assigned by the Directory Provider. Different Directory Providers use different ID formats.
pub idp_id: String,
/// The email address of the user.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub email: Option<String>,
/// The first name of the user.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub first_name: Option<String>,
/// The last name of the user.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub last_name: Option<String>,
/// The full name of the user.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub name: Option<String>,
/// A list of email addresses for the user.
#[serde(skip_serializing_if = "Option::is_none", default)]
#[deprecated]
pub emails: Option<Vec<DirectoryUserWithGroupsEmail>>,
/// The job title of the user.
#[serde(skip_serializing_if = "Option::is_none", default)]
#[deprecated]
pub job_title: Option<String>,
/// The username of the user.
#[serde(skip_serializing_if = "Option::is_none", default)]
#[deprecated]
pub username: Option<String>,
/// The state of the user.
pub state: DirectoryUserWithGroupsState,
/// The raw attributes received from the directory provider.
#[deprecated]
pub raw_attributes: std::collections::HashMap<String, serde_json::Value>,
/// An object containing the custom attribute mapping for the Directory Provider.
pub custom_attributes: std::collections::HashMap<String, serde_json::Value>,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub role: Option<SlimRole>,
/// All roles assigned to the user.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub roles: Option<Vec<SlimRole>>,
/// An ISO 8601 timestamp.
pub created_at: String,
/// An ISO 8601 timestamp.
pub updated_at: String,
/// The directory groups the user belongs to. Deprecated: starting May 1, 2026, this field returns an empty array by default for newly created teams. Existing teams currently depending on this field should migrate to the new access pattern for better throughput performance — the field is unbounded by user, so users with many group memberships produce large, slow response payloads. Use the List Directory Groups endpoint with a `user` filter to fetch a user's group memberships.
#[deprecated]
pub groups: Vec<DirectoryGroup>,
}