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