"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.FileSystem = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages an Azure Native Qumulo Scalable File System.
 *
 * ## 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: "example-vnet",
 *     addressSpaces: ["10.0.0.0/16"],
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const exampleSubnet = new azure.network.Subnet("example", {
 *     name: "example-subnet",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.1.0/24"],
 *     delegations: [{
 *         name: "delegation",
 *         serviceDelegation: {
 *             actions: ["Microsoft.Network/virtualNetworks/subnets/join/action"],
 *             name: "Qumulo.Storage/fileSystems",
 *         },
 *     }],
 * });
 * const exampleFileSystem = new azure.qumulo.FileSystem("example", {
 *     name: "example",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     adminPassword: ")^X#ZX#JRyIY}t9",
 *     availabilityZone: "1",
 *     delegatedSubnetId: exampleSubnet.id,
 *     storageSku: "Standard",
 *     email: "test@test.com",
 *     tags: {
 *         environment: "test",
 *     },
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Qumulo.Storage` - 2024-06-19
 *
 * ## Import
 *
 * An existing File System can be imported into Pulumi using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:qumulo/fileSystem:FileSystem example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Qumulo.Storage/fileSystems/example
 * ```
 */
class FileSystem extends pulumi.CustomResource {
    /**
     * Get an existing FileSystem 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 FileSystem(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:qumulo/fileSystem:FileSystem';
    /**
     * Returns true if the given object is an instance of FileSystem.  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'] === FileSystem.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["adminPassword"] = state?.adminPassword;
            resourceInputs["email"] = state?.email;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["offerId"] = state?.offerId;
            resourceInputs["planId"] = state?.planId;
            resourceInputs["publisherId"] = state?.publisherId;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["storageSku"] = state?.storageSku;
            resourceInputs["subnetId"] = state?.subnetId;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["zone"] = state?.zone;
        }
        else {
            const args = argsOrState;
            if (args?.adminPassword === undefined && !opts.urn) {
                throw new Error("Missing required property 'adminPassword'");
            }
            if (args?.email === undefined && !opts.urn) {
                throw new Error("Missing required property 'email'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.storageSku === undefined && !opts.urn) {
                throw new Error("Missing required property 'storageSku'");
            }
            if (args?.subnetId === undefined && !opts.urn) {
                throw new Error("Missing required property 'subnetId'");
            }
            if (args?.zone === undefined && !opts.urn) {
                throw new Error("Missing required property 'zone'");
            }
            resourceInputs["adminPassword"] = args?.adminPassword ? pulumi.secret(args.adminPassword) : undefined;
            resourceInputs["email"] = args?.email;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["offerId"] = args?.offerId;
            resourceInputs["planId"] = args?.planId;
            resourceInputs["publisherId"] = args?.publisherId;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["storageSku"] = args?.storageSku;
            resourceInputs["subnetId"] = args?.subnetId;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["zone"] = args?.zone;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["adminPassword"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(FileSystem.__pulumiType, name, resourceInputs, opts);
    }
}
exports.FileSystem = FileSystem;
//# sourceMappingURL=fileSystem.js.map