"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.WebTest = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An Application Insights WebTest definition.
 *
 * Uses Azure REST API version 2022-06-15.
 *
 * Other available API versions: 2015-05-01, 2018-05-01-preview, 2020-10-05-preview. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native applicationinsights [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
 */
class WebTest extends pulumi.CustomResource {
    /**
     * Get an existing WebTest 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 WebTest(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of WebTest.  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'] === WebTest.__pulumiType;
    }
    /**
     * Create a WebTest 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) {
        var _a, _b, _c, _d;
        let resourceInputs = {};
        opts = opts || {};
        if (!opts.id) {
            if ((!args || args.locations === undefined) && !opts.urn) {
                throw new Error("Missing required property 'locations'");
            }
            if ((!args || args.resourceGroupName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if ((!args || args.syntheticMonitorId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'syntheticMonitorId'");
            }
            if ((!args || args.webTestKind === undefined) && !opts.urn) {
                throw new Error("Missing required property 'webTestKind'");
            }
            resourceInputs["configuration"] = args ? args.configuration : undefined;
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["enabled"] = args ? args.enabled : undefined;
            resourceInputs["frequency"] = (_a = (args ? args.frequency : undefined)) !== null && _a !== void 0 ? _a : 300;
            resourceInputs["kind"] = (_b = (args ? args.kind : undefined)) !== null && _b !== void 0 ? _b : "ping";
            resourceInputs["location"] = args ? args.location : undefined;
            resourceInputs["locations"] = args ? args.locations : undefined;
            resourceInputs["request"] = args ? args.request : undefined;
            resourceInputs["resourceGroupName"] = args ? args.resourceGroupName : undefined;
            resourceInputs["retryEnabled"] = args ? args.retryEnabled : undefined;
            resourceInputs["syntheticMonitorId"] = args ? args.syntheticMonitorId : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["timeout"] = (_c = (args ? args.timeout : undefined)) !== null && _c !== void 0 ? _c : 30;
            resourceInputs["validationRules"] = args ? args.validationRules : undefined;
            resourceInputs["webTestKind"] = (_d = (args ? args.webTestKind : undefined)) !== null && _d !== void 0 ? _d : "ping";
            resourceInputs["webTestName"] = args ? args.webTestName : undefined;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["provisioningState"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        else {
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["configuration"] = undefined /*out*/;
            resourceInputs["description"] = undefined /*out*/;
            resourceInputs["enabled"] = undefined /*out*/;
            resourceInputs["frequency"] = undefined /*out*/;
            resourceInputs["kind"] = undefined /*out*/;
            resourceInputs["location"] = undefined /*out*/;
            resourceInputs["locations"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["provisioningState"] = undefined /*out*/;
            resourceInputs["request"] = undefined /*out*/;
            resourceInputs["retryEnabled"] = undefined /*out*/;
            resourceInputs["syntheticMonitorId"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
            resourceInputs["timeout"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
            resourceInputs["validationRules"] = undefined /*out*/;
            resourceInputs["webTestKind"] = undefined /*out*/;
            resourceInputs["webTestName"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:applicationinsights/v20150501:WebTest" }, { type: "azure-native:applicationinsights/v20180501preview:WebTest" }, { type: "azure-native:applicationinsights/v20201005preview:WebTest" }, { type: "azure-native:applicationinsights/v20220615:WebTest" }, { type: "azure-native:insights/v20201005preview:WebTest" }, { type: "azure-native:insights/v20220615:WebTest" }, { type: "azure-native:insights:WebTest" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(WebTest.__pulumiType, name, resourceInputs, opts);
    }
}
exports.WebTest = WebTest;
/** @internal */
WebTest.__pulumiType = 'azure-native:applicationinsights:WebTest';
//# sourceMappingURL=data:application/json;base64, 