Skip to main content

io_msgraph/v1/rest/
users.rs

1//! Microsoft Graph user resource (`users`, or the `me` shortcut),
2//! including its mail folders, messages, the sendMail action, contact
3//! folders, contacts, calendars and events.
4//!
5//! <https://learn.microsoft.com/en-us/graph/api/resources/user>
6
7use alloc::string::String;
8
9use serde::{Deserialize, Serialize};
10
11pub mod calendars;
12pub mod contact_folders;
13pub mod contacts;
14pub mod events;
15pub mod get;
16pub mod mail_folders;
17pub mod messages;
18pub mod send_mail;
19
20/// A Microsoft Graph user (the signed-in mailbox owner via `me`).
21#[derive(Debug, Clone, Default, Deserialize, Serialize, Eq, PartialEq)]
22#[serde(rename_all = "camelCase")]
23pub struct MsgraphUser {
24    /// The unique identifier of the user.
25    #[serde(default, skip_serializing_if = "String::is_empty")]
26    pub id: String,
27    /// The display name of the user.
28    #[serde(default, skip_serializing_if = "Option::is_none")]
29    pub display_name: Option<String>,
30    /// The primary email address of the user.
31    #[serde(default, skip_serializing_if = "Option::is_none")]
32    pub mail: Option<String>,
33    /// The principal name of the user, usually its sign-in address.
34    #[serde(default, skip_serializing_if = "Option::is_none")]
35    pub user_principal_name: Option<String>,
36}