"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.Gen2Environment = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An environment is a set of time-series data available for query, and is the top level Azure Time Series Insights resource. Gen2 environments do not have set data retention limits.
 *
 * Uses Azure REST API version 2020-05-15. In version 2.x of the Azure Native provider, it used API version 2020-05-15.
 */
class Gen2Environment extends pulumi.CustomResource {
    /**
     * Get an existing Gen2Environment 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 Gen2Environment(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of Gen2Environment.  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'] === Gen2Environment.__pulumiType;
    }
    /**
     * Create a Gen2Environment 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 || args.kind === undefined) && !opts.urn) {
                throw new Error("Missing required property 'kind'");
            }
            if ((!args || args.resourceGroupName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if ((!args || args.sku === undefined) && !opts.urn) {
                throw new Error("Missing required property 'sku'");
            }
            if ((!args || args.storageConfiguration === undefined) && !opts.urn) {
                throw new Error("Missing required property 'storageConfiguration'");
            }
            if ((!args || args.timeSeriesIdProperties === undefined) && !opts.urn) {
                throw new Error("Missing required property 'timeSeriesIdProperties'");
            }
            resourceInputs["environmentName"] = args ? args.environmentName : undefined;
            resourceInputs["kind"] = "Gen2";
            resourceInputs["location"] = args ? args.location : undefined;
            resourceInputs["resourceGroupName"] = args ? args.resourceGroupName : undefined;
            resourceInputs["sku"] = args ? args.sku : undefined;
            resourceInputs["storageConfiguration"] = args ? args.storageConfiguration : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["timeSeriesIdProperties"] = args ? args.timeSeriesIdProperties : undefined;
            resourceInputs["warmStoreConfiguration"] = args ? args.warmStoreConfiguration : undefined;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["creationTime"] = undefined /*out*/;
            resourceInputs["dataAccessFqdn"] = undefined /*out*/;
            resourceInputs["dataAccessId"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["provisioningState"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        else {
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["creationTime"] = undefined /*out*/;
            resourceInputs["dataAccessFqdn"] = undefined /*out*/;
            resourceInputs["dataAccessId"] = undefined /*out*/;
            resourceInputs["kind"] = undefined /*out*/;
            resourceInputs["location"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["provisioningState"] = undefined /*out*/;
            resourceInputs["sku"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
            resourceInputs["storageConfiguration"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
            resourceInputs["timeSeriesIdProperties"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
            resourceInputs["warmStoreConfiguration"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:timeseriesinsights/v20170228preview:Gen2Environment" }, { type: "azure-native:timeseriesinsights/v20171115:Gen2Environment" }, { type: "azure-native:timeseriesinsights/v20180815preview:Gen2Environment" }, { type: "azure-native:timeseriesinsights/v20200515:Gen2Environment" }, { type: "azure-native:timeseriesinsights/v20210331preview:Gen2Environment" }, { type: "azure-native:timeseriesinsights/v20210630preview:Gen1Environment" }, { type: "azure-native:timeseriesinsights/v20210630preview:Gen2Environment" }, { type: "azure-native:timeseriesinsights:Gen1Environment" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(Gen2Environment.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Gen2Environment = Gen2Environment;
/** @internal */
Gen2Environment.__pulumiType = 'azure-native:timeseriesinsights:Gen2Environment';
//# sourceMappingURL=data:application/json;base64, 