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, events and To Do task lists.
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;
19pub mod todo;
20
21/// A Microsoft Graph user (the signed-in mailbox owner via `me`).
22#[derive(Debug, Clone, Default, Deserialize, Serialize, Eq, PartialEq)]
23#[serde(rename_all = "camelCase")]
24pub struct MsgraphUser {
25    /// The unique identifier of the user.
26    #[serde(default, skip_serializing_if = "String::is_empty")]
27    pub id: String,
28    /// The display name of the user.
29    #[serde(default, skip_serializing_if = "Option::is_none")]
30    pub display_name: Option<String>,
31    /// The primary email address of the user.
32    #[serde(default, skip_serializing_if = "Option::is_none")]
33    pub mail: Option<String>,
34    /// The principal name of the user, usually its sign-in address.
35    #[serde(default, skip_serializing_if = "Option::is_none")]
36    pub user_principal_name: Option<String>,
37}