UNPKG

@google-cloud/dlp

Version:
773 lines 171 kB
/// <reference types="node" /> import type * as gax from 'google-gax'; import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, LocationsClient, LocationProtos } from 'google-gax'; import { Transform } from 'stream'; import * as protos from '../../protos/protos'; /** * The Cloud Data Loss Prevention (DLP) API is a service that allows clients * to detect the presence of Personally Identifiable Information (PII) and other * privacy-sensitive data in user-supplied, unstructured data streams, like text * blocks or images. * The service also includes methods for sensitive data redaction and * scheduling of data scans on Google Cloud Platform based data sets. * * To learn more about concepts and find how-to guides see * https://cloud.google.com/dlp/docs/. * @class * @memberof v2 */ export declare class DlpServiceClient { private _terminated; private _opts; private _providedCustomServicePath; private _gaxModule; private _gaxGrpc; private _protos; private _defaults; auth: gax.GoogleAuth; descriptors: Descriptors; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: { [name: string]: Function; }; locationsClient: LocationsClient; pathTemplates: { [name: string]: gax.PathTemplate; }; dlpServiceStub?: Promise<{ [name: string]: Function; }>; /** * Construct an instance of DlpServiceClient. * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] * @param {string} [options.email] - Account email address. Required when * using a .pem or .p12 keyFilename. * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or * .p12 key downloaded from the Google Developers Console. If you provide * a path to a JSON file, the projectId option below is not necessary. * NOTE: .pem and .p12 require you to specify options.email as well. * @param {number} [options.port] - The port on which to connect to * the remote host. * @param {string} [options.projectId] - The project ID from the Google * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you * need to avoid loading the default gRPC version and want to use the fallback * HTTP implementation. Load only fallback version and pass it to the constructor: * ``` * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC * const client = new DlpServiceClient({fallback: true}, gax); * ``` */ constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback); /** * Initialize the client. * Performs asynchronous operations (such as authentication) and prepares the client. * This function will be called automatically when any class method is called for the * first time, but if you need to initialize it before calling an actual method, * feel free to call initialize() directly. * * You can await on this method if you want to make sure the client is initialized. * * @returns {Promise} A promise that resolves to an authenticated service stub. */ initialize(): Promise<{ [name: string]: Function; }>; /** * The DNS address for this API service. * @returns {string} The DNS address for this service. */ static get servicePath(): string; /** * The DNS address for this API service - same as servicePath(), * exists for compatibility reasons. * @returns {string} The DNS address for this service. */ static get apiEndpoint(): string; /** * The port for this API service. * @returns {number} The default port for this service. */ static get port(): number; /** * The scopes needed to make gRPC calls for every method defined * in this service. * @returns {string[]} List of default scopes. */ static get scopes(): string[]; getProjectId(): Promise<string>; getProjectId(callback: Callback<string, undefined, undefined>): void; /** * Finds potentially sensitive info in content. * This method has limits on input size, processing time, and output size. * * When no InfoTypes or CustomInfoTypes are specified in this request, the * system will automatically choose what detectors to run. By default this may * be all types, but may change over time as detectors are updated. * * For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images * and https://cloud.google.com/dlp/docs/inspecting-text, * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Parent resource name. * * The format of this value varies depending on whether you have [specified a * processing * location](https://cloud.google.com/dlp/docs/specifying-location): * * + Projects scope, location specified:<br/> * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> * * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * * parent=projects/example-project/locations/europe-west3 * @param {google.privacy.dlp.v2.InspectConfig} request.inspectConfig * Configuration for the inspector. What specified here will override * the template referenced by the inspect_template_name argument. * @param {google.privacy.dlp.v2.ContentItem} request.item * The item to inspect. * @param {string} request.inspectTemplateName * Template to use. Any configuration directly specified in * inspect_config will override those set in the template. Singular fields * that are set in this request will replace their corresponding fields in the * template. Repeated fields are appended. Singular sub-messages and groups * are recursively merged. * @param {string} request.locationId * Deprecated. This field has no effect. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.InspectContentResponse|InspectContentResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.inspect_content.js</caption> * region_tag:dlp_v2_generated_DlpService_InspectContent_async */ inspectContent(request?: protos.google.privacy.dlp.v2.IInspectContentRequest, options?: CallOptions): Promise<[ protos.google.privacy.dlp.v2.IInspectContentResponse, protos.google.privacy.dlp.v2.IInspectContentRequest | undefined, {} | undefined ]>; inspectContent(request: protos.google.privacy.dlp.v2.IInspectContentRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IInspectContentResponse, protos.google.privacy.dlp.v2.IInspectContentRequest | null | undefined, {} | null | undefined>): void; inspectContent(request: protos.google.privacy.dlp.v2.IInspectContentRequest, callback: Callback<protos.google.privacy.dlp.v2.IInspectContentResponse, protos.google.privacy.dlp.v2.IInspectContentRequest | null | undefined, {} | null | undefined>): void; /** * Redacts potentially sensitive info from an image. * This method has limits on input size, processing time, and output size. * See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to * learn more. * * When no InfoTypes or CustomInfoTypes are specified in this request, the * system will automatically choose what detectors to run. By default this may * be all types, but may change over time as detectors are updated. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Parent resource name. * * The format of this value varies depending on whether you have [specified a * processing * location](https://cloud.google.com/dlp/docs/specifying-location): * * + Projects scope, location specified:<br/> * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> * * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * * parent=projects/example-project/locations/europe-west3 * @param {string} request.locationId * Deprecated. This field has no effect. * @param {google.privacy.dlp.v2.InspectConfig} request.inspectConfig * Configuration for the inspector. * @param {number[]} request.imageRedactionConfigs * The configuration for specifying what content to redact from images. * @param {boolean} request.includeFindings * Whether the response should include findings along with the redacted * image. * @param {google.privacy.dlp.v2.ByteContentItem} request.byteItem * The content must be PNG, JPEG, SVG or BMP. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.RedactImageResponse|RedactImageResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.redact_image.js</caption> * region_tag:dlp_v2_generated_DlpService_RedactImage_async */ redactImage(request?: protos.google.privacy.dlp.v2.IRedactImageRequest, options?: CallOptions): Promise<[ protos.google.privacy.dlp.v2.IRedactImageResponse, protos.google.privacy.dlp.v2.IRedactImageRequest | undefined, {} | undefined ]>; redactImage(request: protos.google.privacy.dlp.v2.IRedactImageRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IRedactImageResponse, protos.google.privacy.dlp.v2.IRedactImageRequest | null | undefined, {} | null | undefined>): void; redactImage(request: protos.google.privacy.dlp.v2.IRedactImageRequest, callback: Callback<protos.google.privacy.dlp.v2.IRedactImageResponse, protos.google.privacy.dlp.v2.IRedactImageRequest | null | undefined, {} | null | undefined>): void; /** * De-identifies potentially sensitive info from a ContentItem. * This method has limits on input size and output size. * See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to * learn more. * * When no InfoTypes or CustomInfoTypes are specified in this request, the * system will automatically choose what detectors to run. By default this may * be all types, but may change over time as detectors are updated. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Parent resource name. * * The format of this value varies depending on whether you have [specified a * processing * location](https://cloud.google.com/dlp/docs/specifying-location): * * + Projects scope, location specified:<br/> * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> * * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * * parent=projects/example-project/locations/europe-west3 * @param {google.privacy.dlp.v2.DeidentifyConfig} request.deidentifyConfig * Configuration for the de-identification of the content item. * Items specified here will override the template referenced by the * deidentify_template_name argument. * @param {google.privacy.dlp.v2.InspectConfig} request.inspectConfig * Configuration for the inspector. * Items specified here will override the template referenced by the * inspect_template_name argument. * @param {google.privacy.dlp.v2.ContentItem} request.item * The item to de-identify. Will be treated as text. * * This value must be of type * {@link protos.google.privacy.dlp.v2.Table|Table} if your * {@link protos.google.privacy.dlp.v2.DeidentifyContentRequest.deidentify_config|deidentify_config} * is a * {@link protos.google.privacy.dlp.v2.RecordTransformations|RecordTransformations} * object. * @param {string} request.inspectTemplateName * Template to use. Any configuration directly specified in * inspect_config will override those set in the template. Singular fields * that are set in this request will replace their corresponding fields in the * template. Repeated fields are appended. Singular sub-messages and groups * are recursively merged. * @param {string} request.deidentifyTemplateName * Template to use. Any configuration directly specified in * deidentify_config will override those set in the template. Singular fields * that are set in this request will replace their corresponding fields in the * template. Repeated fields are appended. Singular sub-messages and groups * are recursively merged. * @param {string} request.locationId * Deprecated. This field has no effect. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.DeidentifyContentResponse|DeidentifyContentResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.deidentify_content.js</caption> * region_tag:dlp_v2_generated_DlpService_DeidentifyContent_async */ deidentifyContent(request?: protos.google.privacy.dlp.v2.IDeidentifyContentRequest, options?: CallOptions): Promise<[ protos.google.privacy.dlp.v2.IDeidentifyContentResponse, protos.google.privacy.dlp.v2.IDeidentifyContentRequest | undefined, {} | undefined ]>; deidentifyContent(request: protos.google.privacy.dlp.v2.IDeidentifyContentRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyContentResponse, protos.google.privacy.dlp.v2.IDeidentifyContentRequest | null | undefined, {} | null | undefined>): void; deidentifyContent(request: protos.google.privacy.dlp.v2.IDeidentifyContentRequest, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyContentResponse, protos.google.privacy.dlp.v2.IDeidentifyContentRequest | null | undefined, {} | null | undefined>): void; /** * Re-identifies content that has been de-identified. * See * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example * to learn more. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. Parent resource name. * * The format of this value varies depending on whether you have [specified a * processing * location](https://cloud.google.com/dlp/docs/specifying-location): * * + Projects scope, location specified:<br/> * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> * * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * * parent=projects/example-project/locations/europe-west3 * @param {google.privacy.dlp.v2.DeidentifyConfig} request.reidentifyConfig * Configuration for the re-identification of the content item. * This field shares the same proto message type that is used for * de-identification, however its usage here is for the reversal of the * previous de-identification. Re-identification is performed by examining * the transformations used to de-identify the items and executing the * reverse. This requires that only reversible transformations * be provided here. The reversible transformations are: * * - `CryptoDeterministicConfig` * - `CryptoReplaceFfxFpeConfig` * @param {google.privacy.dlp.v2.InspectConfig} request.inspectConfig * Configuration for the inspector. * @param {google.privacy.dlp.v2.ContentItem} request.item * The item to re-identify. Will be treated as text. * @param {string} request.inspectTemplateName * Template to use. Any configuration directly specified in * `inspect_config` will override those set in the template. Singular fields * that are set in this request will replace their corresponding fields in the * template. Repeated fields are appended. Singular sub-messages and groups * are recursively merged. * @param {string} request.reidentifyTemplateName * Template to use. References an instance of `DeidentifyTemplate`. * Any configuration directly specified in `reidentify_config` or * `inspect_config` will override those set in the template. The * `DeidentifyTemplate` used must include only reversible transformations. * Singular fields that are set in this request will replace their * corresponding fields in the template. Repeated fields are appended. * Singular sub-messages and groups are recursively merged. * @param {string} request.locationId * Deprecated. This field has no effect. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.ReidentifyContentResponse|ReidentifyContentResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.reidentify_content.js</caption> * region_tag:dlp_v2_generated_DlpService_ReidentifyContent_async */ reidentifyContent(request?: protos.google.privacy.dlp.v2.IReidentifyContentRequest, options?: CallOptions): Promise<[ protos.google.privacy.dlp.v2.IReidentifyContentResponse, protos.google.privacy.dlp.v2.IReidentifyContentRequest | undefined, {} | undefined ]>; reidentifyContent(request: protos.google.privacy.dlp.v2.IReidentifyContentRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IReidentifyContentResponse, protos.google.privacy.dlp.v2.IReidentifyContentRequest | null | undefined, {} | null | undefined>): void; reidentifyContent(request: protos.google.privacy.dlp.v2.IReidentifyContentRequest, callback: Callback<protos.google.privacy.dlp.v2.IReidentifyContentResponse, protos.google.privacy.dlp.v2.IReidentifyContentRequest | null | undefined, {} | null | undefined>): void; /** * Returns a list of the sensitive information types that DLP API * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to * learn more. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * The parent resource name. * * The format of this value is as follows: * * locations/<var>LOCATION_ID</var> * @param {string} request.languageCode * BCP-47 language code for localized infoType friendly * names. If omitted, or if localized strings are not available, * en-US strings will be returned. * @param {string} request.filter * filter to only return infoTypes supported by certain parts of the * API. Defaults to supported_by=INSPECT. * @param {string} request.locationId * Deprecated. This field has no effect. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.ListInfoTypesResponse|ListInfoTypesResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.list_info_types.js</caption> * region_tag:dlp_v2_generated_DlpService_ListInfoTypes_async */ listInfoTypes(request?: protos.google.privacy.dlp.v2.IListInfoTypesRequest, options?: CallOptions): Promise<[ protos.google.privacy.dlp.v2.IListInfoTypesResponse, protos.google.privacy.dlp.v2.IListInfoTypesRequest | undefined, {} | undefined ]>; listInfoTypes(request: protos.google.privacy.dlp.v2.IListInfoTypesRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IListInfoTypesResponse, protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, {} | null | undefined>): void; listInfoTypes(request: protos.google.privacy.dlp.v2.IListInfoTypesRequest, callback: Callback<protos.google.privacy.dlp.v2.IListInfoTypesResponse, protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, {} | null | undefined>): void; /** * Creates an InspectTemplate for reusing frequently used configuration * for inspecting content, images, and storage. * See https://cloud.google.com/dlp/docs/creating-templates to learn more. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. Parent resource name. * * The format of this value varies depending on the scope of the request * (project or organization) and whether you have [specified a processing * location](https://cloud.google.com/dlp/docs/specifying-location): * * + Projects scope, location specified:<br/> * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> * + Organizations scope, location specified:<br/> * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> * + Organizations scope, no location specified (defaults to global):<br/> * `organizations/`<var>ORG_ID</var> * * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * * parent=projects/example-project/locations/europe-west3 * @param {google.privacy.dlp.v2.InspectTemplate} request.inspectTemplate * Required. The InspectTemplate to create. * @param {string} request.templateId * The template id can contain uppercase and lowercase letters, * numbers, and hyphens; that is, it must match the regular * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 * characters. Can be empty to allow the system to generate one. * @param {string} request.locationId * Deprecated. This field has no effect. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.InspectTemplate|InspectTemplate}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.create_inspect_template.js</caption> * region_tag:dlp_v2_generated_DlpService_CreateInspectTemplate_async */ createInspectTemplate(request?: protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest, options?: CallOptions): Promise<[ protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest | undefined, {} | undefined ]>; createInspectTemplate(request: protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest | null | undefined, {} | null | undefined>): void; createInspectTemplate(request: protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest, callback: Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest | null | undefined, {} | null | undefined>): void; /** * Updates the InspectTemplate. * See https://cloud.google.com/dlp/docs/creating-templates to learn more. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. Resource name of organization and inspectTemplate to be updated, for * example `organizations/433245324/inspectTemplates/432452342` or * projects/project-id/inspectTemplates/432452342. * @param {google.privacy.dlp.v2.InspectTemplate} request.inspectTemplate * New InspectTemplate value. * @param {google.protobuf.FieldMask} request.updateMask * Mask to control which fields get updated. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.InspectTemplate|InspectTemplate}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.update_inspect_template.js</caption> * region_tag:dlp_v2_generated_DlpService_UpdateInspectTemplate_async */ updateInspectTemplate(request?: protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest, options?: CallOptions): Promise<[ protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest | undefined, {} | undefined ]>; updateInspectTemplate(request: protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest | null | undefined, {} | null | undefined>): void; updateInspectTemplate(request: protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest, callback: Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest | null | undefined, {} | null | undefined>): void; /** * Gets an InspectTemplate. * See https://cloud.google.com/dlp/docs/creating-templates to learn more. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. Resource name of the organization and inspectTemplate to be read, for * example `organizations/433245324/inspectTemplates/432452342` or * projects/project-id/inspectTemplates/432452342. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.InspectTemplate|InspectTemplate}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.get_inspect_template.js</caption> * region_tag:dlp_v2_generated_DlpService_GetInspectTemplate_async */ getInspectTemplate(request?: protos.google.privacy.dlp.v2.IGetInspectTemplateRequest, options?: CallOptions): Promise<[ protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IGetInspectTemplateRequest | undefined, {} | undefined ]>; getInspectTemplate(request: protos.google.privacy.dlp.v2.IGetInspectTemplateRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IGetInspectTemplateRequest | null | undefined, {} | null | undefined>): void; getInspectTemplate(request: protos.google.privacy.dlp.v2.IGetInspectTemplateRequest, callback: Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IGetInspectTemplateRequest | null | undefined, {} | null | undefined>): void; /** * Deletes an InspectTemplate. * See https://cloud.google.com/dlp/docs/creating-templates to learn more. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. Resource name of the organization and inspectTemplate to be deleted, for * example `organizations/433245324/inspectTemplates/432452342` or * projects/project-id/inspectTemplates/432452342. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.delete_inspect_template.js</caption> * region_tag:dlp_v2_generated_DlpService_DeleteInspectTemplate_async */ deleteInspectTemplate(request?: protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest | undefined, {} | undefined ]>; deleteInspectTemplate(request: protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest | null | undefined, {} | null | undefined>): void; deleteInspectTemplate(request: protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest | null | undefined, {} | null | undefined>): void; /** * Creates a DeidentifyTemplate for reusing frequently used configuration * for de-identifying content, images, and storage. * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn * more. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. Parent resource name. * * The format of this value varies depending on the scope of the request * (project or organization) and whether you have [specified a processing * location](https://cloud.google.com/dlp/docs/specifying-location): * * + Projects scope, location specified:<br/> * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> * + Organizations scope, location specified:<br/> * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> * + Organizations scope, no location specified (defaults to global):<br/> * `organizations/`<var>ORG_ID</var> * * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * * parent=projects/example-project/locations/europe-west3 * @param {google.privacy.dlp.v2.DeidentifyTemplate} request.deidentifyTemplate * Required. The DeidentifyTemplate to create. * @param {string} request.templateId * The template id can contain uppercase and lowercase letters, * numbers, and hyphens; that is, it must match the regular * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 * characters. Can be empty to allow the system to generate one. * @param {string} request.locationId * Deprecated. This field has no effect. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.DeidentifyTemplate|DeidentifyTemplate}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.create_deidentify_template.js</caption> * region_tag:dlp_v2_generated_DlpService_CreateDeidentifyTemplate_async */ createDeidentifyTemplate(request?: protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest, options?: CallOptions): Promise<[ protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest | undefined, {} | undefined ]>; createDeidentifyTemplate(request: protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void; createDeidentifyTemplate(request: protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void; /** * Updates the DeidentifyTemplate. * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn * more. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. Resource name of organization and deidentify template to be updated, for * example `organizations/433245324/deidentifyTemplates/432452342` or * projects/project-id/deidentifyTemplates/432452342. * @param {google.privacy.dlp.v2.DeidentifyTemplate} request.deidentifyTemplate * New DeidentifyTemplate value. * @param {google.protobuf.FieldMask} request.updateMask * Mask to control which fields get updated. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.DeidentifyTemplate|DeidentifyTemplate}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.update_deidentify_template.js</caption> * region_tag:dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_async */ updateDeidentifyTemplate(request?: protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, options?: CallOptions): Promise<[ protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest | undefined, {} | undefined ]>; updateDeidentifyTemplate(request: protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void; updateDeidentifyTemplate(request: protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void; /** * Gets a DeidentifyTemplate. * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn * more. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. Resource name of the organization and deidentify template to be read, for * example `organizations/433245324/deidentifyTemplates/432452342` or * projects/project-id/deidentifyTemplates/432452342. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.DeidentifyTemplate|DeidentifyTemplate}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.get_deidentify_template.js</caption> * region_tag:dlp_v2_generated_DlpService_GetDeidentifyTemplate_async */ getDeidentifyTemplate(request?: protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, options?: CallOptions): Promise<[ protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest | undefined, {} | undefined ]>; getDeidentifyTemplate(request: protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void; getDeidentifyTemplate(request: protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void; /** * Deletes a DeidentifyTemplate. * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn * more. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. Resource name of the organization and deidentify template to be deleted, * for example `organizations/433245324/deidentifyTemplates/432452342` or * projects/project-id/deidentifyTemplates/432452342. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.delete_deidentify_template.js</caption> * region_tag:dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_async */ deleteDeidentifyTemplate(request?: protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest | undefined, {} | undefined ]>; deleteDeidentifyTemplate(request: protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void; deleteDeidentifyTemplate(request: protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void; /** * Creates a job trigger to run DLP actions such as scanning storage for * sensitive information on a set schedule. * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. Parent resource name. * * The format of this value varies depending on whether you have [specified a * processing * location](https://cloud.google.com/dlp/docs/specifying-location): * * + Projects scope, location specified:<br/> * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> * * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * * parent=projects/example-project/locations/europe-west3 * @param {google.privacy.dlp.v2.JobTrigger} request.jobTrigger * Required. The JobTrigger to create. * @param {string} request.triggerId * The trigger id can contain uppercase and lowercase letters, * numbers, and hyphens; that is, it must match the regular * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 * characters. Can be empty to allow the system to generate one. * @param {string} request.locationId * Deprecated. This field has no effect. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.JobTrigger|JobTrigger}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.create_job_trigger.js</caption> * region_tag:dlp_v2_generated_DlpService_CreateJobTrigger_async */ createJobTrigger(request?: protos.google.privacy.dlp.v2.ICreateJobTriggerRequest, options?: CallOptions): Promise<[ protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | undefined, {} | undefined ]>; createJobTrigger(request: protos.google.privacy.dlp.v2.ICreateJobTriggerRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | null | undefined, {} | null | undefined>): void; createJobTrigger(request: protos.google.privacy.dlp.v2.ICreateJobTriggerRequest, callback: Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | null | undefined, {} | null | undefined>): void; /** * Updates a job trigger. * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. Resource name of the project and the triggeredJob, for example * `projects/dlp-test-project/jobTriggers/53234423`. * @param {google.privacy.dlp.v2.JobTrigger} request.jobTrigger * New JobTrigger value. * @param {google.protobuf.FieldMask} request.updateMask * Mask to control which fields get updated. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.JobTrigger|JobTrigger}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v2/dlp_service.update_job_trigger.js</caption> * region_tag:dlp_v2_generated_DlpService_UpdateJobTrigger_async */ updateJobTrigger(request?: protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest, options?: CallOptions): Promise<[ protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | undefined, {} | undefined ]>; updateJobTrigger(request: protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | null | undefined, {} | null | undefined>): void; updateJobTrigger(request: protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest, callback: Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | null | undefined, {} | null | undefined>): void; /** * Inspect hybrid content and store findings to a trigger. The inspection * will be processed asynchron