messaging_api_line/models/
flex_video.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 FlexVideo {
16    #[serde(rename = "type")]
17    pub r#type: Option<String>,
18    #[serde(rename = "url")]
19    pub url: String,
20    #[serde(rename = "previewUrl")]
21    pub preview_url: String,
22    #[serde(rename = "altContent")]
23    pub alt_content: Box<models::FlexComponent>,
24    #[serde(rename = "aspectRatio", skip_serializing_if = "Option::is_none")]
25    pub aspect_ratio: Option<String>,
26    #[serde(rename = "action", skip_serializing_if = "Option::is_none")]
27    pub action: Option<Box<models::Action>>,
28}
29
30impl FlexVideo {
31    pub fn new(
32        r#type: String,
33        url: String,
34        preview_url: String,
35        alt_content: models::FlexComponent,
36    ) -> FlexVideo {
37        FlexVideo {
38            r#type: Some(r#type),
39            url,
40            preview_url,
41            alt_content: Box::new(alt_content),
42            aspect_ratio: None,
43            action: None,
44        }
45    }
46}