vapi_client/models/
client_inbound_message_transfer.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 ClientInboundMessageTransfer {
17    /// This is the type of the message. Send \"transfer\" message to transfer the call to a destination.
18    #[serde(rename = "type")]
19    pub r#type: Type,
20    #[serde(rename = "destination", skip_serializing_if = "Option::is_none")]
21    pub destination: Option<models::ClientInboundMessageTransferDestination>,
22    /// This is the content to say.
23    #[serde(rename = "content", skip_serializing_if = "Option::is_none")]
24    pub content: Option<String>,
25}
26
27impl ClientInboundMessageTransfer {
28    pub fn new(r#type: Type) -> ClientInboundMessageTransfer {
29        ClientInboundMessageTransfer {
30            r#type,
31            destination: None,
32            content: None,
33        }
34    }
35}
36/// This is the type of the message. Send \"transfer\" message to transfer the call to a destination.
37#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum Type {
39    #[serde(rename = "transfer")]
40    Transfer,
41}
42
43impl Default for Type {
44    fn default() -> Type {
45        Self::Transfer
46    }
47}