vapi_client/models/
transport_configuration_twilio.rs

1/*
2 * Vapi API
3 *
4 * Voice AI for developers.
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct TransportConfigurationTwilio {
16    #[serde(rename = "provider")]
17    pub provider: ProviderTrue,
18    /// 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
19    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
20    pub timeout: Option<f64>,
21    /// Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`.  @default false
22    #[serde(rename = "record", skip_serializing_if = "Option::is_none")]
23    pub record: Option<bool>,
24    /// 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'
25    #[serde(rename = "recordingChannels", skip_serializing_if = "Option::is_none")]
26    pub recording_channels: Option<RecordingChannelsTrue>,
27}
28
29impl TransportConfigurationTwilio {
30    pub fn new(provider: ProviderTrue) -> TransportConfigurationTwilio {
31        TransportConfigurationTwilio {
32            provider,
33            timeout: None,
34            record: None,
35            recording_channels: None,
36        }
37    }
38}
39///
40#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
41pub enum ProviderTrue {
42    #[serde(rename = "twilio")]
43    Twilio,
44}
45
46impl Default for ProviderTrue {
47    fn default() -> ProviderTrue {
48        Self::Twilio
49    }
50}
51/// 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'
52#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
53pub enum RecordingChannelsTrue {
54    #[serde(rename = "mono")]
55    Mono,
56    #[serde(rename = "dual")]
57    Dual,
58}
59
60impl Default for RecordingChannelsTrue {
61    fn default() -> RecordingChannelsTrue {
62        Self::Mono
63    }
64}