vapi_client/models/
server_message_assistant_request_phone_number.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::ToSchema;
13
14
15use crate::models;
16
17/// ServerMessageAssistantRequestPhoneNumber : This is the phone number associated with the call.  This matches one of the following: - `call.phoneNumber`, - `call.phoneNumberId`.
18/// This is the phone number associated with the call.  This matches one of the following: - `call.phoneNumber`, - `call.phoneNumberId`.
19#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, ToSchema)]
20#[serde(untagged)]
21pub enum ServerMessageAssistantRequestPhoneNumber {
22    CreateByoPhoneNumberDto(models::CreateByoPhoneNumberDto),
23    CreateTwilioPhoneNumberDto(models::CreateTwilioPhoneNumberDto),
24    CreateVonagePhoneNumberDto(models::CreateVonagePhoneNumberDto),
25    CreateVapiPhoneNumberDto(models::CreateVapiPhoneNumberDto),
26}
27
28impl Default for ServerMessageAssistantRequestPhoneNumber {
29    fn default() -> Self {
30        Self::CreateByoPhoneNumberDto(Default::default())
31    }
32}
33/// This is to create free SIP phone numbers on Vapi.
34#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
35pub enum Provider {
36    #[serde(rename = "vapi")]
37    Vapi,
38}
39
40impl Default for Provider {
41    fn default() -> Provider {
42        Self::Vapi
43    }
44}