messaging-api-line 0.0.2

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
 */

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

/// CarouselColumn : Column object for carousel template.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CarouselColumn {
    #[serde(rename = "thumbnailImageUrl", skip_serializing_if = "Option::is_none")]
    pub thumbnail_image_url: Option<String>,
    #[serde(rename = "imageBackgroundColor", skip_serializing_if = "Option::is_none")]
    pub image_background_color: Option<String>,
    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    #[serde(rename = "text")]
    pub text: String,
    #[serde(rename = "defaultAction", skip_serializing_if = "Option::is_none")]
    pub default_action: Option<Box<models::Action>>,
    #[serde(rename = "actions")]
    pub actions: Vec<models::Action>,
}

impl CarouselColumn {
    /// Column object for carousel template.
    pub fn new(text: String, actions: Vec<models::Action>) -> CarouselColumn {
        CarouselColumn {
            thumbnail_image_url: None,
            image_background_color: None,
            title: None,
            text,
            default_action: None,
            actions,
        }
    }
}