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 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`
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.  To start a call with: - Assistant, use `assistant` - Squad, use `squad` - Workflow, use `workflow`
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.  To start a call with: - Assistant, use `assistant` or `assistantId` - Squad, use `squad` or `squadId` - Workflow, use `workflow` or `workflowId`
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.  To start a call with: - Assistant, use `assistant` or `assistantId` - Squad, use `squad` or `squadId` - Workflow, use `workflow` or `workflowId`
41    #[serde(rename = "squad", skip_serializing_if = "Option::is_none")]
42    pub squad: Option<models::CreateSquadDto>,
43    /// 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`
44    #[serde(rename = "workflowId", skip_serializing_if = "Option::is_none")]
45    pub workflow_id: Option<String>,
46    /// 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`
47    #[serde(rename = "workflow", skip_serializing_if = "Option::is_none")]
48    pub workflow: Option<models::CreateWorkflowDto>,
49    /// These are the overrides for the `workflow` or `workflowId`'s settings and template variables.
50    #[serde(rename = "workflowOverrides", skip_serializing_if = "Option::is_none")]
51    pub workflow_overrides: Option<models::WorkflowOverrides>,
52    /// 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.
53    #[serde(rename = "phoneNumberId", skip_serializing_if = "Option::is_none")]
54    pub phone_number_id: Option<String>,
55    /// 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.
56    #[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
57    pub phone_number: Option<models::ImportTwilioPhoneNumberDto>,
58    /// This is the customer that will be called. To call a transient customer , use `customer` instead.  Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
59    #[serde(rename = "customerId", skip_serializing_if = "Option::is_none")]
60    pub customer_id: Option<String>,
61    /// This is the customer that will be called. To call an existing customer, use `customerId` instead.  Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
62    #[serde(rename = "customer", skip_serializing_if = "Option::is_none")]
63    pub customer: Option<models::CreateCustomerDto>,
64}
65
66impl CreateCallDto {
67    pub fn new() -> CreateCallDto {
68        CreateCallDto {
69            customers: None,
70            name: None,
71            schedule_plan: None,
72            transport: None,
73            assistant_id: None,
74            assistant: None,
75            assistant_overrides: None,
76            squad_id: None,
77            squad: None,
78            workflow_id: None,
79            workflow: None,
80            workflow_overrides: None,
81            phone_number_id: None,
82            phone_number: None,
83            customer_id: None,
84            customer: None,
85        }
86    }
87}