/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.104.0
* 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
}
}