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