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