// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.gcp.firebase;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.gcp.Utilities;
import com.pulumi.gcp.firebase.StorageBucketArgs;
import com.pulumi.gcp.firebase.inputs.StorageBucketState;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * ## Example Usage
 * ### Firebasestorage Bucket Basic
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.storage.Bucket;
 * import com.pulumi.gcp.storage.BucketArgs;
 * import com.pulumi.gcp.firebase.StorageBucket;
 * import com.pulumi.gcp.firebase.StorageBucketArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var defaultBucket = new Bucket(&#34;defaultBucket&#34;, BucketArgs.builder()        
 *             .location(&#34;US&#34;)
 *             .uniformBucketLevelAccess(true)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultStorageBucket = new StorageBucket(&#34;defaultStorageBucket&#34;, StorageBucketArgs.builder()        
 *             .project(&#34;my-project-name&#34;)
 *             .bucketId(defaultBucket.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Bucket can be imported using any of these accepted formats
 * 
 * ```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}}
 * ```
 * 
 */
@ResourceType(type="gcp:firebase/storageBucket:StorageBucket")
public class StorageBucket extends com.pulumi.resources.CustomResource {
    /**
     * Required. Immutable. The ID of the underlying Google Cloud Storage bucket
     * 
     */
    @Export(name="bucketId", type=String.class, parameters={})
    private Output</* @Nullable */ String> bucketId;

    /**
     * @return Required. Immutable. The ID of the underlying Google Cloud Storage bucket
     * 
     */
    public Output<Optional<String>> bucketId() {
        return Codegen.optional(this.bucketId);
    }
    /**
     * Resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
     * 
     */
    @Export(name="name", type=String.class, parameters={})
    private Output<String> name;

    /**
     * @return Resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    @Export(name="project", type=String.class, parameters={})
    private Output<String> project;

    /**
     * @return The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    public Output<String> project() {
        return this.project;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public StorageBucket(String name) {
        this(name, StorageBucketArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public StorageBucket(String name, @Nullable StorageBucketArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public StorageBucket(String name, @Nullable StorageBucketArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:firebase/storageBucket:StorageBucket", name, args == null ? StorageBucketArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private StorageBucket(String name, Output<String> id, @Nullable StorageBucketState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:firebase/storageBucket:StorageBucket", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host 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
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static StorageBucket get(String name, Output<String> id, @Nullable StorageBucketState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new StorageBucket(name, id, state, options);
    }
}
