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