vapi_client/models/
tool_call.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 ToolCall {
16    /// This is the ID of the tool call
17    #[serde(rename = "id")]
18    pub id: String,
19    /// This is the type of tool
20    #[serde(rename = "type")]
21    pub r#type: String,
22    /// This is the function that was called
23    #[serde(rename = "function")]
24    pub function: models::ToolCallFunction,
25}
26
27impl ToolCall {
28    pub fn new(id: String, r#type: String, function: models::ToolCallFunction) -> ToolCall {
29        ToolCall {
30            id,
31            r#type,
32            function,
33        }
34    }
35}