/*
 * 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 InitiateWhatsAppCall200Response {
    #[serde(rename = "success", skip_serializing_if = "Option::is_none")]
    pub success: Option<bool>,
    /// Internal Call doc ID
    #[serde(rename = "callId", skip_serializing_if = "Option::is_none")]
    pub call_id: Option<String>,
    /// Telnyx call_control_id of the outbound leg
    #[serde(
        rename = "telnyxCallControlId",
        skip_serializing_if = "Option::is_none"
    )]
    pub telnyx_call_control_id: Option<String>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    #[serde(rename = "direction", skip_serializing_if = "Option::is_none")]
    pub direction: Option<Direction>,
    #[serde(rename = "to", skip_serializing_if = "Option::is_none")]
    pub to: Option<String>,
    #[serde(
        rename = "forwardTo",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub forward_to: Option<Option<String>>,
    #[serde(rename = "recordingEnabled", skip_serializing_if = "Option::is_none")]
    pub recording_enabled: Option<bool>,
}

impl InitiateWhatsAppCall200Response {
    pub fn new() -> InitiateWhatsAppCall200Response {
        InitiateWhatsAppCall200Response {
            success: None,
            call_id: None,
            telnyx_call_control_id: None,
            status: None,
            direction: None,
            to: None,
            forward_to: None,
            recording_enabled: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "dialing")]
    Dialing,
}

impl Default for Status {
    fn default() -> Status {
        Self::Dialing
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Direction {
    #[serde(rename = "outbound")]
    Outbound,
}

impl Default for Direction {
    fn default() -> Direction {
        Self::Outbound
    }
}
