langgraph_api/generated/models/
assistant.rs

1/*
2 * LangSmith Deployment
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 0.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 Assistant {
16    /// The ID of the assistant.
17    #[serde(rename = "assistant_id")]
18    pub assistant_id: uuid::Uuid,
19    /// The ID of the graph.
20    #[serde(rename = "graph_id")]
21    pub graph_id: String,
22    #[serde(rename = "config")]
23    pub config: Box<models::Config1>,
24    /// Static context added to the assistant.
25    #[serde(rename = "context", skip_serializing_if = "Option::is_none")]
26    pub context: Option<serde_json::Value>,
27    /// The time the assistant was created.
28    #[serde(rename = "created_at")]
29    pub created_at: String,
30    /// The last time the assistant was updated.
31    #[serde(rename = "updated_at")]
32    pub updated_at: String,
33    /// The assistant metadata.
34    #[serde(rename = "metadata")]
35    pub metadata: serde_json::Value,
36    /// The version of the assistant
37    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
38    pub version: Option<i32>,
39    /// The name of the assistant
40    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
41    pub name: Option<String>,
42    /// The description of the assistant
43    #[serde(
44        rename = "description",
45        default,
46        with = "::serde_with::rust::double_option",
47        skip_serializing_if = "Option::is_none"
48    )]
49    pub description: Option<Option<String>>,
50}
51
52impl Assistant {
53    pub fn new(
54        assistant_id: uuid::Uuid,
55        graph_id: String,
56        config: models::Config1,
57        created_at: String,
58        updated_at: String,
59        metadata: serde_json::Value,
60    ) -> Assistant {
61        Assistant {
62            assistant_id,
63            graph_id,
64            config: Box::new(config),
65            context: None,
66            created_at,
67            updated_at,
68            metadata,
69            version: None,
70            name: None,
71            description: None,
72        }
73    }
74}