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