mattermost_rust_client/models/update_user_custom_status_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 UpdateUserCustomStatusRequest {
16 /// Any emoji
17 #[serde(rename = "emoji")]
18 pub emoji: String,
19 /// Any custom status text
20 #[serde(rename = "text")]
21 pub text: String,
22 /// Duration of custom status, can be `thirty_minutes`, `one_hour`, `four_hours`, `today`, `this_week` or `date_and_time`
23 #[serde(rename = "duration", skip_serializing_if = "Option::is_none")]
24 pub duration: Option<String>,
25 /// The time at which custom status should be expired. It should be in ISO format.
26 #[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")]
27 pub expires_at: Option<String>,
28}
29
30impl UpdateUserCustomStatusRequest {
31 pub fn new(emoji: String, text: String) -> UpdateUserCustomStatusRequest {
32 UpdateUserCustomStatusRequest {
33 emoji,
34 text,
35 duration: None,
36 expires_at: None,
37 }
38 }
39}
40
41