mattermost_rust_client/models/
submit_interactive_dialog_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 SubmitInteractiveDialogRequest {
16    /// The URL to send the submitted dialog payload to
17    #[serde(rename = "url")]
18    pub url: String,
19    /// Channel ID the user submitted the dialog from
20    #[serde(rename = "channel_id")]
21    pub channel_id: String,
22    /// Team ID the user submitted the dialog from
23    #[serde(rename = "team_id")]
24    pub team_id: String,
25    /// String map where keys are element names and values are the element input values
26    #[serde(rename = "submission")]
27    pub submission: serde_json::Value,
28    /// Callback ID sent when the dialog was opened
29    #[serde(rename = "callback_id", skip_serializing_if = "Option::is_none")]
30    pub callback_id: Option<String>,
31    /// State sent when the dialog was opened
32    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
33    pub state: Option<String>,
34    /// Set to true if the dialog was cancelled
35    #[serde(rename = "cancelled", skip_serializing_if = "Option::is_none")]
36    pub cancelled: Option<bool>,
37}
38
39impl SubmitInteractiveDialogRequest {
40    pub fn new(url: String, channel_id: String, team_id: String, submission: serde_json::Value) -> SubmitInteractiveDialogRequest {
41        SubmitInteractiveDialogRequest {
42            url,
43            channel_id,
44            team_id,
45            submission,
46            callback_id: None,
47            state: None,
48            cancelled: None,
49        }
50    }
51}
52
53