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