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

static META: NodeMetadata = NodeMetadata {
    name: "amount",
    display_name: "Wait Amount",
    version: &[1],
    group: &["transform"],
    description: "The time to wait",
    inputs: 1,
    outputs: 1,
    properties: &[
    PropertyDef { name: "resume", display_name: "Resume", kind: PropertyKind::Options, required: false, default: Some("timeInterval") },
    PropertyDef { name: "incomingAuthentication", display_name: "Authentication", kind: PropertyKind::Options, required: false, default: Some("none") },
    PropertyDef { name: "dateTime", display_name: "Date and Time", kind: PropertyKind::DateTime, required: true, default: Some("") },
    PropertyDef { name: "webhookNotice", display_name: "The webhook URL will be generated at run time. It can be referenced with the <strong>$execution.resumeUrl</strong> variable. Send it somewhere before getting to this node. <a href=", kind: PropertyKind::Notice, required: false, default: Some("") },
    PropertyDef { name: "formNotice", display_name: "The form url will be generated at run time. It can be referenced with the <strong>$execution.resumeFormUrl</strong> variable. Send it somewhere before getting to this node. <a href=", kind: PropertyKind::Notice, required: false, default: Some("") },
    PropertyDef { name: "options", display_name: "Options", kind: PropertyKind::Collection, required: false, default: None },
    PropertyDef { name: "options", display_name: "Options", kind: PropertyKind::Collection, required: false, default: None }
],
    credentials: &[],
};

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

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

inventory::submit! { NodeFactory::new("amount", || Arc::new(AmountNode)) }
