"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.ProjectSink = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * ## Import
 *
 * Project-level logging sinks can be imported using their URI, e.g.
 *
 * * `projects/{{project_id}}/sinks/{{name}}`
 *
 * When using the `pulumi import` command, project-level logging sinks can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:logging/projectSink:ProjectSink default projects/{{project_id}}/sinks/{{name}}
 * ```
 */
class ProjectSink extends pulumi.CustomResource {
    /**
     * Get an existing ProjectSink 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 ProjectSink(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of ProjectSink.  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'] === ProjectSink.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["bigqueryOptions"] = state?.bigqueryOptions;
            resourceInputs["customWriterIdentity"] = state?.customWriterIdentity;
            resourceInputs["description"] = state?.description;
            resourceInputs["destination"] = state?.destination;
            resourceInputs["disabled"] = state?.disabled;
            resourceInputs["exclusions"] = state?.exclusions;
            resourceInputs["filter"] = state?.filter;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["uniqueWriterIdentity"] = state?.uniqueWriterIdentity;
            resourceInputs["writerIdentity"] = state?.writerIdentity;
        }
        else {
            const args = argsOrState;
            if (args?.destination === undefined && !opts.urn) {
                throw new Error("Missing required property 'destination'");
            }
            resourceInputs["bigqueryOptions"] = args?.bigqueryOptions;
            resourceInputs["customWriterIdentity"] = args?.customWriterIdentity;
            resourceInputs["description"] = args?.description;
            resourceInputs["destination"] = args?.destination;
            resourceInputs["disabled"] = args?.disabled;
            resourceInputs["exclusions"] = args?.exclusions;
            resourceInputs["filter"] = args?.filter;
            resourceInputs["name"] = args?.name;
            resourceInputs["project"] = args?.project;
            resourceInputs["uniqueWriterIdentity"] = args?.uniqueWriterIdentity;
            resourceInputs["writerIdentity"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ProjectSink.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ProjectSink = ProjectSink;
/** @internal */
ProjectSink.__pulumiType = 'gcp:logging/projectSink:ProjectSink';
//# sourceMappingURL=projectSink.js.map