messaging_api_line/models/
image_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 ImageMessage {
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 = "originalContentUrl")]
24    pub original_content_url: String,
25    #[serde(rename = "previewImageUrl")]
26    pub preview_image_url: String,
27}
28
29impl ImageMessage {
30    pub fn new(
31        r#type: String,
32        original_content_url: String,
33        preview_image_url: String,
34    ) -> ImageMessage {
35        ImageMessage {
36            r#type: Some(r#type),
37            quick_reply: None,
38            sender: None,
39            original_content_url,
40            preview_image_url,
41        }
42    }
43}