/*
 * 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, Debug, PartialEq, Serialize, Deserialize)]
#[serde(tag = "type")]
pub enum WhatsAppTemplateComponent {
    #[serde(rename = "header")]
    Header(Box<models::WhatsAppHeaderComponent>),
    #[serde(rename = "body")]
    Body(Box<models::WhatsAppBodyComponent>),
    #[serde(rename = "footer")]
    Footer(Box<models::WhatsAppFooterComponent>),
    #[serde(rename = "buttons")]
    Buttons(Box<models::WhatsAppButtonsComponent>),
}

impl Default for WhatsAppTemplateComponent {
    fn default() -> Self {
        Self::Header(Default::default())
    }
}

///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Format {
    #[serde(rename = "text")]
    Text,
    #[serde(rename = "image")]
    Image,
    #[serde(rename = "video")]
    Video,
    #[serde(rename = "gif")]
    Gif,
    #[serde(rename = "document")]
    Document,
    #[serde(rename = "location")]
    Location,
}

impl Default for Format {
    fn default() -> Format {
        Self::Text
    }
}
