vapi_client/models/
client_message_tool_calls.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 ClientMessageToolCalls {
16    /// This is the type of the message. \"tool-calls\" is sent to call a tool.
17    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
18    pub r#type: Option<Type>,
19    /// This is the list of tools calls that the model is requesting along with the original tool configuration.
20    #[serde(rename = "toolWithToolCallList")]
21    pub tool_with_tool_call_list: Vec<models::ClientMessageToolCallsToolWithToolCallListInner>,
22    /// This is the list of tool calls that the model is requesting.
23    #[serde(rename = "toolCallList")]
24    pub tool_call_list: Vec<models::ToolCall>,
25}
26
27impl ClientMessageToolCalls {
28    pub fn new(tool_with_tool_call_list: Vec<models::ClientMessageToolCallsToolWithToolCallListInner>, tool_call_list: Vec<models::ToolCall>) -> ClientMessageToolCalls {
29        ClientMessageToolCalls {
30            r#type: None,
31            tool_with_tool_call_list,
32            tool_call_list,
33        }
34    }
35}
36/// This is the type of the message. \"tool-calls\" is sent to call a tool.
37#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum Type {
39    #[serde(rename = "tool-calls")]
40    ToolCalls,
41}
42
43impl Default for Type {
44    fn default() -> Type {
45        Self::ToolCalls
46    }
47}
48