vapi_client/models/
keypad_input_plan.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 KeypadInputPlan {
16    /// This keeps track of whether the user has enabled keypad input. By default, it is off.  @default false
17    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
18    pub enabled: Option<bool>,
19    /// 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
20    #[serde(rename = "timeoutSeconds", skip_serializing_if = "Option::is_none")]
21    pub timeout_seconds: Option<f64>,
22    /// This is the delimiter(s) that will be used to process the input. Can be '#', '*', or an empty array.
23    #[serde(rename = "delimiters", skip_serializing_if = "Option::is_none")]
24    pub delimiters: Option<DelimitersTrue>,
25}
26
27impl KeypadInputPlan {
28    pub fn new() -> KeypadInputPlan {
29        KeypadInputPlan {
30            enabled: None,
31            timeout_seconds: None,
32            delimiters: None,
33        }
34    }
35}
36/// This is the delimiter(s) that will be used to process the input. Can be '#', '*', or an empty array.
37#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum DelimitersTrue {
39    #[serde(rename = "#")]
40    Hash,
41    #[serde(rename = "*")]
42    Star,
43    #[serde(rename = "")]
44    Empty,
45}
46
47impl Default for DelimitersTrue {
48    fn default() -> DelimitersTrue {
49        Self::Hash
50    }
51}