/*
 * 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 EnableVoiceOnNumber200Response {
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
    pub phone_number: Option<String>,
    #[serde(
        rename = "pstnForwardTo",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub pstn_forward_to: Option<Option<String>>,
    #[serde(rename = "recordingEnabled", skip_serializing_if = "Option::is_none")]
    pub recording_enabled: Option<bool>,
    #[serde(
        rename = "transcriptionEnabled",
        skip_serializing_if = "Option::is_none"
    )]
    pub transcription_enabled: Option<bool>,
    #[serde(
        rename = "transcriptionLanguage",
        skip_serializing_if = "Option::is_none"
    )]
    pub transcription_language: Option<TranscriptionLanguage>,
    #[serde(rename = "voicemailEnabled", skip_serializing_if = "Option::is_none")]
    pub voicemail_enabled: Option<bool>,
    #[serde(
        rename = "voicemailGreeting",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub voicemail_greeting: Option<Option<String>>,
    #[serde(
        rename = "businessHoursEnabled",
        skip_serializing_if = "Option::is_none"
    )]
    pub business_hours_enabled: Option<bool>,
    #[serde(
        rename = "businessHoursTimezone",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub business_hours_timezone: Option<Option<String>>,
    #[serde(rename = "businessHours", skip_serializing_if = "Option::is_none")]
    pub business_hours: Option<Vec<models::EnableVoiceOnNumber200ResponseBusinessHoursInner>>,
    #[serde(rename = "blockedCallers", skip_serializing_if = "Option::is_none")]
    pub blocked_callers: Option<Vec<String>>,
    #[serde(rename = "forwardCallerId", skip_serializing_if = "Option::is_none")]
    pub forward_caller_id: Option<ForwardCallerId>,
    #[serde(rename = "ivrEnabled", skip_serializing_if = "Option::is_none")]
    pub ivr_enabled: Option<bool>,
    #[serde(
        rename = "ivrPrompt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub ivr_prompt: Option<Option<String>>,
    #[serde(rename = "ivrOptions", skip_serializing_if = "Option::is_none")]
    pub ivr_options: Option<Vec<models::EnableVoiceOnNumber200ResponseIvrOptionsInner>>,
}

impl EnableVoiceOnNumber200Response {
    pub fn new() -> EnableVoiceOnNumber200Response {
        EnableVoiceOnNumber200Response {
            enabled: None,
            phone_number: None,
            pstn_forward_to: None,
            recording_enabled: None,
            transcription_enabled: None,
            transcription_language: None,
            voicemail_enabled: None,
            voicemail_greeting: None,
            business_hours_enabled: None,
            business_hours_timezone: None,
            business_hours: None,
            blocked_callers: None,
            forward_caller_id: None,
            ivr_enabled: None,
            ivr_prompt: None,
            ivr_options: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TranscriptionLanguage {
    #[serde(rename = "auto")]
    Auto,
    #[serde(rename = "en")]
    En,
    #[serde(rename = "es")]
    Es,
}

impl Default for TranscriptionLanguage {
    fn default() -> TranscriptionLanguage {
        Self::Auto
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ForwardCallerId {
    #[serde(rename = "business")]
    Business,
    #[serde(rename = "caller")]
    Caller,
}

impl Default for ForwardCallerId {
    fn default() -> ForwardCallerId {
        Self::Business
    }
}
