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