vapi_client/models/
function_tool_provider_details.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 FunctionToolProviderDetails {
19    /// This is the Template URL or the Snapshot URL corresponding to the Template.
20    #[serde(rename = "templateUrl", skip_serializing_if = "Option::is_none")]
21    pub template_url: Option<String>,
22    #[serde(rename = "setupInstructions", skip_serializing_if = "Option::is_none")]
23    pub setup_instructions: Option<Vec<models::ToolTemplateSetup>>,
24    /// The type of tool. \"function\" for Function tool.
25    #[serde(rename = "type")]
26    pub r#type: Type,
27}
28
29impl FunctionToolProviderDetails {
30    pub fn new(r#type: Type) -> FunctionToolProviderDetails {
31        FunctionToolProviderDetails {
32            template_url: None,
33            setup_instructions: None,
34            r#type,
35        }
36    }
37}
38/// The type of tool. \"function\" for Function tool.
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
40pub enum Type {
41    #[serde(rename = "function")]
42    Function,
43}
44
45impl Default for Type {
46    fn default() -> Type {
47        Self::Function
48    }
49}