vapi_client/models/
update_twilio_phone_number_dto.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, ToSchema)]
18pub struct UpdateTwilioPhoneNumberDto {
19    #[serde(
20        rename = "fallbackDestination",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub fallback_destination: Option<models::ImportTwilioPhoneNumberDtoFallbackDestination>,
24    /// This is the name of the phone number. This is just for your own reference.
25    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
26    pub name: Option<String>,
27    /// 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.
28    #[serde(rename = "assistantId", skip_serializing_if = "Option::is_none")]
29    pub assistant_id: Option<String>,
30    /// 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.
31    #[serde(rename = "squadId", skip_serializing_if = "Option::is_none")]
32    pub squad_id: Option<String>,
33    /// 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
34    #[serde(rename = "server", skip_serializing_if = "Option::is_none")]
35    pub server: Option<models::Server>,
36    /// These are the digits of the phone number you own on your Twilio.
37    #[serde(rename = "number", skip_serializing_if = "Option::is_none")]
38    pub number: Option<String>,
39    /// This is the Twilio Account SID for the phone number.
40    #[serde(rename = "twilioAccountSid", skip_serializing_if = "Option::is_none")]
41    pub twilio_account_sid: Option<String>,
42    /// This is the Twilio Auth Token for the phone number.
43    #[serde(rename = "twilioAuthToken", skip_serializing_if = "Option::is_none")]
44    pub twilio_auth_token: Option<String>,
45}
46
47impl UpdateTwilioPhoneNumberDto {
48    pub fn new() -> UpdateTwilioPhoneNumberDto {
49        UpdateTwilioPhoneNumberDto {
50            fallback_destination: None,
51            name: None,
52            assistant_id: None,
53            squad_id: None,
54            server: None,
55            number: None,
56            twilio_account_sid: None,
57            twilio_auth_token: None,
58        }
59    }
60}