webhook-line 1.0.1

Webhook event definition of the LINE Messaging API
Documentation
/*
 * Webhook Type Definition
 *
 * Webhook event definition of the LINE Messaging API
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RoomSource {
    /// source type
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
    /// ID of the source user. Only included in message events. Only users of LINE for iOS and LINE for Android are included in userId.
    #[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
    pub user_id: Option<String>,
    /// Room ID of the source multi-person chat
    #[serde(rename = "roomId")]
    pub room_id: String,
}

impl RoomSource {
    pub fn new(r#type: String, room_id: String) -> RoomSource {
        RoomSource {
            r#type: Some(r#type),
            user_id: None,
            room_id,
        }
    }
}