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