"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.PreventionInspectTemplate = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An inspect job template.
 *
 * To get more information about InspectTemplate, see:
 *
 * * [API documentation](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.inspectTemplates)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/dlp/docs/creating-templates-inspect)
 *
 * ## Example Usage
 *
 * ### Dlp Inspect Template Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const basic = new gcp.dataloss.PreventionInspectTemplate("basic", {
 *     parent: "projects/my-project-name",
 *     description: "My description",
 *     displayName: "display_name",
 *     inspectConfig: {
 *         infoTypes: [
 *             {
 *                 name: "EMAIL_ADDRESS",
 *             },
 *             {
 *                 name: "PERSON_NAME",
 *             },
 *             {
 *                 name: "LAST_NAME",
 *             },
 *             {
 *                 name: "DOMAIN_NAME",
 *             },
 *             {
 *                 name: "PHONE_NUMBER",
 *             },
 *             {
 *                 name: "FIRST_NAME",
 *             },
 *         ],
 *         minLikelihood: "UNLIKELY",
 *         ruleSets: [
 *             {
 *                 infoTypes: [{
 *                     name: "EMAIL_ADDRESS",
 *                 }],
 *                 rules: [{
 *                     exclusionRule: {
 *                         regex: {
 *                             pattern: ".+@example.com",
 *                         },
 *                         matchingType: "MATCHING_TYPE_FULL_MATCH",
 *                     },
 *                 }],
 *             },
 *             {
 *                 infoTypes: [
 *                     {
 *                         name: "EMAIL_ADDRESS",
 *                     },
 *                     {
 *                         name: "DOMAIN_NAME",
 *                     },
 *                     {
 *                         name: "PHONE_NUMBER",
 *                     },
 *                     {
 *                         name: "PERSON_NAME",
 *                     },
 *                     {
 *                         name: "FIRST_NAME",
 *                     },
 *                 ],
 *                 rules: [{
 *                     exclusionRule: {
 *                         dictionary: {
 *                             wordList: {
 *                                 words: ["TEST"],
 *                             },
 *                         },
 *                         matchingType: "MATCHING_TYPE_PARTIAL_MATCH",
 *                     },
 *                 }],
 *             },
 *             {
 *                 infoTypes: [{
 *                     name: "PERSON_NAME",
 *                 }],
 *                 rules: [{
 *                     hotwordRule: {
 *                         hotwordRegex: {
 *                             pattern: "patient",
 *                         },
 *                         proximity: {
 *                             windowBefore: 50,
 *                         },
 *                         likelihoodAdjustment: {
 *                             fixedLikelihood: "VERY_LIKELY",
 *                         },
 *                     },
 *                 }],
 *             },
 *         ],
 *         limits: {
 *             maxFindingsPerItem: 10,
 *             maxFindingsPerRequest: 50,
 *             maxFindingsPerInfoTypes: [
 *                 {
 *                     maxFindings: 75,
 *                     infoType: {
 *                         name: "PERSON_NAME",
 *                     },
 *                 },
 *                 {
 *                     maxFindings: 80,
 *                     infoType: {
 *                         name: "LAST_NAME",
 *                     },
 *                 },
 *             ],
 *         },
 *     },
 * });
 * ```
 * ### Dlp Inspect Template Custom Type
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const custom = new gcp.dataloss.PreventionInspectTemplate("custom", {
 *     parent: "projects/my-project-name",
 *     description: "My description",
 *     displayName: "display_name",
 *     inspectConfig: {
 *         customInfoTypes: [{
 *             infoType: {
 *                 name: "MY_CUSTOM_TYPE",
 *             },
 *             likelihood: "UNLIKELY",
 *             regex: {
 *                 pattern: "test*",
 *             },
 *         }],
 *         infoTypes: [{
 *             name: "EMAIL_ADDRESS",
 *         }],
 *         minLikelihood: "UNLIKELY",
 *         ruleSets: [
 *             {
 *                 infoTypes: [{
 *                     name: "EMAIL_ADDRESS",
 *                 }],
 *                 rules: [{
 *                     exclusionRule: {
 *                         regex: {
 *                             pattern: ".+@example.com",
 *                         },
 *                         matchingType: "MATCHING_TYPE_FULL_MATCH",
 *                     },
 *                 }],
 *             },
 *             {
 *                 infoTypes: [{
 *                     name: "MY_CUSTOM_TYPE",
 *                 }],
 *                 rules: [{
 *                     hotwordRule: {
 *                         hotwordRegex: {
 *                             pattern: "example*",
 *                         },
 *                         proximity: {
 *                             windowBefore: 50,
 *                         },
 *                         likelihoodAdjustment: {
 *                             fixedLikelihood: "VERY_LIKELY",
 *                         },
 *                     },
 *                 }],
 *             },
 *         ],
 *         limits: {
 *             maxFindingsPerItem: 10,
 *             maxFindingsPerRequest: 50,
 *         },
 *     },
 * });
 * ```
 * ### Dlp Inspect Template Custom Type Surrogate
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const customTypeSurrogate = new gcp.dataloss.PreventionInspectTemplate("custom_type_surrogate", {
 *     parent: "projects/my-project-name",
 *     description: "My description",
 *     displayName: "display_name",
 *     inspectConfig: {
 *         customInfoTypes: [{
 *             infoType: {
 *                 name: "MY_CUSTOM_TYPE",
 *             },
 *             likelihood: "UNLIKELY",
 *             surrogateType: {},
 *         }],
 *         infoTypes: [{
 *             name: "EMAIL_ADDRESS",
 *         }],
 *         minLikelihood: "UNLIKELY",
 *         ruleSets: [
 *             {
 *                 infoTypes: [{
 *                     name: "EMAIL_ADDRESS",
 *                 }],
 *                 rules: [{
 *                     exclusionRule: {
 *                         regex: {
 *                             pattern: ".+@example.com",
 *                         },
 *                         matchingType: "MATCHING_TYPE_FULL_MATCH",
 *                     },
 *                 }],
 *             },
 *             {
 *                 infoTypes: [{
 *                     name: "MY_CUSTOM_TYPE",
 *                 }],
 *                 rules: [{
 *                     hotwordRule: {
 *                         hotwordRegex: {
 *                             pattern: "example*",
 *                         },
 *                         proximity: {
 *                             windowBefore: 50,
 *                         },
 *                         likelihoodAdjustment: {
 *                             fixedLikelihood: "VERY_LIKELY",
 *                         },
 *                     },
 *                 }],
 *             },
 *         ],
 *         limits: {
 *             maxFindingsPerItem: 10,
 *             maxFindingsPerRequest: 50,
 *         },
 *     },
 * });
 * ```
 * ### Dlp Inspect Template Max Infotype Per Finding Default
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const maxInfotypePerFindingDefault = new gcp.dataloss.PreventionInspectTemplate("max_infotype_per_finding_default", {
 *     parent: "projects/my-project-name",
 *     inspectConfig: {
 *         infoTypes: [
 *             {
 *                 name: "EMAIL_ADDRESS",
 *             },
 *             {
 *                 name: "PERSON_NAME",
 *             },
 *         ],
 *         minLikelihood: "UNLIKELY",
 *         limits: {
 *             maxFindingsPerRequest: 333,
 *             maxFindingsPerItem: 222,
 *             maxFindingsPerInfoTypes: [{
 *                 maxFindings: 111,
 *             }],
 *         },
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * InspectTemplate can be imported using any of these accepted formats:
 *
 * * `{{parent}}/inspectTemplates/{{name}}`
 *
 * * `{{parent}}/{{name}}`
 *
 * When using the `pulumi import` command, InspectTemplate can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:dataloss/preventionInspectTemplate:PreventionInspectTemplate default {{parent}}/inspectTemplates/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:dataloss/preventionInspectTemplate:PreventionInspectTemplate default {{parent}}/{{name}}
 * ```
 */
class PreventionInspectTemplate extends pulumi.CustomResource {
    /**
     * Get an existing PreventionInspectTemplate 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 PreventionInspectTemplate(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of PreventionInspectTemplate.  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'] === PreventionInspectTemplate.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["inspectConfig"] = state?.inspectConfig;
            resourceInputs["name"] = state?.name;
            resourceInputs["parent"] = state?.parent;
            resourceInputs["templateId"] = state?.templateId;
        }
        else {
            const args = argsOrState;
            if (args?.parent === undefined && !opts.urn) {
                throw new Error("Missing required property 'parent'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["inspectConfig"] = args?.inspectConfig;
            resourceInputs["parent"] = args?.parent;
            resourceInputs["templateId"] = args?.templateId;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(PreventionInspectTemplate.__pulumiType, name, resourceInputs, opts);
    }
}
exports.PreventionInspectTemplate = PreventionInspectTemplate;
/** @internal */
PreventionInspectTemplate.__pulumiType = 'gcp:dataloss/preventionInspectTemplate:PreventionInspectTemplate';
//# sourceMappingURL=preventionInspectTemplate.js.map