/*
* 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 CreateVoiceCall200Response {
#[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>,
#[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 = "from", skip_serializing_if = "Option::is_none")]
pub from: Option<String>,
#[serde(rename = "to", skip_serializing_if = "Option::is_none")]
pub to: Option<String>,
#[serde(rename = "forwardTo", skip_serializing_if = "Option::is_none")]
pub forward_to: Option<String>,
#[serde(
rename = "greeting",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub greeting: 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>,
}
impl CreateVoiceCall200Response {
pub fn new() -> CreateVoiceCall200Response {
CreateVoiceCall200Response {
success: None,
call_id: None,
telnyx_call_control_id: None,
status: None,
direction: None,
from: None,
to: None,
forward_to: None,
greeting: None,
recording_enabled: None,
transcription_enabled: None,
transcription_language: 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
}
}
///
#[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
}
}