vapi-client 0.4.2

Unofficial crate for Vapi - Voice AI for developers.
Documentation
/*
 * Vapi API
 *
 * Voice AI for developers.
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateTwilioPhoneNumberDto {
    #[serde(
        rename = "fallbackDestination",
        skip_serializing_if = "Option::is_none"
    )]
    pub fallback_destination: Option<models::ImportTwilioPhoneNumberDtoFallbackDestination>,
    /// This is the hooks that will be used for incoming calls to this phone number.
    #[serde(rename = "hooks", skip_serializing_if = "Option::is_none")]
    pub hooks: Option<Vec<models::ImportTwilioPhoneNumberDtoHooksInner>>,
    /// 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
    #[serde(rename = "smsEnabled", skip_serializing_if = "Option::is_none")]
    pub sms_enabled: Option<bool>,
    /// This is the name of the phone number. This is just for your own reference.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// 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.
    #[serde(rename = "assistantId", skip_serializing_if = "Option::is_none")]
    pub assistant_id: Option<String>,
    /// 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.
    #[serde(rename = "workflowId", skip_serializing_if = "Option::is_none")]
    pub workflow_id: Option<String>,
    /// 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.
    #[serde(rename = "squadId", skip_serializing_if = "Option::is_none")]
    pub squad_id: Option<String>,
    /// 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
    #[serde(rename = "server", skip_serializing_if = "Option::is_none")]
    pub server: Option<models::Server>,
    /// These are the digits of the phone number you own on your Twilio.
    #[serde(rename = "number", skip_serializing_if = "Option::is_none")]
    pub number: Option<String>,
    /// This is the Twilio Account SID for the phone number.
    #[serde(rename = "twilioAccountSid", skip_serializing_if = "Option::is_none")]
    pub twilio_account_sid: Option<String>,
    /// This is the Twilio Auth Token for the phone number.
    #[serde(rename = "twilioAuthToken", skip_serializing_if = "Option::is_none")]
    pub twilio_auth_token: Option<String>,
    /// This is the Twilio API Key for the phone number.
    #[serde(rename = "twilioApiKey", skip_serializing_if = "Option::is_none")]
    pub twilio_api_key: Option<String>,
    /// This is the Twilio API Secret for the phone number.
    #[serde(rename = "twilioApiSecret", skip_serializing_if = "Option::is_none")]
    pub twilio_api_secret: Option<String>,
}

impl UpdateTwilioPhoneNumberDto {
    pub fn new() -> UpdateTwilioPhoneNumberDto {
        UpdateTwilioPhoneNumberDto {
            fallback_destination: None,
            hooks: None,
            sms_enabled: None,
            name: None,
            assistant_id: None,
            workflow_id: None,
            squad_id: None,
            server: None,
            number: None,
            twilio_account_sid: None,
            twilio_auth_token: None,
            twilio_api_key: None,
            twilio_api_secret: None,
        }
    }
}