use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WhatsAppFooterComponent {
#[serde(rename = "type")]
pub r#type: Type,
#[serde(rename = "text", skip_serializing_if = "Option::is_none")]
pub text: Option<String>,
#[serde(
rename = "code_expiration_minutes",
skip_serializing_if = "Option::is_none"
)]
pub code_expiration_minutes: Option<i32>,
}
impl WhatsAppFooterComponent {
pub fn new(r#type: Type) -> WhatsAppFooterComponent {
WhatsAppFooterComponent {
r#type,
text: None,
code_expiration_minutes: None,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "footer")]
Footer,
}
impl Default for Type {
fn default() -> Type {
Self::Footer
}
}