"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.Asset = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The Dataplex Asset resource
 *
 * ## Example Usage
 *
 * ### Basic_asset
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const basicBucket = new gcp.storage.Bucket("basic_bucket", {
 *     name: "bucket",
 *     location: "us-west1",
 *     uniformBucketLevelAccess: true,
 *     project: "my-project-name",
 * });
 * const basicLake = new gcp.dataplex.Lake("basic_lake", {
 *     name: "lake",
 *     location: "us-west1",
 *     project: "my-project-name",
 * });
 * const basicZone = new gcp.dataplex.Zone("basic_zone", {
 *     name: "zone",
 *     location: "us-west1",
 *     lake: basicLake.name,
 *     type: "RAW",
 *     discoverySpec: {
 *         enabled: false,
 *     },
 *     resourceSpec: {
 *         locationType: "SINGLE_REGION",
 *     },
 *     project: "my-project-name",
 * });
 * const primary = new gcp.dataplex.Asset("primary", {
 *     name: "asset",
 *     location: "us-west1",
 *     lake: basicLake.name,
 *     dataplexZone: basicZone.name,
 *     discoverySpec: {
 *         enabled: false,
 *     },
 *     resourceSpec: {
 *         name: "projects/my-project-name/buckets/bucket",
 *         type: "STORAGE_BUCKET",
 *     },
 *     labels: {
 *         env: "foo",
 *         "my-asset": "exists",
 *     },
 *     project: "my-project-name",
 * }, {
 *     dependsOn: [basicBucket],
 * });
 * ```
 *
 * ## Import
 *
 * Asset can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/lakes/{{lake}}/zones/{{dataplex_zone}}/assets/{{name}}`
 *
 * * `{{project}}/{{location}}/{{lake}}/{{dataplex_zone}}/{{name}}`
 *
 * * `{{location}}/{{lake}}/{{dataplex_zone}}/{{name}}`
 *
 * When using the `pulumi import` command, Asset can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:dataplex/asset:Asset default projects/{{project}}/locations/{{location}}/lakes/{{lake}}/zones/{{dataplex_zone}}/assets/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:dataplex/asset:Asset default {{project}}/{{location}}/{{lake}}/{{dataplex_zone}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:dataplex/asset:Asset default {{location}}/{{lake}}/{{dataplex_zone}}/{{name}}
 * ```
 */
class Asset extends pulumi.CustomResource {
    /**
     * Get an existing Asset 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 Asset(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Asset.  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'] === Asset.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["dataplexZone"] = state?.dataplexZone;
            resourceInputs["description"] = state?.description;
            resourceInputs["discoverySpec"] = state?.discoverySpec;
            resourceInputs["discoveryStatuses"] = state?.discoveryStatuses;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["lake"] = state?.lake;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["resourceSpec"] = state?.resourceSpec;
            resourceInputs["resourceStatuses"] = state?.resourceStatuses;
            resourceInputs["securityStatuses"] = state?.securityStatuses;
            resourceInputs["state"] = state?.state;
            resourceInputs["uid"] = state?.uid;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.dataplexZone === undefined && !opts.urn) {
                throw new Error("Missing required property 'dataplexZone'");
            }
            if (args?.discoverySpec === undefined && !opts.urn) {
                throw new Error("Missing required property 'discoverySpec'");
            }
            if (args?.lake === undefined && !opts.urn) {
                throw new Error("Missing required property 'lake'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.resourceSpec === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceSpec'");
            }
            resourceInputs["dataplexZone"] = args?.dataplexZone;
            resourceInputs["description"] = args?.description;
            resourceInputs["discoverySpec"] = args?.discoverySpec;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["lake"] = args?.lake;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["project"] = args?.project;
            resourceInputs["resourceSpec"] = args?.resourceSpec;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["discoveryStatuses"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["resourceStatuses"] = undefined /*out*/;
            resourceInputs["securityStatuses"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["uid"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(Asset.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Asset = Asset;
/** @internal */
Asset.__pulumiType = 'gcp:dataplex/asset:Asset';
//# sourceMappingURL=asset.js.map