"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.CollectorPolicy = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Network Function Collector Policy.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West US 2",
 * });
 * const exampleExpressRoutePort = new azure.network.ExpressRoutePort("example", {
 *     name: "example-erp",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     peeringLocation: "Equinix-Seattle-SE2",
 *     bandwidthInGbps: 10,
 *     encapsulation: "Dot1Q",
 * });
 * const exampleExpressRouteCircuit = new azure.network.ExpressRouteCircuit("example", {
 *     name: "example-erc",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     expressRoutePortId: exampleExpressRoutePort.id,
 *     bandwidthInGbps: 1,
 *     sku: {
 *         tier: "Standard",
 *         family: "MeteredData",
 *     },
 * });
 * const exampleExpressRouteCircuitPeering = new azure.network.ExpressRouteCircuitPeering("example", {
 *     peeringType: "MicrosoftPeering",
 *     expressRouteCircuitName: exampleExpressRouteCircuit.name,
 *     resourceGroupName: example.name,
 *     peerAsn: 100,
 *     primaryPeerAddressPrefix: "192.168.199.0/30",
 *     secondaryPeerAddressPrefix: "192.168.200.0/30",
 *     vlanId: 300,
 *     microsoftPeeringConfig: {
 *         advertisedPublicPrefixes: ["123.6.0.0/24"],
 *     },
 * });
 * const exampleAzureTrafficCollector = new azure.networkfunction.AzureTrafficCollector("example", {
 *     name: "example-nfatc",
 *     location: example.location,
 *     resourceGroupName: example.name,
 * }, {
 *     dependsOn: [exampleExpressRouteCircuitPeering],
 * });
 * const exampleCollectorPolicy = new azure.networkfunction.CollectorPolicy("example", {
 *     name: "example-nfcp",
 *     trafficCollectorId: exampleAzureTrafficCollector.id,
 *     location: example.location,
 *     ipfxEmission: {
 *         destinationTypes: "AzureMonitor",
 *     },
 *     ipfxIngestion: {
 *         sourceResourceIds: [exampleExpressRouteCircuit.id],
 *     },
 *     tags: {
 *         key: "value",
 *     },
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.NetworkFunction` - 2022-11-01
 *
 * ## Import
 *
 * Network Function Collector Policy can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:networkfunction/collectorPolicy:CollectorPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/azureTrafficCollector1/collectorPolicies/collectorPolicy1
 * ```
 */
class CollectorPolicy extends pulumi.CustomResource {
    /**
     * Get an existing CollectorPolicy 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 CollectorPolicy(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:networkfunction/collectorPolicy:CollectorPolicy';
    /**
     * Returns true if the given object is an instance of CollectorPolicy.  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'] === CollectorPolicy.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["ipfxEmission"] = state?.ipfxEmission;
            resourceInputs["ipfxIngestion"] = state?.ipfxIngestion;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["trafficCollectorId"] = state?.trafficCollectorId;
        }
        else {
            const args = argsOrState;
            if (args?.ipfxEmission === undefined && !opts.urn) {
                throw new Error("Missing required property 'ipfxEmission'");
            }
            if (args?.ipfxIngestion === undefined && !opts.urn) {
                throw new Error("Missing required property 'ipfxIngestion'");
            }
            if (args?.trafficCollectorId === undefined && !opts.urn) {
                throw new Error("Missing required property 'trafficCollectorId'");
            }
            resourceInputs["ipfxEmission"] = args?.ipfxEmission;
            resourceInputs["ipfxIngestion"] = args?.ipfxIngestion;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["trafficCollectorId"] = args?.trafficCollectorId;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(CollectorPolicy.__pulumiType, name, resourceInputs, opts);
    }
}
exports.CollectorPolicy = CollectorPolicy;
//# sourceMappingURL=collectorPolicy.js.map