"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.GitRepositoryLink = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A git repository link to a parent connection.
 *
 * To get more information about GitRepositoryLink, see:
 *
 * * [API documentation](https://cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/developer-connect/docs/overview)
 *
 * ## Example Usage
 *
 * ### Developer Connect Git Repository Link Github Doc
 *
 * ## Import
 *
 * GitRepositoryLink can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}}`
 *
 * * `{{project}}/{{location}}/{{parent_connection}}/{{git_repository_link_id}}`
 *
 * * `{{location}}/{{parent_connection}}/{{git_repository_link_id}}`
 *
 * When using the `pulumi import` command, GitRepositoryLink can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:developerconnect/gitRepositoryLink:GitRepositoryLink default projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:developerconnect/gitRepositoryLink:GitRepositoryLink default {{project}}/{{location}}/{{parent_connection}}/{{git_repository_link_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:developerconnect/gitRepositoryLink:GitRepositoryLink default {{location}}/{{parent_connection}}/{{git_repository_link_id}}
 * ```
 */
class GitRepositoryLink extends pulumi.CustomResource {
    /**
     * Get an existing GitRepositoryLink 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 GitRepositoryLink(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of GitRepositoryLink.  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'] === GitRepositoryLink.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["annotations"] = state?.annotations;
            resourceInputs["cloneUri"] = state?.cloneUri;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["deleteTime"] = state?.deleteTime;
            resourceInputs["effectiveAnnotations"] = state?.effectiveAnnotations;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["etag"] = state?.etag;
            resourceInputs["gitRepositoryLinkId"] = state?.gitRepositoryLinkId;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["parentConnection"] = state?.parentConnection;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["reconciling"] = state?.reconciling;
            resourceInputs["uid"] = state?.uid;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.cloneUri === undefined && !opts.urn) {
                throw new Error("Missing required property 'cloneUri'");
            }
            if (args?.gitRepositoryLinkId === undefined && !opts.urn) {
                throw new Error("Missing required property 'gitRepositoryLinkId'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.parentConnection === undefined && !opts.urn) {
                throw new Error("Missing required property 'parentConnection'");
            }
            resourceInputs["annotations"] = args?.annotations;
            resourceInputs["cloneUri"] = args?.cloneUri;
            resourceInputs["etag"] = args?.etag;
            resourceInputs["gitRepositoryLinkId"] = args?.gitRepositoryLinkId;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["parentConnection"] = args?.parentConnection;
            resourceInputs["project"] = args?.project;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["deleteTime"] = undefined /*out*/;
            resourceInputs["effectiveAnnotations"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["reconciling"] = 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(GitRepositoryLink.__pulumiType, name, resourceInputs, opts);
    }
}
exports.GitRepositoryLink = GitRepositoryLink;
/** @internal */
GitRepositoryLink.__pulumiType = 'gcp:developerconnect/gitRepositoryLink:GitRepositoryLink';
//# sourceMappingURL=gitRepositoryLink.js.map