diff --git a/samples/deid.js b/samples/deid.js index 94aacdd5..f4ee69c0 100644 --- a/samples/deid.js +++ b/samples/deid.js @@ -16,7 +16,7 @@ 'use strict'; function deidentifyWithMask(string, maskingCharacter, numberToMask) { - // [START deidentify_masking] + // [START dlp_deidentify_masking] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -63,11 +63,11 @@ function deidentifyWithMask(string, maskingCharacter, numberToMask) { .catch(err => { console.log(`Error in deidentifyWithMask: ${err.message || err}`); }); - // [END deidentify_masking] + // [END dlp_deidentify_masking] } function deidentifyWithFpe(string, alphabet, keyName, wrappedKey) { - // [START deidentify_fpe] + // [START dlp_deidentify_fpe] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -123,7 +123,7 @@ function deidentifyWithFpe(string, alphabet, keyName, wrappedKey) { .catch(err => { console.log(`Error in deidentifyWithFpe: ${err.message || err}`); }); - // [END deidentify_fpe] + // [END dlp_deidentify_fpe] } const cli = require(`yargs`) diff --git a/samples/inspect.js b/samples/inspect.js index d8fad363..d25acec7 100644 --- a/samples/inspect.js +++ b/samples/inspect.js @@ -26,7 +26,7 @@ function inspectString( infoTypes, includeQuote ) { - // [START inspect_string] + // [START dlp_inspect_string] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -83,7 +83,7 @@ function inspectString( .catch(err => { console.log(`Error in inspectString: ${err.message || err}`); }); - // [END inspect_string] + // [END dlp_inspect_string] } function inspectFile( @@ -93,7 +93,7 @@ function inspectFile( infoTypes, includeQuote ) { - // [START inspect_file] + // [START dlp_inspect_file] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -155,7 +155,7 @@ function inspectFile( .catch(err => { console.log(`Error in inspectFile: ${err.message || err}`); }); - // [END inspect_file] + // [END dlp_inspect_file] } function promiseInspectGCSFile( @@ -165,7 +165,7 @@ function promiseInspectGCSFile( maxFindings, infoTypes ) { - // [START inspect_gcs_file_promise] + // [START dlp_inspect_gcs] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -236,7 +236,7 @@ function promiseInspectGCSFile( .catch(err => { console.log(`Error in promiseInspectGCSFile: ${err.message || err}`); }); - // [END inspect_gcs_file_promise] + // [END dlp_inspect_gcs] } function eventInspectGCSFile( @@ -246,7 +246,7 @@ function eventInspectGCSFile( maxFindings, infoTypes ) { - // [START inspect_gcs_file_event] + // [START dlp_inspect_gcs_event] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -332,7 +332,7 @@ function eventInspectGCSFile( .catch(err => { console.log(`Error in eventInspectGCSFile: ${err.message || err}`); }); - // [END inspect_gcs_file_event] + // [END dlp_inspect_gcs_event] } function inspectDatastore( @@ -344,7 +344,7 @@ function inspectDatastore( infoTypes // includeQuote ) { - // [START inspect_datastore] + // [START dlp_inspect_datastore] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -424,7 +424,7 @@ function inspectDatastore( .catch(err => { console.log(`Error in inspectDatastore: ${err.message || err}`); }); - // [END inspect_datastore] + // [END dlp_inspect_datastore] } function inspectBigquery( @@ -436,7 +436,7 @@ function inspectBigquery( infoTypes // includeQuote ) { - // [START inspect_bigquery] + // [START dlp_inspect_bigquery] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -513,7 +513,7 @@ function inspectBigquery( .catch(err => { console.log(`Error in inspectBigquery: ${err.message || err}`); }); - // [END inspect_bigquery] + // [END dlp_inspect_bigquery] } const cli = require(`yargs`) // eslint-disable-line diff --git a/samples/metadata.js b/samples/metadata.js index 76044814..b19a362f 100644 --- a/samples/metadata.js +++ b/samples/metadata.js @@ -16,7 +16,7 @@ 'use strict'; function listInfoTypes(category, languageCode) { - // [START list_info_types] + // [START dlp_list_info_types] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -44,11 +44,11 @@ function listInfoTypes(category, languageCode) { .catch(err => { console.log(`Error in listInfoTypes: ${err.message || err}`); }); - // [END list_info_types] + // [END dlp_list_info_types] } function listRootCategories(languageCode) { - // [START list_categories] + // [START dlp_list_categories] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -72,7 +72,7 @@ function listRootCategories(languageCode) { .catch(err => { console.log(`Error in listRootCategories: ${err.message || err}`); }); - // [END list_categories] + // [END dlp_list_categories] } const cli = require(`yargs`) diff --git a/samples/quickstart.js b/samples/quickstart.js index 09f54af2..587c57f0 100644 --- a/samples/quickstart.js +++ b/samples/quickstart.js @@ -15,7 +15,7 @@ 'use strict'; -// [START quickstart] +// [START dlp_quickstart] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -72,4 +72,4 @@ dlp .catch(err => { console.error(`Error in inspectString: ${err.message || err}`); }); -// [END quickstart] +// [END dlp_quickstart] diff --git a/samples/redact.js b/samples/redact.js index 934a00ee..b9eb8e0b 100644 --- a/samples/redact.js +++ b/samples/redact.js @@ -16,7 +16,7 @@ 'use strict'; function redactString(string, replaceString, minLikelihood, infoTypes) { - // [START redact_string] + // [START dlp_redact_string] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -62,11 +62,11 @@ function redactString(string, replaceString, minLikelihood, infoTypes) { .catch(err => { console.log(`Error in redactString: ${err.message || err}`); }); - // [END redact_string] + // [END dlp_redact_string] } function redactImage(filepath, minLikelihood, infoTypes, outputPath) { - // [START redact_image] + // [START dlp_redact_image] // Imports required Node.js libraries const mime = require('mime'); const fs = require('fs'); @@ -118,7 +118,7 @@ function redactImage(filepath, minLikelihood, infoTypes, outputPath) { .catch(err => { console.log(`Error in redactImage: ${err.message || err}`); }); - // [END redact_image] + // [END dlp_redact_image] } const cli = require(`yargs`) diff --git a/samples/risk.js b/samples/risk.js index 18b9a1fc..ae9375e2 100644 --- a/samples/risk.js +++ b/samples/risk.js @@ -16,7 +16,7 @@ 'use strict'; function numericalRiskAnalysis(projectId, datasetId, tableId, columnName) { - // [START numerical_risk] + // [START dlp_numerical_stats] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -91,11 +91,11 @@ function numericalRiskAnalysis(projectId, datasetId, tableId, columnName) { .catch(err => { console.log(`Error in numericalRiskAnalysis: ${err.message || err}`); }); - // [END numerical_risk] + // [END dlp_numerical_stats] } function categoricalRiskAnalysis(projectId, datasetId, tableId, columnName) { - // [START categorical_risk] + // [START dlp_categorical_stats] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -162,11 +162,11 @@ function categoricalRiskAnalysis(projectId, datasetId, tableId, columnName) { .catch(err => { console.log(`Error in categoricalRiskAnalysis: ${err.message || err}`); }); - // [END categorical_risk] + // [END dlp_categorical_stats] } function kAnonymityAnalysis(projectId, datasetId, tableId, quasiIds) { - // [START k_anonymity] + // [START dlp_k_anonymity] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -230,7 +230,7 @@ function kAnonymityAnalysis(projectId, datasetId, tableId, quasiIds) { .catch(err => { console.log(`Error in kAnonymityAnalysis: ${err.message || err}`); }); - // [END k_anonymity] + // [END dlp_k_anonymity] } function lDiversityAnalysis( @@ -240,7 +240,7 @@ function lDiversityAnalysis( sensitiveAttribute, quasiIds ) { - // [START l_diversity] + // [START dlp_l_diversity] // Imports the Google Cloud Data Loss Prevention library const DLP = require('@google-cloud/dlp'); @@ -317,7 +317,7 @@ function lDiversityAnalysis( .catch(err => { console.log(`Error in lDiversityAnalysis: ${err.message || err}`); }); - // [END l_diversity] + // [END dlp_l_diversity] } const cli = require(`yargs`) // eslint-disable-line