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