"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.Cache = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Cache details.
 *
 * Uses Azure REST API version 2022-09-01-preview. In version 2.x of the Azure Native provider, it used API version 2022-08-01.
 *
 * Other available API versions: 2021-04-01-preview, 2021-08-01, 2021-12-01-preview, 2022-04-01-preview, 2022-08-01, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01, 2024-06-01-preview, 2024-10-01-preview. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native apimanagement [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
 */
class Cache extends pulumi.CustomResource {
    /**
     * Get an existing Cache 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 Cache(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Cache.  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'] === Cache.__pulumiType;
    }
    /**
     * Create a Cache 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?.connectionString === undefined && !opts.urn) {
                throw new Error("Missing required property 'connectionString'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.serviceName === undefined && !opts.urn) {
                throw new Error("Missing required property 'serviceName'");
            }
            if (args?.useFromLocation === undefined && !opts.urn) {
                throw new Error("Missing required property 'useFromLocation'");
            }
            resourceInputs["cacheId"] = args?.cacheId;
            resourceInputs["connectionString"] = args?.connectionString;
            resourceInputs["description"] = args?.description;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["resourceId"] = args?.resourceId;
            resourceInputs["serviceName"] = args?.serviceName;
            resourceInputs["useFromLocation"] = args?.useFromLocation;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        else {
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["connectionString"] = undefined /*out*/;
            resourceInputs["description"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["resourceId"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
            resourceInputs["useFromLocation"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:apimanagement/v20180601preview:Cache" }, { type: "azure-native:apimanagement/v20190101:Cache" }, { type: "azure-native:apimanagement/v20191201:Cache" }, { type: "azure-native:apimanagement/v20191201preview:Cache" }, { type: "azure-native:apimanagement/v20200601preview:Cache" }, { type: "azure-native:apimanagement/v20201201:Cache" }, { type: "azure-native:apimanagement/v20210101preview:Cache" }, { type: "azure-native:apimanagement/v20210401preview:Cache" }, { type: "azure-native:apimanagement/v20210801:Cache" }, { type: "azure-native:apimanagement/v20211201preview:Cache" }, { type: "azure-native:apimanagement/v20220401preview:Cache" }, { type: "azure-native:apimanagement/v20220801:Cache" }, { type: "azure-native:apimanagement/v20220901preview:Cache" }, { type: "azure-native:apimanagement/v20230301preview:Cache" }, { type: "azure-native:apimanagement/v20230501preview:Cache" }, { type: "azure-native:apimanagement/v20230901preview:Cache" }, { type: "azure-native:apimanagement/v20240501:Cache" }, { type: "azure-native:apimanagement/v20240601preview:Cache" }, { type: "azure-native:apimanagement/v20241001preview:Cache" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(Cache.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Cache = Cache;
/** @internal */
Cache.__pulumiType = 'azure-native:apimanagement:Cache';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9hcGltYW5hZ2VtZW50L2NhY2hlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxzRUFBc0U7QUFDdEUsaUZBQWlGOzs7QUFFakYseUNBQXlDO0FBQ3pDLDBDQUEwQztBQUUxQzs7Ozs7O0dBTUc7QUFDSCxNQUFhLEtBQU0sU0FBUSxNQUFNLENBQUMsY0FBYztJQUM1Qzs7Ozs7OztPQU9HO0lBQ0ksTUFBTSxDQUFDLEdBQUcsQ0FBQyxJQUFZLEVBQUUsRUFBMkIsRUFBRSxJQUFtQztRQUM1RixPQUFPLElBQUksS0FBSyxDQUFDLElBQUksRUFBRSxTQUFnQixFQUFFLEVBQUUsR0FBRyxJQUFJLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxDQUFDLENBQUM7SUFDbEUsQ0FBQztJQUtEOzs7T0FHRztJQUNJLE1BQU0sQ0FBQyxVQUFVLENBQUMsR0FBUTtRQUM3QixJQUFJLEdBQUcsS0FBSyxTQUFTLElBQUksR0FBRyxLQUFLLElBQUksRUFBRTtZQUNuQyxPQUFPLEtBQUssQ0FBQztTQUNoQjtRQUNELE9BQU8sR0FBRyxDQUFDLGNBQWMsQ0FBQyxLQUFLLEtBQUssQ0FBQyxZQUFZLENBQUM7SUFDdEQsQ0FBQztJQStCRDs7Ozs7O09BTUc7SUFDSCxZQUFZLElBQVksRUFBRSxJQUFlLEVBQUUsSUFBbUM7UUFDMUUsSUFBSSxjQUFjLEdBQWtCLEVBQUUsQ0FBQztRQUN2QyxJQUFJLEdB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