"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.TrafficMirrorFilterRule = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Resource Type definition for for AWS::EC2::TrafficMirrorFilterRule
 */
class TrafficMirrorFilterRule extends pulumi.CustomResource {
    /**
     * Get an existing TrafficMirrorFilterRule 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 opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, opts) {
        return new TrafficMirrorFilterRule(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of TrafficMirrorFilterRule.  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'] === TrafficMirrorFilterRule.__pulumiType;
    }
    /**
     * Create a TrafficMirrorFilterRule resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name, args, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (!opts.id) {
            if ((!args || args.destinationCidrBlock === undefined) && !opts.urn) {
                throw new Error("Missing required property 'destinationCidrBlock'");
            }
            if ((!args || args.ruleAction === undefined) && !opts.urn) {
                throw new Error("Missing required property 'ruleAction'");
            }
            if ((!args || args.ruleNumber === undefined) && !opts.urn) {
                throw new Error("Missing required property 'ruleNumber'");
            }
            if ((!args || args.sourceCidrBlock === undefined) && !opts.urn) {
                throw new Error("Missing required property 'sourceCidrBlock'");
            }
            if ((!args || args.trafficDirection === undefined) && !opts.urn) {
                throw new Error("Missing required property 'trafficDirection'");
            }
            if ((!args || args.trafficMirrorFilterId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'trafficMirrorFilterId'");
            }
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["destinationCidrBlock"] = args ? args.destinationCidrBlock : undefined;
            resourceInputs["destinationPortRange"] = args ? args.destinationPortRange : undefined;
            resourceInputs["protocol"] = args ? args.protocol : undefined;
            resourceInputs["ruleAction"] = args ? args.ruleAction : undefined;
            resourceInputs["ruleNumber"] = args ? args.ruleNumber : undefined;
            resourceInputs["sourceCidrBlock"] = args ? args.sourceCidrBlock : undefined;
            resourceInputs["sourcePortRange"] = args ? args.sourcePortRange : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["trafficDirection"] = args ? args.trafficDirection : undefined;
            resourceInputs["trafficMirrorFilterId"] = args ? args.trafficMirrorFilterId : undefined;
            resourceInputs["trafficMirrorFilterRuleId"] = undefined /*out*/;
        }
        else {
            resourceInputs["description"] = undefined /*out*/;
            resourceInputs["destinationCidrBlock"] = undefined /*out*/;
            resourceInputs["destinationPortRange"] = undefined /*out*/;
            resourceInputs["protocol"] = undefined /*out*/;
            resourceInputs["ruleAction"] = undefined /*out*/;
            resourceInputs["ruleNumber"] = undefined /*out*/;
            resourceInputs["sourceCidrBlock"] = undefined /*out*/;
            resourceInputs["sourcePortRange"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
            resourceInputs["trafficDirection"] = undefined /*out*/;
            resourceInputs["trafficMirrorFilterId"] = undefined /*out*/;
            resourceInputs["trafficMirrorFilterRuleId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["trafficMirrorFilterId"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(TrafficMirrorFilterRule.__pulumiType, name, resourceInputs, opts);
    }
}
exports.TrafficMirrorFilterRule = TrafficMirrorFilterRule;
/** @internal */
TrafficMirrorFilterRule.__pulumiType = 'aws-native:ec2:TrafficMirrorFilterRule';
//# sourceMappingURL=trafficMirrorFilterRule.js.map