"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.Gen1Environment = 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. Gen1 environments have 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 Gen1Environment extends pulumi.CustomResource {
    /**
     * Get an existing Gen1Environment 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 Gen1Environment(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Gen1Environment.  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'] === Gen1Environment.__pulumiType;
    }
    /**
     * Create a Gen1Environment 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?.dataRetentionTime === undefined && !opts.urn) {
                throw new Error("Missing required property 'dataRetentionTime'");
            }
            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?.sku === undefined && !opts.urn) {
                throw new Error("Missing required property 'sku'");
            }
            resourceInputs["dataRetentionTime"] = args?.dataRetentionTime;
            resourceInputs["environmentName"] = args?.environmentName;
            resourceInputs["kind"] = "Gen1";
            resourceInputs["location"] = args?.location;
            resourceInputs["partitionKeyProperties"] = args?.partitionKeyProperties;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["sku"] = args?.sku;
            resourceInputs["storageLimitExceededBehavior"] = args?.storageLimitExceededBehavior;
            resourceInputs["tags"] = args?.tags;
            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["dataRetentionTime"] = undefined /*out*/;
            resourceInputs["kind"] = undefined /*out*/;
            resourceInputs["location"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["partitionKeyProperties"] = undefined /*out*/;
            resourceInputs["provisioningState"] = undefined /*out*/;
            resourceInputs["sku"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
            resourceInputs["storageLimitExceededBehavior"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:timeseriesinsights/v20170228preview:Gen1Environment" }, { type: "azure-native:timeseriesinsights/v20171115:Gen1Environment" }, { type: "azure-native:timeseriesinsights/v20180815preview:Gen1Environment" }, { type: "azure-native:timeseriesinsights/v20200515:Gen1Environment" }, { type: "azure-native:timeseriesinsights/v20210331preview:Gen1Environment" }, { type: "azure-native:timeseriesinsights/v20210331preview:Gen2Environment" }, { type: "azure-native:timeseriesinsights/v20210630preview:Gen1Environment" }, { type: "azure-native:timeseriesinsights/v20210630preview:Gen2Environment" }, { type: "azure-native:timeseriesinsights:Gen2Environment" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(Gen1Environment.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Gen1Environment = Gen1Environment;
/** @internal */
Gen1Environment.__pulumiType = 'azure-native:timeseriesinsights:Gen1Environment';
//# sourceMappingURL=data:application/json;base64, 