Skip to main content

line_bot_sdk_messaging_api/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(
20        rename = "imageBackgroundColor",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub image_background_color: Option<String>,
24    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
25    pub title: Option<String>,
26    #[serde(rename = "text")]
27    pub text: String,
28    #[serde(rename = "defaultAction", skip_serializing_if = "Option::is_none")]
29    pub default_action: Option<Box<models::Action>>,
30    #[serde(rename = "actions")]
31    pub actions: Vec<models::Action>,
32}
33
34impl CarouselColumn {
35    /// Column object for carousel template.
36    pub fn new(text: String, actions: Vec<models::Action>) -> CarouselColumn {
37        CarouselColumn {
38            thumbnail_image_url: None,
39            image_background_color: None,
40            title: None,
41            text,
42            default_action: None,
43            actions,
44        }
45    }
46}