mattermost_rust_client/models/
update_incoming_webhook_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 UpdateIncomingWebhookRequest {
16    /// Incoming webhook GUID
17    #[serde(rename = "id")]
18    pub id: String,
19    /// The ID of a public channel or private group that receives the webhook payloads.
20    #[serde(rename = "channel_id")]
21    pub channel_id: String,
22    /// The display name for this incoming webhook
23    #[serde(rename = "display_name")]
24    pub display_name: String,
25    /// The description for this incoming webhook
26    #[serde(rename = "description")]
27    pub description: String,
28    /// The username this incoming webhook will post as.
29    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
30    pub username: Option<String>,
31    /// The profile picture this incoming webhook will use when posting.
32    #[serde(rename = "icon_url", skip_serializing_if = "Option::is_none")]
33    pub icon_url: Option<String>,
34}
35
36impl UpdateIncomingWebhookRequest {
37    pub fn new(id: String, channel_id: String, display_name: String, description: String) -> UpdateIncomingWebhookRequest {
38        UpdateIncomingWebhookRequest {
39            id,
40            channel_id,
41            display_name,
42            description,
43            username: None,
44            icon_url: None,
45        }
46    }
47}
48
49