// AUTO-GENERATED — do not edit by hand
// Upstream: https://github.com/n8n-io/n8n/blob/master/packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.ts
// To implement: copy to ../impl/vectorstoreinmemoryinsert.rs, fill in execute(), add to ../impl/mod.rs
// r8r: rust port of n8n.io
// License: Unlicense

use async_trait::async_trait;
use crate::core::error::NodeError;
use crate::core::types::*;
use crate::engine::{ExecuteCtx, Node, NodeFactory};
use std::sync::Arc;

pub struct VectorstoreinmemoryinsertNode;

static META: NodeMetadata = NodeMetadata {
    name: "vectorstoreinmemoryinsert",
    display_name: "In Memory Vector Store Insert",
    version: &[1],
    group: &["transform"],
    description: "Insert data into an in-memory vector store",
    inputs: 1,
    outputs: 1,
    properties: &[
    PropertyDef { name: "notice", display_name: "The embbded data are stored in the server memory, so they will be lost when the server is restarted. Additionally, if the amount of data is too large, it may cause the server to crash due to insufficient memory.", kind: PropertyKind::Notice, required: false, default: Some("") },
    PropertyDef { name: "clearStore", display_name: "Clear Store", kind: PropertyKind::Boolean, required: false, default: None },
    PropertyDef { name: "memoryKey", display_name: "Memory Key", kind: PropertyKind::String, required: false, default: Some("vector_store_key") }
],
    credentials: &[],
};

#[async_trait]
impl Node for VectorstoreinmemoryinsertNode {
    fn metadata(&self) -> &'static NodeMetadata { &META }

    async fn execute(&self, _ctx: &mut ExecuteCtx<'_>) -> Result<NodeOutput, NodeError> {
    Err(NodeError::NotYetPorted { node: "vectorstoreinmemoryinsert", upstream: "https://github.com/n8n-io/n8n/blob/master/packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.ts" })
    }
}

inventory::submit! { NodeFactory::new("vectorstoreinmemoryinsert", || Arc::new(VectorstoreinmemoryinsertNode)) }
