"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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ObservabilityPipeline = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("./utilities"));
/**
 * Provides a Datadog Observability Pipeline resource. Observability Pipelines allows you to collect and process logs within your own infrastructure, and then route them to downstream integrations.
 *
 * Datadog recommends using the `-parallelism=1` option to apply this resource.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as datadog from "@pulumi/datadog";
 *
 * const test = new datadog.ObservabilityPipeline("test", {
 *     name: "test pipeline",
 *     config: {
 *         destinations: [{
 *             datadogLogs: [{}],
 *             id: "destination-1",
 *             inputs: ["processor-group-1"],
 *         }],
 *         sources: [{
 *             id: "source-1",
 *             datadogAgents: [{
 *                 tls: {
 *                     crtFile: "/etc/certs/client.crt",
 *                     keyFile: "/etc/certs/client.key",
 *                     caFile: "/etc/certs/ca.crt",
 *                 },
 *             }],
 *         }],
 *         processorGroups: [{
 *             id: "processor-group-1",
 *             enabled: true,
 *             include: "service:my-service",
 *             inputs: ["source-1"],
 *             displayName: "processor group",
 *             processors: [
 *                 {
 *                     id: "parser-1",
 *                     enabled: true,
 *                     include: "service:my-service",
 *                     displayName: "json parser",
 *                     parseJson: {
 *                         field: "message",
 *                     },
 *                 },
 *                 {
 *                     id: "filter-1",
 *                     enabled: true,
 *                     include: "service:my-service",
 *                     displayName: "filter",
 *                     filter: {},
 *                 },
 *             ],
 *         }],
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * The `pulumi import` command can be used, for example:
 *
 * ```sh
 * $ pulumi import datadog:index/observabilityPipeline:ObservabilityPipeline example_pipeline 8beabbc4-1f4d-11f0-942b-da7ad0900001
 * ```
 */
class ObservabilityPipeline extends pulumi.CustomResource {
    /**
     * Get an existing ObservabilityPipeline 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 ObservabilityPipeline(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'datadog:index/observabilityPipeline:ObservabilityPipeline';
    /**
     * Returns true if the given object is an instance of ObservabilityPipeline.  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'] === ObservabilityPipeline.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["config"] = state?.config;
            resourceInputs["name"] = state?.name;
        }
        else {
            const args = argsOrState;
            if (args?.config === undefined && !opts.urn) {
                throw new Error("Missing required property 'config'");
            }
            if (args?.name === undefined && !opts.urn) {
                throw new Error("Missing required property 'name'");
            }
            resourceInputs["config"] = args?.config;
            resourceInputs["name"] = args?.name;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ObservabilityPipeline.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ObservabilityPipeline = ObservabilityPipeline;
//# sourceMappingURL=observabilityPipeline.js.map