traq/models/
get_client_200_response.rs

1/*
2 * traQ v3
3 *
4 * traQ v3 API
5 *
6 * The version of the OpenAPI document: 3.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct GetClient200Response {
13    /// クライアントUUID
14    #[serde(rename = "id")]
15    pub id: String,
16    /// クライアント名
17    #[serde(rename = "name")]
18    pub name: String,
19    /// 説明
20    #[serde(rename = "description")]
21    pub description: String,
22    /// クライアント開発者UUID
23    #[serde(rename = "developerId")]
24    pub developer_id: uuid::Uuid,
25    /// 要求スコープの配列
26    #[serde(rename = "scopes")]
27    pub scopes: Vec<crate::models::OAuth2Scope>,
28    /// confidential client なら true, public client なら false
29    #[serde(rename = "confidential")]
30    pub confidential: bool,
31    /// コールバックURL
32    #[serde(rename = "callbackUrl")]
33    pub callback_url: String,
34    /// クライアントシークレット
35    #[serde(rename = "secret")]
36    pub secret: String,
37}
38
39impl GetClient200Response {
40    pub fn new(
41        id: String,
42        name: String,
43        description: String,
44        developer_id: uuid::Uuid,
45        scopes: Vec<crate::models::OAuth2Scope>,
46        confidential: bool,
47        callback_url: String,
48        secret: String,
49    ) -> GetClient200Response {
50        GetClient200Response {
51            id,
52            name,
53            description,
54            developer_id,
55            scopes,
56            confidential,
57            callback_url,
58            secret,
59        }
60    }
61}