messaging_api_line/models/
carousel_column.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 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CarouselColumn : Column object for carousel template.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CarouselColumn {
17    #[serde(rename = "thumbnailImageUrl", skip_serializing_if = "Option::is_none")]
18    pub thumbnail_image_url: Option<String>,
19    #[serde(rename = "imageBackgroundColor", skip_serializing_if = "Option::is_none")]
20    pub image_background_color: Option<String>,
21    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
22    pub title: Option<String>,
23    #[serde(rename = "text")]
24    pub text: String,
25    #[serde(rename = "defaultAction", skip_serializing_if = "Option::is_none")]
26    pub default_action: Option<Box<models::Action>>,
27    #[serde(rename = "actions")]
28    pub actions: Vec<models::Action>,
29}
30
31impl CarouselColumn {
32    /// Column object for carousel template.
33    pub fn new(text: String, actions: Vec<models::Action>) -> CarouselColumn {
34        CarouselColumn {
35            thumbnail_image_url: None,
36            image_background_color: None,
37            title: None,
38            text,
39            default_action: None,
40            actions,
41        }
42    }
43}
44