webhook_line/models/
user_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 UserSource {
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
20    #[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
21    pub user_id: Option<String>,
22}
23
24impl UserSource {
25    pub fn new(r#type: String) -> UserSource {
26        UserSource {
27            r#type: Some(r#type),
28            user_id: None,
29        }
30    }
31}