"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.PreventionStoredInfoType = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Allows creation of custom info types.
 *
 * To get more information about StoredInfoType, see:
 *
 * * [API documentation](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.storedInfoTypes)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/dlp/docs/creating-stored-infotypes)
 *
 * ## Example Usage
 *
 * ### Dlp Stored Info Type Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const basic = new gcp.dataloss.PreventionStoredInfoType("basic", {
 *     parent: "projects/my-project-name",
 *     description: "Description",
 *     displayName: "Displayname",
 *     regex: {
 *         pattern: "patient",
 *         groupIndexes: [2],
 *     },
 * });
 * ```
 * ### Dlp Stored Info Type Dictionary
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const dictionary = new gcp.dataloss.PreventionStoredInfoType("dictionary", {
 *     parent: "projects/my-project-name",
 *     description: "Description",
 *     displayName: "Displayname",
 *     dictionary: {
 *         wordList: {
 *             words: [
 *                 "word",
 *                 "word2",
 *             ],
 *         },
 *     },
 * });
 * ```
 * ### Dlp Stored Info Type Large Custom Dictionary
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const bucket = new gcp.storage.Bucket("bucket", {
 *     name: "tf-test-bucket",
 *     location: "US",
 *     forceDestroy: true,
 * });
 * const object = new gcp.storage.BucketObject("object", {
 *     name: "tf-test-object",
 *     bucket: bucket.name,
 *     source: new pulumi.asset.FileAsset("./test-fixtures/words.txt"),
 * });
 * const large = new gcp.dataloss.PreventionStoredInfoType("large", {
 *     parent: "projects/my-project-name",
 *     description: "Description",
 *     displayName: "Displayname",
 *     largeCustomDictionary: {
 *         cloudStorageFileSet: {
 *             url: pulumi.interpolate`gs://${bucket.name}/${object.name}`,
 *         },
 *         outputPath: {
 *             path: pulumi.interpolate`gs://${bucket.name}/output/dictionary.txt`,
 *         },
 *     },
 * });
 * ```
 * ### Dlp Stored Info Type With Id
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const withStoredInfoTypeId = new gcp.dataloss.PreventionStoredInfoType("with_stored_info_type_id", {
 *     parent: "projects/my-project-name",
 *     description: "Description",
 *     displayName: "Displayname",
 *     storedInfoTypeId: "id-",
 *     regex: {
 *         pattern: "patient",
 *         groupIndexes: [2],
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * StoredInfoType can be imported using any of these accepted formats:
 *
 * * `{{parent}}/storedInfoTypes/{{name}}`
 *
 * * `{{parent}}/{{name}}`
 *
 * When using the `pulumi import` command, StoredInfoType can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:dataloss/preventionStoredInfoType:PreventionStoredInfoType default {{parent}}/storedInfoTypes/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:dataloss/preventionStoredInfoType:PreventionStoredInfoType default {{parent}}/{{name}}
 * ```
 */
class PreventionStoredInfoType extends pulumi.CustomResource {
    /**
     * Get an existing PreventionStoredInfoType 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 PreventionStoredInfoType(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of PreventionStoredInfoType.  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'] === PreventionStoredInfoType.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["description"] = state?.description;
            resourceInputs["dictionary"] = state?.dictionary;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["largeCustomDictionary"] = state?.largeCustomDictionary;
            resourceInputs["name"] = state?.name;
            resourceInputs["parent"] = state?.parent;
            resourceInputs["regex"] = state?.regex;
            resourceInputs["storedInfoTypeId"] = state?.storedInfoTypeId;
        }
        else {
            const args = argsOrState;
            if (args?.parent === undefined && !opts.urn) {
                throw new Error("Missing required property 'parent'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["dictionary"] = args?.dictionary;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["largeCustomDictionary"] = args?.largeCustomDictionary;
            resourceInputs["parent"] = args?.parent;
            resourceInputs["regex"] = args?.regex;
            resourceInputs["storedInfoTypeId"] = args?.storedInfoTypeId;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(PreventionStoredInfoType.__pulumiType, name, resourceInputs, opts);
    }
}
exports.PreventionStoredInfoType = PreventionStoredInfoType;
/** @internal */
PreventionStoredInfoType.__pulumiType = 'gcp:dataloss/preventionStoredInfoType:PreventionStoredInfoType';
//# sourceMappingURL=preventionStoredInfoType.js.map