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

static META: NodeMetadata = NodeMetadata {
    name: "awsses",
    display_name: "AWS SES",
    version: &[1],
    group: &["transform"],
    description: "Sends data to AWS SES",
    inputs: 1,
    outputs: 1,
    properties: &[
    PropertyDef { name: "resource", display_name: "Resource", kind: PropertyKind::Options, required: false, default: Some("email") },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: false, default: Some("create") },
    PropertyDef { name: "fromEmailAddress", display_name: "From Email", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "templateName", display_name: "Template Name", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "templateContent", display_name: "Template Content", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "templateSubject", display_name: "Template Subject", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "successRedirectionURL", display_name: "Success Redirection URL", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "failureRedirectionURL", display_name: "Failure Redirection URL", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "email", display_name: "Email", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "templateName", display_name: "Template Name", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "additionalFields", display_name: "Additional Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "templateName", display_name: "Template Name", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "updateFields", display_name: "Update Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "returnAll", display_name: "Return All", kind: PropertyKind::Boolean, required: false, default: None },
    PropertyDef { name: "limit", display_name: "Limit", kind: PropertyKind::Number, required: false, default: None },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: false, default: Some("send") },
    PropertyDef { name: "isBodyHtml", display_name: "Is Body HTML", kind: PropertyKind::Boolean, required: false, default: None },
    PropertyDef { name: "subject", display_name: "Subject", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "body", display_name: "Body", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "fromEmail", display_name: "From Email", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "toAddresses", display_name: "To Addresses", kind: PropertyKind::String, required: false, default: None },
    PropertyDef { name: "templateName", display_name: "Template Name or ID", kind: PropertyKind::Options, required: false, default: Some("") },
    PropertyDef { name: "fromEmail", display_name: "From Email", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "toAddresses", display_name: "To Addresses", kind: PropertyKind::String, required: false, default: None },
    PropertyDef { name: "templateDataUi", display_name: "Template Data", kind: PropertyKind::FixedCollection, required: false, default: Some("") },
    PropertyDef { name: "additionalFields", display_name: "Additional Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: false, default: Some("create") },
    PropertyDef { name: "templateName", display_name: "Template Name", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "subjectPart", display_name: "Subject Part", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "htmlPart", display_name: "Html Part", kind: PropertyKind::String, required: false, default: Some("") },
    PropertyDef { name: "additionalFields", display_name: "Additional Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "updateFields", display_name: "Update Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "returnAll", display_name: "Return All", kind: PropertyKind::Boolean, required: false, default: None },
    PropertyDef { name: "limit", display_name: "Limit", kind: PropertyKind::Number, required: false, default: None }
],
    credentials: &[],
};

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

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

inventory::submit! { NodeFactory::new("awsses", || Arc::new(AwssesNode)) }
