vapi_client/models/
client_message_language_change_detected.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};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ClientMessageLanguageChangeDetected {
17    /// This is the type of the message. \"language-change-detected\" is sent when the transcriber is automatically switched based on the detected language.
18    #[serde(rename = "type")]
19    pub r#type: Type,
20    /// This is the language the transcriber is switched to.
21    #[serde(rename = "language")]
22    pub language: String,
23}
24
25impl ClientMessageLanguageChangeDetected {
26    pub fn new(r#type: Type, language: String) -> ClientMessageLanguageChangeDetected {
27        ClientMessageLanguageChangeDetected { r#type, language }
28    }
29}
30/// This is the type of the message. \"language-change-detected\" is sent when the transcriber is automatically switched based on the detected language.
31#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
32pub enum Type {
33    #[serde(rename = "language-change-detected")]
34    LanguageChangeDetected,
35}
36
37impl Default for Type {
38    fn default() -> Type {
39        Self::LanguageChangeDetected
40    }
41}