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<Box<models::ServerMessageResponseAssistantRequestDestination>>,
18    /// This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
19    #[serde(rename = "assistantId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub assistant_id: Option<Option<String>>,
21    /// 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.
22    #[serde(rename = "assistant", skip_serializing_if = "Option::is_none")]
23    pub assistant: Option<Box<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<Box<models::AssistantOverrides>>,
27    /// This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
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.
31    #[serde(rename = "squad", skip_serializing_if = "Option::is_none")]
32    pub squad: Option<Box<models::CreateSquadDto>>,
33    /// 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.
34    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
35    pub error: Option<String>,
36}
37
38impl ServerMessageResponseAssistantRequest {
39    pub fn new() -> ServerMessageResponseAssistantRequest {
40        ServerMessageResponseAssistantRequest {
41            destination: None,
42            assistant_id: None,
43            assistant: None,
44            assistant_overrides: None,
45            squad_id: None,
46            squad: None,
47            error: None,
48        }
49    }
50}
51