messaging_api_line/models/
imagemap_message.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ImagemapMessage {
16    /// Type of message
17    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
18    pub r#type: Option<String>,
19    #[serde(rename = "quickReply", skip_serializing_if = "Option::is_none")]
20    pub quick_reply: Option<Box<models::QuickReply>>,
21    #[serde(rename = "sender", skip_serializing_if = "Option::is_none")]
22    pub sender: Option<Box<models::Sender>>,
23    #[serde(rename = "baseUrl")]
24    pub base_url: String,
25    #[serde(rename = "altText")]
26    pub alt_text: String,
27    #[serde(rename = "baseSize")]
28    pub base_size: Box<models::ImagemapBaseSize>,
29    #[serde(rename = "actions")]
30    pub actions: Vec<models::ImagemapAction>,
31    #[serde(rename = "video", skip_serializing_if = "Option::is_none")]
32    pub video: Option<Box<models::ImagemapVideo>>,
33}
34
35impl ImagemapMessage {
36    pub fn new(
37        r#type: String,
38        base_url: String,
39        alt_text: String,
40        base_size: models::ImagemapBaseSize,
41        actions: Vec<models::ImagemapAction>,
42    ) -> ImagemapMessage {
43        ImagemapMessage {
44            r#type: Some(r#type),
45            quick_reply: None,
46            sender: None,
47            base_url,
48            alt_text,
49            base_size: Box::new(base_size),
50            actions,
51            video: None,
52        }
53    }
54}