vapi_client/models/
update_vapi_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 UpdateVapiPhoneNumberDto {
16    #[serde(rename = "fallbackDestination", skip_serializing_if = "Option::is_none")]
17    pub fallback_destination: Option<models::ImportTwilioPhoneNumberDtoFallbackDestination>,
18    /// This is the hooks that will be used for incoming calls to this phone number.
19    #[serde(rename = "hooks", skip_serializing_if = "Option::is_none")]
20    pub hooks: Option<Vec<serde_json::Value>>,
21    /// This is the name of the phone number. This is just for your own reference.
22    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
23    pub name: Option<String>,
24    /// 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.
25    #[serde(rename = "assistantId", skip_serializing_if = "Option::is_none")]
26    pub assistant_id: Option<String>,
27    /// 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.
28    #[serde(rename = "squadId", skip_serializing_if = "Option::is_none")]
29    pub squad_id: Option<String>,
30    /// 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
31    #[serde(rename = "server", skip_serializing_if = "Option::is_none")]
32    pub server: Option<models::Server>,
33    /// This is the SIP URI of the phone number. You can SIP INVITE this. The assistant attached to this number will answer.  This is case-insensitive.
34    #[serde(rename = "sipUri", skip_serializing_if = "Option::is_none")]
35    pub sip_uri: Option<String>,
36    /// This enables authentication for incoming SIP INVITE requests to the `sipUri`.  If not set, any username/password to the 401 challenge of the SIP INVITE will be accepted.
37    #[serde(rename = "authentication", skip_serializing_if = "Option::is_none")]
38    pub authentication: Option<models::SipAuthentication>,
39}
40
41impl UpdateVapiPhoneNumberDto {
42    pub fn new() -> UpdateVapiPhoneNumberDto {
43        UpdateVapiPhoneNumberDto {
44            fallback_destination: None,
45            hooks: None,
46            name: None,
47            assistant_id: None,
48            squad_id: None,
49            server: None,
50            sip_uri: None,
51            authentication: None,
52        }
53    }
54}
55