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 */
1011use crate::models;
12use serde::{Deserialize, Serialize};
1314#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ServerMessageTransferDestinationRequest {
16#[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
17pub phone_number: Option<models::ClientMessageWorkflowNodeStartedPhoneNumber>,
18/// This is the type of the message. \"transfer-destination-request\" is sent when the model is requesting transfer but destination is unknown.
19#[serde(rename = "type")]
20pub r#type: TypeTrue,
21/// This is the timestamp of the message.
22#[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
23pub timestamp: Option<f64>,
24/// This is a live version of the `call.artifact`. This matches what is stored on `call.artifact` after the call.
25#[serde(rename = "artifact", skip_serializing_if = "Option::is_none")]
26pub artifact: Option<models::Artifact>,
27/// This is the assistant that the message is associated with.
28#[serde(rename = "assistant", skip_serializing_if = "Option::is_none")]
29pub assistant: Option<models::CreateAssistantDto>,
30/// This is the customer that the message is associated with.
31#[serde(rename = "customer", skip_serializing_if = "Option::is_none")]
32pub customer: Option<models::CreateCustomerDto>,
33/// This is the call that the message is associated with.
34#[serde(rename = "call", skip_serializing_if = "Option::is_none")]
35pub call: Option<models::Call>,
36/// This is the chat object.
37#[serde(rename = "chat", skip_serializing_if = "Option::is_none")]
38pub chat: Option<models::Chat>,
39}
4041impl ServerMessageTransferDestinationRequest {
42pub fn new(r#type: TypeTrue) -> ServerMessageTransferDestinationRequest {
43 ServerMessageTransferDestinationRequest {
44 phone_number: None,
45 r#type,
46 timestamp: None,
47 artifact: None,
48 assistant: None,
49 customer: None,
50 call: None,
51 chat: None,
52 }
53 }
54}
55/// This is the type of the message. \"transfer-destination-request\" is sent when the model is requesting transfer but destination is unknown.
56#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
57pub enum TypeTrue {
58#[serde(rename = "transfer-destination-request")]
59TransferDestinationRequest,
60}
6162impl Default for TypeTrue {
63fn default() -> TypeTrue {
64Self::TransferDestinationRequest
65 }
66}