// AUTO-GENERATED — do not edit by hand
// Upstream: https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/nodes/DebugHelper/DebugHelper.node.ts
// To implement: copy to ../impl/debughelper.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 DebughelperNode;

static META: NodeMetadata = NodeMetadata {
    name: "debughelper",
    display_name: "DebugHelper",
    version: &[1],
    group: &["transform"],
    description: "Causes problems intentionally and generates useful data for debugging",
    inputs: 1,
    outputs: 1,
    properties: &[
    PropertyDef { name: "category", display_name: "Category", kind: PropertyKind::Options, required: false, default: Some("throwError") },
    PropertyDef { name: "throwErrorType", display_name: "Error Type", kind: PropertyKind::Options, required: false, default: Some("NodeApiError") },
    PropertyDef { name: "throwErrorMessage", display_name: "Error Message", kind: PropertyKind::String, required: false, default: Some("Node has thrown an error") },
    PropertyDef { name: "memorySizeValue", display_name: "Memory Size to Generate", kind: PropertyKind::Number, required: false, default: None },
    PropertyDef { name: "randomDataType", display_name: "Data Type", kind: PropertyKind::Options, required: false, default: Some("user") },
    PropertyDef { name: "nanoidAlphabet", display_name: "NanoId Alphabet", kind: PropertyKind::String, required: false, default: Some("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") },
    PropertyDef { name: "nanoidLength", display_name: "NanoId Length", kind: PropertyKind::String, required: false, default: Some("16") },
    PropertyDef { name: "randomDataSeed", display_name: "Seed", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "randomDataCount", display_name: "Number of Items to Generate", kind: PropertyKind::Number, required: false, default: None },
    PropertyDef { name: "randomDataSingleArray", display_name: "Output as Single Array", kind: PropertyKind::Boolean, required: false, default: None }
],
    credentials: &[],
};

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

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

inventory::submit! { NodeFactory::new("debughelper", || Arc::new(DebughelperNode)) }
