/*
 * 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 GetWhatsAppCallingConfig200Response {
    /// WhatsAppPhoneNumber Mongo ID (use on /v1/whatsapp/phone-numbers/{id}/calling)
    #[serde(rename = "phoneNumberDocId", skip_serializing_if = "Option::is_none")]
    pub phone_number_doc_id: Option<String>,
    #[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
    pub phone_number: Option<String>,
    #[serde(rename = "callingEnabled", skip_serializing_if = "Option::is_none")]
    pub calling_enabled: Option<bool>,
    /// Public calling deep link (https://wa.me/call/<number>). Tapping it on a phone starts a WhatsApp voice call to this number. Embed it on websites, emails, or QR codes. Null while calling is disabled; not supported by WhatsApp desktop clients.
    #[serde(
        rename = "callDeepLink",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub call_deep_link: Option<Option<String>>,
    /// tel:+E164 / sip:... / wss://... destination
    #[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>,
    #[serde(
        rename = "sipAuthUsername",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub sip_auth_username: Option<Option<String>>,
    /// True when a SIP digest password is stored. The plaintext is never returned.
    #[serde(
        rename = "sipAuthPasswordConfigured",
        skip_serializing_if = "Option::is_none"
    )]
    pub sip_auth_password_configured: Option<bool>,
    #[serde(
        rename = "callIconCountries",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub call_icon_countries: Option<Option<Vec<String>>>,
}

impl GetWhatsAppCallingConfig200Response {
    pub fn new() -> GetWhatsAppCallingConfig200Response {
        GetWhatsAppCallingConfig200Response {
            phone_number_doc_id: None,
            phone_number: None,
            calling_enabled: None,
            call_deep_link: None,
            forward_to: None,
            recording_enabled: None,
            sip_auth_username: None,
            sip_auth_password_configured: None,
            call_icon_countries: None,
        }
    }
}
