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
/*
* 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 KeypadInputPlan {
/// This keeps track of whether the user has enabled keypad input. By default, it is off. @default false
#[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
/// This is the time in seconds to wait before processing the input. If the input is not received within this time, the input will be ignored. If set to \"off\", the input will be processed when the user enters a delimiter or immediately if no delimiter is used. @default 2
#[serde(rename = "timeoutSeconds", skip_serializing_if = "Option::is_none")]
pub timeout_seconds: Option<f64>,
/// This is the delimiter(s) that will be used to process the input. Can be '#', '*', or an empty array.
#[serde(rename = "delimiters", skip_serializing_if = "Option::is_none")]
pub delimiters: Option<DelimitersTrue>,
}
impl KeypadInputPlan {
pub fn new() -> KeypadInputPlan {
KeypadInputPlan {
enabled: None,
timeout_seconds: None,
delimiters: None,
}
}
}
/// This is the delimiter(s) that will be used to process the input. Can be '#', '*', or an empty array.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum DelimitersTrue {
#[serde(rename = "#")]
Hash,
#[serde(rename = "*")]
Star,
#[serde(rename = "")]
Empty,
}
impl Default for DelimitersTrue {
fn default() -> DelimitersTrue {
Self::Hash
}
}