"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.StoragePool = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * ## Example Usage
 *
 * ### Storage Pool Create Doc
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * // Create a network or use datasource to reference existing network
 * const peeringNetwork = new gcp.compute.Network("peering_network", {name: "test-network"});
 * // Reserve a CIDR for NetApp Volumes to use
 * // When using shared-VPCs, this resource needs to be created in host project
 * const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", {
 *     name: "test-address",
 *     purpose: "VPC_PEERING",
 *     addressType: "INTERNAL",
 *     prefixLength: 16,
 *     network: peeringNetwork.id,
 * });
 * // Create a Private Service Access connection
 * // When using shared-VPCs, this resource needs to be created in host project
 * const _default = new gcp.servicenetworking.Connection("default", {
 *     network: peeringNetwork.id,
 *     service: "netapp.servicenetworking.goog",
 *     reservedPeeringRanges: [privateIpAlloc.name],
 * });
 * // Modify the PSA Connection to allow import/export of custom routes
 * // When using shared-VPCs, this resource needs to be created in host project
 * const routeUpdates = new gcp.compute.NetworkPeeringRoutesConfig("route_updates", {
 *     peering: _default.peering,
 *     network: peeringNetwork.name,
 *     importCustomRoutes: true,
 *     exportCustomRoutes: true,
 * });
 * // Create a storage pool
 * // Create this resource in the project which is expected to own the volumes
 * const testPool = new gcp.netapp.StoragePool("test_pool", {
 *     name: "test-pool",
 *     location: "us-central1",
 *     serviceLevel: "PREMIUM",
 *     capacityGib: "2048",
 *     network: peeringNetwork.id,
 * });
 * ```
 *
 * ## Import
 *
 * StoragePool can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/storagePools/{{name}}`
 *
 * * `{{project}}/{{location}}/{{name}}`
 *
 * * `{{location}}/{{name}}`
 *
 * When using the `pulumi import` command, StoragePool can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:netapp/storagePool:StoragePool default projects/{{project}}/locations/{{location}}/storagePools/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:netapp/storagePool:StoragePool default {{project}}/{{location}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:netapp/storagePool:StoragePool default {{location}}/{{name}}
 * ```
 */
class StoragePool extends pulumi.CustomResource {
    /**
     * Get an existing StoragePool 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 StoragePool(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of StoragePool.  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'] === StoragePool.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["activeDirectory"] = state?.activeDirectory;
            resourceInputs["allowAutoTiering"] = state?.allowAutoTiering;
            resourceInputs["availableThroughputMibps"] = state?.availableThroughputMibps;
            resourceInputs["capacityGib"] = state?.capacityGib;
            resourceInputs["coldTierSizeUsedGib"] = state?.coldTierSizeUsedGib;
            resourceInputs["customPerformanceEnabled"] = state?.customPerformanceEnabled;
            resourceInputs["description"] = state?.description;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["enableHotTierAutoResize"] = state?.enableHotTierAutoResize;
            resourceInputs["encryptionType"] = state?.encryptionType;
            resourceInputs["hotTierSizeGib"] = state?.hotTierSizeGib;
            resourceInputs["hotTierSizeUsedGib"] = state?.hotTierSizeUsedGib;
            resourceInputs["kmsConfig"] = state?.kmsConfig;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["ldapEnabled"] = state?.ldapEnabled;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["network"] = state?.network;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["qosType"] = state?.qosType;
            resourceInputs["replicaZone"] = state?.replicaZone;
            resourceInputs["serviceLevel"] = state?.serviceLevel;
            resourceInputs["totalIops"] = state?.totalIops;
            resourceInputs["totalThroughputMibps"] = state?.totalThroughputMibps;
            resourceInputs["volumeCapacityGib"] = state?.volumeCapacityGib;
            resourceInputs["volumeCount"] = state?.volumeCount;
            resourceInputs["zone"] = state?.zone;
        }
        else {
            const args = argsOrState;
            if (args?.capacityGib === undefined && !opts.urn) {
                throw new Error("Missing required property 'capacityGib'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.network === undefined && !opts.urn) {
                throw new Error("Missing required property 'network'");
            }
            if (args?.serviceLevel === undefined && !opts.urn) {
                throw new Error("Missing required property 'serviceLevel'");
            }
            resourceInputs["activeDirectory"] = args?.activeDirectory;
            resourceInputs["allowAutoTiering"] = args?.allowAutoTiering;
            resourceInputs["capacityGib"] = args?.capacityGib;
            resourceInputs["customPerformanceEnabled"] = args?.customPerformanceEnabled;
            resourceInputs["description"] = args?.description;
            resourceInputs["enableHotTierAutoResize"] = args?.enableHotTierAutoResize;
            resourceInputs["hotTierSizeGib"] = args?.hotTierSizeGib;
            resourceInputs["kmsConfig"] = args?.kmsConfig;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["ldapEnabled"] = args?.ldapEnabled;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["network"] = args?.network;
            resourceInputs["project"] = args?.project;
            resourceInputs["qosType"] = args?.qosType;
            resourceInputs["replicaZone"] = args?.replicaZone;
            resourceInputs["serviceLevel"] = args?.serviceLevel;
            resourceInputs["totalIops"] = args?.totalIops;
            resourceInputs["totalThroughputMibps"] = args?.totalThroughputMibps;
            resourceInputs["zone"] = args?.zone;
            resourceInputs["availableThroughputMibps"] = undefined /*out*/;
            resourceInputs["coldTierSizeUsedGib"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["encryptionType"] = undefined /*out*/;
            resourceInputs["hotTierSizeUsedGib"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["volumeCapacityGib"] = undefined /*out*/;
            resourceInputs["volumeCount"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(StoragePool.__pulumiType, name, resourceInputs, opts);
    }
}
exports.StoragePool = StoragePool;
/** @internal */
StoragePool.__pulumiType = 'gcp:netapp/storagePool:StoragePool';
//# sourceMappingURL=storagePool.js.map