"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.InsightsDatasetConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Represents a Storage Insights DatasetConfig.
 *
 * To get more information about DatasetConfig, see:
 *
 * * [API documentation](https://cloud.google.com/storage/docs/insights/reference/rest/v1/projects.locations.datasetConfigs)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/storage/docs/insights/datasets)
 *
 * ## Example Usage
 *
 * ### Storage Insights Dataset Config Includes
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const configIncludes = new gcp.storage.InsightsDatasetConfig("config_includes", {
 *     location: "us-central1",
 *     datasetConfigId: "my_config_includes",
 *     retentionPeriodDays: 1,
 *     sourceProjects: {
 *         projectNumbers: [
 *             "123",
 *             "456",
 *             "789",
 *         ],
 *     },
 *     identity: {
 *         type: "IDENTITY_TYPE_PER_CONFIG",
 *     },
 *     description: "Sample Description",
 *     linkDataset: false,
 *     includeNewlyCreatedBuckets: true,
 *     includeCloudStorageLocations: {
 *         locations: ["us-east1"],
 *     },
 *     includeCloudStorageBuckets: {
 *         cloudStorageBuckets: [
 *             {
 *                 bucketName: "sample-bucket",
 *             },
 *             {
 *                 bucketName: "sample-regex",
 *             },
 *         ],
 *     },
 * });
 * ```
 * ### Storage Insights Dataset Config Excludes
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const configExcludes = new gcp.storage.InsightsDatasetConfig("config_excludes", {
 *     location: "us-central1",
 *     datasetConfigId: "my_config_excludes",
 *     retentionPeriodDays: 1,
 *     activityDataRetentionPeriodDays: 2,
 *     organizationScope: true,
 *     identity: {
 *         type: "IDENTITY_TYPE_PER_PROJECT",
 *     },
 *     excludeCloudStorageLocations: {
 *         locations: ["us-east1"],
 *     },
 *     excludeCloudStorageBuckets: {
 *         cloudStorageBuckets: [
 *             {
 *                 bucketName: "sample-bucket",
 *             },
 *             {
 *                 bucketName: "sample-regex",
 *             },
 *         ],
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * DatasetConfig can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/datasetConfigs/{{dataset_config_id}}`
 *
 * * `{{project}}/{{location}}/{{dataset_config_id}}`
 *
 * * `{{location}}/{{dataset_config_id}}`
 *
 * When using the `pulumi import` command, DatasetConfig can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:storage/insightsDatasetConfig:InsightsDatasetConfig default projects/{{project}}/locations/{{location}}/datasetConfigs/{{dataset_config_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:storage/insightsDatasetConfig:InsightsDatasetConfig default {{project}}/{{location}}/{{dataset_config_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:storage/insightsDatasetConfig:InsightsDatasetConfig default {{location}}/{{dataset_config_id}}
 * ```
 */
class InsightsDatasetConfig extends pulumi.CustomResource {
    /**
     * Get an existing InsightsDatasetConfig 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 InsightsDatasetConfig(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of InsightsDatasetConfig.  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'] === InsightsDatasetConfig.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["activityDataRetentionPeriodDays"] = state?.activityDataRetentionPeriodDays;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["datasetConfigId"] = state?.datasetConfigId;
            resourceInputs["datasetConfigState"] = state?.datasetConfigState;
            resourceInputs["description"] = state?.description;
            resourceInputs["excludeCloudStorageBuckets"] = state?.excludeCloudStorageBuckets;
            resourceInputs["excludeCloudStorageLocations"] = state?.excludeCloudStorageLocations;
            resourceInputs["identity"] = state?.identity;
            resourceInputs["includeCloudStorageBuckets"] = state?.includeCloudStorageBuckets;
            resourceInputs["includeCloudStorageLocations"] = state?.includeCloudStorageLocations;
            resourceInputs["includeNewlyCreatedBuckets"] = state?.includeNewlyCreatedBuckets;
            resourceInputs["linkDataset"] = state?.linkDataset;
            resourceInputs["links"] = state?.links;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["organizationNumber"] = state?.organizationNumber;
            resourceInputs["organizationScope"] = state?.organizationScope;
            resourceInputs["project"] = state?.project;
            resourceInputs["retentionPeriodDays"] = state?.retentionPeriodDays;
            resourceInputs["sourceFolders"] = state?.sourceFolders;
            resourceInputs["sourceProjects"] = state?.sourceProjects;
            resourceInputs["uid"] = state?.uid;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.datasetConfigId === undefined && !opts.urn) {
                throw new Error("Missing required property 'datasetConfigId'");
            }
            if (args?.identity === undefined && !opts.urn) {
                throw new Error("Missing required property 'identity'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.retentionPeriodDays === undefined && !opts.urn) {
                throw new Error("Missing required property 'retentionPeriodDays'");
            }
            resourceInputs["activityDataRetentionPeriodDays"] = args?.activityDataRetentionPeriodDays;
            resourceInputs["datasetConfigId"] = args?.datasetConfigId;
            resourceInputs["description"] = args?.description;
            resourceInputs["excludeCloudStorageBuckets"] = args?.excludeCloudStorageBuckets;
            resourceInputs["excludeCloudStorageLocations"] = args?.excludeCloudStorageLocations;
            resourceInputs["identity"] = args?.identity;
            resourceInputs["includeCloudStorageBuckets"] = args?.includeCloudStorageBuckets;
            resourceInputs["includeCloudStorageLocations"] = args?.includeCloudStorageLocations;
            resourceInputs["includeNewlyCreatedBuckets"] = args?.includeNewlyCreatedBuckets;
            resourceInputs["linkDataset"] = args?.linkDataset;
            resourceInputs["location"] = args?.location;
            resourceInputs["organizationNumber"] = args?.organizationNumber;
            resourceInputs["organizationScope"] = args?.organizationScope;
            resourceInputs["project"] = args?.project;
            resourceInputs["retentionPeriodDays"] = args?.retentionPeriodDays;
            resourceInputs["sourceFolders"] = args?.sourceFolders;
            resourceInputs["sourceProjects"] = args?.sourceProjects;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["datasetConfigState"] = undefined /*out*/;
            resourceInputs["links"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["uid"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(InsightsDatasetConfig.__pulumiType, name, resourceInputs, opts);
    }
}
exports.InsightsDatasetConfig = InsightsDatasetConfig;
/** @internal */
InsightsDatasetConfig.__pulumiType = 'gcp:storage/insightsDatasetConfig:InsightsDatasetConfig';
//# sourceMappingURL=insightsDatasetConfig.js.map