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

static META: NodeMetadata = NodeMetadata {
    name: "pushbullet",
    display_name: "Pushbullet",
    version: &[1],
    group: &["transform"],
    description: "Consume Pushbullet API",
    inputs: 1,
    outputs: 1,
    properties: &[
    PropertyDef { name: "resource", display_name: "Resource", kind: PropertyKind::Options, required: false, default: Some("push") },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: false, default: Some("create") },
    PropertyDef { name: "type", display_name: "Type", kind: PropertyKind::Options, required: true, default: Some("note") },
    PropertyDef { name: "title", display_name: "Title", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "body", display_name: "Body", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "url", display_name: "URL", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "binaryPropertyName", display_name: "Input Binary Field", kind: PropertyKind::String, required: true, default: Some("data") },
    PropertyDef { name: "target", display_name: "Target", kind: PropertyKind::Options, required: true, default: Some("default") },
    PropertyDef { name: "value", display_name: "Value", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "value", display_name: "Value Name or ID", kind: PropertyKind::Options, required: true, default: Some("") },
    PropertyDef { name: "pushId", display_name: "Push ID", kind: PropertyKind::String, required: true, 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: "filters", display_name: "Filters", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "pushId", display_name: "Push ID", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "dismissed", display_name: "Dismissed", kind: PropertyKind::Boolean, required: true, default: None }
],
    credentials: &[
    CredentialRef { name: "pushbulletOAuth2Api", required: true }
],
};

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

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

inventory::submit! { NodeFactory::new("pushbullet", || Arc::new(PushbulletNode)) }
