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
56
57
58
59
60
61
/*
* 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
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Notice {
/// Notice ID
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Does this notice apply only to sysadmins
#[serde(rename = "sysAdminOnly", skip_serializing_if = "Option::is_none")]
pub sys_admin_only: Option<bool>,
/// Does this notice apply only to team admins
#[serde(rename = "teamAdminOnly", skip_serializing_if = "Option::is_none")]
pub team_admin_only: Option<bool>,
/// Optional action to perform on action button click. (defaults to closing the notice)
#[serde(rename = "action", skip_serializing_if = "Option::is_none")]
pub action: Option<String>,
/// Optional action parameter. Example: {\"action\": \"url\", actionParam: \"/console/some-page\"}
#[serde(rename = "actionParam", skip_serializing_if = "Option::is_none")]
pub action_param: Option<String>,
/// Optional override for the action button text (defaults to OK)
#[serde(rename = "actionText", skip_serializing_if = "Option::is_none")]
pub action_text: Option<String>,
/// Notice content. Use {{Mattermost}} instead of plain text to support white-labeling. Text supports Markdown.
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// URL of image to display
#[serde(rename = "image", skip_serializing_if = "Option::is_none")]
pub image: Option<String>,
/// Notice title. Use {{Mattermost}} instead of plain text to support white-labeling. Text supports Markdown.
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
}
impl Notice {
pub fn new() -> Notice {
Notice {
id: None,
sys_admin_only: None,
team_admin_only: None,
action: None,
action_param: None,
action_text: None,
description: None,
image: None,
title: None,
}
}
}