"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.NamespaceVirtualNetworkRule = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Single item in a List or Get VirtualNetworkRules operation
 *
 * Uses Azure REST API version 2018-01-01-preview. In version 2.x of the Azure Native provider, it used API version 2018-01-01-preview.
 */
class NamespaceVirtualNetworkRule extends pulumi.CustomResource {
    /**
     * Get an existing NamespaceVirtualNetworkRule 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 NamespaceVirtualNetworkRule(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of NamespaceVirtualNetworkRule.  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'] === NamespaceVirtualNetworkRule.__pulumiType;
    }
    /**
     * Create a NamespaceVirtualNetworkRule 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?.namespaceName === undefined && !opts.urn) {
                throw new Error("Missing required property 'namespaceName'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            resourceInputs["namespaceName"] = args?.namespaceName;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["virtualNetworkRuleName"] = args?.virtualNetworkRuleName;
            resourceInputs["virtualNetworkSubnetId"] = args?.virtualNetworkSubnetId;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        else {
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
            resourceInputs["virtualNetworkSubnetId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:eventhub/v20180101preview:NamespaceVirtualNetworkRule" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(NamespaceVirtualNetworkRule.__pulumiType, name, resourceInputs, opts);
    }
}
exports.NamespaceVirtualNetworkRule = NamespaceVirtualNetworkRule;
/** @internal */
NamespaceVirtualNetworkRule.__pulumiType = 'azure-native:eventhub:NamespaceVirtualNetworkRule';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmFtZXNwYWNlVmlydHVhbE5ldHdvcmtSdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vZXZlbnRodWIvbmFtZXNwYWNlVmlydHVhbE5ldHdvcmtSdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxzRUFBc0U7QUFDdEUsaUZBQWlGOzs7QUFFakYseUNBQXlDO0FBQ3pDLDBDQUEwQztBQUUxQzs7OztHQUlHO0FBQ0gsTUFBYSwyQkFBNEIsU0FBUSxNQUFNLENBQUMsY0FBYztJQUNsRTs7Ozs7OztPQU9HO0lBQ0ksTUFBTSxDQUFDLEdBQUcsQ0FBQyxJQUFZLEVBQUUsRUFBMkIsRUFBRSxJQUFtQztRQUM1RixPQUFPLElBQUksMkJBQTJCLENBQUMsSUFBSSxFQUFFLFNBQWdCLEVBQUUsRUFBRSxHQUFHLElBQUksRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLENBQUMsQ0FBQztJQUN4RixDQUFDO0lBS0Q7OztPQUdHO0lBQ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