Skip to main content

mistral_openapi_client/models/
connector.rs

1/*
2 * Mistral AI API
3 *
4 * Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
5 *
6 * The version of the OpenAPI document: 1.0.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 Connector {
16    #[serde(rename = "id")]
17    pub id: uuid::Uuid,
18    #[serde(rename = "name")]
19    pub name: String,
20    #[serde(rename = "description")]
21    pub description: String,
22    #[serde(rename = "created_at")]
23    pub created_at: String,
24    #[serde(rename = "modified_at")]
25    pub modified_at: String,
26    #[serde(rename = "server", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub server: Option<Option<String>>,
28    #[serde(rename = "auth_type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub auth_type: Option<Option<String>>,
30    #[serde(rename = "tools", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
31    pub tools: Option<Option<Vec<models::IntegrationsSchemasApiToolTool>>>,
32}
33
34impl Connector {
35    pub fn new(id: uuid::Uuid, name: String, description: String, created_at: String, modified_at: String) -> Connector {
36        Connector {
37            id,
38            name,
39            description,
40            created_at,
41            modified_at,
42            server: None,
43            auth_type: None,
44            tools: None,
45        }
46    }
47}
48