"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.Insight = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The AWS::SecurityHub::Insight resource represents the AWS Security Hub Insight in your account. An AWS Security Hub insight is a collection of related findings.
 */
class Insight extends pulumi.CustomResource {
    /**
     * Get an existing Insight 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 Insight(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Insight.  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'] === Insight.__pulumiType;
    }
    /**
     * Create a Insight 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?.filters === undefined && !opts.urn) {
                throw new Error("Missing required property 'filters'");
            }
            if (args?.groupByAttribute === undefined && !opts.urn) {
                throw new Error("Missing required property 'groupByAttribute'");
            }
            resourceInputs["filters"] = args?.filters;
            resourceInputs["groupByAttribute"] = args?.groupByAttribute;
            resourceInputs["name"] = args?.name;
            resourceInputs["insightArn"] = undefined /*out*/;
        }
        else {
            resourceInputs["filters"] = undefined /*out*/;
            resourceInputs["groupByAttribute"] = undefined /*out*/;
            resourceInputs["insightArn"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Insight.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Insight = Insight;
/** @internal */
Insight.__pulumiType = 'aws-native:securityhub:Insight';
//# sourceMappingURL=insight.js.map