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

/// Item : Represents a single document or data entry in the graph's Store. Items are used to store cross-thread memories.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Item {
    /// The namespace of the item. A namespace is analogous to a document's directory.
    #[serde(rename = "namespace")]
    pub namespace: Vec<String>,
    /// The unique identifier of the item within its namespace. In general, keys needn't be globally unique.
    #[serde(rename = "key")]
    pub key: String,
    /// The value stored in the item. This is the document itself.
    #[serde(rename = "value")]
    pub value: serde_json::Value,
    /// The timestamp when the item was created.
    #[serde(rename = "created_at")]
    pub created_at: String,
    /// The timestamp when the item was last updated.
    #[serde(rename = "updated_at")]
    pub updated_at: String,
}

impl Item {
    /// Represents a single document or data entry in the graph's Store. Items are used to store cross-thread memories.
    pub fn new(
        namespace: Vec<String>,
        key: String,
        value: serde_json::Value,
        created_at: String,
        updated_at: String,
    ) -> Item {
        Item {
            namespace,
            key,
            value,
            created_at,
            updated_at,
        }
    }
}