1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* Mattermost API Reference
*
* There is also a work-in-progress [Postman API reference](https://documenter.getpostman.com/view/4508214/RW8FERUn).
*
* The version of the OpenAPI document: 4.0.0
* Contact: feedback@mattermost.com
* Generated by: https://openapi-generator.tech
*/
/// ActionsDialogsOpenDialog : Post object to create
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ActionsDialogsOpenDialog {
/// Set an ID that will be included when the dialog is submitted
#[serde(rename = "callback_id", skip_serializing_if = "Option::is_none")]
pub callback_id: Option<String>,
/// Title of the dialog
#[serde(rename = "title")]
pub title: String,
/// Markdown formatted introductory paragraph
#[serde(rename = "introduction_text", skip_serializing_if = "Option::is_none")]
pub introduction_text: Option<String>,
/// Input elements, see https://docs.mattermost.com/developer/interactive-dialogs.html#elements
#[serde(rename = "elements")]
pub elements: Vec<serde_json::Value>,
/// Label on the submit button
#[serde(rename = "submit_label", skip_serializing_if = "Option::is_none")]
pub submit_label: Option<String>,
/// Set true to receive payloads when user cancels a dialog
#[serde(rename = "notify_on_cancel", skip_serializing_if = "Option::is_none")]
pub notify_on_cancel: Option<bool>,
/// Set some state to be echoed back with the dialog submission
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
impl ActionsDialogsOpenDialog {
/// Post object to create
pub fn new(title: String, elements: Vec<serde_json::Value>) -> ActionsDialogsOpenDialog {
ActionsDialogsOpenDialog {
callback_id: None,
title,
introduction_text: None,
elements,
submit_label: None,
notify_on_cancel: None,
state: None,
}
}
}