/*
 * 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 UpdateWhatsAppCallingLegacyRequest {
    #[serde(rename = "accountId")]
    pub account_id: String,
    #[serde(rename = "forwardTo", skip_serializing_if = "Option::is_none")]
    pub forward_to: Option<String>,
    #[serde(
        rename = "sipAuthUsername",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub sip_auth_username: Option<Option<String>>,
    #[serde(
        rename = "sipAuthPassword",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub sip_auth_password: Option<Option<String>>,
    #[serde(rename = "recordingEnabled", skip_serializing_if = "Option::is_none")]
    pub recording_enabled: 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 UpdateWhatsAppCallingLegacyRequest {
    pub fn new(account_id: String) -> UpdateWhatsAppCallingLegacyRequest {
        UpdateWhatsAppCallingLegacyRequest {
            account_id,
            forward_to: None,
            sip_auth_username: None,
            sip_auth_password: None,
            recording_enabled: None,
            call_icon_countries: None,
        }
    }
}
