line-bot-sdk-messaging-api 0.1.0

This document describes 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};

/// ImagemapAction 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 ImagemapAction {
    MessageImagemapAction(Box<models::MessageImagemapAction>),
    UriImagemapAction(Box<models::UriImagemapAction>),
    ClipboardImagemapAction(Box<models::ClipboardImagemapAction>),
}

impl Default for ImagemapAction {
    fn default() -> Self {
        Self::MessageImagemapAction(Box::new(Default::default()))
    }
}

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

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

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