"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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Cache = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a HPC Cache.
 *
 * !> **Note:** The `azure.hpc.Cache` resource has been deprecated because the service is retiring on 2025-09-30. This resource will be removed in v5.0 of the AzureRM Provider. See https://aka.ms/hpccacheretirement for more information.
 *
 * > **Note:** By request of the service team the provider no longer automatically registers the `Microsoft.StorageCache` Resource Provider for this resource. To register it you can run `az provider register --namespace 'Microsoft.StorageCache'`.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
 *     name: "examplevn",
 *     addressSpaces: ["10.0.0.0/16"],
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const exampleSubnet = new azure.network.Subnet("example", {
 *     name: "examplesubnet",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.1.0/24"],
 * });
 * const exampleCache = new azure.hpc.Cache("example", {
 *     name: "examplehpccache",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     cacheSizeInGb: 3072,
 *     subnetId: exampleSubnet.id,
 *     skuName: "Standard_2G",
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.StorageCache` - 2023-05-01
 *
 * ## Import
 *
 * HPC Caches can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:hpc/cache:Cache example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.StorageCache/caches/cacheName
 * ```
 */
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 state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, state, opts) {
        return new Cache(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:hpc/cache:Cache';
    /**
     * 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;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["automaticallyRotateKeyToLatestEnabled"] = state?.automaticallyRotateKeyToLatestEnabled;
            resourceInputs["cacheSizeInGb"] = state?.cacheSizeInGb;
            resourceInputs["defaultAccessPolicy"] = state?.defaultAccessPolicy;
            resourceInputs["directoryActiveDirectory"] = state?.directoryActiveDirectory;
            resourceInputs["directoryFlatFile"] = state?.directoryFlatFile;
            resourceInputs["directoryLdap"] = state?.directoryLdap;
            resourceInputs["dns"] = state?.dns;
            resourceInputs["identity"] = state?.identity;
            resourceInputs["keyVaultKeyId"] = state?.keyVaultKeyId;
            resourceInputs["location"] = state?.location;
            resourceInputs["mountAddresses"] = state?.mountAddresses;
            resourceInputs["mtu"] = state?.mtu;
            resourceInputs["name"] = state?.name;
            resourceInputs["ntpServer"] = state?.ntpServer;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["skuName"] = state?.skuName;
            resourceInputs["subnetId"] = state?.subnetId;
            resourceInputs["tags"] = state?.tags;
        }
        else {
            const args = argsOrState;
            if (args?.cacheSizeInGb === undefined && !opts.urn) {
                throw new Error("Missing required property 'cacheSizeInGb'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.skuName === undefined && !opts.urn) {
                throw new Error("Missing required property 'skuName'");
            }
            if (args?.subnetId === undefined && !opts.urn) {
                throw new Error("Missing required property 'subnetId'");
            }
            resourceInputs["automaticallyRotateKeyToLatestEnabled"] = args?.automaticallyRotateKeyToLatestEnabled;
            resourceInputs["cacheSizeInGb"] = args?.cacheSizeInGb;
            resourceInputs["defaultAccessPolicy"] = args?.defaultAccessPolicy;
            resourceInputs["directoryActiveDirectory"] = args?.directoryActiveDirectory;
            resourceInputs["directoryFlatFile"] = args?.directoryFlatFile;
            resourceInputs["directoryLdap"] = args?.directoryLdap;
            resourceInputs["dns"] = args?.dns;
            resourceInputs["identity"] = args?.identity;
            resourceInputs["keyVaultKeyId"] = args?.keyVaultKeyId;
            resourceInputs["location"] = args?.location;
            resourceInputs["mtu"] = args?.mtu;
            resourceInputs["name"] = args?.name;
            resourceInputs["ntpServer"] = args?.ntpServer;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["skuName"] = args?.skuName;
            resourceInputs["subnetId"] = args?.subnetId;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["mountAddresses"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Cache.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Cache = Cache;
//# sourceMappingURL=cache.js.map