vapi_client/models/
transfer_destination_step.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 TransferDestinationStep {
17    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
18    pub message: Option<models::TransferDestinationAssistantMessage>,
19    #[serde(rename = "type")]
20    pub r#type: Type,
21    /// This is the step to transfer to.
22    #[serde(rename = "stepName")]
23    pub step_name: String,
24    /// This is the description of the destination, used by the AI to choose when and how to transfer the call.
25    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
26    pub description: Option<String>,
27}
28
29impl TransferDestinationStep {
30    pub fn new(r#type: Type, step_name: String) -> TransferDestinationStep {
31        TransferDestinationStep {
32            message: None,
33            r#type,
34            step_name,
35            description: None,
36        }
37    }
38}
39///
40#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
41pub enum Type {
42    #[serde(rename = "step")]
43    Step,
44}
45
46impl Default for Type {
47    fn default() -> Type {
48        Self::Step
49    }
50}