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

static META: NodeMetadata = NodeMetadata {
    name: "vonage",
    display_name: "Vonage",
    version: &[1],
    group: &["transform"],
    description: "Consume Vonage API",
    inputs: 1,
    outputs: 1,
    properties: &[
    PropertyDef { name: "resource", display_name: "Resource", kind: PropertyKind::Options, required: false, default: Some("sms") },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: false, default: Some("send") },
    PropertyDef { name: "from", display_name: "From", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "to", display_name: "To", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "type", display_name: "Type", kind: PropertyKind::Options, required: false, default: Some("text") },
    PropertyDef { name: "binaryPropertyName", display_name: "Input Binary Field", kind: PropertyKind::String, required: true, default: Some("data") },
    PropertyDef { name: "body", display_name: "Body", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "udh", display_name: "UDH", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "title", display_name: "Title", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "url", display_name: "URL", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "validity", display_name: "Validity (in minutes)", kind: PropertyKind::Number, required: false, default: None },
    PropertyDef { name: "message", display_name: "Message", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "vcard", display_name: "VCard", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "vcal", display_name: "VCal", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "additionalFields", display_name: "Additional Fields", kind: PropertyKind::Collection, required: false, default: Some("") }
],
    credentials: &[
    CredentialRef { name: "vonageApi", required: true }
],
};

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

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

inventory::submit! { NodeFactory::new("vonage", || Arc::new(VonageNode)) }
