From e8e7af9e3c5bf97e0554e50756d0a4677ed67098 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 14:53:17 -0800 Subject: [PATCH] docs(samples): add example tags to generated samples (#666) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(samples): add example tags to generated samples PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../google-privacy-dlp/linkinator.config.json | 2 +- .../v2/dlp_service.activate_job_trigger.js | 4 +- .../v2/dlp_service.cancel_dlp_job.js | 4 +- .../dlp_service.create_deidentify_template.js | 14 +- .../v2/dlp_service.create_dlp_job.js | 16 +- .../v2/dlp_service.create_inspect_template.js | 14 +- .../v2/dlp_service.create_job_trigger.js | 14 +- .../v2/dlp_service.create_stored_info_type.js | 14 +- .../v2/dlp_service.deidentify_content.js | 18 +- .../dlp_service.delete_deidentify_template.js | 4 +- .../v2/dlp_service.delete_dlp_job.js | 4 +- .../v2/dlp_service.delete_inspect_template.js | 4 +- .../v2/dlp_service.delete_job_trigger.js | 4 +- .../v2/dlp_service.delete_stored_info_type.js | 4 +- .../v2/dlp_service.finish_dlp_job.js | 4 +- .../v2/dlp_service.get_deidentify_template.js | 4 +- .../generated/v2/dlp_service.get_dlp_job.js | 4 +- .../v2/dlp_service.get_inspect_template.js | 4 +- .../v2/dlp_service.get_job_trigger.js | 4 +- .../v2/dlp_service.get_stored_info_type.js | 4 +- .../v2/dlp_service.hybrid_inspect_dlp_job.js | 6 +- .../dlp_service.hybrid_inspect_job_trigger.js | 6 +- .../v2/dlp_service.inspect_content.js | 16 +- .../dlp_service.list_deidentify_templates.js | 12 +- .../generated/v2/dlp_service.list_dlp_jobs.js | 14 +- .../v2/dlp_service.list_info_types.js | 8 +- .../v2/dlp_service.list_inspect_templates.js | 12 +- .../v2/dlp_service.list_job_triggers.js | 12 +- .../v2/dlp_service.list_stored_info_types.js | 12 +- .../generated/v2/dlp_service.redact_image.js | 16 +- .../v2/dlp_service.reidentify_content.js | 18 +- .../dlp_service.update_deidentify_template.js | 8 +- .../v2/dlp_service.update_inspect_template.js | 8 +- .../v2/dlp_service.update_job_trigger.js | 8 +- .../v2/dlp_service.update_stored_info_type.js | 8 +- .../src/v2/dlp_service_client.ts | 1798 ++++++++--------- 36 files changed, 1013 insertions(+), 1093 deletions(-) diff --git a/packages/google-privacy-dlp/linkinator.config.json b/packages/google-privacy-dlp/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-privacy-dlp/linkinator.config.json +++ b/packages/google-privacy-dlp/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.activate_job_trigger.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.activate_job_trigger.js index eaae036e660..a36e55ead3e 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.activate_job_trigger.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.activate_job_trigger.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function activateJobTrigger() { + async function callActivateJobTrigger() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - activateJobTrigger(); + callActivateJobTrigger(); // [END dlp_v2_generated_DlpService_ActivateJobTrigger_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.cancel_dlp_job.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.cancel_dlp_job.js index 4a648e59eaf..a3cb1d3d8a5 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.cancel_dlp_job.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.cancel_dlp_job.js @@ -30,7 +30,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function cancelDlpJob() { + async function callCancelDlpJob() { // Construct request const request = { name, @@ -41,7 +41,7 @@ function main(name) { console.log(response); } - cancelDlpJob(); + callCancelDlpJob(); // [END dlp_v2_generated_DlpService_CancelDlpJob_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_deidentify_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_deidentify_template.js index 00ffdde87d3..4b85f400479 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_deidentify_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_deidentify_template.js @@ -22,8 +22,8 @@ function main(parent, deidentifyTemplate) { /** * 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): + * (project or organization) and whether you have specified a processing + * location (https://cloud.google.com/dlp/docs/specifying-location): * + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
@@ -41,7 +41,7 @@ function main(parent, deidentifyTemplate) { /** * Required. The DeidentifyTemplate to create. */ - // const deidentifyTemplate = '' + // const deidentifyTemplate = {} /** * The template id can contain uppercase and lowercase letters, * numbers, and hyphens; that is, it must match the regular @@ -49,10 +49,6 @@ function main(parent, deidentifyTemplate) { * characters. Can be empty to allow the system to generate one. */ // const templateId = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -60,7 +56,7 @@ function main(parent, deidentifyTemplate) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function createDeidentifyTemplate() { + async function callCreateDeidentifyTemplate() { // Construct request const request = { parent, @@ -72,7 +68,7 @@ function main(parent, deidentifyTemplate) { console.log(response); } - createDeidentifyTemplate(); + callCreateDeidentifyTemplate(); // [END dlp_v2_generated_DlpService_CreateDeidentifyTemplate_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_dlp_job.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_dlp_job.js index 62b76b862e4..f70df421d5f 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_dlp_job.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_dlp_job.js @@ -21,9 +21,9 @@ function main(parent) { */ /** * Required. Parent resource name. - * The format of this value varies depending on whether you have [specified a + * The format of this value varies depending on whether you have specified a * processing - * location](https://cloud.google.com/dlp/docs/specifying-location): + * location (https://cloud.google.com/dlp/docs/specifying-location): * + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
@@ -37,11 +37,11 @@ function main(parent) { /** * Set to control what and how to inspect. */ - // const inspectJob = '' + // const inspectJob = {} /** * Set to choose what metric to calculate. */ - // const riskJob = '' + // const riskJob = {} /** * The job id can contain uppercase and lowercase letters, * numbers, and hyphens; that is, it must match the regular @@ -49,10 +49,6 @@ function main(parent) { * characters. Can be empty to allow the system to generate one. */ // const jobId = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -60,7 +56,7 @@ function main(parent) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function createDlpJob() { + async function callCreateDlpJob() { // Construct request const request = { parent, @@ -71,7 +67,7 @@ function main(parent) { console.log(response); } - createDlpJob(); + callCreateDlpJob(); // [END dlp_v2_generated_DlpService_CreateDlpJob_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_inspect_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_inspect_template.js index 965e0a8b0b6..f844afcdfec 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_inspect_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_inspect_template.js @@ -22,8 +22,8 @@ function main(parent, inspectTemplate) { /** * 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): + * (project or organization) and whether you have specified a processing + * location (https://cloud.google.com/dlp/docs/specifying-location): * + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
@@ -41,7 +41,7 @@ function main(parent, inspectTemplate) { /** * Required. The InspectTemplate to create. */ - // const inspectTemplate = '' + // const inspectTemplate = {} /** * The template id can contain uppercase and lowercase letters, * numbers, and hyphens; that is, it must match the regular @@ -49,10 +49,6 @@ function main(parent, inspectTemplate) { * characters. Can be empty to allow the system to generate one. */ // const templateId = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -60,7 +56,7 @@ function main(parent, inspectTemplate) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function createInspectTemplate() { + async function callCreateInspectTemplate() { // Construct request const request = { parent, @@ -72,7 +68,7 @@ function main(parent, inspectTemplate) { console.log(response); } - createInspectTemplate(); + callCreateInspectTemplate(); // [END dlp_v2_generated_DlpService_CreateInspectTemplate_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_job_trigger.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_job_trigger.js index 286952462ac..adb2873c5f5 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_job_trigger.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_job_trigger.js @@ -21,9 +21,9 @@ function main(parent, jobTrigger) { */ /** * Required. Parent resource name. - * The format of this value varies depending on whether you have [specified a + * The format of this value varies depending on whether you have specified a * processing - * location](https://cloud.google.com/dlp/docs/specifying-location): + * location (https://cloud.google.com/dlp/docs/specifying-location): * + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
@@ -37,7 +37,7 @@ function main(parent, jobTrigger) { /** * Required. The JobTrigger to create. */ - // const jobTrigger = '' + // const jobTrigger = {} /** * The trigger id can contain uppercase and lowercase letters, * numbers, and hyphens; that is, it must match the regular @@ -45,10 +45,6 @@ function main(parent, jobTrigger) { * characters. Can be empty to allow the system to generate one. */ // const triggerId = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -56,7 +52,7 @@ function main(parent, jobTrigger) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function createJobTrigger() { + async function callCreateJobTrigger() { // Construct request const request = { parent, @@ -68,7 +64,7 @@ function main(parent, jobTrigger) { console.log(response); } - createJobTrigger(); + callCreateJobTrigger(); // [END dlp_v2_generated_DlpService_CreateJobTrigger_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_stored_info_type.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_stored_info_type.js index 2d3308452f9..a6c765c38ff 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_stored_info_type.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_stored_info_type.js @@ -22,8 +22,8 @@ function main(parent, config) { /** * 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): + * (project or organization) and whether you have specified a processing + * location (https://cloud.google.com/dlp/docs/specifying-location): * + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
@@ -41,7 +41,7 @@ function main(parent, config) { /** * Required. Configuration of the storedInfoType to create. */ - // const config = '' + // const config = {} /** * The storedInfoType ID can contain uppercase and lowercase letters, * numbers, and hyphens; that is, it must match the regular @@ -49,10 +49,6 @@ function main(parent, config) { * characters. Can be empty to allow the system to generate one. */ // const storedInfoTypeId = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -60,7 +56,7 @@ function main(parent, config) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function createStoredInfoType() { + async function callCreateStoredInfoType() { // Construct request const request = { parent, @@ -72,7 +68,7 @@ function main(parent, config) { console.log(response); } - createStoredInfoType(); + callCreateStoredInfoType(); // [END dlp_v2_generated_DlpService_CreateStoredInfoType_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.deidentify_content.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.deidentify_content.js index 4ddbf5be771..c84750343c7 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.deidentify_content.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.deidentify_content.js @@ -21,9 +21,9 @@ function main() { */ /** * Parent resource name. - * The format of this value varies depending on whether you have [specified a + * The format of this value varies depending on whether you have specified a * processing - * location](https://cloud.google.com/dlp/docs/specifying-location): + * location (https://cloud.google.com/dlp/docs/specifying-location): * + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
@@ -39,17 +39,17 @@ function main() { * Items specified here will override the template referenced by the * deidentify_template_name argument. */ - // const deidentifyConfig = '' + // const deidentifyConfig = {} /** * Configuration for the inspector. * Items specified here will override the template referenced by the * inspect_template_name argument. */ - // const inspectConfig = '' + // const inspectConfig = {} /** * The item to de-identify. Will be treated as text. */ - // const item = '' + // const item = {} /** * Template to use. Any configuration directly specified in * inspect_config will override those set in the template. Singular fields @@ -66,10 +66,6 @@ function main() { * are recursively merged. */ // const deidentifyTemplateName = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -77,7 +73,7 @@ function main() { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function deidentifyContent() { + async function callDeidentifyContent() { // Construct request const request = {}; @@ -86,7 +82,7 @@ function main() { console.log(response); } - deidentifyContent(); + callDeidentifyContent(); // [END dlp_v2_generated_DlpService_DeidentifyContent_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_deidentify_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_deidentify_template.js index e5338a3b071..c107722894b 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_deidentify_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_deidentify_template.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function deleteDeidentifyTemplate() { + async function callDeleteDeidentifyTemplate() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - deleteDeidentifyTemplate(); + callDeleteDeidentifyTemplate(); // [END dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_dlp_job.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_dlp_job.js index f16b54b4407..959a9d1a80d 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_dlp_job.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_dlp_job.js @@ -30,7 +30,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function deleteDlpJob() { + async function callDeleteDlpJob() { // Construct request const request = { name, @@ -41,7 +41,7 @@ function main(name) { console.log(response); } - deleteDlpJob(); + callDeleteDlpJob(); // [END dlp_v2_generated_DlpService_DeleteDlpJob_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_inspect_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_inspect_template.js index 62e75ec1c8d..5ce2d8b5303 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_inspect_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_inspect_template.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function deleteInspectTemplate() { + async function callDeleteInspectTemplate() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - deleteInspectTemplate(); + callDeleteInspectTemplate(); // [END dlp_v2_generated_DlpService_DeleteInspectTemplate_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_job_trigger.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_job_trigger.js index 7f4007826ad..8b451e600e5 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_job_trigger.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_job_trigger.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function deleteJobTrigger() { + async function callDeleteJobTrigger() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - deleteJobTrigger(); + callDeleteJobTrigger(); // [END dlp_v2_generated_DlpService_DeleteJobTrigger_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_stored_info_type.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_stored_info_type.js index a0259ff613d..fd2ba7145b1 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_stored_info_type.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_stored_info_type.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function deleteStoredInfoType() { + async function callDeleteStoredInfoType() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - deleteStoredInfoType(); + callDeleteStoredInfoType(); // [END dlp_v2_generated_DlpService_DeleteStoredInfoType_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.finish_dlp_job.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.finish_dlp_job.js index 0f071764899..43693f00937 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.finish_dlp_job.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.finish_dlp_job.js @@ -30,7 +30,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function finishDlpJob() { + async function callFinishDlpJob() { // Construct request const request = { name, @@ -41,7 +41,7 @@ function main(name) { console.log(response); } - finishDlpJob(); + callFinishDlpJob(); // [END dlp_v2_generated_DlpService_FinishDlpJob_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_deidentify_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_deidentify_template.js index 25674f1882f..fb959a41d57 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_deidentify_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_deidentify_template.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function getDeidentifyTemplate() { + async function callGetDeidentifyTemplate() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - getDeidentifyTemplate(); + callGetDeidentifyTemplate(); // [END dlp_v2_generated_DlpService_GetDeidentifyTemplate_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_dlp_job.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_dlp_job.js index fb2440e4e66..dc8cb66b819 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_dlp_job.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_dlp_job.js @@ -30,7 +30,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function getDlpJob() { + async function callGetDlpJob() { // Construct request const request = { name, @@ -41,7 +41,7 @@ function main(name) { console.log(response); } - getDlpJob(); + callGetDlpJob(); // [END dlp_v2_generated_DlpService_GetDlpJob_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_inspect_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_inspect_template.js index fc89fa5db82..4857cd55f64 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_inspect_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_inspect_template.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function getInspectTemplate() { + async function callGetInspectTemplate() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - getInspectTemplate(); + callGetInspectTemplate(); // [END dlp_v2_generated_DlpService_GetInspectTemplate_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_job_trigger.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_job_trigger.js index 70166d6c97d..35574d8f064 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_job_trigger.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_job_trigger.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function getJobTrigger() { + async function callGetJobTrigger() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - getJobTrigger(); + callGetJobTrigger(); // [END dlp_v2_generated_DlpService_GetJobTrigger_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_stored_info_type.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_stored_info_type.js index 388b76ca853..69069bd3424 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_stored_info_type.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_stored_info_type.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function getStoredInfoType() { + async function callGetStoredInfoType() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - getStoredInfoType(); + callGetStoredInfoType(); // [END dlp_v2_generated_DlpService_GetStoredInfoType_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_dlp_job.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_dlp_job.js index b54b7b3e74b..5cf38086d93 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_dlp_job.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_dlp_job.js @@ -27,7 +27,7 @@ function main(name) { /** * The item to inspect. */ - // const hybridItem = '' + // const hybridItem = {} // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -35,7 +35,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function hybridInspectDlpJob() { + async function callHybridInspectDlpJob() { // Construct request const request = { name, @@ -46,7 +46,7 @@ function main(name) { console.log(response); } - hybridInspectDlpJob(); + callHybridInspectDlpJob(); // [END dlp_v2_generated_DlpService_HybridInspectDlpJob_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_job_trigger.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_job_trigger.js index 812e1cdd3ef..b52181d2ec5 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_job_trigger.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_job_trigger.js @@ -27,7 +27,7 @@ function main(name) { /** * The item to inspect. */ - // const hybridItem = '' + // const hybridItem = {} // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -35,7 +35,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function hybridInspectJobTrigger() { + async function callHybridInspectJobTrigger() { // Construct request const request = { name, @@ -46,7 +46,7 @@ function main(name) { console.log(response); } - hybridInspectJobTrigger(); + callHybridInspectJobTrigger(); // [END dlp_v2_generated_DlpService_HybridInspectJobTrigger_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.inspect_content.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.inspect_content.js index 8fb46996000..0f21d02f61d 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.inspect_content.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.inspect_content.js @@ -21,9 +21,9 @@ function main() { */ /** * Parent resource name. - * The format of this value varies depending on whether you have [specified a + * The format of this value varies depending on whether you have specified a * processing - * location](https://cloud.google.com/dlp/docs/specifying-location): + * location (https://cloud.google.com/dlp/docs/specifying-location): * + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
@@ -38,11 +38,11 @@ function main() { * Configuration for the inspector. What specified here will override * the template referenced by the inspect_template_name argument. */ - // const inspectConfig = '' + // const inspectConfig = {} /** * The item to inspect. */ - // const item = '' + // const item = {} /** * Template to use. Any configuration directly specified in * inspect_config will override those set in the template. Singular fields @@ -51,10 +51,6 @@ function main() { * are recursively merged. */ // const inspectTemplateName = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -62,7 +58,7 @@ function main() { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function inspectContent() { + async function callInspectContent() { // Construct request const request = {}; @@ -71,7 +67,7 @@ function main() { console.log(response); } - inspectContent(); + callInspectContent(); // [END dlp_v2_generated_DlpService_InspectContent_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_deidentify_templates.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_deidentify_templates.js index fea2253ea1f..48066c51d24 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_deidentify_templates.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_deidentify_templates.js @@ -22,8 +22,8 @@ function main(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): + * (project or organization) and whether you have specified a processing + * location (https://cloud.google.com/dlp/docs/specifying-location): * + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
@@ -61,10 +61,6 @@ function main(parent) { * - `display_name`: corresponds to template's display name. */ // const orderBy = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -72,7 +68,7 @@ function main(parent) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function listDeidentifyTemplates() { + async function callListDeidentifyTemplates() { // Construct request const request = { parent, @@ -85,7 +81,7 @@ function main(parent) { } } - listDeidentifyTemplates(); + callListDeidentifyTemplates(); // [END dlp_v2_generated_DlpService_ListDeidentifyTemplates_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_dlp_jobs.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_dlp_jobs.js index 7d4ceaa5059..c2808d20f32 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_dlp_jobs.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_dlp_jobs.js @@ -21,9 +21,9 @@ function main(parent) { */ /** * Required. Parent resource name. - * The format of this value varies depending on whether you have [specified a + * The format of this value varies depending on whether you have specified a * processing - * location](https://cloud.google.com/dlp/docs/specifying-location): + * location (https://cloud.google.com/dlp/docs/specifying-location): * + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
@@ -71,7 +71,7 @@ function main(parent) { /** * The type of job. Defaults to `DlpJobType.INSPECT` */ - // const type = '' + // const type = {} /** * Comma separated list of fields to order by, * followed by `asc` or `desc` postfix. This list is case-insensitive, @@ -85,10 +85,6 @@ function main(parent) { * - `state`: corresponds to `state` */ // const orderBy = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -96,7 +92,7 @@ function main(parent) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function listDlpJobs() { + async function callListDlpJobs() { // Construct request const request = { parent, @@ -109,7 +105,7 @@ function main(parent) { } } - listDlpJobs(); + callListDlpJobs(); // [END dlp_v2_generated_DlpService_ListDlpJobs_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_info_types.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_info_types.js index a862198f2c6..33bdce24869 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_info_types.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_info_types.js @@ -36,10 +36,6 @@ function main() { * API. Defaults to supported_by=INSPECT. */ // const filter = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -47,7 +43,7 @@ function main() { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function listInfoTypes() { + async function callListInfoTypes() { // Construct request const request = {}; @@ -56,7 +52,7 @@ function main() { console.log(response); } - listInfoTypes(); + callListInfoTypes(); // [END dlp_v2_generated_DlpService_ListInfoTypes_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_inspect_templates.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_inspect_templates.js index b992b5c29eb..8434623824d 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_inspect_templates.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_inspect_templates.js @@ -22,8 +22,8 @@ function main(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): + * (project or organization) and whether you have specified a processing + * location (https://cloud.google.com/dlp/docs/specifying-location): * + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
@@ -61,10 +61,6 @@ function main(parent) { * - `display_name`: corresponds to template's display name. */ // const orderBy = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -72,7 +68,7 @@ function main(parent) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function listInspectTemplates() { + async function callListInspectTemplates() { // Construct request const request = { parent, @@ -85,7 +81,7 @@ function main(parent) { } } - listInspectTemplates(); + callListInspectTemplates(); // [END dlp_v2_generated_DlpService_ListInspectTemplates_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_job_triggers.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_job_triggers.js index 5939cd2a92b..ceb30134a77 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_job_triggers.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_job_triggers.js @@ -21,9 +21,9 @@ function main(parent) { */ /** * Required. Parent resource name. - * The format of this value varies depending on whether you have [specified a + * The format of this value varies depending on whether you have specified a * processing - * location](https://cloud.google.com/dlp/docs/specifying-location): + * location (https://cloud.google.com/dlp/docs/specifying-location): * + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
@@ -81,10 +81,6 @@ function main(parent) { * The length of this field should be no more than 500 characters. */ // const filter = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -92,7 +88,7 @@ function main(parent) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function listJobTriggers() { + async function callListJobTriggers() { // Construct request const request = { parent, @@ -105,7 +101,7 @@ function main(parent) { } } - listJobTriggers(); + callListJobTriggers(); // [END dlp_v2_generated_DlpService_ListJobTriggers_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_stored_info_types.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_stored_info_types.js index dbc2a531b74..d76dafa9360 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_stored_info_types.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_stored_info_types.js @@ -22,8 +22,8 @@ function main(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): + * (project or organization) and whether you have specified a processing + * location (https://cloud.google.com/dlp/docs/specifying-location): * + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
@@ -62,10 +62,6 @@ function main(parent) { * - `display_name`: corresponds to info type's display name. */ // const orderBy = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -73,7 +69,7 @@ function main(parent) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function listStoredInfoTypes() { + async function callListStoredInfoTypes() { // Construct request const request = { parent, @@ -86,7 +82,7 @@ function main(parent) { } } - listStoredInfoTypes(); + callListStoredInfoTypes(); // [END dlp_v2_generated_DlpService_ListStoredInfoTypes_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.redact_image.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.redact_image.js index a7fc2eddbab..4953dc365a9 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.redact_image.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.redact_image.js @@ -21,9 +21,9 @@ function main() { */ /** * Parent resource name. - * The format of this value varies depending on whether you have [specified a + * The format of this value varies depending on whether you have specified a * processing - * location](https://cloud.google.com/dlp/docs/specifying-location): + * location (https://cloud.google.com/dlp/docs/specifying-location): * + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
@@ -34,14 +34,10 @@ function main() { * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' /** * Configuration for the inspector. */ - // const inspectConfig = '' + // const inspectConfig = {} /** * The configuration for specifying what content to redact from images. */ @@ -54,7 +50,7 @@ function main() { /** * The content must be PNG, JPEG, SVG or BMP. */ - // const byteItem = '' + // const byteItem = {} // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -62,7 +58,7 @@ function main() { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function redactImage() { + async function callRedactImage() { // Construct request const request = {}; @@ -71,7 +67,7 @@ function main() { console.log(response); } - redactImage(); + callRedactImage(); // [END dlp_v2_generated_DlpService_RedactImage_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.reidentify_content.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.reidentify_content.js index 6b8ead940f0..85ddc23145d 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.reidentify_content.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.reidentify_content.js @@ -21,9 +21,9 @@ function main(parent) { */ /** * Required. Parent resource name. - * The format of this value varies depending on whether you have [specified a + * The format of this value varies depending on whether you have specified a * processing - * location](https://cloud.google.com/dlp/docs/specifying-location): + * location (https://cloud.google.com/dlp/docs/specifying-location): * + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
@@ -45,15 +45,15 @@ function main(parent) { * - `CryptoDeterministicConfig` * - `CryptoReplaceFfxFpeConfig` */ - // const reidentifyConfig = '' + // const reidentifyConfig = {} /** * Configuration for the inspector. */ - // const inspectConfig = '' + // const inspectConfig = {} /** * The item to re-identify. Will be treated as text. */ - // const item = '' + // const item = {} /** * Template to use. Any configuration directly specified in * `inspect_config` will override those set in the template. Singular fields @@ -72,10 +72,6 @@ function main(parent) { * Singular sub-messages and groups are recursively merged. */ // const reidentifyTemplateName = 'abc123' - /** - * Deprecated. This field has no effect. - */ - // const locationId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -83,7 +79,7 @@ function main(parent) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function reidentifyContent() { + async function callReidentifyContent() { // Construct request const request = { parent, @@ -94,7 +90,7 @@ function main(parent) { console.log(response); } - reidentifyContent(); + callReidentifyContent(); // [END dlp_v2_generated_DlpService_ReidentifyContent_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_deidentify_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_deidentify_template.js index 09e3c34047b..fe6fec4257f 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_deidentify_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_deidentify_template.js @@ -28,11 +28,11 @@ function main(name) { /** * New DeidentifyTemplate value. */ - // const deidentifyTemplate = '' + // const deidentifyTemplate = {} /** * Mask to control which fields get updated. */ - // const updateMask = '' + // const updateMask = {} // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -40,7 +40,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function updateDeidentifyTemplate() { + async function callUpdateDeidentifyTemplate() { // Construct request const request = { name, @@ -51,7 +51,7 @@ function main(name) { console.log(response); } - updateDeidentifyTemplate(); + callUpdateDeidentifyTemplate(); // [END dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_inspect_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_inspect_template.js index 85de6d70df2..c06f68f15d2 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_inspect_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_inspect_template.js @@ -28,11 +28,11 @@ function main(name) { /** * New InspectTemplate value. */ - // const inspectTemplate = '' + // const inspectTemplate = {} /** * Mask to control which fields get updated. */ - // const updateMask = '' + // const updateMask = {} // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -40,7 +40,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function updateInspectTemplate() { + async function callUpdateInspectTemplate() { // Construct request const request = { name, @@ -51,7 +51,7 @@ function main(name) { console.log(response); } - updateInspectTemplate(); + callUpdateInspectTemplate(); // [END dlp_v2_generated_DlpService_UpdateInspectTemplate_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_job_trigger.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_job_trigger.js index 74150330431..515feba5ecd 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_job_trigger.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_job_trigger.js @@ -27,11 +27,11 @@ function main(name) { /** * New JobTrigger value. */ - // const jobTrigger = '' + // const jobTrigger = {} /** * Mask to control which fields get updated. */ - // const updateMask = '' + // const updateMask = {} // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -39,7 +39,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function updateJobTrigger() { + async function callUpdateJobTrigger() { // Construct request const request = { name, @@ -50,7 +50,7 @@ function main(name) { console.log(response); } - updateJobTrigger(); + callUpdateJobTrigger(); // [END dlp_v2_generated_DlpService_UpdateJobTrigger_async] } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_stored_info_type.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_stored_info_type.js index 75cd7a10297..81bdd0ff5cb 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_stored_info_type.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_stored_info_type.js @@ -30,11 +30,11 @@ function main(name) { * version of the storedInfoType will be created with the existing * configuration. */ - // const config = '' + // const config = {} /** * Mask to control which fields get updated. */ - // const updateMask = '' + // const updateMask = {} // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; @@ -42,7 +42,7 @@ function main(name) { // Instantiates a client const dlpClient = new DlpServiceClient(); - async function updateStoredInfoType() { + async function callUpdateStoredInfoType() { // Construct request const request = { name, @@ -53,7 +53,7 @@ function main(name) { console.log(response); } - updateStoredInfoType(); + callUpdateStoredInfoType(); // [END dlp_v2_generated_DlpService_UpdateStoredInfoType_async] } diff --git a/packages/google-privacy-dlp/src/v2/dlp_service_client.ts b/packages/google-privacy-dlp/src/v2/dlp_service_client.ts index b602ce261cb..b70f9d502d8 100644 --- a/packages/google-privacy-dlp/src/v2/dlp_service_client.ts +++ b/packages/google-privacy-dlp/src/v2/dlp_service_client.ts @@ -438,33 +438,6 @@ export class DlpServiceClient { // ------------------- // -- Service calls -- // ------------------- - 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; /** * Finds potentially sensitive info in content. * This method has limits on input size, processing time, and output size. @@ -515,9 +488,36 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.inspectContent(request); + * @example include:samples/generated/v2/dlp_service.inspect_content.js + * 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; inspectContent( request?: protos.google.privacy.dlp.v2.IInspectContentRequest, optionsOrCallback?: @@ -559,33 +559,6 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.inspectContent(request, options, callback); } - 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; /** * Redacts potentially sensitive info from an image. * This method has limits on input size, processing time, and output size. @@ -633,9 +606,36 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.redactImage(request); + * @example include:samples/generated/v2/dlp_service.redact_image.js + * 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; redactImage( request?: protos.google.privacy.dlp.v2.IRedactImageRequest, optionsOrCallback?: @@ -675,33 +675,6 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.redactImage(request, options, callback); } - 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; /** * De-identifies potentially sensitive info from a ContentItem. * This method has limits on input size and output size. @@ -762,9 +735,36 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.deidentifyContent(request); + * @example include:samples/generated/v2/dlp_service.deidentify_content.js + * 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; deidentifyContent( request?: protos.google.privacy.dlp.v2.IDeidentifyContentRequest, optionsOrCallback?: @@ -806,33 +806,6 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.deidentifyContent(request, options, callback); } - 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; /** * Re-identifies content that has been de-identified. * See @@ -896,9 +869,36 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.reidentifyContent(request); + * @example include:samples/generated/v2/dlp_service.reidentify_content.js + * 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; reidentifyContent( request?: protos.google.privacy.dlp.v2.IReidentifyContentRequest, optionsOrCallback?: @@ -940,33 +940,6 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.reidentifyContent(request, options, callback); } - 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; /** * Returns a list of the sensitive information types that the DLP API * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to @@ -996,23 +969,50 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.listInfoTypes(request); + * @example include:samples/generated/v2/dlp_service.list_info_types.js + * region_tag:dlp_v2_generated_DlpService_ListInfoTypes_async */ listInfoTypes( request?: protos.google.privacy.dlp.v2.IListInfoTypesRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.privacy.dlp.v2.IListInfoTypesResponse, - protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.privacy.dlp.v2.IListInfoTypesResponse, - protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, - {} | null | undefined - > + 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; + listInfoTypes( + request?: protos.google.privacy.dlp.v2.IListInfoTypesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IListInfoTypesResponse, + protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IListInfoTypesResponse, + protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, + {} | null | undefined + > ): Promise< [ protos.google.privacy.dlp.v2.IListInfoTypesResponse, @@ -1038,37 +1038,6 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.listInfoTypes(request, options, callback); } - 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; /** * Creates an InspectTemplate for re-using frequently used configuration * for inspecting content, images, and storage. @@ -1113,9 +1082,40 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.createInspectTemplate(request); + * @example include:samples/generated/v2/dlp_service.create_inspect_template.js + * 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; createInspectTemplate( request?: protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest, optionsOrCallback?: @@ -1159,6 +1159,30 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.createInspectTemplate(request, options, callback); } + /** + * 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 [InspectTemplate]{@link google.privacy.dlp.v2.InspectTemplate}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.update_inspect_template.js + * region_tag:dlp_v2_generated_DlpService_UpdateInspectTemplate_async + */ updateInspectTemplate( request?: protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest, options?: CallOptions @@ -1190,30 +1214,6 @@ export class DlpServiceClient { {} | 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 [InspectTemplate]{@link google.privacy.dlp.v2.InspectTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.updateInspectTemplate(request); - */ updateInspectTemplate( request?: protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest, optionsOrCallback?: @@ -1257,6 +1257,26 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.updateInspectTemplate(request, options, callback); } + /** + * 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 [InspectTemplate]{@link google.privacy.dlp.v2.InspectTemplate}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_inspect_template.js + * region_tag:dlp_v2_generated_DlpService_GetInspectTemplate_async + */ getInspectTemplate( request?: protos.google.privacy.dlp.v2.IGetInspectTemplateRequest, options?: CallOptions @@ -1288,26 +1308,6 @@ export class DlpServiceClient { {} | 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 [InspectTemplate]{@link google.privacy.dlp.v2.InspectTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getInspectTemplate(request); - */ getInspectTemplate( request?: protos.google.privacy.dlp.v2.IGetInspectTemplateRequest, optionsOrCallback?: @@ -1351,6 +1351,26 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.getInspectTemplate(request, options, callback); } + /** + * 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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.delete_inspect_template.js + * region_tag:dlp_v2_generated_DlpService_DeleteInspectTemplate_async + */ deleteInspectTemplate( request?: protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest, options?: CallOptions @@ -1382,26 +1402,6 @@ export class DlpServiceClient { {} | 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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteInspectTemplate(request); - */ deleteInspectTemplate( request?: protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest, optionsOrCallback?: @@ -1445,37 +1445,6 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.deleteInspectTemplate(request, options, callback); } - 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; /** * Creates a DeidentifyTemplate for re-using frequently used configuration * for de-identifying content, images, and storage. @@ -1521,9 +1490,40 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.createDeidentifyTemplate(request); + * @example include:samples/generated/v2/dlp_service.create_deidentify_template.js + * 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; createDeidentifyTemplate( request?: protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest, optionsOrCallback?: @@ -1571,6 +1571,31 @@ export class DlpServiceClient { callback ); } + /** + * 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 [DeidentifyTemplate]{@link google.privacy.dlp.v2.DeidentifyTemplate}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.update_deidentify_template.js + * region_tag:dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_async + */ updateDeidentifyTemplate( request?: protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, options?: CallOptions @@ -1602,31 +1627,6 @@ export class DlpServiceClient { {} | 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 [DeidentifyTemplate]{@link google.privacy.dlp.v2.DeidentifyTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.updateDeidentifyTemplate(request); - */ updateDeidentifyTemplate( request?: protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, optionsOrCallback?: @@ -1674,6 +1674,27 @@ export class DlpServiceClient { callback ); } + /** + * 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 [DeidentifyTemplate]{@link google.privacy.dlp.v2.DeidentifyTemplate}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_deidentify_template.js + * region_tag:dlp_v2_generated_DlpService_GetDeidentifyTemplate_async + */ getDeidentifyTemplate( request?: protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, options?: CallOptions @@ -1700,32 +1721,11 @@ export class DlpServiceClient { callback: Callback< protos.google.privacy.dlp.v2.IDeidentifyTemplate, | protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest - | 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 [DeidentifyTemplate]{@link google.privacy.dlp.v2.DeidentifyTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getDeidentifyTemplate(request); - */ + | null + | undefined, + {} | null | undefined + > + ): void; getDeidentifyTemplate( request?: protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, optionsOrCallback?: @@ -1769,6 +1769,27 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.getDeidentifyTemplate(request, options, callback); } + /** + * 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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.delete_deidentify_template.js + * region_tag:dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_async + */ deleteDeidentifyTemplate( request?: protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, options?: CallOptions @@ -1800,27 +1821,6 @@ export class DlpServiceClient { {} | 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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteDeidentifyTemplate(request); - */ deleteDeidentifyTemplate( request?: protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, optionsOrCallback?: @@ -1868,33 +1868,6 @@ export class DlpServiceClient { callback ); } - 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; /** * Creates a job trigger to run DLP actions such as scanning storage for * sensitive information on a set schedule. @@ -1935,9 +1908,36 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.createJobTrigger(request); + * @example include:samples/generated/v2/dlp_service.create_job_trigger.js + * 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; createJobTrigger( request?: protos.google.privacy.dlp.v2.ICreateJobTriggerRequest, optionsOrCallback?: @@ -1979,6 +1979,29 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.createJobTrigger(request, options, callback); } + /** + * 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 [JobTrigger]{@link google.privacy.dlp.v2.JobTrigger}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.update_job_trigger.js + * region_tag:dlp_v2_generated_DlpService_UpdateJobTrigger_async + */ updateJobTrigger( request?: protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest, options?: CallOptions @@ -2006,29 +2029,6 @@ export class DlpServiceClient { {} | 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 [JobTrigger]{@link google.privacy.dlp.v2.JobTrigger}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.updateJobTrigger(request); - */ updateJobTrigger( request?: protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest, optionsOrCallback?: @@ -2070,6 +2070,31 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.updateJobTrigger(request, options, callback); } + /** + * Inspect hybrid content and store findings to a trigger. The inspection + * will be processed asynchronously. To review the findings monitor the + * jobs within the trigger. + * Early access feature is in a pre-release state and might change or have + * limited support. For more information, see + * https://cloud.google.com/products#product-launch-stages. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the trigger to execute a hybrid inspect on, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + * @param {google.privacy.dlp.v2.HybridContentItem} request.hybridItem + * The item to inspect. + * @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 [HybridInspectResponse]{@link google.privacy.dlp.v2.HybridInspectResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.hybrid_inspect_job_trigger.js + * region_tag:dlp_v2_generated_DlpService_HybridInspectJobTrigger_async + */ hybridInspectJobTrigger( request?: protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, options?: CallOptions @@ -2101,31 +2126,6 @@ export class DlpServiceClient { {} | null | undefined > ): void; - /** - * Inspect hybrid content and store findings to a trigger. The inspection - * will be processed asynchronously. To review the findings monitor the - * jobs within the trigger. - * Early access feature is in a pre-release state and might change or have - * limited support. For more information, see - * https://cloud.google.com/products#product-launch-stages. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the trigger to execute a hybrid inspect on, for example - * `projects/dlp-test-project/jobTriggers/53234423`. - * @param {google.privacy.dlp.v2.HybridContentItem} request.hybridItem - * The item to inspect. - * @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 [HybridInspectResponse]{@link google.privacy.dlp.v2.HybridInspectResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.hybridInspectJobTrigger(request); - */ hybridInspectJobTrigger( request?: protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, optionsOrCallback?: @@ -2173,6 +2173,25 @@ export class DlpServiceClient { callback ); } + /** + * Gets 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 {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 [JobTrigger]{@link google.privacy.dlp.v2.JobTrigger}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_job_trigger.js + * region_tag:dlp_v2_generated_DlpService_GetJobTrigger_async + */ getJobTrigger( request?: protos.google.privacy.dlp.v2.IGetJobTriggerRequest, options?: CallOptions @@ -2200,25 +2219,6 @@ export class DlpServiceClient { {} | null | undefined > ): void; - /** - * Gets 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 {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 [JobTrigger]{@link google.privacy.dlp.v2.JobTrigger}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getJobTrigger(request); - */ getJobTrigger( request?: protos.google.privacy.dlp.v2.IGetJobTriggerRequest, optionsOrCallback?: @@ -2258,6 +2258,25 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.getJobTrigger(request, options, callback); } + /** + * Deletes 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 {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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.delete_job_trigger.js + * region_tag:dlp_v2_generated_DlpService_DeleteJobTrigger_async + */ deleteJobTrigger( request?: protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest, options?: CallOptions @@ -2285,25 +2304,6 @@ export class DlpServiceClient { {} | null | undefined > ): void; - /** - * Deletes 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 {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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteJobTrigger(request); - */ deleteJobTrigger( request?: protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest, optionsOrCallback?: @@ -2345,6 +2345,25 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.deleteJobTrigger(request, options, callback); } + /** + * Activate a job trigger. Causes the immediate execute of a trigger + * instead of waiting on the trigger event to occur. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the trigger to activate, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + * @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 [DlpJob]{@link google.privacy.dlp.v2.DlpJob}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.activate_job_trigger.js + * region_tag:dlp_v2_generated_DlpService_ActivateJobTrigger_async + */ activateJobTrigger( request?: protos.google.privacy.dlp.v2.IActivateJobTriggerRequest, options?: CallOptions @@ -2376,25 +2395,6 @@ export class DlpServiceClient { {} | null | undefined > ): void; - /** - * Activate a job trigger. Causes the immediate execute of a trigger - * instead of waiting on the trigger event to occur. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the trigger to activate, for example - * `projects/dlp-test-project/jobTriggers/53234423`. - * @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 [DlpJob]{@link google.privacy.dlp.v2.DlpJob}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.activateJobTrigger(request); - */ activateJobTrigger( request?: protos.google.privacy.dlp.v2.IActivateJobTriggerRequest, optionsOrCallback?: @@ -2438,33 +2438,6 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.activateJobTrigger(request, options, callback); } - createDlpJob( - request?: protos.google.privacy.dlp.v2.ICreateDlpJobRequest, - options?: CallOptions - ): Promise< - [ - protos.google.privacy.dlp.v2.IDlpJob, - protos.google.privacy.dlp.v2.ICreateDlpJobRequest | undefined, - {} | undefined - ] - >; - createDlpJob( - request: protos.google.privacy.dlp.v2.ICreateDlpJobRequest, - options: CallOptions, - callback: Callback< - protos.google.privacy.dlp.v2.IDlpJob, - protos.google.privacy.dlp.v2.ICreateDlpJobRequest | null | undefined, - {} | null | undefined - > - ): void; - createDlpJob( - request: protos.google.privacy.dlp.v2.ICreateDlpJobRequest, - callback: Callback< - protos.google.privacy.dlp.v2.IDlpJob, - protos.google.privacy.dlp.v2.ICreateDlpJobRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Creates a new job to inspect storage or calculate risk metrics. * See https://cloud.google.com/dlp/docs/inspecting-storage and @@ -2511,9 +2484,36 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.createDlpJob(request); + * @example include:samples/generated/v2/dlp_service.create_dlp_job.js + * region_tag:dlp_v2_generated_DlpService_CreateDlpJob_async */ + createDlpJob( + request?: protos.google.privacy.dlp.v2.ICreateDlpJobRequest, + options?: CallOptions + ): Promise< + [ + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.ICreateDlpJobRequest | undefined, + {} | undefined + ] + >; + createDlpJob( + request: protos.google.privacy.dlp.v2.ICreateDlpJobRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.ICreateDlpJobRequest | null | undefined, + {} | null | undefined + > + ): void; + createDlpJob( + request: protos.google.privacy.dlp.v2.ICreateDlpJobRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.ICreateDlpJobRequest | null | undefined, + {} | null | undefined + > + ): void; createDlpJob( request?: protos.google.privacy.dlp.v2.ICreateDlpJobRequest, optionsOrCallback?: @@ -2553,6 +2553,25 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.createDlpJob(request, options, callback); } + /** + * Gets the latest state of a long-running DlpJob. + * See https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DlpJob resource. + * @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 [DlpJob]{@link google.privacy.dlp.v2.DlpJob}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_dlp_job.js + * region_tag:dlp_v2_generated_DlpService_GetDlpJob_async + */ getDlpJob( request?: protos.google.privacy.dlp.v2.IGetDlpJobRequest, options?: CallOptions @@ -2580,25 +2599,6 @@ export class DlpServiceClient { {} | null | undefined > ): void; - /** - * Gets the latest state of a long-running DlpJob. - * See https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the DlpJob resource. - * @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 [DlpJob]{@link google.privacy.dlp.v2.DlpJob}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getDlpJob(request); - */ getDlpJob( request?: protos.google.privacy.dlp.v2.IGetDlpJobRequest, optionsOrCallback?: @@ -2638,6 +2638,27 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.getDlpJob(request, options, callback); } + /** + * Deletes a long-running DlpJob. This method indicates that the client is + * no longer interested in the DlpJob result. The job will be cancelled if + * possible. + * See https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DlpJob resource to be deleted. + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.delete_dlp_job.js + * region_tag:dlp_v2_generated_DlpService_DeleteDlpJob_async + */ deleteDlpJob( request?: protos.google.privacy.dlp.v2.IDeleteDlpJobRequest, options?: CallOptions @@ -2665,27 +2686,6 @@ export class DlpServiceClient { {} | null | undefined > ): void; - /** - * Deletes a long-running DlpJob. This method indicates that the client is - * no longer interested in the DlpJob result. The job will be cancelled if - * possible. - * See https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the DlpJob resource to be deleted. - * @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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteDlpJob(request); - */ deleteDlpJob( request?: protos.google.privacy.dlp.v2.IDeleteDlpJobRequest, optionsOrCallback?: @@ -2725,6 +2725,27 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.deleteDlpJob(request, options, callback); } + /** + * Starts asynchronous cancellation on a long-running DlpJob. The server + * makes a best effort to cancel the DlpJob, but success is not + * guaranteed. + * See https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DlpJob resource to be cancelled. + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.cancel_dlp_job.js + * region_tag:dlp_v2_generated_DlpService_CancelDlpJob_async + */ cancelDlpJob( request?: protos.google.privacy.dlp.v2.ICancelDlpJobRequest, options?: CallOptions @@ -2752,27 +2773,6 @@ export class DlpServiceClient { {} | null | undefined > ): void; - /** - * Starts asynchronous cancellation on a long-running DlpJob. The server - * makes a best effort to cancel the DlpJob, but success is not - * guaranteed. - * See https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the DlpJob resource to be cancelled. - * @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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.cancelDlpJob(request); - */ cancelDlpJob( request?: protos.google.privacy.dlp.v2.ICancelDlpJobRequest, optionsOrCallback?: @@ -2812,37 +2812,6 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.cancelDlpJob(request, options, callback); } - createStoredInfoType( - request?: protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, - options?: CallOptions - ): Promise< - [ - protos.google.privacy.dlp.v2.IStoredInfoType, - protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest | undefined, - {} | undefined - ] - >; - createStoredInfoType( - request: protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, - options: CallOptions, - callback: Callback< - protos.google.privacy.dlp.v2.IStoredInfoType, - | protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createStoredInfoType( - request: protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, - callback: Callback< - protos.google.privacy.dlp.v2.IStoredInfoType, - | protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest - | null - | undefined, - {} | null | undefined - > - ): void; /** * Creates a pre-built stored infoType to be used for inspection. * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to @@ -2887,9 +2856,40 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.createStoredInfoType(request); + * @example include:samples/generated/v2/dlp_service.create_stored_info_type.js + * region_tag:dlp_v2_generated_DlpService_CreateStoredInfoType_async */ + createStoredInfoType( + request?: protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, + options?: CallOptions + ): Promise< + [ + protos.google.privacy.dlp.v2.IStoredInfoType, + protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest | undefined, + {} | undefined + ] + >; + createStoredInfoType( + request: protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + | protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createStoredInfoType( + request: protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + | protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + > + ): void; createStoredInfoType( request?: protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, optionsOrCallback?: @@ -2933,6 +2933,34 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.createStoredInfoType(request, options, callback); } + /** + * Updates the stored infoType by creating a new version. The existing version + * will continue to be used until the new version is ready. + * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of organization and storedInfoType to be updated, for + * example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/432452342. + * @param {google.privacy.dlp.v2.StoredInfoTypeConfig} request.config + * Updated configuration for the storedInfoType. If not provided, a new + * version of the storedInfoType will be created with the existing + * configuration. + * @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 [StoredInfoType]{@link google.privacy.dlp.v2.StoredInfoType}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.update_stored_info_type.js + * region_tag:dlp_v2_generated_DlpService_UpdateStoredInfoType_async + */ updateStoredInfoType( request?: protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest, options?: CallOptions @@ -2964,34 +2992,6 @@ export class DlpServiceClient { {} | null | undefined > ): void; - /** - * Updates the stored infoType by creating a new version. The existing version - * will continue to be used until the new version is ready. - * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of organization and storedInfoType to be updated, for - * example `organizations/433245324/storedInfoTypes/432452342` or - * projects/project-id/storedInfoTypes/432452342. - * @param {google.privacy.dlp.v2.StoredInfoTypeConfig} request.config - * Updated configuration for the storedInfoType. If not provided, a new - * version of the storedInfoType will be created with the existing - * configuration. - * @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 [StoredInfoType]{@link google.privacy.dlp.v2.StoredInfoType}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.updateStoredInfoType(request); - */ updateStoredInfoType( request?: protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest, optionsOrCallback?: @@ -3035,6 +3035,27 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.updateStoredInfoType(request, options, callback); } + /** + * Gets a stored infoType. + * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the organization and storedInfoType to be read, for + * example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/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 [StoredInfoType]{@link google.privacy.dlp.v2.StoredInfoType}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_stored_info_type.js + * region_tag:dlp_v2_generated_DlpService_GetStoredInfoType_async + */ getStoredInfoType( request?: protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest, options?: CallOptions @@ -3062,27 +3083,6 @@ export class DlpServiceClient { {} | null | undefined > ): void; - /** - * Gets a stored infoType. - * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the organization and storedInfoType to be read, for - * example `organizations/433245324/storedInfoTypes/432452342` or - * projects/project-id/storedInfoTypes/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 [StoredInfoType]{@link google.privacy.dlp.v2.StoredInfoType}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getStoredInfoType(request); - */ getStoredInfoType( request?: protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest, optionsOrCallback?: @@ -3124,6 +3124,27 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.getStoredInfoType(request, options, callback); } + /** + * Deletes a stored infoType. + * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the organization and storedInfoType to be deleted, for + * example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.delete_stored_info_type.js + * region_tag:dlp_v2_generated_DlpService_DeleteStoredInfoType_async + */ deleteStoredInfoType( request?: protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, options?: CallOptions @@ -3155,27 +3176,6 @@ export class DlpServiceClient { {} | null | undefined > ): void; - /** - * Deletes a stored infoType. - * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the organization and storedInfoType to be deleted, for - * example `organizations/433245324/storedInfoTypes/432452342` or - * projects/project-id/storedInfoTypes/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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteStoredInfoType(request); - */ deleteStoredInfoType( request?: protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, optionsOrCallback?: @@ -3219,6 +3219,31 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.deleteStoredInfoType(request, options, callback); } + /** + * Inspect hybrid content and store findings to a job. + * To review the findings inspect the job. Inspection will occur + * asynchronously. + * Early access feature is in a pre-release state and might change or have + * limited support. For more information, see + * https://cloud.google.com/products#product-launch-stages. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the job to execute a hybrid inspect on, for example + * `projects/dlp-test-project/dlpJob/53234423`. + * @param {google.privacy.dlp.v2.HybridContentItem} request.hybridItem + * The item to inspect. + * @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 [HybridInspectResponse]{@link google.privacy.dlp.v2.HybridInspectResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.hybrid_inspect_dlp_job.js + * region_tag:dlp_v2_generated_DlpService_HybridInspectDlpJob_async + */ hybridInspectDlpJob( request?: protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest, options?: CallOptions @@ -3250,31 +3275,6 @@ export class DlpServiceClient { {} | null | undefined > ): void; - /** - * Inspect hybrid content and store findings to a job. - * To review the findings inspect the job. Inspection will occur - * asynchronously. - * Early access feature is in a pre-release state and might change or have - * limited support. For more information, see - * https://cloud.google.com/products#product-launch-stages. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the job to execute a hybrid inspect on, for example - * `projects/dlp-test-project/dlpJob/53234423`. - * @param {google.privacy.dlp.v2.HybridContentItem} request.hybridItem - * The item to inspect. - * @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 [HybridInspectResponse]{@link google.privacy.dlp.v2.HybridInspectResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.hybridInspectDlpJob(request); - */ hybridInspectDlpJob( request?: protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest, optionsOrCallback?: @@ -3318,6 +3318,27 @@ export class DlpServiceClient { this.initialize(); return this.innerApiCalls.hybridInspectDlpJob(request, options, callback); } + /** + * Finish a running hybrid DlpJob. Triggers the finalization steps and running + * of any enabled actions that have not yet run. + * Early access feature is in a pre-release state and might change or have + * limited support. For more information, see + * https://cloud.google.com/products#product-launch-stages. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DlpJob resource to be cancelled. + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.finish_dlp_job.js + * region_tag:dlp_v2_generated_DlpService_FinishDlpJob_async + */ finishDlpJob( request?: protos.google.privacy.dlp.v2.IFinishDlpJobRequest, options?: CallOptions @@ -3345,27 +3366,6 @@ export class DlpServiceClient { {} | null | undefined > ): void; - /** - * Finish a running hybrid DlpJob. Triggers the finalization steps and running - * of any enabled actions that have not yet run. - * Early access feature is in a pre-release state and might change or have - * limited support. For more information, see - * https://cloud.google.com/products#product-launch-stages. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the DlpJob resource to be cancelled. - * @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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.finishDlpJob(request); - */ finishDlpJob( request?: protos.google.privacy.dlp.v2.IFinishDlpJobRequest, optionsOrCallback?: @@ -3406,37 +3406,6 @@ export class DlpServiceClient { return this.innerApiCalls.finishDlpJob(request, options, callback); } - listInspectTemplates( - request?: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.privacy.dlp.v2.IInspectTemplate[], - protos.google.privacy.dlp.v2.IListInspectTemplatesRequest | null, - protos.google.privacy.dlp.v2.IListInspectTemplatesResponse - ] - >; - listInspectTemplates( - request: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, - | protos.google.privacy.dlp.v2.IListInspectTemplatesResponse - | null - | undefined, - protos.google.privacy.dlp.v2.IInspectTemplate - > - ): void; - listInspectTemplates( - request: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, - callback: PaginationCallback< - protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, - | protos.google.privacy.dlp.v2.IListInspectTemplatesResponse - | null - | undefined, - protos.google.privacy.dlp.v2.IInspectTemplate - > - ): void; /** * Lists InspectTemplates. * See https://cloud.google.com/dlp/docs/creating-templates to learn more. @@ -3499,6 +3468,37 @@ export class DlpServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listInspectTemplates( + request?: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.privacy.dlp.v2.IInspectTemplate[], + protos.google.privacy.dlp.v2.IListInspectTemplatesRequest | null, + protos.google.privacy.dlp.v2.IListInspectTemplatesResponse + ] + >; + listInspectTemplates( + request: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + | protos.google.privacy.dlp.v2.IListInspectTemplatesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IInspectTemplate + > + ): void; + listInspectTemplates( + request: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + | protos.google.privacy.dlp.v2.IListInspectTemplatesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IInspectTemplate + > + ): void; listInspectTemplates( request?: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, optionsOrCallback?: @@ -3683,11 +3683,8 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listInspectTemplatesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v2/dlp_service.list_inspect_templates.js + * region_tag:dlp_v2_generated_DlpService_ListInspectTemplates_async */ listInspectTemplatesAsync( request?: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, @@ -3701,7 +3698,6 @@ export class DlpServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listInspectTemplates']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -3711,37 +3707,6 @@ export class DlpServiceClient { callSettings ) as AsyncIterable; } - listDeidentifyTemplates( - request?: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.privacy.dlp.v2.IDeidentifyTemplate[], - protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest | null, - protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse - ] - >; - listDeidentifyTemplates( - request: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, - | protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse - | null - | undefined, - protos.google.privacy.dlp.v2.IDeidentifyTemplate - > - ): void; - listDeidentifyTemplates( - request: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, - callback: PaginationCallback< - protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, - | protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse - | null - | undefined, - protos.google.privacy.dlp.v2.IDeidentifyTemplate - > - ): void; /** * Lists DeidentifyTemplates. * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn @@ -3805,6 +3770,37 @@ export class DlpServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listDeidentifyTemplates( + request?: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.privacy.dlp.v2.IDeidentifyTemplate[], + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest | null, + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse + ] + >; + listDeidentifyTemplates( + request: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + | protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IDeidentifyTemplate + > + ): void; + listDeidentifyTemplates( + request: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + | protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IDeidentifyTemplate + > + ): void; listDeidentifyTemplates( request?: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, optionsOrCallback?: @@ -3993,11 +3989,8 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listDeidentifyTemplatesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v2/dlp_service.list_deidentify_templates.js + * region_tag:dlp_v2_generated_DlpService_ListDeidentifyTemplates_async */ listDeidentifyTemplatesAsync( request?: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, @@ -4011,7 +4004,6 @@ export class DlpServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listDeidentifyTemplates']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -4021,33 +4013,6 @@ export class DlpServiceClient { callSettings ) as AsyncIterable; } - listJobTriggers( - request?: protos.google.privacy.dlp.v2.IListJobTriggersRequest, - options?: CallOptions - ): Promise< - [ - protos.google.privacy.dlp.v2.IJobTrigger[], - protos.google.privacy.dlp.v2.IListJobTriggersRequest | null, - protos.google.privacy.dlp.v2.IListJobTriggersResponse - ] - >; - listJobTriggers( - request: protos.google.privacy.dlp.v2.IListJobTriggersRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.privacy.dlp.v2.IListJobTriggersRequest, - protos.google.privacy.dlp.v2.IListJobTriggersResponse | null | undefined, - protos.google.privacy.dlp.v2.IJobTrigger - > - ): void; - listJobTriggers( - request: protos.google.privacy.dlp.v2.IListJobTriggersRequest, - callback: PaginationCallback< - protos.google.privacy.dlp.v2.IListJobTriggersRequest, - protos.google.privacy.dlp.v2.IListJobTriggersResponse | null | undefined, - protos.google.privacy.dlp.v2.IJobTrigger - > - ): void; /** * Lists job triggers. * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. @@ -4133,6 +4098,33 @@ export class DlpServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listJobTriggers( + request?: protos.google.privacy.dlp.v2.IListJobTriggersRequest, + options?: CallOptions + ): Promise< + [ + protos.google.privacy.dlp.v2.IJobTrigger[], + protos.google.privacy.dlp.v2.IListJobTriggersRequest | null, + protos.google.privacy.dlp.v2.IListJobTriggersResponse + ] + >; + listJobTriggers( + request: protos.google.privacy.dlp.v2.IListJobTriggersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListJobTriggersRequest, + protos.google.privacy.dlp.v2.IListJobTriggersResponse | null | undefined, + protos.google.privacy.dlp.v2.IJobTrigger + > + ): void; + listJobTriggers( + request: protos.google.privacy.dlp.v2.IListJobTriggersRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListJobTriggersRequest, + protos.google.privacy.dlp.v2.IListJobTriggersResponse | null | undefined, + protos.google.privacy.dlp.v2.IJobTrigger + > + ): void; listJobTriggers( request?: protos.google.privacy.dlp.v2.IListJobTriggersRequest, optionsOrCallback?: @@ -4361,11 +4353,8 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listJobTriggersAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v2/dlp_service.list_job_triggers.js + * region_tag:dlp_v2_generated_DlpService_ListJobTriggers_async */ listJobTriggersAsync( request?: protos.google.privacy.dlp.v2.IListJobTriggersRequest, @@ -4379,7 +4368,6 @@ export class DlpServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listJobTriggers']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -4389,33 +4377,6 @@ export class DlpServiceClient { callSettings ) as AsyncIterable; } - listDlpJobs( - request?: protos.google.privacy.dlp.v2.IListDlpJobsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.privacy.dlp.v2.IDlpJob[], - protos.google.privacy.dlp.v2.IListDlpJobsRequest | null, - protos.google.privacy.dlp.v2.IListDlpJobsResponse - ] - >; - listDlpJobs( - request: protos.google.privacy.dlp.v2.IListDlpJobsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.privacy.dlp.v2.IListDlpJobsRequest, - protos.google.privacy.dlp.v2.IListDlpJobsResponse | null | undefined, - protos.google.privacy.dlp.v2.IDlpJob - > - ): void; - listDlpJobs( - request: protos.google.privacy.dlp.v2.IListDlpJobsRequest, - callback: PaginationCallback< - protos.google.privacy.dlp.v2.IListDlpJobsRequest, - protos.google.privacy.dlp.v2.IListDlpJobsResponse | null | undefined, - protos.google.privacy.dlp.v2.IDlpJob - > - ): void; /** * Lists DlpJobs that match the specified filter in the request. * See https://cloud.google.com/dlp/docs/inspecting-storage and @@ -4504,6 +4465,33 @@ export class DlpServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listDlpJobs( + request?: protos.google.privacy.dlp.v2.IListDlpJobsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.privacy.dlp.v2.IDlpJob[], + protos.google.privacy.dlp.v2.IListDlpJobsRequest | null, + protos.google.privacy.dlp.v2.IListDlpJobsResponse + ] + >; + listDlpJobs( + request: protos.google.privacy.dlp.v2.IListDlpJobsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListDlpJobsRequest, + protos.google.privacy.dlp.v2.IListDlpJobsResponse | null | undefined, + protos.google.privacy.dlp.v2.IDlpJob + > + ): void; + listDlpJobs( + request: protos.google.privacy.dlp.v2.IListDlpJobsRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListDlpJobsRequest, + protos.google.privacy.dlp.v2.IListDlpJobsResponse | null | undefined, + protos.google.privacy.dlp.v2.IDlpJob + > + ): void; listDlpJobs( request?: protos.google.privacy.dlp.v2.IListDlpJobsRequest, optionsOrCallback?: @@ -4734,11 +4722,8 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listDlpJobsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v2/dlp_service.list_dlp_jobs.js + * region_tag:dlp_v2_generated_DlpService_ListDlpJobs_async */ listDlpJobsAsync( request?: protos.google.privacy.dlp.v2.IListDlpJobsRequest, @@ -4752,7 +4737,6 @@ export class DlpServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listDlpJobs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -4762,37 +4746,6 @@ export class DlpServiceClient { callSettings ) as AsyncIterable; } - listStoredInfoTypes( - request?: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.privacy.dlp.v2.IStoredInfoType[], - protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest | null, - protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse - ] - >; - listStoredInfoTypes( - request: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, - | protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse - | null - | undefined, - protos.google.privacy.dlp.v2.IStoredInfoType - > - ): void; - listStoredInfoTypes( - request: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, - callback: PaginationCallback< - protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, - | protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse - | null - | undefined, - protos.google.privacy.dlp.v2.IStoredInfoType - > - ): void; /** * Lists stored infoTypes. * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to @@ -4857,6 +4810,37 @@ export class DlpServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listStoredInfoTypes( + request?: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.privacy.dlp.v2.IStoredInfoType[], + protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest | null, + protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse + ] + >; + listStoredInfoTypes( + request: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + | protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IStoredInfoType + > + ): void; + listStoredInfoTypes( + request: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + | protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IStoredInfoType + > + ): void; listStoredInfoTypes( request?: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, optionsOrCallback?: @@ -5043,11 +5027,8 @@ export class DlpServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listStoredInfoTypesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v2/dlp_service.list_stored_info_types.js + * region_tag:dlp_v2_generated_DlpService_ListStoredInfoTypes_async */ listStoredInfoTypesAsync( request?: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, @@ -5061,7 +5042,6 @@ export class DlpServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listStoredInfoTypes']; const callSettings = defaultCallSettings.merge(options); this.initialize();