"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, Object.assign(Object.assign({}, 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 || args.cacheName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'cacheName'");
            }
            if ((!args || args.endIP === undefined) && !opts.urn) {
                throw new Error("Missing required property 'endIP'");
            }
            if ((!args || args.resourceGroupName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if ((!args || args.startIP === undefined) && !opts.urn) {
                throw new Error("Missing required property 'startIP'");
            }
            resourceInputs["cacheName"] = args ? args.cacheName : undefined;
            resourceInputs["endIP"] = args ? args.endIP : undefined;
            resourceInputs["resourceGroupName"] = args ? args.resourceGroupName : undefined;
            resourceInputs["ruleName"] = args ? args.ruleName : undefined;
            resourceInputs["startIP"] = args ? args.startIP : undefined;
            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:RedisFirewallRule';
//# sourceMappingURL=data:application/json;base64, 