mattermost_client/openapi/models/
view_channel_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#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)]
12pub struct ViewChannelRequest {
13    /// The channel ID that is being viewed. Use a blank string to indicate that all channels have lost focus.
14    #[serde(rename = "channel_id")]
15    pub channel_id: String,
16    /// The channel ID of the previous channel, used when switching channels. Providing this ID will cause push notifications to clear on the channel being switched to.
17    #[serde(rename = "prev_channel_id", skip_serializing_if = "Option::is_none")]
18    pub prev_channel_id: Option<String>,
19}
20
21impl ViewChannelRequest {
22    pub fn new(channel_id: String) -> ViewChannelRequest {
23        ViewChannelRequest {
24            channel_id,
25            prev_channel_id: None,
26        }
27    }
28}