vapi_client/models/
client_message_tool_calls_result.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 ClientMessageToolCallsResult {
19    /// This is the type of the message. \"tool-calls-result\" is sent to forward the result of a tool call to the client.
20    #[serde(rename = "type")]
21    pub r#type: Type,
22    /// This is the result of the tool call.
23    #[serde(rename = "toolCallResult")]
24    pub tool_call_result: serde_json::Value,
25}
26
27impl ClientMessageToolCallsResult {
28    pub fn new(r#type: Type, tool_call_result: serde_json::Value) -> ClientMessageToolCallsResult {
29        ClientMessageToolCallsResult {
30            r#type,
31            tool_call_result,
32        }
33    }
34}
35/// This is the type of the message. \"tool-calls-result\" is sent to forward the result of a tool call to the client.
36#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
37pub enum Type {
38    #[serde(rename = "tool-calls-result")]
39    ToolCallsResult,
40}
41
42impl Default for Type {
43    fn default() -> Type {
44        Self::ToolCallsResult
45    }
46}