mattermost_rust_client/models/
update_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
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct UpdateChannelRequest {
16    /// The channel's id, not updatable
17    #[serde(rename = "id")]
18    pub id: String,
19    /// The unique handle for the channel, will be present in the channel URL
20    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
21    pub name: Option<String>,
22    /// The non-unique UI name for the channel
23    #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")]
24    pub display_name: Option<String>,
25    /// A short description of the purpose of the channel
26    #[serde(rename = "purpose", skip_serializing_if = "Option::is_none")]
27    pub purpose: Option<String>,
28    /// Markdown-formatted text to display in the header of the channel
29    #[serde(rename = "header", skip_serializing_if = "Option::is_none")]
30    pub header: Option<String>,
31}
32
33impl UpdateChannelRequest {
34    pub fn new(id: String) -> UpdateChannelRequest {
35        UpdateChannelRequest {
36            id,
37            name: None,
38            display_name: None,
39            purpose: None,
40            header: None,
41        }
42    }
43}
44
45