vapi_client/models/
server_message_response_assistant_request.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};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ServerMessageResponseAssistantRequest {
17    #[serde(rename = "destination", skip_serializing_if = "Option::is_none")]
18    pub destination: Option<models::ServerMessageResponseAssistantRequestDestination>,
19    /// This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
20    #[serde(
21        rename = "assistantId",
22        default,
23        with = "::serde_with::rust::double_option",
24        skip_serializing_if = "Option::is_none"
25    )]
26    pub assistant_id: Option<Option<String>>,
27    /// This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.  If you're unsure why you're getting an invalid assistant, try logging your response and send the JSON blob to POST /assistant which will return the validation errors.
28    #[serde(rename = "assistant", skip_serializing_if = "Option::is_none")]
29    pub assistant: Option<models::CreateAssistantDto>,
30    /// These are the overrides for the `assistant` or `assistantId`'s settings and template variables.
31    #[serde(rename = "assistantOverrides", skip_serializing_if = "Option::is_none")]
32    pub assistant_overrides: Option<models::AssistantOverrides>,
33    /// This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
34    #[serde(rename = "squadId", skip_serializing_if = "Option::is_none")]
35    pub squad_id: Option<String>,
36    /// This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
37    #[serde(rename = "squad", skip_serializing_if = "Option::is_none")]
38    pub squad: Option<models::CreateSquadDto>,
39    /// 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.
40    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
41    pub error: Option<String>,
42}
43
44impl ServerMessageResponseAssistantRequest {
45    pub fn new() -> ServerMessageResponseAssistantRequest {
46        ServerMessageResponseAssistantRequest {
47            destination: None,
48            assistant_id: None,
49            assistant: None,
50            assistant_overrides: None,
51            squad_id: None,
52            squad: None,
53            error: None,
54        }
55    }
56}