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

/// Send : A message to send to a node.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Send {
    /// The node to send the message to.
    #[serde(rename = "node")]
    pub node: String,
    #[serde(rename = "input", deserialize_with = "Option::deserialize")]
    pub input: Option<Box<models::Message>>,
}

impl Send {
    /// A message to send to a node.
    pub fn new(node: String, input: Option<models::Message>) -> Send {
        Send {
            node,
            input: input.map(Box::new),
        }
    }
}