vapi_client/models/
server_message_response_assistant_request.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 ServerMessageResponseAssistantRequest {
16    #[serde(rename = "destination", skip_serializing_if = "Option::is_none")]
17    pub destination: Option<models::ServerMessageResponseAssistantRequestDestination>,
18    /// 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`
19    #[serde(rename = "assistantId", skip_serializing_if = "Option::is_none")]
20    pub assistant_id: Option<String>,
21    /// 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`
22    #[serde(rename = "assistant", skip_serializing_if = "Option::is_none")]
23    pub assistant: Option<models::CreateAssistantDto>,
24    /// These are the overrides for the `assistant` or `assistantId`'s settings and template variables.
25    #[serde(rename = "assistantOverrides", skip_serializing_if = "Option::is_none")]
26    pub assistant_overrides: Option<models::AssistantOverrides>,
27    /// 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`
28    #[serde(rename = "squadId", skip_serializing_if = "Option::is_none")]
29    pub squad_id: Option<String>,
30    /// 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`
31    #[serde(rename = "squad", skip_serializing_if = "Option::is_none")]
32    pub squad: Option<models::CreateSquadDto>,
33    /// 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`
34    #[serde(rename = "workflowId", skip_serializing_if = "Option::is_none")]
35    pub workflow_id: Option<String>,
36    /// 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`
37    #[serde(rename = "workflow", skip_serializing_if = "Option::is_none")]
38    pub workflow: Option<models::CreateWorkflowDto>,
39    /// These are the overrides for the `workflow` or `workflowId`'s settings and template variables.
40    #[serde(rename = "workflowOverrides", skip_serializing_if = "Option::is_none")]
41    pub workflow_overrides: Option<models::WorkflowOverrides>,
42    /// This is the error if the call shouldn't be accepted. This is spoken to the customer.  If this is sent, `assistantId`, `assistant`, `squadId`, `squad`, and `destination` are ignored.
43    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
44    pub error: Option<String>,
45}
46
47impl ServerMessageResponseAssistantRequest {
48    pub fn new() -> ServerMessageResponseAssistantRequest {
49        ServerMessageResponseAssistantRequest {
50            destination: None,
51            assistant_id: None,
52            assistant: None,
53            assistant_overrides: None,
54            squad_id: None,
55            squad: None,
56            workflow_id: None,
57            workflow: None,
58            workflow_overrides: None,
59            error: None,
60        }
61    }
62}