Skip to main content

io_msgraph/v1/rest/users/
mail_folders.rs

1//! Microsoft Graph mail folders (`users.mailFolders`): list, get,
2//! create, update, delete, copy, move, list child folders.
3//!
4//! <https://learn.microsoft.com/en-us/graph/api/resources/mailfolder>
5
6use alloc::string::String;
7
8use serde::{Deserialize, Serialize};
9
10pub mod child_folders;
11pub mod copy;
12pub mod create;
13pub mod delete;
14pub mod get;
15pub mod list;
16pub mod r#move;
17pub mod update;
18
19/// A mail folder in a user's mailbox. Doubles as the create body, where
20/// only `display_name` (and optionally `is_hidden`) is serialized.
21#[derive(Debug, Clone, Default, Deserialize, Serialize, Eq, PartialEq)]
22#[serde(rename_all = "camelCase")]
23pub struct MsgraphMailFolder {
24    /// The unique identifier of the folder.
25    #[serde(default, skip_serializing_if = "String::is_empty")]
26    pub id: String,
27    /// The display name of the folder.
28    #[serde(default, skip_serializing_if = "String::is_empty")]
29    pub display_name: String,
30    /// The identifier of the parent folder.
31    #[serde(default, skip_serializing_if = "Option::is_none")]
32    pub parent_folder_id: Option<String>,
33    /// The number of immediate child folders.
34    #[serde(default, skip_serializing_if = "Option::is_none")]
35    pub child_folder_count: Option<u64>,
36    /// The number of unread items in the folder.
37    #[serde(default, skip_serializing_if = "Option::is_none")]
38    pub unread_item_count: Option<u64>,
39    /// The total number of items in the folder.
40    #[serde(default, skip_serializing_if = "Option::is_none")]
41    pub total_item_count: Option<u64>,
42    /// The size of the folder in bytes.
43    #[serde(default, skip_serializing_if = "Option::is_none")]
44    pub size_in_bytes: Option<u64>,
45    /// Whether the folder is hidden from folder listings.
46    #[serde(default, skip_serializing_if = "Option::is_none")]
47    pub is_hidden: Option<bool>,
48}