mattermost_rust_client/models/
update_post_request.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
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct UpdatePostRequest {
16    /// ID of the post to update
17    #[serde(rename = "id")]
18    pub id: String,
19    /// Set to `true` to pin the post to the channel it is in
20    #[serde(rename = "is_pinned", skip_serializing_if = "Option::is_none")]
21    pub is_pinned: Option<bool>,
22    /// The message text of the post
23    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
24    pub message: Option<String>,
25    /// Set to `true` if the post has reactions to it
26    #[serde(rename = "has_reactions", skip_serializing_if = "Option::is_none")]
27    pub has_reactions: Option<bool>,
28    /// A general JSON property bag to attach to the post
29    #[serde(rename = "props", skip_serializing_if = "Option::is_none")]
30    pub props: Option<String>,
31}
32
33impl UpdatePostRequest {
34    pub fn new(id: String) -> UpdatePostRequest {
35        UpdatePostRequest {
36            id,
37            is_pinned: None,
38            message: None,
39            has_reactions: None,
40            props: None,
41        }
42    }
43}
44
45