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