webhook_line/models/
left_membership_content.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 LeftMembershipContent {
16    /// Type of membership event.
17    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
18    pub r#type: Option<String>,
19    /// The ID of the membership that the user left. This is defined for each membership.
20    #[serde(rename = "membershipId")]
21    pub membership_id: i32,
22}
23
24impl LeftMembershipContent {
25    pub fn new(r#type: String, membership_id: i32) -> LeftMembershipContent {
26        LeftMembershipContent {
27            r#type: Some(r#type),
28            membership_id,
29        }
30    }
31}