mattermost_rust_client/models/
update_o_auth_app_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 UpdateOAuthAppRequest {
16    /// The id of the client application
17    #[serde(rename = "id")]
18    pub id: String,
19    /// The name of the client application
20    #[serde(rename = "name")]
21    pub name: String,
22    /// A short description of the application
23    #[serde(rename = "description")]
24    pub description: String,
25    /// A URL to an icon to display with the application
26    #[serde(rename = "icon_url", skip_serializing_if = "Option::is_none")]
27    pub icon_url: Option<String>,
28    /// A list of callback URLs for the appliation
29    #[serde(rename = "callback_urls")]
30    pub callback_urls: Vec<String>,
31    /// A link to the website of the application
32    #[serde(rename = "homepage")]
33    pub homepage: String,
34    /// Set this to `true` to skip asking users for permission. It will be set to false if value is not provided.
35    #[serde(rename = "is_trusted", skip_serializing_if = "Option::is_none")]
36    pub is_trusted: Option<bool>,
37}
38
39impl UpdateOAuthAppRequest {
40    pub fn new(id: String, name: String, description: String, callback_urls: Vec<String>, homepage: String) -> UpdateOAuthAppRequest {
41        UpdateOAuthAppRequest {
42            id,
43            name,
44            description,
45            icon_url: None,
46            callback_urls,
47            homepage,
48            is_trusted: None,
49        }
50    }
51}
52
53