"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.EventHubDataConnection = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Class representing an event hub data connection.
 *
 * Uses Azure REST API version 2024-04-13. In version 2.x of the Azure Native provider, it used API version 2022-12-29.
 */
class EventHubDataConnection extends pulumi.CustomResource {
    /**
     * Get an existing EventHubDataConnection resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, opts) {
        return new EventHubDataConnection(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of EventHubDataConnection.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === EventHubDataConnection.__pulumiType;
    }
    /**
     * Create a EventHubDataConnection resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name, args, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (!opts.id) {
            if (args?.clusterName === undefined && !opts.urn) {
                throw new Error("Missing required property 'clusterName'");
            }
            if (args?.consumerGroup === undefined && !opts.urn) {
                throw new Error("Missing required property 'consumerGroup'");
            }
            if (args?.databaseName === undefined && !opts.urn) {
                throw new Error("Missing required property 'databaseName'");
            }
            if (args?.eventHubResourceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'eventHubResourceId'");
            }
            if (args?.kind === undefined && !opts.urn) {
                throw new Error("Missing required property 'kind'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            resourceInputs["clusterName"] = args?.clusterName;
            resourceInputs["compression"] = args?.compression;
            resourceInputs["consumerGroup"] = args?.consumerGroup;
            resourceInputs["dataConnectionName"] = args?.dataConnectionName;
            resourceInputs["dataFormat"] = args?.dataFormat;
            resourceInputs["databaseName"] = args?.databaseName;
            resourceInputs["databaseRouting"] = (args?.databaseRouting) ?? "Single";
            resourceInputs["eventHubResourceId"] = args?.eventHubResourceId;
            resourceInputs["eventSystemProperties"] = args?.eventSystemProperties;
            resourceInputs["kind"] = "EventHub";
            resourceInputs["location"] = args?.location;
            resourceInputs["managedIdentityResourceId"] = args?.managedIdentityResourceId;
            resourceInputs["mappingRuleName"] = args?.mappingRuleName;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["retrievalStartDate"] = args?.retrievalStartDate;
            resourceInputs["tableName"] = args?.tableName;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["managedIdentityObjectId"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["provisioningState"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        else {
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["compression"] = undefined /*out*/;
            resourceInputs["consumerGroup"] = undefined /*out*/;
            resourceInputs["dataFormat"] = undefined /*out*/;
            resourceInputs["databaseRouting"] = undefined /*out*/;
            resourceInputs["eventHubResourceId"] = undefined /*out*/;
            resourceInputs["eventSystemProperties"] = undefined /*out*/;
            resourceInputs["kind"] = undefined /*out*/;
            resourceInputs["location"] = undefined /*out*/;
            resourceInputs["managedIdentityObjectId"] = undefined /*out*/;
            resourceInputs["managedIdentityResourceId"] = undefined /*out*/;
            resourceInputs["mappingRuleName"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["provisioningState"] = undefined /*out*/;
            resourceInputs["retrievalStartDate"] = undefined /*out*/;
            resourceInputs["tableName"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:kusto/v20190121:EventHubDataConnection" }, { type: "azure-native:kusto/v20190515:EventHubDataConnection" }, { type: "azure-native:kusto/v20190907:EventHubDataConnection" }, { type: "azure-native:kusto/v20191109:EventHubDataConnection" }, { type: "azure-native:kusto/v20200215:EventGridDataConnection" }, { type: "azure-native:kusto/v20200215:EventHubDataConnection" }, { type: "azure-native:kusto/v20200614:EventHubDataConnection" }, { type: "azure-native:kusto/v20200918:EventHubDataConnection" }, { type: "azure-native:kusto/v20210101:EventHubDataConnection" }, { type: "azure-native:kusto/v20210827:EventHubDataConnection" }, { type: "azure-native:kusto/v20220201:EventHubDataConnection" }, { type: "azure-native:kusto/v20220707:EventHubDataConnection" }, { type: "azure-native:kusto/v20221111:EventHubDataConnection" }, { type: "azure-native:kusto/v20221229:CosmosDbDataConnection" }, { type: "azure-native:kusto/v20221229:EventGridDataConnection" }, { type: "azure-native:kusto/v20221229:EventHubDataConnection" }, { type: "azure-native:kusto/v20221229:IotHubDataConnection" }, { type: "azure-native:kusto/v20230502:CosmosDbDataConnection" }, { type: "azure-native:kusto/v20230502:EventGridDataConnection" }, { type: "azure-native:kusto/v20230502:EventHubDataConnection" }, { type: "azure-native:kusto/v20230502:IotHubDataConnection" }, { type: "azure-native:kusto/v20230815:CosmosDbDataConnection" }, { type: "azure-native:kusto/v20230815:EventGridDataConnection" }, { type: "azure-native:kusto/v20230815:EventHubDataConnection" }, { type: "azure-native:kusto/v20230815:IotHubDataConnection" }, { type: "azure-native:kusto/v20240413:CosmosDbDataConnection" }, { type: "azure-native:kusto/v20240413:EventGridDataConnection" }, { type: "azure-native:kusto/v20240413:EventHubDataConnection" }, { type: "azure-native:kusto/v20240413:IotHubDataConnection" }, { type: "azure-native:kusto:CosmosDbDataConnection" }, { type: "azure-native:kusto:EventGridDataConnection" }, { type: "azure-native:kusto:IotHubDataConnection" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(EventHubDataConnection.__pulumiType, name, resourceInputs, opts);
    }
}
exports.EventHubDataConnection = EventHubDataConnection;
/** @internal */
EventHubDataConnection.__pulumiType = 'azure-native:kusto:EventHubDataConnection';
//# sourceMappingURL=data:application/json;base64, 