langgraph-api 0.1.1

Rust Client API of LangGraph
Documentation
/*
 * LangSmith Deployment
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Assistant {
    /// The ID of the assistant.
    #[serde(rename = "assistant_id")]
    pub assistant_id: uuid::Uuid,
    /// The ID of the graph.
    #[serde(rename = "graph_id")]
    pub graph_id: String,
    #[serde(rename = "config")]
    pub config: Box<models::Config1>,
    /// Static context added to the assistant.
    #[serde(rename = "context", skip_serializing_if = "Option::is_none")]
    pub context: Option<serde_json::Value>,
    /// The time the assistant was created.
    #[serde(rename = "created_at")]
    pub created_at: String,
    /// The last time the assistant was updated.
    #[serde(rename = "updated_at")]
    pub updated_at: String,
    /// The assistant metadata.
    #[serde(rename = "metadata")]
    pub metadata: serde_json::Value,
    /// The version of the assistant
    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
    pub version: Option<i32>,
    /// The name of the assistant
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// The description of the assistant
    #[serde(
        rename = "description",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<Option<String>>,
}

impl Assistant {
    pub fn new(
        assistant_id: uuid::Uuid,
        graph_id: String,
        config: models::Config1,
        created_at: String,
        updated_at: String,
        metadata: serde_json::Value,
    ) -> Assistant {
        Assistant {
            assistant_id,
            graph_id,
            config: Box::new(config),
            context: None,
            created_at,
            updated_at,
            metadata,
            version: None,
            name: None,
            description: None,
        }
    }
}