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

static META: NodeMetadata = NodeMetadata {
    name: "onesimpleapi",
    display_name: "One Simple API",
    version: &[1],
    group: &["transform"],
    description: "A toolbox of no-code utilities",
    inputs: 1,
    outputs: 1,
    properties: &[
    PropertyDef { name: "resource", display_name: "Resource", kind: PropertyKind::Options, required: true, default: Some("website") },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: false, default: Some("pdf") },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: false, default: Some("instagramProfile") },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: false, default: Some("exchangeRate") },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: false, default: Some("validateEmail") },
    PropertyDef { name: "link", display_name: "Webpage URL", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "download", display_name: "Download PDF?", kind: PropertyKind::Boolean, required: true, default: None },
    PropertyDef { name: "output", display_name: "Put Output In Field", kind: PropertyKind::String, required: true, default: Some("data") },
    PropertyDef { name: "options", display_name: "Options", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "message", display_name: "QR Content", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "download", display_name: "Download Image?", kind: PropertyKind::Boolean, required: true, default: None },
    PropertyDef { name: "output", display_name: "Put Output In Field", kind: PropertyKind::String, required: true, default: Some("data") },
    PropertyDef { name: "options", display_name: "Options", kind: PropertyKind::Collection, required: false, default: Some("Small") },
    PropertyDef { name: "link", display_name: "Webpage URL", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "download", display_name: "Download Screenshot?", kind: PropertyKind::Boolean, required: true, default: None },
    PropertyDef { name: "output", display_name: "Put Output In Field", kind: PropertyKind::String, required: true, default: Some("data") },
    PropertyDef { name: "options", display_name: "Options", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "profileName", display_name: "Profile Name", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "artistName", display_name: "Artist Name", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "value", display_name: "Value", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "fromCurrency", display_name: "From Currency", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "toCurrency", display_name: "To Currency", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "link", display_name: "Link To Image", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "link", display_name: "Webpage URL", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "options", display_name: "Options", kind: PropertyKind::Collection, required: false, default: None },
    PropertyDef { name: "emailAddress", display_name: "Email Address", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "link", display_name: "URL", kind: PropertyKind::String, required: true, default: Some("") }
],
    credentials: &[
    CredentialRef { name: "oneSimpleApi", required: true }
],
};

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

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

inventory::submit! { NodeFactory::new("onesimpleapi", || Arc::new(OnesimpleapiNode)) }
