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
/*
* Revolt API
*
* Open source user-first chat platform.
*
* The version of the OpenAPI document: 0.6.5
* Contact: contact@revolt.chat
* Generated by: https://openapi-generator.tech
*/
/// ChannelUnread : Representation of the state of a channel from the perspective of a user
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ChannelUnread {
#[serde(rename = "_id")]
pub _id: Box<crate::models::ChannelUnreadId>,
/// Id of the last message read in this channel by a user
#[serde(rename = "last_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub last_id: Option<Option<String>>,
/// Array of message ids that mention the user
#[serde(rename = "mentions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub mentions: Option<Option<Vec<String>>>,
}
impl ChannelUnread {
/// Representation of the state of a channel from the perspective of a user
pub fn new(_id: crate::models::ChannelUnreadId) -> ChannelUnread {
ChannelUnread {
_id: Box::new(_id),
last_id: None,
mentions: None,
}
}
}