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

static META: NodeMetadata = NodeMetadata {
    name: "e2etest",
    display_name: "E2E Test",
    version: &[1],
    group: &["transform"],
    description: "Dummy node used for e2e testing",
    inputs: 1,
    outputs: 1,
    properties: &[
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: false, default: Some("remoteOptions") },
    PropertyDef { name: "fieldId", display_name: "Field ID", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "remoteOptions", display_name: "Remote Options Name or ID", kind: PropertyKind::Options, required: true, default: None },
    PropertyDef { name: "rlc", display_name: "Resource Locator", kind: PropertyKind::ResourceLocator, required: true, default: None },
    PropertyDef { name: "resourceMapper", display_name: "Resource Mapping Component", kind: PropertyKind::String, required: true, default: None },
    PropertyDef { name: "otherField", display_name: "Other Non Important Field", kind: PropertyKind::String, required: false, default: Some("") }
],
    credentials: &[],
};

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

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

inventory::submit! { NodeFactory::new("e2etest", || Arc::new(E2etestNode)) }
