vapi_client/models/
regex_option.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 RegexOption {
16    /// 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.
17    #[serde(rename = "type")]
18    pub r#type: TypeTrue,
19    /// This is whether to enable the option.  @default false
20    #[serde(rename = "enabled")]
21    pub enabled: bool,
22}
23
24impl RegexOption {
25    pub fn new(r#type: TypeTrue, enabled: bool) -> RegexOption {
26        RegexOption { r#type, enabled }
27    }
28}
29/// 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.
30#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
31pub enum TypeTrue {
32    #[serde(rename = "ignore-case")]
33    IgnoreCase,
34    #[serde(rename = "whole-word")]
35    WholeWord,
36    #[serde(rename = "multi-line")]
37    MultiLine,
38}
39
40impl Default for TypeTrue {
41    fn default() -> TypeTrue {
42        Self::IgnoreCase
43    }
44}