vapi_client/models/
client_message_voice_input.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 ClientMessageVoiceInput {
17    /// This is the type of the message. \"voice-input\" is sent when a generation is requested from voice provider.
18    #[serde(rename = "type")]
19    pub r#type: Type,
20    /// This is the voice input content
21    #[serde(rename = "input")]
22    pub input: String,
23}
24
25impl ClientMessageVoiceInput {
26    pub fn new(r#type: Type, input: String) -> ClientMessageVoiceInput {
27        ClientMessageVoiceInput { r#type, input }
28    }
29}
30/// This is the type of the message. \"voice-input\" is sent when a generation is requested from voice provider.
31#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
32pub enum Type {
33    #[serde(rename = "voice-input")]
34    VoiceInput,
35}
36
37impl Default for Type {
38    fn default() -> Type {
39        Self::VoiceInput
40    }
41}