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