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