langgraph_api/generated/models/
item.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/// Item : Represents a single document or data entry in the graph's Store. Items are used to store cross-thread memories.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Item {
17    /// The namespace of the item. A namespace is analogous to a document's directory.
18    #[serde(rename = "namespace")]
19    pub namespace: Vec<String>,
20    /// The unique identifier of the item within its namespace. In general, keys needn't be globally unique.
21    #[serde(rename = "key")]
22    pub key: String,
23    /// The value stored in the item. This is the document itself.
24    #[serde(rename = "value")]
25    pub value: serde_json::Value,
26    /// The timestamp when the item was created.
27    #[serde(rename = "created_at")]
28    pub created_at: String,
29    /// The timestamp when the item was last updated.
30    #[serde(rename = "updated_at")]
31    pub updated_at: String,
32}
33
34impl Item {
35    /// Represents a single document or data entry in the graph's Store. Items are used to store cross-thread memories.
36    pub fn new(
37        namespace: Vec<String>,
38        key: String,
39        value: serde_json::Value,
40        created_at: String,
41        updated_at: String,
42    ) -> Item {
43        Item {
44            namespace,
45            key,
46            value,
47            created_at,
48            updated_at,
49        }
50    }
51}