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};

/// GraphSchemaNoId : Defines the structure and properties of a graph without an ID.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GraphSchemaNoId {
    /// The schema for the graph input. Missing if unable to generate JSON schema from graph.
    #[serde(rename = "input_schema")]
    pub input_schema: serde_json::Value,
    /// The schema for the graph output. Missing if unable to generate JSON schema from graph.
    #[serde(rename = "output_schema")]
    pub output_schema: serde_json::Value,
    /// The schema for the graph state. Missing if unable to generate JSON schema from graph.
    #[serde(rename = "state_schema")]
    pub state_schema: serde_json::Value,
    /// The schema for the graph config. Missing if unable to generate JSON schema from graph.
    #[serde(rename = "config_schema", skip_serializing_if = "Option::is_none")]
    pub config_schema: Option<serde_json::Value>,
    /// The schema for the graph context. Missing if unable to generate JSON schema from graph.
    #[serde(rename = "context_schema", skip_serializing_if = "Option::is_none")]
    pub context_schema: Option<serde_json::Value>,
}

impl GraphSchemaNoId {
    /// Defines the structure and properties of a graph without an ID.
    pub fn new(
        input_schema: serde_json::Value,
        output_schema: serde_json::Value,
        state_schema: serde_json::Value,
    ) -> GraphSchemaNoId {
        GraphSchemaNoId {
            input_schema,
            output_schema,
            state_schema,
            config_schema: None,
            context_schema: None,
        }
    }
}