vapi_client/models/
update_twilio_phone_number_dto.rs

1/*
2 * Vapi API
3 *
4 * Voice AI for developers.
5 *
6 * The version of the OpenAPI document: 1.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct UpdateTwilioPhoneNumberDto {
16    #[serde(rename = "fallbackDestination", skip_serializing_if = "Option::is_none")]
17    pub fallback_destination: Option<Box<models::ImportTwilioPhoneNumberDtoFallbackDestination>>,
18    /// This is the name of the phone number. This is just for your own reference.
19    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
20    pub name: Option<String>,
21    /// This is the assistant that will be used for incoming calls to this phone number.  If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
22    #[serde(rename = "assistantId", skip_serializing_if = "Option::is_none")]
23    pub assistant_id: Option<String>,
24    /// This is the squad that will be used for incoming calls to this phone number.  If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
25    #[serde(rename = "squadId", skip_serializing_if = "Option::is_none")]
26    pub squad_id: Option<String>,
27    /// This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema.  The order of precedence is:  1. assistant.server 2. phoneNumber.server 3. org.server
28    #[serde(rename = "server", skip_serializing_if = "Option::is_none")]
29    pub server: Option<Box<models::Server>>,
30    /// These are the digits of the phone number you own on your Twilio.
31    #[serde(rename = "number", skip_serializing_if = "Option::is_none")]
32    pub number: Option<String>,
33    /// This is the Twilio Account SID for the phone number.
34    #[serde(rename = "twilioAccountSid", skip_serializing_if = "Option::is_none")]
35    pub twilio_account_sid: Option<String>,
36    /// This is the Twilio Auth Token for the phone number.
37    #[serde(rename = "twilioAuthToken", skip_serializing_if = "Option::is_none")]
38    pub twilio_auth_token: Option<String>,
39}
40
41impl UpdateTwilioPhoneNumberDto {
42    pub fn new() -> UpdateTwilioPhoneNumberDto {
43        UpdateTwilioPhoneNumberDto {
44            fallback_destination: None,
45            name: None,
46            assistant_id: None,
47            squad_id: None,
48            server: None,
49            number: None,
50            twilio_account_sid: None,
51            twilio_auth_token: None,
52        }
53    }
54}
55