"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.EventGridDataConnection = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Class representing an Event Grid 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 EventGridDataConnection extends pulumi.CustomResource {
    /**
     * Get an existing EventGridDataConnection 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 EventGridDataConnection(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of EventGridDataConnection.  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'] === EventGridDataConnection.__pulumiType;
    }
    /**
     * Create a EventGridDataConnection 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'");
            }
            if (args?.storageAccountResourceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'storageAccountResourceId'");
            }
            resourceInputs["blobStorageEventType"] = args?.blobStorageEventType;
            resourceInputs["clusterName"] = args?.clusterName;
            resourceInputs["consumerGroup"] = args?.consumerGroup;
            resourceInputs["dataConnectionName"] = args?.dataConnectionName;
            resourceInputs["dataFormat"] = args?.dataFormat;
            resourceInputs["databaseName"] = args?.databaseName;
            resourceInputs["databaseRouting"] = (args?.databaseRouting) ?? "Single";
            resourceInputs["eventGridResourceId"] = args?.eventGridResourceId;
            resourceInputs["eventHubResourceId"] = args?.eventHubResourceId;
            resourceInputs["ignoreFirstRecord"] = args?.ignoreFirstRecord;
            resourceInputs["kind"] = "EventGrid";
            resourceInputs["location"] = args?.location;
            resourceInputs["managedIdentityResourceId"] = args?.managedIdentityResourceId;
            resourceInputs["mappingRuleName"] = args?.mappingRuleName;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["storageAccountResourceId"] = args?.storageAccountResourceId;
            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["blobStorageEventType"] = undefined /*out*/;
            resourceInputs["consumerGroup"] = undefined /*out*/;
            resourceInputs["dataFormat"] = undefined /*out*/;
            resourceInputs["databaseRouting"] = undefined /*out*/;
            resourceInputs["eventGridResourceId"] = undefined /*out*/;
            resourceInputs["eventHubResourceId"] = undefined /*out*/;
            resourceInputs["ignoreFirstRecord"] = 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["storageAccountResourceId"] = undefined /*out*/;
            resourceInputs["tableName"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:kusto/v20190121:EventGridDataConnection" }, { type: "azure-native:kusto/v20190515:EventGridDataConnection" }, { type: "azure-native:kusto/v20190907:EventGridDataConnection" }, { type: "azure-native:kusto/v20191109:EventGridDataConnection" }, { type: "azure-native:kusto/v20200215:EventGridDataConnection" }, { type: "azure-native:kusto/v20200614:EventGridDataConnection" }, { type: "azure-native:kusto/v20200918:EventGridDataConnection" }, { type: "azure-native:kusto/v20210101:EventGridDataConnection" }, { type: "azure-native:kusto/v20210827:EventGridDataConnection" }, { type: "azure-native:kusto/v20220201:EventGridDataConnection" }, { type: "azure-native:kusto/v20220707:EventGridDataConnection" }, { type: "azure-native:kusto/v20221111:EventGridDataConnection" }, { 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:EventHubDataConnection" }, { type: "azure-native:kusto:IotHubDataConnection" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(EventGridDataConnection.__pulumiType, name, resourceInputs, opts);
    }
}
exports.EventGridDataConnection = EventGridDataConnection;
/** @internal */
EventGridDataConnection.__pulumiType = 'azure-native:kusto:EventGridDataConnection';
//# sourceMappingURL=data:application/json;base64, 