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
/*
* 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 RegexOption {
/// 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.
#[serde(rename = "type")]
pub r#type: TypeTrue,
/// This is whether to enable the option. @default false
#[serde(rename = "enabled")]
pub enabled: bool,
}
impl RegexOption {
pub fn new(r#type: TypeTrue, enabled: bool) -> RegexOption {
RegexOption { r#type, enabled }
}
}
/// 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.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TypeTrue {
#[serde(rename = "ignore-case")]
IgnoreCase,
#[serde(rename = "whole-word")]
WholeWord,
#[serde(rename = "multi-line")]
MultiLine,
}
impl Default for TypeTrue {
fn default() -> TypeTrue {
Self::IgnoreCase
}
}