// *** 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.logging;

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.logging.LinkedDatasetArgs;
import com.pulumi.gcp.logging.inputs.LinkedDatasetState;
import com.pulumi.gcp.logging.outputs.LinkedDatasetBigqueryDataset;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Describes a BigQuery linked dataset
 * 
 * To get more information about LinkedDataset, see:
 * 
 * * [API documentation](https://cloud.google.com/logging/docs/reference/v2/rest/v2/locations.buckets.links)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/logging/docs/apis)
 * 
 * ## Example Usage
 * ### Logging Linked Dataset Basic
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.logging.ProjectBucketConfig;
 * import com.pulumi.gcp.logging.ProjectBucketConfigArgs;
 * import com.pulumi.gcp.logging.LinkedDataset;
 * import com.pulumi.gcp.logging.LinkedDatasetArgs;
 * 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 loggingLinkedDatasetProjectBucketConfig = new ProjectBucketConfig(&#34;loggingLinkedDatasetProjectBucketConfig&#34;, ProjectBucketConfigArgs.builder()        
 *             .location(&#34;global&#34;)
 *             .project(&#34;my-project-name&#34;)
 *             .enableAnalytics(true)
 *             .bucketId(&#34;my-bucket&#34;)
 *             .build());
 * 
 *         var loggingLinkedDatasetLinkedDataset = new LinkedDataset(&#34;loggingLinkedDatasetLinkedDataset&#34;, LinkedDatasetArgs.builder()        
 *             .linkId(&#34;mylink&#34;)
 *             .bucket(loggingLinkedDatasetProjectBucketConfig.id())
 *             .description(&#34;Linked dataset test&#34;)
 *             .build());
 * 
 *     }
 * }
 * ```
 * ### Logging Linked Dataset All Params
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.logging.ProjectBucketConfig;
 * import com.pulumi.gcp.logging.ProjectBucketConfigArgs;
 * import com.pulumi.gcp.logging.LinkedDataset;
 * import com.pulumi.gcp.logging.LinkedDatasetArgs;
 * 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 loggingLinkedDatasetProjectBucketConfig = new ProjectBucketConfig(&#34;loggingLinkedDatasetProjectBucketConfig&#34;, ProjectBucketConfigArgs.builder()        
 *             .bucketId(&#34;my-bucket&#34;)
 *             .enableAnalytics(true)
 *             .location(&#34;global&#34;)
 *             .project(&#34;my-project-name&#34;)
 *             .build());
 * 
 *         var loggingLinkedDatasetLinkedDataset = new LinkedDataset(&#34;loggingLinkedDatasetLinkedDataset&#34;, LinkedDatasetArgs.builder()        
 *             .bucket(&#34;my-bucket&#34;)
 *             .description(&#34;Linked dataset test&#34;)
 *             .linkId(&#34;mylink&#34;)
 *             .location(&#34;global&#34;)
 *             .parent(&#34;projects/my-project-name&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(&#34;google_logging_project_bucket_config.logging_linked_dataset&#34;)
 *                 .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * LinkedDataset can be imported using any of these accepted formats
 * 
 * ```sh
 *  $ pulumi import gcp:logging/linkedDataset:LinkedDataset default {{parent}}/locations/{{location}}/buckets/{{bucket}}/links/{{link_id}}
 * ```
 * 
 */
@ResourceType(type="gcp:logging/linkedDataset:LinkedDataset")
public class LinkedDataset extends com.pulumi.resources.CustomResource {
    /**
     * The information of a BigQuery Dataset. When a link is created, a BigQuery dataset is created along
     * with it, in the same project as the LogBucket it&#39;s linked to. This dataset will also have BigQuery
     * Views corresponding to the LogViews in the bucket.
     * Structure is documented below.
     * 
     */
    @Export(name="bigqueryDatasets", type=List.class, parameters={LinkedDatasetBigqueryDataset.class})
    private Output<List<LinkedDatasetBigqueryDataset>> bigqueryDatasets;

    /**
     * @return The information of a BigQuery Dataset. When a link is created, a BigQuery dataset is created along
     * with it, in the same project as the LogBucket it&#39;s linked to. This dataset will also have BigQuery
     * Views corresponding to the LogViews in the bucket.
     * Structure is documented below.
     * 
     */
    public Output<List<LinkedDatasetBigqueryDataset>> bigqueryDatasets() {
        return this.bigqueryDatasets;
    }
    /**
     * The bucket to which the linked dataset is attached.
     * 
     * ***
     * 
     */
    @Export(name="bucket", type=String.class, parameters={})
    private Output<String> bucket;

    /**
     * @return The bucket to which the linked dataset is attached.
     * 
     * ***
     * 
     */
    public Output<String> bucket() {
        return this.bucket;
    }
    /**
     * Output only. The creation timestamp of the link. A timestamp in RFC3339 UTC &#34;Zulu&#34; format,
     * with nanosecond resolution and up to nine fractional digits. Examples: &#34;2014-10-02T15:01:23Z&#34;
     * and &#34;2014-10-02T15:01:23.045123456Z&#34;.
     * 
     */
    @Export(name="createTime", type=String.class, parameters={})
    private Output<String> createTime;

    /**
     * @return Output only. The creation timestamp of the link. A timestamp in RFC3339 UTC &#34;Zulu&#34; format,
     * with nanosecond resolution and up to nine fractional digits. Examples: &#34;2014-10-02T15:01:23Z&#34;
     * and &#34;2014-10-02T15:01:23.045123456Z&#34;.
     * 
     */
    public Output<String> createTime() {
        return this.createTime;
    }
    /**
     * Describes this link. The maximum length of the description is 8000 characters.
     * 
     */
    @Export(name="description", type=String.class, parameters={})
    private Output</* @Nullable */ String> description;

    /**
     * @return Describes this link. The maximum length of the description is 8000 characters.
     * 
     */
    public Output<Optional<String>> description() {
        return Codegen.optional(this.description);
    }
    /**
     * Output only. The linked dataset lifecycle state.
     * 
     */
    @Export(name="lifecycleState", type=String.class, parameters={})
    private Output<String> lifecycleState;

    /**
     * @return Output only. The linked dataset lifecycle state.
     * 
     */
    public Output<String> lifecycleState() {
        return this.lifecycleState;
    }
    /**
     * The id of the linked dataset.
     * 
     */
    @Export(name="linkId", type=String.class, parameters={})
    private Output<String> linkId;

    /**
     * @return The id of the linked dataset.
     * 
     */
    public Output<String> linkId() {
        return this.linkId;
    }
    /**
     * The location of the linked dataset.
     * 
     */
    @Export(name="location", type=String.class, parameters={})
    private Output<String> location;

    /**
     * @return The location of the linked dataset.
     * 
     */
    public Output<String> location() {
        return this.location;
    }
    /**
     * The resource name of the linked dataset. The name can have up to 100 characters. A valid link id
     * (at the end of the link name) must only have alphanumeric characters and underscores within it.
     * 
     */
    @Export(name="name", type=String.class, parameters={})
    private Output<String> name;

    /**
     * @return The resource name of the linked dataset. The name can have up to 100 characters. A valid link id
     * (at the end of the link name) must only have alphanumeric characters and underscores within it.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The parent of the linked dataset.
     * 
     */
    @Export(name="parent", type=String.class, parameters={})
    private Output<String> parent;

    /**
     * @return The parent of the linked dataset.
     * 
     */
    public Output<String> parent() {
        return this.parent;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public LinkedDataset(String name) {
        this(name, LinkedDatasetArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public LinkedDataset(String name, LinkedDatasetArgs 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 LinkedDataset(String name, LinkedDatasetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:logging/linkedDataset:LinkedDataset", name, args == null ? LinkedDatasetArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private LinkedDataset(String name, Output<String> id, @Nullable LinkedDatasetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:logging/linkedDataset:LinkedDataset", 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 LinkedDataset get(String name, Output<String> id, @Nullable LinkedDatasetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new LinkedDataset(name, id, state, options);
    }
}
