"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.RedisFirewallRule = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted to connect
 *
 * Uses Azure REST API version 2016-04-01.
 */
class RedisFirewallRule extends pulumi.CustomResource {
    /**
     * Get an existing RedisFirewallRule 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 RedisFirewallRule(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of RedisFirewallRule.  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'] === RedisFirewallRule.__pulumiType;
    }
    /**
     * Create a RedisFirewallRule 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?.cacheName === undefined && !opts.urn) {
                throw new Error("Missing required property 'cacheName'");
            }
            if (args?.endIP === undefined && !opts.urn) {
                throw new Error("Missing required property 'endIP'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.startIP === undefined && !opts.urn) {
                throw new Error("Missing required property 'startIP'");
            }
            resourceInputs["cacheName"] = args?.cacheName;
            resourceInputs["endIP"] = args?.endIP;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["ruleName"] = args?.ruleName;
            resourceInputs["startIP"] = args?.startIP;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        else {
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["endIP"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["startIP"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:cache/v20230401:FirewallRule" }, { type: "azure-native:cache/v20230501preview:FirewallRule" }, { type: "azure-native:cache/v20230801:FirewallRule" }, { type: "azure-native:cache/v20240301:FirewallRule" }, { type: "azure-native:cache/v20240401preview:FirewallRule" }, { type: "azure-native:cache/v20241101:FirewallRule" }, { type: "azure-native:cache:FirewallRule" }, { type: "azure-native:redis/v20160401:RedisFirewallRule" }, { type: "azure-native:redis/v20170201:RedisFirewallRule" }, { type: "azure-native:redis/v20171001:RedisFirewallRule" }, { type: "azure-native:redis/v20180301:RedisFirewallRule" }, { type: "azure-native:redis/v20190701:RedisFirewallRule" }, { type: "azure-native:redis/v20200601:RedisFirewallRule" }, { type: "azure-native:redis/v20201201:RedisFirewallRule" }, { type: "azure-native:redis/v20210601:RedisFirewallRule" }, { type: "azure-native:redis/v20220501:RedisFirewallRule" }, { type: "azure-native:redis/v20220601:RedisFirewallRule" }, { type: "azure-native:redis/v20230401:RedisFirewallRule" }, { type: "azure-native:redis/v20230501preview:RedisFirewallRule" }, { type: "azure-native:redis/v20230801:RedisFirewallRule" }, { type: "azure-native:redis/v20240301:RedisFirewallRule" }, { type: "azure-native:redis/v20240401preview:RedisFirewallRule" }, { type: "azure-native:redis/v20241101:RedisFirewallRule" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(RedisFirewallRule.__pulumiType, name, resourceInputs, opts);
    }
}
exports.RedisFirewallRule = RedisFirewallRule;
/** @internal */
RedisFirewallRule.__pulumiType = 'azure-native:redis:Redis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