"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"));
/**
 * This resource provides the File System resource in Oracle Cloud Infrastructure File Storage service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/filestorage/latest/FileSystem
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/
 *
 * Creates a new file system in the specified compartment and
 * availability domain. Instances can mount file systems in
 * another availability domain, but doing so might increase
 * latency when compared to mounting instances in the same
 * availability domain.
 *
 * After you create a file system, you can associate it with a mount
 * target. Instances can then mount the file system by connecting to the
 * mount target's IP address. You can associate a file system with
 * more than one mount target at a time.
 *
 * For information about access control and compartments, see
 * [Overview of the IAM Service](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm).
 *
 * For information about Network Security Groups access control, see
 * [Network Security Groups](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/networksecuritygroups.htm).
 *
 * For information about availability domains, see [Regions and
 * Availability Domains](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/regions.htm).
 * To get a list of availability domains, use the
 * `ListAvailabilityDomains` operation in the Identity and Access
 * Management Service API.
 *
 * All Oracle Cloud Infrastructure resources, including
 * file systems, get an Oracle-assigned, unique ID called an Oracle
 * Cloud Identifier ([OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)).
 * When you create a resource, you can find its OCID in the response.
 * You can also retrieve a resource's OCID by using a List API operation on that resource
 * type or by viewing the resource in the Console.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testFileSystem = new oci.filestorage.FileSystem("test_file_system", {
 *     availabilityDomain: fileSystemAvailabilityDomain,
 *     compartmentId: compartmentId,
 *     areQuotaRulesEnabled: fileSystemAreQuotaRulesEnabled === "true",
 *     cloneAttachStatus: fileSystemCloneAttachStatus,
 *     definedTags: {
 *         "Operations.CostCenter": "42",
 *     },
 *     displayName: fileSystemDisplayName,
 *     filesystemSnapshotPolicyId: testFilesystemSnapshotPolicy.id,
 *     freeformTags: {
 *         Department: "Finance",
 *     },
 *     kmsKeyId: testKey.id,
 *     locks: [{
 *         type: fileSystemLocksType,
 *         message: fileSystemLocksMessage,
 *         relatedResourceId: testResource.id,
 *         timeCreated: fileSystemLocksTimeCreated,
 *     }],
 *     sourceSnapshotId: testSnapshot.id,
 * });
 * ```
 *
 * ## Import
 *
 * FileSystems can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:FileStorage/fileSystem:FileSystem test_file_system "id"
 * ```
 */
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 = 'oci:FileStorage/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["areQuotaRulesEnabled"] = state?.areQuotaRulesEnabled;
            resourceInputs["availabilityDomain"] = state?.availabilityDomain;
            resourceInputs["cloneAttachStatus"] = state?.cloneAttachStatus;
            resourceInputs["cloneCount"] = state?.cloneCount;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["detachCloneTrigger"] = state?.detachCloneTrigger;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["filesystemSnapshotPolicyId"] = state?.filesystemSnapshotPolicyId;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["isCloneParent"] = state?.isCloneParent;
            resourceInputs["isHydrated"] = state?.isHydrated;
            resourceInputs["isLockOverride"] = state?.isLockOverride;
            resourceInputs["isTargetable"] = state?.isTargetable;
            resourceInputs["kmsKeyId"] = state?.kmsKeyId;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["locks"] = state?.locks;
            resourceInputs["meteredBytes"] = state?.meteredBytes;
            resourceInputs["quotaEnforcementState"] = state?.quotaEnforcementState;
            resourceInputs["replicationSourceCount"] = state?.replicationSourceCount;
            resourceInputs["replicationTargetId"] = state?.replicationTargetId;
            resourceInputs["sourceDetails"] = state?.sourceDetails;
            resourceInputs["sourceSnapshotId"] = state?.sourceSnapshotId;
            resourceInputs["state"] = state?.state;
            resourceInputs["systemTags"] = state?.systemTags;
            resourceInputs["timeCreated"] = state?.timeCreated;
        }
        else {
            const args = argsOrState;
            if (args?.availabilityDomain === undefined && !opts.urn) {
                throw new Error("Missing required property 'availabilityDomain'");
            }
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            resourceInputs["areQuotaRulesEnabled"] = args?.areQuotaRulesEnabled;
            resourceInputs["availabilityDomain"] = args?.availabilityDomain;
            resourceInputs["cloneAttachStatus"] = args?.cloneAttachStatus;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["detachCloneTrigger"] = args?.detachCloneTrigger;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["filesystemSnapshotPolicyId"] = args?.filesystemSnapshotPolicyId;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["isLockOverride"] = args?.isLockOverride;
            resourceInputs["kmsKeyId"] = args?.kmsKeyId;
            resourceInputs["locks"] = args?.locks;
            resourceInputs["sourceSnapshotId"] = args?.sourceSnapshotId;
            resourceInputs["cloneCount"] = undefined /*out*/;
            resourceInputs["isCloneParent"] = undefined /*out*/;
            resourceInputs["isHydrated"] = undefined /*out*/;
            resourceInputs["isTargetable"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["meteredBytes"] = undefined /*out*/;
            resourceInputs["quotaEnforcementState"] = undefined /*out*/;
            resourceInputs["replicationSourceCount"] = undefined /*out*/;
            resourceInputs["replicationTargetId"] = undefined /*out*/;
            resourceInputs["sourceDetails"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["systemTags"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(FileSystem.__pulumiType, name, resourceInputs, opts);
    }
}
exports.FileSystem = FileSystem;
//# sourceMappingURL=fileSystem.js.map