/*
 * 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};

/// SendInboxMessageRequestInteractiveActionOneOf2 : Voice-call action. `type` on the parent must be `voice_call`. Renders WhatsApp's native call button (requires Calling enabled on the sending number).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SendInboxMessageRequestInteractiveActionOneOf2 {
    #[serde(rename = "name")]
    pub name: Name,
    #[serde(rename = "parameters", skip_serializing_if = "Option::is_none")]
    pub parameters: Option<Box<models::SendInboxMessageRequestInteractiveActionOneOf2Parameters>>,
}

impl SendInboxMessageRequestInteractiveActionOneOf2 {
    /// Voice-call action. `type` on the parent must be `voice_call`. Renders WhatsApp's native call button (requires Calling enabled on the sending number).
    pub fn new(name: Name) -> SendInboxMessageRequestInteractiveActionOneOf2 {
        SendInboxMessageRequestInteractiveActionOneOf2 {
            name,
            parameters: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Name {
    #[serde(rename = "voice_call")]
    VoiceCall,
}

impl Default for Name {
    fn default() -> Name {
        Self::VoiceCall
    }
}
