"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.MirroringEndpoint = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An endpoint is a managed mirroring collector that provides enhanced packet
 * enrichment capabilities and support for multiple replica destinations.
 * Endpoints are always part of a global endpoint group which represents a
 * global "mirroring broker" service.
 *
 * ## Example Usage
 *
 * ### Network Security Mirroring Endpoint Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const network = new gcp.compute.Network("network", {
 *     name: "example-network",
 *     autoCreateSubnetworks: false,
 * });
 * const deploymentGroup = new gcp.networksecurity.MirroringDeploymentGroup("deployment_group", {
 *     mirroringDeploymentGroupId: "example-dg",
 *     location: "global",
 *     network: network.id,
 * });
 * const endpointGroup = new gcp.networksecurity.MirroringEndpointGroup("endpoint_group", {
 *     mirroringEndpointGroupId: "example-eg",
 *     location: "global",
 *     type: "BROKER",
 *     mirroringDeploymentGroups: [deploymentGroup.id],
 * });
 * const _default = new gcp.networksecurity.MirroringEndpoint("default", {
 *     mirroringEndpointId: "example-endpoint",
 *     location: "us-west2-a",
 *     mirroringEndpointGroup: endpointGroup.id,
 *     description: "some description",
 *     labels: {
 *         foo: "bar",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * MirroringEndpoint can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/mirroringEndpoints/{{mirroring_endpoint_id}}`
 *
 * * `{{project}}/{{location}}/{{mirroring_endpoint_id}}`
 *
 * * `{{location}}/{{mirroring_endpoint_id}}`
 *
 * When using the `pulumi import` command, MirroringEndpoint can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:networksecurity/mirroringEndpoint:MirroringEndpoint default projects/{{project}}/locations/{{location}}/mirroringEndpoints/{{mirroring_endpoint_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:networksecurity/mirroringEndpoint:MirroringEndpoint default {{project}}/{{location}}/{{mirroring_endpoint_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:networksecurity/mirroringEndpoint:MirroringEndpoint default {{location}}/{{mirroring_endpoint_id}}
 * ```
 */
class MirroringEndpoint extends pulumi.CustomResource {
    /**
     * Get an existing MirroringEndpoint 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 MirroringEndpoint(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of MirroringEndpoint.  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'] === MirroringEndpoint.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["description"] = state?.description;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["mirroringEndpointGroup"] = state?.mirroringEndpointGroup;
            resourceInputs["mirroringEndpointId"] = state?.mirroringEndpointId;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["reconciling"] = state?.reconciling;
            resourceInputs["state"] = state?.state;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.mirroringEndpointGroup === undefined && !opts.urn) {
                throw new Error("Missing required property 'mirroringEndpointGroup'");
            }
            if (args?.mirroringEndpointId === undefined && !opts.urn) {
                throw new Error("Missing required property 'mirroringEndpointId'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["mirroringEndpointGroup"] = args?.mirroringEndpointGroup;
            resourceInputs["mirroringEndpointId"] = args?.mirroringEndpointId;
            resourceInputs["project"] = args?.project;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["reconciling"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(MirroringEndpoint.__pulumiType, name, resourceInputs, opts);
    }
}
exports.MirroringEndpoint = MirroringEndpoint;
/** @internal */
MirroringEndpoint.__pulumiType = 'gcp:networksecurity/mirroringEndpoint:MirroringEndpoint';
//# sourceMappingURL=mirroringEndpoint.js.map