/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.4
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WhatsAppFooterComponent {
    #[serde(rename = "type")]
    pub r#type: Type,
    /// Static footer text
    #[serde(rename = "text", skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
    /// OTP code expiry in minutes (authentication templates only)
    #[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
    }
}
