vapi_client/models/
make_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 MakeToolProviderDetails {
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. \"make\" for Make tool.
25    #[serde(rename = "type")]
26    pub r#type: Type,
27    #[serde(rename = "scenarioId", skip_serializing_if = "Option::is_none")]
28    pub scenario_id: Option<f64>,
29    #[serde(rename = "scenarioName", skip_serializing_if = "Option::is_none")]
30    pub scenario_name: Option<String>,
31    #[serde(rename = "triggerHookId", skip_serializing_if = "Option::is_none")]
32    pub trigger_hook_id: Option<f64>,
33    #[serde(rename = "triggerHookName", skip_serializing_if = "Option::is_none")]
34    pub trigger_hook_name: Option<String>,
35}
36
37impl MakeToolProviderDetails {
38    pub fn new(r#type: Type) -> MakeToolProviderDetails {
39        MakeToolProviderDetails {
40            template_url: None,
41            setup_instructions: None,
42            r#type,
43            scenario_id: None,
44            scenario_name: None,
45            trigger_hook_id: None,
46            trigger_hook_name: None,
47        }
48    }
49}
50/// The type of tool. \"make\" for Make tool.
51#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
52pub enum Type {
53    #[serde(rename = "make")]
54    Make,
55}
56
57impl Default for Type {
58    fn default() -> Type {
59        Self::Make
60    }
61}