mattermost_rust_client/models/
user_thread.rs

1/*
2 * Mattermost API Reference
3 *
4 * There is also a work-in-progress [Postman API reference](https://documenter.getpostman.com/view/4508214/RW8FERUn). 
5 *
6 * The version of the OpenAPI document: 4.0.0
7 * Contact: feedback@mattermost.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// UserThread : a thread that user is following
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct UserThread {
17    /// ID of the post that is this thread's root
18    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
19    pub id: Option<String>,
20    /// number of replies in this thread
21    #[serde(rename = "reply_count", skip_serializing_if = "Option::is_none")]
22    pub reply_count: Option<i32>,
23    /// timestamp of the last post to this thread
24    #[serde(rename = "last_reply_at", skip_serializing_if = "Option::is_none")]
25    pub last_reply_at: Option<i64>,
26    /// timestamp of the last time the user viewed this thread
27    #[serde(rename = "last_viewed_at", skip_serializing_if = "Option::is_none")]
28    pub last_viewed_at: Option<i64>,
29    /// list of users participating in this thread. only includes IDs unless 'extended' was set to 'true'
30    #[serde(rename = "participants", skip_serializing_if = "Option::is_none")]
31    pub participants: Option<Vec<crate::models::Post>>,
32    #[serde(rename = "post", skip_serializing_if = "Option::is_none")]
33    pub post: Option<Box<crate::models::Post>>,
34}
35
36impl UserThread {
37    /// a thread that user is following
38    pub fn new() -> UserThread {
39        UserThread {
40            id: None,
41            reply_count: None,
42            last_reply_at: None,
43            last_viewed_at: None,
44            participants: None,
45            post: None,
46        }
47    }
48}
49
50