vapi-client 0.4.2

Unofficial crate for Vapi - Voice AI for developers.
Documentation
/*
 * 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
    }
}