mattermost_rust_client/models/
command.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 Command {
16    /// The ID of the slash command
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<String>,
19    /// The token which is used to verify the source of the payload
20    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
21    pub token: Option<String>,
22    /// The time in milliseconds the command was created
23    #[serde(rename = "create_at", skip_serializing_if = "Option::is_none")]
24    pub create_at: Option<i32>,
25    /// The time in milliseconds the command was last updated
26    #[serde(rename = "update_at", skip_serializing_if = "Option::is_none")]
27    pub update_at: Option<i64>,
28    /// The time in milliseconds the command was deleted, 0 if never deleted
29    #[serde(rename = "delete_at", skip_serializing_if = "Option::is_none")]
30    pub delete_at: Option<i64>,
31    /// The user id for the commands creator
32    #[serde(rename = "creator_id", skip_serializing_if = "Option::is_none")]
33    pub creator_id: Option<String>,
34    /// The team id for which this command is configured
35    #[serde(rename = "team_id", skip_serializing_if = "Option::is_none")]
36    pub team_id: Option<String>,
37    /// The string that triggers this command
38    #[serde(rename = "trigger", skip_serializing_if = "Option::is_none")]
39    pub trigger: Option<String>,
40    /// Is the trigger done with HTTP Get ('G') or HTTP Post ('P')
41    #[serde(rename = "method", skip_serializing_if = "Option::is_none")]
42    pub method: Option<String>,
43    /// What is the username for the response post
44    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
45    pub username: Option<String>,
46    /// The url to find the icon for this users avatar
47    #[serde(rename = "icon_url", skip_serializing_if = "Option::is_none")]
48    pub icon_url: Option<String>,
49    /// Use auto complete for this command
50    #[serde(rename = "auto_complete", skip_serializing_if = "Option::is_none")]
51    pub auto_complete: Option<bool>,
52    /// The description for this command shown when selecting the command
53    #[serde(rename = "auto_complete_desc", skip_serializing_if = "Option::is_none")]
54    pub auto_complete_desc: Option<String>,
55    /// The hint for this command
56    #[serde(rename = "auto_complete_hint", skip_serializing_if = "Option::is_none")]
57    pub auto_complete_hint: Option<String>,
58    /// Display name for the command
59    #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")]
60    pub display_name: Option<String>,
61    /// Description for this command
62    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
63    pub description: Option<String>,
64    /// The URL that is triggered
65    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
66    pub url: Option<String>,
67}
68
69impl Command {
70    pub fn new() -> Command {
71        Command {
72            id: None,
73            token: None,
74            create_at: None,
75            update_at: None,
76            delete_at: None,
77            creator_id: None,
78            team_id: None,
79            trigger: None,
80            method: None,
81            username: None,
82            icon_url: None,
83            auto_complete: None,
84            auto_complete_desc: None,
85            auto_complete_hint: None,
86            display_name: None,
87            description: None,
88            url: None,
89        }
90    }
91}
92
93