line-bot-sdk-webhook 0.1.0

Webhook event definition of the LINE Messaging API
Documentation
/*
 * LINE Messaging API
 *
 * This document describes LINE Messaging API.
 *
 * The version of the OpenAPI document: 0.0.1
 *
 * Generated by: https://openapi-generator.tech
 * Post-processed by: post-process-enums-v2.js
 */

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

/// Mentionee enum using newtype pattern (wraps structs in Box)
/// This is automatically generated from discriminated schemas
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum Mentionee {
    UserMentionee(Box<models::UserMentionee>),
    AllMentionee(Box<models::AllMentionee>),
}

impl Default for Mentionee {
    fn default() -> Self {
        Self::UserMentionee(Box::new(Default::default()))
    }
}

// Conversion methods from struct types to enum variants
impl From<models::UserMentionee> for Mentionee {
    fn from(value: models::UserMentionee) -> Self {
        Mentionee::UserMentionee(Box::new(value))
    }
}

impl From<models::AllMentionee> for Mentionee {
    fn from(value: models::AllMentionee) -> Self {
        Mentionee::AllMentionee(Box::new(value))
    }
}