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(
17        rename = "fallbackDestination",
18        skip_serializing_if = "Option::is_none"
19    )]
20    pub fallback_destination: Option<models::ImportTwilioPhoneNumberDtoFallbackDestination>,
21    /// This is the hooks that will be used for incoming calls to this phone number.
22    #[serde(rename = "hooks", skip_serializing_if = "Option::is_none")]
23    pub hooks: Option<Vec<models::ImportTwilioPhoneNumberDtoHooksInner>>,
24    /// Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.  If set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is. If `true` or omitted (default), Vapi will configure both the voice and messaging URLs.  @default true
25    #[serde(rename = "smsEnabled", skip_serializing_if = "Option::is_none")]
26    pub sms_enabled: Option<bool>,
27    /// This is the name of the phone number. This is just for your own reference.
28    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
29    pub name: Option<String>,
30    /// This is the assistant that will be used for incoming calls to this phone number.  If neither `assistantId`, `squadId` nor `workflowId` 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 = "assistantId", skip_serializing_if = "Option::is_none")]
32    pub assistant_id: Option<String>,
33    /// This is the workflow that will be used for incoming calls to this phone number.  If neither `assistantId`, `squadId`, nor `workflowId` 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.
34    #[serde(rename = "workflowId", skip_serializing_if = "Option::is_none")]
35    pub workflow_id: Option<String>,
36    /// This is the squad that will be used for incoming calls to this phone number.  If neither `assistantId`, `squadId`, nor `workflowId` 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.
37    #[serde(rename = "squadId", skip_serializing_if = "Option::is_none")]
38    pub squad_id: Option<String>,
39    /// 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
40    #[serde(rename = "server", skip_serializing_if = "Option::is_none")]
41    pub server: Option<models::Server>,
42    /// These are the digits of the phone number you own on your Twilio.
43    #[serde(rename = "number", skip_serializing_if = "Option::is_none")]
44    pub number: Option<String>,
45    /// This is the Twilio Account SID for the phone number.
46    #[serde(rename = "twilioAccountSid", skip_serializing_if = "Option::is_none")]
47    pub twilio_account_sid: Option<String>,
48    /// This is the Twilio Auth Token for the phone number.
49    #[serde(rename = "twilioAuthToken", skip_serializing_if = "Option::is_none")]
50    pub twilio_auth_token: Option<String>,
51    /// This is the Twilio API Key for the phone number.
52    #[serde(rename = "twilioApiKey", skip_serializing_if = "Option::is_none")]
53    pub twilio_api_key: Option<String>,
54    /// This is the Twilio API Secret for the phone number.
55    #[serde(rename = "twilioApiSecret", skip_serializing_if = "Option::is_none")]
56    pub twilio_api_secret: Option<String>,
57}
58
59impl UpdateTwilioPhoneNumberDto {
60    pub fn new() -> UpdateTwilioPhoneNumberDto {
61        UpdateTwilioPhoneNumberDto {
62            fallback_destination: None,
63            hooks: None,
64            sms_enabled: None,
65            name: None,
66            assistant_id: None,
67            workflow_id: None,
68            squad_id: None,
69            server: None,
70            number: None,
71            twilio_account_sid: None,
72            twilio_auth_token: None,
73            twilio_api_key: None,
74            twilio_api_secret: None,
75        }
76    }
77}