vapi_client/models/exact_replacement.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::OpenApi;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, OpenApi)]
18pub struct ExactReplacement {
19 /// This is the exact replacement type. You can use this to replace a specific word or phrase with a different word or phrase. Usage: - Replace \"hello\" with \"hi\": { type: 'exact', key: 'hello', value: 'hi' } - Replace \"good morning\" with \"good day\": { type: 'exact', key: 'good morning', value: 'good day' } - Replace a specific name: { type: 'exact', key: 'John Doe', value: 'Jane Smith' } - Replace an acronym: { type: 'exact', key: 'AI', value: 'Artificial Intelligence' } - Replace a company name with its phonetic pronunciation: { type: 'exact', key: 'Vapi', value: 'Vappy' }
20 #[serde(rename = "type")]
21 pub r#type: Type,
22 /// This is the key to replace.
23 #[serde(rename = "key")]
24 pub key: String,
25 /// This is the value that will replace the match.
26 #[serde(rename = "value")]
27 pub value: String,
28}
29
30impl ExactReplacement {
31 pub fn new(r#type: Type, key: String, value: String) -> ExactReplacement {
32 ExactReplacement { r#type, key, value }
33 }
34}
35/// This is the exact replacement type. You can use this to replace a specific word or phrase with a different word or phrase. Usage: - Replace \"hello\" with \"hi\": { type: 'exact', key: 'hello', value: 'hi' } - Replace \"good morning\" with \"good day\": { type: 'exact', key: 'good morning', value: 'good day' } - Replace a specific name: { type: 'exact', key: 'John Doe', value: 'Jane Smith' } - Replace an acronym: { type: 'exact', key: 'AI', value: 'Artificial Intelligence' } - Replace a company name with its phonetic pronunciation: { type: 'exact', key: 'Vapi', value: 'Vappy' }
36#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, OpenApi)]
37pub enum Type {
38 #[serde(rename = "exact")]
39 Exact,
40}
41
42impl Default for Type {
43 fn default() -> Type {
44 Self::Exact
45 }
46}