vapi-client 0.4.2

Unofficial crate for Vapi - Voice AI for developers.
Documentation
/*
 * Vapi API
 *
 * Voice AI for developers.
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TransportConfigurationTwilio {
    #[serde(rename = "provider")]
    pub provider: ProviderTrue,
    /// The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail.  @default 60
    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
    pub timeout: Option<f64>,
    /// Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`.  @default false
    #[serde(rename = "record", skip_serializing_if = "Option::is_none")]
    pub record: Option<bool>,
    /// The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call.  @default 'mono'
    #[serde(rename = "recordingChannels", skip_serializing_if = "Option::is_none")]
    pub recording_channels: Option<RecordingChannelsTrue>,
}

impl TransportConfigurationTwilio {
    pub fn new(provider: ProviderTrue) -> TransportConfigurationTwilio {
        TransportConfigurationTwilio {
            provider,
            timeout: None,
            record: None,
            recording_channels: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ProviderTrue {
    #[serde(rename = "twilio")]
    Twilio,
}

impl Default for ProviderTrue {
    fn default() -> ProviderTrue {
        Self::Twilio
    }
}
/// The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call.  @default 'mono'
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RecordingChannelsTrue {
    #[serde(rename = "mono")]
    Mono,
    #[serde(rename = "dual")]
    Dual,
}

impl Default for RecordingChannelsTrue {
    fn default() -> RecordingChannelsTrue {
        Self::Mono
    }
}