1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* 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
}
}