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