webhook_line/models/
room_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 RoomSource {
16    /// source type
17    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
18    pub r#type: Option<String>,
19    /// ID of the source user. Only included in message events. Only users of LINE for iOS and LINE for Android are included in userId.
20    #[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
21    pub user_id: Option<String>,
22    /// Room ID of the source multi-person chat
23    #[serde(rename = "roomId")]
24    pub room_id: String,
25}
26
27impl RoomSource {
28    pub fn new(r#type: String, room_id: String) -> RoomSource {
29        RoomSource {
30            r#type: Some(r#type),
31            user_id: None,
32            room_id,
33        }
34    }
35}