vapi_client/models/
create_outbound_call_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};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateOutboundCallDto {
17    /// This is the name of the call. This is just for your own reference.
18    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
19    pub name: Option<String>,
20    /// This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
21    #[serde(rename = "assistantId", skip_serializing_if = "Option::is_none")]
22    pub assistant_id: Option<String>,
23    /// This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
24    #[serde(rename = "assistant", skip_serializing_if = "Option::is_none")]
25    pub assistant: Option<models::CreateAssistantDto>,
26    /// These are the overrides for the `assistant` or `assistantId`'s settings and template variables.
27    #[serde(rename = "assistantOverrides", skip_serializing_if = "Option::is_none")]
28    pub assistant_overrides: Option<models::AssistantOverrides>,
29    /// This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
30    #[serde(rename = "squadId", skip_serializing_if = "Option::is_none")]
31    pub squad_id: Option<String>,
32    /// This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
33    #[serde(rename = "squad", skip_serializing_if = "Option::is_none")]
34    pub squad: Option<models::CreateSquadDto>,
35    /// This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.  Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
36    #[serde(rename = "phoneNumberId", skip_serializing_if = "Option::is_none")]
37    pub phone_number_id: Option<String>,
38    /// This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.  Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
39    #[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
40    pub phone_number: Option<models::ImportTwilioPhoneNumberDto>,
41    /// This is the customer that will be called. To call a transient customer , use `customer` instead.  Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
42    #[serde(rename = "customerId", skip_serializing_if = "Option::is_none")]
43    pub customer_id: Option<String>,
44    /// This is the customer that will be called. To call an existing customer, use `customerId` instead.  Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
45    #[serde(rename = "customer", skip_serializing_if = "Option::is_none")]
46    pub customer: Option<models::CreateCustomerDto>,
47}
48
49impl CreateOutboundCallDto {
50    pub fn new() -> CreateOutboundCallDto {
51        CreateOutboundCallDto {
52            name: None,
53            assistant_id: None,
54            assistant: None,
55            assistant_overrides: None,
56            squad_id: None,
57            squad: None,
58            phone_number_id: None,
59            phone_number: None,
60            customer_id: None,
61            customer: None,
62        }
63    }
64}