"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.StorageBucket = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An association between a Firebase project and a Google Cloud Storage bucket.
 * This association enables integration of Cloud Storage buckets with Firebase such as Firebase SDKS, Authentication, and Security Rules.
 *
 * To get more information about Bucket, see:
 *
 * * [API documentation](https://firebase.google.com/docs/reference/rest/storage/rest/v1beta/projects.buckets)
 * * How-to Guides
 *     * [Official Documentation](https://firebase.google.com/docs/storage/)
 *
 * ## Example Usage
 *
 * ### Firebasestorage Bucket Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = new gcp.storage.Bucket("default", {
 *     name: "test_bucket",
 *     location: "US",
 *     uniformBucketLevelAccess: true,
 * });
 * const defaultStorageBucket = new gcp.firebase.StorageBucket("default", {
 *     project: "my-project-name",
 *     bucketId: _default.name,
 * });
 * ```
 *
 * ## Import
 *
 * Bucket can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/buckets/{{bucket_id}}`
 *
 * * `{{project}}/{{bucket_id}}`
 *
 * * `{{bucket_id}}`
 *
 * When using the `pulumi import` command, Bucket can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:firebase/storageBucket:StorageBucket default projects/{{project}}/buckets/{{bucket_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/storageBucket:StorageBucket default {{project}}/{{bucket_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/storageBucket:StorageBucket default {{bucket_id}}
 * ```
 */
class StorageBucket extends pulumi.CustomResource {
    /**
     * Get an existing StorageBucket 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 StorageBucket(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of StorageBucket.  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'] === StorageBucket.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["bucketId"] = state?.bucketId;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
        }
        else {
            const args = argsOrState;
            resourceInputs["bucketId"] = args?.bucketId;
            resourceInputs["project"] = args?.project;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(StorageBucket.__pulumiType, name, resourceInputs, opts);
    }
}
exports.StorageBucket = StorageBucket;
/** @internal */
StorageBucket.__pulumiType = 'gcp:firebase/storageBucket:StorageBucket';
//# sourceMappingURL=storageBucket.js.map