use crate::line_liff::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LiffView {
#[serde(rename = "type")]
pub r#type: Type,
#[serde(rename = "url")]
pub url: String,
#[serde(rename = "moduleMode", skip_serializing_if = "Option::is_none")]
pub module_mode: Option<bool>,
}
impl LiffView {
pub fn new(r#type: Type, url: String) -> LiffView {
LiffView {
r#type,
url,
module_mode: None,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
#[allow(non_camel_case_types)]
pub enum Type {
#[serde(rename = "compact")]
Compact,
#[serde(rename = "tall")]
Tall,
#[serde(rename = "full")]
Full,
}
impl Default for Type {
fn default() -> Type {
Self::Compact
}
}