vapi_client/models/
server_message_user_interrupted.rs1use serde::{Deserialize, Serialize};
12use utoipa::ToSchema;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, ToSchema)]
18pub struct ServerMessageUserInterrupted {
19 #[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
20 pub phone_number: Option<models::ServerMessageAssistantRequestPhoneNumber>,
21 #[serde(rename = "type")]
23 pub r#type: Type,
24 #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
26 pub timestamp: Option<f64>,
27 #[serde(rename = "artifact", skip_serializing_if = "Option::is_none")]
29 pub artifact: Option<models::Artifact>,
30 #[serde(rename = "assistant", skip_serializing_if = "Option::is_none")]
32 pub assistant: Option<models::CreateAssistantDto>,
33 #[serde(rename = "customer", skip_serializing_if = "Option::is_none")]
35 pub customer: Option<models::CreateCustomerDto>,
36 #[serde(rename = "call", skip_serializing_if = "Option::is_none")]
38 pub call: Option<models::Call>,
39}
40
41impl ServerMessageUserInterrupted {
42 pub fn new(r#type: Type) -> ServerMessageUserInterrupted {
43 ServerMessageUserInterrupted {
44 phone_number: None,
45 r#type,
46 timestamp: None,
47 artifact: None,
48 assistant: None,
49 customer: None,
50 call: None,
51 }
52 }
53}
54#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
56pub enum Type {
57 #[serde(rename = "user-interrupted")]
58 UserInterrupted,
59}
60
61impl Default for Type {
62 fn default() -> Type {
63 Self::UserInterrupted
64 }
65}