vapi_client/models/
regex_option.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};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RegexOption {
17    /// This is the type of the regex option. Options are: - `ignore-case`: Ignores the case of the text being matched. Add - `whole-word`: Matches whole words only. - `multi-line`: Matches across multiple lines.
18    #[serde(rename = "type")]
19    pub r#type: Type,
20    /// This is whether to enable the option.  @default false
21    #[serde(rename = "enabled")]
22    pub enabled: bool,
23}
24
25impl RegexOption {
26    pub fn new(r#type: Type, enabled: bool) -> RegexOption {
27        RegexOption { r#type, enabled }
28    }
29}
30/// This is the type of the regex option. Options are: - `ignore-case`: Ignores the case of the text being matched. Add - `whole-word`: Matches whole words only. - `multi-line`: Matches across multiple lines.
31#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
32pub enum Type {
33    #[serde(rename = "ignore-case")]
34    IgnoreCase,
35    #[serde(rename = "whole-word")]
36    WholeWord,
37    #[serde(rename = "multi-line")]
38    MultiLine,
39}
40
41impl Default for Type {
42    fn default() -> Type {
43        Self::IgnoreCase
44    }
45}