vapi_client/models/
create_call_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 CreateCallDto {
16    /// This is used to issue batch calls to multiple customers.  Only relevant for `outboundPhoneCall`. To call a single customer, use `customer` instead.
17    #[serde(rename = "customers", skip_serializing_if = "Option::is_none")]
18    pub customers: Option<Vec<models::CreateCustomerDto>>,
19    /// This is the name of the call. This is just for your own reference.
20    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
21    pub name: Option<String>,
22    /// This is the schedule plan of the call.
23    #[serde(rename = "schedulePlan", skip_serializing_if = "Option::is_none")]
24    pub schedule_plan: Option<models::SchedulePlan>,
25    /// This is the transport of the call.
26    #[serde(rename = "transport", skip_serializing_if = "Option::is_none")]
27    pub transport: Option<serde_json::Value>,
28    /// This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
29    #[serde(rename = "assistantId", skip_serializing_if = "Option::is_none")]
30    pub assistant_id: Option<String>,
31    /// This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
32    #[serde(rename = "assistant", skip_serializing_if = "Option::is_none")]
33    pub assistant: Option<models::CreateAssistantDto>,
34    /// These are the overrides for the `assistant` or `assistantId`'s settings and template variables.
35    #[serde(rename = "assistantOverrides", skip_serializing_if = "Option::is_none")]
36    pub assistant_overrides: Option<models::AssistantOverrides>,
37    /// This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
38    #[serde(rename = "squadId", skip_serializing_if = "Option::is_none")]
39    pub squad_id: Option<String>,
40    /// This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
41    #[serde(rename = "squad", skip_serializing_if = "Option::is_none")]
42    pub squad: Option<models::CreateSquadDto>,
43    /// 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.
44    #[serde(rename = "phoneNumberId", skip_serializing_if = "Option::is_none")]
45    pub phone_number_id: Option<String>,
46    /// 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.
47    #[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
48    pub phone_number: Option<models::ImportTwilioPhoneNumberDto>,
49    /// This is the customer that will be called. To call a transient customer , use `customer` instead.  Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
50    #[serde(rename = "customerId", skip_serializing_if = "Option::is_none")]
51    pub customer_id: Option<String>,
52    /// This is the customer that will be called. To call an existing customer, use `customerId` instead.  Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
53    #[serde(rename = "customer", skip_serializing_if = "Option::is_none")]
54    pub customer: Option<models::CreateCustomerDto>,
55}
56
57impl CreateCallDto {
58    pub fn new() -> CreateCallDto {
59        CreateCallDto {
60            customers: None,
61            name: None,
62            schedule_plan: None,
63            transport: None,
64            assistant_id: None,
65            assistant: None,
66            assistant_overrides: None,
67            squad_id: None,
68            squad: None,
69            phone_number_id: None,
70            phone_number: None,
71            customer_id: None,
72            customer: None,
73        }
74    }
75}
76