Skip to main content

line_bot_sdk_messaging_api/models/
flex_box_background.rs

1/*
2 * LINE Messaging API
3 *
4 * This document describes LINE Messaging API.
5 *
6 * The version of the OpenAPI document: 0.0.1
7 *
8 * Generated by: https://openapi-generator.tech
9 * Post-processed by: post-process-enums-v2.js
10 */
11
12use crate::models;
13use serde::{Deserialize, Serialize};
14
15/// FlexBoxBackground enum using newtype pattern (wraps structs in Box)
16/// This is automatically generated from discriminated schemas
17#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18#[serde(untagged)]
19pub enum FlexBoxBackground {
20    FlexBoxLinearGradient(Box<models::FlexBoxLinearGradient>),
21}
22
23impl Default for FlexBoxBackground {
24    fn default() -> Self {
25        Self::FlexBoxLinearGradient(Box::new(Default::default()))
26    }
27}
28
29// Conversion methods from struct types to enum variants
30impl From<models::FlexBoxLinearGradient> for FlexBoxBackground {
31    fn from(value: models::FlexBoxLinearGradient) -> Self {
32        FlexBoxBackground::FlexBoxLinearGradient(Box::new(value))
33    }
34}