vapi_client/models/
client_inbound_message_say.rs

1/*
2 * Vapi API
3 *
4 * Voice AI for developers.
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ClientInboundMessageSay {
16    /// This is the type of the message. Send \"say\" message to make the assistant say something.
17    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
18    pub r#type: Option<TypeTrue>,
19    /// This is the flag for whether the message should replace existing assistant speech.  @default false
20    #[serde(
21        rename = "interruptAssistantEnabled",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub interrupt_assistant_enabled: Option<bool>,
25    /// This is the content to say.
26    #[serde(rename = "content", skip_serializing_if = "Option::is_none")]
27    pub content: Option<String>,
28    /// This is the flag to end call after content is spoken.
29    #[serde(rename = "endCallAfterSpoken", skip_serializing_if = "Option::is_none")]
30    pub end_call_after_spoken: Option<bool>,
31    /// This is the flag for whether the message is interruptible by the user.
32    #[serde(
33        rename = "interruptionsEnabled",
34        skip_serializing_if = "Option::is_none"
35    )]
36    pub interruptions_enabled: Option<bool>,
37}
38
39impl ClientInboundMessageSay {
40    pub fn new() -> ClientInboundMessageSay {
41        ClientInboundMessageSay {
42            r#type: None,
43            interrupt_assistant_enabled: None,
44            content: None,
45            end_call_after_spoken: None,
46            interruptions_enabled: None,
47        }
48    }
49}
50/// This is the type of the message. Send \"say\" message to make the assistant say something.
51#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
52pub enum TypeTrue {
53    #[serde(rename = "say")]
54    Say,
55}
56
57impl Default for TypeTrue {
58    fn default() -> TypeTrue {
59        Self::Say
60    }
61}