"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.SingleServerVirtualNetworkRule = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A virtual network rule.
 *
 * Uses Azure REST API version 2017-12-01.
 */
class SingleServerVirtualNetworkRule extends pulumi.CustomResource {
    /**
     * Get an existing SingleServerVirtualNetworkRule 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 SingleServerVirtualNetworkRule(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of SingleServerVirtualNetworkRule.  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'] === SingleServerVirtualNetworkRule.__pulumiType;
    }
    /**
     * Create a SingleServerVirtualNetworkRule 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?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.serverName === undefined && !opts.urn) {
                throw new Error("Missing required property 'serverName'");
            }
            if (args?.virtualNetworkSubnetId === undefined && !opts.urn) {
                throw new Error("Missing required property 'virtualNetworkSubnetId'");
            }
            resourceInputs["ignoreMissingVnetServiceEndpoint"] = args?.ignoreMissingVnetServiceEndpoint;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["serverName"] = args?.serverName;
            resourceInputs["virtualNetworkRuleName"] = args?.virtualNetworkRuleName;
            resourceInputs["virtualNetworkSubnetId"] = args?.virtualNetworkSubnetId;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        else {
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["ignoreMissingVnetServiceEndpoint"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
            resourceInputs["virtualNetworkSubnetId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:dbformysql/v20171201:SingleServerVirtualNetworkRule" }, { type: "azure-native:dbformysql/v20171201:VirtualNetworkRule" }, { type: "azure-native:dbformysql/v20171201preview:SingleServerVirtualNetworkRule" }, { type: "azure-native:dbformysql/v20180601privatepreview:SingleServerVirtualNetworkRule" }, { type: "azure-native:dbformysql/v20180601privatepreview:VirtualNetworkRule" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(SingleServerVirtualNetworkRule.__pulumiType, name, resourceInputs, opts);
    }
}
exports.SingleServerVirtualNetworkRule = SingleServerVirtualNetworkRule;
/** @internal */
SingleServerVirtualNetworkRule.__pulumiType = 'azure-native:dbformysql:SingleServerVirtualNetworkRule';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2luZ2xlU2VydmVyVmlydHVhbE5ldHdvcmtSdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vZGJmb3JteXNxbC9zaW5nbGVTZXJ2ZXJWaXJ0dWFsTmV0d29ya1J1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHNFQUFzRTtBQUN0RSxpRkFBaUY7OztBQUVqRix5Q0FBeUM7QUFDekMsMENBQTBDO0FBRTFDOzs7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