"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.EntryLink = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * EntryLink represents a link between two Entries.
 *
 * To get more information about EntryLink, see:
 *
 * * [API documentation](https://cloud.google.com/dataplex/docs/reference/rest/v1/projects.locations.entryGroups.entryLinks)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/dataplex/docs)
 *
 * ## Example Usage
 *
 * ### Dataplex Entry Link Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const entry_group_basic = new gcp.dataplex.EntryGroup("entry-group-basic", {
 *     location: "us-central1",
 *     entryGroupId: "tf-test-entry-group_64336",
 *     project: "1111111111111",
 * });
 * const entry_type_basic = new gcp.dataplex.EntryType("entry-type-basic", {
 *     entryTypeId: "tf-test-entry-type_74000",
 *     location: "us-central1",
 *     project: "1111111111111",
 * });
 * const source = new gcp.dataplex.Entry("source", {
 *     location: "us-central1",
 *     entryGroupId: entry_group_basic.entryGroupId,
 *     entryId: "tf-test-source-entry_34962",
 *     entryType: entry_type_basic.name,
 *     project: "1111111111111",
 * });
 * const target = new gcp.dataplex.Entry("target", {
 *     location: "us-central1",
 *     entryGroupId: entry_group_basic.entryGroupId,
 *     entryId: "tf-test-target-entry_75125",
 *     entryType: entry_type_basic.name,
 *     project: "1111111111111",
 * });
 * const basicEntryLink = new gcp.dataplex.EntryLink("basic_entry_link", {
 *     project: "1111111111111",
 *     location: "us-central1",
 *     entryGroupId: entry_group_basic.entryGroupId,
 *     entryLinkId: "tf-test-entry-link_88722",
 *     entryLinkType: "projects/655216118709/locations/global/entryLinkTypes/related",
 *     entryReferences: [
 *         {
 *             name: source.name,
 *         },
 *         {
 *             name: target.name,
 *         },
 *     ],
 * });
 * ```
 * ### Dataplex Entry Link Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const entry_group_full = new gcp.dataplex.EntryGroup("entry-group-full", {
 *     location: "us-central1",
 *     entryGroupId: "tf-test-entry-group-full_39249",
 *     project: "1111111111111",
 * });
 * const entry_type_full = new gcp.dataplex.EntryType("entry-type-full", {
 *     entryTypeId: "tf-test-entry-type-full_16511",
 *     location: "us-central1",
 *     project: "1111111111111",
 * });
 * const source = new gcp.dataplex.Entry("source", {
 *     location: "us-central1",
 *     entryGroupId: entry_group_full.entryGroupId,
 *     entryId: "tf-test-source-entry-full_74391",
 *     entryType: entry_type_full.name,
 *     project: "1111111111111",
 * });
 * const target = new gcp.dataplex.Entry("target", {
 *     location: "us-central1",
 *     entryGroupId: entry_group_full.entryGroupId,
 *     entryId: "tf-test-target-entry-full_8493",
 *     entryType: entry_type_full.name,
 *     project: "1111111111111",
 * });
 * const fullEntryLink = new gcp.dataplex.EntryLink("full_entry_link", {
 *     project: "1111111111111",
 *     location: "us-central1",
 *     entryGroupId: entry_group_full.entryGroupId,
 *     entryLinkId: "tf-test-entry-link-full_9106",
 *     entryLinkType: "projects/655216118709/locations/global/entryLinkTypes/related",
 *     entryReferences: [
 *         {
 *             name: source.name,
 *             path: "",
 *         },
 *         {
 *             name: target.name,
 *         },
 *     ],
 * });
 * ```
 *
 * ## Import
 *
 * EntryLink can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/entryGroups/{{entry_group_id}}/entryLinks/{{entry_link_id}}`
 *
 * * `{{project}}/{{location}}/{{entry_group_id}}/{{entry_link_id}}`
 *
 * * `{{location}}/{{entry_group_id}}/{{entry_link_id}}`
 *
 * When using the `pulumi import` command, EntryLink can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:dataplex/entryLink:EntryLink default projects/{{project}}/locations/{{location}}/entryGroups/{{entry_group_id}}/entryLinks/{{entry_link_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:dataplex/entryLink:EntryLink default {{project}}/{{location}}/{{entry_group_id}}/{{entry_link_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:dataplex/entryLink:EntryLink default {{location}}/{{entry_group_id}}/{{entry_link_id}}
 * ```
 */
class EntryLink extends pulumi.CustomResource {
    /**
     * Get an existing EntryLink 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 EntryLink(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of EntryLink.  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'] === EntryLink.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["entryGroupId"] = state?.entryGroupId;
            resourceInputs["entryLinkId"] = state?.entryLinkId;
            resourceInputs["entryLinkType"] = state?.entryLinkType;
            resourceInputs["entryReferences"] = state?.entryReferences;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.entryGroupId === undefined && !opts.urn) {
                throw new Error("Missing required property 'entryGroupId'");
            }
            if (args?.entryLinkId === undefined && !opts.urn) {
                throw new Error("Missing required property 'entryLinkId'");
            }
            if (args?.entryLinkType === undefined && !opts.urn) {
                throw new Error("Missing required property 'entryLinkType'");
            }
            if (args?.entryReferences === undefined && !opts.urn) {
                throw new Error("Missing required property 'entryReferences'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            resourceInputs["entryGroupId"] = args?.entryGroupId;
            resourceInputs["entryLinkId"] = args?.entryLinkId;
            resourceInputs["entryLinkType"] = args?.entryLinkType;
            resourceInputs["entryReferences"] = args?.entryReferences;
            resourceInputs["location"] = args?.location;
            resourceInputs["project"] = args?.project;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(EntryLink.__pulumiType, name, resourceInputs, opts);
    }
}
exports.EntryLink = EntryLink;
/** @internal */
EntryLink.__pulumiType = 'gcp:dataplex/entryLink:EntryLink';
//# sourceMappingURL=entryLink.js.map