vapi_client/models/
call_destination.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/// CallDestination : This is the destination where the call ended up being transferred to. If the call was not transferred, this will be empty.
18/// This is the destination where the call ended up being transferred to. If the call was not transferred, this will be empty.
19#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, OpenApi)]
20#[serde(untagged)]
21pub enum CallDestination {
22    TransferDestinationNumber(models::TransferDestinationNumber),
23    TransferDestinationSip(models::TransferDestinationSip),
24}
25
26impl Default for CallDestination {
27    fn default() -> Self {
28        Self::TransferDestinationNumber(Default::default())
29    }
30}
31///
32#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, OpenApi)]
33pub enum Type {
34    #[serde(rename = "number")]
35    Number,
36    #[serde(rename = "sip")]
37    Sip,
38}
39
40impl Default for Type {
41    fn default() -> Type {
42        Self::Number
43    }
44}