vapi_client/models/
trieve_knowledge_base_import.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 TrieveKnowledgeBaseImport {
19    /// This is to import an existing dataset from Trieve.
20    #[serde(rename = "type")]
21    pub r#type: Type,
22    /// This is the `datasetId` of the dataset on your Trieve account.
23    #[serde(rename = "providerId")]
24    pub provider_id: String,
25}
26
27impl TrieveKnowledgeBaseImport {
28    pub fn new(r#type: Type, provider_id: String) -> TrieveKnowledgeBaseImport {
29        TrieveKnowledgeBaseImport {
30            r#type,
31            provider_id,
32        }
33    }
34}
35/// This is to import an existing dataset from Trieve.
36#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
37pub enum Type {
38    #[serde(rename = "import")]
39    Import,
40}
41
42impl Default for Type {
43    fn default() -> Type {
44        Self::Import
45    }
46}