vapi_client/models/
keypad_input_plan.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12use utoipa::ToSchema;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, ToSchema)]
18pub struct KeypadInputPlan {
19    /// This keeps track of whether the user has enabled keypad input. By default, it is off.  @default false
20    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
21    pub enabled: Option<bool>,
22    /// 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
23    #[serde(rename = "timeoutSeconds", skip_serializing_if = "Option::is_none")]
24    pub timeout_seconds: Option<f64>,
25    /// This is the delimiter(s) that will be used to process the input. Can be '#', '*', or an empty array.
26    #[serde(rename = "delimiters", skip_serializing_if = "Option::is_none")]
27    pub delimiters: Option<Delimiters>,
28}
29
30impl KeypadInputPlan {
31    pub fn new() -> KeypadInputPlan {
32        KeypadInputPlan {
33            enabled: None,
34            timeout_seconds: None,
35            delimiters: None,
36        }
37    }
38}
39/// This is the delimiter(s) that will be used to process the input. Can be '#', '*', or an empty array.
40#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
41pub enum Delimiters {
42    #[serde(rename = "#")]
43    Hash,
44    #[serde(rename = "*")]
45    Star,
46    #[serde(rename = "")]
47    Empty,
48}
49
50impl Default for Delimiters {
51    fn default() -> Delimiters {
52        Self::Hash
53    }
54}