webhook_line/models/
group_source.rs

1/*
2 * Webhook Type Definition
3 *
4 * Webhook event definition of the LINE Messaging API
5 *
6 * The version of the OpenAPI document: 1.0.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct GroupSource {
16    /// source type
17    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
18    pub r#type: Option<String>,
19    /// Group ID of the source group chat
20    #[serde(rename = "groupId")]
21    pub group_id: String,
22    /// ID of the source user. Only included in message events. Only users of LINE for iOS and LINE for Android are included in userId.
23    #[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
24    pub user_id: Option<String>,
25}
26
27impl GroupSource {
28    pub fn new(r#type: String, group_id: String) -> GroupSource {
29        GroupSource {
30            r#type: Some(r#type),
31            group_id,
32            user_id: None,
33        }
34    }
35}