"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.IcebergCatalog = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * IcebergCatalogs are top-level containers for Apache Iceberg REST Catalog served Namespaces and Tables.
 *
 * To get more information about IcebergCatalog, see:
 * * How-to Guides
 *     * [Use the BigLake metastore Iceberg REST catalog](https://docs.cloud.google.com/biglake/docs/blms-rest-catalog)
 *
 * > **Warning:** If you are using User ADCs (Application Default Credentials) with this resource's IAM,
 * you must specify a `billingProject` and set `userProjectOverride` to true
 * in the provider configuration. Otherwise the IAM API will return 403s.
 * Your account must have the `serviceusage.services.use` permission on the
 * `billingProject` you defined.
 *
 * ## Example Usage
 *
 * ### Biglake Iceberg Catalog
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const bucketForMyIcebergCatalog = new gcp.storage.Bucket("bucket_for_my_iceberg_catalog", {
 *     name: "my_iceberg_catalog",
 *     location: "us-central1",
 *     forceDestroy: true,
 *     uniformBucketLevelAccess: true,
 * });
 * const myIcebergCatalog = new gcp.biglake.IcebergCatalog("my_iceberg_catalog", {
 *     name: "my_iceberg_catalog",
 *     catalogType: "CATALOG_TYPE_GCS_BUCKET",
 * }, {
 *     dependsOn: [bucketForMyIcebergCatalog],
 * });
 * ```
 *
 * ## Import
 *
 * IcebergCatalog can be imported using any of these accepted formats:
 *
 * * `iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}`
 *
 * * `{{project}}/{{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, IcebergCatalog can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:biglake/icebergCatalog:IcebergCatalog default iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:biglake/icebergCatalog:IcebergCatalog default {{project}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:biglake/icebergCatalog:IcebergCatalog default {{name}}
 * ```
 */
class IcebergCatalog extends pulumi.CustomResource {
    /**
     * Get an existing IcebergCatalog 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 IcebergCatalog(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of IcebergCatalog.  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'] === IcebergCatalog.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["biglakeServiceAccount"] = state?.biglakeServiceAccount;
            resourceInputs["catalogType"] = state?.catalogType;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["credentialMode"] = state?.credentialMode;
            resourceInputs["defaultLocation"] = state?.defaultLocation;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["replicas"] = state?.replicas;
            resourceInputs["storageRegions"] = state?.storageRegions;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.catalogType === undefined && !opts.urn) {
                throw new Error("Missing required property 'catalogType'");
            }
            resourceInputs["catalogType"] = args?.catalogType;
            resourceInputs["credentialMode"] = args?.credentialMode;
            resourceInputs["name"] = args?.name;
            resourceInputs["project"] = args?.project;
            resourceInputs["biglakeServiceAccount"] = undefined /*out*/;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["defaultLocation"] = undefined /*out*/;
            resourceInputs["replicas"] = undefined /*out*/;
            resourceInputs["storageRegions"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(IcebergCatalog.__pulumiType, name, resourceInputs, opts);
    }
}
exports.IcebergCatalog = IcebergCatalog;
/** @internal */
IcebergCatalog.__pulumiType = 'gcp:biglake/icebergCatalog:IcebergCatalog';
//# sourceMappingURL=icebergCatalog.js.map