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

static META: NodeMetadata = NodeMetadata {
    name: "googlefirebasecloudfirestore",
    display_name: "Google Cloud Firestore",
    version: &[1],
    group: &["transform"],
    description: "Interact with Google Firebase - Cloud Firestore API",
    inputs: 1,
    outputs: 1,
    properties: &[
    PropertyDef { name: "authentication", display_name: "Authentication", kind: PropertyKind::Options, required: false, default: Some("googleFirebaseCloudFirestoreOAuth2Api") },
    PropertyDef { name: "resource", display_name: "Resource", kind: PropertyKind::Options, required: false, default: Some("document") }
],
    credentials: &[
    CredentialRef { name: "googleFirebaseCloudFirestoreOAuth2Api", required: true },
    CredentialRef { name: "googleApi", required: true }
],
};

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

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

inventory::submit! { NodeFactory::new("googlefirebasecloudfirestore", || Arc::new(GooglefirebasecloudfirestoreNode)) }
