"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.IoTAddon = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * IoT Addon.
 *
 * Uses Azure REST API version 2023-07-01. In version 2.x of the Azure Native provider, it used API version 2022-03-01.
 */
class IoTAddon extends pulumi.CustomResource {
    /**
     * Get an existing IoTAddon 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 IoTAddon(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of IoTAddon.  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'] === IoTAddon.__pulumiType;
    }
    /**
     * Create a IoTAddon 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?.deviceName === undefined && !opts.urn) {
                throw new Error("Missing required property 'deviceName'");
            }
            if (args?.ioTDeviceDetails === undefined && !opts.urn) {
                throw new Error("Missing required property 'ioTDeviceDetails'");
            }
            if (args?.ioTEdgeDeviceDetails === undefined && !opts.urn) {
                throw new Error("Missing required property 'ioTEdgeDeviceDetails'");
            }
            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?.roleName === undefined && !opts.urn) {
                throw new Error("Missing required property 'roleName'");
            }
            resourceInputs["addonName"] = args?.addonName;
            resourceInputs["deviceName"] = args?.deviceName;
            resourceInputs["ioTDeviceDetails"] = args?.ioTDeviceDetails;
            resourceInputs["ioTEdgeDeviceDetails"] = args?.ioTEdgeDeviceDetails;
            resourceInputs["kind"] = "IotEdge";
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["roleName"] = args?.roleName;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["hostPlatform"] = undefined /*out*/;
            resourceInputs["hostPlatformType"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["provisioningState"] = undefined /*out*/;
            resourceInputs["systemData"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
            resourceInputs["version"] = undefined /*out*/;
        }
        else {
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["hostPlatform"] = undefined /*out*/;
            resourceInputs["hostPlatformType"] = undefined /*out*/;
            resourceInputs["ioTDeviceDetails"] = undefined /*out*/;
            resourceInputs["ioTEdgeDeviceDetails"] = undefined /*out*/;
            resourceInputs["kind"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["provisioningState"] = undefined /*out*/;
            resourceInputs["systemData"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
            resourceInputs["version"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:databoxedge/v20200901:IoTAddon" }, { type: "azure-native:databoxedge/v20200901preview:IoTAddon" }, { type: "azure-native:databoxedge/v20201201:IoTAddon" }, { type: "azure-native:databoxedge/v20210201:IoTAddon" }, { type: "azure-native:databoxedge/v20210201preview:IoTAddon" }, { type: "azure-native:databoxedge/v20210601:IoTAddon" }, { type: "azure-native:databoxedge/v20210601preview:IoTAddon" }, { type: "azure-native:databoxedge/v20220301:IoTAddon" }, { type: "azure-native:databoxedge/v20220401preview:IoTAddon" }, { type: "azure-native:databoxedge/v20221201preview:IoTAddon" }, { type: "azure-native:databoxedge/v20230101preview:ArcAddon" }, { type: "azure-native:databoxedge/v20230101preview:IoTAddon" }, { type: "azure-native:databoxedge/v20230701:ArcAddon" }, { type: "azure-native:databoxedge/v20230701:IoTAddon" }, { type: "azure-native:databoxedge/v20231201:ArcAddon" }, { type: "azure-native:databoxedge/v20231201:IoTAddon" }, { type: "azure-native:databoxedge:ArcAddon" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(IoTAddon.__pulumiType, name, resourceInputs, opts);
    }
}
exports.IoTAddon = IoTAddon;
/** @internal */
IoTAddon.__pulumiType = 'azure-native:databoxedge:IoTAddon';
//# sourceMappingURL=data:application/json;base64, 