1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* 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};
/// GraphSchema : Defines the structure and properties of a graph.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GraphSchema {
/// The ID of the graph.
#[serde(rename = "graph_id")]
pub graph_id: String,
/// The schema for the graph input. Missing if unable to generate JSON schema from graph.
#[serde(rename = "input_schema", skip_serializing_if = "Option::is_none")]
pub input_schema: Option<serde_json::Value>,
/// The schema for the graph output. Missing if unable to generate JSON schema from graph.
#[serde(rename = "output_schema", skip_serializing_if = "Option::is_none")]
pub output_schema: Option<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 GraphSchema {
/// Defines the structure and properties of a graph.
pub fn new(graph_id: String, state_schema: serde_json::Value) -> GraphSchema {
GraphSchema {
graph_id,
input_schema: None,
output_schema: None,
state_schema,
config_schema: None,
context_schema: None,
}
}
}